[systemd-devel] shutdown umount order

Ilya Basin basinilya at gmail.com
Sat Jan 5 01:33:19 PST 2013


DR> On Sat, Jan 05, 2013 at 02:22:11AM +0400, Ilya Basin wrote:
>> Hi list.
>> On shutdown I have
>>    Buffer I/O error on device dm-...
>> because the truecrypt disk is unmounted later than the usb disk
>> containing the truecrypt image.
>> I think this happens, because
>> 1) systemd can't figure out the correct mount dependencies
>> 2) umount is called with the force flag
>> ---------
>> There are workarounds specially for truecrypt, but why not solve the
>> problem entirely?
>> 
>> 1) I think the mount dependencies can't be made 100% reliable. systemd
>> should use the combination of them and /proc/mounts, but only as a HINT
>> In my case /proc/mounts contains the right order.

DR> No, /proc/mounts does not contain this information. /proc/self/mountinfo
DR> contains sufficient data to reconstruct the mount hierarchy, but still
DR> falls short when you introduce loop devices -- backing files are not
DR> considered anywhere, as you're seeing.
And? systemd should umount the filesystem on a loop device, then
umount force the device with the loop file.
Currently it does it in reverse order.

>> 2) Instead of force umount, systemd should first try to umount
>> everything gracefully, and if at least one mount point was unmounted
>> successfully, then retry.
>> Only if all mounts are busy, systemd should force umount the first
>> candidate and then repeat the graceful umount for others.

DR> MNT_FORCE is only effective with NFS mounts. It has no effect otherwise.
What do you mean?
Anyway, as I said above, if nothing was unmounted gracefully, systemd
can retry with force.



More information about the systemd-devel mailing list