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
An NFS file system is created. For more information, see Create a file system.
A mount target is created. For more information, see Create a mount target.
A Linux ECS instance is purchased in the region where the file system resides and the ECS instance belongs to the same VPC as the file system. For information about how to create an ECS instance, see Create an instance on the Custom Launch tab.
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
Log on to the NAS console.
Go to the File System List page. In the top navigation bar, select the region in which your file system resides.
Find your file system and click Mount in the Actions column.
In the Mount panel, perform the configurations to mount the file system.
Select a mount target and click Next.
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.
NoteIf you cannot find the ECS instance from the drop-down list, refresh the page and try again.
You can select only one ECS instance. If you want to mount a NAS file system on multiple ECS instances, see Mount an NFS file system on multiple ECS instances at a time.
If you want to mount a NAS file system across VPCs in the same region, see Use CEN to mount a NAS file system across VPCs in the same region.
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.NoteWe 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.
NoteIf 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 theroot
user.NoteThis 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 theroot
user group.NoteThis 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.NoteThis 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.
Click Complete. 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 Run the auto-check script to troubleshoot the failure of mounting an NFS file system on Linux.
Query the mount status of an ECS instance
Click the file system ID to go to the details page of the file system.
Click Mount Targets to go to the mount target list.
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.
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
Choose > Unmount in the Actions column of the file system.
In the Unmount panel, perform the configurations to unmount the file system.
Select the mount target and click Next.
Select the ECS instance from which you want to unmount the file system and click Next.
Select the unmount directory and click Unmount.
On the Mount Targets tab
On the Mount Targets tab, find the mount target and click Unmount in the Actions column.
In the Unmount panel, perform the configurations to unmount the file system.
Select the ECS instance from which you want to unmount the file system and click Next.
Select the unmount directory and click Unmount.
FAQ
Which operating systems and file system protocols are supported by the mount feature?
Why am I unable to mount a file system by using the NAS console?
For more information about mounting-related issues, see FAQ about mounting.