[linux-lvm] Partition table gone? Any way to restore?

oliver oliver at are-b.org
Thu Mar 3 22:28:47 UTC 2005

Small update. Using a hex editor i was able to more closley examine my 
disk(s). Since I have 2 LVM setups I was somewhat able to compare what I 
have to what I should have. I do still need some insite however.

 From what I can tell, pvcreate only modifies the first few k's of the 
disk, followed by information stored from the vgcreate.
Then the lvcreate adds some more information after this. (vg00/lv basicly).

I hope i got it right so far : )

Now, the vgcreate information is identical on the two surviving parts 
except for a 'hostname<someserialnumber>' part around address 0x00012c.

Then at 0x0001000 we see the UUID of the VG passing by followed by some 
data (which is identical on all three vgs.

I don't think i have to look beyond this point in space/address.

Assuming that none of the tools (besides pvcreate) write anything before 
0x0001000, I should be able to pvcreate /dev/hde edit the UUID of that 
specific PV (to the same stored in the other two PV's so the three match 
up again) and have a fully workable LVM set again.

The only thing that might worry me is crc information stored somewhere 
after 0x0001000 (However it appears to me that there isn't a whole bunch 
of data stored before 0x0001000 and the data created by pvcreate is 
identical on all 3 drives with the exception of the UUID so the crc 
value should match again) and the string 'vg00'at 0x0000ac i see on all 
disks (the name of the vg.

What my question is (without spending days reading the sourcecode : ) is 
am I correct? Assuming that all the 'important' metadata and such is 
stored 'after' 0x0001000 hex, is there a good chance of it working?

I'm thinking of running a pvcreate, change the UUID of the PV to what I 
expect it to be, add 'vg00' at 0x000ac and be happy?

I could simply try, I know, but some feedback first would be appreciated 
; ) I really don't want to loose my data.

Thanks a lot.


More information about the linux-lvm mailing list