Hi,

On 11/20/2006 5:25 PM, Sim wrote:
> Hi!
> 
> Arg! MTX always exit with "1" !

Bad, indeed.

> 
> # cat test
> ----------------
> #!/bin/sh
>       mtx -f /dev/sgb load 1
>       rtn=$?
>       echo $rtn
> ----------------

Ok, you could have used echo $? but this minimal script should show you 
the return code from mtx.

> # mtx -f /dev/sgb unload
> Unloading drive 0 into Storage Element 1...source Element Address 1 is Empty
> 
> # ./test
> Loading media from Storage Element 1 into drive 0...source Element
> Address 1001 is Empty
> 1

That "Address 1001 is Empty" looks like an error message.

Which version of mtx do you run, and what does 'mtx -f /dev/sgb status' 
print?

> # ./test
> Drive 0 Full (Storage Element 1 loaded)
> 1
> 
> 
> Isn't it ?

Some problem indeed... either your mtx doesn't work well with your 
changer (does it actually move tapes?) or it's broken.

At least I never encountered such a behaviour. But I'm quite sure 
someone on the list has an identical or similar changer.

Also, it might be worth checking if there are firmware updates for the 
chnager available, and see if there are any SCSI related messages in 
your system log.

Arno

> Thanks again.
> 
> Sim
> 
> 
>>Hi!
>>
>>I have a problem with bacula and autoloader ( HP MSL2024 G3 Series )
>>
>>DLT work very well with "mtx" and "mtx-changer", but btape show "Bad
>>268435457" and "ERR=Child exited with code 1" with the correct output
>>: "Unloading drive 0 into Storage Element 1...source Element Address 1
>>is Empty".
>>
>>Can you help me?
>>
>>Thanks!
>>
>>---------------
>>
>># btape -c bacula-sd.conf /dev/nst0
>>Tape block granularity is 1024 bytes.
>>btape: butil.c:272 Using device: "/dev/nst0" for writing.
>>20-Nov 12:08 btape: 3301 Issuing autochanger "loaded? drive 0" command.
>>20-Nov 12:08 btape: 3302 Autochanger "loaded? drive 0", result is Slot 1.
>>20-Nov 12:08 btape: 3301 Issuing autochanger "loaded? drive 0" command.
>>20-Nov 12:08 btape: 3302 Autochanger "loaded? drive 0", result is Slot 1.
>>btape: btape.c:356 open device "LTO-2" (/dev/nst0): OK
>>*auto
>>
>>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=Bad 268435457
>>3992 Bad autochanger command: /etc/bacula/mtx-changer /dev/sgb unload
>>1 /dev/nst0 0
>>3992 result="Unloading drive 0 into Storage Element 1...source Element
>>Address 1 is Empty
>>": ERR=Child exited with code 1
>>3303 Issuing autochanger "load 1 0" command.
>>3993 Bad autochanger command: /etc/bacula/mtx-changer /dev/sgb load 1
>>/dev/nst0 0
>>3993 result="Loading media from Storage Element 1 into drive
>>0...source Element Address 1001 is Empty
>>": ERR=Child exited with code 1
>>You must correct this error or the Autochanger will not work.
>>
>>
>>--------------
>>
>># /etc/bacula/mtx-changer /dev/sgb unload 1 /dev/nst0 0
>>Unloading drive 0 into Storage Element 1...source Element Address 1 is Empty
>>
>>[It's OK!]
>>
>>---------------
>>
>># /etc/bacula/mtx-changer /dev/sgb load 1 /dev/nst0 0
>>Loading media from Storage Element 1 into drive 0...source Element
>>Address 1001 is Empty
>>
>>[It's OK!]
>>
>>---------------
>>
>>PS: I have enabled "wait_for_drive $device"
>>
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to