LVM2 volume group lost

Posted by MrG on Server Fault See other posts from Server Fault or by MrG
Published on 2012-10-07T18:13:21Z Indexed on 2012/10/07 21:40 UTC
Read the original article Hit count: 277

Filed under:

I updated one of my servers, but - although I took care not to modify - the volume groups on /dev/sdb1 were lost, although the physical volumes seem to be still there:

[root@server ~]# pvscan
PV /dev/sda2   VG VolGroup        lvm2 [465,16 GiB / 0    free]
PV /dev/sdb1                      lvm2 [1,82 TiB]
Total: 2 [2,27 TiB] / in use: 1 [465,16 GiB] / in no VG: 1 [1,82 TiB]

[root@server ~]# pvs -v
Scanning for physical volume names
PV         VG       Fmt  Attr PSize   PFree DevSize PV UUID                               
/dev/sda2  VolGroup lvm2 a--  465,16g    0  465,16g HftbaD-MBs0-3p7D-6O13-CrzU-T9Gb-6W0ofB
/dev/sdb1           lvm2 a--    1,82t 1,82t   1,82t dD4XZP-WStA-61xV-5Sff-ifmW-R4rR-JenHoU

[root@server ~]# pvck -d -v /dev/sdb1
Scanning /dev/sdb1
Found label on /dev/sdb1, sector 1, type=LVM2 001
Found text metadata area: offset=4096, size=1044480
Found LVM2 metadata record at offset=10752, size=1037824, offset2=0 size2=0
Found LVM2 metadata record at offset=9216, size=1536, offset2=0 size2=0
Found LVM2 metadata record at offset=7168, size=2048, offset2=0 size2=0
Found LVM2 metadata record at offset=5632, size=1536, offset2=0 size2=0

I attempted to fix it as described here and was able to extract the 4 meta data sets listed above (using i.e. dd bs=1 skip=5632 count=1536 if=/dev/sdb1 of=output.file), none of them includes the lv_data which I'm missing.

Please advise how I could access the files which should be on /dev/sdb1 there. Any help is appreciated!

© Server Fault or respective owner

Related posts about lvm