| Summary: | lvcreate fails with locking error when only one side of clustered storage is writable | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Madison Kelly <mkelly> |
| Component: | lvm2-cluster | Assignee: | LVM and device-mapper development team <lvm-team> |
| Status: | CLOSED NOTABUG | QA Contact: | Cluster QE <mspqa-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 5.5 | CC: | agk, ccaulfie, dwysocha, florian, heinzm, jbrassow, mbroz, prajnoha, prockai, thornber, zkabelac |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-03-21 08:53:11 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
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.) 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. 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'. 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.) (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. Milan, Noted on being outside of RH support, thanks. Florian, Thanks for clarity/confirmation. |
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: