Skip to contentSkip to conversation

lost volume group

linux-lvm Petes Junk 2 participants 2 messages Apr 10, 2006 – Apr 11, 2006

lore
Share & tools
lore

Petes Junk

author
#0 lore raw

When i was extending a group to include another PV somehow the Group disappeared from the devices list after a reboot.

The last entry in /dev/lvm/backup shows me executing /usr/sbin/vgextend swampvg /dev/hdb2
to an already working /dev/swampvg/swamplv with a non striped /dev/hdb4 in it.

I then did a mkfs -t ext3 /dev/hdb2 (the new disk) which was probably how i got into trouble. I really need the image from /dev/hdb4 and im afraid to do anything with it without knowing exactly what im doing. Im thinking all i need is to recreate the VG and LV with only /dev/hdb4. I have several archives in the /dev/lvm/archive but docs are not clear how to approach this. I backed up the partition to another with dd so i could try work on it safely, but the LVM tools didnt like the fact that it had two uuid labels the same and always picked /dev/hdb4 to work on.

Since then Ive been reading what little there is on LVM. Cant even find a sysadmin book with more than 3 pages on the subject. Im very surprised at the man page for vgcfgrestore where its options are not even explained.

Any help is greatly appreciated.

Pete

#1 lore raw

I'll assume you had one disk (hdb4) to start with, and you wanted to extend the VG by adding (hdb2).

When you did the mkfs, you destroyed the LVM label on the newly added disk. You are probably now getting something like:
Couldn't find device with uuid...
Couldn't find all physical volumes...

You need to do the vgcfgrestore, as you said, but doing:
prompt> vgcfgrestore swampvg
will give you:
Couldn't find device with uuid '<your uuid>'
...

You can easily recreate that uuid on that device and restore by doing:
prompt> pvcreate -u <your uuid> /dev/hdb4
prompt> vgcfgrestore swampvg

You should be good to go now.

brassow

Quoted 32 lines · Petes Junk

When i was extending a group to include another PV somehow the Group disappeared from the devices list after a reboot.

The last entry in /dev/lvm/backup shows me executing /usr/sbin/vgextend swampvg /dev/hdb2
to an already working /dev/swampvg/swamplv with a non striped /dev/hdb4 in it.

I then did a mkfs -t ext3 /dev/hdb2 (the new disk) which was probably how i got into trouble. I really need the image from /dev/hdb4 and im afraid to do anything with it without knowing exactly what im doing. Im thinking all i need is to recreate the VG and LV with only /dev/hdb4. I have several archives in the /dev/lvm/archive but docs are not clear how to approach this. I backed up the partition to another with dd so i could try work on it safely, but the LVM tools didnt like the fact that it had two uuid labels the same and always picked /dev/hdb4 to work on.

Since then Ive been reading what little there is on LVM. Cant even find a sysadmin book with more than 3 pages on the subject. Im very surprised at the man page for vgcfgrestore where its options are not even explained.

Any help is greatly appreciated.

Pete

_______________________________________________
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/