Allow lazy umount
Created by: bitfehler
Hi there!
I am a big fan of arch-chroot
, and often use it to prepare VM disk images. Through absolutely no fault of arch-chroot
, I often run into this problem:
conrad@tryptophan ~/hack/makeimg $ sudo arch-chroot test ls
[sudo] password for conrad:
bin boot dev etc home lib lib64 lost+found mnt opt proc root run sbin srv sys tmp usr var
umount: /home/conrad/hack/makeimg/test/proc: target is busy.
The command was run, but I am left with the proc
bind-mount still in place. After a long and painful investigation, I am 99% sure that some component of gvfsd
or its ecosystem are to blame (I mostly work in GNOME). I haven't managed to pin-point the exact component, but the error reliably never occurs when I shut down GNOME and work in a plain console session (whereas it occurs >95% of the time when working in GNOME).
I haven't found any reference of people experiencing this exact same issue, but e.g. one person seems to have a very similar problem caused by ksysguard
: https://superuser.com/a/925862 - as such, I am assuming it is not just the absolutely crazy edge case.
One option to "handle" this is lazy unmounting (umount -l
). It reliably works fine for me, and I don't see any super-obvious downsides, but you might know more than I do about that.
So, long story short, would you be willing to accept a patch that allows an option to use lazy unmounting, or even make it the default? If not, I totally understand, it is a bit of an externality, but I would of course be very happy if I could simply use arch-chroot
even when working in GNOME :)
Thanks for all the fish!