I have a problem with a bunch of CIFS mounts that look like this:
//192.168.10.2/remote-share /home/windows-shared/remote-share cifs defaults,user=xxx,password=xxx,uid=603,gid=603 0 0
This issue occurs after a while, usually after a day when the users boot their machines in the morning and their shares don't work remotely any more.
So when I try to do a ls
I get this:
ls: cannot access /home/windows-shared/remote-share: Host is down
I get nothing related in dmesg
. The problem with this is that now any read call to this part of the system just hangs so as a solution I would rather have a faster error rather than hanging indefinitely.
After reading a bit the man page of mount.cifs
it appears that by default every mount is soft
meaning that it would timeout eventually. The problem is that it takes a way too long to timeout.
Update:
Adding these parameters to the mount command didn't help either:
soft,timeo=300,retrans=3