This topic describes how to create a file system and mount the file system on a Windows Elastic Compute Service (ECS) instance.
- An Alibaba Cloud account is created and passes the real-name verification. For more
information, see Create an Alibaba Cloud account.
Note You can use a RAM user to perform fine-grained access control. For more information, see Create a custom policy.
- Apsara File Storage NAS is activated.
When you log on to the NAS console for the first time, follow the instructions on the page to activate NAS.
- NAS is authorized to access cloud resources.
- If you are a first-time user of an NAS General-purpose file system, follow these steps to complete the authorization. On the Overview page, click Authorization Management in the Common Entrance section.
- Click Authorize next to the Default NAS Authorization section.
- Click Authorize to assign the AliyunNASDefaultRole role to NAS.
- ECS instances are available in the region where you want to create a file system. For more information, see Create an ECS instance.
- If you want to create a mount target of the VPC type, you must create a VPC in the same region where the linked file system resides. Then, you attach the ECS instance that hosts the file system to the VPC. For more information, see Create a VPC and VSwitch.
- Ensure that the Workstation and TCP/IP NetBIOS Helper services are started on Windows. For more information, see Mount an SMB file system.
Step 1: Create a file system
- Log on to the NAS console.
- Choose Create File System. and click
- In the Create File System dialog box, set the required parameters.
Parameter Description Region The region.Note If an ECS instance and file system reside in different regions, the ECS instance cannot access the file system.
You can create a maximum of 20 file systems in a region by using an Alibaba Cloud account.
The supported storage types and protocol types of a file system change based on the region. For more information, see Storage types and protocol types supported by NAS in different regions.
Zone The zone. Each region has many isolated locations known as zones. The power supply and network of each zone are independent. In the same region but different zones, an Elastic Compute Service (ECS) instance can access a file system.
Select a zone from the drop-down list. We recommend that the zone you select is the same as the zone where the ECS instance resides. This eliminates extra latencies for cross-zone communication between the file system and the ECS instance.
Protocol Type The protocol type. Select SMB (2.1 and later).
The Server Message Block (SMB) protocol is applicable to file sharing among Linux ECS instances.
Storage Type The storage type. Valid values: SSD performance-type and Capacity-type.
The maximum space of an NAS Performance file system is 1 PB. The maximum space of an NAS Capacity file system is 10 PB. The pay-as-you-go billing method is adopted.
Encryption You can use keys that are hosted by Key Management Service (KMS) to encrypt data at rest on a file system. Data is automatically decrypted when you access encrypted data. For more information, see Data encryption. Network Type The network type. Both the VPC and classic network are supported.This parameter specifies the network type of the mount targets for NAS file systems. You can attach up to two mount targets to each file system. For more information about how to create a mount target, see Add a mount target.Note
- You can create a mount target of the classic network type in a region that resides only in China.
- You can attach a mount target of the classic network type only to an ECS instance.
VPC The VPC. If no VPC exists, create a VPC in the VPC console.Note The VPC and VSwitch that you select must be the same as those of the ECS instance on which you mount a file system. An ECS instance and a file system may reside in different VPCs. To enable communication between the ECS instance and the file system, you can use Cloud Enterprise Network (CEN) to connect VPCs. For more information, see Enable a cross-VPC mount for a file system. VSwitch The VSwitch.
- Click Buy Now and follow the instructions to complete the payment.
Note After you create the file system, the default permission group is attached to the file system. For more information about how to change a permission group, see Modify the permission group of a mount target.
Step 4: Mount a file system
Follow these steps to mount an SMB file system on an ECS instance.
- Log on to the ECS console.
- Open the command prompt and use the following command to mount the file system.
net use D: \\file-system-id.region.nas.aliyuncs.com\myshare
The syntax of the command is
net use <the name of a drive> \\<the domain name of a mount target>\myshare.
- The name of a drive: specifies the target drive on which you want to mount the file
system. You can replace the value of the parameter based on your business requirements.
Note The target drive must be different from any existing drives.
- The domain name of a mount target: When you add a mount target to a file system, the domain name of the mount target is automatically generated. You can replace the value of the parameter based on your business requirements. To obtain information about a mount target, follow these steps. Log on to the NAS console, find the target file system, and then click Manage next to the file system to go to the Details page. The Details page shows information about the mount target.
- myshare: specifies the name of an SMB share. You cannot change the name.
- The name of a drive: specifies the target drive on which you want to mount the file system. You can replace the value of the parameter based on your business requirements.
- Use the
net usecommand to check the mount result.
The following figure shows an example of a successful mount.
- After you mount an NAS file system on an ECS instance, you can access the file system from the ECS instance.
Troubleshoot common errors
If a mount operation fails, you can troubleshoot the issue. For more information, see Troubleshoot and fix mount issues.