1NFSTEST_SSC(1) nfstest_ssc 1.2 NFSTEST_SSC(1)
2
3
4
6 nfstest_ssc - Server side copy tests
7
9 nfstest_ssc --server <server> [options]
10
12 Verify correct functionality of server side copy
13
14 Copying a file via NFS the client reads the data from the source file
15 and then writes the same data to the destination file which is located
16 in the same server or it could be located in a different server. Either
17 way the file data is transferred twice, once for reading and the second
18 for writing. Server side copy allows unnecessary network traffic to be
19 eliminated. The intra-server copy allows the client to request the
20 server to perform the copy internally thus avoiding any data being sent
21 through the network at all. In the case for the inter-server copy where
22 the destination server is different from the source server, the client
23 authorizes both servers to interact directly with one another.
24
25 The system call copy_file_range is used to send both intra and inter
26 server side copy requests to the correct server.
27
28 Basic server side copy tests verify the actual file range from the
29 source file(s) are copied correctly to the destination file(s). Most
30 tests deal with a single source and destination file while verifying
31 the data is copied correctly. Also it verifies the data is copied
32 starting from the correct source offset and it is copied to the correct
33 offset on the destination file. Other tests deal with multiple files:
34 copying multiple source files to a single destination file, a single
35 source file to multiple destination files, or N number of source files
36 to M number of destination files.
37
38 Some tests include testing at the protocol level by taking a packet
39 trace and inspecting the actual packets sent to the server or servers.
40 For the intra-server side copy, these tests verify the COPY/CLONE oper‐
41 ation is sent to the server with correct arguments. For the inter-
42 server side copy, these tests verify the COPY_NOTIFY operation is sent
43 to the source server with correct arguments to authorize the source
44 server to allow the destination server to copy the data directly; then
45 the client sends the COPY operation to the destination server so it
46 could initiate the actual copy.
47
48 The server side copy could either be synchronous or asynchronous de‐
49 pending on both client and server(s). The client could issue either a
50 synchronous or asynchronous copy and the server could either copy the
51 file data in either mode depending on implementation or other factors.
52 In either case, the tests verify the correct functionality for both
53 cases. The CB_OFFLOAD operation is used by the destination server to
54 report the actual results of the copy when it is done. The client could
55 also actively query the destination server for status on a current
56 asynchronous copy using the OFFLOAD_STATUS operation. Also the client
57 has a mechanism to cancel a given asynchronous copy using the OFF‐
58 LOAD_CANCEL operation.
59
60 Negative testing is included whenever possible since some testing can‐
61 not be done at the protocol level because the copy_file_range system
62 call does some error checking of its own and the NFS client won't even
63 send a COPY_NOTIFY or COPY operation to the server letting the server
64 deal with the error. Negative tests include trying to copy an invalid
65 source range, having an invalid value for either the offset or the
66 length, trying to copy a region on a source file opened as write only,
67 a destination file opened as read only or the file is a non-regular
68 file type.
69
70
71
73 --version
74 show program's version number and exit
75
76 -h, --help
77 show this help message and exit
78
79 -f FILE, --file=FILE
80 File where options are specified besides the system wide file
81 /etc/nfstest, user wide file $HOME/.nfstest or in the current
82 directory .nfstest file
83
84
85 NFS specific options:
86 -s SERVER, --server=SERVER
87 Server name or IP address
88
89 -e EXPORT, --export=EXPORT
90 Exported file system to mount [default: '/']
91
92 --nfsversion=NFSVERSION
93 NFS version, e.g., 3, 4, 4.1, etc. [default: 4.2]
94
95 -m MTPOINT, --mtpoint=MTPOINT
96 Mount point [default: '/mnt/t']
97
98 -p PORT, --port=PORT
99 NFS server port [default: 2049]
100
101 --proto=PROTO
102 NFS protocol name [default: 'tcp']
103
104 --sec=SEC
105 Security flavor [default: 'sys']
106
107 --nconnect=NCONNECT
108 Multiple TCP connections option [default: '1']
109
110 -o MTOPTS, --mtopts=MTOPTS
111 Mount options [default: 'hard,rsize=4096,wsize=4096']
112
113 --datadir=DATADIR
114 Data directory where files are created, directory is created on
115 the mount point [default: '']
116
117
118 Logging options:
119 -v VERBOSE, --verbose=VERBOSE
120 Verbose level for debug messages [default:
121 'opts|info|dbg1|dbg2|dbg3']
122
123 --tverbose=TVERBOSE
124 Verbose level for test messages [default: '1']
125
126 --createlog
127 Create log file
128
129 --rexeclog
130 Create rexec log files
131
132 --warnings
133 Display warnings
134
135 --tag=TAG
136 Informational tag, it is displayed as an INFO message [default:
137 '']
138
139 --notty
140 Do not use terminal colors on output
141
142 --isatty
143 Use terminal colors on output -- useful when running with nohup
144
145
146 Packet trace options:
147 --createtraces
148 Create a packet trace for each test
149
150 --tbsize=TBSIZE
151 Capture buffer size for tcpdump [default: 192k]
152
153 --trcdelay=TRCDELAY
154 Seconds to delay before stopping packet trace [default: 2.0]
155
156 --keeptraces
157 Do not remove any trace files [default: remove trace files if no
158 errors]
159
160 --rmtraces
161 Remove trace files [default: remove trace files if no errors]
162
163 -i INTERFACE, --interface=INTERFACE
164 Device interface [default: automatically selected]
165
166
167 File options:
168 --nfiles=NFILES
169 Number of files to create [default: 2]
170
171 --filesize=FILESIZE
172 File size to use for test files [default: 256k]
173
174 --rsize=RSIZE
175 Read size to use when reading files [default: 4k]
176
177 --wsize=WSIZE
178 Write size to use when writing files [default: 4k]
179
180 --iodelay=IODELAY
181 Seconds to delay I/O operations [default: 0.1]
182
183 --offset-delta=OFFSET_DELTA
184 Read/Write offset delta [default: 4k]
185
186
187 Path options:
188 --sudo=SUDO
189 Full path of binary for sudo [default: '/usr/bin/sudo']
190
191 --kill=KILL
192 Full path of binary for kill [default: '/usr/bin/kill']
193
194 --nfsstat=NFSSTAT
195 Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
196
197 --tcpdump=TCPDUMP
198 Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
199
200 --iptables=IPTABLES
201 Full path of binary for iptables [default: '/usr/sbin/iptables']
202
203 --messages=MESSAGES
204 Full path of log messages file [default: '/var/log/messages']
205
206 --trcevents=TRCEVENTS
207 Full path of tracing events directory [default: '/sys/kernel/de‐
208 bug/tracing/events']
209
210 --trcpipe=TRCPIPE
211 Full path of trace pipe file [default: '/sys/kernel/debug/trac‐
212 ing/trace_pipe']
213
214 --tmpdir=TMPDIR
215 Temporary directory [default: '/tmp']
216
217
218 Debug options:
219 --nocleanup
220 Do not cleanup created files
221
222 --notimestamps
223 Do not display timestamps in debug messages
224
225 --bugmsgs=BUGMSGS
226 File containing test messages to mark as bugs if they failed
227
228 --nomount
229 Do not mount server and run the tests on local disk space
230
231 --basename=BASENAME
232 Base name for all files and logs [default: automatically gener‐
233 ated]
234
235 --nfsdebug=NFSDEBUG
236 Set NFS kernel debug flags and save log messages [default: '']
237
238 --rpcdebug=RPCDEBUG
239 Set RPC kernel debug flags and save log messages [default: '']
240
241 --tracepoints=TRACEPOINTS
242 List of trace points modules to enable [default: '']
243
244 --nfsstats
245 Get NFS stats [default: 'False']
246
247 --pktdisp
248 Display main packets related to the given test
249
250 --nfserrors
251 Fail every NFS error found in the packet trace
252
253 --client-ipaddr=CLIENT_IPADDR
254 IP address of localhost
255
256
257 Reporting options:
258 --xunit-report
259 Generate xUnit compatible test report
260
261 --xunit-report-file=XUNIT_REPORT_FILE
262 Path to xout report file
263
264
265 Test options:
266 --runtest=RUNTEST
267 Comma separated list of tests to run, if list starts with a '^'
268 then all tests are run except the ones listed [default: 'all']
269
270 --dst-server=DST_SERVER
271 Destination server for inter server side copy [default: none]
272
273 --dst-export=DST_EXPORT
274 Destination export for inter server side copy [default: none]
275
276 --ncopies=NCOPIES
277 Number of concurrent copies to use on intra14 and inter14 tests
278 [default: 4]
279
280 --src-files=SRC_FILES
281 Number of source files to use concurrently on intra15 and in‐
282 ter15 tests [default: 3]
283
284 --dst-files=DST_FILES
285 Number of destination files to use concurrently on intra15 and
286 inter15 tests [default: 2]
287
288 --pre-write=PRE_WRITE
289 Write destination file before copy_file_range [default: 1]
290
291 --locks=LOCKS
292 Lock files [default: 1]
293
295 intra
296 Run all intra server side copy tests: intra01, intra02, intra03,
297 intra04, intra05, intra06, intra07, intra08, intra09, intra10, intra11,
298 intra12, intra13, intra14, intra15
299
300 pintra
301 Run all positive intra server side copy tests: intra01, intra02,
302 intra03, intra04, intra05, intra06, intra07, intra08, intra14, intra15
303
304 nintra
305 Run all negative intra server side copy tests: intra09, intra10,
306 intra11, intra12, intra13
307
308 intra01
309 Verify intra server side COPY succeeds
310
311 intra02
312 Verify intra server side COPY succeeds when using source offset
313
314 intra03
315 Verify intra server side COPY succeeds when using destination offset
316
317 intra04
318 Verify intra server side COPY succeeds when using NULL as source offset
319
320 intra05
321 Verify intra server side COPY succeeds when using NULL as destination
322 offset
323
324 intra06
325 Verify intra server side COPY succeeds when using count = 0
326
327 intra07
328 Verify intra server side COPY succeeds when the source file is opened
329 as read/write
330
331 intra08
332 Verify intra server side COPY succeeds when the destination file is
333 opened as read/write
334
335 intra09
336 Verify intra server side COPY fails when the source file is opened
337 as write only
338
339 intra10
340 Verify intra server side COPY fails when the destination file is opened
341 as read only
342
343 intra11
344 Verify intra server side COPY succeeds when source offset is beyond the
345 end of the file
346
347 intra12
348 Verify intra server side COPY succeeds when source offset plus count
349 is beyond the end of the file
350
351 intra13
352 Verify intra server side COPY may fail when both source and destination
353 files point to the same file
354
355 intra14
356 Verify intra server side COPY succeeds when using multiple source and
357 destination offsets
358
359 intra15
360 Verify intra server side COPY succeeds when using multiple source and
361 destination files
362
363 inter
364 Run all inter server side copy tests: inter01, inter02, inter03,
365 inter04, inter05, inter06, inter07, inter08, inter09, inter10, inter11,
366 inter12, inter13, inter14, inter15
367
368 pinter
369 Run all positive inter server side copy tests: inter01, inter02,
370 inter03, inter04, inter05, inter06, inter07, inter08, inter13, inter14,
371 inter15
372
373 ninter
374 Run all negative inter server side copy tests: inter09, inter10,
375 inter11, inter12
376
377 inter01
378 Verify inter server side COPY succeeds
379
380 inter02
381 Verify inter server side COPY succeeds when using source offset
382
383 inter03
384 Verify inter server side COPY succeeds when using destination offset
385
386 inter04
387 Verify inter server side COPY succeeds when using NULL as source offset
388
389 inter05
390 Verify inter server side COPY succeeds when using NULL as destination
391 offset
392
393 inter06
394 Verify inter server side COPY succeeds when using count = 0
395
396 inter07
397 Verify inter server side COPY succeeds when the source file is opened
398 as read/write
399
400 inter08
401 Verify inter server side COPY succeeds when the destination file is
402 opened as read/write
403
404 inter09
405 Verify inter server side COPY fails when the source file is opened
406 as write only
407
408 inter10
409 Verify inter server side COPY fails when the destination file is opened
410 as read only
411
412 inter11
413 Verify inter server side COPY succeeds when source offset is beyond the
414 end of the file
415
416 inter12
417 Verify inter server side COPY succeeds when source offset plus count
418 is beyond the end of the file
419
420 inter13
421 Verify inter server side COPY succeeds when both source and destination
422 file names are the same
423
424 inter14
425 Verify inter server side COPY succeeds when using multiple source and
426 destination offsets
427
428 inter15
429 Verify inter server side COPY succeeds when using multiple source and
430 destination files
431
432 positive
433 Run all positive server side copy tests: intra01, intra02, intra03,
434 intra04, intra05, intra06, intra07, intra08, intra14, intra15, inter01,
435 inter02, inter03, inter04, inter05, inter06, inter07, inter08, inter13,
436 inter14, inter15
437
438 negative
439 Run all negative server side copy tests: intra09, intra10, intra11,
440 intra12, intra13, inter09, inter10, inter11, inter12
441
442 all
443 Run all tests: intra01, intra02, intra03, intra04, intra05, intra06,
444 intra07, intra08, intra09, intra10, intra11, intra12, intra13, intra14,
445 intra15, inter01, inter02, inter03, inter04, inter05, inter06, inter07,
446 inter08, inter09, inter10, inter11, inter12, inter13, inter14, inter15
447
449 The only required option is --server
450 $ nfstest_ssc --server 192.168.0.11
451
453 The user id in the local host and the host specified by --dst-server
454 must have access to run commands as root using the 'sudo' command with‐
455 out the need for a password.
456
457 The user id must be able to 'ssh' to remote host without the need for a
458 password.
459
460 Valid only for NFS version 4.2 and above.
461
463 baseobj(3), formatstr(3), nfstest.test_util(3), nfstest_alloc(1), nf‐
464 stest_cache(1), nfstest_delegation(1), nfstest_dio(1), nfstest_fcmp(1),
465 nfstest_file(1), nfstest_interop(1), nfstest_io(1), nfstest_lock(1),
466 nfstest_pkt(1), nfstest_pnfs(1), nfstest_posix(1), nfstest_rdma(1), nf‐
467 stest_sparse(1), nfstest_xattr(1), nfstest_xid(1),
468 packet.nfs.nfs3_const(3), packet.nfs.nfs4_const(3)
469
470
472 No known bugs.
473
475 Jorge Mora (mora@netapp.com)
476
477
478
479NFStest 3.2 21 March 2023 NFSTEST_SSC(1)