Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd automount – access to parent mount directory hangs!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Atha
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 164

PostPosted: Tue Dec 09, 2014 7:35 pm    Post subject: systemd automount – access to parent mount directory hangs! Reply with quote

Hello!

I’ve done the switch to systemd quite a while ago and I’m very happy with it. The system now boots tangibly faster and also the shutdown is almost instant compared to as it was with openrc. But that is not the point.

The point is, I’ve gotten myself a NAS. I configured it to provide NFS shares. I wanted to automount those on my system in a newly created folder /nfs.
/etc/fstab:
DiskStation:/volume1/music              /nfs/music                      nfs     users,noauto,nofail,x-systemd.automount,x-systemd.device-timeout=10s,timeo=30,intr,noatime,nolock,posix,user    0 0


So, the problem is, that with the NAS up and running everything is fine. /nfs/music and all other /nfs/… will mount and the system functions as desired (automount).
BUT… with the NAS being unreachable (for example when the laptop is away from the home network) plasma-desktop will be the first application to crash. I can then only manually unmount every /nfs/… folder AND kill plasma-desktop and restart it (or stop/start kdm.service) for the system to be usable again.

So, to make it short:
  • I cannot use net-fs/autofs as it is for non-systemd only (like openrc).
  • While all NFS shares from my /etc/fstab are reachable, everything works.
  • When only one single NFS share from /etc/fstab is not reachable, any application trying to access /nfs will hang forever. This includes a simple "ls" in /nfs as well as bash completion when hitting "umount -l /nfs/[tab]" as well as important software like KDE itself (plasma-desktop) which completely hangs forever or a save file dialog from firefox or… presumably anything accessing /nfs!
  • I already tried mount option "soft" with no effect.


I followed this guide: ArchWiki: NFS, Mount using /etc/fstab with systemd

My question now is, how to use the systemd automount feature as intended without having every application hang when the shares are not available.

Thanks in advance,
Atha
Back to top
View user's profile Send private message
Atha
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 164

PostPosted: Wed Dec 10, 2014 10:11 pm    Post subject: Some more information… Reply with quote

When KDE starts, at first there are mounts as follows:
mount:
systemd-1 on /nfs/music type autofs (rw,relatime,fd=25,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)

During the process of the desktop being loaded however, addtional mounts appear:
mount:
DiskStation:/volume1/music on /nfs/music type nfs (rw,nosuid,nodev,noexec,noatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,posix,nolock,proto=tcp,timeo=30,retrans=2,sec=sys,mountaddr=192.168.1.2,mountvers=3,mountport=892,mountproto=udp,local_lock=all,addr=192.168.1.2)


And this also happens if one or all of these shares are not reachable.

I don't seem to understand the way systemd does this, but it makes no sense to me to mount it when it actually is unreachable.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum