Bug 1259958 - removing a vg seems to require a lock stop and then a start
removing a vg seems to require a lock stop and then a start
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: David Teigland
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-03 19:37 EDT by Corey Marthaler
Modified: 2015-09-15 11:10 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-15 11:10:28 EDT
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)

  None (edit)
Description Corey Marthaler 2015-09-03 19:37:42 EDT
Description of problem:
I'm still new to lvmlockd so it's possible I set something up wrong here.

# all LVs removed
[root@harding-03 ~]# lvs
  LV   VG              Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home rhel_harding-03 -wi-ao---- 200.97g                                                    
  root rhel_harding-03 -wi-ao----  50.00g                                                    
  swap rhel_harding-03 -wi-ao----  27.95g                                                    

[root@harding-02 ~]# lvs
  LV   VG              Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home rhel_harding-02 -wi-ao---- 200.97g                                                    
  root rhel_harding-02 -wi-ao----  50.00g                                                    
  swap rhel_harding-02 -wi-ao----  27.95g                                                    

[root@harding-03 ~]# vgremove VG5
  Lockspace for "VG5" not stopped on other hosts

[root@harding-02 ~]# vgchange --lock-stop VG5

[root@harding-02 ~]# vgremove VG5
  VG VG5 lock failed: lockspace is inactive

[root@harding-03 ~]# vgremove VG5
  Lockspace for "VG5" not stopped on other hosts

[root@harding-03 ~]# vgchange --lock-stop VG5

[root@harding-03 ~]# vgremove VG5
  VG VG5 lock failed: lockspace is inactive

[root@harding-03 ~]# vgchange --lock-start VG5
  VG VG5 starting sanlock lockspace
  Starting locking.  Waiting until locks are ready...

[root@harding-03 ~]# vgremove VG5
  Volume group "VG5" successfully removed

 


Version-Release number of selected component (if applicable):
3.10.0-306.el7.x86_64

lvm2-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
lvm2-libs-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
lvm2-cluster-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-libs-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-event-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-event-libs-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
Comment 1 David Teigland 2015-09-04 10:21:49 EDT
The VG needs to be started on the host that is removing it, but it needs to be stopped on all other hosts.


[root@harding-02 ~]# vgremove VG5
  VG VG5 lock failed: lockspace is inactive
(This means that you need to start the VG to remove it.  The message should probably use correct terminology and say the "lockspace is not started".)


[root@harding-03 ~]# vgremove VG5
  Lockspace for "VG5" not stopped on other hosts
(The VG needs to be stopped on *other* hosts before this host can remove it.  Maybe it would be clearer if the message said the VG is started on other hosts rather than saying it's not stopped on other hosts.)


Also, with sanlock, it can take several seconds to notice that another host has stopped the VG.  It may be worth adding an option to retry internally for a while to compensate for that.

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