eNFS User Guide
Introduction
With the rapid growth of unstructured data, NAS becomes the best choice for mass unstructured data storage in scenarios such as data sharing and access, frequent data rewriting, local/remote disaster recovery protection, and data permission/resource control. The NFS protocol is widely used in NAS production services. However, the native NFS client has the following disadvantages in terms of performance and reliability:
- One mount point is bound to only one IP address. If the software or hardware of the I/O path is faulty, service I/Os are suspended.
- Active-active links cannot be automatically switched over in a three-layer network across clouds.
- One mount point is bound to only one IP address. In heavy-load service scenarios, the NFS client performance has bottlenecks.
The eNFS feature enhances the native NFS and uses technologies such as multiple links to solve the above problems, greatly improving service performance and stability. When the mount
command is used to mount NFS for sharing, the -o
option is used to specify the list of IP addresses of the local host and NFS servers. the eNFS feature creates multiple links based on the IP address list. During file operations, eNFS schedules I/Os to multiple links in round-robin mode for load balancing, improving performance. (The current version supports only NFS V3 load balancing.) If some links are faulty during I/O, eNFS quickly distributes timeout I/Os to available links to prevent service suspension.
Hardware and Software Requirements
The host where the eNFS feature is to be used must meet the following requirements:
- CPU architecture: AArch64 or x86_64
- OS : openEuler 20.03 LTS SP4
eNFS Configuration
eNFS is an enhanced version of the native NFS. Configure eNFS on the NFS client instead of the NFS server.
Set the parameters in the /etc/enfs/config.ini file.
Path connectivity detection interval
path_detect_interval=10
The value ranges from 5 to 300, in seconds. The default value is 10.
Path connectivity detection timeout period
If the detection message is not returned within the period, the link status is considered abnormal.path_detect_timeout=10
The value ranges from 1 to 60, in seconds. The default value is 10.
Timeout threshold for NFS file operations
If the NFS server does not respond within the period, I/Os are processed using other available links.multipath_timeout=0
The value ranges from 0 to 30, in seconds. The default value is 0, indicating that the
timeo
option specified by themount
command is used instead of the configuration of the eNFS module.Whether to diable path connectivity detection
multipath_disable=0
The value can be 0 or 1. The default value is 0, indicating that the eNFS feature is enabled.
eNFS Usage
eNFS is an enhanced version of the native NFS client. The mount
command is still used to access the NFS server. To use the eNFS feature, use the -o
option to specify the localaddrs and remoteaddrs IP address lists.
If the two parameters are not specified, eNFS is not used. In this case, the functionality is the same as that of the native NFS client.
Command Syntax
mount -t nfs -o [localaddrs=127.17.0.1-127.17.0.4],[remoteaddrs=127.17.0.20-127.17.0.24] 127.17.0.20:/test /mnt/test
Description
Parameter | Mandatory | Description |
---|---|---|
localaddrs | No | If the NFS client has multiple IP addresses that can be connected to the NFS server, enter this parameter to specify the list of local IP addresses used for NFS mounting. If this parameter is not specified, the OS automatically selects IP addresses. Use hyphens (-) to denote IP address ranges. Use tildes (~) to separate multiple IP addresses. A maximum of eight IP addresses are supported. |
remoteaddrs | No | If the NFS server has multiple IP addresses that can be connected to the NFS client, enter this parameter to specify the IP address list of the NFS server for NFS mounting. If this parameter is not specified, the IP address of the NFS server mount point in the mount command parameter is used, for example, 127.17.0.20 in the preceding command.Use hyphens (-) to denote IP address ranges. Use tildes (~) to separate multiple IP addresses. A maximum of eight IP addresses are supported. Note: The IP addresses specified by remoteaddrs must belong to the same NFS server or NFS server cluster system. |
You can run mount -o remount,[localaddrs=127.17.0.1-127.17.0.4],[remoteaddrs=127.17.0.20-127.17.0.24]
to modify the IP address lists.
Viewing the eNFS Link Status
After using mount
to mount an NFS file system, you can view the status of multiple links.
Procedure
Run the
mount
command to view the enfs_info information of each mount point.$ mount 8.47.219.120:/fszhn1 on /mnt/fszhn1 type nfs (rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=8.47.219.120,mountvers=3,mountport=2050,mountproto=udp,local_lock=none,addr=8.47.219.120,remoteaddrs=8.47.219.121~8.47.219.122~8.47.219.123~8.47.219.124,enfs_info=8.47.219.120_1)
enfs_info is 8.47.219.120_1.
View the path status and I/O statistics.
(1) View the link status.
cat /proc/enfs/8.47.219.120_1/path
In the preceding command, 8.47.219.120_1 is enfs_info obtained in step 1.
$ cat /proc/enfs/8.47.219.120_1/path id local_addr remote_addr path_state xprt_state 0 8.47.210.220 8.47.219.120 Normal CONNECTED|BOUND 1 8.47.210.220 8.47.219.121 Normal CONNECTED|BOUND 2 8.47.210.220 8.47.219.122 Normal CONNECTED|BOUND 3 8.47.210.220 8.47.219.123 Normal CONNECTED|BOUND 4 8.47.210.220 8.47.219.124 Normal CONNECTED|BOUND
Output description
Field Description id Link ID local_addr Local IP address in the link remote_addr NFS server IP address in the link path_state Health status of the link
Init: initializing
Normal: normal
Fault: abnormalxprt_state Current status of the link
CONNECTED: connected
CONNECTING: being established
BOUND: ready for I/O receiving and sending(2) View link I/O statistics.
cat /proc/enfs/8.47.219.120_1/stat
8.47.219.120_1 is enfs_info information.
$ cat /proc/enfs/8.47.219.120_1/stat id local_addr remote_addr r_count r_rtt r_exec w_count w_rtt w_exec 0 8.47.210.220 8.47.219.120 0 0 0 0 0 0 1 8.47.210.220 8.47.219.121 0 0 0 6 5 23 2 8.47.210.220 8.47.219.122 0 0 0 7 6 17 3 8.47.210.220 8.47.219.123 0 0 0 0 0 0 4 8.47.210.220 8.47.219.124 0 0 0 0 0 0
Output description
Field Description id Link ID local_addr Local IP address in the link remote_addr NFS server IP address in the link r_count Number of read I/Os sent over the link r_rtt Average RPC layer processing latency of read I/Os sent over the link, in milliseconds r_exec Average NFS server processing latency of read I/Os sent over the link, in milliseconds w_count Number of write I/Os sent over the link w_rtt Average RPC layer processing latency of write I/Os sent over the link, in milliseconds w_exec Average NFS server processing latency of write I/Os sent over the link, in milliseconds