[linux-lvm] reading lun snapshots with identical lvm information on them on one machine

James A. Dinkel jdinkel at bucoks.com
Wed Nov 5 01:23:39 UTC 2008


I have 4 san luns attached to a RedHat EL 5.2 server. Each partitioned with a single lvm partition, making up a single volume group. I've created a snapshot of these luns on the san and reattached the 4 snapshot luns back to the same server.

As you may guess, this does not work well since the partitions have identical volume group information on them. To begin with the drives just show up as 4 drives with lvm partitions on them. I had hoped that I could create a new volume group out of those 4 physical volumes and access the data, but I get this when I try (sdb,c,d,e are the original luns, sdf,g,h,i are the snapshot luns):

-------------------------
[brazen at server2 ~]$ sudo /usr/sbin/vgcreate vg-test-snap /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1
Password:
Found duplicate PV cJoNn4uwBjse586l3ZMxKMRo938bK1xp: using /dev/sdf1 not /dev/sdb1
Found duplicate PV eWQLAqej1AgEk0WDLPE0trVqlIreRbyU: using /dev/sdg1 not /dev/sdc1
Found duplicate PV qYx9aIoUEUjB78OAhBuXWmsjv3VCXjUr: using /dev/sdh1 not /dev/sdd1
Found duplicate PV DrgbFGRJ6ziMJqoj2HlTFk9LtQhZx0Fp: using /dev/sdi1 not /dev/sde1
Found duplicate PV cJoNn4uwBjse586l3ZMxKMRo938bK1xp: using /dev/sdb1 not /dev/sdf1
Found duplicate PV eWQLAqej1AgEk0WDLPE0trVqlIreRbyU: using /dev/sdc1 not /dev/sdg1
Found duplicate PV qYx9aIoUEUjB78OAhBuXWmsjv3VCXjUr: using /dev/sdd1 not /dev/sdh1
Found duplicate PV DrgbFGRJ6ziMJqoj2HlTFk9LtQhZx0Fp: using /dev/sde1 not /dev/sdi1
Found duplicate PV cJoNn4uwBjse586l3ZMxKMRo938bK1xp: using /dev/sdf1 not /dev/sdb1
Found duplicate PV eWQLAqej1AgEk0WDLPE0trVqlIreRbyU: using /dev/sdg1 not /dev/sdc1
Found duplicate PV qYx9aIoUEUjB78OAhBuXWmsjv3VCXjUr: using /dev/sdh1 not /dev/sdd1
Found duplicate PV DrgbFGRJ6ziMJqoj2HlTFk9LtQhZx0Fp: using /dev/sdi1 not /dev/sde1
Physical volume '/dev/sdf1' is already in volume group 'vg-test-data1'
Unable to add physical volume '/dev/sdf1' to volume group 'vg-test-snap'.
-----------------------

If anybody has any ideas for getting around this, I would love to hear it. Resorting to using lvm snapshots is going to be problematic.  I know it sounds convoluted, but I really need this to work with SAN snapshots.

Thanks,
 
James Dinkel
Computer Services, Butler County of Kansas






More information about the linux-lvm mailing list