This topic describes how to mount one or more NAS file systems on an Elastic Compute Service (ECS) instance when you purchase the ECS instance.
Prerequisites
One or more NAS file systems are created. For more information, see Create a General-purpose NAS file system.
Background information
After you create NAS file systems, you can purchase an ECS instance and mount the NAS file systems on the ECS instance on the buy page. This is the easiest way to mount NAS file systems. The following steps show you how to mount NAS file systems when you purchase an ECS instance. You can mount one or more NAS file systems on an ECS instance when you create the ECS instance. You can mount up to five NAS file systems on an ECS instance.
Mount a NAS file system
Mount multiple NAS file systems
- Mount target:
- All mount targets must reside in the same VPC.
- If no mount target is available in the VPC where the ECS instance resides, add a mount target that matches the VPC. For more information, see Create a mount target.
- Local directory:
- Each local directory must be unique.
- You can use multilevel directories for Linux images, for example, /mnt and /mnt/sub.
Limits
- Image: You can mount NAS file systems only on official images. You cannot mount NAS file systems on a custom image that is created by using an ECS snapshot.
- Local directory: You can specify only the root directory of NAS file systems. You cannot specify the subdirectories of NAS file systems.
Check the mount result
- ECS Linux instances
Connect to the ECS instance and run the
df -h
command to view the details of the mounted NAS file system.In the command output, Used indicates the used space. Size indicates the maximum size of the file system. The billing of the file system is not related to the maximum size.
Note- The settings for an automatic mount are stored in the /etc/fstab file. You can change a local directory based on your business requirements. For more information, see Mount an NFS file system.
- For information about how to connect to an ECS instance, see Guidelines on instance connection.
- ECS Windows instances
Connect to the ECS instance and start File Explorer. The SMB file that you specify is mounted as a network drive.Note The settings for an automatic mount are stored in the c:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\my_mount.bat file. You can change these settings based on your business requirements.