Recovering a Linux LVM due to lost information on a single member drive

ikoniIf an LVM partition table or data containing the LVM information on the physical volume is ever lost, there is a way back out

First, boot the system without the volume active. Get in to single user.
Second, identify the device in question. In this example, let’s say /dev/sdb1 has lost its LVM information.
Third, find the latest archive of the volume information in /etc/lvm/archive which contains the UUID that the system cannot find, but you are sure it is the disk that has had its volume information overwritten or lost (in this example, let’s say the file is MyLVMgroupA.vg)
Fourth, run pvcreate to restore the information:
pvcreate –uuid –restorefile /etc/lvm/archive/MyLVMgroupA.vg -ff /dev/sdb1
Fifth, reboot and all is good. Run an fsck just to be on the safe side!

Leave a Reply