All Products
Search
Document Center

Apsara File Storage NAS:Mount an NFS file system on an ECS instance by using the NAS console

Last Updated:Apr 19, 2024

You can mount a Network File System (NFS) file system on a Linux Elastic Compute Service (ECS) instance by using the Apsara File Storage NAS (NAS) console. The file system and the ECS instance must reside in the same virtual private cloud (VPC).

Prerequisites

Limits

  • Operating system

    You can mount a NAS file system only on an ECS instance that runs Linux. Linux distributions such as CoreOS, FreeBSD, and Fedora CoreOS do not support the mount feature of the NAS console. Before you can mount your file system on an ECS instance that runs Red Hat Enterprise Linux (RHEL), you must install Cloud Assistant Agent by using the RPM package. For more information, see Install Cloud Assistant Agent on a Linux instance by using RPM packages.

  • Network type

    • ECS instances that reside in the classic network are not supported.

    • Mount targets that reside in the classic network are not supported.

  • Status

    The ECS instance must be in the Running state.

  • Protocol type

    Only the NFS protocol is supported in this scenario.

Procedure

  1. Log on to the NAS console.

  2. In the left-side navigation pane, choose File System > File System List.

  3. In the top navigation bar, select a region.

  4. On the File System List page, find the NAS file system that you want to mount and click Mount in the Mount File System on ECS Instance column.

  5. In the Mount panel, perform the configurations to mount the file system.

    1. Select a mount target and click Next.

    2. Select an ECS instance and click Next.

      The selected ECS instance must reside in the same VPC as the file system. Otherwise, NAS prompts that the network may be disconnected. Proceed with caution.

      Note
    3. Mount the file system on the ECS instance.

      Parameter

      Description

      Mount Path

      The local directory on which you want to mount the file system. The local directory resides on the Linux ECS instance.

      Automatic Mount

      By default, Automatic Mount at Startup is selected. When you restart the ECS instance, you do not need to re-mount the file system.

      Protocol Type

      Select the protocol type of the file system.

      • General-purpose NAS file systems support NFSv3 and NFSv4.0. If you do not need to modify the same NAS file on multiple ECS instances at a time, we recommend that you select NFSv3 to ensure optimal performance.

      • Extreme NAS file systems support only NFSv3.

      NAS Directory

      The directory of the NAS file system.

      You can enter the root directory / or a subdirectory, for example, /abc.

      Note

      If the directory does not exist, you can select Confirm New Directory to create a directory in the file system. In addition, you must configure the user identifier (UID), group identifier (GID), and POSIX permissions for creating the directory. Otherwise, the default values and default permissions are used to create the directory.

      Mount Parameters

      We recommend that you use the default mount parameters. For more information, see the mount parameters described in Mount an NFS file system on a Linux ECS instance.

  6. Click Mount.

    The mount takes about 1 to 2 minutes. If the mount status is Mounted, the NAS file system is mounted on the ECS instance. In this case, you can log on to the ECS instance on which the NAS file system is mounted to access the file system.

    If the mount status is Failed, you can use the troubleshooting tool to troubleshoot the issue. For more information, see Mount an NFS file system on a Linux ECS instance.

What to do next

Query the mount status of an ECS instance

  1. Click the file system to go to the file system details page.

  2. Click Mount Targets to go to the mount target list.

  3. Find the mount target and click Mount in the Actions column. In the Mount panel, find the ECS instance and click Query Mount Details in the Actions column.

  4. On the page that appears, view the details and mount configurations of the ECS instance.

Unmount a file system

You can use one of the following methods to unmount a file system from an ECS instance in the NAS console.

  • On the File System List page

    1. Choose image.png > Unmount in the Actions column of the file system.

    2. In the Unmount panel, perform the configurations to unmount the file system.

      1. Select the mount target and click Next.

      2. Select the ECS instance from which you want to unmount the file system and click Next.

      3. Select the unmount directory and click Unmount.

  • On the Mount Targets tab

    1. On the Mount Targets tab, find the mount target and click Unmount in the Actions column.

    2. In the Unmount panel, perform the configurations to unmount the file system.

      1. Select the ECS instance from which you want to unmount the file system and click Next.

      2. Select the unmount directory and click Unmount.

References

FAQ

For more information about mounting-related issues, see FAQ about mounting.