Skip to contentSkip to conversation

how to "ignore" a volume group created elsehwere on a shared device

linux-lvm Brian J. Murrell 1 participant 1 message Aug 11, 2005

lore
Share & tools
lore
#0 lore raw

I have two machines connected to a shared storage device that I am trying to use LVM2 with.

On one machine, /dev/sda1 is the same device (i.e. LUN on the shared storage device) as /dev/sda2 on the other machine and vice versa. To be pedantically clear, machine one writes into /dev/sda1 and machine two can see what was written by machine one in it's /dev/sda2.

The problem is that on machine one, if I add /dev/sda1 as a PV and then create a VG on it, "automagically" machine two sees this same VG and a PV in /dev/sda2.

Now while this has some very interesting "failover" benefits going for it, it's lousing me up right now.

I want to be able to add /dev/sda1 as a PV on machine two and create VG there of the same name as I used on machine one. Of course LVM2 gets upset that the VG exists already.

I have tried adding the device name I don't want to see the PV (and the VG on it) on to the /etc/lvm/lvm.conf filter and while that prevents a vgscan from scanning it, it still does not prevent pvdisplay from listing it and the volume group on it from being visible.

Is there any way to do what I want?

b.