By default, Data Science Workshop (DSW) provides 5 GB of free storage space. You can also mount an NAS file system to your DSW instance to expand the storage space. Network Attached Storage (NAS) is an Alibaba Cloud storage service that provides SSD resources on the cloud. For more information about mounting NAS file systems, see [https://www.alibabacloud.com/help/doc-detail/95535.htm].
After you mount an NAS file system to the instance, you can run the following command in the DSW terminal to view the NAS file system:
If the NAS file system is mounted, the /nas directory is displayed.
We recommend that you store large files in the /nas directory.
If the file size is smaller than 300 MB, we recommend that you click the DSW instance to log on to the DSW console, right-click the file, and click Download to download the file.
If the file size is smaller than 300 MB, we recommend that you click the DSW instance to log on to the DSW console and then upload the file.
If the file size is larger than 300 MB, we recommend that you use FTP to download the file. Currently, you can only use FTP to download files stored in the mounted NAS file system. If the files are stored in the 5 GB storage space, then you must first copy the files to the mounted NAS file system. Follow these steps to download and upload a file:
Log on to the NAS console, and switch to the region where the NAS file system is created. In this example, the NAS file system is created in the China (Shanghai) region. Verify that the storage type of the NAS file system is SSD performance-type and the protocol is NFS, as shown in the following dsw_nas_demo file system: For more information about mounting NAS file systems to DSW instances, see Mount NAS file systems.
Purchase an ECS instance
Follow these guidelines when you create an ECS instance:
- Image: select a CentOS image. The image version is not limited.
- Network: set the network to VPC. By default, the system selects a VPC network for you. You can also create a VPC network.
- Use the default setting for other parameters, confirm the terms of service, and create the instance.
Reset the ECS instance password
Click Manage in the Actions column for the ECS instance to open the instance information page, and then select More -> Reset Password to reset the password. Click Connect to log on to the ECS instance. Make sure that you keep the ECS instance password because you must enter the password every time you connect to the ECS instance.
Log on to the NAS console, locate the NAS file system that is mounted to the DSW instance, and click Add Mount Point.
In the Add Mount Point dialog box, set the mount point type to VPC, and then select the same VPC network as the ECS instance. If you cannot determine which VPC network the ECS instance is connected to, go to the ECS instance information page to confirm it.
After you add a mount point, click the NAS file system name. If the details page shows the mount address, this means that the mount point is added. This mount point is the key to connecting to the ECS instance. Click the mount point to view the command for mounting the file system to an instance. Record this command.
Log on to the ECS instance, install the nfs-utils package, and enter the mount command.
#Install the nfs-utils package
yum install nfs-utils
sudo mount -t nfs -o vers=4.0,noresvport 31ce14ad85-jol17.cn-shanghai.nas.aliyuncs.com:/ /mnt
#Check whether the NAS file system is mounted to the instance.
Run the SFTP commands on your local host or use a client such as FileZilla to connect to the ECS instance. You can check the Internet IP address of the ECS instance in the ECS console. The root directory for storing the uploaded files is /mnt.
This example shows how to use FileZilla to upload files to the ECS instance.After you upload the files, log on to the ECS instance to confirm that the files are stored in the /mnt directory.
Log on to the DSW terminal and check the mounted NAS file system. You can then find the uploaded files.
Log on to the DSW terminal, move the files that you want to download to the /nas directory. You can then use the SFTP commands or a client such as FileZilla to download the files.
For more information, see Use SFTP to transfer data to and from an Apsara File Storage NAS file system