NFSTEST_RDMA(1)
π NFSTEST_RDMA π
okay bestie, welcome to nfstest_rdma from the nfstest_rdma 1.1 era β the manual page that's about to make you obsessed with NFS-over-RDMA functional testing. grab a snack, we're doing this π
β¨ NAME β¨
nfstest_rdma β NFS-over-RDMA functional tests. that's the whole vibe. it tests stuff over RDMA. slay.
πΈ SYNOPSIS πΈ
nfstest_rdma --server <server> [options]
π¦ DESCRIPTION π¦
Verify correct functionality of NFS-over-RDMA. literally the whole point.
Remote Direct Memory Access (RDMA) provides fast data transfers between servers and storage. NFS over RDMA is best used when a large amount of data needs to be transferred with higher performance than regular NFS. NFS over RDMA is usually used over InfiniBand which provides higher performance and a lower latency.
Although NFS over RDMA is mostly used over InfiniBand, Ethernet could be used as the link protocol as well. RDMA over Converged Ethernet (RoCE) which allows RDMA over Ethernet by encapsulating the InfiniBand transport packet over Ethernet. RoCE provides a couple of variants: RoCEv1 and RoCEv2. One is RoCEv1 which is an Ethernet link layer protocol and provides RDMA functionality between two hosts in the same Ethernet broadcast domain. While the second is RoCEv2 or RRoCE (Remote RoCE) which is an internet layer protocol so these packets can be routed. RoCEv2 runs over UDP/IPv4 or UDP/IPv6. There is also another variant called iWARP which runs over the TCP protocol. Testing is currently supported for all of these variants except for iWARP.
NFS over RDMA has a couple of extra layers in the packet: InfiniBand layer and RPC-over-RDMA or RPCoRDMA layer. The InfiniBand layer contains the OpCode which specifies the type of RDMA operation to perform and the PSN which is the packet sequence number. The RPCoRDMA layer contains the XID and the RDMA chunk lists. The RDMA read chunk list is used to transfer DDP (Direct Data Placement) data from the NFS client to the server, e.g., NFS write call. On the other hand, the RDMA write chunk list is used to transfer DDP data from the NFS server back to the client, e.g., NFS read reply. Only certain NFS operations can be transferred using DDP and only the opaque part of the operation is transferred using either RDMA reads or writes while the rest of the NFS packet is transferred via the receive buffer using the RDMA SEND operation. Finally, the RDMA reply chunk is used to transfer replies having a variable length reply which could be larger than the receive buffer and could not be transferred using the write chunk list because it does not contain a single large opaque item.
Tests are divided into three groups: basic, read and write. The basic tests deal mostly with verifying NFS packets using the reply chunk and some other basic RDMA functionality. The read tests deal with verifying NFS read which in turn verify the RDMA write functionality. Finally, the write tests deal with verifying NFS write which in turn verify the RDMA read functionality. Also, if the NFS read or write is small enough the client could not use the RDMA write or read functionality, but instead could use the receive buffer and transfer the data using the RDMA SEND operations.
Tests verify the RPCoRDMA layer is sent when necessary and that the RDMA chunk lists are sent with the correct information which includes the number of chunks, number of segments in each chunk and the correct information for each segment. Tests verify each segment information is correct and their corresponding RDMA read or write information which includes correct handle, virtual offset, DMA length and the XDR position for the case of RDMA reads. In addition, the correct number of RDMA I/O fragments is also verified and their corresponding lengths and packet sequence numbers.
π OPTIONS π
--versionβ show program's version number and exit β¨-h,--helpβ show this help message and exit π«Ά-f FILE,--file=FILEβ File where options are specified besides the system wide file/etc/nfstest, user wide file$HOME/.nfstestor in the current directory.nfstestfile
π NFS specific options:
-s SERVER,--server=SERVERβ Server name or IP address-e EXPORT,--export=EXPORTβ Exported file system to mount [default:'/']--nfsversion=NFSVERSIONβ NFS version, e.g.,3,4,4.1, etc. [default:4.1]-m MTPOINT,--mtpoint=MTPOINTβ Mount point [default:'/mnt/t']-p PORT,--port=PORTβ NFS server port [default:20049]--proto=PROTOβ NFS protocol name [default:'rdma']--sec=SECβ Security flavor [default:'sys']--nconnect=NCONNECTβ Multiple TCP connections option [default:'1']-o MTOPTS,--mtopts=MTOPTSβ Mount options [default:'hard']--datadir=DATADIRβ Data directory where files are created, directory is created on the mount point [default:'']
π Logging options:
-v VERBOSE,--verbose=VERBOSEβ Verbose level for debug messages [default:'opts|info|dbg1|dbg2|dbg3']--tverbose=TVERBOSEβ Verbose level for test messages [default:'1']--createlogβ Create log file--rexeclogβ Create rexec log files--warningsβ Display warnings--tag=TAGβ Informational tag, it is displayed as an INFO message [default:'']--nottyβ Do not use terminal colors on output--isattyβ Use terminal colors on output β useful when running withnohup
π₯ Packet trace options:
--createtracesβ Create a packet trace for each test--tbsize=TBSIZEβ Capture buffer size for tcpdump [default:192k]--trcdelay=TRCDELAYβ Seconds to delay before stopping packet trace [default:2.0]--keeptracesβ Do not remove any trace files [default: remove trace files if no errors]--rmtracesβ Remove trace files [default: remove trace files if no errors]-i INTERFACE,--interface=INTERFACEβ Device interface [default: automatically selected]
π§ File options:
--nfiles=NFILESβ Number of files to create [default:0]--filesize=FILESIZEβ File size to use for test files [default:64k]--rsize=RSIZEβ Read size to use when reading files [default:4k]--wsize=WSIZEβ Write size to use when writing files [default:4k]--iodelay=IODELAYβ Seconds to delay I/O operations [default:0.1]--offset-delta=OFFSET_DELTAβ Read/Write offset delta [default:4k]
β Path options:
--sudo=SUDOβ Full path of binary for sudo [default:'/usr/bin/sudo']--kill=KILLβ Full path of binary for kill [default:'/usr/bin/kill']--nfsstat=NFSSTATβ Full path of binary for nfsstat [default:'/usr/sbin/nfsstat']--tcpdump=TCPDUMPβ Full path of binary for tcpdump [default:'/usr/sbin/tcpdump']--iptables=IPTABLESβ Full path of binary for iptables [default:'/usr/sbin/iptables']--messages=MESSAGESβ Full path of log messages file [default:'/var/log/messages']--trcevents=TRCEVENTSβ Full path of tracing events directory [default:'/sys/kernel/debug/tracing/events']--trcpipe=TRCPIPEβ Full path of trace pipe file [default:'/sys/kernel/debug/tracing/trace_pipe']--tmpdir=TMPDIRβ Temporary directory [default:'/tmp']
π Debug options:
--nocleanupβ Do not cleanup created files--notimestampsβ Do not display timestamps in debug messages--bugmsgs=BUGMSGSβ File containing test messages to mark as bugs if they failed--nomountβ Do not mount server and run the tests on local disk space--basename=BASENAMEβ Base name for all files and logs [default: automatically generated]--nfsdebug=NFSDEBUGβ Set NFS kernel debug flags and save log messages [default:'']--rpcdebug=RPCDEBUGβ Set RPC kernel debug flags and save log messages [default:'']--tracepoints=TRACEPOINTSβ List of trace points modules to enable [default:'']--nfsstatsβ Get NFS stats [default:'False']--pktdispβ Display main packets related to the given test--nfserrorsβ Fail every NFS error found in the packet trace--client-ipaddr=CLIENT_IPADDRβ IP address of localhost
π Reporting options:
--xunit-reportβ Generate xUnit compatible test report--xunit-report-file=XUNIT_REPORT_FILEβ Path to xout report file
πΈ Test options:
--runtest=RUNTESTβ Comma separated list of tests to run, if list starts with a'^'then all tests are run except the ones listed [default:'all']--small-filesize=SMALL_FILESIZEβ File size to use for small files [default:4k]--large-filesize=LARGE_FILESIZEβ File size to use for large files [default:1m]--strictβ Mark warnings for missing fragments as failures [default:False]
π TESTS π
π basic
Run all NFS-over-RDMA basic functionality tests: basic01, basic02, basic03, basic04, basic05
π basic01
Verify basic NFS-over-RDMA functionality
π basic02
Verify NFS-over-RDMA reply chunk on EXCHANGE_ID/SETCLIENTID
π basic03
Verify NFS-over-RDMA reply chunk on READDIR
π basic04
Verify NFS-over-RDMA reply chunk on READLINK
π basic05
Verify NFS-over-RDMA reply chunk on GETATTR(FATTR4_ACL)
π¦ read
Run all NFS-over-RDMA functionality tests where file is opened for reading: read01, read02, read03, read04
π¦ read01
Verify NFS-over-RDMA functionality on a file opened for reading (very small file)
π¦ read02
Verify NFS-over-RDMA functionality on a file opened for reading (small file)
π¦ read03
Verify NFS-over-RDMA functionality on a file opened for reading (medium file)
π¦ read04
Verify NFS-over-RDMA functionality on a file opened for reading (large file)
π write
Run all NFS-over-RDMA functionality tests where file is opened for writing: write01, write02, write03, write04
π write01
Verify NFS-over-RDMA functionality on a file opened for writing (very small file)
π write02
Verify NFS-over-RDMA functionality on a file opened for writing (small file)
π write03
Verify NFS-over-RDMA functionality on a file opened for writing (medium file)
π write04
Verify NFS-over-RDMA functionality on a file opened for writing (large file)
π
π all
Run all tests: basic01, basic02, basic03, basic04, basic05, read01, read02, read03, read04, write01, write02, write03, write04
β¨ EXAMPLES β¨
The only required option is --server
$ nfstest_rdma --server 192.168.0.11
π«Ά NOTES π«Ά
The user id in the local host must have access to run commands as root using the 'sudo' command without the need for a password.
bestie we are not done yet, there's more coming so stay tuned πβ¨
π SEE ALSO π
okay so if you wanna go deeper (and bestie, you know you do), here's the whole friend group π«Ά go say hi to:
formatstr(3)nfstest.test_util(3)nfstest_alloc(1)nfstest_cache(1)nfstest_delegation(1)nfstest_dio(1)nfstest_fcmp(1)nfstest_file(1)nfstest_interop(1)nfstest_io(1)nfstest_lock(1)nfstest_pkt(1)nfstest_pnfs(1)nfstest_posix(1)nfstest_sparse(1)nfstest_ssc(1)nfstest_xattr(1)nfstest_xid(1)packet.application.rpc_const(3)packet.application.rpcordma_const(3)packet.nfs.nfs3_const(3)packet.nfs.nfs4_const(3)packet.transport.ib(3)packet.transport.rdmap(3)
like literally a whole little ecosystem of pages, iykyk β¨
π BUGS π
no known bugs. not a single one. she's flawless, she's iconic, she ate and left zero crumbs π
ngl that's the flex of the century, fr fr πβ¨
π AUTHOR π
Jorge Mora (mora@netapp.com)
and that's a wrap on NFSTEST_RDMA(1) bestie!! πβ¨ this masterpiece is from NFStest 3.2, dated 21 March 2023, and it lives in section 1 where all the good stuff hangs out. go forth, run your RDMA tests, and slay π
ππ¦
π¦ where this page comes from
- debian trixie: nfstest 3.2-3
- fedora 43: NFStest 3.2-14.fc43 Β· GPL-2.0-or-later
- fedora 44: NFStest 3.2-16.fc44 Β· GPL-2.0-or-later
- ubuntu noble: nfstest 3.2-2
- ubuntu questing: nfstest 3.2-3
- ubuntu resolute: nfstest 3.2-3build1
- ubuntu stonking: nfstest 3.2-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms