This topic describes how to troubleshoot and fix issues that may occur when you mount Apsara File Storage NAS file systems.

Mount an NFS file system on an ECS instance running Linux

  • Enable automatic troubleshooting by using a script

    You may fail to mount an NFS file system on an ECS instance running Linux due to several different reasons. You can use the following script to troubleshoot a mount issue and identify the root cause.

    1. Log on to a Linux ECS instance on which you fail to mount a file system.
    2. Use the following commands to download and run the check_alinas_nfs_mount.py script. Then, you can follow instructions provided by the script to fix mount issues.
      wget -N https://code.aliyun.com/nas_team/nas-client-tools/raw/master/linux_client/check_alinas_nfs_mount.py -P /tmp/
      python2.7 /tmp/check_alinas_nfs_mount.py file-system-id.region.nas.aliyuncs.com:/ /mnt

      In the preceding command, file-system-id.region.nas.aliyuncs.com specifies the mount target of the NAS file system, the forward slash (/) following the mount target specifies the root directory of the NAS file system, and /mnt specifies a local mount point that resides on the Linux ECS instance. You need to replace these example parameters based on your business requirements.

      After all issues are fixed, a specific mount command is displayed. A prompt also appears indicating that troubleshooting for the issue is complete.

      Note If several questions appear when the script is running, we recommend that you log to the Alibaba Cloud console and confirm the answers to the questions. After the answer to each question is confirmed, you can click Yes or No to continue running the script and find more issues.
    3. Copy and run the mount command to enable the mount of a file system.
  • Troubleshoot and fix other issues

    Several errors prompted by the mount command cannot be fixed by using the script. You can use the following methods to fix these errors.

    • Failed to mount the subdirectory of a file system

      Error message: mount.nfs: access denied by server while mounting xxxx.nas.aliyuncs.com:/<dir>

      Note If an error message showing "Permission denied" appears, you can use the script to troubleshoot the issue.

      An error occurs when you attempt to mount a subdirectory of a NAS file system on an ECS instance but the subdirectory does not exist. You can first mount the root directory of the NAS file system. After the root directory is mounted, you can create a subdirectory on the NAS file system and mount the subdirectory again.

    • Failed to mount a file system on two instances with duplicate names

      Error message: mount.nfs: Operation not permitted. This error occurs when you mount an NFSv4 file system. However, the mount is successful if the file system complies with NFSv3.

      For several kernel versions of Linux, an error may occur in the following scenario: You attempt to mount an NFSv4 file system on an ECS instance with the same name as that of another ECS instance on which the file system is mounted. You can perform the following steps to fix the error:
      1. Use the following command on the ECS instance on which you fail to mount a file system.
        echo 'install nfs /sbin/modprobe --ignore-install nfs nfs4_unique_id=`cat /sys/class/dmi/id/product_uuid`' >> /etc/modprobe.d/nfs.conf
      2. Restart the ECS instance during off-peak hours.

        You can also unmount all available NFS file systems and use the rmmod command to uninstall the nfsv4 and nfs kernel modules.

      3. Re-mount the NFS file system.

Mount an SMB file system on an ECS instance running Windows

  • Enable automatic troubleshooting by using a script

    You may fail to mount an SMB file system on an ECS instance running Windows due to several different reasons. You can use the following script to troubleshoot a mount issue and find the root cause.

    1. Log on to a Windows ECS instance on which you fail to mount a file system.
    2. Use the following commands to download and run the check_alinas_nfs_mount.py script. Then, you can follow instructions provided by the script to fix mount issues.
      wget https://code.aliyun.com/nas_team/nas-client-tools/raw/master/windows_client/alinas_smb_windows_inspection.ps1 -OutFile alinas_smb_windows_inspection.ps1
      .\alinas_smb_windows_inspection.ps1 -MountAddress abcde-123.region-id.nas.aliyuncs.com -Locale zh-CN

      In the preceding command, abcde-123.region-id.nas.aliyuncs.com specifies the domain name of a mount target. You need to replace the domain name with a domain name that is specific to your environment.

  • Troubleshoot and fix other issues

    For more information about how to troubleshoot and fix issues that occur when you mount a file system on a Windows ECS instance, see Resolve failure to mount an SMB file system on a Windows ECS instance. You can find the corresponding solution to each error code.

Mount an SMB file system on an ECS instance running Linux

Apsara File Storage NAS allows you to mount an SMB file system on a Linux ECS instance. If you fail to mount an SMB file system, see Troubleshoot issues when you access an SMB file system from a Linux ECS instance.