reading harddrives with identical lvm information on them on one machine

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
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@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.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You'll probably have to present the snapshots to another server in order for them to work.
 

crontab

Member
Dec 20, 2000
160
0
0
I don't know of a way to mount a lun and a snapshot of that lun on the same host as the same time. what are you trying to accomplish?
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: DaiShan
Actually this is possible and I do this regularly for snapshot provisioning. You need to change the UUID of the PV. Here is a link to the procedure: http://archives.free.net.ph/me...51843.1d3b9863.en.html

yes I got similar information from the lvm mailing list. The only caveat is, I would like to use the --config option to put the filter rule on the command line, however I can not find any information on how to use the --config option (syntax and such).