NFSTEST_DIO(1)

🌸 NAME 🌸

okay so bestie, meet nfstest_dio(1) β€” it's the Direct I/O tests page from nfstest_dio 1.5, and we're gonna read it together, no cap πŸ’–


✨ SYNOPSIS ✨

nfstest_dio --server <server> [options]

like literally that's it, that's the whole vibe check πŸ¦‹


πŸ’« DESCRIPTION πŸ’«

Functional direct I/O tests are the ones that make sure every single READ/WRITE actually goes to the server instead of the client just being lazy and caching the requests πŸ™…β€β™€οΈ. The client bypasses read ahead by sending the READ with only the requested bytes. Then we verify the client correctly handles the eof marker when reading the whole file. And we verify the client ignores delegation while writing a file. iconic behavior, honestly.

Direct I/O on pNFS tests verify the client sends the READ/WRITE to the correct DS, or to the MDS if it's using a PAGESIZE aligned buffer or not, respectively. yes the "respectively" is doing heavy lifting there, we love her πŸ’…

Direct I/O data correctness tests verify that a file written with buffered I/O is read correctly with direct I/O. And also verify that a file written with direct I/O is read correctly with buffered I/O. it goes both ways, as it should 🫢

Vectored I/O tests verify coalescence of multiple vectors into one READ/WRITE packet when all vectors are PAGESIZE aligned. Vectors with different alignments get sent on separate packets. no merging for the misaligned girlies ✨

Valid for NFSv4.0 and NFSv4.1 including pNFS.

πŸŽ€ OPTIONS πŸŽ€

the basics, bestie

  • --version β€” show the program's version number and exit, bye πŸ‘‹
  • -h, --help β€” show this help message and exit πŸ’–
  • -f FILE, --file=FILE β€” the file where options are specified, besides the system wide file /etc/nfstest, the user wide file $HOME/.nfstest, or the .nfstest file in the current directory πŸ—‚οΈ

πŸ¦‹ 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: 2049]
  • --proto=PROTO β€” NFS protocol name [default: 'tcp']
  • --sec=SEC β€” security flavor [default: 'sys']
  • --nconnect=NCONNECT β€” multiple TCP connections option [default: '1']
  • -o MTOPTS, --mtopts=MTOPTS β€” mount options [default: 'hard,intr']
  • --datadir=DATADIR β€” data directory where files are created; the 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 gets displayed as an INFO message [default: '']
  • --notty β€” do not use terminal colors on output 🚫🎨
  • --isatty β€” use terminal colors on output β€” super useful when running with nohup ✨

πŸ“ 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: 2]
  • --filesize=FILESIZE β€” file size to use for test files [default: 262144]
  • --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 the list starts with a '^' then all tests are run except the ones listed [default: 'all']
  • --iotype=IOTYPE β€” list of I/O types to test [default: 'read,write']
  • --biotype=BIOTYPE β€” list of buffered I/O types to test [default: 'none,read,write']
  • --withdeleg=WITHDELEG β€” use delegation on tests [default: both without and with delegation]

πŸ’– TESTS πŸ’–

eof

Verify the eof marker is handled correctly when reading the end of the file. 🫢

correctness

Verify data correctness when reading/writing using direct I/O. A file created with buffered I/O is read correctly with direct I/O. A file created with direct I/O is read correctly with buffered I/O. ✨

fstat

Verify fstat() gets the correct file size after writing. πŸ“

read

Verify READ is sent after writing when the file is open for both read and write.

read_ahead

Verify READ is sent with only the requested bytes, bypassing read ahead. πŸƒβ€β™€οΈ

basic

Verify a packet is sent for each I/O request. one packet, one request, periodt πŸ’…

rsize

Verify multiple READ packets are sent for each read request having request size > rsize.

wsize

Verify multiple WRITE packets are sent for each write request having request size > wsize

aligned

Verify the packet is sent to the correct DS server when using a memory which is PAGESIZE aligned. βœ…

nonaligned

Verify the packet is sent to the MDS when using a memory which is not PAGESIZE aligned.

diffalign

Verify packets are sent to both the MDS and the correct DS on the same open, using buffers with different alignments. 🌈

stripesize

Verify multiple packets are sent for each request having the request size greater than stripe size.

vectored_io

Verify vectored I/O functionality.

all

Run all tests: eof, correctness, fstat, read, read_ahead, basic, rsize, wsize, aligned, nonaligned, diffalign, stripesize, vectored_io πŸ‘‘


🌟 EXAMPLES 🌟

The only required option is --server, bestie. that's the whole assignment πŸŽ€

$ nfstest_dio --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. so like, set that up first, or you're gonna have a bad time 😭

πŸ¦„ SEE ALSO πŸ¦„

formatstr(3), nfstest.test_util(3), nfstest_alloc(1), nfstest_cache(1), nfstest_delegation(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_rdma(1), nfstest_sparse(1), nfstest_ssc(1), nfstest_xattr(1), nfstest_xid(1), packet.nfs.nfs3_const(3), packet.nfs.nfs4_const(3)

go read those too, iykyk πŸ“šπŸ’œ


πŸ’€ BUGS πŸ’€

No known bugs. we ate and left no crumbs, fr fr ✨


πŸ’… AUTHOR πŸ’…

Jorge Mora (mora@netapp.com) β€” ty for your service king 🫢


and that's the whole page bestie!! this was NFStest 3.2, dated 21 March 2023 β€” slay, iconic, no notes πŸ’–βœ¨πŸŽ€