Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VG <vg_name> init failed: invalid parameters for sanlock #203

Closed
axxana opened this issue Sep 27, 2017 · 13 comments
Closed

VG <vg_name> init failed: invalid parameters for sanlock #203

axxana opened this issue Sep 27, 2017 · 13 comments
Assignees

Comments

@axxana
Copy link

axxana commented Sep 27, 2017

Hi,
Sanlock and lvmlockd are running on my system.
When trying to create a shared VG (vgcreate --shared <vg_name> /dev/sdb1 /dev/sdc1) I receive the following errors
VG <vg_name> init failed: invalid parameters for sanlock.
Failed to initialize lock args for lock type sanlock

What are the invalid parameters? How should they be sent?

Please advise.

Thanks.

@msmith626
Copy link
Contributor

msmith626 commented Sep 28, 2017 via email

@msmith626
Copy link
Contributor

msmith626 commented Sep 28, 2017 via email

@axxana
Copy link
Author

axxana commented Sep 29, 2017

VGCREATE with --verbose

No PV label found on /dev/vglock/locklv.
No PV label found on /dev/sda1.
No PV label found on /dev/sda5.
Enabling sanlock global lock
Wiping internal VG cache
Wiping cache of LVM-capable devices
Wiping signatures on new PV /dev/sdb1.
Wiping signatures on new PV /dev/sdc1.
Adding physical volume '/dev/sdb1' to volume group 'vg1'
Adding physical volume '/dev/sdc1' to volume group 'vg1'
Archiving volume group "vg1" metadata (seqno 0).
Creating logical volume lvmlock
Creating volume group backup "/etc/lvm/backup/vg1" (seqno 2).
Activating logical volume vg1/lvmlock locally.
activation/volume_list configuration setting not defined: Checking only host tags for vg1/lvmlock.
Creating vg1-lvmlock
Loading vg1-lvmlock table (252:1)
Resuming vg1-lvmlock (252:1)
Initializing 4.00 KiB of logical volume "vg1/lvmlock" with value 0.
Logical volume "lvmlock" created.
VG vg1 init failed: invalid parameters for sanlock
Removing vg1-lvmlock (252:1)
Failed to initialize lock args for lock type sanlock
Removing physical volume "/dev/sdb1" from volume group "vg1"
Removing physical volume "/dev/sdc1" from volume group "vg1"
Volume group "vg1" successfully removed

@axxana
Copy link
Author

axxana commented Sep 29, 2017

/var/log/sanlock.log

2017-09-29 20:24:25 179338 [5835]: sanlock daemon started 3.5.0 host b8d64a1d-e3d3-44d7-985a-949bd1266d13.ubuntu16-1
2017-09-29 20:24:32 179344 [5845]: open error -13 /dev/mapper/vg1-lvmlock

@axxana
Copy link
Author

axxana commented Sep 29, 2017

lvm.conf.log

@axxana
Copy link
Author

axxana commented Sep 29, 2017

I also added the LV to activation/volume_list
activation/volume_list configuration setting defined: Checking the list to match vg1/lvmlock.
but still get the error
VG vg1 init failed: invalid parameters for sanlock
Removing vg1-lvmlock (252:1)
Failed to initialize lock args for lock type sanlock

What are the "valid parameters"?

Thanks.

@msmith626 msmith626 self-assigned this Oct 2, 2017
@msmith626
Copy link
Contributor

Does the 'lock_type' parameter need to be updated? Is lvmlockd running? Have you read the man page for lvmlockd yet -- it talks quite a bit about sanlock and needing a special VG for it... maybe that's what you're trying to create now. There is currently a GH issue open for adding sanlock support.

--Marc

@axxana
Copy link
Author

axxana commented Oct 4, 2017

I get the same error with or without --lock-type.
I read the manual. Here's my script. Any comments?

#Create the lock VG
vgcreate ff --config global/use_lvmlockd=0 vglock /dev/sdb2
lvcreate -n locklv -L 10MB vglock
systemctl start sanlock
lvmlockd -g sanlock --host-id 1
systemctl status sanlock
sanlock direct init -s lsgl:1:/dev/vglock/locklv:0

#Craete the shared VG
pvcreate -ff --config global/use_lvmlockd=0 /dev/sdb1 /dev/sdc1
vgcreate --verbose --shared vg1 /dev/sdb1 /dev/sdc1 --lock-type sanlock

Thanks a lot.

@msmith626
Copy link
Contributor

msmith626 commented Oct 4, 2017 via email

@axxana
Copy link
Author

axxana commented Oct 6, 2017

Will do, thanks a lot!

@axxana axxana closed this as completed Oct 6, 2017
@axxana
Copy link
Author

axxana commented Oct 10, 2017

Do you have an estimation when the support for sanlock in ESOS will be released?

@axxana axxana reopened this Oct 10, 2017
@msmith626
Copy link
Contributor

msmith626 commented Oct 10, 2017 via email

@msmith626
Copy link
Contributor

Issue #202 already exists for the sanlock enhancement request, so we'll close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants