Requirements: Disk files are too small, need to temporarily store some data, if you use block storage to expand capacity, the price is a bit expensive, see Alibaba Cloud launched a file storage NAS, the price is relatively cheap, it will be released after use, it should not cost much.
NAS file system activation:The hyperlink login is visible.
Alibaba Cloud File Storage NAS is a distributed file system with shared access, elastic scalability, high reliability, and high performance. It is compatible with POSIX file interfaces, can support shared access by thousands of computing nodes, and can be mounted to Elastic Computing ECS, DPCA, Container Service ACK, Elastic Container ECI, Batch Computing BCS, High-Performance Computing EHPC, AI Training PAI and other computing services to provide high-performance shared storage, allowing users to seamlessly migrate business systems to the cloud without modifying the application. Apsara File Storage NAS is a file storage service for Alibaba Cloud ECS instances, E-HPC, container services, and other compute nodes. It is a distributed file system with shared access, elastic scalability, high reliability, and high performance. The NAS is based on the POSIX file interface, which is naturally adapted to the native operating system to provide shared access while ensuring data consistency and lock mutual exclusion. It provides simple scalable file storage for use with ECS, multiple ECS instances can access the NAS file system simultaneously, and storage capacity automatically grows and contracts as you add and remove files, providing a common data source for workloads and applications resulting from running on multiple instances or servers. Alibaba Cloud NAS storage documentation:The hyperlink login is visible.
In simple terms, the SMB protocol is recommended for Windows systems, and the NFS protocol is recommended for Linux systems. Alibaba Cloud is divided into capacity-based NAS and performance-based NAS, please refer to the documentation for the specific differences.
NFS V3 and V4 versions
It is recommended that you mount the file system via the NFS v3 protocol to obtain itOptimal access performance。 NFS v4.0 supports file locks (including range locks), and if you need to use multiple Linux ECS instances to modify a file at the same time, use the NFS v4.0 protocol to mount the file system.
Alibaba Cloud activates NAS storage
First, log in to Alibaba Cloud to activate the NAS storage service, and then create a "universal NAS", as shown in the figure below:
Since the general-purpose file system can be accessed by compute nodes in different availability zones, you only need to select the right region (I don't know if it can be accessed across regions). As shown below:
Select the correct one based on your server situation: mount point type, VPC, and virtual switch. (omitted)
After the creation is completed, click the file system list to enter the details page by file system ID, as shown in the figure below:
Choose to mount to ECS via the command line, as shown in the following image:
Linux server mount
Install the NFS client on the ECS instance with the following command:
The NFS client controls the number of NFS requests initiated at the same time,The default compiled kernel has a value of 2, which seriously affects performance, it is recommended that you modify the parameter value to 128. To increase the number of NFS requests initiated at the same time, the command is as follows:
Mount the NFS file system
Create a directory as a NAS mount point with the following command:
Run the command to mount the NFS file system:
Run the following command, if there is an NFS file system mount address in the result, the mount is successful, as shown in the following figure:
You can also view the client list through the background, as shown below:
To unmount the mount directory on a Linux system: Run the umount /mynas command to uninstall the NFS file system mount directory. Replace the /mynas directory with the actual mount path.
(End)
|