Okay, I just grabbed the chg-zd-mtx script from the CVS... appears to
have solved the problems so far... holding my breath and issuing a
'amdump...' :-)

Peter Normann

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Peter Normann
Sent: 20. maj 2002 14:03
To: [EMAIL PROTECTED]
Subject: I just don't get it.... please help me out here


Hi,

I have been struggling to get amanda to work with my tape changer. And
going over the documentation does not help me. I have read it over and
over again. I have tried to use the chg-zd-mtx and (just now) chg-multi
changer scripts, but I can't get either of them to work. Please, please,
please help me.

First a little background info (focusing on the chg-zd-mtx scenario):

- I have an ADIC FastStor changer with a Quantum DLT7000 tape drive
running Linux 2.5.16 with amanda 2.4.2p2 compiled.
- I have compiled the latest mtx.
- I have downloaded a chg-zd-mtx script
ftp://gandalf.cc.purdue.edu/pub/amanda/chg-zd-mtx.sh.in-243 and issued
the 'configure ...', 'make', 'cd changer-src' and 'make install'
commands.

My changer.conf file looks like this:

firstslot=1
lastslot=5
cleanslot=7
AUTOCLEAN=0
autocleancount=99
havereader=0
OFFLINE_BEFORE_UNLOAD=1
driveslot=0
poll_drive_ready=3
max_drive_wait=120

An excerpt from my amanda.conf:

runtapes 5             
tpchanger "chg-zd-mtx" 
tapedev "/dev/nst0"    
rawtapedev "/dev/null" 
changerfile "changer"
changerdev "/dev/sg0"

Now let's see what happens:

> mtx -f /dev/sg0 inquiry
Product Type: Medium Changer
Vendor ID: 'ADIC    '
Product ID: 'FastStor DLT    '
Revision: 'B117'
Attached Changer: No

> mtx -f /dev/sg1 inquiry
Product Type: Tape Drive
Vendor ID: 'QUANTUM '
Product ID: 'DLT7000         '
Revision: '391B'
Attached Changer: No

> /usr/local/amanda/libexec/chg-zd-mtx -info

0 5 1

> echo $?
1

>/usr/local/amanda/libexec/chg-zd-mtx -reset (takes forever)
1 /dev/nst0

> echo $?
0

So far so good.

>/usr/local/amanda/libexec/chg-zd-mtx -slot next (takes forever)
/usr/local/amanda/libexec/chg-zd-mtx: [: -eq: unary operator expected
(then takes forever again) 2 /dev/nst0

> echo $?
0

>/usr/local/amanda/libexec/chg-zd-mtx -slot current (takes 1 sec)
2 /dev/nst0

>amtape Daily1 reset (takes forever)
amtape: changer is reset, slot 1 is loaded.

>amtape Daily1 slot next (waits a year)
amtape: could not rewind [: -eq: unary operator expected: no tape
onlineamtape: changed to slot /usr/local/amanda/libexec/chg-zd-mtx: on
[: -eq: unary operator expected

>amtape Daily1 slot current
amtape: changed to slot 2 on /dev/nst0

---------------------------------------

When I issue a
>amtape Daily1 show
amtape: scanning all 5 slots in tape-changer rack:
slot 2: date X        label tape2
slot /usr/local/amanda/libexec/chg-zd-mtx:: no tape online
slot /usr/local/amanda/libexec/chg-zd-mtx:: no tape online
....

When I label the tapes with the command (and the current tape is e.g.
tape1 in slot 1) I get

>amlabel Daily1 tape2 slot 2
labeling tape in slot /usr/local/amanda/libexec/chg-zd-mtx: ([: -eq:
unary operator expected): rewinding
amlabel: no tape online

So I issue the command again

>amlabel Daily1 tape2 slot 2
labeling tape in slot 2 (/dev/nst0):
rewinding, reading label tape2
rewinding, writing label tape2, checking label, done.


I don't know if any of you can see right though this and tell me what
the problem is. If the problem lies in the changer-script I would be
grateful if you could point me to a working script, since I don't know
any perl myself.


Peter Normannn






Reply via email to