Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Apr 2001 19:46:56 +0200 (CEST)
From:      "Hartmann, O." <ohartman@klima.physik.uni-mainz.de>
To:        <freebsd-ports@freebsd.org>
Cc:        <freebsd-questions@freebsd.org>
Subject:   AMANDA, FreeBSD and manual changer
Message-ID:  <Pine.BSF.4.33.0104201923250.7397-100000@klima.physik.uni-mainz.de>

next in thread | raw e-mail | index | archive | help
Dear Sirs.

It seems to be weird. Either I'm to stupid to come along with a
simple script or something is wrong.

I have a server that should be backuped and it is attached to a
single DAT tape (at this moment a HP C1533A but it changes to
a single HP SureStore 40i, but this doesn't matter, does it?).

I tried to configure AMANDA as taken from the ports (2.4.2p1_2)
under FreeBSD 4.3-RC (a recent cvsupdated system).

Well, all things run well, the configuration seems properly set up
but the drive will not work!

Please let me skip the tasks I did and report only the important things
'chg-manual" driver should need.

I set up a file amanda.conf in which I defined the tapedrive (the user
under which AMANDA runs has read and write access, this is assured!),
I defined a 'changerfile' because AMANDA' chg-manual changer driver seems
to derive several config files from that. I must leave this file empty.
If I put in any configuration parameter I receive an error about each
parameter I obtained.

Well, the first thing every admin should do is to label its tapes or
do a sanity check of its configuration by amcheck. I did so, either.
But I always get the message to insert a cartridge into slot 0 or 1
(what I defined in the slotfile $changerfile-slot), hitting return an
get neverending this only message.

The same happens when trying to label a tape.

Args -> -slot current
     -> rewind /dev/nsa0
     -> status /dev/nsa0
Mode      Density              Blocksize      bpi      Compression
Current:  0x24:DDS-2           variable       61000    DCLZ
---------available modes---------
0:        0x24:DDS-2           variable       61000    DCLZ
1:        0x24:DDS-2           variable       61000    DCLZ
2:        0x24:DDS-2           variable       61000    DCLZ
3:        0x24:DDS-2           variable       61000    DCLZ
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0  Record Number: 0        Residual Count 0
     -> loaded <>
     -> load   1
     -> rewind /dev/nsa0
     -> status /dev/nsa0
Mode      Density              Blocksize      bpi      Compression
Current:  0x24:DDS-2           variable       61000    DCLZ
---------available modes---------
0:        0x24:DDS-2           variable       61000    DCLZ
1:        0x24:DDS-2           variable       61000    DCLZ
2:        0x24:DDS-2           variable       61000    DCLZ
3:        0x24:DDS-2           variable       61000    DCLZ
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0  Record Number: 0        Residual Count 0
     -> loaded <>


This debug script was produced after to failed insertions.

The last tag on each entry reports about some kind of loaded "slot"
or "cardridge", but it remains always empty. That isn't correct,
is it?

I posted a message and a question to the AMANDA users community,
but they reported to me that on several systems the manual changer
works well. Some of the answers are some trackdowns to the script code
and I tried to follow up what is going on in the driver script and I
found something that could be highly related to the behaviour of
FreeBSD's egrep and the type of arguement it gets:

used=`$MT $MTF $tape status 2>&1 | tee -a $logfile | $EGREP "$ONLINEREGEX"`

This is in the script /usr/local/libexec/amanda/chg-manual the position
where 'used' is getting filled. But by what? $ONLINEREGEX seems to search
for a kind of status report received by 'mt status' and this is what I get
back:

Mode      Density              Blocksize      bpi      Compression
Current:  0x24:DDS-2           variable       61000    DCLZ
---------available modes---------
0:        0x24:DDS-2           variable       61000    DCLZ
1:        0x24:DDS-2           variable       61000    DCLZ
2:        0x24:DDS-2           variable       61000    DCLZ
3:        0x24:DDS-2           variable       61000    DCLZ
---------------------------------
Current Driver State: at rest.
---------------------------------
File Number: 0  Record Number: 0        Residual Count 0


Obviously the script isn't capable to extract the FreeBSD specific
informations to obatin the slotnumber or the arguement to decide
whether the slot is loaded or not. But if I'm right, for a single
slot tape drive I only have to check the status against
'tape inserted' and 'no tape' in that situation, or is this wrong?

Can anyone help, please?


Thanks in advance,

Oliver

--
MfG
O. Hartmann

ohartman@klima.physik.uni-mainz.de
----------------------------------------------------------------
IT-Administration des Institut fuer Physik der Atmosphaere (IPA)
----------------------------------------------------------------
Johannes Gutenberg Universitaet Mainz
Becherweg 21
55099 Mainz

Tel: +496131/3924662 (Maschinensaal)
Tel: +496131/3924144
FAX: +496131/3923532


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0104201923250.7397-100000>