recovering a lvm volume group after one partition's deletion
Hi,
I've just found out that the reason I couldn't get my lvm volume group to work was because I had accidentally formatted one of the partitions that were used in that group, instead of the partition I actually wanted to format. (I really should have rebooted when fdisk told me to:( )
I've been trying to recover the information that was stored on the volume group. Since the partition was only 1.88Gb big in a volume group of 50Gb I thought maybe all was not lost.
What I've tried is running pvcreate on the formatted partition, but vgdisplay complains that that it can't find the partition with the uuid of the lost partition. I then tried hexedit'ing the partition and changing its uuid, but this didn't fool lvm either: i got the same error.
Is there any way to bring back, not all, of course, but some of the data in the volume group?
Thanks!!
�scar
Quoted 5 lines · �scar �lvarez Vilaplana
What I've tried is running pvcreate on the formatted partition, but vgdisplay complains that that it can't find the partition with the uuid of the lost partition. I then tried hexedit'ing the partition and changing its uuid, but this didn't fool lvm either: i got the same error.
man vgcfgrestore
Alasdair
Signature · 1 line
[email protected]
Thanks!
I did a pvcreate --restorefile thefile --uuid theuuid mygroup and then vgcfgrestore thefile.
Now the logical volumes appear in /dev/mygroup/, but when I try to mount them I get the error "mount: special device /mount/mygroup/myvol does not exist"
I googled for an answer but I couldn't find anything relevant.
Any ideas?
Thanks!
Quoted 19 lines · Alasdair G Kergon
Quoted 5 lines · �scar �lvarez Vilaplana
What I've tried is running pvcreate on the formatted partition, but vgdisplay complains that that it can't find the partition with the uuid of the lost partition. I then tried hexedit'ing the partition and changing its uuid, but this didn't fool lvm either: i got the same error.
man vgcfgrestore
Alasdair
--
[email protected]_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Quoted 3 lines · �scar �lvarez Vilaplana
Now the logical volumes appear in
/dev/mygroup/, but when I try to mount them I get the error "mount: special device /mount/mygroup/myvol does not exist"
vgmknodes
lvchange -ay
Alasdair
Signature · 1 line
[email protected]
Thanks a million!! It's working now.
Quoted 21 lines · Alasdair G Kergon
Quoted 3 lines · �scar �lvarez Vilaplana
Now the logical volumes appear in
/dev/mygroup/, but when I try to mount them I get the error "mount: special device /mount/mygroup/myvol does not exist"vgmknodes
lvchange -ay
Alasdair
--
[email protected]_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
I've just noticed that the files in /dev/mygroup/volumeN are actually symlinks to /dev/mapper/mygroup-volumeN, which doesn't exist.
Any ideas on how to proceed?
Thanks!
Quoted 38 lines · �scar �lvarez Vilaplana
Thanks!
I did a pvcreate --restorefile thefile --uuid theuuid mygroup and then vgcfgrestore thefile.
Now the logical volumes appear in
/dev/mygroup/, but when I try to mount them I get the error "mount: special device /mount/mygroup/myvol does not exist"I googled for an answer but I couldn't find anything relevant.
Any ideas?
Thanks!
Quoted 19 lines · Alasdair G Kergon
Quoted 5 lines · �scar �lvarez Vilaplana
What I've tried is running pvcreate on the formatted partition, but vgdisplay complains that that it can't find the partition with the uuid of the lost partition. I then tried hexedit'ing the partition and changing its uuid, but this didn't fool lvm either: i got the same error.
man vgcfgrestore
Alasdair
--
[email protected]_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/