duplicate PV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,
I have the following problem: I want to use a snapshot mechanism external to
LVM2 (i.e. snapshot from the storage server) so it happens that I access from a
linux box two identical LUNs with the same PVID. It is not a matter of
multipathing, they just are completely different devices with the same content
(and with the same PVID of course).

What I would like to do is to use and mount the second device on a different
mount point. So:

/dev/sdd1 is the primary PV
/dev/sdf1 is the snapshot of the primary PV

The result of pvscan before the discovery is:

drdb2:~ # pvscan
  PV /dev/sde1   VG drrg2_vg      lvm2 [200.00 GB / 0    free]
  PV /dev/sdd1   VG test_vg       lvm2 [200.00 GB / 0    free]
  PV /dev/sdb1   VG oracledb_vg   lvm2 [220.00 GB / 0    free]
  PV /dev/sdc1   VG oracledb_vg   lvm2 [20.00 GB / 0    free]
  PV /dev/sda3   VG root_vg       lvm2 [59.75 GB / 47.26 GB free]
  Total: 5 [699.73 GB] / in use: 5 [699.73 GB] / in no VG: 0 [0   ]

after the discovery of the new device is:

drdb2:~ # pvscan
  Found duplicate PV PnvnzL7YFft76Ky0EaPbOh519SQD5Uxc: using /dev/sdf1 not
/dev/sdd1
  PV /dev/sde1   VG drrg2_vg      lvm2 [200.00 GB / 0    free]
  PV /dev/sdd1   VG test_vg       lvm2 [200.00 GB / 0    free]
  PV /dev/sdb1   VG oracledb_vg   lvm2 [220.00 GB / 0    free]
  PV /dev/sdc1   VG oracledb_vg   lvm2 [20.00 GB / 0    free]
  PV /dev/sda3   VG root_vg       lvm2 [59.75 GB / 47.26 GB free]
  Total: 5 [699.73 GB] / in use: 5 [699.73 GB] / in no VG: 0 [0   ]

I guess this problem is the same I'd have if I copy any single byte from a device to another the last one resulting in having the same LVM label.

What I tried is to:

1) vgreduce:

drdb2:~ # vgreduce test_vg /dev/sdf1
  Found duplicate PV PnvnzL7YFft76Ky0EaPbOh519SQD5Uxc: using /dev/sdf1 not
/dev/sdd1
  Physical Volume "/dev/sdf1" not found in Volume Group "test_vg"

sdf1 does not belong to test_vg

2) pvchange --uuid:

drdb2:~ # pvchange --uuid /dev/sdf1
  Found duplicate PV PnvnzL7YFft76Ky0EaPbOh519SQD5Uxc: using /dev/sdd1 not
/dev/sdf1
  Volume group containing /dev/sdf1 has active logical volumes
  0 physical volumes changed / 1 physical volume not changed

My idea was to modify the PVID so to let LVM understand they are completely different devices.
How can I manage this?

Thanks for any help you may give me.
Tommaso

--
================================================================
|     Tommaso Cecchi                          CINECA
| System Management Group              Via Magnanelli 6/3 40033
| e-mail: t.cecchi@cineca.it             Casalecchio di Reno
| Tel: 051/6171411                         Bologna - ITALY
| Fax 051/6132198                       http://www.cineca.it
================================================================

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux