linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] [lvmlockd] "Duplicate sanlock global locks" warned but not found in "lvmlockctl -i"
@ 2018-06-27 14:03 Damon Wang
  2018-06-27 14:23 ` David Teigland
  0 siblings, 1 reply; 5+ messages in thread
From: Damon Wang @ 2018-06-27 14:03 UTC (permalink / raw)
  To: LVM general discussion and development

Hi all,

  I found duplicate sanlock locks in lvm operation:

    [root@172-20-11-108 ~]# vgs
      Duplicate sanlock global locks should be corrected
      Duplicate sanlock global lock in VG 9e9e5a689750430daff18da75c9718cc
      Couldn't find device with uuid 7oDKl3-TvVY-Q24z-Q2BC-psUZ-SFCX-j1fhQE.
      Duplicate sanlock global lock in VG 8c32e39f49024e64832c1bc3fd15f948
      VG                               #PV #LV #SN Attr   VSize    VFree
      8c32e39f49024e64832c1bc3fd15f948   4  80   0 wz--ns <291.88g <263.32g
      9e9e5a689750430daff18da75c9718cc   3  55   0 wz-pns  739.93g <702.65g
      zstack                             1   2   0 wz--n-  <59.00g       0

while lvmlockctl -i:

    [root@172-20-11-108 ~]# lvmlockctl -i
    VG 8c32e39f49024e64832c1bc3fd15f948 lock_type=sanlock
npweb0-UQs8-hviS-PA8L-mOgI-eMDO-qY5OpK
    LS sanlock lvm_8c32e39f49024e64832c1bc3fd15f948
    LK VG un ver 229
    LK GL un ver 1
    LK LV un nvnmw0-WMeY-nm4V-zEfl-Dcpc-bGJr-rL8gpG
    LK LV sh hGVNWa-wwFx-SsQJ-Y6t4-UvPJ-CKEq-1CICng
    LK LV ex YtvSmz-Mo7H-gQnV-QfLp-Pb9P-HXpO-Fw3iDZ
    ... ...
    LK LV ex sUUEqr-B38J-Cktj-fky0-g5he-xS3o-wq9Lor
    LK LV ex k943Uw-du21-EOg0-F1t5-NKrH-aPof-Wt37Mi

    VG 9e9e5a689750430daff18da75c9718cc lock_type=sanlock
JBTlB1-fjbM-YpOc-6Qnt-Spxj-nEM4-oQaBCT
    LS sanlock lvm_9e9e5a689750430daff18da75c9718cc
    LK VG un ver 208
    LK LV sh rnb8Lc-XbBu-dqPn-kfNC-SsW4-F9KF-nK6fsu
    LK LV un YftJt5-1G9S-0icO-HkbU-7vqL-OPrZ-ppO8WO

It seems not harmful, but I don't know why it happen.

Thanks,
Damon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] [lvmlockd] "Duplicate sanlock global locks" warned but not found in "lvmlockctl -i"
  2018-06-27 14:03 [linux-lvm] [lvmlockd] "Duplicate sanlock global locks" warned but not found in "lvmlockctl -i" Damon Wang
@ 2018-06-27 14:23 ` David Teigland
  2018-06-27 15:15   ` Damon Wang
  0 siblings, 1 reply; 5+ messages in thread
From: David Teigland @ 2018-06-27 14:23 UTC (permalink / raw)
  To: Damon Wang; +Cc: LVM general discussion and development

On Wed, Jun 27, 2018 at 10:03:00PM +0800, Damon Wang wrote:
> Hi all,
> 
>   I found duplicate sanlock locks in lvm operation:
> 
>     [root@172-20-11-108 ~]# vgs
>       Duplicate sanlock global locks should be corrected
>       Duplicate sanlock global lock in VG 9e9e5a689750430daff18da75c9718cc
>       Couldn't find device with uuid 7oDKl3-TvVY-Q24z-Q2BC-psUZ-SFCX-j1fhQE.
>       Duplicate sanlock global lock in VG 8c32e39f49024e64832c1bc3fd15f948
>       VG                               #PV #LV #SN Attr   VSize    VFree
>       8c32e39f49024e64832c1bc3fd15f948   4  80   0 wz--ns <291.88g <263.32g
>       9e9e5a689750430daff18da75c9718cc   3  55   0 wz-pns  739.93g <702.65g
>       zstack                             1   2   0 wz--n-  <59.00g       0

> It seems not harmful, but I don't know why it happen.

It can be harmful if different hosts use different global locks.
There's a section in lvmlockd man page about how this happens and
how to correct it.  In short, it happens when you create a new sanlock VG
while the other one is not visible.  To correct it, you disable the global
lock in one of the VGs with 'lvmlockctl --gl-disable <vgname>'.

Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] [lvmlockd] "Duplicate sanlock global locks" warned but not found in "lvmlockctl -i"
  2018-06-27 14:23 ` David Teigland
@ 2018-06-27 15:15   ` Damon Wang
  2018-06-27 15:26     ` David Teigland
  0 siblings, 1 reply; 5+ messages in thread
From: Damon Wang @ 2018-06-27 15:15 UTC (permalink / raw)
  To: David Teigland; +Cc: LVM general discussion and development

Hi,

Thank you for your reply.

I’m wonder why I see only one global lock in lvmlockctl -i, should I got multiple gl lock in lvmlock -i when it warn “duplicate gl lock”?

Thanks!
Damon

> 在 2018年6月27日,下午10:23,David Teigland <teigland@redhat.com> 写道:
> 
>> On Wed, Jun 27, 2018 at 10:03:00PM +0800, Damon Wang wrote:
>> Hi all,
>> 
>>  I found duplicate sanlock locks in lvm operation:
>> 
>>    [root@172-20-11-108 ~]# vgs
>>      Duplicate sanlock global locks should be corrected
>>      Duplicate sanlock global lock in VG 9e9e5a689750430daff18da75c9718cc
>>      Couldn't find device with uuid 7oDKl3-TvVY-Q24z-Q2BC-psUZ-SFCX-j1fhQE.
>>      Duplicate sanlock global lock in VG 8c32e39f49024e64832c1bc3fd15f948
>>      VG                               #PV #LV #SN Attr   VSize    VFree
>>      8c32e39f49024e64832c1bc3fd15f948   4  80   0 wz--ns <291.88g <263.32g
>>      9e9e5a689750430daff18da75c9718cc   3  55   0 wz-pns  739.93g <702.65g
>>      zstack                             1   2   0 wz--n-  <59.00g       0
> 
>> It seems not harmful, but I don't know why it happen.
> 
> It can be harmful if different hosts use different global locks.
> There's a section in lvmlockd man page about how this happens and
> how to correct it.  In short, it happens when you create a new sanlock VG
> while the other one is not visible.  To correct it, you disable the global
> lock in one of the VGs with 'lvmlockctl --gl-disable <vgname>'.
> 
> Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] [lvmlockd] "Duplicate sanlock global locks" warned but not found in "lvmlockctl -i"
  2018-06-27 15:15   ` Damon Wang
@ 2018-06-27 15:26     ` David Teigland
  2018-06-27 16:35       ` Damon Wang
  0 siblings, 1 reply; 5+ messages in thread
From: David Teigland @ 2018-06-27 15:26 UTC (permalink / raw)
  To: Damon Wang; +Cc: linux-lvm

On Wed, Jun 27, 2018 at 11:15:03PM +0800, Damon Wang wrote:
> I’m wonder why I see only one global lock in lvmlockctl -i, should I got
> multiple gl lock in lvmlock -i when it warn “duplicate gl lock”?

lvmlockctl is showing you the one global lock that lvmlockd is using, and
the vgs command is showing you all the global locks that it sees on disk.
Just disable the global lock that is not being used (the one not in
lvmlockctl) with lvmlockctl --gl-disable and the warning should disappear.

Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] [lvmlockd] "Duplicate sanlock global locks" warned but not found in "lvmlockctl -i"
  2018-06-27 15:26     ` David Teigland
@ 2018-06-27 16:35       ` Damon Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Damon Wang @ 2018-06-27 16:35 UTC (permalink / raw)
  To: David Teigland; +Cc: linux-lvm

Got it, thanks a lot!

Damon

> 在 2018年6月27日,下午11:26,David Teigland <teigland@redhat.com> 写道:
> 
>> On Wed, Jun 27, 2018 at 11:15:03PM +0800, Damon Wang wrote:
>> I’m wonder why I see only one global lock in lvmlockctl -i, should I got
>> multiple gl lock in lvmlock -i when it warn “duplicate gl lock”?
> 
> lvmlockctl is showing you the one global lock that lvmlockd is using, and
> the vgs command is showing you all the global locks that it sees on disk.
> Just disable the global lock that is not being used (the one not in
> lvmlockctl) with lvmlockctl --gl-disable and the warning should disappear.
> 
> Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-27 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-27 14:03 [linux-lvm] [lvmlockd] "Duplicate sanlock global locks" warned but not found in "lvmlockctl -i" Damon Wang
2018-06-27 14:23 ` David Teigland
2018-06-27 15:15   ` Damon Wang
2018-06-27 15:26     ` David Teigland
2018-06-27 16:35       ` Damon Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).