-
Notifications
You must be signed in to change notification settings - Fork 72
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
lvcreate not found: device not cleared #50
Comments
create an shared sanlock vg:
vgcreate testvg /dev/mapper/mpatha --shared --metadatasize 10M
create lv:
lvcreate --name zhx --size 1g global_lock -v
Loading table for global_lock-lvmlock (253:8).
Suppressed global_lock-lvmlock (253:8) identical table reload.
Suspending global_lock-lvmlock (253:8) with device flush
Loading table for global_lock-lvmlock (253:8).
Suppressed global_lock-lvmlock (253:8) identical table reload.
Resuming global_lock-lvmlock (253:8).
Archiving volume group "global_lock" metadata (seqno 15).
Creating logical volume zhx
Creating volume group backup "/etc/lvm/backup/global_lock" (seqno 16).
Activating logical volume global_lock/zhx.
activation/volume_list configuration setting not defined: Checking only host tags for global_lock/zhx.
Creating global_lock-zhx
Loading table for global_lock-zhx (253:9).
Resuming global_lock-zhx (253:9).
/dev/global_lock/zhx: not found: device not cleared
Aborting. Failed to wipe start of new LV.
Removing global_lock-zhx (253:9)
Creating volume group backup "/etc/lvm/backup/global_lock" (seqno 17).
semid 1376258: semop failed for cookie 0xd4d3570: incorrect semaphore state
Failed to set a proper state for notification semaphore identified by cookie value 223163760 (0xd4d3570) to initialize waiting for incoming notifications.
This seems like it could be a problem synchronizing with udev. You might
try adding -Wn -Zn to the lvcreate command to see if that works around the
problem.
Dave
|
This usually happens if the number of actual notifications ( |
If you can reproduce, please, also try switching systemd-udevd into debug mode with:
Then start collecting the journal:
Then try running the lvm commands that fail (with |
Thank you for your answering my questions.
systemd-udevd debug outputs:
But, if i set
I also try excute cmd In addition, a container is running on my host, if i stop this container, lv can be created successfully, and there are no warnings.
|
cmd
|
Thanks for the logs!
We're reusing the same cookie for synchronizing with udev (that's OK), but the counters are wrong and this sequence must have happened:
This is also confirmed by udev logs where we can see:
So at the time the udev on host tries to notify about this uevent, the synchronization cookie is already gone (because of the incorrect counting as noted above). In summary, there must have been the /usr/lib/udev/rules.d/95-dm-notify.rules processed twice for the same uevent. You mentioned the container and that switching it off made the lvcreate working again. So I think this is the usual case where the container tries to incorrectly react to uevents and so we end up processing uevents/udev rules in both the host and the container for a single uevent - that should be processed only on host - uevents are global, not namespaced. The container is interfering. |
The container is interfering. Thank you. |
lvm2 does NOT support usage witin containers WITH udev - this is not going to fly. Usage of lvm2 within container requirers serious deep level knowledge about how things works together. Sorry - closing this issue - as there is no good fix - user can play with things like disabling 'udev' for such lvm2 - but this still leave a lot of troubles ahead of such user. |
platform:
Am I missing anything ?
The text was updated successfully, but these errors were encountered: