Help Center> Scalable File Service> FAQs> Networks> What Can I Do If the Data of the File System That Is Mounted to Two Servers Is Not Synchronized?
Updated on 2023-07-26 GMT+08:00

What Can I Do If the Data of the File System That Is Mounted to Two Servers Is Not Synchronized?

Symptom

When file system C is mounted to both server A and server B, there is a delay in synchronizing the file to server B after it is uploaded to server A. However, there is no delay when the file is uploaded to server B separately.

Fault Diagnosis

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.

Solution

  1. Unmount the file system if it has been mounted. For details, seeUnmounting a File System.
  2. Prepare for the mount by referring to Mounting an NFS File System to ECSs.
  3. Run the following command to mount the file system:

    mount -t nfs -o vers=3,timeo=600,noac,lookupcache=none,noresvport,nolock Shared path Local path

Networks FAQs

more