From: David Teigland <teigland@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Moshe Lazarov <Moshe.Lazarov@axxana.com>
Subject: Re: [linux-lvm] add_lockspace done -19
Date: Fri, 13 Oct 2017 09:41:11 -0500 [thread overview]
Message-ID: <20171013144111.GA2570@redhat.com> (raw)
In-Reply-To: <DB6PR0902MB2213A3709365A8B5F151390C954B0@DB6PR0902MB2213.eurprd09.prod.outlook.com>
On Thu, Oct 12, 2017 at 06:30:24PM +0000, Moshe Lazarov wrote:
> I am using the following script to create shared VGs using SANLOCK. However,
> I keep getting an error when trying to add the lock space.
The lvmlockd man page you mention lists the steps you should follow
under "Initial set up", but the commands you have shown are nothing
at all like that. Please follow these steps. I'm copying from the
man page and adding some of the commands you have used:
1. choose a lock manager
You have chosen sanlock.
2. configure hosts to use lvmlockd
You must edit /etc/lvm/lvm.conf on all of your nodes, setting
global {
locking_type = 1
use_lvmlockd = 1
use_lvmetad = 1 (this is optional)
Then edit /etc/lvm/lvmlocal.conf on all of your nodes, setting
local {
host_id = 1 (on the first host)
or
host_id = 2 (on the second host)
etc
3. start lvmlockd
# lvmlockd
4. start lock manager
# systemctl start sanlock
5. create VG on shared devices
I get the impression that you would like to create a special, small VG on
sdb2 to hold the sanlock global lock, and then a general purpose VG on
sdc1. To do that:
# vgcreate --shared global /dev/sdb2
# vgcreate --shared vg1 /dev/sdc1
(You are not required to create the special small VG for the global lock.
If you want to use a single general purpose VG, you could just leave out
the first vgcreate.)
6. start VG on all hosts
# vgchange --lock-start
(run that on all your hosts; they should all start "global" and "vg1")
7. create and activate LVs
lvcreate -n slowlv -L 150G vg1 /dev/sdc1
Once that works, please let me know what part of the man page was not
clear to you. Thanks
> #Lock VG & LV
>
> vgcreate --verbose --config global/use_lvmlockd=0 vglock /dev/sdb2
>
> lvcreate --config global/use_lvmlockd=0 -n locklv -L 10MB vglock
>
> sanlock direct init -s lsgl:1:/dev/vglock/locklv:0
>
> sanlock client add_lockspace -s lsgl:1:/dev/vglock/locklv:0
I'm curious what led you to believe that you should use commands like
these?
next prev parent reply other threads:[~2017-10-13 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 18:30 [linux-lvm] add_lockspace done -19 Moshe Lazarov
2017-10-13 14:41 ` David Teigland [this message]
2017-10-16 18:40 ` Moshe Lazarov
2017-10-16 18:54 ` David Teigland
2017-10-16 22:07 ` Moshe Lazarov
2017-10-17 16:54 ` David Teigland
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=20171013144111.GA2570@redhat.com \
--to=teigland@redhat.com \
--cc=Moshe.Lazarov@axxana.com \
--cc=linux-lvm@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).