Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
Have you tried using timeo=n and retrans=m to shorten the timeout interval? –  MadHatter Mar 12 at 9:41
    
@MadHatter Trying it now. I'll see if this works. Thanks. –  Alexandru Plugaru Mar 12 at 9:52
    
@MadHatter adding those params doesn't really change anything –  Alexandru Plugaru Mar 13 at 9:22
    
What do you mean by "doesn't change anything"; could you be a bit more quantitative, and maybe descriptive, too? –  MadHatter Mar 13 at 14:05
    
@MadHatter by doesn't change anything I mean that the changes you suggested didn't improve the situation. I specify, adding those parameters didn't improve or worsen the issue. Any file call still hangs the process. –  Alexandru Plugaru Mar 13 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.