Skip to content

Conversation

RushingAlien
Copy link

Btrfs has an issue where mount can linger after a sudden device disconnect, this is very apparent with USB storage. the psuedo mount option x-systemd.device-bound overrides the default Requires dependency to that of BindsTo which will automatically stop the mount if the device became inactive.

Partly fixes #1359

Please list more filesystems susceptible to lingering mounts in #1359 if you know any so they can be covered as well.

Btrfs has an issue where mount can linger after a sudden device disconnect, this is very apparent with USB storage. the psuedo mount option x-systemd.device-bound overrides the default `Requires` dependency to that of `BindsTo` which will automatically stop the mount if the device became inactive. 

Partly fixes storaged-project#1359

Please list more filesystems susceptible to lingering mounts in storaged-project#1359 so they can be covered as well.
@RushingAlien
Copy link
Author

systemd/systemd#36634 (comment)

Oh perhaps udisks could use systemd-mount --discover probing? It can probe if the backing device is a removable storage, and applies a BindsTo dependency against said backing dev for the mount unit.

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

Successfully merging this pull request may close these issues.

Use BindsTo dependency for mounting Removable storage devices (i.e USB)
1 participant