-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
I'm trying to get the above 7-slot autoloader working with Amanda. I'm using amanda versions: amanda-2.4.2p2-1 amanda-server-2.4.2p2-1 amanda-client-2.4.2p2-1 and mtx-1.2.10-1 on RedHat 7.1 As far as I can tell, my changer device is /dev/sg1 and the non-rewind tape device is /dev/nst0 (if anyone thinks differently, shout). mtx -f /dev/sg1 status tells me that I have some slots loaded (loaded slots are the same as the physical device shows) I've configured amanda.conf to use the tpchanger "chg-zd-mtx" option, and I've configured a changer.conf file with the right (hopefully) info. Each time I su to the amanda user, and issue an "amtape config show", I get the following error: bash-2.04$ amtape wibble show amtape: could not get changer info: badly formed result from changer: "/usr/lib/amanda/chg-zd-mtx: [: -eq: unary operator expected" sh -x /usr/lib/amanda/chg-zd-mtx -info shows the following: bash-2.04$ sh -x /usr/lib/amanda/chg-zd-mtx -info + MT=/bin/mt + MTF=-f + MTX=/sbin/mtx + prefix=/usr + exec_prefix=/usr + sbindir=/usr/sbin + libexecdir=/usr/lib/amanda + PATH=/usr/sbin:/usr/lib/amanda:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ucb:/usr/local/bin + export PATH + USE_VERSION_SUFFIXES=no + test no = yes + SUF= ++ amgetconf mailto + email=mwatts + mailer=/usr/bin/Mail + myname=/usr/lib/amanda/chg-zd-mtx ++ amgetconf tapedev + tape=/dev/st0 ++ amgetconf changerdev + TAPE=/dev/sg1 + export TAPE + '[' /dev/st0 = /dev/null -o /dev/sg1 = /dev/null ']' ++ echo /dev/st0 ++ sed -n 's/\/dev\/\(.*\)\([0-9][0-9]*\)\(.*\)/\2/p' + drivenum=0 + '[' -d /tmp/amanda ']' + DBGFILE=/tmp/amanda/changer.debug.drive0 ++ amgetconf changerfile + changerfile=/etc/amanda/wibble/changer + configfile=/etc/amanda/wibble/changer.conf + cleanfile=/etc/amanda/wibble/changer-clean + accessfile=/etc/amanda/wibble/changer-access + slotfile=/etc/amanda/wibble/changer-slot + labelfile=/etc/amanda/wibble/changer-barcodes + '[' '!' -f /etc/amanda/wibble/changer-clean ']' + '[' '!' -f /etc/amanda/wibble/changer-access ']' + '[' '!' -f /etc/amanda/wibble/changer-slot ']' + '[' '!' -f /etc/amanda/wibble/changer-barcodes ']' ++ cat /etc/amanda/wibble/changer-clean + cleancount=0 ++ cat /etc/amanda/wibble/changer-access + accesscount=0 ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/firstslot=\([1-9][0-9]*\)\(.*\)/\1/p' + firstslot= ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/lastslot=\([1-9][0-9]*\)\(.*\)/\1/p' + lastslot= ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/cleanslot=\([1-9][0-9]*\)\(.*\)/\1/p' + cleanslot= ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/OFFLINE_BEFORE_UNLOAD=\([0-9]\)\(.*\)/\1/p' + OFFLINE_BEFORE_UNLOAD= ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/AUTOCLEAN=\([0-9]\)\(.*\)/\1/p' + AUTOCLEAN= ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/autocleancount=\([0-9]\)\(.*\)/\1/p' + autocleancount= ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/havereader=\([0-9]\)\(.*\)/\1/p' + havereader= ++ cat /etc/amanda/wibble/changer.conf ++ sed -n 's/offlinestatus=\([0-9]\)\(.*\)/\1/p' + offlinestatus= ++ date + echo 'Tue Nov 19 15:19:02 GMT 2002 Invoked with args '\''-info'\''' + '[' 1 -ge 1 ']' + shift + info + readstatus + '[' -eq 1 ']' /usr/lib/amanda/chg-zd-mtx: [: -eq: unary operator expected ++ /sbin/mtx status ++ sed -n 's/Data Transfer Element:Empty/-1/p;s/Data Transfer Element:Full (Storage +Element \([1-9][0-9]*\) Loaded)/\1/p;s/Data Transfer Element 0:Empty/-1/p;s/Data +Transfer Element 0:Full (Storage Element \([1-9][0-9]*\) Loaded)/\1/p' + usedslot=-1 + '[' -1 -eq -1 ']' + echo -1 + echo 'STATUS -> currently loaded slot = -1' + echo 'INFO -> current slot -1, last slot , can go backwards 1' + '[' -eq 1 ']' /usr/lib/amanda/chg-zd-mtx: [: -eq: unary operator expected + '[' -1 -lt 0 ']' + echo '0 1' 0 1 + exit 0 bash-2.04$ Any ideas on whats wrong? If someone has a working config for one of these AutoLoaders, could they share it :o) Thanks, Mark. - -- Mark Watts Systems Engineer QinetiQ TIM St Andrews Road, Malvern Work: 01684 897456 Mobile: 07976 971090 GPG Public Key available on request. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE92lcXBn4EFUVUIO0RAtFSAJ4xQiBHENHRsnCBe0xnmgpLcOQmnACcC6R6 apC5h7IyPEja3BbZA8GObvQ= =Vb6f -----END PGP SIGNATURE-----