Scroll to navigation

NFSTEST_SSC(1) nfstest_ssc 1.2 NFSTEST_SSC(1)

NAME

nfstest_ssc - Server side copy tests

SYNOPSIS

nfstest_ssc --server <server> [options]

DESCRIPTION

Verify correct functionality of server side copy

Copying a file via NFS the client reads the data from the source file and then writes the same data to the destination file which is located in the same server or it could be located in a different server. Either way the file data is transferred twice, once for reading and the second for writing. Server side copy allows unnecessary network traffic to be eliminated. The intra-server copy allows the client to request the server to perform the copy internally thus avoiding any data being sent through the network at all. In the case for the inter-server copy where the destination server is different from the source server, the client authorizes both servers to interact directly with one another.

The system call copy_file_range is used to send both intra and inter server side copy requests to the correct server.

Basic server side copy tests verify the actual file range from the source file(s) are copied correctly to the destination file(s). Most tests deal with a single source and destination file while verifying the data is copied correctly. Also it verifies the data is copied starting from the correct source offset and it is copied to the correct offset on the destination file. Other tests deal with multiple files: 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.

Some tests include testing at the protocol level by taking a packet trace and inspecting the actual packets sent to the server or servers. For the intra-server side copy, these tests verify the COPY/CLONE operation is sent to the server with correct arguments. For the inter-server side copy, these tests verify the COPY_NOTIFY operation is sent to the source server with correct arguments to authorize the source server to allow the destination server to copy the data directly; then the client sends the COPY operation to the destination server so it could initiate the actual copy.

The server side copy could either be synchronous or asynchronous depending on both client and server(s). The client could issue either a synchronous or asynchronous copy and the server could either copy the file data in either mode depending on implementation or other factors. In either case, the tests verify the correct functionality for both cases. The CB_OFFLOAD operation is used by the destination server to report the actual results of the copy when it is done. The client could also actively query the destination server for status on a current asynchronous copy using the OFFLOAD_STATUS operation. Also the client has a mechanism to cancel a given asynchronous copy using the OFFLOAD_CANCEL operation.

Negative testing is included whenever possible since some testing cannot be done at the protocol level because 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 letting the server deal with the error. 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 is a non-regular file type.

OPTIONS

show program's version number and exit
show this help message and exit
File where options are specified besides the system wide file /etc/nfstest, user wide file $HOME/.nfstest or in the current directory .nfstest file

NFS specific options:

Server name or IP address
Exported file system to mount [default: '/']
NFS version, e.g., 3, 4, 4.1, etc. [default: 4.2]
Mount point [default: '/mnt/t']
NFS server port [default: 2049]
NFS protocol name [default: 'tcp']
Security flavor [default: 'sys']
Multiple TCP connections option [default: '1']
Mount options [default: 'hard,rsize=4096,wsize=4096']
Data directory where files are created, directory is created on the mount point [default: '']

Logging options:

Verbose level for debug messages [default: 'opts|info|dbg1|dbg2|dbg3']
Verbose level for test messages [default: '1']
Create log file
Create rexec log files
Display warnings
Informational tag, it is displayed as an INFO message [default: '']
Do not use terminal colors on output
Use terminal colors on output -- useful when running with nohup

Packet trace options:

Create a packet trace for each test
Capture buffer size for tcpdump [default: 192k]
Seconds to delay before stopping packet trace [default: 2.0]
Do not remove any trace files [default: remove trace files if no errors]
Remove trace files [default: remove trace files if no errors]
Device interface [default: automatically selected]

File options:

Number of files to create [default: 2]
File size to use for test files [default: 256k]
Read size to use when reading files [default: 4k]
Write size to use when writing files [default: 4k]
Seconds to delay I/O operations [default: 0.1]
Read/Write offset delta [default: 4k]

Path options:

Full path of binary for sudo [default: '/usr/bin/sudo']
Full path of binary for kill [default: '/usr/bin/kill']
Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
Full path of binary for iptables [default: '/usr/sbin/iptables']
Full path of log messages file [default: '/var/log/messages']
Full path of tracing events directory [default: '/sys/kernel/debug/tracing/events']
Full path of trace pipe file [default: '/sys/kernel/debug/tracing/trace_pipe']
Temporary directory [default: '/tmp']

Debug options:

Do not cleanup created files
Do not display timestamps in debug messages
File containing test messages to mark as bugs if they failed
Do not mount server and run the tests on local disk space
Base name for all files and logs [default: automatically generated]
Set NFS kernel debug flags and save log messages [default: '']
Set RPC kernel debug flags and save log messages [default: '']
List of trace points modules to enable [default: '']
Get NFS stats [default: 'False']
Display main packets related to the given test
Fail every NFS error found in the packet trace
IP address of localhost

Reporting options:

Generate xUnit compatible test report
Path to xout report file

Test options:

Comma separated list of tests to run, if list starts with a '^' then all tests are run except the ones listed [default: 'all']
Destination server for inter server side copy [default: none]
Destination export for inter server side copy [default: none]
Number of concurrent copies to use on intra14 and inter14 tests [default: 4]
Number of source files to use concurrently on intra15 and inter15 tests [default: 3]
Number of destination files to use concurrently on intra15 and inter15 tests [default: 2]
Write destination file before copy_file_range [default: 1]
Lock files [default: 1]

TESTS

intra

Run all intra server side copy tests: intra01, intra02, intra03,
intra04, intra05, intra06, intra07, intra08, intra09, intra10, intra11,
intra12, intra13, intra14, intra15

pintra

Run all positive intra server side copy tests: intra01, intra02,
intra03, intra04, intra05, intra06, intra07, intra08, intra14, intra15

nintra

Run all negative intra server side copy tests: intra09, intra10,
intra11, intra12, intra13

intra01

Verify intra server side COPY succeeds

intra02

Verify intra server side COPY succeeds when using source offset

intra03

Verify intra server side COPY succeeds when using destination offset

intra04

Verify intra server side COPY succeeds when using NULL as source offset

intra05

Verify intra server side COPY succeeds when using NULL as destination
offset

intra06

Verify intra server side COPY succeeds when using count = 0

intra07

Verify intra server side COPY succeeds when the source file is opened
as read/write

intra08

Verify intra server side COPY succeeds when the destination file is
opened as read/write

intra09

Verify intra server side COPY fails when the source file is opened
as write only

intra10

Verify intra server side COPY fails when the destination file is opened
as read only

intra11

Verify intra server side COPY succeeds when source offset is beyond the
end of the file

intra12

Verify intra server side COPY succeeds when source offset plus count
is beyond the end of the file

intra13

Verify intra server side COPY may fail when both source and destination
files point to the same file

intra14

Verify intra server side COPY succeeds when using multiple source and
destination offsets

intra15

Verify intra server side COPY succeeds when using multiple source and
destination files

inter

Run all inter server side copy tests: inter01, inter02, inter03,
inter04, inter05, inter06, inter07, inter08, inter09, inter10, inter11,
inter12, inter13, inter14, inter15

pinter

Run all positive inter server side copy tests: inter01, inter02,
inter03, inter04, inter05, inter06, inter07, inter08, inter13, inter14,
inter15

ninter

Run all negative inter server side copy tests: inter09, inter10,
inter11, inter12

inter01

Verify inter server side COPY succeeds

inter02

Verify inter server side COPY succeeds when using source offset

inter03

Verify inter server side COPY succeeds when using destination offset

inter04

Verify inter server side COPY succeeds when using NULL as source offset

inter05

Verify inter server side COPY succeeds when using NULL as destination
offset

inter06

Verify inter server side COPY succeeds when using count = 0

inter07

Verify inter server side COPY succeeds when the source file is opened
as read/write

inter08

Verify inter server side COPY succeeds when the destination file is
opened as read/write

inter09

Verify inter server side COPY fails when the source file is opened
as write only

inter10

Verify inter server side COPY fails when the destination file is opened
as read only

inter11

Verify inter server side COPY succeeds when source offset is beyond the
end of the file

inter12

Verify inter server side COPY succeeds when source offset plus count
is beyond the end of the file

inter13

Verify inter server side COPY succeeds when both source and destination
file names are the same

inter14

Verify inter server side COPY succeeds when using multiple source and
destination offsets

inter15

Verify inter server side COPY succeeds when using multiple source and
destination files

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

negative

Run all negative server side copy tests: intra09, intra10, intra11,
intra12, intra13, inter09, inter10, inter11, inter12

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

EXAMPLES

The only required option is --server
$ nfstest_ssc --server 192.168.0.11

NOTES

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.

The user id must be able to 'ssh' to remote host without the need for a password.

Valid only for NFS version 4.2 and above.

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.

AUTHOR

Jorge Mora (mora@netapp.com)

21 March 2023 NFStest 3.2