| 1 |
From ae077698ef87324631f6e0586e95153a58862167 Mon Sep 17 00:00:00 2001 |
| 2 |
From: James Youngman <[email protected]> |
| 3 |
Date: Sat, 29 May 2021 19:30:26 +0100 |
| 4 |
Subject: [PATCH] Update Linux device node naming and troubleshooting. |
| 5 |
|
| 6 |
1. Suggest "lscsi" instead of "cat /proc/scsi/scsi" for Linux, because |
| 7 |
the latter has been a legacy feature since about 2011. |
| 8 |
2. Update Linux device file naming to match usual names with |
| 9 |
udev. |
| 10 |
3. Mention some more modern tape hardware on which the tools have been |
| 11 |
tested. |
| 12 |
--- |
| 13 |
FAQ | 79 ++++++++++++++++----------------- |
| 14 |
loaderinfo.1 | 36 ++++++++------- |
| 15 |
mtx.1 | 112 +++++++++++++++++++++++------------------------ |
| 16 |
scsieject.1 | 51 ++++++++++----------- |
| 17 |
scsitape.1 | 67 +++++++++++++--------------- |
| 18 |
tapeinfo.1 | 29 ++++++------ |
| 19 |
6 files changed, 183 insertions(+), 191 deletions(-) |
| 20 |
|
| 21 |
--- a/FAQ |
| 22 |
+++ b/FAQ |
| 23 |
@@ -1,6 +1,6 @@ |
| 24 |
Frequently Asked Questions List, v 1.0.1 |
| 25 |
|
| 26 |
-Index: |
| 27 |
+Index: |
| 28 |
I. Compiling |
| 29 |
II. Finding the correct device |
| 30 |
III. Operational Issues |
| 31 |
@@ -9,68 +9,70 @@ |
| 32 |
|
| 33 |
Q: Where is the Makefile in the tarball? |
| 34 |
A: MTX now uses GNU Autoconf to generate the Makefile. Type "./configure" |
| 35 |
- while in the extracted mtx directory. |
| 36 |
+ while in the extracted mtx directory. |
| 37 |
|
| 38 |
Q: Typing 'make' gives me a bunch of errors in the Makefile. Why can't |
| 39 |
you provide a Makefile that works? |
| 40 |
-A: Note that you need the GNU 'make'. The BSD 'make' won't work, and |
| 41 |
+A: Note that you need the GNU 'make'. The BSD 'make' won't work, and |
| 42 |
Solaris 'make' probably won't work either. If you want a better |
| 43 |
configuration and makefile system, write one, then EMAIL me the results -- |
| 44 |
- mtx is Open Source software and needs your code contributions to grow. |
| 45 |
+ mtx is Open Source software and needs your code contributions to grow. |
| 46 |
|
| 47 |
Q: How do I compile for operating systems other than Linux? |
| 48 |
A: MTX no longer needs you to edit the Makefile to compile for operating |
| 49 |
- systems other than Linux. Just type ./configure and go with it. |
| 50 |
+ systems other than Linux. Just type ./configure and go with it. |
| 51 |
|
| 52 |
Q: How do I port it to OS's other than the supported ones? |
| 53 |
A: Create a new scsi_ module using one of the existing modules as an |
| 54 |
example (scsi_freebsd.c might be a good model). Decide what symbol |
| 55 |
you want #ifdef'ed in order to include that scsi_ module. Edit |
| 56 |
mtxl.c to #include your scsi_ module. Edit the Makefile to add the |
| 57 |
- new target, including the -D needed to #include your new scsi_ module. |
| 58 |
+ new target, including the -D needed to #include your new scsi_ module. |
| 59 |
|
| 60 |
********************************************************************* |
| 61 |
-Part II: Finding the correct device. |
| 62 |
+Part II: Finding the correct device. |
| 63 |
|
| 64 |
Q: Why does this command not work?? |
| 65 |
[root@Scotty mtxl-1.4.8]# ./mtx -f /dev/st0 inquiry |
| 66 |
In /var/log/messages I see: |
| 67 |
- st0: Write not multiple of tape block size. |
| 68 |
+ st0: Write not multiple of tape block size. |
| 69 |
A: Note that mtx 1.2 and above use the SCSI GENERIC interface on Linux, |
| 70 |
FreeBSD, and Solaris (at least). They do NOT use the tape device node. |
| 71 |
|
| 72 |
-Q: When I do 'mtx -f /dev/sga inquiry' it shows |
| 73 |
+Q: When I do 'mtx -f /dev/sga inquiry' it shows |
| 74 |
Product Type: Tape Drive |
| 75 |
- Vendor Id: HP |
| 76 |
- Product ID: C1553A |
| 77 |
+ Vendor Id: HP |
| 78 |
+ Product ID: C1553A |
| 79 |
But when I do a 'mtx -f /dev/sga status' it fails. Why?! |
| 80 |
A: You're trying to send a robotics command to a tape drive. You need |
| 81 |
to send robotics commands to robotics devices, not to tape drives. Look in |
| 82 |
- /proc/scsi/scsi (Linux) or camcontrol (FreeBSD) to find out what the |
| 83 |
+ lsscsi -gc (Linux) or camcontrol (FreeBSD) to find out what the |
| 84 |
robotics device is. It will be reported as a 'Medium Changer', not a |
| 85 |
'Sequential Access' or 'Tape Drive'. |
| 86 |
|
| 87 |
Q: When I do 'cat /proc/scsi/scsi' it shows only one device, the tape device! |
| 88 |
A: You are using a DAT autochanger that has one SCSI ID but two LUN's, LUN 0 |
| 89 |
and LUN 1. You need to compile a new kernel with SCAN SCSI LUNS enabled |
| 90 |
- or add this line to your /etc/lilo.conf (then run /sbin/lilo and reboot): |
| 91 |
+ or add this line to your /etc/lilo.conf (then run /sbin/lilo and reboot): |
| 92 |
append="max_scsi_luns=2" |
| 93 |
|
| 94 |
-Q: I'm tired of typing '-f /dev/sgc' all the time. How do I set a default |
| 95 |
+Q: I'm tired of typing '-f /dev/sg2' all the time. How do I set a default |
| 96 |
device that 'mtx' looks at? |
| 97 |
A: Set the CHANGER environment variable. For example, with 'bash': |
| 98 |
- export CHANGER=/dev/sgc |
| 99 |
+ export CHANGER=/dev/sg2 |
| 100 |
|
| 101 |
Q: I get "modprobe: can't locate module char-major-21" |
| 102 |
syslog messages being squirreled away into a file on our syslog host, |
| 103 |
and mtx doesn't work. What's the problem? |
| 104 |
A: You need to compile SCSI generic support into your kernel (or as a module). |
| 105 |
|
| 106 |
-Q: When I installed mtx, a message showed |
| 107 |
+Q: When I installed mtx, a message showed |
| 108 |
up on the console stating that a scsi changer was found at |
| 109 |
dev sgr. However, I have no device /dev/sgr. |
| 110 |
-A: On Linux, do 'mknod /dev/sgr c 21 19' to create a device node. By default |
| 111 |
- only 16 SCSI generic nodes are created, which might not be enough if |
| 112 |
+A: On Linux, device nodes should be created automatically by udev. |
| 113 |
+ If you're not using udev, you could try 'mknod /dev/sgr c 21 19' |
| 114 |
+ to create a device node. By default (if you're not using udev) |
| 115 |
+ only 16 SCSI generic nodes are created. That might not be enough if |
| 116 |
you have multiple SCSI controllers with lots of devices. |
| 117 |
|
| 118 |
****************************************************** |
| 119 |
@@ -86,7 +88,7 @@ |
| 120 |
A: Do "rpm -e mtx". Red Hat 7.0 includes a busted version of mtx. Your |
| 121 |
script is apparently picking up the busted mtx in your path. Get rid |
| 122 |
of the busted mtx, make sure that /usr/local/bin (or wherever you |
| 123 |
- put the "good" mtx) is in the path, and all should be well. |
| 124 |
+ put the "good" mtx) is in the path, and all should be well. |
| 125 |
|
| 126 |
Q: I get |
| 127 |
# /usr/local/bin/mtx -f /dev/sgr status |
| 128 |
@@ -98,47 +100,46 @@ |
| 129 |
What gives? |
| 130 |
A: Make sure your loader is in random mode, not sequential mode. |
| 131 |
Most "real" loaders (as vs. DAT autoloaders) will not properly report |
| 132 |
- status information unless they are in "random" mode. |
| 133 |
- |
| 134 |
+ status information unless they are in "random" mode. |
| 135 |
|
| 136 |
Q: I issue 'mtx load 5' and it loads tape 5. But when I try to put the tape |
| 137 |
back in the magazine, we hit problems: |
| 138 |
mtx: MOVE MEDIUM from Element Address 82 to 5 Failed |
| 139 |
What gives? |
| 140 |
A: Many loaders require you to first eject the tape (using 'mt' or 'tapectl') |
| 141 |
- before you issue an 'unload' command via 'mtx'. |
| 142 |
+ before you issue an 'unload' command via 'mtx'. |
| 143 |
|
| 144 |
Q: My Breece Hill loader does not properly report its slots. |
| 145 |
-A: Either set the "auto-inventory" feature in the loader's control panel, |
| 146 |
- or run 'mtx inventory' prior to running 'mtx status'. |
| 147 |
+A: Either set the "auto-inventory" feature in the loader's control panel, |
| 148 |
+ or run 'mtx inventory' prior to running 'mtx status'. |
| 149 |
|
| 150 |
Q: My Breece Hill loader takes a long time to do an inventory. mtx times |
| 151 |
out and spits all over the place. Help! |
| 152 |
A: Many loaders that support barcodes will perform poorly if you place tapes |
| 153 |
into them without bar codes. Place bar codes on all your tapes and you |
| 154 |
- should be able to run 'mtx inventory' without that failure. |
| 155 |
+ should be able to run 'mtx inventory' without that failure. You can |
| 156 |
+ print your own bar codes (e.g. using http://tapelabel.de/). |
| 157 |
|
| 158 |
Q: How do I eject the magazine of my autoloader? |
| 159 |
-A: Many low-end DAT autoloaders support the removable media 'EJECT' command |
| 160 |
+A: Many low-end DAT autoloaders support the removable media 'EJECT' command |
| 161 |
sent to the robotics device, even though it's not documented (or required) |
| 162 |
- in the SCSI standards. If the loader is at /dev/sgb, simply do |
| 163 |
- 'mtx -f /dev/sgb eject' and see what happens. (If nothing happens, |
| 164 |
- your autoloader doesn't support 'eject'). Some high-end libraries have |
| 165 |
- their own proprietary way for ejecting magazine trays, generally |
| 166 |
+ in the SCSI standards. If the loader is at /dev/sg1, simply do |
| 167 |
+ 'mtx -f /dev/sg1 eject' and see what happens. (If nothing happens, |
| 168 |
+ your autoloader doesn't support 'eject'). Some high-end libraries have |
| 169 |
+ their own proprietary way for ejecting magazine trays, generally |
| 170 |
involving abuse of the 'transfer' command and 'eepos' addendums, |
| 171 |
- but this is totally non-standard and undocumented. |
| 172 |
+ but this is totally non-standard and undocumented. |
| 173 |
|
| 174 |
Q: Is there a standard for cleaning tape bar codes? |
| 175 |
-A: Many libraries, and many backup programs, expect cleaning tape bar |
| 176 |
- codes to start with "CLN". |
| 177 |
+A: Many libraries, and many backup programs, expect cleaning tape bar |
| 178 |
+ codes to start with "CLN". |
| 179 |
|
| 180 |
Q: How do I report a bug? |
| 181 |
A: First, read this FAQ. Next, check the mtx list archives at |
| 182 |
- http://mtx.sourceforge.net to make sure that it's not already addressed |
| 183 |
- by somebody else. If your problem is still not solved, send |
| 184 |
+ http://mtx.sourceforge.net to make sure that it's not already addressed |
| 185 |
+ by somebody else. If your problem is still not solved, send |
| 186 |
(to the mtx list) the following information: |
| 187 |
- Result of 'mtx inquiry' on the loader, |
| 188 |
+ Result of 'mtx inquiry' on the loader, |
| 189 |
Result of 'mtx status' on the loader (minus a bunch of tapes if |
| 190 |
- it's a 50+ tape loader!), |
| 191 |
- Results of the operation that isn't working correctly. |
| 192 |
- |
| 193 |
+ it's a 50+ tape loader!), |
| 194 |
+ Results of the operation that isn't working correctly. |
| 195 |
--- a/loaderinfo.1 |
| 196 |
+++ b/loaderinfo.1 |
| 197 |
@@ -28,63 +28,65 @@ |
| 198 |
.SH SYNOPSIS |
| 199 |
loaderinfo -f <scsi-generic-device> |
| 200 |
.SH DESCRIPTION |
| 201 |
-The |
| 202 |
+The |
| 203 |
.B loaderinfo |
| 204 |
command reads various information from SCSI tape loaders. Its intended |
| 205 |
use is for high-level programs that are trying to decide what the |
| 206 |
-capabilities of a device are. |
| 207 |
+capabilities of a device are. |
| 208 |
.P |
| 209 |
The following are printed: |
| 210 |
.TP 10 |
| 211 |
.B Element Address Assignment Page: |
| 212 |
This tells how many elements are in the loader, and what their raw |
| 213 |
-hardware addresses are. |
| 214 |
+hardware addresses are. |
| 215 |
|
| 216 |
.TP 10 |
| 217 |
.B Transport Geometry Descriptor Page: |
| 218 |
Will display whether media is invertible or not (usable with some |
| 219 |
optical jukeboxes for detirmining whether to "flip" media after writing |
| 220 |
-to the first side). |
| 221 |
+to the first side). |
| 222 |
|
| 223 |
-.TP 10 |
| 224 |
+.TP 10 |
| 225 |
.B Device Capabilities Page |
| 226 |
Currently will only display whether we can transfer between slots (i.e. |
| 227 |
-whether 'mtx transfer' works). |
| 228 |
+whether 'mtx transfer' works). |
| 229 |
|
| 230 |
.TP 10 |
| 231 |
.B Inquiry Page |
| 232 |
Aside from the normal inquiry info, will also print out whether we have |
| 233 |
a bar code reader (for loaders that support the Exabyte extension for |
| 234 |
-reporting presence of said reader). |
| 235 |
+reporting presence of said reader). |
| 236 |
|
| 237 |
|
| 238 |
.SH OPTIONS |
| 239 |
The first argument, given following |
| 240 |
.B -f |
| 241 |
-, is the SCSI generic device corresponding to your tape loader. |
| 242 |
+, is the SCSI generic device corresponding to your tape loader. |
| 243 |
Consult your operating system's documentation for more information (for |
| 244 |
-example, under Linux these are generally start at /dev/sg0 |
| 245 |
+example, under Linux these are generally start at /dev/sg0 |
| 246 |
under FreeBSD these start at /dev/pass0). |
| 247 |
.P |
| 248 |
Under FreeBSD, 'camcontrol devlist' will tell you what SCSI devices you |
| 249 |
have, along with which 'pass' device controls them. Under Linux, |
| 250 |
-"cat /proc/scsi/scsi" will tell you what SCSI devices you have. Under |
| 251 |
-Solaris 8, |
| 252 |
+the command |
| 253 |
+.B lsscsi \-\-generic |
| 254 |
+will tell you what SCSI devices you have. |
| 255 |
+Under Solaris 8, |
| 256 |
.B find /devices -name '*changer*' |
| 257 |
will display the device names for your attached changers. Make sure |
| 258 |
-to configure your 'sgen' driver first. |
| 259 |
+to configure your 'sgen' driver first. |
| 260 |
|
| 261 |
.SH BUGS AND LIMITATIONS |
| 262 |
.P |
| 263 |
This program has only been tested on Linux with a limited number of |
| 264 |
-loaders (Ecrix Autopack, Exabyte 220). |
| 265 |
+loaders (Ecrix Autopack, Exabyte 220, IBM TS3100). |
| 266 |
.P |
| 267 |
.SH AVAILABILITY |
| 268 |
.B loaderinfo |
| 269 |
-is currently being maintained by Robert Nelson <[email protected]> |
| 270 |
-as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 271 |
-http://mtx.sourceforge.net and the actual code is currently available there and via |
| 272 |
-SVN from http://sourceforge.net/projects/mtx. |
| 273 |
+is currently being maintained by Robert Nelson <[email protected]> |
| 274 |
+as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 275 |
+http://mtx.sourceforge.net and the actual code is currently available there and via |
| 276 |
+SVN from http://sourceforge.net/projects/mtx. |
| 277 |
|
| 278 |
.SH SEE ALSO |
| 279 |
.BR mt (1), tapeinfo (1), mtx (1) |
| 280 |
--- a/mtx.1 |
| 281 |
+++ b/mtx.1 |
| 282 |
@@ -25,35 +25,35 @@ |
| 283 |
.\" |
| 284 |
.TH MTX 1 MTX1.3 |
| 285 |
.SH NAME |
| 286 |
-mtx \- control SCSI media changer devices |
| 287 |
+mtx \- control SCSI media changer devices |
| 288 |
.SH SYNOPSIS |
| 289 |
mtx [-f <scsi-generic-device>] [nobarcode] [invert] [noattach] command [ command ... ] |
| 290 |
.SH DESCRIPTION |
| 291 |
-The |
| 292 |
+The |
| 293 |
.B mtx |
| 294 |
command controls single or multi-drive SCSI media changers such as |
| 295 |
tape changers, autoloaders, tape libraries, or optical media jukeboxes. |
| 296 |
-It can also be used with media changers that use the 'ATTACHED' API, |
| 297 |
+It can also be used with media changers that use the 'ATTACHED' API, |
| 298 |
presuming that they properly report the MChanger bit as required |
| 299 |
-by the SCSI T-10 SMC specification. |
| 300 |
+by the SCSI T-10 SMC specification. |
| 301 |
.SH OPTIONS |
| 302 |
The first argument, given following |
| 303 |
.B -f |
| 304 |
-, is the SCSI generic device corresponding to your media changer. |
| 305 |
+, is the SCSI generic device corresponding to your media changer. |
| 306 |
Consult your operating system's documentation for more information (for |
| 307 |
-example, under Linux these are generally /dev/sg0 through /dev/sg15, |
| 308 |
+example, under Linux these are generally /dev/sg0 through /dev/sgXX. |
| 309 |
under FreeBSD these are /dev/pass0 through /dev/passX, |
| 310 |
-under SunOS it may be a file under /dev/rdsk). |
| 311 |
+under SunOS it may be a file under /dev/rdsk). |
| 312 |
.P |
| 313 |
The 'invert' option will invert (flip) the media (for optical jukeboxes that |
| 314 |
allow such) before inserting it into the drive or returning it to the |
| 315 |
-storage slot. |
| 316 |
+storage slot. |
| 317 |
.P |
| 318 |
The 'noattach' option forces the regular media changer API even if the |
| 319 |
-media changer incorrectly reported that it uses the 'ATTACHED' API. |
| 320 |
+media changer incorrectly reported that it uses the 'ATTACHED' API. |
| 321 |
.P |
| 322 |
The 'nobarcode' option forces the loader to not request barcodes even if |
| 323 |
-the loader is capable of reporting them. |
| 324 |
+the loader is capable of reporting them. |
| 325 |
.P |
| 326 |
Following these options there may follow |
| 327 |
one or more robotics control |
| 328 |
@@ -64,25 +64,25 @@ |
| 329 |
.SH COMMANDS |
| 330 |
.TP 10 |
| 331 |
.B --version |
| 332 |
-Report the mtx version number (e.g. mtx 1.2.8) and exit. |
| 333 |
+Report the mtx version number (e.g. mtx 1.2.8) and exit. |
| 334 |
|
| 335 |
.TP 10 |
| 336 |
.B inquiry |
| 337 |
Report the product type (Medium Changer, Tape Drive, etc.), Vendor ID, |
| 338 |
Product ID, Revision, and whether this uses the Attached Changer API |
| 339 |
(some tape drives use this rather than reporting a Medium Changer on a |
| 340 |
-separate LUN or SCSI address). |
| 341 |
+separate LUN or SCSI address). |
| 342 |
.TP 10 |
| 343 |
.B noattach |
| 344 |
-Make further commands use the regular media changer API rather than the |
| 345 |
+Make further commands use the regular media changer API rather than the |
| 346 |
_ATTACHED API, no matter what the "Attached" bit said in the Inquiry info. |
| 347 |
Needed with some brain-dead changers that report Attached bit but don't respond |
| 348 |
-to _ATTACHED API. |
| 349 |
+to _ATTACHED API. |
| 350 |
.TP 10 |
| 351 |
.B inventory |
| 352 |
Makes the robot arm go and check what elements are in the slots. This |
| 353 |
-is needed for a few libraries like the Breece Hill ones that do not |
| 354 |
-automatically check the tape inventory at system startup. |
| 355 |
+is needed for a few libraries like the Breece Hill ones that do not |
| 356 |
+automatically check the tape inventory at system startup. |
| 357 |
.TP 10 |
| 358 |
.B status |
| 359 |
Reports how many drives and storage elements are contained in the |
| 360 |
@@ -93,7 +93,7 @@ |
| 361 |
media without loading it into a drive, this reports the volume tag |
| 362 |
and/or alternate volume tag for each piece of media. |
| 363 |
For historical reasons drives are numbered from 0 and storage slots are |
| 364 |
-numbered from 1. |
| 365 |
+numbered from 1. |
| 366 |
.TP 10 |
| 367 |
.B load <slotnum> [ <drivenum> ] |
| 368 |
Load media from slot <slotnum> into drive <drivenum>. Drive 0 is assumed |
| 369 |
@@ -104,24 +104,24 @@ |
| 370 |
omitted, defaults to drive 0 (as do all commands). |
| 371 |
If <slotnum> is omitted, defaults to the slot |
| 372 |
that the drive was loaded from. Note that there's currently no way to |
| 373 |
-say 'unload drive 1's media to the slot it came from', other than to |
| 374 |
+say 'unload drive 1's media to the slot it came from', other than to |
| 375 |
explicitly use that slot number as the destination. |
| 376 |
.TP 10 |
| 377 |
.B [eepos <operation>] transfer <slotnum> <slotnum> |
| 378 |
Transfers media from one slot to another, assuming that your mechanism is |
| 379 |
capable of doing so. Usually used to move media to/from an import/export |
| 380 |
-port. 'eepos' is used to extend/retract the import/export |
| 381 |
+port. 'eepos' is used to extend/retract the import/export |
| 382 |
tray on certain mid-range to high end tape libraries (if, e.g., the tray was |
| 383 |
-slot 32, you might say say 'eepos 1 transfer 32 32' to extend the tray). |
| 384 |
+slot 32, you might say say 'eepos 1 transfer 32 32' to extend the tray). |
| 385 |
Valid values for eepos <operation> |
| 386 |
are 0 (do nothing to the import/export tray), 1, and 2 (what 1 and 2 do varies |
| 387 |
-depending upon the library, consult your library's SCSI-level |
| 388 |
-documentation). |
| 389 |
+depending upon the library, consult your library's SCSI-level |
| 390 |
+documentation). |
| 391 |
.TP 10 |
| 392 |
.B [eepos <operation>] [invert] [invert2] exchange <slotnum> <slotnum> [<slotnum>] |
| 393 |
Move medium from the first slot to the second slot, placing the medium |
| 394 |
currently in the second slot either back into the first slot or into the |
| 395 |
-optional third slot. |
| 396 |
+optional third slot. |
| 397 |
|
| 398 |
.TP 10 |
| 399 |
.B first [<drivenum>] |
| 400 |
@@ -135,7 +135,7 @@ |
| 401 |
.B last [<drivenum>] |
| 402 |
Loads drive <drivenum> from the last slot in the media changer. Unloads |
| 403 |
the drive if there is already a tape in it. (Note: you may need to eject |
| 404 |
-the tape using your OS's tape control commands first). |
| 405 |
+the tape using your OS's tape control commands first). |
| 406 |
.TP 10 |
| 407 |
.B previous [<drivenum>] |
| 408 |
Unloads the drive and loads the previous tape in sequence. If the drive |
| 409 |
@@ -154,18 +154,19 @@ |
| 410 |
|
| 411 |
.SH AUTHORS |
| 412 |
The original 'mtx' program was written by Leonard Zubkoff and extensively |
| 413 |
-revised for large multi-drive libraries with bar code readers |
| 414 |
-by Eric Lee Green <[email protected]>. See 'mtx.c' for other contributors. |
| 415 |
+revised for large multi-drive libraries with bar code readers |
| 416 |
+by Eric Lee Green <[email protected]>. See 'mtx.c' for other contributors. |
| 417 |
.SH BUGS AND LIMITATIONS |
| 418 |
.P |
| 419 |
You may need to do a 'mt offline' on the tape drive to eject the tape |
| 420 |
before you can issue the 'mtx unload' command. The Exabyte EZ-17 and 220 |
| 421 |
in particular will happily sit there snapping the robot arm's claws around |
| 422 |
-thin air trying to grab a tape that's not there. |
| 423 |
+thin air trying to grab a tape that's not there. |
| 424 |
.P |
| 425 |
For some Linux distributions, you may need to re-compile the kernel to |
| 426 |
-scan SCSI LUN's in order to detect the media changer. Check /proc/scsi/scsi |
| 427 |
-to see what's going on. |
| 428 |
+scan SCSI LUN's in order to detect the media changer. Check |
| 429 |
+.B lsscsi \-c |
| 430 |
+to see what's going on. |
| 431 |
.P |
| 432 |
If you try to unload a tape to its 'source' slot, and said slot is |
| 433 |
full, it will instead put the tape into the first empty |
| 434 |
@@ -187,45 +188,40 @@ |
| 435 |
memory for the SCSI transfer (later versions of Linux 'sg' device do |
| 436 |
scatter-gather so that this should no longer be a problem). |
| 437 |
.P |
| 438 |
-The |
| 439 |
+The |
| 440 |
.B eepos |
| 441 |
command remains in effect for all further commands on a command |
| 442 |
-line. Thus you might want to follow |
| 443 |
+line. Thus you might want to follow |
| 444 |
.B eepos 1 transfer 32 32 |
| 445 |
-with |
| 446 |
+with |
| 447 |
.B eepos 0 |
| 448 |
as |
| 449 |
-the next command (which clears the |
| 450 |
+the next command (which clears the |
| 451 |
.B eepos |
| 452 |
-bits). |
| 453 |
+bits). |
| 454 |
.P |
| 455 |
Need a better name for 'eepos' command! ('eepos' is the name of the bit |
| 456 |
field in the actual low-level SCSI command, and has nothing to do with what |
| 457 |
-it does). |
| 458 |
+it does). |
| 459 |
.P |
| 460 |
|
| 461 |
This program has only been tested on Linux with a limited number of |
| 462 |
-tape loaders (a dual-drive Exabyte 220 tape library, with bar-code |
| 463 |
+tape loaders (an IBM TS3100 with bar-code reader and 24 slots, |
| 464 |
+a dual-drive Exabyte 220 tape library, with bar-code |
| 465 |
reader and 21 slots, an Exabyte EZ-17 7-slot autoloader, and a Seagate |
| 466 |
-DDS-4 autochanger with 6 slots). It may not work on other operating systems |
| 467 |
-with larger libraries, |
| 468 |
-due to the big SCSI request size. |
| 469 |
-Please see the projecdt page http://sourceforge.net/projects/mtx for information |
| 470 |
+DDS-4 autochanger with 6 slots). It may not work on other operating systems |
| 471 |
+with larger libraries, due to the big SCSI request size. |
| 472 |
+Please see the project page http://sourceforge.net/projects/mtx for information |
| 473 |
on reporting bugs, requesting features and the mailing list for peer support. |
| 474 |
.SH HINTS |
| 475 |
-Under Linux, |
| 476 |
-.B cat /proc/scsi/scsi |
| 477 |
-will tell you what SCSI devices you have. |
| 478 |
-You can then refer to them as |
| 479 |
-.B /dev/sga, |
| 480 |
-.B /dev/sgb, |
| 481 |
-etc. by the order they |
| 482 |
-are reported. |
| 483 |
+Under Linux, |
| 484 |
+.B lsscsi \-g |
| 485 |
+will tell you what SCSI devices you have and their device names. |
| 486 |
.P |
| 487 |
-Under FreeBSD, |
| 488 |
+Under FreeBSD, |
| 489 |
.B camcontrol devlist |
| 490 |
will tell you what SCSI devices you |
| 491 |
-have, along with which |
| 492 |
+have, along with which |
| 493 |
.B pass |
| 494 |
device controls them. |
| 495 |
.P |
| 496 |
@@ -236,28 +232,28 @@ |
| 497 |
.B /usr/sbin/devfsadm -C |
| 498 |
to clean out no-longer-extant entries in your /devices directory, then |
| 499 |
.B find /devices -name \e\(**changer -print |
| 500 |
-to find the device name. Set the symbolic link |
| 501 |
-.B /dev/changer |
| 502 |
+to find the device name. Set the symbolic link |
| 503 |
+.B /dev/changer |
| 504 |
to point |
| 505 |
to that device name (if it is not doing so already). |
| 506 |
.P |
| 507 |
With BRU, set your mount and unmount commands as described on the BRU |
| 508 |
web site at http://www.bru.com to move to the next tape when backing up |
| 509 |
-or restoring. With GNU |
| 510 |
+or restoring. With GNU |
| 511 |
.B tar, |
| 512 |
-see |
| 513 |
+see |
| 514 |
.B mtx.doc |
| 515 |
for an example of how to use |
| 516 |
.B tar |
| 517 |
-and |
| 518 |
+and |
| 519 |
.B mtx |
| 520 |
-to make multi-tape backups. |
| 521 |
+to make multi-tape backups. |
| 522 |
|
| 523 |
.SH AVAILABILITY |
| 524 |
-This version of |
| 525 |
+This version of |
| 526 |
.B mtx |
| 527 |
is currently being maintained by Robert Nelson <[email protected]> . |
| 528 |
The 'mtx' home page is http://mtx.sourceforge.net and the actual code is currently available |
| 529 |
-there and via SVN from http://sourceforge.net/projects/mtx. |
| 530 |
+there and via SVN from http://sourceforge.net/projects/mtx. |
| 531 |
.SH SEE ALSO |
| 532 |
.BR mt (1), loaderinfo (1), tapeinfo (1), scsitape (1), scsieject (1) |
| 533 |
--- a/scsieject.1 |
| 534 |
+++ b/scsieject.1 |
| 535 |
@@ -22,20 +22,20 @@ |
| 536 |
.\" |
| 537 |
.TH scsieject 1 scsieject1.0 |
| 538 |
.SH NAME |
| 539 |
-scsieject \- control SCSI tape devices |
| 540 |
+scsieject \- control SCSI tape devices |
| 541 |
.SH SYNOPSIS |
| 542 |
scsieject [-f <scsi-generic-device>] commands |
| 543 |
.SH DESCRIPTION |
| 544 |
-The |
| 545 |
+The |
| 546 |
.B scsieject |
| 547 |
command controls SCSI devices in a platform-independent |
| 548 |
-manner. As long as 'mtx' works on the platform, so does 'scsieject'. |
| 549 |
+manner. As long as 'mtx' works on the platform, so does 'scsieject'. |
| 550 |
.SH OPTIONS |
| 551 |
The first argument, given following |
| 552 |
.B -f |
| 553 |
, is the SCSI generic device corresponding to your tape drive. |
| 554 |
Consult your operating system's documentation for more information (for |
| 555 |
-example, under Linux these are generally /dev/sg0 through /dev/sg15, |
| 556 |
+example, under Linux these are generally /dev/sg0 through /dev/sgXX, |
| 557 |
under FreeBSD these are /dev/pass0 through /dev/passX. Under Solaris |
| 558 |
this is usually the same as your tape drive (Solaris has a SCSI passthrough |
| 559 |
ioctl). You can set the STAPE or TAPE environment variable rather |
| 560 |
@@ -44,22 +44,22 @@ |
| 561 |
.SH COMMANDS |
| 562 |
.TP 10 |
| 563 |
.B load |
| 564 |
-Load the medium into the drive. When this command is issued to a CD/DVD drive |
| 565 |
+Load the medium into the drive. When this command is issued to a CD/DVD drive |
| 566 |
and the tray is extended the tray will be retracted if the drive is capable of it. |
| 567 |
|
| 568 |
.TP 10 |
| 569 |
.B unload |
| 570 |
-Unload the medium from the drive (also known as eject). When this command is issued |
| 571 |
+Unload the medium from the drive (also known as eject). When this command is issued |
| 572 |
to a CD/DVD drive or a tape drive the media will be ejected if the device supports it. |
| 573 |
|
| 574 |
.TP 10 |
| 575 |
.B start |
| 576 |
-Start the device. Some devices require a start command after a media changer has |
| 577 |
+Start the device. Some devices require a start command after a media changer has |
| 578 |
loaded new media into the device. |
| 579 |
|
| 580 |
.TP 10 |
| 581 |
.B stop |
| 582 |
-Stop the device. Some devices require a stop command prior to unloading the medium |
| 583 |
+Stop the device. Some devices require a stop command prior to unloading the medium |
| 584 |
from the device when using a media changer. |
| 585 |
|
| 586 |
.TP 10 |
| 587 |
@@ -71,46 +71,41 @@ |
| 588 |
Unlock the device. Unlocks the device so that the medium can be removed manually. |
| 589 |
|
| 590 |
.SH AUTHORS |
| 591 |
-This program was written by Robert Nelson <[email protected]> |
| 592 |
-based on the scsitape program written by Eric Lee Green <[email protected]>. |
| 593 |
+This program was written by Robert Nelson <[email protected]> |
| 594 |
+based on the scsitape program written by Eric Lee Green <[email protected]>. |
| 595 |
Major portions of the 'mtxl.c' library used herein were written by |
| 596 |
-Leonard Zubkoff. |
| 597 |
+Leonard Zubkoff. |
| 598 |
.P |
| 599 |
|
| 600 |
.SH HINTS |
| 601 |
-Under Linux, |
| 602 |
-.B cat /proc/scsi/scsi |
| 603 |
-will tell you what SCSI devices you have. |
| 604 |
-You can then refer to them as |
| 605 |
-.B /dev/sga, |
| 606 |
-.B /dev/sgb, |
| 607 |
-etc. by the order they |
| 608 |
-are reported. |
| 609 |
+Under Linux, |
| 610 |
+.B lsscsi \-\-generic |
| 611 |
+will tell you what SCSI devices you have and their device names. |
| 612 |
.P |
| 613 |
-Under FreeBSD, |
| 614 |
+Under FreeBSD, |
| 615 |
.B camcontrol devlist |
| 616 |
will tell you what SCSI devices you |
| 617 |
-have, along with which |
| 618 |
+have, along with which |
| 619 |
.B pass |
| 620 |
device controls them. |
| 621 |
.P |
| 622 |
Under Solaris 7 and 8, |
| 623 |
.B /usr/sbin/devfsadm -C |
| 624 |
will clean up your /devices directory. Then |
| 625 |
-.B find /devices -name 'st@*' -print |
| 626 |
+.B find /devices -name 'st@*' -print |
| 627 |
will return a list of all tape drives. /dev on Solaris is apparently only |
| 628 |
-of historical interest. |
| 629 |
+of historical interest. |
| 630 |
|
| 631 |
.SH BUGS AND LIMITATIONS |
| 632 |
There are no known bugs or limitations. |
| 633 |
|
| 634 |
.SH AVAILABILITY |
| 635 |
-This version of |
| 636 |
+This version of |
| 637 |
.B scsieject |
| 638 |
-is currently being maintained by Robert Nelson <[email protected]> |
| 639 |
-as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 640 |
-http://mtx.sourceforge.net and the actual code is currently available there and via |
| 641 |
-SVN from http://sourceforge.net/projects/mtx. |
| 642 |
+is currently being maintained by Robert Nelson <[email protected]> |
| 643 |
+as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 644 |
+http://mtx.sourceforge.net and the actual code is currently available there and via |
| 645 |
+SVN from http://sourceforge.net/projects/mtx. |
| 646 |
|
| 647 |
.SH SEE ALSO |
| 648 |
.BR loaderinfo (1), tapeinfo (1), mtx (1) |
| 649 |
--- a/scsitape.1 |
| 650 |
+++ b/scsitape.1 |
| 651 |
@@ -23,14 +23,14 @@ |
| 652 |
.\" |
| 653 |
.TH SCSITAPE 1 SCSITAPE1.0 |
| 654 |
.SH NAME |
| 655 |
-scsitape \- control SCSI tape devices |
| 656 |
+scsitape \- control SCSI tape devices |
| 657 |
.SH SYNOPSIS |
| 658 |
scsitape [-f <scsi-generic-device>] commands |
| 659 |
.SH DESCRIPTION |
| 660 |
-The |
| 661 |
+The |
| 662 |
.B scsitape |
| 663 |
command controls SCSI tape drives in a platform-independent |
| 664 |
-manner. As long as 'mtx' works on the platform, so does 'scsitape'. |
| 665 |
+manner. As long as 'mtx' works on the platform, so does 'scsitape'. |
| 666 |
.P |
| 667 |
Note that 'scsitape' and your OS's native tape driver may stomp on each |
| 668 |
other. In particular, if you use 'setblk' and your OS's native tape |
| 669 |
@@ -38,13 +38,13 @@ |
| 670 |
It is recommended to use 'scsitape' only for software where you've written |
| 671 |
your own low-level READ and WRITE routines that use the SCSI command set |
| 672 |
to directly talk to tape drives (i.e., you do not use the OS's native tape |
| 673 |
-driver at all). |
| 674 |
+driver at all). |
| 675 |
.SH OPTIONS |
| 676 |
The first argument, given following |
| 677 |
.B -f |
| 678 |
, is the SCSI generic device corresponding to your tape drive. |
| 679 |
Consult your operating system's documentation for more information (for |
| 680 |
-example, under Linux these are generally /dev/sg0 through /dev/sg15, |
| 681 |
+example, under Linux these are generally /dev/sg0 through /dev/sg15, |
| 682 |
under FreeBSD these are /dev/pass0 through /dev/passX. Under Solaris |
| 683 |
this is usually the same as your tape drive (Solaris has a SCSI passthrough |
| 684 |
ioctl). You can set the STAPE or TAPE environment variable rather |
| 685 |
@@ -54,7 +54,7 @@ |
| 686 |
.TP 10 |
| 687 |
.B setblk <n> |
| 688 |
Set the tape drive's SCSI block size to <n> bytes. (NOTE: if you are |
| 689 |
-using your OS's native tape driver, THIS IS EVIL!). |
| 690 |
+using your OS's native tape driver, THIS IS EVIL!). |
| 691 |
|
| 692 |
.TP 10 |
| 693 |
.B fsf <n> |
| 694 |
@@ -67,7 +67,7 @@ |
| 695 |
that tape mark, for a sum total of zero effective movement!). |
| 696 |
.TP 10 |
| 697 |
.B eod |
| 698 |
-Go to end of data. |
| 699 |
+Go to end of data. |
| 700 |
.TP 10 |
| 701 |
.B rewind |
| 702 |
Rewind the tape drive. |
| 703 |
@@ -76,21 +76,21 @@ |
| 704 |
Eject the tape currently in the drive. |
| 705 |
.TP 10 |
| 706 |
.B erase |
| 707 |
-Does a *short* erase (warning: does NOT work on all drives!). |
| 708 |
+Does a *short* erase (warning: does NOT work on all drives!). |
| 709 |
.TP 10 |
| 710 |
.B mark <n> |
| 711 |
- write <n> filemarks ( 'mark 0' flushes the drive's buffers ). |
| 712 |
+ write <n> filemarks ( 'mark 0' flushes the drive's buffers ). |
| 713 |
.TP 10 |
| 714 |
.B seek <n> |
| 715 |
Seek to a logical position <n> that was reported by a previous 'tapeinfo' |
| 716 |
-command. |
| 717 |
+command. |
| 718 |
.TP 10 |
| 719 |
-.B write <blocksize> |
| 720 |
+.B write <blocksize> |
| 721 |
write blocks from stdin to the tape. Chunk the data into <blocksize>-sized |
| 722 |
-chunks. *DOES NOT WRITE OUT A TAPEMARK!* (you will need to use a |
| 723 |
+chunks. *DOES NOT WRITE OUT A TAPEMARK!* (you will need to use a |
| 724 |
subsequent |
| 725 |
.B mark 1 |
| 726 |
-command to write out a tape mark). |
| 727 |
+command to write out a tape mark). |
| 728 |
.TP 10 |
| 729 |
.B read [<blocksize>] [ <#blocks/#bytes> ] |
| 730 |
read blocks from the tape, write them to stdout. If we are in variable |
| 731 |
@@ -99,13 +99,13 @@ |
| 732 |
need to be turned into a settable variable to allow bigger reads). If |
| 733 |
<blocksize> is omitted, we assume that we're in variable block mode, and |
| 734 |
that we are going to read from tape until we hit a tapemark or end of |
| 735 |
-partition or end of tape. |
| 736 |
+partition or end of tape. |
| 737 |
|
| 738 |
|
| 739 |
.SH AUTHORS |
| 740 |
-This program was written by Eric Lee Green <[email protected]>. |
| 741 |
+This program was written by Eric Lee Green <[email protected]>. |
| 742 |
Major portions of the 'mtxl.c' library used herein were written by |
| 743 |
-Leonard Zubkoff. |
| 744 |
+Leonard Zubkoff. |
| 745 |
.P |
| 746 |
|
| 747 |
The SCSI read and write routines are based upon those that Richard |
| 748 |
@@ -120,28 +120,23 @@ |
| 749 |
under the GNU General Public License. |
| 750 |
|
| 751 |
.SH HINTS |
| 752 |
-Under Linux, |
| 753 |
-.B cat /proc/scsi/scsi |
| 754 |
-will tell you what SCSI devices you have. |
| 755 |
-You can then refer to them as |
| 756 |
-.B /dev/sga, |
| 757 |
-.B /dev/sgb, |
| 758 |
-etc. by the order they |
| 759 |
-are reported. |
| 760 |
+Under Linux, |
| 761 |
+.B lsscsi \-\-generic |
| 762 |
+will tell you what SCSI devices you have and their device names. |
| 763 |
.P |
| 764 |
-Under FreeBSD, |
| 765 |
+Under FreeBSD, |
| 766 |
.B camcontrol devlist |
| 767 |
will tell you what SCSI devices you |
| 768 |
-have, along with which |
| 769 |
+have, along with which |
| 770 |
.B pass |
| 771 |
device controls them. |
| 772 |
.P |
| 773 |
Under Solaris 7 and 8, |
| 774 |
.B /usr/sbin/devfsadm -C |
| 775 |
will clean up your /devices directory. Then |
| 776 |
-.B find /devices -name 'st@*' -print |
| 777 |
+.B find /devices -name 'st@*' -print |
| 778 |
will return a list of all tape drives. /dev on Solaris is apparently only |
| 779 |
-of historical interest. |
| 780 |
+of historical interest. |
| 781 |
|
| 782 |
.SH BUGS AND LIMITATIONS |
| 783 |
|
| 784 |
@@ -150,7 +145,7 @@ |
| 785 |
where you are doing variable-block-size reads and wish for <n> bytes, |
| 786 |
it instead reads one and exactly one block from tape and prints that |
| 787 |
(no matter what its size). Use 'dd' on the output of scsitape if you |
| 788 |
-want finer control. |
| 789 |
+want finer control. |
| 790 |
.P |
| 791 |
.B scsitape read 0 |
| 792 |
attempts reads of MAX_READ_SIZE, which is currently 128K. If blocks on tape |
| 793 |
@@ -161,19 +156,19 @@ |
| 794 |
native tape driver. You will likely see weird things happen if you |
| 795 |
attempt to intermingle scsitape commands with native tape driver |
| 796 |
operations. Note that BRU 16.1 for Solaris (and possibly others, but |
| 797 |
-Solaris I know about) will have a 'scsi' keyword to bypass the |
| 798 |
+Solaris I know about) will have a 'scsi' keyword to bypass the |
| 799 |
native tape driver and write via direct uscsi commands, so if you |
| 800 |
use 'scsitape' to bypass the flaws of the native Solaris driver, you can use |
| 801 |
BRU 16.1 to write your actual tape archives. (Assuming that BRU 16.1 |
| 802 |
-has been released at the time that you read this). |
| 803 |
+has been released at the time that you read this). |
| 804 |
|
| 805 |
.SH AVAILABILITY |
| 806 |
-This version of |
| 807 |
+This version of |
| 808 |
.B scsitape |
| 809 |
-is currently being maintained by Robert Nelson <[email protected]> |
| 810 |
-as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 811 |
-http://mtx.sourceforge.net and the actual code is currently available there and via |
| 812 |
-SVN from http://sourceforge.net/projects/mtx. |
| 813 |
+is currently being maintained by Robert Nelson <[email protected]> |
| 814 |
+as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 815 |
+http://mtx.sourceforge.net and the actual code is currently available there and via |
| 816 |
+SVN from http://sourceforge.net/projects/mtx. |
| 817 |
|
| 818 |
.SH SEE ALSO |
| 819 |
.BR loaderinfo (1), tapeinfo (1), mtx (1) |
| 820 |
--- a/tapeinfo.1 |
| 821 |
+++ b/tapeinfo.1 |
| 822 |
@@ -28,45 +28,48 @@ |
| 823 |
.SH SYNOPSIS |
| 824 |
tapeinfo -f <scsi-generic-device> |
| 825 |
.SH DESCRIPTION |
| 826 |
-The |
| 827 |
+The |
| 828 |
.B tapeinfo |
| 829 |
command reads various information from SCSI tape drives that is not |
| 830 |
generally available via most vendors' tape drivers. It issues raw |
| 831 |
commands directly to the tape drive, using either the operating system's |
| 832 |
SCSI generic device ( e.g. /dev/sg0 on Linux, /dev/pass0 on FreeBSD) or |
| 833 |
-the raw SCSI I/O ioctl on a tape device on some operating systems. |
| 834 |
+the raw SCSI I/O ioctl on a tape device on some operating systems. |
| 835 |
.P |
| 836 |
One good time to use 'tapeinfo' is immediately after a tape i/o operation has |
| 837 |
failed. On tape drives that support HP's 'tapealert' API, 'tapeinfo' will |
| 838 |
-report a more exact description of what went wrong. |
| 839 |
+report a more exact description of what went wrong. |
| 840 |
.P |
| 841 |
Do be aware that 'tapeinfo' is not a substitute for your operating system's |
| 842 |
own 'mt' or similar tape driver control program. It is intended to supplement, |
| 843 |
not replace, programs like 'mt' that access your operating system's tape |
| 844 |
-driver in order to report or set information. |
| 845 |
+driver in order to report or set information. |
| 846 |
.SH OPTIONS |
| 847 |
The first argument, given following |
| 848 |
.B -f |
| 849 |
, is the SCSI generic device corresponding to your tape drive. |
| 850 |
Consult your operating system's documentation for more information (for |
| 851 |
-example, under Linux these are generally start at /dev/sg0 |
| 852 |
+example, under Linux these are generally start at /dev/sg0 |
| 853 |
under FreeBSD these start at /dev/pass0). |
| 854 |
.P |
| 855 |
-Under FreeBSD, 'camcontrol devlist' will tell you what SCSI devices you |
| 856 |
-have, along with which 'pass' device controls them. Under Linux, |
| 857 |
-"cat /proc/scsi/scsi" will tell you what SCSI devices you have. |
| 858 |
+Under FreeBSD, |
| 859 |
+.B camcontrol devlist |
| 860 |
+will tell you what SCSI devices you have, along with which 'pass' device |
| 861 |
+controls them. Under Linux, the command |
| 862 |
+.B lsscsi \-\-generic |
| 863 |
+will tell you what SCSI devices you have. |
| 864 |
|
| 865 |
.SH BUGS AND LIMITATIONS |
| 866 |
.P |
| 867 |
This program has only been tested on Linux with a limited number of |
| 868 |
-tape drives (HP DDS4, Seagate AIT). |
| 869 |
+tape drives (HP DDS4, Seagate AIT, IBM LTO-6). |
| 870 |
.P |
| 871 |
.SH AVAILABILITY |
| 872 |
.B tapeinfo |
| 873 |
-is currently being maintained by Robert Nelson <[email protected]> |
| 874 |
-as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 875 |
-http://mtx.sourceforge.net and the actual code is currently available there and via |
| 876 |
-SVN from http://sourceforge.net/projects/mtx. |
| 877 |
+is currently being maintained by Robert Nelson <[email protected]> |
| 878 |
+as part of the 'mtx' suite of programs. The 'mtx' home page is |
| 879 |
+http://mtx.sourceforge.net and the actual code is currently available there and via |
| 880 |
+SVN from http://sourceforge.net/projects/mtx. |
| 881 |
|
| 882 |
.SH SEE ALSO |
| 883 |
.BR mt (1), mtx (1), scsitape (1), scsieject (1), loaderinfo (1) |