1MTX(1)                      General Commands Manual                     MTX(1)
2
3
4

NAME

6       mtx - control SCSI media changer devices
7

SYNOPSIS

9       mtx  [-f <scsi-generic-device>] [nobarcode] [invert] [noattach] command
10       [ command ... ]
11

DESCRIPTION

13       The mtx command controls single or multi-drive SCSI media changers such
14       as  tape  changers, autoloaders, tape libraries, or optical media juke‐
15       boxes.  It can also be used with media changers that use the 'ATTACHED'
16       API,  presuming  that they properly report the MChanger bit as required
17       by the SCSI T-10 SMC specification.
18

OPTIONS

20       The first argument, given following -f , is  the  SCSI  generic  device
21       corresponding  to  your media changer.  Consult your operating system's
22       documentation for more information (for example, under Linux these  are
23       generally   /dev/sg0   through   /dev/sg15,  under  FreeBSD  these  are
24       /dev/pass0 through /dev/passX, under SunOS  it  may  be  a  file  under
25       /dev/rdsk).
26
27       The 'invert' option will invert (flip) the media (for optical jukeboxes
28       that allow such) before inserting it into the drive or returning it  to
29       the storage slot.
30
31       The  'noattach' option forces the regular media changer API even if the
32       media changer incorrectly reported that it uses the 'ATTACHED' API.
33
34       The 'nobarcode' option forces the loader to not request  barcodes  even
35       if the loader is capable of reporting them.
36
37       Following  these  options there may follow one or more robotics control
38       commands. Note that the 'invert' and 'noattach' options apply to ALL of
39       robotics control commands.
40
41

COMMANDS

43       --version Report the mtx version number (e.g. mtx 1.2.8) and exit.
44
45
46       inquiry   Report  the  product type (Medium Changer, Tape Drive, etc.),
47                 Vendor ID, Product ID, Revision, and whether  this  uses  the
48                 Attached  Changer  API (some tape drives use this rather than
49                 reporting  a  Medium  Changer  on  a  separate  LUN  or  SCSI
50                 address).
51
52       noattach  Make  further  commands  use  the  regular  media changer API
53                 rather than the _ATTACHED API, no matter what the  "Attached"
54                 bit  said  in  the Inquiry info.  Needed with some brain-dead
55                 changers that  report  Attached  bit  but  don't  respond  to
56                 _ATTACHED API.
57
58       inventory Makes  the  robot  arm  go and check what elements are in the
59                 slots. This is needed for a few  libraries  like  the  Breece
60                 Hill  ones that do not automatically check the tape inventory
61                 at system startup.
62
63       status    Reports how many drives and storage elements are contained in
64                 the  device.  For  each  drive,  reports whether it has media
65                 loaded in it, and if so, from which storage  slot  the  media
66                 originated.  For  each  storage  slot,  reports whether it is
67                 empty or full, and if the media changer has a bar  code,  MIC
68                 reader, or some other way of uniquely identifying media with‐
69                 out loading it into a drive,  this  reports  the  volume  tag
70                 and/or  alternate  volume  tag  for each piece of media.  For
71                 historical reasons drives are numbered  from  0  and  storage
72                 slots are numbered from 1.
73
74       load <slotnum> [ <drivenum> ]
75                 Load media from slot <slotnum> into drive <drivenum>. Drive 0
76                 is assumed if the drive number is omitted.
77
78       unload [<slotnum>] [ <drivenum> ]
79                 Unloads media from drive <drivenum> into slot  <slotnum>.  If
80                 <drivenum>  is  omitted,  defaults to drive 0 (as do all com‐
81                 mands).  If <slotnum> is omitted, defaults to the  slot  that
82                 the drive was loaded from. Note that there's currently no way
83                 to say 'unload drive 1's media to the  slot  it  came  from',
84                 other than to explicitly use that slot number as the destina‐
85                 tion.
86
87       [eepos <operation>] transfer <slotnum> <slotnum>
88                 Transfers media from one slot to another, assuming that  your
89                 mechanism  is capable of doing so. Usually used to move media
90                 to/from  an  import/export   port.   'eepos'   is   used   to
91                 extend/retract the import/export tray on certain mid-range to
92                 high end tape libraries (if, e.g., the tray was slot 32,  you
93                 might  say  say 'eepos 1 transfer 32 32' to extend the tray).
94                 Valid values for eepos <operation> are 0 (do nothing  to  the
95                 import/export tray), 1, and 2 (what 1 and 2 do varies depend‐
96                 ing upon the library, consult your library's SCSI-level docu‐
97                 mentation).
98
99       [eepos  <operation>]  [invert]  [invert2]  exchange <slotnum> <slotnum>
100       [<slotnum>]
101                 Move medium from the first slot to the second  slot,  placing
102                 the  medium currently in the second slot either back into the
103                 first slot or into the optional third slot.
104
105
106       first [<drivenum>]
107                 Loads drive <drivenum> from  the  first  slot  in  the  media
108                 changer.  Unloads  the  drive if there is already media in it
109                 (note: you may need to eject the tape using  your  OS's  tape
110                 control  commands  first).  Note that this command may not be
111                 what you want on large tape libraries -- e.g. on Exabyte 220,
112                 the  first  slot is usually a cleaning tape. If <drivenum> is
113                 omitted, defaults to first drive.
114
115
116       last [<drivenum>]
117                 Loads drive <drivenum>  from  the  last  slot  in  the  media
118                 changer.  Unloads the drive if there is already a tape in it.
119                 (Note: you may need to eject the tape using  your  OS's  tape
120                 control commands first).
121
122       next [<drivenum>]
123                 Unloads the drive and loads the next tape in sequence. If the
124                 drive was empty, loads the first tape into the drive.
125
126       position <slotnum>
127                 Positions the robot at a specific slot. Needed by some chang‐
128                 ers to move to and open the import/export, or mailbox, slot.
129
130

AUTHORS

132       The  original  'mtx'  program was written by Leonard Zubkoff and exten‐
133       sively revised for large multi-drive libraries with bar code readers by
134       Eric Lee Green <eric@badtux.org>. See 'mtx.c' for other contributors.
135

BUGS AND LIMITATIONS

137       You  may  need to do a 'mt offline' on the tape drive to eject the tape
138       before you can issue the 'mtx unload' command. The  Exabyte  EZ-17  and
139       220 in particular will happily sit there snapping the robot arm's claws
140       around thin air trying to grab a tape that's not there.
141
142       For some Linux distributions, you may need to re-compile the kernel  to
143       scan   SCSI   LUN's  in  order  to  detect  the  media  changer.  Check
144       /proc/scsi/scsi to see what's going on.
145
146       If you try to unload a tape to its 'source'  slot,  and  said  slot  is
147       full,  it will instead put the tape into the first empty slot. Unfortu‐
148       nately the list of empty slots is not updated between commands  on  the
149       command  line, so if you try to unload another drive to a full 'source'
150       slot during the same invocation of 'mtx', it will try to unload to  the
151       same (no longer empty) slot and will urp with a SCSI error.
152
153       This  program  reads  the  Mode  Sense  Element Address Assignment Page
154       (SCSI)  and  requests  data  on  all  available  elements.  For  larger
155       libraries  (more  than a couple dozen elements) this sets a big Alloca‐
156       tion_Size in the SCSI command block for the REQUEST_ELEMENT_STATUS com‐
157       mand  in  order  to  be  able  to  read the entire result of a big tape
158       library. Some operating systems may not be able to  handle  this.  Ver‐
159       sions of Linux earlier than 2.2.6, in particular, may fail this request
160       due to inability to find contiguous pages of memory for the SCSI trans‐
161       fer (later versions of Linux 'sg' device do scatter-gather so that this
162       should no longer be a problem).
163
164       The eepos command remains in effect for all further commands on a  com‐
165       mand  line.  Thus  you might want to follow eepos 1 transfer 32 32 with
166       eepos 0 as the next command (which clears the eepos bits).
167
168       Need a better name for 'eepos' command! ('eepos' is the name of the bit
169       field  in the actual low-level SCSI command, and has nothing to do with
170       what it does).
171
172       This program has only been tested on Linux with  a  limited  number  of
173       tape  loaders  (a  dual-drive  Exabyte  220 tape library, with bar-code
174       reader and 21 slots, an Exabyte EZ-17 7-slot autoloader, and a  Seagate
175       DDS-4  autochanger  with  6  slots). It may not work on other operating
176       systems with larger libraries,  due  to  the  big  SCSI  request  size.
177       Please  see  the  projecdt page http://sourceforge.net/projects/mtx for
178       information on reporting bugs, requesting features and the mailing list
179       for peer support.
180

HINTS

182       Under  Linux,  cat  /proc/scsi/scsi will tell you what SCSI devices you
183       have.  You can then refer to them as /dev/sga, /dev/sgb,  etc.  by  the
184       order they are reported.
185
186       Under  FreeBSD,  camcontrol devlist will tell you what SCSI devices you
187       have, along with which pass device controls them.
188
189       Under Solaris, set up your 'sgen' driver so that it'll  look  for  tape
190       changers  (see /kernel/drv/sgen.conf and the sgen man page), type touch
191       /reconfigure then reboot. You can find your changer in /devices by typ‐
192       ing /usr/sbin/devfsadm -C to clean out no-longer-extant entries in your
193       /devices directory, then find /devices -name \∗changer -print  to  find
194       the  device  name.  Set the symbolic link /dev/changer to point to that
195       device name (if it is not doing so already).
196
197       With BRU, set your mount and unmount commands as described on  the  BRU
198       web site at http://www.bru.com to move to the next tape when backing up
199       or restoring. With GNU tar, see mtx.doc for an example of  how  to  use
200       tar and mtx to make multi-tape backups.
201
202

AVAILABILITY

204       This  version  of  mtx  is  currently being maintained by Robert Nelson
205       <robertnelson@users.sourceforge.net>  .   The  'mtx'   home   page   is
206       http://mtx.sourceforge.net  and  the actual code is currently available
207       there and via SVN from http://sourceforge.net/projects/mtx.
208

SEE ALSO

210       mt(1),loaderinfo(1),tapeinfo(1),scsitape(1),scsieject(1)
211
212
213
214                                    MTX1.3                              MTX(1)
Impressum