* [linux-lvm] lvmlockd: how to convert lock_type from sanlock to dlm?
@ 2017-11-20 10:35 Eric Ren
2017-11-20 16:10 ` David Teigland
0 siblings, 1 reply; 3+ messages in thread
From: Eric Ren @ 2017-11-20 10:35 UTC (permalink / raw)
To: David Teigland; +Cc: LVM general discussion and development
Hello David,
On my testing cluster, the lvmlockd was firstly used with sanlock and
everything was OK.
After some play, I want to change the "sanlock" lock_type of a VG into
"dlm" locktype.
With dlm_controld running, I tried as following, but still failed.
1. Performed as the "Changing dlm cluster name" section of `man lvmlockd`:
# dlm_tool ls // no lockspace available
# vgs
Reading VG vg1 without a lock.
VG #PV #LV #SN Attr VSize VFree
vg1 1 1 0 wz--ns 19.97g 18.72g
# vgchange --lock-type none --force vg1 // the cmd comes from
`man lvmlockd`
Command does not accept option: --force.
2. Tried with 'global/locking_type=0':
# vgchange --config 'global/locking_type=0' --lock-type dlm vg1
WARNING: Locking disabled. Be careful! This could corrupt your metadata.
ERROR: configuration setting use_lvmlockd cannot be used with
clustered locking_type 3.
The error message is strange because the locking_type=0 in the command
line and locking_type=1
in lvm.conf.
Not sure if it's a real problem or am doing something wrong?
Regards,
Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] lvmlockd: how to convert lock_type from sanlock to dlm?
2017-11-20 10:35 [linux-lvm] lvmlockd: how to convert lock_type from sanlock to dlm? Eric Ren
@ 2017-11-20 16:10 ` David Teigland
2017-11-21 4:11 ` Eric Ren
0 siblings, 1 reply; 3+ messages in thread
From: David Teigland @ 2017-11-20 16:10 UTC (permalink / raw)
To: Eric Ren; +Cc: LVM general discussion and development
On Mon, Nov 20, 2017 at 06:35:20PM +0800, Eric Ren wrote:
> On my testing cluster,� the lvmlockd was firstly used with sanlock and
> everything was OK. After some play, I want to change the "sanlock"
> lock_type of a VG into "dlm" locktype.
> # vgchange --lock-type none --force vg1������ // the cmd comes from `man lvmlockd`
> Command does not accept option: --force.
First you'll need this recent fix:
https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f611b68f3c02b9af2521d7ea61061af3709fe87c
--force was broken at some point, and the option is now --lockopt force.
To change between lock types, you are supposed to be able to change to a
local VG, then from local to the other lock type. The man page sections:
changing a lockd VG to a local VG
changing a local VG to a lockd VG
But it looks like a fix is needed in those instructions. I believe
"vgchange --lock-type none <vgname>" needs to include --lockopt force.
If you could verify this for me, I'll update the man page.
Thanks
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] lvmlockd: how to convert lock_type from sanlock to dlm?
2017-11-20 16:10 ` David Teigland
@ 2017-11-21 4:11 ` Eric Ren
0 siblings, 0 replies; 3+ messages in thread
From: Eric Ren @ 2017-11-21 4:11 UTC (permalink / raw)
To: David Teigland; +Cc: LVM general discussion and development
David,
> First you'll need this recent fix:
> https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f611b68f3c02b9af2521d7ea61061af3709fe87c
>
> --force was broken at some point, and the option is now --lockopt force.
Thanks!
> To change between lock types, you are supposed to be able to change to a
> local VG, then from local to the other lock type. The man page sections:
>
> changing a lockd VG to a local VG
> changing a local VG to a lockd VG
>
> But it looks like a fix is needed in those instructions. I believe
> "vgchange --lock-type none <vgname>" needs to include --lockopt force.
> If you could verify this for me, I'll update the man page.
It works! I did as the following:
"""
sle15-c1-n1:~ # vgs
Reading VG vg1 without a lock.
VG #PV #LV #SN Attr VSize VFree
vg1 1 1 0 wz--ns 19.97g 18.72g
sle15-c1-n1:~ # vgchange --lock-type none vg1
Cannot access VG vg1 due to failed lock.
sle15-c1-n1:~ # vgchange --lock-type none --lockopt force vg1
Forcibly change VG lock type to none? [y/n]: y
Volume group "vg1" successfully changed
sle15-c1-n1:~ # vgchange --lock-type dlm vg1
Volume group "vg1" successfully changed
sle15-c1-n1:~ # vgs
Reading VG vg1 without a lock.
VG #PV #LV #SN Attr VSize VFree
vg1 1 1 0 wz--ns 19.97g 18.72g
sle15-c1-n1:~ # vgs -o+lock_type
Reading VG vg1 without a lock.
VG #PV #LV #SN Attr VSize VFree LockType
vg1 1 1 0 wz--ns 19.97g 18.72g dlm
sle15-c1-n1:~ # vgchange --lockstart
VG vg1 starting dlm lockspace
Starting locking. Waiting until locks are ready...
sle15-c1-n1:~ # lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync
Convert
lv1 vg1 -wi------- 1.00g
"""
Thanks,
Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-21 4:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 10:35 [linux-lvm] lvmlockd: how to convert lock_type from sanlock to dlm? Eric Ren
2017-11-20 16:10 ` David Teigland
2017-11-21 4:11 ` Eric Ren
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).