[CentOS] GNBD/LVM problem

Thu Jul 1 13:16:15 UTC 2010
Kwan Lowe <kwan.lowe at gmail.com>

Hello all:

I'm having a strange problem with GNBD and LVM on two fully updated
CentOS 5.5 x86_64 systems.

On node1, I have exported a gnbd volume.

   lvcreate -L 500M -n mirrortest_lv01 mirrorvg
   gnbd_serv
   gnbd_export  -d /dev/mirrorvg/mirrortest_lv01 -e node1_lv01

On node2 I have imported the volume:

   gnbd_import -i node1

Next, on node2 I attempt to create a mirrored LV with the imported
GNBD volume and a local disk:

   fdisk /dev/gnbd/node1_lv01  then create an LVM partition
   fdisk /dev/sdb then create an LVM partition

I can then create a volume group with those two disks:
   pvs
   vgcreate mirrorvg /dev/sdb1 /dev/gnbd0

The problem occurs when I try to create a mirrored LV using the above VG.

  [root at vm-helios-002 ~]# lvcreate --mirrorlog core  -L 256M -n
mirroredlv01 -m 1 mirrortestvg
  Insufficient suitable allocatable extents for logical volume : 64
more required
  Unable to allocate extents for mirror(s).

It doesn't matter what disk sizes are available. Even creating a
non-mirrored LV causes issues:

[root at vm-helios-002 ~]# lvcreate   -L 256M -n mirroredlv01  mirrortestvg
  Error locking on node 192.168.8.152: device-mapper: create ioctl
failed: Device or resource busy
  Error locking on node 192.168.8.151: Volume group for uuid not
found: xCTR5M2kOEBiLM7eSRntez2y2VKy9vvqnSs6LTC99x9kIsAdNI2l8CH90h6BYKsH
  Aborting. Failed to activate new LV to wipe the start of it.
[root at vm-helios-002 ~]#


The other issue that's occurring is that even if I remove the GNBD PV
from the mirrortestvg, it still gives the error (i.e., using just
local disk).

Not sure where to look at this point. I suspect it has something to do
with the cluster locking, but the configuration is really basic and
specifies no clustered volumes.