Imported Upstream version 1.2.17rel
[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. Please
41   read the man page for directions.
42
43 Q: When I do 'mtx -f /dev/sga inquiry' it shows 
44       Product Type: Tape Drive
45       Vendor Id: HP       
46       Product ID: C1553A 
47    But when I do a 'mtx -f /dev/sga status' it fails. Why?!
48 A: You're trying to send a robotics command to a tape drive. You need
49    to send robotics commands to robotics devices, not to tape drives. Look in
50   /proc/scsi/scsi (Linux) or camcontrol (FreeBSD) to find out what the
51   robotics device is. It will be reported as a 'Medium Changer', not a
52   'Sequential Access' or 'Tape Drive'.
53
54 Q: When I do 'cat /proc/scsi/scsi' it shows only one device, the tape device!
55 A: You are using a DAT autochanger that has one SCSI ID but two LUN's, LUN 0
56    and LUN 1. You need to compile a new kernel with  SCAN SCSI LUNS enabled
57    or add this line to your /etc/lilo.conf (then run /sbin/lilo and reboot): 
58        append="max_scsi_luns=2"
59
60 Q: I'm tired of typing '-f /dev/sgc' all the time. How do I set a default
61   device that 'mtx' looks at?
62 A: Set the CHANGER environment variable. For example, with 'bash':
63      export CHANGER=/dev/sgc
64
65 Q: I get "modprobe: can't locate module char-major-21"
66    syslog messages being squirreled away into a file on our syslog host,
67    and mtx doesn't work. What's the problem?
68 A: You need to compile SCSI generic support into your kernel (or as a module).
69
70 Q: When I installed mtx, a message showed 
71    up on the console stating that a scsi changer was found at
72    dev sgr. However, I have no device /dev/sgr.
73 A: On Linux, do 'mknod /dev/sgr c 21 19' to create a device node. By default
74   only 16 SCSI generic nodes are created, which might not be enough if
75   you have multiple SCSI controllers with lots of devices.
76
77 ******************************************************
78 III. Operational issues:
79
80 Q: I'm using Red Hat 7.0 and mtx works fine when I type ./mtx from the
81    command line, but when I use it from scripts I get the following:
82     mtx: Request Sense: Error Code=70 (Current)
83     mtx: Request Sense: Sense Key=Aborted Command
84     mtx: Request Sense: Additional Sense Code = 4E
85     mtx: Request Sense: Additional Sense Qualifier = 00
86    What's happening?
87 A: Do "rpm -e mtx". Red Hat 7.0 includes a busted version of mtx. Your
88    script is apparently picking up the busted mtx in your path. Get rid
89    of the busted mtx, make sure that /usr/local/bin (or wherever you
90    put the "good" mtx) is in the path, and all should be well. 
91
92 Q: I get
93    # /usr/local/bin/mtx -f /dev/sgr status
94    mtx: Request Sense: Error Code=70 (Current)
95    mtx: Request Sense: Sense Key=Not Ready
96    mtx: Request Sense: Additional Sense Code = 04
97    mtx: Request Sense: Additional Sense Qualifier = 8E
98    mtx: READ ELEMENT STATUS Command Failed
99   What gives?
100 A: Make sure your loader is in random mode, not sequential mode.
101    Most "real" loaders (as vs. DAT autoloaders) will not properly report
102    status information unless they are in "random" mode. 
103
104
105 Q: I issue 'mtx load 5' and it loads tape 5. But when I try to put the tape
106    back in the magazine, we hit problems:
107       mtx: MOVE MEDIUM from Element Address 82 to 5 Failed
108    What gives?
109 A: Many loaders require you to first eject the tape (using 'mt' or 'tapectl')
110   before you issue an 'unload' command via 'mtx'. 
111
112 Q: My Breece Hill loader does not properly report its slots.
113 A: Either set the "auto-inventory" feature in the loader's control panel, 
114    or run 'mtx inventory' prior to running 'mtx status'. 
115
116 Q: My Breece Hill loader takes a long time to do an inventory. mtx times
117    out and spits all over the place. Help!
118 A: Many loaders that support barcodes will perform poorly if you place tapes
119   into them without bar codes. Place bar codes on all your tapes and you
120   should be able to run 'mtx inventory' without that failure.
121
122 Q: How do I eject the magazine of my autoloader?
123 A: Many low-end DAT autoloaders support the removable media 'EJECT' command 
124    sent to the robotics device, even though it's not documented (or required)
125    in the SCSI standards. If the loader is at /dev/sgb, simply do 
126    'mtx -f /dev/sgb eject' and see what happens. (If nothing happens, 
127     your autoloader doesn't support 'eject'). Some high-end libraries have 
128    their own proprietary way for ejecting magazine trays, generally 
129    involving abuse of the 'transfer' command and 'eepos' addendums,
130     but this is totally non-standard and undocumented. 
131
132 Q: Is there a standard for cleaning tape bar codes?
133 A: Many libraries, and many backup programs, expect cleaning tape bar 
134    codes to start with "CLN". 
135
136 Q: How do I report a bug?
137 A: First, read this FAQ. Next, check the mtx list archives at
138    http://mtx.sourceforge.net to make sure that it's not already addressed 
139    by somebody else. If your problem is still not solved, send 
140    (to the mtx list) the following information:
141         Result of 'mtx inquiry' on the loader, 
142         Result of 'mtx status' on the loader (minus a bunch of tapes if
143           it's a 50+ tape loader!), 
144         Results of the operation that isn't working correctly. 
145