All Products
Search
Document Center

File Storage NAS:Mount an NFS file system in the NAS console

Last Updated:Dec 19, 2024

To quickly deploy storage resources, you can mount a Network File System (NFS) file system on a Linux Elastic Compute Service (ECS) instance in the 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

    Only Linux ECS instances are supported in this scenario. 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.

Mount a file system

  1. Log on to the NAS console.

  2. Go to the File System List page. In the top navigation bar, select the region in which your file system resides.

  3. Find your file system and click Mount in the Actions column.

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

      Enter a local path of the Linux ECS instance on which you want to mount the file system. Use an absolute path that starts with a forward slash (/). Example: /mnt. If you specify a subdirectory that does not exist, the system automatically creates the subdirectory.

      Note

      We recommend that you specify an empty directory. After a NAS file system is mounted on an ECS instance, the data of the NAS file system is displayed in the mount directory of the ECS instance. If the mount directory is not empty, the local data on the ECS instance is temporarily invisible.

      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 obtain optimal performance.

      • Extreme NAS file systems support only NFSv3.

      NAS Directory

      The directory of the NAS file system.

      • General-purpose NAS file systems: 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 the directory. Otherwise, the default values and default permissions are used to create the directory.

      • Extreme NAS file systems: By default, the root directory / is mounted to the /share directory. If you specify a subdirectory such as /subdir, the subdirectory is mounted to the /share/subdir subdirectory. If you specify a subdirectory that does not exist, the system automatically creates the subdirectory.

      UID

      The ID of the user that owns the NAS directory. If you do not configure this parameter, the default value 0 is used, which indicates the ID of the root user.

      Note

      This parameter is required only when the NAS directory is a new directory.

      GID

      The ID of the user group that owns the NAS directory. If you do not configure this parameter, the default value 0 is used, which indicates the ID of the root user group.

      Note

      This parameter is required only when the NAS directory is a new directory.

      POSIX Permissions

      The permissions on the NAS directory. If you do not configure this parameter, the default value 0755 is used.

      Note

      This parameter is required only when the NAS directory is a new 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.

  5. Click Complete. The mount takes about 1 to 2 minutes.

Query the mount status of an ECS instance

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

  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.

FAQ

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

References