[linux-lvm] add_lockspace done -19

Moshe Lazarov Moshe.Lazarov at axxana.com
Thu Oct 12 18:30:24 UTC 2017


Hi,

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.

 

#!/bin/bash

 

killall sanlock

/etc/init.d/sanlock stop

killall lvmetad

lvmetad

sleep 2

vgremove -ff --config global/use_lvmlockd=0 vglock

 

echo 'y' | pvremove -ff --config global/use_lvmlockd=0 /dev/sdb1

echo 'y' | pvremove -ff --config global/use_lvmlockd=0 /dev/sdc1

echo 'y' | pvremove -ff --config global/use_lvmlockd=0 /dev/sdb2

 

#http://man7.org/linux/man-pages/man8/lvmlockd.8.html

#The first vgcreate command needs to be given the path to a device that has
not yet been initialized with pvcreate. /dev/sdb2 is used for the lock and
should not be

#initialized with pvcreate.

 

#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

 

lvmlockd

sleep 2

systemctl start sanlock

lvmlockd -g sanlock --host-id 1

sleep 2

systemctl status sanlock

 

sanlock client add_lockspace -s lsgl:1:/dev/vglock/locklv:0

 

pvcreate -ff --config global/use_lvmlockd=0 /dev/sdc1

vgcreate --verbose --shared vg1 /dev/sdc1 --lock-type sanlock

lvcreate -n slowlv -L 150G vg1 /dev/sdc1

 

Please advise.

 

Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20171012/37f9549a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5524 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20171012/37f9549a/attachment.p7s>


More information about the linux-lvm mailing list