Imported Upstream version 1.3.11
[debian/mtx] / FAQ
1 Frequently Asked Questions List, v 1.0.1
2
3 Index: 
4   I. Compiling
5   II. Finding the correct device
6   III. Operational Issues
7
8 Part I: Compiling.
9
10 Q: Where is the Makefile in the tarball?
11 A: MTX now uses GNU Autoconf to generate the Makefile. Type "./configure"
12    while in the extracted mtx directory. 
13
14 Q: Typing 'make' gives me a bunch of errors in the Makefile. Why can't
15    you provide a Makefile that works?
16 A: Note that you need the GNU 'make'. The BSD 'make' won't work, and 
17   Solaris 'make' probably won't work either. If you want a better
18   configuration and makefile system, write one, then EMAIL me the results --
19   mtx is Open Source software and needs your code contributions to grow. 
20
21 Q: How do I compile for operating systems other than Linux?
22 A: MTX no longer needs you to edit the Makefile to compile for operating
23    systems other than Linux. Just type ./configure and go with it. 
24
25 Q: How do I port it to OS's other than the supported ones?
26 A: Create a new scsi_ module using one of the existing modules as an
27    example (scsi_freebsd.c might be a good model). Decide what symbol
28    you want #ifdef'ed in order to include that scsi_ module. Edit
29    mtxl.c to #include your scsi_ module. Edit the Makefile to add the
30    new target, including the -D needed to #include your new scsi_ module. 
31
32 *********************************************************************
33 Part II: Finding the correct device. 
34
35 Q: Why does this command not work??
36     [root@Scotty mtxl-1.4.8]# ./mtx -f /dev/st0 inquiry
37    In /var/log/messages I see:
38       st0: Write not multiple of tape block size. 
39 A: Note that mtx 1.2 and above use the SCSI GENERIC interface on Linux,
40   FreeBSD, and Solaris (at least). They do NOT use the tape device node.
41
42 Q: When I do 'mtx -f /dev/sga inquiry' it shows 
43       Product Type: Tape Drive
44       Vendor Id: HP       
45       Product ID: C1553A 
46    But when I do a 'mtx -f /dev/sga status' it fails. Why?!
47 A: You're trying to send a robotics command to a tape drive. You need
48    to send robotics commands to robotics devices, not to tape drives. Look in
49   /proc/scsi/scsi (Linux) or camcontrol (FreeBSD) to find out what the
50   robotics device is. It will be reported as a 'Medium Changer', not a
51   'Sequential Access' or 'Tape Drive'.
52
53 Q: When I do 'cat /proc/scsi/scsi' it shows only one device, the tape device!
54 A: You are using a DAT autochanger that has one SCSI ID but two LUN's, LUN 0
55    and LUN 1. You need to compile a new kernel with  SCAN SCSI LUNS enabled
56    or add this line to your /etc/lilo.conf (then run /sbin/lilo and reboot): 
57        append="max_scsi_luns=2"
58
59 Q: I'm tired of typing '-f /dev/sgc' all the time. How do I set a default
60   device that 'mtx' looks at?
61 A: Set the CHANGER environment variable. For example, with 'bash':
62      export CHANGER=/dev/sgc
63
64 Q: I get "modprobe: can't locate module char-major-21"
65    syslog messages being squirreled away into a file on our syslog host,
66    and mtx doesn't work. What's the problem?
67 A: You need to compile SCSI generic support into your kernel (or as a module).
68
69 Q: When I installed mtx, a message showed 
70    up on the console stating that a scsi changer was found at
71    dev sgr. However, I have no device /dev/sgr.
72 A: On Linux, do 'mknod /dev/sgr c 21 19' to create a device node. By default
73   only 16 SCSI generic nodes are created, which might not be enough if
74   you have multiple SCSI controllers with lots of devices.
75
76 ******************************************************
77 III. Operational issues:
78
79 Q: I'm using Red Hat 7.0 and mtx works fine when I type ./mtx from the
80    command line, but when I use it from scripts I get the following:
81     mtx: Request Sense: Error Code=70 (Current)
82     mtx: Request Sense: Sense Key=Aborted Command
83     mtx: Request Sense: Additional Sense Code = 4E
84     mtx: Request Sense: Additional Sense Qualifier = 00
85    What's happening?
86 A: Do "rpm -e mtx". Red Hat 7.0 includes a busted version of mtx. Your
87    script is apparently picking up the busted mtx in your path. Get rid
88    of the busted mtx, make sure that /usr/local/bin (or wherever you
89    put the "good" mtx) is in the path, and all should be well. 
90
91 Q: I get
92    # /usr/local/bin/mtx -f /dev/sgr status
93    mtx: Request Sense: Error Code=70 (Current)
94    mtx: Request Sense: Sense Key=Not Ready
95    mtx: Request Sense: Additional Sense Code = 04
96    mtx: Request Sense: Additional Sense Qualifier = 8E
97    mtx: READ ELEMENT STATUS Command Failed
98   What gives?
99 A: Make sure your loader is in random mode, not sequential mode.
100    Most "real" loaders (as vs. DAT autoloaders) will not properly report
101    status information unless they are in "random" mode. 
102
103
104 Q: I issue 'mtx load 5' and it loads tape 5. But when I try to put the tape
105    back in the magazine, we hit problems:
106       mtx: MOVE MEDIUM from Element Address 82 to 5 Failed
107    What gives?
108 A: Many loaders require you to first eject the tape (using 'mt' or 'tapectl')
109   before you issue an 'unload' command via 'mtx'. 
110
111 Q: My Breece Hill loader does not properly report its slots.
112 A: Either set the "auto-inventory" feature in the loader's control panel, 
113    or run 'mtx inventory' prior to running 'mtx status'. 
114
115 Q: My Breece Hill loader takes a long time to do an inventory. mtx times
116    out and spits all over the place. Help!
117 A: Many loaders that support barcodes will perform poorly if you place tapes
118   into them without bar codes. Place bar codes on all your tapes and you
119   should be able to run 'mtx inventory' without that failure.
120
121 Q: How do I eject the magazine of my autoloader?
122 A: Many low-end DAT autoloaders support the removable media 'EJECT' command 
123    sent to the robotics device, even though it's not documented (or required)
124    in the SCSI standards. If the loader is at /dev/sgb, simply do 
125    'mtx -f /dev/sgb eject' and see what happens. (If nothing happens, 
126     your autoloader doesn't support 'eject'). Some high-end libraries have 
127    their own proprietary way for ejecting magazine trays, generally 
128    involving abuse of the 'transfer' command and 'eepos' addendums,
129     but this is totally non-standard and undocumented. 
130
131 Q: Is there a standard for cleaning tape bar codes?
132 A: Many libraries, and many backup programs, expect cleaning tape bar 
133    codes to start with "CLN". 
134
135 Q: How do I report a bug?
136 A: First, read this FAQ. Next, check the mtx list archives at
137    http://mtx.sourceforge.net to make sure that it's not already addressed 
138    by somebody else. If your problem is still not solved, send 
139    (to the mtx list) the following information:
140         Result of 'mtx inquiry' on the loader, 
141         Result of 'mtx status' on the loader (minus a bunch of tapes if
142           it's a 50+ tape loader!), 
143         Results of the operation that isn't working correctly. 
144