erm, high embarrassment mode
mt wasn't installed...
[root@sp-mirror-02 ~]# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x44 (no translation).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN
however I think that some responsibility lies elsewhere, shouldn't the
bacula install rpm require mt as a pre-req ?
although you indicated
--------------------------------------------------------------------
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
}
--------------------------------------------------------------------
as the place to debug, it was actually
--------------------------------------------------------------------
case $cmd in
unload)
debug "Doing mtx -f $ctl unload $slot $drive"
if test ${offline} -eq 1 ; then
mt -f $device offline
fi
if test ${offline_sleep} -ne 0 ; then
sleep ${offline_sleep}
fi
${MTX} -f $ctl unload $slot $drive
;;
load)
debug "Doing mtx -f $ctl load $slot $drive"
${MTX} -f $ctl load $slot $drive
rtn=$?
if test ${load_sleep} -ne 0 ; then
sleep ${load_sleep}
fi
# wait_for_drive $device
sleep 60
exit $rtn
;;
list)
--------------------------------------------------------------------
that I had made the change
I'm going to revert the change and restest.
Cheers
Arne
On Sun, Feb 14, 2010 at 2:31 PM, John Drescher <drescherjm AT gmail DOT com>
wrote:
> On Sun, Feb 14, 2010 at 8:16 AM, shouldbe q931
> <shouldbeq931 AT googlemail DOT 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 AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|