I have a dataset on my NAS (TrueNAS) which I share to a Linux system via NFS (v4) and my Windows PC via SMB (v3). This works fine, however when I change a file on my PC it takes between 20 seconds up to 2 minutes for it to appear on my Linux server where it has to be instant for my purpose. It does, however, updates immediately on the NAS. Using CIFS on my Linux server is not desirable.
Command I use for mounting on Linux:
sudo mount -t nfs xxx.xxx.xx.x:/mnt/storage1/data /mnt/data Please note that while the option lookupcache=none may improve things it is not a good solution for my use case as this slows everything down so much I rather wait for the 2min sync.
Does anyone has any suggestions on how to improve this?
EDIT:
Output of mount on the linux client:
xxx.xxx.xx.x:/mnt/storage1/data on /mnt/data type nfs4 (rw,relatime,sync,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=xxx.xxx.xx.xx,local_lock=none,addr=xxx.xxx.xx.x) Output of cat /etc/*release* on linux client:
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04.3 LTS" PRETTY_NAME="Ubuntu 24.04.3 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo (Relevant) Output of mount on TrueNAS:
storage1/data on /mnt/storage1/data type zfs (rw,noatime,xattr,posixacl,casesensitive) Output of cat /etc/*release* on TrueNAS:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" exportfs -s TrueNAS:
/mnt/storage1/data *(sync,wdelay,hide,no_subtree_check,anonuid=3000,anongid=3000,sec=sys,rw,secure,root_squash,all_squash)
nfs-server; you have a linux server as an nfs-client which is then also runningsamba-serverthat allows for modification of the share coming from the TrueNAS to be read/written from a windowsPC ?asyncbeing present as the mount option of the Linux nfs-client / samba-server; if so I think changing that tosyncmight fix it; you would find that happening via runningmounton the nfs-client and see what that reports for mount optionscat /etc/*release*; same for the TrueNas andexportfs -sif you can get a linux terminal in thatiotop) rather than local caching.