This topic describes how to troubleshoot issues that are introduced by soft mounts of NFS file systems on a Windows ECS instance.
- Data inconsistency: An error is returned if a request to access the soft-mounted file system times out. User applications do not get a response from the server, but the server may have already responded to the request. This causes data inconsistency.
- Abnormal exit of applications: An error is returned if a request to access the soft-mounted file system times out. In this case, exceptions may occur if the applications are written in specific programming languages. If the exceptions are not handled, the applications will experience an abnormal exit.
To avoid these issues, you can mount an NFS file system on a Windows ECS instance in the hard mode.
- Run the
mountcommand to view the mount mode.
- If the command output includes mount=soft, perform step 2.
- If the command output includes mount=hard, you do not need to perform the following steps.
- Stop the applications that are using the NFS file system.
- Run the following command to unmount the NFS file system.
You need to replace the drive letter H: with a drive letter specific to your environment.
- Run the following command to remount the NFS file system.
mount -o nolock -o mtype=hard -o timeout=60 \\xxxxxx.cn-hangzhou.nas.aliyuncs.com\! h:
xxxxxx.cn-hangzhou.nas.aliyuncs.com is the endpoint of the mount target. h: is the mounted drive letter. You must replace the endpoint and drive letter based on your business requirements.
- Run the
mountcommand to verify the mount result.The mount is successful if the command output includes mount=hard, locking=no, and timeout=10 (or a number greater than 10).