3 scuzz \- SCSI target control
19 is an interactive program for exercising
21 Its intended purpose is to investigate and manipulate
22 odd devices without the effort of writing a special driver,
23 such as shuffling the media around on an optical jukebox.
24 It reads commands from standard input and applies them to a SCSI target
25 (other devices accessed through the
28 such as ATA(PI) devices,
32 is given on the command line, an
35 is immediately applied to the target.
36 On successful completion of a command,
40 is the number of bytes transferred to/from the target;
43 command line option suppresses the
49 forces the use of 6-byte SCSI commands rather than 10-byte ones.
50 Some older devices require this, though
52 attempts to adapt automatically.
57 more willing to retry I/O errors but less tolerant of other errors
60 This option is often needed to read Exabyte 8mm tapes.
63 option sets the maximum I/O transfer size to
65 Exabyte drives often require this to be 1024 or the exact tape block size
66 and some 4mm drives require this to be the exact tape block size or larger.
73 is rudimentary and prints a one line synopsis for the named
75 or for all commands if no argument is given.
81 command on all SCSI units,
82 and prints the result preceded by the name of those
83 targets which respond.
89 commands may be given at any time.
93 .BI open\ [ -r ] sddev
95 must be given before any of the remaining commands will be accepted.
105 followed by a device class-specific command to determine the
106 logical block size of the target.
110 device directory like
115 need only be given if another target is to be opened in the current
118 The remaining commands are in rough groups,
119 intended for specific classes of device.
120 With the exception of the
126 all arguments are in the style of ANSI-C integer constants.
132 checks if the unit is powered up and ready to do
140 Unit requests that a disk be brought to a known state,
141 usually by seeking to track zero.
145 positions a tape at the beginning of current partition
146 (there is usually only one partition, the beginning of tape).
149 Request Sense retrieves Sense Data concerning an error or
150 other condition and is usually issued following the completion of a command
151 that had check-condition status.
153 automatically issues a
155 in response to a check-condition status and prints the result.
159 Unit performs a ``low level'' format of a disk.
163 reports the possible block lengths for the logical unit. Tapes only.
165 .BI read " file nbytes
167 transfers data from the target to the host.
170 causes the entire device to be read.
172 .BI write " file nbytes
174 transfers data from the host to the target.
177 causes the entire input file to be transferred.
179 The first argument to the
183 commands specifies a source
188 The argument is either a plain file name or
190 followed by a command to be executed by
192 The argument may be quoted in the style of
195 .BI seek " offset whence
197 requests the target to seek to a position on a disk,
198 arguments being in the style of
204 maintains an internal notion of where the current target
214 commands all manipulate the internal offset.
216 .BI filemark " howmany
218 writes one (default) or more filemarks on a tape.
220 .BI space\ [ -b ]\ [ -f ]\ [[ "--\fP]\fIhowmany\fP]"
222 positions a tape forwards or backwards.
224 specify logical block
235 it specifies spacing backwards,
236 and should be preceded by
238 to turn off any further
244 is issued to determine the device type of a particular target,
245 and to determine some basic information about the implemented options and
248 .BI modeselect bytes...
250 .BI modeselect6 bytes...
253 is issued to set variable parameters in the target.
255 given as arguments comprise all the data for the target;
256 see an appropriate manual for the format.
257 The default is the 10-byte form of the command;
258 modeselect6 is the 6-byte version.
260 .BI modesense\ [ page [ nbytes ]]
262 .BI modesense6\ [ page [ nbytes ]]
265 reports variable and fixed parameters from the target.
269 all pages are returned.
271 specifies how many bytes should be returned.
272 The default is the 10-byte form of the command;
273 modesense6 is the 6-byte version.
287 are synonyms for Start/Stop Unit with different default values of
289 Start/Stop Unit is typically used to spin up and spin down a rotating
294 3 to eject (if the device supports ejection of the medium).
297 Read Capacity reports the number of blocks and the block
300 The following commands are specific to CD and CD-R/RW devices.
301 A brief description of each is given; see the SCSI-3
302 Multimedia Commands (MMC) Specification for details of arguments
303 and interpretation of the results.
307 .BI blank\ [ track/LBA [ type ]]
309 Type identifies the method and coverage of the blanking.
311 .BI rtoc\ [ track/session-number [ ses ]]
312 The Read TOC/PMA command transfers data from one of the tables of contents
313 (TOC or PMA) on the CD medium.
317 Provides information about disks, including incomplete CD-R/RW.
319 .BI rtrackinfo\ [ track ]
320 Provides information about a track, regardless of its status.
325 Pause/resume playback.
330 .BI cdplay\ [ track-number ]\ or\ [ -r [ "LBA\fP[\fIlength\fP]]]"
332 With no arguments, starts at the beginning of the medium.
333 If a track number is given, the table of contents is read
334 to find the playback start point.
337 option is given, block addressing is used to find the
338 playback start point.
342 .BI cdunload\ [ slot ]
343 Load/unload a disk from a changer.
346 Read the mechanism status.
348 The following commands are specific to Media Changer devices.
349 A brief description of each is given; see the SCSI-3
350 Medium Changer Commands (SMC) Specification for details of arguments.
355 Initialize element status.
357 .BI "estatus " "type " [ length ]
358 Report the status of the internal elements.
359 Type 0 reports all element types.
361 .BI "mmove " transport\ source\ destination [ invert ]
366 .B /dev/\fIsdXX\fP/raw
367 raw SCSI interface for command, I/O, and status.
369 .B /sys/src/cmd/scuzz
373 .IR "Small Computer System Interface - 2 (X3T9.2/86-109)" ,
374 Global Engineering Documents
376 .IR "SCSI Bench Reference" ,
379 .IR "SCSI-3 Multimedia Commands (MMC) Specification" ,
382 .IR "SCSI-3 Medium Changer Commands (SMC) Specification" ,
385 Only a limited subset of SCSI commands has been implemented (as needed).
387 Only one target can be open at a time.
389 LUNs other than 0 are not supported.
391 No way to force 10-byte commands, though they are the default.
393 Should be recoded to use
395 in order to get more complete sense code descriptions.
398 betrays its origins by spelling
402 even though the devices it manipulates are spelled with a
407 value is currently limited to 245760
408 to limit kernel memory consumption.
410 It may be necessary to set
412 to exactly the block size used to write a tape
413 in order to read it on some drives.