Content
Dateianzeige für mtx (3.4.0)
usr/share/doc/mtx/mtx.txt
Das mtx-Package
Dieses Package stellt Tools zur Steuerung von SCSI Bandlaufwerken und
Bandlaufwerks-Wechsler zur Verfuegung.
mtx-Homepage: http://sourceforge.net/projects/mtx
Es sind folgende Tools enthalten:
mtx: Medienwechsel
tapeinfo: Informationen ueber das Bandlaufwerk
loaderinfo: Informationen ueber den Medienlader
scsitape, scsieject: Sendet Kommandos an das Bandlaufwerk
--------------------------------------------------------------------------
LOADERINFO(1) General Commands Manual LOADERINFO(1)
NAME
loaderinfo - report SCSI tape device info
SYNOPSIS
loaderinfo -f
DESCRIPTION
The loaderinfo command reads various information from SCSI tape load-
ers. Its intended use is for high-level programs that are trying to
decide what the capabilities of a device are.
The following are printed:
Element Address Assignment Page:
This tells how many elements are in the loader, and what
their raw hardware addresses are.
Transport Geometry Descriptor Page:
Will display whether media is invertible or not (usable with
some optical jukeboxes for detirmining whether to "flip"
media after writing to the first side).
Device Capabilities Page
Currently will only display whether we can transfer between
slots (i.e. whether 'mtx transfer' works).
Inquiry Page
Aside from the normal inquiry info, will also print out
whether we have a bar code reader (for loaders that support
the Exabyte extension for reporting presense of said reader).
OPTIONS
The first argument, given following -f , is the SCSI generic device
corresponding to your tape loader. Consult your operating system's
documentation for more information (for example, under Linux these are
generally start at /dev/sg0 under FreeBSD these start at /dev/pass0).
Under FreeBSD, 'camcontrol devlist' will tell you what SCSI devices you
have, along with which 'pass' device controls them. Under Linux, "cat
/proc/scsi/scsi" will tell you what SCSI devices you have. Under
Solaris 8, find /devices -name '*changer*' will display the device
names for your attached changers. Make sure to configure your 'sgen'
driver first.
BUGS AND LIMITATIONS
This program has only been tested on Linux with a limited number of
loaders (Ecrix Autopack, Exabyte 220).
AVAILABILITY
loaderinfo is currently being maintained by Robert Nelson as part of the 'mtx' suite of programs. The
'mtx' home page is http://mtx.sourceforge.net and the actual code is
currently available there and via SVN from http://source-
forge.net/projects/mtx.
SEE ALSO
mt(1),tapeinfo(1),mtx(1)
LOADERINFO1.0 LOADERINFO(1)
--------------------------------------------------------------------------
MTX(1) General Commands Manual MTX(1)
NAME
mtx - control SCSI media changer devices
SYNOPSIS
mtx [-f ] [nobarcode] [invert] [noattach] command
[ command ... ]
DESCRIPTION
The mtx command controls single or multi-drive SCSI media changers such
as tape changers, autoloaders, tape libraries, or optical media juke-
boxes. It can also be used with media changers that use the 'ATTACHED'
API, presuming that they properly report the MChanger bit as required
by the SCSI T-10 SMC specification.
OPTIONS
The first argument, given following -f , is the SCSI generic device
corresponding to your media changer. Consult your operating system's
documentation for more information (for example, under Linux these are
generally /dev/sg0 through /dev/sg15, under FreeBSD these are
/dev/pass0 through /dev/passX, under SunOS it may be a file under
/dev/rdsk).
The 'invert' option will invert (flip) the media (for optical jukeboxes
that allow such) before inserting it into the drive or returning it to
the storage slot.
The 'noattach' option forces the regular media changer API even if the
media changer incorrectly reported that it uses the 'ATTACHED' API.
The 'nobarcode' option forces the loader to not request barcodes even
if the loader is capable of reporting them.
Following these options there may follow one or more robotics control
commands. Note that the 'invert' and 'noattach' options apply to ALL of
robotics control commands.
COMMANDS
--version Report the mtx version number (e.g. mtx 1.2.8) and exit.
inquiry Report the product type (Medium Changer, Tape Drive, etc.),
Vendor ID, Product ID, Revision, and whether this uses the
Attached Changer API (some tape drives use this rather than
reporting a Medium Changer on a separate LUN or SCSI
address).
noattach Make further commands use the regular media changer API
rather than the _ATTACHED API, no matter what the "Attached"
bit said in the Inquiry info. Needed with some brain-dead
changers that report Attached bit but don't respond to
_ATTACHED API.
inventory Makes the robot arm go and check what elements are in the
slots. This is needed for a few libraries like the Breece
Hill ones that do not automatically check the tape inventory
at system startup.
status Reports how many drives and storage elements are contained in
the device. For each drive, reports whether it has media
loaded in it, and if so, from which storage slot the media
originated. For each storage slot, reports whether it is
empty or full, and if the media changer has a bar code, MIC
reader, or some other way of uniquely identifying media with-
out loading it into a drive, this reports the volume tag
and/or alternate volume tag for each piece of media. For
historical reasons drives are numbered from 0 and storage
slots are numbered from 1.
load [ ]
Load media from slot into drive . Drive 0
is assumed if the drive number is omitted.
unload [] [ ]
Unloads media from drive into slot . If
is omitted, defaults to drive 0 (as do all com-
mands). If is omitted, defaults to the slot that
the drive was loaded from. Note that there's currently no way
to say 'unload drive 1's media to the slot it came from',
other than to explicitly use that slot number as the destina-
tion.
[eepos ] transfer
Transfers media from one slot to another, assuming that your
mechanism is capable of doing so. Usually used to move media
to/from an import/export port. 'eepos' is used to
extend/retract the import/export tray on certain mid-range to
high end tape libraries (if, e.g., the tray was slot 32, you
might say say 'eepos 1 transfer 32 32' to extend the tray).
Valid values for eepos are 0 (do nothing to the
import/export tray), 1, and 2 (what 1 and 2 do varies depend-
ing upon the library, consult your library's SCSI-level docu-
mentation).
[eepos ] [invert] [invert2] exchange
[]
Move medium from the first slot to the second slot, placing
the medium currently in the second slot either back into the
first slot or into the optional third slot.
first []
Loads drive from the first slot in the media
changer. Unloads the drive if there is already media in it
(note: you may need to eject the tape using your OS's tape
control commands first). Note that this command may not be
what you want on large tape libraries -- e.g. on Exabyte 220,
the first slot is usually a cleaning tape. If is
omitted, defaults to first drive.
last []
Loads drive from the last slot in the media
changer. Unloads the drive if there is already a tape in it.
(Note: you may need to eject the tape using your OS's tape
control commands first).
next []
Unloads the drive and loads the next tape in sequence. If the
drive was empty, loads the first tape into the drive.
position
Positions the robot at a specific slot. Needed by some chang-
ers to move to and open the import/export, or mailbox, slot.
AUTHORS
The original 'mtx' program was written by Leonard Zubkoff and exten-
sively revised for large multi-drive libraries with bar code readers by
Eric Lee Green . See 'mtx.c' for other contributors.
BUGS AND LIMITATIONS
You may need to do a 'mt offline' on the tape drive to eject the tape
before you can issue the 'mtx unload' command. The Exabyte EZ-17 and
220 in particular will happily sit there snapping the robot arm's claws
around thin air trying to grab a tape that's not there.
For some Linux distributions, you may need to re-compile the kernel to
scan SCSI LUN's in order to detect the media changer. Check
/proc/scsi/scsi to see what's going on.
If you try to unload a tape to its 'source' slot, and said slot is
full, it will instead put the tape into the first empty slot. Unfortu-
nately the list of empty slots is not updated between commands on the
command line, so if you try to unload another drive to a full 'source'
slot during the same invocation of 'mtx', it will try to unload to the
same (no longer empty) slot and will urp with a SCSI error.
This program reads the Mode Sense Element Address Assignment Page
(SCSI) and requests data on all available elements. For larger
libraries (more than a couple dozen elements) this sets a big Alloca-
tion_Size in the SCSI command block for the REQUEST_ELEMENT_STATUS com-
mand in order to be able to read the entire result of a big tape
library. Some operating systems may not be able to handle this. Ver-
sions of Linux earlier than 2.2.6, in particular, may fail this request
due to inability to find contiguous pages of memory for the SCSI trans-
fer (later versions of Linux 'sg' device do scatter-gather so that this
should no longer be a problem).
The eepos command remains in effect for all further commands on a com-
mand line. Thus you might want to follow eepos 1 transfer 32 32 with
eepos 0 as the next command (which clears the eepos bits).
Need a better name for 'eepos' command! ('eepos' is the name of the bit
field in the actual low-level SCSI command, and has nothing to do with
what it does).
This program has only been tested on Linux with a limited number of
tape loaders (a dual-drive Exabyte 220 tape library, with bar-code
reader and 21 slots, an Exabyte EZ-17 7-slot autoloader, and a Seagate
DDS-4 autochanger with 6 slots). It may not work on other operating
systems with larger libraries, due to the big SCSI request size.
Please see the projecdt page http://sourceforge.net/projects/mtx for
information on reporting bugs, requesting features and the mailing list
for peer support.
HINTS
Under Linux, cat /proc/scsi/scsi will tell you what SCSI devices you
have. You can then refer to them as /dev/sga, /dev/sgb, etc. by the
order they are reported.
Under FreeBSD, camcontrol devlist will tell you what SCSI devices you
have, along with which pass device controls them.
Under Solaris, set up your 'sgen' driver so that it'll look for tape
changers (see /kernel/drv/sgen.conf and the sgen man page), type touch
/reconfigure then reboot. You can find your changer in /devices by typ-
ing /usr/sbin/devfsadm -C to clean out no-longer-extant entries in your
/devices directory, then find /devices -name \*changer -print to find
the device name. Set the symbolic link /dev/changer to point to that
device name (if it is not doing so already).
With BRU, set your mount and unmount commands as described on the BRU
web site at http://www.bru.com to move to the next tape when backing up
or restoring. With GNU tar, see mtx.doc for an example of how to use
tar and mtx to make multi-tape backups.
AVAILABILITY
This version of mtx is currently being maintained by Robert Nelson
. The 'mtx' home page is
http://mtx.sourceforge.net and the actual code is currently available
there and via SVN from http://sourceforge.net/projects/mtx.
SEE ALSO
mt(1),loaderinfo(1),tapeinfo(1),scsitape(1),scsieject(1)
MTX1.3 MTX(1)
--------------------------------------------------------------------------
scsieject(1) General Commands Manual scsieject(1)
NAME
scsieject - control SCSI tape devices
SYNOPSIS
scsieject [-f ] commands
DESCRIPTION
The scsieject command controls SCSI devices in a platform-independent
manner. As long as 'mtx' works on the platform, so does 'scsieject'.
OPTIONS
The first argument, given following -f , is the SCSI generic device
corresponding to your tape drive. Consult your operating system's doc-
umentation for more information (for example, under Linux these are
generally /dev/sg0 through /dev/sg15, under FreeBSD these are
/dev/pass0 through /dev/passX. Under Solaris this is usually the same
as your tape drive (Solaris has a SCSI passthrough ioctl). You can set
the STAPE or TAPE environment variable rather than use -f.
COMMANDS
load Load the medium into the drive. When this command is issued
to a CD/DVD drive and the tray is extended the tray will be
retracted if the drive is capable of it.
unload Unload the medium from the drive (also known as eject). When
this command is issued to a CD/DVD drive or a tape drive the
media will be ejected if the device supports it.
start Start the device. Some devices require a start command after
a media changer has loaded new media into the device.
stop Stop the device. Some devices require a stop command prior
to unloading the medium from the device when using a media
changer.
lock Lock the device. Locks the device so that the medium cannot
be removed manually.
unlock Unlock the device. Unlocks the device so that the medium can
be removed manually.
AUTHORS
This program was written by Robert Nelson based on the scsitape program written by Eric Lee Green
. Major portions of the 'mtxl.c' library used herein
were written by Leonard Zubkoff.
HINTS
Under Linux, cat /proc/scsi/scsi will tell you what SCSI devices you
have. You can then refer to them as /dev/sga, /dev/sgb, etc. by the
order they are reported.
Under FreeBSD, camcontrol devlist will tell you what SCSI devices you
have, along with which pass device controls them.
Under Solaris 7 and 8, /usr/sbin/devfsadm -C will clean up your
/devices directory. Then find /devices -name 'st@*' -print will return
a list of all tape drives. /dev on Solaris is apparently only of his-
torical interest.
BUGS AND LIMITATIONS
There are no known bugs or limitations.
AVAILABILITY
This version of scsieject is currently being maintained by Robert Nel-
son as part of the 'mtx' suite of
programs. The 'mtx' home page is http://mtx.sourceforge.net and the
actual code is currently available there and via SVN from
http://sourceforge.net/projects/mtx.
SEE ALSO
loaderinfo(1),tapeinfo(1),mtx(1)
scsieject1.0 scsieject(1)
--------------------------------------------------------------------------
SCSITAPE(1) General Commands Manual SCSITAPE(1)
NAME
scsitape - control SCSI tape devices
SYNOPSIS
scsitape [-f ] commands
DESCRIPTION
The scsitape command controls SCSI tape drives in a platform-indepen-
dent manner. As long as 'mtx' works on the platform, so does 'scsi-
tape'.
Note that 'scsitape' and your OS's native tape driver may stomp on each
other. In particular, if you use 'setblk' and your OS's native tape
driver has a different notion of the block size, you may get evil
results. It is recommended to use 'scsitape' only for software where
you've written your own low-level READ and WRITE routines that use the
SCSI command set to directly talk to tape drives (i.e., you do not use
the OS's native tape driver at all).
OPTIONS
The first argument, given following -f , is the SCSI generic device
corresponding to your tape drive. Consult your operating system's doc-
umentation for more information (for example, under Linux these are
generally /dev/sg0 through /dev/sg15, under FreeBSD these are
/dev/pass0 through /dev/passX. Under Solaris this is usually the same
as your tape drive (Solaris has a SCSI passthrough ioctl). You can set
the STAPE or TAPE environment variable rather than use -f.
COMMANDS
setblk
Set the tape drive's SCSI block size to bytes. (NOTE: if
you are using your OS's native tape driver, THIS IS EVIL!).
fsf Go forward by tapemarks.
bsf Go to immediately previous the th previous tapemark.
(WARNING: This probably doesn't do what you expect -- e.g. if
you are immediately after a tapemark and type 'bfs 1', it
moves to immediately *before* that tape mark, for a sum total
of zero effective movement!).
eod Go to end of data.
rewind Rewind the tape drive.
eject Eject the tape currently in the drive.
erase Does a *short* erase (warning: does NOT work on all drives!).
mark
write filemarks ( 'mark 0' flushes the drive's buffers
).
seek Seek to a logical position that was reported by a previ-
ous 'tapeinfo' command.
write
write blocks from stdin to the tape. Chunk the data into
-sized chunks. *DOES NOT WRITE OUT A TAPEMARK!*
(you will need to use a subsequent mark 1 command to write
out a tape mark).
read [] [ <#blocks/#bytes> ]
read blocks from the tape, write them to stdout. If we are in
variable block mode, should be zero (note: The
maximum block size we currently support in variable block
mode is 128K, MAX_READ_SIZE will need to be turned into a
settable variable to allow bigger reads). If is
ommitted, we assume that we're in variable block mode, and
that we are going to read from tape until we hit a tapemark
or end of partition or end of tape.
AUTHORS
This program was written by Eric Lee Green . Major
portions of the 'mtxl.c' library used herein were written by Leonard
Zubkoff.
The SCSI read and write routines are based upon those that Richard Fish
wrote for Enhanced Software Technology's BRU 16.1 product, substan-
tially modified to work in our particular environment (in particular,
all the variable block stuff is new since BRU only does fixed block
reads and writes, and the BRU code uses bitmasks rather than bitfields
for the various flags and such in return values, as well as the BRU
code having a different SCSI API and having variable names considerably
shorter than the rather sesquipedalian 'mtx' identifiers). As required
by 'mtxl.c', these routines are licensed under the GNU General Public
License.
HINTS
Under Linux, cat /proc/scsi/scsi will tell you what SCSI devices you
have. You can then refer to them as /dev/sga, /dev/sgb, etc. by the
order they are reported.
Under FreeBSD, camcontrol devlist will tell you what SCSI devices you
have, along with which pass device controls them.
Under Solaris 7 and 8, /usr/sbin/devfsadm -C will clean up your
/devices directory. Then find /devices -name 'st@*' -print will return
a list of all tape drives. /dev on Solaris is apparently only of his-
torical interest.
BUGS AND LIMITATIONS
for scsitape read 0 where you are doing variable-block-size reads
and wish for bytes, it instead reads one and exactly one block from
tape and prints that (no matter what its size). Use 'dd' on the output
of scsitape if you want finer control.
scsitape read 0 attempts reads of MAX_READ_SIZE, which is currently
128K. If blocks on tape are larger than 128K, only the first 128K will
be read -- the remainder will be silently dumped in the toilet.
This program does not interact well (or at all :-) with your OS's
native tape driver. You will likely see weird things happen if you
attempt to intermingle scsitape commands with native tape driver opera-
tions. Note that BRU 16.1 for Solaris (and possibly others, but Solaris
I know about) will have a 'scsi' keyword to bypass the native tape
driver and write via direct uscsi commands, so if you use 'scsitape' to
bypass the flaws of the native Solaris driver, you can use BRU 16.1 to
write your actual tape archives. (Assuming that BRU 16.1 has been
released at the time that you read this).
AVAILABILITY
This version of scsitape is currently being maintained by Robert Nelson
as part of the 'mtx' suite of pro-
grams. The 'mtx' home page is http://mtx.sourceforge.net and the actual
code is currently available there and via SVN from http://source-
forge.net/projects/mtx.
SEE ALSO
loaderinfo(1),tapeinfo(1),mtx(1)
SCSITAPE1.0 SCSITAPE(1)
--------------------------------------------------------------------------
TAPEINFO(1) General Commands Manual TAPEINFO(1)
NAME
tapeinfo - report SCSI tape device info
SYNOPSIS
tapeinfo -f
DESCRIPTION
The tapeinfo command reads various information from SCSI tape drives
that is not generally available via most vendors' tape drivers. It
issues raw commands directly to the tape drive, using either the oper-
ating system's SCSI generic device ( e.g. /dev/sg0 on Linux, /dev/pass0
on FreeBSD) or the raw SCSI I/O ioctl on a tape device on some operat-
ing systems.
One good time to use 'tapeinfo' is immediately after a tape i/o opera-
tion has failed. On tape drives that support HP's 'tapealert' API,
'tapeinfo' will report a more exact description of what went wrong.
Do be aware that 'tapeinfo' is not a substitute for your operating sys-
tem's own 'mt' or similar tape driver control program. It is intended
to supplement, not replace, programs like 'mt' that access your operat-
ing system's tape driver in order to report or set information.
OPTIONS
The first argument, given following -f , is the SCSI generic device
corresponding to your tape drive. Consult your operating system's doc-
umentation for more information (for example, under Linux these are
generally start at /dev/sg0 under FreeBSD these start at /dev/pass0).
Under FreeBSD, 'camcontrol devlist' will tell you what SCSI devices you
have, along with which 'pass' device controls them. Under Linux, "cat
/proc/scsi/scsi" will tell you what SCSI devices you have.
BUGS AND LIMITATIONS
This program has only been tested on Linux with a limited number of
tape drives (HP DDS4, Seagate AIT).
AVAILABILITY
tapeinfo is currently being maintained by Robert Nelson as part of the 'mtx' suite of programs. The
'mtx' home page is http://mtx.sourceforge.net and the actual code is
currently available there and via SVN from http://source-
forge.net/projects/mtx.
SEE ALSO
mt(1),mtx(1),scsitape(1),scsieject(1),loaderinfo(1)
TAPEINFO1.0 TAPEINFO(1)
--------------------------------------------------------------------------
Marcus Roeckrath 2016-01-05