Skip to contentSkip to conversation

LVM help needed: conflicting names

linux-lvm Neil 3 participants 6 messages Jun 5, 2005 – Jun 6, 2005

lore
Share & tools
lore

Neil

author
#0 lore raw

[Sorry about the dup; sent this to redhat-list earlier but just
discovered this list which the more appropriate place.]

Hi-

I lost a machine (bad PS or MB -- disk is fine) and am trying to bring up the disk in a second machine in order to access certain filesystems from it. The second machine's disk has a single volume group 'vg0' containing several logical volumes, 'root', 'usr', 'home', etc (/boot is its own primary partition). Unfortunately the disk from the dead machine is configured almost identically, with a single 'vg0' volume group and some logical partitions of the same name.

Booting with both disks in the machine fails; it gets totally confused about which /dev/vg0/root (for example) it is supposed to be using. I think I can configure lvm.conf so that the second disk is ignored by pvscan/vgscan during bootup, but I'm still stuck on how to actually mount any of the second disk's LVM filesystems because of the name clashes. Somehow I'd like to rename the volume group on the second disk to 'vg1', for example.

Anybody have any ideas?

Thanks!
Neil <[email protected]>

#1 lore raw

have you tried:

$ man vgrename

NAME
vgrename - rename a volume group

DESCRIPTION
vgrename renames an existing (see vgcreate(8) ) volume group

Examples
"vgrename /dev/vg02 /dev/my_volume_group" renames existing volume
group "vg02" to "my_volume_group".

"vgrename vg02 my_volume_group" does the same.

-dan

On 5, Jun, 2005, Neil declared:

Quoted 33 lines

[Sorry about the dup; sent this to redhat-list earlier but just
discovered this list which the more appropriate place.]

Hi-

I lost a machine (bad PS or MB -- disk is fine) and am trying to bring up the disk in a second machine in order to access certain filesystems from it. The second machine's disk has a single volume group 'vg0' containing several logical volumes, 'root', 'usr', 'home', etc (/boot is its own primary partition). Unfortunately the disk from the dead machine is configured almost identically, with a single 'vg0' volume group and some logical partitions of the same name.

Booting with both disks in the machine fails; it gets totally confused about which /dev/vg0/root (for example) it is supposed to be using. I think I can configure lvm.conf so that the second disk is ignored by pvscan/vgscan during bootup, but I'm still stuck on how to actually mount any of the second disk's LVM filesystems because of the name clashes. Somehow I'd like to rename the volume group on the second disk to 'vg1', for example.

Anybody have any ideas?

Thanks!
Neil <[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/

author
#2 lore raw
Quoted 1 line · Dan B. Phung
$ man vgrename

Crap (blushing); didn't know that command existed. The man pages for the other commands (e.g. vgchange) I was investigating didn't mention that one. Sorry!

#3 lore raw
Quoted 1 line
Quoted 1 line
$ man vgrename

With two VGs with the same name, you may have to use a temporary lvm.conf filter to "hide" one of them before renaming the other.

Alasdair

Signature · 1 line
[email protected]
author
#4 lore raw
Quoted 5 lines · Alasdair G Kergon
Quoted 1 line
Quoted 1 line
$ man vgrename

With two VGs with the same name, you may have to use a temporary lvm.conf filter to "hide" one of them before renaming the other.

My problem turns out to be more insidious than I thought, and I can't get even this far. Both disks have the root filesystem (not /boot) under LVM as /dev/vg0/root (fedora core 3 systems), and it is initrd that is bailing when it finds multiple /dev/vg0/root logical volumes. The lvm.conf file isn't even available at that stage. Anybody know if there is a boot option to initrd that filters which devices are examined for VG's?

-Neil

#5 lore raw

sorry, but I can't remember your setup at the moment. do you have two disks booting on one machine? what happens if you just boot one of the disks to vgrename the logical volume, then shutdown and then hook the other machine in.

On 5, Jun, 2005, Neil declared:

Quoted 24 lines · Alasdair G Kergon
Quoted 5 lines
Quoted 1 line
Quoted 1 line
$ man vgrename

With two VGs with the same name, you may have to use a temporary lvm.conf filter to "hide" one of them before renaming the other.

My problem turns out to be more insidious than I thought, and I can't get even this far. Both disks have the root filesystem (not /boot) under LVM as /dev/vg0/root (fedora core 3 systems), and it is initrd that is bailing when it finds multiple /dev/vg0/root logical volumes. The lvm.conf file isn't even available at that stage. Anybody know if there is a boot option to initrd that filters which devices are examined for VG's?

-Neil

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