1

I have two disk in a volume set using LVM, the filesystem on these stopped working. My plan was to duplicate the disks onto two need disks before I attempt to recover data as I suspect that one of the disks might be dodgy.

Unfortunately I did not properly check my drive allocations before I ran ddrescue and ended up copying the first 800mb of data from the first disk to the second disk in the volume set.

Before Ubuntu picked up the volume set even though I was unable to mount the partition. Now it no longer detects the drives as being in the same volume set. From what I’ve read this is because the LVM Header for each disk is stored in the beginning of each drive. I don’t know much about LVM can somebody point me in the right direction for trying to re-establish the volume set? Is there a way to tell the recreate the LVM headers on the second disk? Thank You

1 Answer 1

0

You can use vgcfgrestore. Since the change was made outside of LVM, you should restore the very latest volume configuration. From man vgcfgrestore:

sudo vgdisplay --partial --verbose
# Look for the uuid of a PV without a device path
sudo pvcreate --restorefile /etc/lvm/backup/<vgname> --uuid <uuid>
sudo vgcfgrestore --file /etc/lvm/backup/<vgname>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .