[systemd-devel] umount NFS problem

Mantas Mikulėnas grawity at gmail.com
Fri Apr 5 06:45:39 UTC 2019


On Fri, Apr 5, 2019 at 9:28 AM Harald Dunkel <harald.dunkel at aixigo.de>
wrote:

> Hi folks,
>
> I've got a device-busy-problem with /home, mounted via NFS.
> Shutdown of the host takes more than 180 secs. See attached
> log file.
>
> Apparently the umount of /home at 81925.154995 failed, (device
> busy, in my case it was a lost gpg-agent). This error was
> ignored, the NFS framework was shut down, the network was
> stopped, and then it was too late to properly handle the /home
> mount point.
>
> AFAIK the mount units are generated from /etc/fstab, so I wonder
> if this could be improved?
>

The job order (home.mount vs nfs-client.target) already looks correct, so
fstab options probably won't help much; I'd try to ensure that the umount
doesn't fail in the first place.

Normally I'd expect user sessions (user-*.slice, session-*.scope,
user@*.service)
to be killed before mount units are stopped; I wonder how random gpg-agent
processes have managed to escape that. (Actually, doesn't Debian now manage
gpg-agent via user at .service? That *really* should be cleaning up everything
properly...)

You might also try to enable [Mount] LazyUnmount= for home.mount so that
umounts appear to succeed immediately and the kernel cleans them up when it
can. It mostly just hides the problem though.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190405/c908b250/attachment.html>


More information about the systemd-devel mailing list