You are not logged in.

#1 2018-03-28 14:30:27

FrederickZh
Member
Registered: 2016-12-27
Posts: 14

[Solved] Network drive (CIFS) unmounting times out during shutdown

Hi,

I've configured my laptop to automatically mount the Samba shares over WiFi:

//SmbServer/Backup         /mnt/smb/Backup            cifs    user,uid=1000,gid=1000,rw,noauto,x-systemd.automount,credentials=/usr/local/etc/smb_creds

But if I ever use the drive which triggers it to be actually mounted, there will be an 1.5min delay during shutdown to unmount the drive, which would eventually time out.

I did some research and it seems to be a bug of systemd which causes wireless network connections to be torn down before CIFS devices are unmounted. There are threads stating that this was fixed but regressions somehow also happened from time to time.

I have tried various workarounds and ended up something like

//SmbServer/Backup         /mnt/smb/Backup            cifs    user,uid=1000,gid=1000,rw,noauto,x-systemd.automount,x-systemd.device-timeout=30,x-systemd.wants=network.target,x-systemd.after=network.target,x-systemd.after=wpa_supplicant.service,x-systemd.after=NetworkManager.service,credentials=/usr/local/etc/smb_creds

...but still no luck.

May I know whether there are any solutions to this issue? Thanks.

Last edited by FrederickZh (2018-03-29 03:31:47)

Offline

#2 2018-03-29 03:31:18

FrederickZh
Member
Registered: 2016-12-27
Posts: 14

Re: [Solved] Network drive (CIFS) unmounting times out during shutdown

Ok... it turns out that I was being dumb.

Obviously this function needs a public WiFi profile to operate but I forgot that I unticked the "All users may connect to this network" after the plasma-nm bug was somehow fixed.

Sorry for the noise.

Offline

Board footer

Powered by FluxBB