SMBv3 Mounts and Linux
I noticed that on my Linux media server that my windows mount points were intermittently freezing and dropping the link that my services need to work properly. After spending a long time troubleshooting this issue I have found an unexpected resolution.
This guide will be useful to those that have SMB mounts on a Linux Operating System.
I noticed that my Plex server stopped being able to see content (video files) through my mount points. This problem became intermittent as other mount points continued to work fine then eventually succumb to the issue too. Accessing the Linux machine and doing an
ls on the directory with the mounts points also caused the system to freeze. Sometimes the command would display the contents of the folder after 10mins or so and then the mount points would work again. In most cases I would have to re-establish the mount points by using the
mount -a command. Later on this command would stop being effective in bringing them back however. The symptoms caused a great deal of problem as systems that relied on them saw them drop every 30mins indefinitely because of it.
I found that the issue tied in with the recent security patches applied by Microsoft in March 2017 was actually the root cause of these problems. In fact, the patches meant that the Linux machine had to re-adjust to work with the shares hosted on this windows machine.
In a previous project in which I illustrate how to build a Plex server (found here), I described to build the windows mount point (in the fstab file found
/etc/fstab) as follows:
//servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
To update the mount points with the new configuration I built it as follows:
//servername/sharename /media/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,vers=3.0,sec=ntlmssp 0 2
As you can see the new line now has a new parameter (
vers=3.0). By default, if you do not specify the smb version you will always use version 1. Now using version 3 however you will get around the issues I had been facing for some time. To also improve security further I decided to upgrade a parameter (
sec=ntlmssp) to improve authentication security. Lastly I decided to change the “Pass (fsck order)” parameter from
2 which will prioritize these partitions last during a boot up.
Had I linked the Windows Update install with the issue sooner, I would have resolved the issue much more quickly. Looking back however I can only say you can never underestimate a system update as without proper planning, you can never know what it may break. I hope at least this helps others.
Another problem fixed.
Leave a Reply