The broken LVM boot mirror

I was experimenting with LVM mirroring of the root partition and I've discovered that it won't fail gracefully.
After successfully setting up a mirror of LogVol00 to a second hd, I've rebooted the machine without the second hard disk.
I was expecting a normal boot from the first hd, which was the one with the grub and the boot partition.
I've got a kernel panic instead.
To recover the system I had to boot in rescue mode

boot: linux rescue

The rescue mode won't find any linux partition even if asked to search for them.
So back to the shell:

lvm pvscan

The system complained about an unknown device within VolGroup00

lvm vgscan
lvm lvscan

All logical volumes were marked as inactive

So, force the volume group activation

lvm vgchange -ay --partial VolGroup00

Now we can remove the missing mirror copy from the volume group

lvm vgreduce --removemissing --force VolGroup00

and the mirror logical volume will be converted back to linear.

No comments:

Post a Comment