All Products
Search
Document Center

Apsara File Storage NAS:Recommended mount methods

Last Updated:Apr 02, 2024

This topic describes the recommended methods that you can use to mount Apsara File Storage NAS (NAS) file systems in Container Service for Kubernetes (ACK) clusters. You can mount NAS file systems by using the Container Storage Interface (CSI) plug-in or Container Network File System (CNFS).

Important

We recommend that you mount a NAS file system by using one of the following methods. If you mount a NAS file system by using other methods, the file system may be exposed to stability risks. The NAS technical team cannot estimate the impact of these risks. You are solely responsible for all the losses and consequences that may arise from the risks.

Storage plug-ins of ACK

Based on the CSI plug-in, Alibaba Cloud ACK is deeply integrated with Alibaba Cloud storage services and is fully compatible with Kubernetes-native storage services.

CNFS is a new method of container storage management developed from the CSI plug-in. CNFS is compatible with the traditional CSI storage method. We recommend that you use CNFS to manage and access NAS volumes when you use ACK. This significantly improves performance and provides powerful management capabilities and I/O observability.

Note
  • If your container cluster is small, infrequently scaled, and mainly used for testing purposes, you can also use the HostPath method to access NAS file systems. For more information, see Use hostPath volumes.

  • If you are using a self-managed Kubernetes cluster that contains a large number of nodes and supports auto-scaling, we recommend that you use the CSI plug-in to access NAS file systems. For a cluster with a stable scale, we recommend that you use built-in volumes of Kubernetes to access NAS file systems. For more information, see Mount a NAS file system on a self-managed Kubernetes cluster.

Take note of the following items:

  • To mount a file system on a new ACK cluster, we recommend that you use CNFS.

  • To mount a file system on an existing ACK cluster, we recommended that you migrate the cluster to CNFS.

  • To mount a file system on an existing Kubernetes cluster, we recommend that you use a storage plug-in that is already installed.

For more information about the CSI plug-in, see CSI overview.

Use CNFS to mount file systems (recommended)

If you use a traditional shared NAS file system in a container, the following problems may occur: The latency in reading and writing small files is high, precise control of capacity quotas is missing, mistakenly deleted files cannot be recovered, and observable metrics of storage volumes are missing. CNFS allows you to abstract NAS file systems as custom Kubernetes objects by using the CustomResourceDefinition (CRD) resource. You can use the custom objects to create, delete, describe, mount, monitor, and scale up NAS file systems. In addition, you can use the acceleration client of NAS in the CSI plug-in to significantly accelerate access to NAS. CNFS is a free feature. After you enable the acceleration client, CNFS consumes about 50 to 100 MB of memory in the pod.

Indicator

Benchmarking scenario

Before the CNFS acceleration client is used

After the CNFS acceleration client is used

Read and write performance on metadata

Duration of traversing one million directories

18 minutes

< 60s

Duration of creating a file of 4 KB in size

3,000 μs

< 200 μs

Duration of reading a file of 4 KB in size for the second time

400 μs

< 100 μs

Read and write throughput

Read and write throughput of a single node

200 to 500 MB/s

> 800 MB/s

Overall performance in comprehensive scenarios

Duration of extracting 5,000 images that each is 150 KB in size

52s

About 15s

Duration of creating a Redis project

27s

About 21s

Important

The values provided in the preceding table are only theoretical values (reference values). The actual values are subject to your operating environment.

  • Note ①: The type of Elastic Compute Service (ECS) instance that is used to run the benchmark test is ecs.hfg6.4xlarge. The benchmark data may vary based on the environment.

  • Note ②: The bandwidth of the ECS instance and the type of the NAS file system affect the read and write throughput of the node.

Use the CSI plug-in to mount file systems

For information about how to mount file systems by using the CSI plug-in, see NAS volume overview.

The CSI plug-in supports the following methods:

For more information, see Manage the CSI plug-in, Set quotas on the subdirectories of NAS NFS volumes, and FAQ about NAS volumes.

Mount file systems on Windows containers

For more information about how to mount Server Message Block (SMB) file systems on Windows containers, see Mount disks and SMB file systems to Windows pods.