[linux-lvm] How to start duplicate VG with new name and UUID?

Richard Michael rmichael-lvm at edgeofthenet.org
Wed Sep 17 19:42:43 UTC 2008

Hello list,

I'm using FC7 and LVM2 lvm2-2.02.24-1.fc7.

I have a RAID1 mdadm software array containing a VG.  Half the array has
been removed from the system and now returned and I want data from the
old half, before it is resync'd back into the array.

I can start the old half as a new degraded mdadm array easily enough:
mdadm --assemble /dev/md3 --run --update=uuid /dev/sdc2

Of course, lvm complains about a duplicate volume group.  So I want to
rename and re-UUID the PV and VG.  I've tried

pvchange --uuid /dev/md3

But lvm refuses because the volume group name is "vg0" in the /dev/md3
metadata and vg0 is an active volume group on /dev/md1, the other half
of the RAID1.  (It seems lvm's check is slightly naive and it is just
looking at the name?)

How can change the metadata on /dev/md3 such that it can be activated
without interfering with the currently active VG of the same name and
uuid on /dev/md2?

I'm sure I've misunderstood something somewhere!

Aside, it's a bit alarming when the vg/pv related tools report "Found
duplicate PV <uuid>: using /dev/md3 not /dev/md1".  "Using" for what?
Will the system change to using the newly connected duplicate PV?  I
definitely don't want it to do that!


More information about the linux-lvm mailing list