RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1543429 - locking error upon mirror creation
Summary: locking error upon mirror creation
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-08 13:05 UTC by Roman Bednář
Modified: 2021-09-03 12:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-08 13:53:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
lvcreate_vvvv (201.65 KB, text/plain)
2018-02-08 13:35 UTC, Roman Bednář
no flags Details

Description Roman Bednář 2018-02-08 13:05:16 UTC
Not 100% reproducible. 

dmeventd was running while lvcreate was attempted

So far I was not able to reproduce manually because of bug's random behaviour so I can not attach the verbose logs.

lvm2-2.02.177-1.el7.x86_64

[2018-02-08 11:20:44.683431] SCENARIO - [triple_dmeventd_monitoring]
[2018-02-08 11:20:44.683751] Turn dmeventd monitoring on for mirror, snapshot and thin
[2018-02-08 11:20:44.684043] Have dmeventd monitoring turned on for a:
[2018-02-08 11:20:44.684305] 	mirror (libdevmapper-event-lvm2mirror.so)
[2018-02-08 11:20:44.684566] 	snapshot (libdevmapper-event-lvm2snapshot.so)
[2018-02-08 11:20:44.684782] 	thin (libdevmapper-event-lvm2thin.so)
[2018-02-08 11:20:44.685001] Make a couple mirrored with snapshot volumes
[2018-02-08 11:20:44.685273] lvcreate --activate ey --type mirror -m 1 -n dual_mirror_1 --alloc anywhere -L 100M snapper_thinp
[2018-02-08 11:20:44.926140]   Error locking on node UNKNOWN 1: Refusing activation of partial LV snapper_thinp/dual_mirror_1_mlog.  Use '--activationmode partial' to override.
[2018-02-08 11:20:44.926371]   Aborting. Failed to activate mirror log.
[2018-02-08 11:20:44.991836]   Failed to initialise mirror log.

Comment 2 Roman Bednář 2018-02-08 13:11:13 UTC
This is what dm table contained after lvcreate failure. Unfortunately I can not get the tables from all nodes since I'm not able to reproduce this after reboot.

# dmsetup table
rhel_virt--369-swap: 0 1679360 linear 252:2 2048
rhel_virt--369-root: 0 12992512 linear 252:2 1681408
snapper_thinp-dual_mirror_1_mlog: 0 8192 linear 8:145 16384

Comment 3 Roman Bednář 2018-02-08 13:35:40 UTC
Created attachment 1393185 [details]
lvcreate_vvvv

I just recalled saving the log from previous attempts so here it is.

Comment 4 Zdenek Kabelac 2018-02-08 13:53:03 UTC
From log trace it looks like failure was cause by:

device-mapper: create ioctl on snapper_thinp-dual_mirror_1_mlog

So here lvm2 could not create a DM device with this name - likely becuase it already exists in your system.

The possibly explanation is the device has been 'forgotten' leaked from some other previous test.


So the failure is rather in the situation where this device was not removed during some 'vgremove -f' command for whatever reason.


So far I'm not seeing the bug on lvcreate side.

It works as designed - lvcreate simply stops when it find 'name collision' and it's upto admin to resolve this case.

Simplest way to trigger is the 'dmsetup' some  DM device with name in form of  'vgname-lvname'  and then run 'lvcreate' with matching name.


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