-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
blkdiscard should require exclusive access to device? #915
Comments
@lczerner any objection to add O_EXCL to open() for the ioctl? |
This sounds fine, but it would be nice to have an option to override it as well. |
OK, it's too late for v2.35; O_EXCL and --force (to override) will be available in v2.36. Thanks. |
karelzak
added a commit
that referenced
this issue
Jan 9, 2020
Let's make it more robust and safe. O_EXCL is an elegant way how to avoid unwanted discard on mounted device. Addresses: #915 Signed-off-by: Karel Zak <kzak@redhat.com>
karelzak
added a commit
that referenced
this issue
Jan 23, 2020
Let's make it more robust and safe. O_EXCL is an elegant way how to avoid unwanted discard on mounted device. Addresses: #915 Signed-off-by: Karel Zak <kzak@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
After an unfortunate incident on one of our systems (dropped data using blkdiscard due to a typo), I was wondering if this tool should not check that the device is not used.
Most utils that work with block devices require this. (Including device-mapper, md raid, lvm, mount etc.). umount of mountpoint that is merely used by a single console will fail but the system will allow you to discard the whole drive the system is running on.
Thanks for comments.
Jiri
The text was updated successfully, but these errors were encountered: