Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 233324 - resync option to cmirrors needs to error out if volume is active
resync option to cmirrors needs to error out if volume is active
Product: Red Hat Cluster Suite
Classification: Retired
Component: lvm2-cluster (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jonathan Earl Brassow
Cluster QE
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2007-03-21 12:27 EDT by Corey Marthaler
Modified: 2010-01-11 23:05 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-07-24 06:41:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2007-03-21 12:27:29 EDT
Description of problem:
The lvchange cmd shouldn't ask you if you want to deactivate a cmirror inorder
to resync it, if it can't grab the lock anyways.

  test               vg         mwi-a-  2.00G                    test_mlog    
32.42 test_mimage_0(0),test_mimage_1(0)  
  [test_mimage_0]    vg         iwi-ao  2.00G                                  
  [test_mimage_1]    vg         iwi-ao  2.00G                                  
  [test_mlog]        vg         lwi-ao  4.00M                                  
[root@link-08 ~]# lvchange --resync /dev/vg/test
  /dev/sdh1: read failed after 0 of 2048 at 0: Input/output error
Do you really want to deactivate logical volume test to resync it? [y/n]: y
  Error locking on node link-08: Volume is busy on another node
  Can't get exclusive access to clustered volume test

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

How reproducible:
Comment 1 Alasdair Kergon 2007-03-21 13:12:34 EDT
I'm not sure that it's worth changing that.
Comment 2 Jun'ichi NOMURA 2007-03-21 14:40:55 EDT
Since it seems normal deactivation ('lvchange -an') works without a need of
exclusive access, I'm afraid relationship between the messages
"Do you really want to deactivate..?" and "Can't get exclusive access.."
is not clear to the user.

How about skipping exclusive-activation or change the message to encourage
'lvchange -an' manually?

Current code sequence is this:
  if (active) {
     ask "Do you really want to deactivate?"
     if (not yes) {
        return failed
  if (cluster) {
     if (!activate_lv_excl) {
        return failed

What if we do this?
  if (active) {
     ask "Do you really want to deactivate?"
     if (not yes) {
        return failed
  } else if (cluster) {
     if (!activate_lv_excl) {
        return failed

I think activate_lv_excl in this case is necessary to make
the activeness test and deactivate_lv atomic.
(To prevent other node activates the lv between them.)

If it's the only reason of activate_lv_excl,
can we just deactivate it if the user said he really want to so?

Same discussion might be applied to lvremove.
Comment 3 Jonathan Earl Brassow 2007-04-16 16:30:34 EDT
Is the volume mounted on a remote node?  If so, I think it's doing the right
thing.  It's saying "you've asked to deactivate this volume, but it's in-use on
another node!  Too bad for you."

I'm closing this NOTABUG.  Feel free to reopen if the volume was not mounted on
another node (or if you feel strongly about what error messages should be
printed).  I think it's doing the right thing.

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