The Problem
I have a directory that is shared by a Windows Server 2012 R2. Some Linux clients (Ubuntu 14.04) mount this share via /etc/fstab
:
//10.1.1.1/MyShare /mnt/myshare cifs rw,nounix,noserverino,sec=ntlm,_netdev,iocharset=utf8,user=myuser,password=mypassword,uid=1000,gid=1000 0 0
Although working perfectly for some time, every now and then (e.g., after 1-2 hours) the mount becomes inaccessible and all processes using (or trying to access) it hang for about 5 minutes. After that, normal operation continues again for a few hours when it hangs again. Windows clients can access the share without any problem.
Before migrating to Windows Server 2012 R2, the directory was shared by a Windows 7 VM running on a Windows Server 2008. This worked perfectly fine (for the same Linux client configuration).
I can see four possible causes for the malfunction:
- Bug in Windows Server 2012 R2
- Bug in cifs-utils
- Network/hardware problems (unlikely because no problems with Windows clients)
- Wrong configuration of sharing/mounting
The Question
The purpose of this question is basically to eliminate the possibility of wrong server or client configuration by asking how the correct/optimal setup should look like. Of course, any other hint is welcome, too.
1. Linux Side
What mount.cifs options should I use to mount a Windows Server 2012 R2 Share in Linux (via fstab)?
E.g., what about the optimal values for vers
, sec
, iocharset
, etc? Should I use nounix
or noserverino
or any other parameters?
Authentication is done using a local user on the Windows Server, so the Acitve Directory/domain should not be involved.
CIFS Version 2.02
$ mount.cifs -V
mount.cifs version: 6.0
$ cat /proc/version
Linux version 3.13.0-45-generic (buildd@phianna) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #74-Ubuntu SMP Tue Jan 13 19:36:28 UTC 2015
2. Windows Side
Are there any special settings on the Windows Server side to improve the Windows/Linux interoperability?
@mods: Please do not migrate this to Unix & Linux because I had already posted it there 3 months ago (and deleted it now as no one has posted an answer).