Hello,
For background information, I am running opensuse 13.1 KDE and have a NAS on my home network which I mount through fstab using
//snoeg-nas/Multimedia /mnt/snoeg-nas/Multimedia cifs user,credentials=/etc/auto.smb.snoeg-nas,_netdev,soft,comment=systemd.automount,uid=1000,gid=100,workgroup=allinux,ip=192.168.1.250 0 0
I have also auto mounted the NAS with autofs (forum link) but prefer fstab because KDE seems to have a few issues with autofs mounts i.e. Dolphin’s places panel refreshes continiously. I did think Autofs was the prefered method of mounting a NAS as it could auto mount all the NAS folders with a simple script.
So, mounting the NAS and permissions is not an issue. The issue is unmounting the NAS on a network connection loss i.e. when the NAS is switched off. I think this is described in a KDE bug 184062 or perhaps I have the wrong bug? Anyway, I would like to specify a short systemd timeout time of say 10 seconds.
Is there some way to add a short timeout to the fstab line which would deal with a network connection loss?
Thank you.
I am now checking out a different fstab line; I’m trying to gain an understanding of systemd’s “WatchdogSec=” service and so have replaced “comment=systemd.automount” with “x-systemd.automount,x-systemd.device-WatchdogSec=10”.
//snoeg-nas/Multimedia /mnt/snoeg-nas/Multimedia cifs user,credentials=/etc/auto.smb.snoeg-nas,_netdev,soft,x-systemd.automount,x-systemd.device-WatchdogSec=10,uid=1000,gid=100,workgroup=allinux,ip=192.168.1.250 0 0
My first observation is that this is an improvement over the previous fstab line and even the autofs method. But the timeoute on a connection loss i.e. when the NAS switched off doesnt quite work as intended.
The only change made to the fstab line was including “noauto”; this merely made the NAS mount on first access instead of earlier in the boot cycle, _netdev is suppose to delay the mount until the network is up. Not sure this is working with KDE’s plasma network manager.
//snoeg-nas/Multimedia /mnt/snoeg-nas/Multimedia cifs noauto,user,credentials=/etc/auto.smb.snoeg-nas,_netdev,soft,x-systemd.automount,x-systemd.device-WatchdogSec=10,uid=1000,gid=100,workgroup=allinux,ip=192.168.1.250 0 0
As for the Dolphin side panel constantly refreshing; this is a Nepomuk bug (OS 13.1 KDE 4.11.5); to get rid of this I had to stop indexing the NAS.
I have not been able to resolved the long timeout issue for the NAS on connection loss; this still causes plasma, dolphin and GTK app (i.e. LibreOffice 4.2.4) hangs.
I think this (LINK) may provide the solution to when the NAS is unavailable. Now to get an understanding of cron jobs…
In the back of my mind I still think a custom “network.service” file will be a better implementation… there are moments I wish I was an IT professional so I could implement these basic solutions…