LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ubuntu server disk failed, help me (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-server-disk-failed-help-me-4175591867/)

prowas 10-20-2016 07:48 PM

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


frankbell 10-21-2016 07:15 PM

It appears to be DOA. What kind of help exactly are you looking for?

descendant_command 10-21-2016 07:47 PM

Replace disk.
Reinstall and/or restore backup.
Have beer. :)

rknichols 10-21-2016 08:01 PM

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?

prowas 10-22-2016 04:49 AM

Quote:

Originally Posted by rknichols (Post 5621232)
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


prowas 10-22-2016 04:50 AM

Quote:

Originally Posted by frankbell (Post 5621209)
It appears to be DOA. What kind of help exactly are you looking for?

HDD data recovery

prowas 10-22-2016 04:51 AM

Quote:

Originally Posted by descendant_command (Post 5621226)
Replace disk.
Reinstall and/or restore backup.
Have beer. :)

To access the old data ?? help me

BW-userx 10-22-2016 09:24 AM

check this out for data recovery

TestDisk

PhotoRec

rknichols 10-22-2016 11:18 AM

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.

prowas 10-22-2016 03:49 PM

Quote:

Originally Posted by rknichols (Post 5621439)
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)


rknichols 10-22-2016 05:42 PM

Quote:

Originally Posted by prowas (Post 5621541)
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?

prowas 10-22-2016 05:56 PM

Quote:

Originally Posted by rknichols (Post 5621574)
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?

rknichols 10-22-2016 11:46 PM

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.

prowas 10-23-2016 03:24 AM

Quote:

Originally Posted by rknichols (Post 5621668)
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 ?

Jjanel 10-23-2016 04:10 AM

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?


All times are GMT -5. The time now is 01:12 PM.