LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-20-2016, 06:48 PM   #1
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Rep: Reputation: Disabled
ubuntu server disk failed, help me


Hello

server gives an error

Failed screen ;
http://i.hizliresim.com/rEb0VV.jpg

Os : UBUNTU 14.04 - vmware virtual server

Live disk os print screen

Code:
root@ubuntu:~# pvdisplay
  Couldn't find device with uuid J3f0bP-yTQW-7yiD-On2Z-17Kw-wPp7-RWH2t9.
  --- Physical volume ---
  PV Name               unknown device
  VG Name               server-vg
  PV Size               99.76 GiB / not usable 2.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              25538
  Free PE               5
  Allocated PE          25533
  PV UUID               J3f0bP-yTQW-7yiD-On2Z-17Kw-wPp7-RWH2t9

  --- Physical volume ---
  PV Name               /dev/sda4
  VG Name               server-vg
  PV Size               400.00 GiB / not usable 1.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              102400
  Free PE               0
  Allocated PE          102400
  PV UUID               VrnOve-rkJU-xmjA-MHqz-4Y3v-Y3NO-G2LnFi
Code:
root@ubuntu:~# blkid
/dev/loop0: TYPE="squashfs"
/dev/sr0: LABEL="Ubuntu 14.04.4 LTS amd64" TYPE="iso9660"
/dev/sda1: UUID="21e32c1c-be2e-4f55-b6d2-11fdd34ebabc" TYPE="ext2"
/dev/sda4: UUID="VrnOve-rkJU-xmjA-MHqz-4Y3v-Y3NO-G2LnFi" TYPE="LVM2_member"
Code:
root@ubuntu:~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0   500G  0 disk
├─sda1   8:1    0   243M  0 part
├─sda2   8:2    0     1K  0 part
├─sda3   8:3    0  1023K  0 part
└─sda4   8:4    0   400G  0 part
sr0     11:0    1  1020M  0 rom  /cdrom
loop0    7:0    0 975.9M  1 loop /rofs
Code:
root@ubuntu:~# fdisk -l

Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders, total 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00087159

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   209713151   104605697    5  Extended
/dev/sda3          499712      501757        1023   83  Linux
/dev/sda4       209713152  1048575999   419431424   8e  Linux LVM

Partition table entries are not in disk order
Code:
root@ubuntu:~# vgdisplay
  Couldn't find device with uuid J3f0bP-yTQW-7yiD-On2Z-17Kw-wPp7-RWH2t9.
  --- Volume group ---
  VG Name               server-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                1
  VG Size               499.76 GiB
  PE Size               4.00 MiB
  Total PE              127938
  Alloc PE / Size       127933 / 499.74 GiB
  Free  PE / Size       5 / 20.00 MiB
  VG UUID               iCp4mf-34fz-p0Xh-X7lm-uDdG-bKYm-d4yKc2
Code:
root@ubuntu:~# lvdisplay
  Couldn't find device with uuid J3f0bP-yTQW-7yiD-On2Z-17Kw-wPp7-RWH2t9.
  --- Logical volume ---
  LV Path                /dev/server-vg/root
  LV Name                root
  VG Name                server-vg
  LV UUID                wfaJpW-TU0v-RvOw-SyKu-bl0g-tmpa-zmI5v0
  LV Write Access        read/write
  LV Creation host, time server, 2016-03-12 19:24:56 +0000
  LV Status              NOT available
  LV Size                491.74 GiB
  Current LE             125886
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto

  --- Logical volume ---
  LV Path                /dev/server-vg/swap_1
  LV Name                swap_1
  VG Name                server-vg
  LV UUID                pddotV-z9eH-xHRJ-sw19-0Kcb-PZCN-v0VmhH
  LV Write Access        read/write
  LV Creation host, time server, 2016-03-12 19:24:56 +0000
  LV Status              NOT available
  LV Size                8.00 GiB
  Current LE             2047
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
Code:
root@ubuntu:~# fdisk -l /dev/sda

Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders, total 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00087159

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   209713151   104605697    5  Extended
/dev/sda3          499712      501757        1023   83  Linux
/dev/sda4       209713152  1048575999   419431424   8e  Linux LVM

Partition table entries are not in disk order

Last edited by prowas; 10-22-2016 at 03:48 AM.
 
Old 10-21-2016, 06:15 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
It appears to be DOA. What kind of help exactly are you looking for?
 
Old 10-21-2016, 06:47 PM   #3
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Replace disk.
Reinstall and/or restore backup.
Have beer.
 
Old 10-21-2016, 07:01 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
It looks like there used to be a 99.76GB partition that was part of the volume group. Adding up the numbers, it appears that partition 2 either was that partition or was an extended partition that contained the 99.76GB logical partition. What does "fdisk -l /dev/sda" show from the live disk?
 
Old 10-22-2016, 03:49 AM   #5
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
It looks like there used to be a 99.76GB partition that was part of the volume group. Adding up the numbers, it appears that partition 2 either was that partition or was an extended partition that contained the 99.76GB logical partition. What does "fdisk -l /dev/sda" show from the live disk?
Code:
root@ubuntu:~# fdisk -l /dev/sda

Disk /dev/sda: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders, total 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00087159

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   209713151   104605697    5  Extended
/dev/sda3          499712      501757        1023   83  Linux
/dev/sda4       209713152  1048575999   419431424   8e  Linux LVM

Partition table entries are not in disk order
 
Old 10-22-2016, 03:50 AM   #6
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
It appears to be DOA. What kind of help exactly are you looking for?
HDD data recovery
 
Old 10-22-2016, 03:51 AM   #7
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
Replace disk.
Reinstall and/or restore backup.
Have beer.
To access the old data ?? help me
 
Old 10-22-2016, 08:24 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
check this out for data recovery

TestDisk

PhotoRec
 
Old 10-22-2016, 10:18 AM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
It appears that there was a partition /dev/sda5 that held your missing LVM volume. The partition header, at least, was overwritten. If the LVM PV header is intact, testdisk will be able to recover the partition. Without that LVM PV header, testdisk won't be able to make sense out of what remains.

At this point, you are getting into dangerous territory. I strongly suggest saving an image of that entire extended partition:
Code:
dd if=/dev/sda bs=1M skip=244 count=102155 of=/path/to/some/file
That's going to pick up both sda2 and the small sda3 partition that physically precedes it. Because of the way sda2 is aligned, copying just sda2 would require using a painfully small 1024-byte block size (very slow for 100GB).

Next, use fdisk to try to create logical partition 5 using the entire available space in the extended partition. That's probably not going to work since the extended partition header is gone. You will first need to delete the existing extended partition and create a new one at the same location.

Now, you can run "file -s /dev/sda5" and see if it looks like an LVM physical volume. If not, recovery may still be possible, but a bit complicated. Let's see how things appear first.
 
1 members found this post helpful.
Old 10-22-2016, 02:49 PM   #10
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
It appears that there was a partition /dev/sda5 that held your missing LVM volume. The partition header, at least, was overwritten. If the LVM PV header is intact, testdisk will be able to recover the partition. Without that LVM PV header, testdisk won't be able to make sense out of what remains.

At this point, you are getting into dangerous territory. I strongly suggest saving an image of that entire extended partition:
Code:
dd if=/dev/sda bs=1M skip=244 count=102155 of=/path/to/some/file
That's going to pick up both sda2 and the small sda3 partition that physically precedes it. Because of the way sda2 is aligned, copying just sda2 would require using a painfully small 1024-byte block size (very slow for 100GB).

Next, use fdisk to try to create logical partition 5 using the entire available space in the extended partition. That's probably not going to work since the extended partition header is gone. You will first need to delete the existing extended partition and create a new one at the same location.

Now, you can run "file -s /dev/sda5" and see if it looks like an LVM physical volume. If not, recovery may still be possible, but a bit complicated. Let's see how things appear first.


Code:
root@ubuntu:~# file -s /dev/sda5
/dev/sda5: ERROR: cannot open `/dev/sda5' (No such file or directory)
 
Old 10-22-2016, 04:42 PM   #11
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by prowas View Post
Code:
root@ubuntu:~# file -s /dev/sda5
/dev/sda5: ERROR: cannot open `/dev/sda5' (No such file or directory)
Did you use fdisk and create partition 5 on that disk? Were there any error messages when you did that?
 
Old 10-22-2016, 04:56 PM   #12
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Did you use fdisk and create partition 5 on that disk? Were there any error messages when you did that?
I needed to write what commands?
 
Old 10-22-2016, 10:46 PM   #13
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Did you first try running testdisk to see if it could find the missing LVM volume? That would be the safest step. Playing with logical partitions always runs the risk of writing a logical partition header in a wrong place and overwriting something important.
 
Old 10-23-2016, 02:24 AM   #14
prowas
LQ Newbie
 
Registered: Oct 2016
Posts: 25

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Did you first try running testdisk to see if it could find the missing LVM volume? That would be the safest step. Playing with logical partitions always runs the risk of writing a logical partition header in a wrong place and overwriting something important.
how can I do it ?
 
Old 10-23-2016, 03:10 AM   #15
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Enter the command testdisk at a root prompt.

# testdisk

Can you describe/discuss/explain *in detail*: what disk drives you had, and what *might* have happened to them?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see failed internal disk in HP Blade linux server bkarthick Linux - Newbie 1 03-09-2013 02:37 AM
need help with mounting disk after failed ubuntu 11 upgrade ?? M$ISBS Ubuntu 5 07-13-2011 01:30 PM
recover files from a failed ubuntu disk ulfscha Linux - Newbie 1 02-26-2011 10:16 AM
Failed to sync one or more sources: Failed to write some configuration data to disk ganeshbatwal Linux - Software 2 11-06-2008 10:05 AM
Ubuntu 7.10 Live demo: disk format failed jessica_lilly Ubuntu 1 11-02-2007 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration