-
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
libdevmapper: Unlink the symlinks under /dev/mapper
before destroying a device
#66
Comments
lvm2 has nothing to do (nowadays) with content of /dev directory. It's fully managed by udev. And yes - relying on udev IS racy by design - user needs to use other synchronization methods - aka in term of Lvm2 usage - open devices after they are activated and do not try to access them before you deactivate them (you cannot deactivate device in use). Close as this is currently compliant with existing design. |
Before destroying a device-mapper device, libdevmapper should delete the symlink for that device under
/dev/mapper
. This avoids race conditions by ensuring that opening/dev/mapper/somedevice
always returns the correct device if it succeeds, even if the major and minor number of the block device are later reused. Relying on udev for this is racy, since udev will not delete the symlink until after the device has been destroyed.The text was updated successfully, but these errors were encountered: