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

Mount an NFS file system on an ECS Linux instance

  • Use script to troubleshoot issues
    If you fail to mount an NFS file system on an ECS Linux instance, perform the following steps to identify the potential causes of failure:
    1. Log on to the ECS Linux instance.
    2. Run the following commands to download and run the check_alinas_nfs_mount.py script. Then, check whether the returned configurations are valid.
      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 (/) next to the mount target specifies the root directory of the NAS file system. /mnt specifies a local mount point on the ECS Linux instance. You need to replace these example parameters with actual values.

      After you modify the mount configurations, the script returns a mount command, and a message appears. This indicates that the automatic check is complete.

    3. Copy and run the mount command to mount the file system, and then check the result.
  • Troubleshoot common errors

    If you cannot run the preceding script to automatically fix some mount issues, you can manually fix these issues.

    • Failed to mount a subdirectory of the file system

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

      This error may occur when you mount a non-existent subdirectory of the NAS file system on an ECS instance. To fix this error, you can first mount the root directory of the NAS file system. After the root directory is mounted, you can create a subdirectory for the NAS file system and mount the subdirectory.

    • Failed to mount a file system on two ECS instances that have the same names

      This error may occur when you use the NFSv4.0 protocol to mount a file system on two ECS instances that have the same names. The error message is mount.nfs: Operation not permitted or mount.nfs: an incorrect mount option was specified. However, when you use NFSv3, you can mount a file system on these two ECS instances.

      For some kernel versions of Linux, an error occurs. For example, you attempt to mount an NFSv4 file system on an ECS instance that has the same name as another ECS instance. However, this also requires that the same file system has been mounted on this instance. To fix this error, you can perform the following steps:
      1. Run the following command on the ECS instance. This applies to the file system that failed to be mounted.
        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 manually unmount all NFS file systems from the ECS instance and run the rmmod command to uninstall NFSv4.0 clients and NFS kernel modules.

      3. Remount the NFS file system. For more information, see Mount an NFS file system.

Mount an SMB file system on an ECS Windows instance

  • Use script to troubleshoot issues

    If you fail to mount an NFS file system on an ECS Windows instance, perform the following steps to identify the potential causes of failure:

    1. Log on to the ECS Windows instance.
    2. Run the following commands in PowerShell or PowerShell ISE. This can be used to download and run the alinas_smb_windows_inspection.ps1 script. Then, perform the steps that are provided in the script.
      Invoke-WebRequest 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 mount target. You need to replace it with the actual mount target.

  • Troubleshoot common errors

    For more information about errors and solutions, see Troubleshoot SMB mount failures. You can find solutions based on error codes.

Mount an SMB file system on an ECS Linux instance

Apsara File Storage NAS allows you to mount SMB file systems on ECS Linux instances. For more information about errors and solutions, see Troubleshoot issues that may occur when you access an SMB file system from a Linux ECS instance.