Hi all,
am I the only (last?) one who uses AMANDA with a QIC3020 drive and the
ftape 4.x drivers?
I have both (for ftape: ftape-4.04a, ftape-tools-1.09 and for AMANDA:
amanda-2.4.1p1) in daily use for some months now and I can say that
everything works fine :-)
I had some inconveniences on the way, though:
Compiling the 4.04a ftape and the 1.09 ftape-tools went without
problems. But then I wanted to compile AMANDA and, since AMANDA uses
vtblc to read the tape table and since vtblc is in the ftape-tools
package (I think some version hacked to work with the new ioctl
interface in ftape 4.x)...I got an error:
------------------------
Making all in server-src
make[2]: Entering directory
`/usr/src/packages/BUILD/amanda-2.4.1p1/server-src'
gcc -DHAVE_CONFIG_H -I. -I. -I../config -I../common-src -I../tape-src
-D_FILE_OFFSET_BITS=64 -O2 -pipe -Wall -I /usr/include/readline -I
/usr/src/ftape-4.04a/ftape/compressor -I
/usr/src/ftape-4.04a/ftape/internal -I
/usr/src/ftape-4.04a/ftape/lowlevel -I
/usr/src/ftape-4.04a/ftape/parport -I /usr/src/ftape-4.04a/ftape/setup
-I /usr/src/ftape-4.04a/include/linux -I
/usr/src/ftape-4.04a/ftape/zftape -c taper.c
In file included from /usr/include/vtblc.h:35,
from taper.c:44:
/usr/include/ftvt.h:269: parse error before `ft_format_type'
taper.c: In function `file_reader_side':
taper.c:248: warning: `datestamp' might be used uninitialized in this
function
taper.c: In function `read_file':
taper.c:791: warning: implicit declaration of function `strptime'
taper.c:792: warning: `%D' yields only last 2 digits of year
taper.c:480: warning: `tok' might be used uninitialized in this function
taper.c: In function `label_tape':
taper.c:1572: warning: `%D' yields only last 2 digits of year
make[2]: *** [taper.o] Error 1
make[2]: Leaving directory
`/usr/src/packages/BUILD/amanda-2.4.1p1/server-src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/amanda-2.4.1p1'
make: *** [compile] Error 2
Bad exit status from /var/tmp/rpm-tmp.62727 (%build)
------------------------
The problem is the following: for the new interface to be backwards
compatible, Claus-Justus Heine, the maintainer of ftape, wrote some
wrapper functions around the old ones for vtblc. Although ftape is
compiled without errors, I had to comment some declarations in ftvt.h.
Here's the note I made for me to remember what I did:
------------------------
Error in: ftape-tools-1.09/src/vtblc/ftvt.h
(which gets copied during the installation of ftape-tools
in /usr/include/ftvt.h).
You will have to correct this error in /usr/include/ftvt.h,
not in ftape-tools-1.09/src/vtblc/ftvt.h.
On lines 269-272 the functions must be commented:
/* bsm functions */
/* void ftvt_init_bsm(u_int8_t * buffer, ft_format_type code, int
erase);
* void ftvt_put_bsm_entry(int segment_id, SectorMap new_map);
* SectorMap ftvt_get_bsm_entry(int segment_id);
* void ftvt_print_bad_sector_map(int verbose);
*/
------------------------
With this change ftape 4.x works fine with AMANDA (and is much more
robust than the 3.x version, which could not handle hard errors, thanks
Claus).
I only noticed that after I labelled the tapes the first time using
ftape 4.04a, amcheck could not read the header correctly, responding
"this is not an amanda tape". Here's again the note I did for me to
remember (Note: the lines "String read from header" and "ERROR x" come
from a print statements I inserted in the sources to see what exactly
AMANDA reads and where it reads it):
------------------------
Next problem:
I run amcheck for a tape that was used under ftape-3.04d up till now. I
get:
String read from header: "a"
ERROR 2: /dev/nqft0: tapefd_rdlabel: not an amanda tape.
(expecting tape PASIPHAE or a new tape)
NOTE: skipping tape-writable test.
The "a" above comes as an a only after copying it with gpm.
On the original x-terminal it looks like a grey rectangle.
OK, let's use amlabel under the new ftape-4.04:
rewinding, reading label, no tape online
rewinding, writing label PASIPHAE,
rewinding, updating volume table, done.
So, let's check it again with amcheck:
String read from header: "VTBLb"
ERROR 2: /dev/nqft0: tapefd_rdlabel: not an amanda tape.
(expecting a new tape)
NOTE: skipping tape-writable test.
(Note: I have inserted the "String read from header" message in the
source of AMANDA, to be able to see what it reads there. The same is
also true for the ERROR 2 and tapefd_rdlabel strings).
So now AMANDA reads something else, but still not the right thing.
We try vtblc - just type vtblc:
bacchus:~ # vtblc
Tape drive type: Colorado 1400 (0x11c3)
Switched to raw mode using MTIOCFTMODE ioctl
Reading header segment ... done.
Reading volume table segment ... done.
Nr Id Label Date Start
End Space
--------------------------------------------------------------------------------
0 VTBL "PASIPHAE " 05:11:21 09/19/00 3
4 0.01%
1 VTBL "AMANDA Tape End " 05:11:21 09/19/00 5
6 0.01%
Switched off raw mode using MTIOCFTMODE ioctl
According to vtblc, everything is OK! Now let's call amcheck once again:
String read from header: "AMANDA:"
NOTE: skipping tape-writable test.
Tape PASIPHAE label ok.
Hey! How come the label gets recognized by amcheck now?
>From now on everything works fine, but it is a mystery to me why it is
so...
------------------------
Any comments?
--
Regards
Chris Karakas
Don´t waste your cpu time - crack rc5: http://www.distributed.net