A file system was mounted to two servers. There was a delay in synchronizing files from one server to another. However, there was no delay when files were uploaded to a server.
Add noac, lookupcache=none to the mount command.
The noac option disables file attribute caching and forces write synchronization. By default, an NFS client's file attribute information is cached using the ac option to improve performance, and the client checks file attribute information periodically and updates it if there are any changes. Within the cache validity period, the client does not check whether file attribute information on the server is changed. By default, the value of this option is ac. Set it to noac.
The lookupcache option is related to directory entry caching, and the value can be all, none, pos, or positive. With lookupcache=none, the client neither trust the positive nor negative lookup results. In this way, lookup caching is disabled.
mount -t nfs -o vers=3,timeo=600,noac,lookupcache=none,noresvport,nolock Shared path Local path