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.
- Make sure 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
- On the buy page, set the required parameters.
Parameter Description Region The region where the file system resides.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 where the file system resides. Each region has multiple isolated locations known as zones. The power supply and network of each zone are independent. If a file system and an ECS instance reside in the same region but in different zones, they can communicate with each other.
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 latency 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 size of a Performance NAS file system is 1 PB. The maximum size of a Capacity NAS 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. Valid values: VPC and Classic Network.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 Create 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 2: 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 letter of a local drive> \\<the domain name of a mount target>\myshare.
- The letter of a local drive: specifies a drive on which you need to mount a file system.
You can specify the target drive 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 Management 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 letter of a local drive: specifies a drive on which you need to mount a file system. You can specify the target drive 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.