[CentOS] systemd automount of cifs share hangs

Sun Oct 21 20:12:24 UTC 2018
Young, Gregory <gregory.young at solarwinds.com>

*** This response is my personal opinion and may not reflect that of my employer. ***

I have never used the .automount file.... I have the .mount file configured for various SAMBA shares, and I simply issued "systemctl enable share-x-y-z.mount" to get them to mount on boot.

Greg


-----Original Message-----
From: CentOS <centos-bounces at centos.org> On Behalf Of Kenneth Porter
Sent: October 19, 2018 3:39 PM
To: CentOS mailing list <centos at centos.org>
Subject: [CentOS] systemd automount of cifs share hangs

Running latest CentOS 7.5. Since I found out about automount unit files I've had mixed results using them to mount shares from my NAS. Lately they seem to hang if I touch the mount point, but I can start the mount unit without problems. I had it working months ago, so I'm thinking something changed in the systemd updates.

For each mount point, I have two files in /etc/systemd/system named with the path of the mount point and with extensions .automount and .mount, following the systemd documentation. For example, srv-dav-name1.mount and srv-dav-name1.automount to mount a NAS share to /srv/dav/name1. I can issue "systemctl start srv-dav-name1.mount" and the mount completes instantly. 
But if I start the automount unit and ls the mount point, the shell hangs and eventually, a long time later (I haven't timed it, maybe an hour), I eventually get a prompt again. Control-C won't interrupt it. I can still ssh in and get another session so it's just the process that's accessing the mount point that hangs.

Any suggestions on how I can debug this? I'm still new to finding the right log files. /var/log/messages doesn't show any errors like timeouts. 
_______________________________________________
CentOS mailing list
CentOS at centos.org
https://lists.centos.org/mailman/listinfo/centos