0

For the last 10 days I've been living a nightmare trying to recover my data.

I'm trying to recover VG and mount it to access the data here's what I get

[root@]# pvscan
  Found duplicate PV 72VbNBnT9KDR4fX39NUsY6LdIlgJrYMp: using /dev/sdc1 not /dev/sdb1
  Couldn't find device with uuid qdgwa6-ak5f-BU3a-ZC1F-noh2-oQSb-gJIC01.
PV /dev/sdc1        VG vol_grp1   lvm2 [465.76 GiB / 0    free]
PV unknown device   VG vol_grp1   lvm2 [200.00 GiB / 192.00 MiB free]
Total: 2 [665.75 GiB] / in use: 2 [665.75 GiB] / in no VG: 0 [0   ]

I have 3 disks /dev/sda /dev/sdb /dev/sdc
/dev/sdb1 and /dev/sdc1 have the VG

I tried to fix the UUID issue assign the right UUID to each drive but I failed.

As I can see when using pvscan that all the data are there and not formatted usage is 100% I want to retrieve my data but I'm not able.

Please advise, thank you!

4
  • Have you been using RAID1 on these two partitions sdb1 and sdc1? May 25, 2015 at 23:04
  • @roaima no only LVM unfortunately no RAID now the new drives use RAID0
    – Zaher
    May 25, 2015 at 23:15
  • If not raid1 or any kind of mirror i think is impossible to recover from lvm
    – elbarna
    May 26, 2015 at 3:22
  • But try this novell.com/coolsolutions/appnote/19386.html
    – elbarna
    May 26, 2015 at 3:23

1 Answer 1

0

Looks like VG metadata corrupted. Read carefully and follow the steps, If you are lucky you'll recover and only run on non-functional VG. Don't do this on a properly working lvm. You need to specify the correct physical volume to pvcreate or you may lose your data.

Extract the exact uuid for the PV that was overwritten from the file /etc/lvm/archive/VolumeGroupName_XXXXX.vg. (Where XXXXX represents the number of the last known good archived lvm metadata).

Use pvcreate to restore the metadata: pvcreate --uuid "" --restorefile /etc/lvm/archive/VolumeGroupName_XXXXX.vg

pvcreate only overwrites the lvm metadata areas on disk and doesn't touch the data areas (the logical volumes).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .