Network Attached Storage (NAS)
Last updated
Last updated
This guide describes the steps to configure as the underlying storage system for Alluxio. NAS (Network Attached Storage) is a device or architecture that provides centralized storage services over a network (such as Ethernet), supports multiple protocols (such as NFS, SMB, AFP, etc.), and allows clients to access shared storage resources. It is often used to access remote files across a network environment and is often used for shared storage in Linux systems. For more information about NAS and NFS, refer to the .
Alluxio supports two ways to use NAS as Alluxio's UFS: 1. Mount NAS to the local file system, and Alluxio will perform operations on the files in the NAS in a similar way to the file system; 2. Use the NFS client to complete all file operations on the NAS.
When deploying the Alluxio cluster with the operator, the hostPaths
field could be set to mount the NAS path on node to a path on the worker container:
where /mnt/nas
is where NAS is mounted on the node.
An example ufs.yaml
to create a mount point with the operator:
An example command to mount /mnt/nas
to /nas
if not using the operator:
Before configuring NAS with Alluxio, ensure you have the following requirements:
<NAS_SERVER_IP>
IP address of the NAS server hosting the shared directory.
<SHARED_DIR>
Absolute path of the exported directory on the NAS server (e.g., /nas_share
).
<CLIENT_RANGE>
Client IP range allowed to access the share (e.g., 192.168.1.0/24
).
<NAS_VERSION>
NAS protocol version (Alluxio currently supports v3 only).
An example ufs.yaml
to create a mount point with the operator:
An example command to mount nas://<NAS_SERVER_AUTHORITY>/<NAS_EXPORT_PATH>/
to /nas
is as follows if not using the operator:
Note: When mounting the root directory of the NAS export path, be sure to add a trailing slash (e.g., nas://<NAS_SERVER_AUTHORITY>/<NAS_EXPORT_PATH>/
). NAS_SERVER_AUTHORITY
is a user-defined unique field that uniquely represents a NAS server. For example, if there are two NAS servers that need to be mounted to Alluxio, NAS_SERVER_AUTHORITY
can be nas_1
and nas_2
to distinguish the two different NAS servers. NAS_EXPORT_PATH
is the exported path of NAS.
When using Alluxio to mount and access NAS (Network Attached Storage), certain low-level filesystem parameters can be tuned to optimize performance and resource usage. Below are two commonly used configuration options:
This parameter sets the maximum buffer size used by the input stream when reading data from NAS. The default value is 8MB
. The buffer caches data during file reads to reduce the number of interactions with the underlying storage. Increasing this value can typically improve sequential read performance, especially when accessing large files. However, setting this value too high may lead to increased memory usage. It is recommended to tune this based on the specific workload and the memory capacity of the node.
This parameter controls the maximum number of bytes each response can contain when performing ls
operations (e.g., listStatus()
). The default value is 4MB
. This setting is mainly used to batch retrieve metadata for a large number of files, helping to avoid excessive memory consumption or network congestion caused by large responses. Reducing this value can improve system response stability, which is especially useful for directories containing a large number of sub-files or sub-directories.
Use the to add a new mount point by specifying the Alluxio path where the mount should be created and providing the path exported by the NAS server as the UFS URI. Options such as the NAS server IP address, user ID, and group ID can also be specified as part of the mount operation, as described in .