Mount SMB3 in Linux
sudo apt install cifs-utils
Mount from command line
sudo mount -t cifs //192.168.1.100/Movies /mnt/Media vers=3.0,credentials=/etc/smbcredentials,uid=111,gid=1000,pass=PASSWORD
- Create credentials file
chown root:root /etc/smbcredentials
chmod 600 /etc/smbcredentials
//server/share_name /mnt/smbshare cifs credentials=/etc/smbcredentials,vers=3.0,file_mode=0755,dir_mode=0755 0 0
How to Mount Windows Share on Linux using CIFS
Network filesystem timeout settings
Network disruptions are always happening, network filesystems on different OS have different behaviors.
During Synology disk migration and SSD cache reconfiguration, my Fedora 34 on iSCSI mounted NFS disk kept hanging, I checked the default NFS mount options, then found that it was using
hard option with out
intr as below,
192.168.1.10:/volume1/kvm on /kvm type nfs4 (rw,nosuid,nodev,noexec,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.9,local_lock=none,addr=192.168.1.10)
I think maybe this is giving the factor of hanging.
After I changed NFS setting to
soft, I suddenly realized that my iSCSI used by Fedora OS might not able to handle interupt as well, not sure whether iSCSI got similar options.
Samba on MacOS
My MacOS also got issue on samba filesystem, always disconnected after communication dropped, but my Windows machine has no such issue.
What are the differences between hard mount and soft mount?