Bug 689283 - lvcreate fails with locking error when only one side of clustered storage is writable
Summary: lvcreate fails with locking error when only one side of clustered storage is ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2-cluster
Version: 5.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-20 20:35 UTC by Madison Kelly
Modified: 2011-03-22 18:04 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-21 08:53:11 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Madison Kelly 2011-03-20 20:35:21 UTC
Description of problem:

Not sure if this is a bug or by design.

When creating an LV on a DRBD Primary/Secondary resource as the PV/VG, the lvcreate fails with a locking error. Setting the DRBD to Primary/Primary allows it to succeed. 

[root@an-node01 lvm]# vgdisplay -v drbd_an1_vg0
    Using volume group(s) on command line
    Finding volume group "drbd_an1_vg0"
  --- Volume group ---
  VG Name               drbd_an1_vg0
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  23
  VG Access             read/write
  VG Status             resizable
  Clustered             yes
  Shared                no
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               93.14 GB
  PE Size               4.00 MB
  Total PE              23843
  Alloc PE / Size       0 / 0   
  Free  PE / Size       23843 / 93.14 GB
  VG UUID               WLKQLh-vOT4-PLiZ-Xih1-hQzu-YKGK-gbNarP
   
  --- Physical volumes ---
  PV Name               /dev/drbd1     
  PV UUID               L3miDF-frFW-AJL6-Kc56-bmHo-WIPu-7w1BdO
  PV Status             allocatable
  Total PE / Free PE    23843 / 23843
   
[root@an-node01 lvm]# lvcreate -l 50%FREE -n c5_lz7_01 drbd_an1_vg0
  Error locking on node an-node02.alteeve.com: Volume group for uuid not found: WLKQLhvOT4PLiZXih1hQzuYKGKgbNarPcRz2Hkec8lKTaa2pSxXdgvBXuaBqkN71
  Aborting. Failed to activate new LV to wipe the start of it.
[root@an-node01 lvm]# drbdadm primary r2
[root@an-node01 lvm]# lvcreate -l 50%FREE -n c5_lz7_01 drbd_an1_vg0
  Logical volume "c5_lz7_01" created

Version-Release number of selected component (if applicable):

lvm2-cluster-2.02.56-7.el5_5.4
cman-2.0.115-34.el5_5.4
drbd83-8.3.8-1.el5.centos

How reproducible:

100%

Steps to Reproduce (see above for details of the final steps):
1. Create a DRBD resource in Primary/Secondary mode.
2. Enable cluster locking (lvmconf --enable-cluster).
3. Add the DRBD as a PV and then create a clustered VG (vgcreate -c y ...)
4. Try to create an LV. When it fails, set the DRBD to Primary/Primary and try again, it will succeed.
  
Actual results:

Fails to create an LV on a clustered VG when DRBD is Primary/Secondary. 

Expected results:

Should create the LV, as the 'Secondary' node won't be written to and the changes will be synced across nodes.

Additional info:

Comment 1 Milan Broz 2011-03-20 21:15:59 UTC
clvmd requires that storage view (it manages) is constistent (and the same) across all nodes of cluster.

For primary/secondary use is probably better HA-LVM, IOW HA-LVM service activation follows primary node (so LVs are activated only on that node).

(That "wipe" error message is misleading, wiping of LVs runs on node where command is executed, but other nodes must allow RW activation of LV in the same time.)

Comment 2 Madison Kelly 2011-03-20 21:23:14 UTC
In my case, I was issuing 'lvcreate ...' on the Primary node, if this is what you mean. Either way, a more descriptive error would help in solving the problem. :) Is HA LVM different from CLVM, or am I misunderstanding the term?

Thanks.

Comment 3 Madison Kelly 2011-03-20 21:25:13 UTC
Oops, I just noticed in the terminal copy/paste that the commands were not in a logical order. I did a 'drbdadm primary r1' on the second node (not shown), then did the 'drbdadm primary r2' on the first node (shown), then did the successful 'lvcreate'.

Comment 4 Milan Broz 2011-03-20 22:13:05 UTC
HA-LVM doesn't use clvmd. See cluster documentation or http://sourceware.org/cluster/wiki/LVMFailover

Anyway, DRBD is not part of RHEL5, but maybe someone else on cc from Linbit can provide more info.

(But note your configuraton is not supported on RHEL5.)

Comment 5 Florian Haas 2011-03-21 06:39:33 UTC
(In reply to comment #0)
> Description of problem:
> 
> Not sure if this is a bug or by design.

It's by design. What you are trying to do requires that either single-instance shared storage is available, or that replicated storage is writable from all nodes. DRBD in single-Primary mode is neither, so the error you are getting is entirely expected.

Comment 6 Madison Kelly 2011-03-22 18:04:02 UTC
Milan,

  Noted on being outside of RH support, thanks.

Florian,

  Thanks for clarity/confirmation.


Note You need to log in before you can comment on or make changes to this bug.