[linux-lvm] vg disappeared after replacing disc in raid10

Stuart D Gathman stuart at bmsi.com
Wed Mar 27 18:21:54 UTC 2013

On Mar 27, Björn Nadrowski transmitted in part:

> What do you think I should do?
> restore the beginning of the device using the file md0.txt?

At this point, since you know where the metadata is going (and has
already been wiped out), and you have a good metadata (that you can
look at with an editor and see your LVs), I would use vgcfgrestore 
to restore your good metadata backup.  (If not produced with
vgcfgbackup, compare with one that is).

Be careful not to modify any LVs until you have checked that they
are not scrambled.  Any mounts should be read-only, any fscks should
be with -n.

It the device is already listed in pvs, it is already a PV.  It must be,
because you claim that you see the new (empty) VG.

You will need to deactivate the new VG before using vgcfgrestore,
e.g. vgchange -an emptyvg.

If there is any way to backup stuff before attempted recovery, do so.

After vgcfgrestore, do vgscan and lvs.

More information about the linux-lvm mailing list