linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Changing shared VG lock type
@ 2021-11-03 11:40 Charles Koprowski
  2021-11-04 15:25 ` David Teigland
  0 siblings, 1 reply; 3+ messages in thread
From: Charles Koprowski @ 2021-11-03 11:40 UTC (permalink / raw)
  To: linux-lvm


[-- Attachment #1.1: Type: text/plain, Size: 1242 bytes --]

Hello,

I'm trying to change the lock type of a shared VG from «dlm» to «sanlock».

>From the manpage I understand that I should first change it to «none» and
then change it to «sanlock».

So I changed the lock type to «none» without problem.

I then started lvmlockd + sanlock and tried to change the lock type to
«sanlock» but it failed :

# vgchange --lock-type sanlock data
  Global lock failed: check that global lockspace is started

What could I have missed ?

Here is the log buffer from lvmlockd :

1635939300 lvmlockd started
1635939316 new cl 1 pi 2 fd 8
1635939316 recv vgchange[2576] cl 1 lock gl "" mode ex flags 0
1635939316 read_cluster_name: open error -1, check dlm_controld
1635939316 lockspace "" not found for sanlock gl, searching...
1635939316 work search for gl
1635939316 worker found no gl_is_enabled
1635939316 lockspace "" not found after search
1635939316 read_cluster_name: open error -1, check dlm_controld
1635939316 send vgchange[2576] cl 1 lock gl rv -210 ENOLS
NO_LOCKSPACES,NO_GL_LS
1635939316 close vgchange[2576] cl 1 fd 8
1635939320 new cl 2 pi 2 fd 8
1635939320 recv client[2577] cl 2 dump_log . "" mode iv flags 0

Thank you.

Regards,

-- 
Charles

[-- Attachment #1.2: Type: text/html, Size: 1666 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

* Re: [linux-lvm] Changing shared VG lock type
  2021-11-03 11:40 [linux-lvm] Changing shared VG lock type Charles Koprowski
@ 2021-11-04 15:25 ` David Teigland
  2021-11-05 11:37   ` Charles Koprowski
  0 siblings, 1 reply; 3+ messages in thread
From: David Teigland @ 2021-11-04 15:25 UTC (permalink / raw)
  To: Charles Koprowski; +Cc: linux-lvm

On Wed, Nov 03, 2021 at 12:40:24PM +0100, Charles Koprowski wrote:
> Hello,
> 
> I'm trying to change the lock type of a shared VG from «dlm» to «sanlock».
> 
> >From the manpage I understand that I should first change it to «none» and
> then change it to «sanlock».
> 
> So I changed the lock type to «none» without problem.
> 
> I then started lvmlockd + sanlock and tried to change the lock type to
> «sanlock» but it failed :
> 
> # vgchange --lock-type sanlock data
>   Global lock failed: check that global lockspace is started
> 
> What could I have missed ?

Hi, you haven't missing anything, but stumbled across a real issue that we
should improve.  This VG needs to have the global lock enabled within it,
but vgchange --locktype doesn't contain the necessary logic to enable a
new global lock (only vgcreate includes that.)  You can read more about
the special cases surrounding the global lock in the lvmlockd(8) section
"managing the global lock in sanlock VGs".

To work around this, you can force the vgchange by skipping the global
lock, and then start the lockspace:

$ vgchange --locktype sanlock --lockopt skipgl svg
  WARNING: skipping global lock in lvmlockd.
  Logical volume "lvmlock" created.
  Volume group "svg" successfully changed

$ vgchange --lockstart svg

Depending on what other VGs are seen, it's possible you may also need to
run "lvmlockctl --gl-enable svg" at this point to enable the global lock
in that vg.

Dave

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


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

* Re: [linux-lvm] Changing shared VG lock type
  2021-11-04 15:25 ` David Teigland
@ 2021-11-05 11:37   ` Charles Koprowski
  0 siblings, 0 replies; 3+ messages in thread
From: Charles Koprowski @ 2021-11-05 11:37 UTC (permalink / raw)
  To: David Teigland; +Cc: linux-lvm


[-- Attachment #1.1: Type: text/plain, Size: 499 bytes --]

Le jeu. 4 nov. 2021 à 16:25, David Teigland <teigland@redhat.com> a écrit :

> To work around this, you can force the vgchange by skipping the global
> lock, and then start the lockspace:
>
> $ vgchange --locktype sanlock --lockopt skipgl svg
>   WARNING: skipping global lock in lvmlockd.
>   Logical volume "lvmlock" created.
>   Volume group "svg" successfully changed


Hi David,

Thanks for the tip.

Using «--lockopt skipgl» worked as expected.

Regards,

-- 
Charles

[-- Attachment #1.2: Type: text/html, Size: 957 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

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

end of thread, other threads:[~2021-11-05 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 11:40 [linux-lvm] Changing shared VG lock type Charles Koprowski
2021-11-04 15:25 ` David Teigland
2021-11-05 11:37   ` Charles Koprowski

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).