[linux-lvm] Recovering "broken" disk ( 17th )

Brian McCullough bdmc at buadh-brath.com
Mon Oct 18 19:45:08 UTC 2021


On Mon, Oct 18, 2021 at 09:49:44AM -0500, Roger Heflin wrote:
> You will need a lvm backup file for the pvcreate --uuid I believe (there
> may be some option to get around needing the backup file).
> 
> That will put the header back on if you either have an lvm backup and/or
> archive file, you might also need a vgcfgrestore afterwards depending on if
> anything else is missing.
> 
> I have never done it, but it looks possible to make a lvm backup file by
> reading it directly off the disk with dd, so that you will have a file that
> pvcreate is ok with, that is if there is no way to force it without a
> backup file.
> 
> But, this should get the pv back showing up with whatever sectors that you
> successfully recovered.

Thank you, Roger.

I might be able to do that on the original machine, which won't boot at
the moment because of this failure, but I have been using a working
machine so far to use ddrestore etc.

Yes, as you said, I was able to use dd to copy off the vgconfig data
into a file.  So you think that I might be able to use that as the
reference in pvcreate?  That makes some sense.

I started this out asking ( but not clearly ) whether the data on the
disk appeared to be in the correct place and whether what was there was
correct, but I think that I answered that for myself with the
comparison to the working PV partition.


Thanks again,
Brian




More information about the linux-lvm mailing list