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@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/