[linux-lvm] Recovering "broken" disk ( 17th )
rogerheflin at gmail.com
Tue Oct 19 10:06:37 UTC 2021
I would edit the vgconfig you dd'ed with an editor and make sure it looks
reasonable for what you think you had.
When you do the pvcreate --uuid it won't use anything except the uuid info
so the rest may not need to be exactly right, if you have to do a
vgcfgrestore to get it to read the rest of the info will be used.
I have seen some weird disk controller failures that appeared to zero out
the first bit of the disk (enough to get the partition table, grub, and the
pv header depending on where the first partition starts).
You will need to reinstall grub if this was the bootable disk, since there
were 384 bytes of grub in the sector with the partition table that you know
On Tue, Oct 19, 2021 at 1:04 AM Brian McCullough <bdmc at buadh-brath.com>
> 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
> > 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
> > 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
> > 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,
> linux-lvm mailing list
> linux-lvm at redhat.com
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linux-lvm