On Sun, Feb 14, 2010 at 8:16 AM, shouldbe q931 <shouldbeq...@googlemail.com> wrote: > ooh, found this http://old.nabble.com/Bad-Autochanger-td15870476.html > and following the advice in the 2nd post from John M. Drescher > > ---------------------------------- > If you believe the tape was successfully loaded in a slot then you > need to customize the mtx-changer script. > > Look at the code > > # sleep 15 > wait_for_drive $device > exit $rtn > ;; > > I would comment out wait_for_drive and replace it with sleep 120. Turn > on some debugging in the script so you can see what is happening. > ---------------------------------- > edited mtx-changer, ran autochanger again, and > > *autochanger > > Ah, I see you have an autochanger configured. > To test the autochanger you must have a blank tape > that I can write on in Slot 1. > > Do you wish to continue with the Autochanger test? (y/n): y > > > === Autochanger test === > > 3301 Issuing autochanger "loaded" command. > Slot 1 loaded. I am going to unload it. > 3302 Issuing autochanger "unload 1 0" command. > unload status=OK 0 > 3303 Issuing autochanger "load 1 0" command. > 3303 Autochanger "load 1 0" status is OK. > btape: btape.c:476 open device "Certance" (/dev/st0): OK > btape: btape.c:1562 Rewound "Certance" (/dev/st0) > btape: btape.c:1569 Wrote EOF to "Certance" (/dev/st0) > > The test autochanger worked!!
After that I would verify that the result is reproducible then try to determine the reason for the failure of the following code: wait_for_drive() { i=0 while [ $i -le 300 ]; do # Wait max 300 seconds if mt -f $1 status 2>&1 | grep "${ready}" >/dev/null 2>&1; then break fi debug "Device $1 - not ready, retrying..." sleep 1 i=`expr $i + 1` done } What this does is loops calling mt -f /dev/nst0 status and looks at the output for "ONLINE". If it finds "ONLINE" anywhere in the output it exits the loop otherwise it loops for a maximum of 300 seconds. So the first step in fixing this for your system would be to mount a volume via the autochanger web interface and look at the output of mt -f /dev/nst0 status Does it output "ONLINE" in anywhere status after a tape is loaded? John ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users