Bug 703632 - left over dm devs when deactivating exclusively activated clustered LVs from other nodes
Summary: left over dm devs when deactivating exclusively activated clustered LVs from ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Corey Marthaler
URL:
Whiteboard:
: 637298 (view as bug list)
Depends On:
Blocks: 807971
TreeView+ depends on / blocked
 
Reported: 2011-05-10 21:02 UTC by Corey Marthaler
Modified: 2012-08-08 22:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-08 22:31:56 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Corey Marthaler 2011-05-10 21:02:04 UTC
Description of problem:
The following mirrored volume was exclusively active on taft-02 only.

# Test clean up output:
 
Stopping the io load (collie/xdoio) on mirror(s)
Unmounting gfs and removing mnt point on taft-02...

Deactivating and removing mirror(s)
Checking for left over mirror dm devices on
         ...taft-02

all mirror images for syncd_secondary_4legs_1 weren't removed from d-m on taft-02

[root@taft-02 ~]# lvs
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 58.38G
  LogVol01 VolGroup00 -wi-ao  9.75G

[root@taft-02 ~]# dmsetup ls
helter_skelter-syncd_secondary_4legs_1_mimage_4 (253, 8)
helter_skelter-syncd_secondary_4legs_1_mimage_3 (253, 6)
helter_skelter-syncd_secondary_4legs_1_mimage_2 (253, 5)
helter_skelter-syncd_secondary_4legs_1_mimage_0 (253, 3)
helter_skelter-syncd_secondary_4legs_1_mlog     (253, 2)
VolGroup00-LogVol01     (253, 1)
VolGroup00-LogVol00     (253, 0)


Version-Release number of selected component (if applicable):
2.6.18-256.el5

lvm2-2.02.84-3.el5    BUILT: Wed Apr 27 03:42:24 CDT 2011
lvm2-cluster-2.02.84-3.el5    BUILT: Wed Apr 27 03:42:43 CDT 2011
device-mapper-1.02.63-2.el5    BUILT: Fri Mar  4 10:23:17 CST 2011
device-mapper-event-1.02.63-2.el5    BUILT: Fri Mar  4 10:23:17 CST 2011
cmirror-1.1.39-10.el5    BUILT: Wed Sep  8 16:32:05 CDT 2010
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009

Comment 1 Zdenek Kabelac 2011-05-13 12:27:49 UTC
Could you please attach traces how have you get into this situation?
How did you setup your exclusively activated device?

Comment 2 Corey Marthaler 2011-05-13 19:27:28 UTC
The key here is to exclusively activate the volume on one node (NODE A) and then deactivate and remove on another node (NODE B). In rhel6.1, the deactivation and removal on NODE B, will cause the dm devices to be removed on NODE A. However in rhel5.7, that's not the case. The devices are left over on NODE A. 

I'd argue that you should not even be allowed to deactivate and remove a device that's exclusively activated on another node.

Comment 3 Alasdair Kergon 2011-05-13 21:57:16 UTC
The cluster can be managed from a single node: deactivate/remove from any node is an important part of that.

Two things we might do:

1. Give a "LV is active on other node(s) - are you sure?" prompt?

2. Provide configurable options that allow manipulation to be restricted to certain nodes.

I don't find the first very practical when you think through the various combinations and conflicting ways it ought to behave in different configurations.

I think the second has been discussed before and is the better solution.



As to this particular bug, if I read your comment correctly, you're indicating this is fixed in RHEL6.1 but not in 5.7 so hopefully it is something we can backport.

Comment 4 Corey Marthaler 2011-05-16 22:14:20 UTC
Correct, in RHEL6.1 there are no left over dm devices when the mirror is removed from a node other than the one which has it activated exclusively.

Comment 5 Milan Broz 2011-05-26 13:06:07 UTC
It is cmirror or just only local mirror?
Note that cmirror package is separate in RHEL5 (and I think it was not updated.)

Comment 6 Milan Broz 2011-05-26 17:06:41 UTC
Corey, what exaclty need to bve done to reproduce it? (in the terms of lvcreate/lvchange/lvremove commands)

I created clustered mirror on node A, and deactivated + removed from node B - and it removed all active dm devices from node A. So it seems to work for me...

Comment 7 Corey Marthaler 2011-05-26 23:03:53 UTC
I can no longer reproduce this with just the commands listed in comment #2. I can however still reproduce this by running the test helter_skelter. So, it looks like this still involves exclusively activated mirrors, and may also involve device failure, I/O, or both. I'll attempt to better boil this down...

Comment 8 Milan Broz 2011-06-06 11:32:47 UTC
ok, I am setting needinfo for now, we need reproducer...

Comment 9 Milan Broz 2011-06-06 11:44:04 UTC
*** Bug 637298 has been marked as a duplicate of this bug. ***

Comment 16 Corey Marthaler 2012-08-08 22:31:56 UTC
I'm unable to reproduce this w/ the latest 5.9 tree. Closing...

./helter_skelter -l /usr/tests/sts-rhel5.8 -r /usr/tests/sts-rhel5.8 -R ../../var/share/resource_files/taft.xml -E taft-04


2.6.18-333.el5

lvm2-2.02.88-9.el5    BUILT: Wed Jul 25 10:13:00 CDT 2012
lvm2-cluster-2.02.88-9.el5    BUILT: Wed Jul 25 10:09:34 CDT 2012
device-mapper-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
device-mapper-event-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
cmirror-1.1.39-15.el5    BUILT: Thu Apr 26 17:07:01 CDT 2012
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009


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