Bug 24279 - Handling devices in use disappearing
Summary: Handling devices in use disappearing
Status: RESOLVED FIXED
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-02 10:14 UTC by David Zeuthen (not reading bugmail)
Modified: 2012-09-28 15:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description David Zeuthen (not reading bugmail) 2009-10-02 10:14:42 UTC
Some times devices disappear when they are still in use (e.g. mounted, part of an array, LUKS partition that is set-up). This can happen because users yank the device or the device fails.

Right now we have some code for dealing with these situations but the code is not very robust and it would probably be best to just leave that task to the kernel where it belongs.

This bug is for discussing how to best handle this.
Comment 1 David Zeuthen (not reading bugmail) 2009-10-23 15:06:34 UTC
Bug 24708 is related to this.
Comment 2 David Zeuthen (not reading bugmail) 2009-10-23 15:22:04 UTC
I talked to Kay about this some time ago and we ended up with something like this

First, we can't really make the kernel be super clever about these things; while the status quo is decidedly broken for desktop workloads there are other (server) workloads where this degree of "policy" (e.g. auto-unmounting, auto-teardown) is unwanted. Mostly due to cascading effects, making things harder to debug and, well, the status quo.

Second, we want to do the right thing for devices set up via DeviceKit-disks.

Third, we want to make it possible for admins for "the right thing" to happen even for devices not set up via DeviceKit-disks. This should be achieved by having a DKD_CLEANUP udev property that admins can set to 1 on a per-device basis.

Now, "the right thing" includes

 1. force/lazy unmounting filesystems when the device goes away

   - this includes things mounted via /etc/fstab through
     FilesystemMount() which we don't do right now (bug 24708)

 2. force removal of MD RAID components when the component device goes
    away

 3. force shutdown of a MD RAID array when an insufficient number of
    components are available

 4. ditto for device-mapper - right now only dm-crypt/LUKS use cases
    are interesting but eventually we want to support LVM2 (bug 24599)

 5. ditto for other things
Comment 3 David Zeuthen (not reading bugmail) 2012-09-28 15:07:50 UTC
These days udisks handles this by only tearing down stuff (mounts, crypto) set up via udisks and this seems to work fine. Closing.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.