You are not logged in.
Hi,
I have a share mounted in fstab with cifs which works fine. I have used it on other distros but on Arch it results in a 1 1/2 minute job every time I shut down. I have to sit and watch it count down. There's also a job running a boot, but it doesn't take very long. I assume it waits for my network to come up (wifi through network manager) and also that the delay in shutdown is systemd related since the other distros I have used this mount with are not systemd. Anyway, is there a way to prevent this delay?
Offline
Try using systemd's automount feature. It seems another user experienced the same problem and fixed it that way. See the last post in this thread:
https://bbs.archlinux.org/viewtopic.php … 9#p1338249
Last edited by Pse (2014-08-12 21:23:24)
Offline
Try using systemd's automount feature. It seems another user experienced the same problem and fixed it that way. See the last post in this thread:
I've read that thread, thanks. I am using automount and that takes care of the delay I had during boot but not the 90 second timeout when shutting down. The timeout only happens when I'm on wi-fi. When on a wired connection I shutdown clean. My fstab entry:
//10.0.0.1/Media /home/<user>/Media cifs x-systemd.automount,_netdev,<credentials>,iocharset=utf8,domain=WORKGROUP 0 0
Last edited by cdysthe (2014-08-13 12:54:15)
Offline
Have a look at https://bbs.archlinux.org/viewtopic.php?id=180577
Offline
//10.0.0.1/Media /home/<user>/Media cifs x-systemd.automount,_netdev,<credentials>,iocharset=utf8,domain=WORKGROUP 0 0
AFAIK, for systemd's automount feature to work you also need to add 'noauto' to the list of options. Otherwise the filesystem will get mounted on boot (regardless of the x-systemd.automount option). See the list of options in the thread I mentioned in my previous post.
Last edited by Pse (2014-08-13 00:23:01)
Offline
I tried a new approach. I created my own mount units the systemd way but putting them in /etc/systemd/system They work great, but I am still getting the 90 second timeout when rebooting for some reason although I can now see that the network is taken down after the umount of the cifs share. The two mount units looks like this:
/etc/systemd/system/home-<user>-media.automount :
[Unit]
Description=Mount Media Server
Require=network.target
After=network.target
[Automount]
Where=/home/<user>/Media
[Install]
WantedBy=multi-user.target
/etc/systemd/system/home-<user>-media.mount :
[Unit]
Description=Mount Media Server
Require=network.target
After=network.target
[Mount]
What=//10.0.0.1/Media
Where=/home/<user>/Media
Type=cifs
Options=<login credentials>,rw,iocharset=utf8,uid=500,gid=500,_netdev,x-systemd.automount
They are activated with the appropriate systemctl commands and they mount the share fine during boot. During shutdown I can see that the network is still up (wi-fi conection set up with Network Manager) when umount is initiated but I am still getting a 90 seconds timeout for the cifs share.
Wnen I'm on a wired connection there's never a timeout, so this only happens for a wi-fi connections. Ideas anyone?
Offline
Did you try adding the 'noauto' option?
Offline
Did you try adding the 'noauto' option?
I have tried that also, It doesn't help. In fact I think this has to do with network-manager somehow. If I'm on a wired connection shutdown is clean, but when on wi-fi set up with network-manager I'm having this problem regardless of whether the mount is set up in fstab or in a unit.
Last edited by cdysthe (2014-08-13 19:22:41)
Offline
As was described in the topic linked by me, you can use networkmanager's dispatcher to unmount shares when the connection goes down.
Offline
As was described in the topic linked by me, you can use networkmanager's dispatcher to unmount shares when the connection goes down.
I have tried but I can't get it to work. I will look at that some more since it seems to be the only option left (except for ditching systemd).
Offline
lucke wrote:As was described in the topic linked by me, you can use networkmanager's dispatcher to unmount shares when the connection goes down.
I have tried but I can't get it to work. I will look at that some more since it seems to be the only option left (except for ditching systemd).
Please share some information if you managed to get it to work.
I'm experiencing the same problem (on WiFi), shutdown is delayed for 90 seconds because of a mounted cifs share. This is my fstab line:
//nas/share /media/nas cifs noauto,x-systemd.automount,guest,uid=1000,gid=1001,iocharset=utf8 0 0
I've also tried with auto instead of noauto.
Last edited by slovdahl (2014-10-15 17:49:30)
Offline