1 [WARNING: This document is of historical value only! Please read
2 'mtxl.README.html' and 'man mtx' for current documentation! The only
3 thing useful here is examples of how to use the 'tar' command for
7 MTX - SCSI Tape Medium Changer Control Program
9 Version 1.1 for Linux, Solaris, IRIX, Digital Unix, and OpenVMS
17 Copyright 1997-1998 by Leonard N. Zubkoff <lnz@dandelion.com>
22 The MTX program controls the robotic mechanism in DDS Autoloaders such as the
23 Seagate 4586NP (Archive Python 28849-XXX). This program is also reported to
24 work with the Seagate 4584NP, HP Surestore 12000, Quantum DLT 2500 XT, and AIWA
25 DL-210. The 4586NP responds to both Logical Units 0 and 1 on the selected
26 Target ID. Logical Unit 0 supports commands from the SCSI-3 Sequential Stream
27 Device Command Set and must be accessed via the SCSI tape devices /dev/st<N>.
28 Logical Unit 1 only supports commands from the SCSI-3 Medium Changer Command
29 Set and must be accessed via the SCSI Generic devices /dev/sg<N>. In addition,
30 Logical Unit 0 also acts as an Attached Medium Changer and supports the READ
31 ELEMENT STATUS and MOVE MEDIUM commands. Since using the Primary Device
32 (Logical Unit 0) via the Attached Medium Changer interface is sufficient for
33 the commands provided by this program, Logical Unit 1 is not normally used.
34 The AIWA DL-210, by contrast, does not support the Attached Medium Changer
35 commands on Logical Unit 0 and so MTX must be used with Logical Unit 1 via the
36 SCSI Generic devices /dev/sg<N>. Note that when using the SCSI Generic devices
37 the Linux kernel option "max_scsi_luns=2" may be necessary.
39 Medium Changers support four types of elements: Medium Transport Elements,
40 Storage Elements, Import Export Elements, and Data Transfer Elements. For the
41 limited case of DDS Autoloaders, only the Data Transfer Element and Storage
42 Element types are really applicable. The Data Transfer Element is the primary
43 device where a volume can be loaded to actually perform data transfers. A
44 Storage Element is a place a volume can be when it is waiting to be used. For
45 a DDS Autoloader, the Storage Elements are the slots in the cartridge where
46 tapes may be placed, and the Data Transfer Element is the tape mechanism.
48 Every Medium Changer Element has a unique integer Element Address that
49 identifies it in the address space of all Elements known to the Medium Changer.
50 For the 4586NP, the Data Transfer Element is Address 1 and the Storage Elements
51 are Addresses 2-5 or 2-13. To simplify the human interface, this program does
52 not use Element Addresses directly. Rather, it uses Storage Element Numbers
53 which range from 1 to the number of Storage Elements available.
55 The specific tape device to be operated on can either be supplied on the
56 command line with the "-f <tape-device>" option, or via the TAPE environment
62 The Makefile contains sections for Linux, Solaris/SPARC, SGI IRIX, and Digital
63 UNIX. Comment/uncomment as necessary for the target environment. For OpenVMS,
64 see the file "vms/000readme" for information on building MTX; a VMS release
65 including pre-built binaries should be available from the WKU VMS FILESERV
66 ARCHIVES, which are located at URLs http://www2.wku.edu/www/fileserv/ and
67 ftp://ftp.wku.edu/vms/fileserv/.
72 MTX provides the following commands:
75 mtx [ -f <tape-device> ] inquiry
77 The "inquiry" command reports the Vendor ID, Product ID, and Revision from a
80 kelewan:~# setenv TAPE /dev/st0
82 kelewan:~# mtx inquiry
83 Vendor ID: 'ARCHIVE ', Product ID: 'Python 28849-XXX', Revision: '4.CM'
86 mtx [ -f <tape-device> ] status
88 The "status" command reports on the status of the DDS Autloader. The report
89 indicates the status of the Data Transfer Element and each of the Storage
90 Elements. In the first example, no tape is currently loaded. In the second
91 example, Storage Element Number 1 is loaded. The Storage Element loaded into
92 the Data Transfer Element is usually reported by the DDS Autoloader, or it can
93 be inferred by MTX if there is only a single empty Storage Element.
96 Data Transfer Element: Empty
97 Storage Element 1: Full
98 Storage Element 2: Full
99 Storage Element 3: Full
100 Storage Element 4: Full
103 kelewan:~# mtx status
104 Data Transfer Element: Full (Storage Element 1 Loaded)
105 Storage Element 1: Empty
106 Storage Element 2: Full
107 Storage Element 3: Full
108 Storage Element 4: Full
111 mtx [ -f <tape-device> ] load <storage-element-number>
113 The "load" command loads the volume in Storage Element <storage-element-number>
114 into the Data Transfer Element. An error is signaled if the Data Transfer
115 Element is already full.
118 mtx [ -f <tape-device> ] unload [ <storage-element-number> ]
120 The "unload" command unloads the volume in the Data Transfer Element into
121 Storage Element <storage-element-number>. If <storage-element-number> is not
122 provided, then the volume is unloaded back into the Storage Element from which
123 it was originally loaded, if known. An error is signaled if the Storage
124 Element is already full.
127 mtx [ -f <tape-device> ] first
129 The "first" command unloads any volume in the Data Transfer Element and then
130 loads the volume in the lowest numbered non-empty Storage Element. If the
131 correct Storage Element is already loaded, the unload/load is suppressed.
134 mtx [ -f <tape-device> ] next
136 The "next" command unloads any volume in the Data Transfer Element and then
137 loads the volume in the lowest numbered non-empty Storage Element above the
138 Storage Element that was just unloaded. If there is no next Storage Element,
139 the unload is still performed and the Data Transfer Element will be left empty
140 so that the volume is not accidentally overwritten.
143 mtx [ -f <tape-device> ] last
145 The "last" command unloads any volume in the Data Transfer Element and then
146 loads the volume in the highest numbered non-empty Storage Element. If the
147 correct Storage Element is already loaded, the unload/load is suppressed.
150 mtx [ -f <tape-device> ] previous
152 The "previous" command unloads any volume in the Data Transfer Element and then
153 loads the volume in the highest numbered non-empty Storage Element below the
154 Storage Element that was just unloaded. If there is no previous Storage
155 Element, the unload is still performed and the Data Transfer Element will be
156 left empty so that the volume is not accidentally overwritten.
159 The interface is designed to allow both explicit control of precisely which
160 Storage Element is loaded, as well as sequential access among only the Storage
161 Elements that actually have volumes present. Thus for example, one way of
162 using MTX would be to perform Monday's incremental backups on Storage Element
163 1, Tuesday's on Storage Element 2, and so on. Multi-volume full backups are
164 also conveniently supported, as in:
166 setenv TAPE "/dev/st0"
172 time tar --create --one-file-system --atime-preserve \
173 --listed-incremental `date +%y%m%d`.ss \
174 --multi-volume --new-volume-script "mtx next" \
175 --directory / <wherever>
179 time tar --compare --multi-volume --new-volume-script "mtx next" \
185 LINUX KERNEL REQUIREMENTS
187 Because the MOVE MEDIUM command may require 60 seconds or more to perform a
188 volume load or unload request, a longer timeout must be provided. Linux
189 kernels 2.0.30 and 2.1.28 should already contain a long enough timeout. For
190 earlier kernels, edit the file "linux/drivers/scsi/scsi_ioctl.c" and add the
191 following entries to the switch statement in ioctl_command:
194 case READ_ELEMENT_STATUS:
195 timeout = 5 * 60 * HZ; /* 5 minutes */
199 For older kernels, you may also need to add the following definitions to
200 "linux/include/scsi/scsi.h":
202 #define MOVE_MEDIUM 0xa5
203 #define READ_ELEMENT_STATUS 0xb8
205 Note also that "/usr/include/scsi" should be a symbolic link to the directory
206 "linux/include/scsi" from your kernel source.
208 Finally, when using MTX you may see some console messages from the SCSI tape
209 driver mentioning that there is no tape present. These can safely be ignored.