Tag: samba

Mount SMB3 in Linux

Mount SMB3 in Linux

Install package

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

Add into /etc/fstab

  • Create credentials file /etc/smbcredentials
username=user
password=password
domain=domain
  • Update mode
chown root:root /etc/smbcredentials
chmod 600 /etc/smbcredentials
  • Update /etc/fstab
//server/share_name  /mnt/smbshare  cifs  credentials=/etc/smbcredentials,vers=3.0,file_mode=0755,dir_mode=0755 0       0

References

How to Mount Windows Share on Linux using CIFS

Network filesystem timeout settings

Network filesystem timeout settings

Network disruptions are always happening, network filesystems on different OS have different behaviors.

NFS

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.

iSCSI

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.

References

What are the differences between hard mount and soft mount?