Mon Jul 6 11:13:50 CEST 2009

LVM2 mirror recovery

Shut down and unplug one of the mirrored drives (i removed the one
which also contained the mirrorlog).  When restarted there will be a
bunch of warnings ("Couldn't find device...").  Convert the logical
volume(s) back to linear using:

vgreduce --removemissing vg1

This leaves you with an inactive volume.  To enable all logical
volumes do:

vgchange -a y

At this point the volume shows up in /dev/mapper and can be mounted.

Rebooting and re-enabling the drive gives some warnings about
inconsistency.  I then tried this:

pvcreate /dev/hdb[12]
vgextend vg1 /dev/hdb[12]
lvconvert -i 1 -m 1 --mirrorlog disk /dev/vg1/root /dev/hda2 /dev/hdb2 /dev/hdb1

Then it tells me "Conversion starts after activation", so I activate

vgchange -a y