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
- Unmount the file system if it has been mounted. For details, see Unmount a File System.
- Prepare for the mount by referring to Mounting an NFS File System to ECSs (Linux).
- 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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot