NFSTEST_SSC(1)
πΈ NAME πΈ
nfstest_ssc β server side copy tests π
(you're reading the manual page for nfstest_ssc, version 1.2, section 1 of the manual β welcome bestie π«Ά)
β¨ SYNOPSIS β¨
nfstest_ssc --server <server> [options]
π¦ DESCRIPTION π¦
Okay so the whole vibe here is: verify correct functionality of server side copy. That's it, that's the mission. π
Let's set the scene, because it's giving "why do we even need this". When you copy a file over NFS the normal way, the client reads the data out of the source file and then writes that exact same data into the destination file. And the destination file can live on the same server, or it can live on a totally different server. Either way? The file data gets transferred twice β once for the read, once for the write. So much wasted motion, no cap. π
Server side copy is the glow-up that kills all that unnecessary network traffic. For an intra-server copy, the client just asks the server to do the copy <em>internally</em>, so literally no data goes over the network at all. Obsessed. And for the inter-server copy, where the destination server is a different server from the source server, the client authorizes both servers to interact <em>directly with each other</em> β they talk amongst themselves, main character energy, and the client is just the matchmaker. π§
The system call copy_file_range is what sends both the intra and the inter server side copy requests to the correct server. Iconic syscall, honestly.
So what do the basic server side copy tests actually check? They verify the actual file range from the source file(s) is copied correctly into the destination file(s). Most tests deal with a single source and a single destination file while checking the data landed right. They also verify the data is copied starting from the correct source offset and that it lands on the correct offset in the destination file. Then there are the multi-file tests: copying multiple source files to a single destination file, a single source file to multiple destination files, or N number of source files to M number of destination files. Chaos, but organized chaos. π
Some tests go full protocol-level detective mode π β they take a packet trace and inspect the actual packets sent to the server (or servers).
- For the intra-server side copy, these tests verify the
COPY/CLONEoperation is sent to the server with correct arguments. - For the inter-server side copy, these tests verify the
COPY_NOTIFYoperation is sent to the source server with correct arguments, authorizing the source server to let the destination server copy the data directly. Then the client sends theCOPYoperation to the destination server so it can initiate the actual copy.
Now, the copy itself could be synchronous or asynchronous depending on both the client and the server(s) β the client can issue either, and the server can copy the file data in either mode depending on its implementation or other factors. Either way, the tests verify correct functionality for both cases. π
- The
CB_OFFLOADoperation is used by the destination server to report the actual results of the copy once it's done. - The client can also actively query the destination server for status on a current asynchronous copy using the
OFFLOAD_STATUSoperation. - And the client has a mechanism to cancel a given asynchronous copy using the
OFFLOAD_CANCELoperation.
Negative testing is included whenever possible, because some testing just can't be done at the protocol level β the copy_file_range system call does some error checking of its own, and the NFS client won't even send a COPY_NOTIFY or COPY operation to the server, so the server never even gets to deal with the error. Rude, but okay. π The negative tests include:
- trying to copy an invalid source range
- having an invalid value for either the offset or the length
- trying to copy a region on a source file opened as write only
- a destination file opened as read only
- or the file being a non-regular file type
π 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, the user wide file$HOME/.nfstest, or the.nfstestfile 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.2]-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,rsize=4096,wsize=4096']--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 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 fortcpdump[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:256k]--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 forsudo[default:'/usr/bin/sudo']--kill=KILLβ Full path of binary forkill[default:'/usr/bin/kill']--nfsstat=NFSSTATβ Full path of binary fornfsstat[default:'/usr/sbin/nfsstat']--tcpdump=TCPDUMPβ Full path of binary fortcpdump[default:'/usr/sbin/tcpdump']--iptables=IPTABLESβ Full path of binary foriptables[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 <em>except</em> the ones listed [default:'all']--dst-server=DST_SERVERβ Destination server for inter server side copy [default:none]--dst-export=DST_EXPORTβ Destination export for inter server side copy [default:none]--ncopies=NCOPIESβ Number of concurrent copies to use onintra14andinter14tests [default:4]--src-files=SRC_FILESβ Number of source files to use concurrently onintra15andinter15tests [default:3]--dst-files=DST_FILESβ Number of destination files to use concurrently onintra15andinter15tests [default:2]--pre-write=PRE_WRITEβ Write destination file beforecopy_file_range[default:1]--locks=LOCKSβ Lock files [default:1]
and that's only part one bestie, don't go anywhere β there's more coming πβ¨
β¨ TESTS β¨
okay so this is the part where you pick your fighter. Each one is a test name you can run, and the group names are like playlists that run a bunch of them together. No cap. π
π§ͺ intra
Run all intra server side copy tests: intra01, intra02, intra03, intra04, intra05, intra06, intra07, intra08, intra09, intra10, intra11, intra12, intra13, intra14, intra15
That's the whole intra squad, bestie. β¨
π pintra
Run all positive intra server side copy tests: intra01, intra02, intra03, intra04, intra05, intra06, intra07, intra08, intra14, intra15
All the good vibes only. No failures allowed here. π
π nintra
Run all negative intra server side copy tests: intra09, intra10, intra11, intra12, intra13
The chaotic ones. They're supposed to fail, and that's iconic. π
intra01
Check it: intra server side COPY succeeds. That's it. That's the test. π
intra02
Check it: intra server side COPY succeeds when using source offset. Offset queen behavior. π
intra03
Check it: intra server side COPY succeeds when using destination offset. Destination offset, but make it fashion. π
intra04
Check it: intra server side COPY succeeds when using NULL as source offset. NULL is valid here, no cap. π
intra05
Check it: intra server side COPY succeeds when using NULL as destination offset. Again NULL, again iconic. π
intra06
Check it: intra server side COPY succeeds when using count = 0. Zero count, zero problems. π₯
intra07
Check it: intra server side COPY succeeds when the source file is opened as read/write. Source file read/write, periodt. π
intra08
Check it: intra server side COPY succeeds when the destination file is opened as read/write. Destination file read/write, slay. π
intra09
Check it: intra server side COPY fails when the source file is opened as write only. Write-only source means failure, and that's correct. π
intra10
Check it: intra server side COPY fails when the destination file is opened as read only. Read-only destination means failure, as intended. π«
intra11
Check it: intra server side COPY succeeds when source offset is beyond the end of the file. Offset past EOF, still succeeding. π
intra12
Check it: intra server side COPY succeeds when source offset plus count is beyond the end of the file. Offset plus count past EOF, still eating. π
intra13
Check it: intra server side COPY may fail when both source and destination files point to the same file. May fail, bestie. Not a guarantee. π
intra14
Check it: intra server side COPY succeeds when using multiple source and destination offsets. Multiple offsets, multiple wins. β¨
intra15
Check it: intra server side COPY succeeds when using multiple source and destination files. Multiple files, main character energy. π
πΈ inter
Run all inter server side copy tests: inter01, inter02, inter03, inter04, inter05, inter06, inter07, inter08, inter09, inter10, inter11, inter12, inter13, inter14, inter15
The inter server side copy squad, assembled. π«Ά
π pinter
Run all positive inter server side copy tests: inter01, inter02, inter03, inter04, inter05, inter06, inter07, inter08, inter13, inter14, inter15
Positive only, no negativity allowed. β¨
π ninter
Run all negative inter server side copy tests: inter09, inter10, inter11, inter12
Negative tests, but make it dramatic. They should fail. Periodt. π
inter01
Check it: inter server side COPY succeeds. Success is the vibe. β
inter02
Check it: inter server side COPY succeeds when using source offset. Source offset, but inter. Slay. π
inter03
Check it: inter server side COPY succeeds when using destination offset. Destination offset, inter edition. π
inter04
Check it: inter server side COPY succeeds when using NULL as source offset. NULL source offset? Valid and cute. π
inter05
Check it: inter server side COPY succeeds when using NULL as destination offset. NULL destination offset, still serving. π«Ά
inter06
Check it: inter server side COPY succeeds when using count = 0. count = 0, but make it succeed. π₯
inter07
Check it: inter server side COPY succeeds when the source file is opened as read/write. Read/write source, no notes. π
inter08
Check it: inter server side COPY succeeds when the destination file is opened as read/write. Read/write destination, iconic. π
inter09
Check it: inter server side COPY fails when the source file is opened as write only. Write-only source, instant fail. And that's correct. π
inter10
Check it: inter server side COPY fails when the destination file is opened as read only. Read-only destination, nope, fail. As intended. π«
inter11
Check it: inter server side COPY succeeds when source offset is beyond the end of the file. Source offset past EOF, still eating. π
inter12
Check it: inter server side COPY succeeds when source offset plus count is beyond the end of the file. Offset plus count beyond EOF, still slaying. π
inter13
Check it: inter server side COPY succeeds when both source and destination file names are the same. Same file names, still succeeding. No cap. β¨
inter14
Check it: inter server side COPY succeeds when using multiple source and destination offsets. Multiple offsets, multiple wins. π
inter15
Check it: inter server side COPY succeeds when using multiple source and destination files. Multiple files, inter style. π«Ά
π positive
Run all positive server side copy tests: intra01, intra02, intra03, intra04, intra05, intra06, intra07, intra08, intra14, intra15, inter01, inter02, inter03, inter04, inter05, inter06, inter07, inter08, inter13, inter14, inter15
All the positive ones, combined. It's giving sunshine. βοΈ
π negative
Run all negative server side copy tests: intra09, intra10, intra11, intra12, intra13, inter09, inter10, inter11, inter12
All the negative ones, combined. They're supposed to fail, and they do it beautifully. π
π all
Run all tests: intra01, intra02, intra03, intra04, intra05, intra06, intra07, intra08, intra09, intra10, intra11, intra12, intra13, intra14, intra15, inter01, inter02, inter03, inter04, inter05, inter06, inter07, inter08, inter09, inter10, inter11, inter12, inter13, inter14, inter15
Every single test. The whole buffet. Main character energy only. π
π EXAMPLES π
The only required option is --server. That's it, bestie.
$ nfstest_ssc --server 192.168.0.11
π NOTES π
okay so notes time. π
The user id in the local host and the host specified by --dst-server must have access to run commands as root using the 'sudo' command without the need for a password. No password prompts, periodt.
The user id must be able to 'ssh' to remote host without the need for a password. Passwordless ssh or bust. π«Ά
Valid only for NFS version 4.2 and above. So if you're on anything lower, this is not it. π
π SEE ALSO π
baseobj(3), 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_rdma(1), nfstest_sparse(1), nfstest_xattr(1), nfstest_xid(1), packet.nfs.nfs3_const(3), packet.nfs.nfs4_const(3)
π BUGS π
No known bugs. We love a clean slate. β¨
π AUTHOR π
Jorge Mora (mora@netapp.com)
okay bye bestie, this page was brought to you by NFStest 3.2, dated 21 March 2023, and it's the NFSTEST_SSC(1) manual. Go run some 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