Bug 592362 - service clvmd stop tried to deactivate mounted, local volumes
service clvmd stop tried to deactivate mounted, local volumes
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.0
All Linux
low Severity high
: rc
: ---
Assigned To: Fabio Massimo Di Nitto
Corey Marthaler
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-14 12:10 EDT by Nate Straz
Modified: 2010-11-11 09:51 EST (History)
9 users (show)

See Also:
Fixed In Version: lvm2-2_02_65-1_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 09:51:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
proposed patch (707 bytes, patch)
2010-05-15 00:25 EDT, Fabio Massimo Di Nitto
no flags Details | Diff

  None (edit)
Description Nate Straz 2010-05-14 12:10:24 EDT
Description of problem:

[root@morph-03 init.d]# vgs
  VG         #PV #LV #SN Attr   VSize  VFree
  vg_morph03   1   2   0 wz--n- 36.78g    0
[root@morph-03 init.d]# lvs
  LV      VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  lv_root vg_morph03 -wi-ao 32.81g
  lv_swap vg_morph03 -wi-ao  3.97g
[root@morph-03 init.d]# service clvmd status
clvmd (pid 1533) is running...
Active clustered Volume Groups: (none)
Active clustered Logical Volumes: (none)
[root@morph-03 init.d]# service clvmd stop
Deactivating clusterd VG(s):   Can't deactivate volume group "vg_morph03" with 2 open logical volume(s)
                                                           [FAILED]


Version-Release number of selected component (if applicable):
lvm2-2.02.64-2.el6.i686

How reproducible:
easily

Steps to Reproduce:
1. service clvmd start
2. service clvmd stop
  
Actual results:


Expected results:


Additional info:
Comment 3 Alasdair Kergon 2010-05-14 19:48:02 EDT
Nice bug!  If there are no clustered VGs it defaults to empty string and tries everything!  (So skip if clustered_vgs is empty.  Also fix the typo 'r*e*d' in the message.)
Comment 4 Fabio Massimo Di Nitto 2010-05-15 00:25:34 EDT
Created attachment 414208 [details]
proposed patch

with this patch applied:

[root@fedora12-node2 scripts]# sh clvmd_init_red_hat start
Starting clvmd:                                            [  OK  ]
Activating VG(s):   2 logical volume(s) in volume group "VolGroup" now active
                                                           [  OK  ]

[root@fedora12-node2 scripts]# sh clvmd_init_red_hat status
clvmd (pid 3083) is running...
Active clustered Volume Groups: (none)
Active clustered Logical Volumes: (none)

[root@fedora12-node2 scripts]# sh clvmd_init_red_hat stop  
Signaling clvmd to exit                                    [  OK  ]
clvmd terminated                                           [  OK  ]

It respects that LVM_VGS has higher priority than clustered_vgs and addresses the 'r*e*d*' typo in the message.
Comment 7 Fabio Massimo Di Nitto 2010-05-16 23:19:21 EDT
--- WHATS_NEW   14 May 2010 15:19:42 -0000      1.1559
+++ WHATS_NEW   17 May 2010 03:17:23 -0000
@@ -1,5 +1,6 @@
 Version 2.02.65 - 
 =================================
+  Fix clvmd init script to not deactive non-clustered volume groups.

Checking in WHATS_NEW;
/cvs/lvm2/LVM2/WHATS_NEW,v  <--  WHATS_NEW
new revision: 1.1560; previous revision: 1.1559
done
Checking in scripts/clvmd_init_red_hat.in;
/cvs/lvm2/LVM2/scripts/clvmd_init_red_hat.in,v  <--  clvmd_init_red_hat.in
new revision: 1.7; previous revision: 1.6
done
Comment 9 Nate Straz 2010-05-18 15:33:26 EDT
I tried out lvm2-2.02.65-1.el6 from brew and it is able to shutdown clvmd without trying to deactivate local volumes.
Comment 11 Nate Straz 2010-06-07 15:26:32 EDT
I haven't hit this issue with recent trees.
Comment 12 releng-rhel@redhat.com 2010-11-11 09:51:11 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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