2 .\" Copyright (c) 2015 Spectra Logic Corporation
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions, and the following disclaimer,
10 .\" without modification.
11 .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 .\" substantially similar to the "NO WARRANTY" disclaimer below
13 .\" ("Disclaimer") and any redistribution must be conditioned upon
14 .\" including a substantially similar Disclaimer requirement for further
15 .\" binary redistribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
21 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGES.
30 .\" Authors: Ken Merry (Spectra Logic Corporation)
39 .Nd CAM data transfer utility
42 .Aq Fl i|o Ar pass=pass_dev|file=filename,bs=blocksize,[...]
43 .Op Fl C Ar retry_count
52 utility is a sequential data transfer utility that offers standard
56 operation in addition to a mode that uses the asynchronous
61 API allows multiple requests to be queued to a device simultaneously.
64 collects performance information and will display it when the transfer
67 is terminated or when it receives a SIGINFO signal.
69 The following options are available:
72 Specify the input and output device or file.
78 There are a number of parameters that can be specified.
79 One of the first two (file or pass) MUST be specified to indicate which I/O
80 method to use on the device in question.
88 access the device in question be accessed via the asynchronous
92 The device name can be a
94 name and unit number, for instance
96 or a regular peripheral driver name and unit number, for instance
98 It can also be the path of a
100 or other disk device, like
102 It may also be a bus:target:lun, for example:
109 disk-like devices are supported.
111 devices are not currently supported, but support could be added later.
114 Direct Access (type 0), WORM (type 4), CDROM (type 5), and RBC (Reduced
115 Block Command, type 14) devices are supported.
116 Tape drives, medium changers, enclosures etc. are not supported.
118 Specify a file or device to operate on.
119 This requests that the file or device in question be accessed using the
125 The file interface does not support queueing multiple commands at a time.
126 It does support probing disk sector size and capacity information, and tape
127 blocksize and maximum transfer size information.
128 The file interface supports standard files, disks, tape drives, special
129 devices, pipes and standard input and output.
130 If the file is specified as a
132 standard input or standard output are used.
133 For tape devices, the specified blocksize will be the size that
135 attempts to use to write to or read from the tape.
136 When writing to a tape device, the blocksize is treated like a disk sector
140 will not write anything smaller than the sector size.
141 At the end of a transfer, if there isn't sufficient data from the reader
142 to yield a full block,
144 will add zeros on the end of the data from the reader to make up a full
147 Specify the blocksize to use for transfers.
149 will attempt to read or write using the requested blocksize.
151 Note that the blocksize given only applies to either the input or the
153 To use the same blocksize for the input and output transfers, you must
154 specify that blocksize with both the
160 The blocksize may be specified in bytes, or using any suffix (e.g. k, M, G)
162 .Xr expand_number 3 .
164 Specify the starting offset for the input or output device or file.
165 The offset may be specified in bytes, or by using any suffix (e.g. k, M, G)
167 .Xr expand_number 3 .
169 Specify a desired queue depth for the input or output path.
171 will attempt to keep the requested number of requests of the specified
172 blocksize queued to the input or output device.
173 Queue depths greater than 1 are only supported for the asynchronous
176 The queue depth is maintained on a best effort basis, and may not be
177 possible to maintain for especially fast devices.
178 For writes, maintaining the queue depth also depends on a sufficiently
181 Specify the minimum command size to use for
184 Some devices do not support 6 byte
189 device handles this restriction automatically, but the
191 device allows the user to specify the
194 If a device does not accept 6 byte
196 READ/WRITE commands (which is the default at lower LBAs), it will generally
201 Specify the debug level for this device.
202 There is currently only one debug level setting, so setting this to any
203 non-zero value will turn on debugging.
204 The debug facility may be expanded in the future.
207 Specify the retry count for commands sent via the asynchronous
210 This does not apply to commands sent via the file interface.
212 Enable kernel error recovery for the
215 If error recovery is not enabled, unit attention conditions and other
216 transient failures may cause the transfer to fail.
218 Specify the maximum amount of data to be transferred.
219 This may be specified in bytes, or by using any suffix (e.g. K, M, G)
221 .Xr expand_number 3 .
223 Specify the command timeout in seconds to use for commands sent via the
227 Enable verbose reporting of errors.
228 This is recommended to aid in debugging any
239 receives a SIGINFO signal, it will print the current input and output byte
240 counts, elapsed runtime and average throughput.
243 receives a SIGINT signal, it will print the current input and output byte
244 counts, elapsed runtime and average throughput and then exit.
246 .Dl camdd -i pass=da8,bs=512k,depth=4 -o pass=da3,bs=512k,depth=4
248 Copy all data from da8 to da3 using a blocksize of 512k for both drives,
249 and attempt to maintain a queue depth of 4 on both the input and output
251 The transfer will stop when the end of either device is reached.
253 .Dl camdd -i file=/dev/zero,bs=1M -o pass=da5,bs=1M,depth=4 -m 100M
255 Read 1MB blocks of zeros from /dev/zero, and write them to da5 with a
256 desired queue depth of 4.
257 Stop the transfer after 100MB has been written.
259 .Dl camdd -i pass=da8,bs=1M,depth=3 -o file=disk.img
261 Copy disk da8 using a 1MB blocksize and desired queue depth of 3 to the
264 .Dl camdd -i file=/etc/rc -o file=-
266 Read the file /etc/rc and write it to standard output.
268 .Dl camdd -i pass=da10,bs=64k,depth=16 -o file=/dev/nsa0,bs=128k
270 Copy 64K blocks from the disk da10 with a queue depth of 16, and write
271 to the tape drive sa0 with a 128k blocksize.
272 The copy will stop when either the end of the disk or tape is reached.
283 .An Kenneth Merry Aq Mt ken@FreeBSD.org