Bug 1023063 - Trying to create an LV on a cluster which is not allowed by volume_list filter causes non-understandable errors
Trying to create an LV on a cluster which is not allowed by volume_list filte...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Peter Rajnoha
Cluster QE
:
Depends On:
Blocks: 1140821
  Show dependency treegraph
 
Reported: 2013-10-24 10:25 EDT by Nenad Peric
Modified: 2014-12-04 16:55 EST (History)
10 users (show)

See Also:
Fixed In Version: lvm2-2.02.114-2.el7.x86_64
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-04 16:55:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
clvmd -d2 log (35.68 KB, text/plain)
2013-10-24 10:25 EDT, Nenad Peric
no flags Details
lvcreate debug message (14.12 KB, text/plain)
2013-10-24 10:29 EDT, Nenad Peric
no flags Details

  None (edit)
Description Nenad Peric 2013-10-24 10:25:33 EDT
Created attachment 815809 [details]
clvmd -d2 log

Description of problem:

If you try to create an LV on a cluster node (locking_type 3, clvmd running) and you have volume_list defined which would normally not allow this LV to be created,  LVM spits an error which makes very little sense.
Furthermore clvmd debugging messages are quite useless in this case, since there is nothing in them (used clvmd -d2) 

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

lvm2-2.02.103-2.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

Define volume_list with something you do not have on the system
try to create an LV on clustered VG

Actual results:

[root@host-050 ~]# lvcreate vg -n lv3 -l29
  /dev/vg/lv3: not found: device not cleared
  Aborting. Failed to wipe start of new LV.


Expected results:

A normal error, which makes sense :)

Like so (the error from single machine mode):

Not activating vg/lv3 since it does not pass activation filter.
Failed to activate new LV.

Additional info:

I am attaching -vvvv and clvmd log of failed creation
Comment 1 Nenad Peric 2013-10-24 10:29:29 EDT
Created attachment 815812 [details]
lvcreate debug message
Comment 3 Peter Rajnoha 2014-02-19 08:28:44 EST
The message has changed now to:

[root@rhel7-b ~]# lvcreate -l1 vg
  Volume "vg/lvol0" is not active locally.
  Aborting. Failed to wipe start of new LV.

It should be in clvmd log as well, but it's too late now. Let's consider this for 7.1.
Comment 4 vincent_chen 2014-03-30 12:13:10 EDT
Perter, i fail to create the cluster lvm with message you show above. what's the does message mean? i don't understand why i can't create cluster lvm.
Comment 5 Peter Rajnoha 2014-03-31 04:36:27 EDT
(In reply to vincent_chen from comment #4)
> Perter, i fail to create the cluster lvm with message you show above. what's
> the does message mean? i don't understand why i can't create cluster lvm.

The most common reason for this message is that you have activation/volume_list defined in your lvm.conf and that you're trying to create an LV which does not match this list.
Comment 6 vincent_chen 2014-03-31 04:43:18 EDT
thanks, Perter. I think i understand the reason.
Comment 7 Peter Rajnoha 2014-03-31 04:57:08 EDT
We should still improve the message here - I understand the message we give now is still not perfect. The best would be if clvmd could send back an error code or the error/warning message directly describing what exactly happened. But for this to work we'd need to enhance clvmd protocol which is not easy at the moment since it would require considerable updates to it (which probably won't be backward compatible). So it's a bit more complex change. For this reason, we're giving these generic error messages on LVM command side.
Comment 9 Jonathan Earl Brassow 2014-12-04 16:55:54 EST
[root@bp-01 ~]# lvm dumpconfig | grep volume_list
	volume_list=["vg/lv", "rhel_bp-01"]

[root@bp-01 ~]# lvcreate -L 200M -n lv vg
  Logical volume "lv" created.

[root@bp-01 ~]# lvcreate -L 200M -n lv2 vg
  Volume "vg/lv2" is not active locally.
  Aborting. Failed to wipe start of new LV.


This is an improvement on the previous message.  I am closing this bug "current release".  If there is still a desire for improvement, you can reopen this bug and we will evaluate it for a future release.

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