Questo contenuto non è disponibile nella lingua selezionata.
Chapter 6. Enabling NFS over RDMA on an NFS server
Remote Direct Memory Access (RDMA) is a protocol that enables a client system to directly transfer data from the memory of a storage server into its own memory. This enhances storage throughput, decreases latency in data transfer between the server and client, and reduces CPU load on both ends. If both the NFS server and clients are connected over RDMA, clients can use NFSoRDMA to mount an exported directory.
Prerequisites
- The NFS service is running and configured
- An InfiniBand or RDMA over Converged Ethernet (RoCE) device is installed on the server.
- IP over InfiniBand (IPoIB) is configured on the server, and the InfiniBand device has an IP address assigned.
Procedure
Install the
rdma-corepackage:dnf install rdma-core
# dnf install rdma-coreCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the package was already installed, verify that the
xprtrdmaandsvcrdmamodules in the/etc/rdma/modules/rdma.conffile are uncommented:NFS over RDMA client support NFS over RDMA server support
# NFS over RDMA client support xprtrdma # NFS over RDMA server support svcrdmaCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: By default, NFS over RDMA uses port 20049. If you want to use a different port, set the
rdma-portsetting in the[nfsd]section of the/etc/nfs.conffile:rdma-port=<port>
rdma-port=<port>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Open the NFSoRDMA port in
firewalld:firewall-cmd --permanent --add-port={20049/tcp,20049/udp} firewall-cmd --reload# firewall-cmd --permanent --add-port={20049/tcp,20049/udp} # firewall-cmd --reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow Adjust the port numbers if you set a different port than 20049.
Restart the
nfs-serverservice:systemctl restart nfs-server
# systemctl restart nfs-serverCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
On a client with InfiniBand hardware, perform the following steps:
Install the following packages:
dnf install nfs-utils rdma-core
# dnf install nfs-utils rdma-coreCopy to Clipboard Copied! Toggle word wrap Toggle overflow Mount an exported NFS share over RDMA:
mount -o rdma server.example.com:/nfs/projects/ /mnt/
# mount -o rdma server.example.com:/nfs/projects/ /mnt/Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you set a port number other than the default (20049), pass
port=<port_number>to the command:mount -o rdma,port=<port_number> server.example.com:/nfs/projects/ /mnt/
# mount -o rdma,port=<port_number> server.example.com:/nfs/projects/ /mnt/Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the share was mounted with the
rdmaoption:mount | grep "/mnt"
# mount | grep "/mnt" server.example.com:/nfs/projects/ on /mnt type nfs (...,proto=rdma,...)Copy to Clipboard Copied! Toggle word wrap Toggle overflow