NAME
scuzz – SCSI target control |
SYNOPSIS
scuzz [ –6eq ] [ –m max–xfer ] [ [ –r ] sddev ] |
DESCRIPTION
Scuzz is an interactive program for exercising raw SCSI devices.
Its intended purpose is to investigate and manipulate odd devices
without the effort of writing a special driver, such as shuffling
the media around on an optical jukebox. It reads commands from
standard input and applies them to a SCSI target (other
devices accessed through the sd(3) interface, such as ATA(PI)
devices, may also work). If sddev is given on the command line,
an open (see below) is immediately applied to the target. On successful
completion of a command, ok n is printed, where n is the number
of bytes transferred to/from the target; the –q
command line option suppresses the ok message.
The –6 forces the use of 6–byte SCSI commands rather than 10–byte
ones. Some older devices require this, though scuzz attempts to
adapt automatically. The –e makes scuzz more willing to retry I/O
errors but less tolerant of other errors and implies –6. This option
is often needed to read Exabyte 8mm tapes. The
–m option sets the maximum I/O transfer size to max–xfer. Exabyte
drives often require this to be 1024 or the exact tape block size
and some 4mm drives require this to be the exact tape block size
or larger. Commands
The help and probe commands may be given at any time.
The remaining commands are in rough groups, intended for specific
classes of device. With the exception of the read, write, and
space commands, all arguments are in the style of ANSI–C integer
constants.
modeselectbytes... modeselect6bytes...
modesense6 [page[nbytes]]
stop [code] eject [code] ingest [code]
The following commands are specific to CD and CD–R/RW devices.
A brief description of each is given; see the SCSI–3 Multimedia
Commands (MMC) Specification for details of arguments and interpretation
of the results.
cdresumePause/resume playback. cdstop Stop playback. cdplay [track–number] or [–r[LBA[length]]]
cdunload [slot]
The following commands are specific to Media Changer devices.
A brief description of each is given; see the SCSI–3 Medium Changer
Commands (SMC) Specification for details of arguments.
|
FILES
/dev/sdXX/raw raw SCSI interface for command, I/O, and status. |
SOURCE
/sys/src/cmd/scuzz |
SEE ALSO
sd(3) Small Computer System Interface – 2 (X3T9.2/86–109), .}f Global Engineering Documents SCSI Bench Reference, ENDL Publications SCSI–3 Multimedia Commands (MMC) Specification, www.t10.org SCSI–3 Medium Changer Commands (SMC) Specification, .}f www.t10.org |
BUGS
Only a limited subset of SCSI commands has been implemented (as
needed). Only one target can be open at a time. LUNs other than 0 are not supported. No way to force 10–byte commands, though they are the default. Should be recoded to use scsi(2) in order to get more complete sense code descriptions. Scuzz betrays its origins by spelling rdiscinfo with a c even though the devices it manipulates are spelled with a k. The max–xfer value is currently limited to 245760 to limit kernel memory consumption.
It may be necessary to set max–xfer to exactly the block size used
to write a tape in order to read it on some drives. |