Re: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
On Sun, 24 Mar 2002, Derrick Miller wrote: So, my questions: 1) Does anyone have this changer working with Amanda? I would give just about anything to get my hands on copies of working config and chg-zd-mtx files. For what it may be worth, Derrick, I have a Sun StorEdge jukebox attached to an Enterprise class Solaris system. While mtx itself worked, I never got the chg-zd-mtx script to work. I had to do things like hard-code variables just to even get it to run but I never got it to perform any significant functions. I inhereted the installation and found out that chg-scsi was never tried, but lo and behold, I spent a little time tweaking it, it worked well, and have used it ever since. It really is a great little program. The only functionality that does not work for me right now is the barcode stuff but Thomas Hepper has been working with me to make that work. BTW, I use 2.4.3b2. The StorEdge is a 30-slot jukebox with two DLT IV tape drives. Any pointers whatsoever would be greatly appreciated, as I've been beating my head against this for over a month and have made very little progress. Good luck. If I hadn't discovered chg-scsi would do the job, I would have tried writing my own perl script. Lots of people use chg-zd-mtx, though, which always made me feel worse! :^P - - - -- Eric Trager CMAG, DCB, CIT, NIH [EMAIL PROTECTED]
RE: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
Message: 16 Date: Sun, 24 Mar 2002 02:22:47 -0500 From: Derrick Miller [EMAIL PROTECTED] Subject: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2) 1) Does anyone have this changer working with Amanda? I would give just about anything to get my hands on copies of working config and chg-zd-mtx files. I am using a different changer script supplied by Chris Pascoe and once upon a time posted to this list (in a slightly earlier version). I have attached my current copy (I hope you don't mind, Chris). Beware of line endings - I read email on a windows box, even though most of our servers are unix/linux. With this tape drive running alone on the SCSI bus from an adaptec 2944, amverify gets occasional Unexpected busfree in Data-in phase. It would be interesting to know if anyone else with this hardware combination gets this error when running amverify or not. If you have not bothered with amverify, I would urge you to try it, lest your tapes are unreadable when you need them most. #!/bin/sh # # Exit Status: # 0 Alles Ok # 1 Illegal Request # 2 Fatal Error # # Contributed by Eric DOUTRELEAU [EMAIL PROTECTED] # This is supposed to work with Zubkoff/Dandelion version of mtx # # Modified by Joe Rhett [EMAIL PROTECTED] # to work with MTX 1.2.9 by Eric Lee Green http://mtx.sourceforge.net # # Modified by Chris Pascoe [EMAIL PROTECTED] to work with a # Dell PowerVault 120T, MTX 1.2.10 and add some intelligence to # exit when all slots are empty. (Jan 2001). Fixed introduced # bugs when going backwards and potential problem with changers having # more than 9 slots (July 2001). # # You may need to customize these things MT=/bin/mt MTF=-f MTX=/sbin/mtx DD=/bin/dd cleanslot=-1 accessbeforeclean=119 ONLINEREGEX=ONLINE|READY|sense[_ ]key[(]0x0[)]|sense key error = 0|^er=0$ # No user-level customized required beyond this point. # try to hit all the possibilities here prefix=/usr/local/amanda/2.4.2p1 exec_prefix=${prefix} sbindir=${exec_prefix}/sbin libexecdir=${exec_prefix}/libexec PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin export PATH if [ -d /tmp/amanda ]; then DBGFILE=/tmp/amanda/changer.debug else DBGFILE=/dev/null fi if [ ! -f amanda.conf ]; then echo No amanda config in current directory exit 2; fi USE_VERSION_SUFFIXES=no if test $USE_VERSION_SUFFIXES = yes; then SUF=-2.4.2p1 else SUF= fi myname=$0 tape=`amgetconf$SUF tapedev` TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command if [ $tape = /dev/null -o $TAPE = /dev/null ]; then echo Both tapedev and changerdev must be specified in config file; exit 2; fi changerfile=`amgetconf$SUF changerfile` if [ -z $changerfile ]; then echo changerfile not specified in amanda config? exit 2 fi cleanfile=$changerfile-clean accessfile=$changerfile-access slotfile=$changerfile-slot [ ! -f $cleanfile ] echo 0 $cleanfile [ ! -f $accessfile ] echo 0 $accessfile [ ! -f $slotfile ] echo 0 $slotfile cleancount=`cat $cleanfile` accesscount=`cat $accessfile` # Routines start here readstatus() { usedslot=`$MTX status | sed -n 's/Data Transfer Element 0:Empty/-1/p;s/Data Transfer Element 0:Full (Storage Element \([0-9]\+\) Loaded)/\1/p'` if [ $usedslot -eq -1 ]; then echo '-1' $slotfile fi echo STATUS - currently loaded slot = $usedslot $DBGFILE } getslots() { slotlist=`$MTX status | sed -n 's/Storage Element \([0-9]\+\):\(Empty\|Full\)/\1/p'` fullslots=`$MTX status | sed -n 's/Storage Element \([0-9]\+\):Full/\1/p;s/Data Transfer Element 0:Full (Storage Element \([0-9]\+\) Loaded)/\1/p'` dataslots=`$MTX status | sed -n 's/Storage Element \([0-9]\+\):Full/\1/p;s/Data Transfer Element 0:Full (Storage Element \([0-9]\+\) Loaded)/\1/p' | fgrep -v ^${cleanslot}$ | sort -n` numdataslots=`echo $dataslots | wc -w | awk '{print $1}'` if [ -z $dataslots ]; then dataslots=-1 fi firstslot=`echo $slotlist | awk '{print $1}'` lastslot=`echo $slotlist | awk '{print $NF}'` firstdataslot=`echo $dataslots | awk '{print $1}'` lastdataslot=`echo $dataslots | awk '{print $NF}'` nextdataslot=`echo $dataslots | awk -v CURR=$usedslot 'BEGIN { P=0 }; { for (i=1; i = NF; i++) { if ($i CURR P == 0) { P=1; print $i } }; if (P == 0) { P=1; print $1 } }'` prevdataslot=`echo $dataslots | awk -v CURR=$usedslot 'BEGIN { P=0 }; { for (i=NF; i = 1; i--) { if ($i CURR P == 0) { P=1; print $i } }; if (P == 0) { P=1; print $NF } }'` echo GETSLOTS - data slot list = `echo $dataslots` $DBGFILE echo - first data slot = $firstdataslot $DBGFILE echo
Re: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
Jim, I have this changer working with RedHat 7.2 using the 2.4.2p2 chg-zd-mtx script. The trick to getting it working is getting the configuration file for chg-zd-mtx right. Make sure all the variables mentioned in the script are defined. In my case I have (in /etc/amanda/CONFIG/chg-zd-mtx.conf, replace CONFIG with your configuration name): Are you using the Amanda RPMs supplied with Red Hat 7.2, or did you compile 2.4.2p2 from source? Since I posted my previous message asking for help, I have managed to get Amanda working well with the changer, by compiling from source. I would like to switch back to the RPM version if it will work, though, since I find it's much easier to manage the system using RPM and up2date than it is with source tarballs. Thanks for your help, Derrick Miller
Re: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
* Derrick Miller ([EMAIL PROTECTED]) [020329 12:49]: Jim, I have this changer working with RedHat 7.2 using the 2.4.2p2 chg-zd-mtx script. The trick to getting it working is getting the configuration file for chg-zd-mtx right. Make sure all the variables mentioned in the script are defined. In my case I have (in /etc/amanda/CONFIG/chg-zd-mtx.conf, replace CONFIG with your configuration name): Are you using the Amanda RPMs supplied with Red Hat 7.2, or did you compile 2.4.2p2 from source? Since I posted my previous message asking for help, I have managed to get Amanda working well with the changer, by compiling from source. I would like to switch back to the RPM version if it will work, though, since I find it's much easier to manage the system using RPM and up2date than it is with source tarballs. As a datapoint, I am happily using the RedHat 7.2 RPMs with an HP DLT changer. Best, -- Patrick Michael Kane [EMAIL PROTECTED]
RE: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
Message: 16 Date: Sun, 24 Mar 2002 02:22:47 -0500 From: Derrick Miller [EMAIL PROTECTED] Subject: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2) 1) Does anyone have this changer working with Amanda? I would give just about anything to get my hands on copies of working config and chg-zd-mtx files. I am using a different changer script supplied by Chris Pascoe and once upon a time posted to this list (in a slightly earlier version). I have attached my current copy (I hope you don't mind, Chris). Beware of line endings - I read email on a windows box, even though most of our servers are unix/linux. With this tape drive running alone on the SCSI bus from an adaptec 2944, amverify gets occasional Unexpected busfree in Data-in phase. It would be interesting to know if anyone else with this hardware combination gets this error when running amverify or not. If you have not bothered with amverify, I would urge you to try it, lest your tapes are unreadable when you need them most. #!/bin/sh # # Exit Status: # 0 Alles Ok # 1 Illegal Request # 2 Fatal Error # # Contributed by Eric DOUTRELEAU [EMAIL PROTECTED] # This is supposed to work with Zubkoff/Dandelion version of mtx # # Modified by Joe Rhett [EMAIL PROTECTED] # to work with MTX 1.2.9 by Eric Lee Green http://mtx.sourceforge.net # # Modified by Chris Pascoe [EMAIL PROTECTED] to work with a # Dell PowerVault 120T, MTX 1.2.10 and add some intelligence to # exit when all slots are empty. (Jan 2001). Fixed introduced # bugs when going backwards and potential problem with changers having # more than 9 slots (July 2001). # # You may need to customize these things MT=/bin/mt MTF=-f MTX=/sbin/mtx DD=/bin/dd cleanslot=-1 accessbeforeclean=119 ONLINEREGEX=ONLINE|READY|sense[_ ]key[(]0x0[)]|sense key error = 0|^er=0$ # No user-level customized required beyond this point. # try to hit all the possibilities here prefix=/usr/local/amanda/2.4.2p1 exec_prefix=${prefix} sbindir=${exec_prefix}/sbin libexecdir=${exec_prefix}/libexec PATH=$sbindir:$libexecdir:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin export PATH if [ -d /tmp/amanda ]; then DBGFILE=/tmp/amanda/changer.debug else DBGFILE=/dev/null fi if [ ! -f amanda.conf ]; then echo No amanda config in current directory exit 2; fi USE_VERSION_SUFFIXES=no if test $USE_VERSION_SUFFIXES = yes; then SUF=-2.4.2p1 else SUF= fi myname=$0 tape=`amgetconf$SUF tapedev` TAPE=`amgetconf$SUF changerdev`; export TAPE # for mtx command if [ $tape = /dev/null -o $TAPE = /dev/null ]; then echo Both tapedev and changerdev must be specified in config file; exit 2; fi changerfile=`amgetconf$SUF changerfile` if [ -z $changerfile ]; then echo changerfile not specified in amanda config? exit 2 fi cleanfile=$changerfile-clean accessfile=$changerfile-access slotfile=$changerfile-slot [ ! -f $cleanfile ] echo 0 $cleanfile [ ! -f $accessfile ] echo 0 $accessfile [ ! -f $slotfile ] echo 0 $slotfile cleancount=`cat $cleanfile` accesscount=`cat $accessfile` # Routines start here readstatus() { usedslot=`$MTX status | sed -n 's/Data Transfer Element 0:Empty/-1/p;s/Data Transfer Element 0:Full (Storage Element \([0-9]\+\) Loaded)/\1/p'` if [ $usedslot -eq -1 ]; then echo '-1' $slotfile fi echo STATUS - currently loaded slot = $usedslot $DBGFILE } getslots() { slotlist=`$MTX status | sed -n 's/Storage Element \([0-9]\+\):\(Empty\|Full\)/\1/p'` fullslots=`$MTX status | sed -n 's/Storage Element \([0-9]\+\):Full/\1/p;s/Data Transfer Element 0:Full (Storage Element \([0-9]\+\) Loaded)/\1/p'` dataslots=`$MTX status | sed -n 's/Storage Element \([0-9]\+\):Full/\1/p;s/Data Transfer Element 0:Full (Storage Element \([0-9]\+\) Loaded)/\1/p' | fgrep -v ^${cleanslot}$ | sort -n` numdataslots=`echo $dataslots | wc -w | awk '{print $1}'` if [ -z $dataslots ]; then dataslots=-1 fi firstslot=`echo $slotlist | awk '{print $1}'` lastslot=`echo $slotlist | awk '{print $NF}'` firstdataslot=`echo $dataslots | awk '{print $1}'` lastdataslot=`echo $dataslots | awk '{print $NF}'` nextdataslot=`echo $dataslots | awk -v CURR=$usedslot 'BEGIN { P=0 }; { for (i=1; i = NF; i++) { if ($i CURR P == 0) { P=1; print $i } }; if (P == 0) { P=1; print $1 } }'` prevdataslot=`echo $dataslots | awk -v CURR=$usedslot 'BEGIN { P=0 }; { for (i=NF; i = 1; i--) { if ($i CURR P == 0) { P=1; print $i } }; if (P == 0) { P=1; print $NF } }'` echo GETSLOTS - data slot list = `echo $dataslots` $DBGFILE echo - first data slot = $firstdataslot $DBGFILE echo
Re: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
... While mtx itself worked, I never got the chg-zd-mtx script to work. ... BTW, I use 2.4.3b2. ... Was that the 2.4.3 chg-zd-mtx that you had trouble with? I did a pretty significant overhaul for this release and if it doesn't work, now's the time to tell me. If it was 2.4.2, that's a different story. Eric Trager John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
Derrick Miller writes: 1) Does anyone have this changer working with Amanda? I would give just about anything to get my hands on copies of working config and chg-zd-mtx files. I am using a different changer script supplied by Chris Pascoe and once upon a time posted to this list (in a slightly earlier version). I strongly recommend using the chg-zd-mtx from the current CVS now as recommended by John R. Jackson. I dropped it in place on Feb 17, and haven't had any problems since on my amanda-2.4.2p2 installation. In my amanda.conf, I have: tpchanger /opt/local/stow/amanda-2.4.3-20020217/libexec/chg-zd-mtx tapedev /dev/nst0 changerfile changer changerdev /dev/changer (where /dev/changer is a symlink to the changer's sg device) In my amanda config directory, I have a changer.conf with the following values: firstslot=1 lastslot=7 cleanslot=-1 autoclean=0 autocleancount=99 driveslot=0 offline_before_unload=1 unloadpause=3 poll_drive_ready=5 max_drive_wait=300 With this tape drive running alone on the SCSI bus from an adaptec 2944, amverify gets occasional Unexpected busfree in Data-in phase. I'm not seeing these errors (and never have) on my verify runs, with the configuration you describe. I suggest checking all your cabling and the HVD terminator.. Chris
Re: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
John Jackson pointed me to a new chg-zd-mtx script ... but it also barfs, complaining about /usr/lib/amanda/chg-zd-mtx: @AMANDA_TMPDIR@/chg-zd-mtx.status.30913: No such file or directory ... I also said: Save your current chg-zd-mtx.sh.in and replace it with this one, then rerun ./configure (or config.status) and re-install. Did you do this? If the installed chg-zd-mtx still has a bunch of @XXX@ things in it, it implies you didn't rerun ./configure (which substitutes them while converting chg-zd-mtx.sh.in to chg-zd-mtx.sh). Then you need to rerun make and make install to finish the creation and installation of the script. You cannot just take the script as I presented it and drop it into your executable area. Derrick Miller John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
Re: ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
I have this changer working with RedHat 7.2 using the 2.4.2p2 chg-zd-mtx script. The trick to getting it working is getting the configuration file for chg-zd-mtx right. Make sure all the variables mentioned in the script are defined. In my case I have (in /etc/amanda/CONFIG/chg-zd-mtx.conf, replace CONFIG with your configuration name): firstslot=1 1st tape slot lastslot=7 Last tape slot cleanslot=7 Slot with cleaner tape AUTOCLEAN=0 Set to '1' or greater to enable autocleancount=99 Number of access before a clean. havereader=0 If you have a barcode reader, set to 1. offlinestatus=1 Set to 0 if 'mt status' gives an OFFLINE_BEFORE_UNLOAD=1 Does your tape driver require a In /etc/amanda/CONFIG/amanda.conf I have: tpchanger chg-zd-mtx tapedev /dev/nst0 changerfile /etc/amanda/CONFIG/chg-zd-mtx changerdev /dev/sg5 Of course, you're tapedev and changerdev may be different. Also, if you've been having problems getting it working you may have stuff in chg-zd-mtx-* that is wrong -- I'd delete them before trying again. Jim On Sun, Mar 24, 2002 at 02:22:47AM -0500, Derrick Miller wrote: Hi all, A couple weeks ago I posted a message asking for help configuring Amanda 2.4.2p2 to work under Red Hat Linux 7.2 (i386) with an ADIC FastStor DLT changer. (It's actually a Dell PowerVault 120T DLT1, but the changer component is manufactured by ADIC) To recap, everything works fine from the command line - mtx and tar work fine for loading/unloading tapes and doing backups/restores. I just can't get Amanda to even begin to work with the changer. I've tried both the chg-mtx and chg-zd-mtx scripts. John Jackson pointed me to a new chg-zd-mtx script available at ftp://gandalf.cc.purdue.edu/pub/amanda/chg-zd-mtx.sh.in-243 (thanks John) but it also barfs, complaining about /usr/lib/amanda/chg-zd-mtx: AMANDA_TMPDIR/chg-zd-mtx.status.30913: No such file or directory I could be wrong, but from digging through the script, I'm guessing that it requires a later version of Amanda than 2.4.2p2. So, my questions: 1) Does anyone have this changer working with Amanda? I would give just about anything to get my hands on copies of working config and chg-zd-mtx files. 2) If it's not possible to get it working under 2.4.2p2, should I try the 2.4.3b3 release? Is that version useable in a production environment, and/or is it any more likely to work for me than 2.4.2p2? Any pointers whatsoever would be greatly appreciated, as I've been beating my head against this for over a month and have made very little progress. Thanks, Derrick Miller
ADIC / Dell Powervault 120T changer problems under Linux (Pt 2)
Hi all, A couple weeks ago I posted a message asking for help configuring Amanda 2.4.2p2 to work under Red Hat Linux 7.2 (i386) with an ADIC FastStor DLT changer. (It's actually a Dell PowerVault 120T DLT1, but the changer component is manufactured by ADIC) To recap, everything works fine from the command line - mtx and tar work fine for loading/unloading tapes and doing backups/restores. I just can't get Amanda to even begin to work with the changer. I've tried both the chg-mtx and chg-zd-mtx scripts. John Jackson pointed me to a new chg-zd-mtx script available at ftp://gandalf.cc.purdue.edu/pub/amanda/chg-zd-mtx.sh.in-243 (thanks John) but it also barfs, complaining about /usr/lib/amanda/chg-zd-mtx: AMANDA_TMPDIR/chg-zd-mtx.status.30913: No such file or directory I could be wrong, but from digging through the script, I'm guessing that it requires a later version of Amanda than 2.4.2p2. So, my questions: 1) Does anyone have this changer working with Amanda? I would give just about anything to get my hands on copies of working config and chg-zd-mtx files. 2) If it's not possible to get it working under 2.4.2p2, should I try the 2.4.3b3 release? Is that version useable in a production environment, and/or is it any more likely to work for me than 2.4.2p2? Any pointers whatsoever would be greatly appreciated, as I've been beating my head against this for over a month and have made very little progress. Thanks, Derrick Miller