linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Eric Ren <zren@suse.com>
To: David Teigland <teigland@redhat.com>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] lvmlockd: how to convert lock_type from sanlock to dlm?
Date: Tue, 21 Nov 2017 12:11:44 +0800	[thread overview]
Message-ID: <f77fe769-5bb9-58c4-89ca-7a707a78deac@suse.com> (raw)
In-Reply-To: <20171120161007.GA29888@redhat.com>

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

      reply	other threads:[~2017-11-21  4:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f77fe769-5bb9-58c4-89ca-7a707a78deac@suse.com \
    --to=zren@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).