This topic describes how to troubleshoot issues about soft mounts of a Network File System (NFS) file system on a Windows Elastic Compute Service (ECS) instance.

Symptom

An NFS file system is soft mounted on a Windows ECS instance by default. However, in some scenarios, soft mounts result in data inconsistency or unexpected application exits. However, soft mounts may result in data inconsistency or unexpected application exits.
  • Data inconsistency: An application sends an ECS instance a request to write data to a soft-mounted file system. If the application does not receive a response from the instance before the request times out, an error is returned even if data is written to the file system. This causes data inconsistency. Data inconsistency may occur when the application does not receive a response from the server, but the ECS instance may have responded to the request.
  • Unexpected application exits: An application sends an ECS instance a request to access a soft-mounted file system. If the application does not receive a response from the instance before the request times out, an error is returned. In this case, if the application is written in a specific programming language, an exception is thrown. If the exception is not handled, the application exits. An exception is thrown when the application is written in a specific programming language. In this case, an unexpected exit occurs.

Solutions

To avoid these issues, hard mount the NFS file system on the Windows ECS instance.

  1. Run the mount command to view the mount mode.
    • If the command output includes mount=soft, go to step 2.
    • If the command output includes mount=hard, you do not need to perform the following steps.
  2. Stop the application that is using the NFS file system.
  3. Run the following command to unmount the NFS file system:
    umount H:

    Replace the drive letter H: based on your business requirements.

  4. 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:

    Replace the mount target address xxxxxx.cn-hangzhou.nas.aliyuncs.com and the drive letter h: based on your business requirements.

  5. Run the mount command 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).