On Nov 3, 2006, at 6:42 AM, Gerard Sharpe wrote:

> Gerard Sharpe wrote:
>> Alex Chekholko wrote:
>>
>>> On Fri, 03 Nov 2006 01:13:32 +1100
>>> Gerard Sharpe <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> I am a first time user of Bacula trying to get a Sun L280  
>>>> DLT7000 tape
>>>> drive (operating mode set to random) with autochanger working.
>>>>
>>>> I have confirmed the drive works with the btape test however am  
>>>> having
>>>> no luck getting the autochanger to play the game.
>>>>
>>>> When running a autochanger test (btape -c bacula-sd.conf /dev/ 
>>>> nst0 then
>>>> auto) it either times out with:
>>>> ---
>>>> 02-Nov 21:45 btape: 3302 Autochanger "loaded drive 0", result is  
>>>> Slot 1.
>>>> btape: btape.c:1198 Bad status from rewind. ERR=dev.c:678 Rewind  
>>>> error
>>>> on "SUN-L280" (/dev/nst0). ERR=Input/output error.
>>>> ---
>>>> OR after playing with the config (see below) I get
>>>> ---
>>>> 3302 Issuing autochanger "unload 1 0" command.
>>>> unload status=Bad 268435457
>>>> 3992 Bad autochanger command: /etc/bacula/scripts/mtx-changer / 
>>>> dev/sg1
>>>> unload 1 /dev/nst0 0
>>>> 3992 result="Unloading Data Transfer Element into Storage Element
>>>> 1...mtx: Request Sense: Long Report=yes
>>>> ": ERR=Child exited with code 1
>>>> 3303 Issuing autochanger "load 1 0" command.
>>>> 3993 Bad autochanger command: /etc/bacula/scripts/mtx-changer / 
>>>> dev/sg1
>>>> load 1 /dev/nst0 0
>>>> 3993 result="mtx: Request Sense: Long Report=yes
>>>> ": ERR=Child exited with code 1
>>>> You must correct this error or the Autochanger will not work.
>>>> ---
>>>>
>>>> I've tried increasing the wait time with sleep 15 and using the
>>>> wait_for_drive function in the mtx-changer script with no success.
>>>> Can anyone provide a few pointers as to what I'm doing wrong?
>>>>
>>>> I'm running Debian 3.1 and using backport Bacula version 1.38.11-5
>>>>
>>>>
>>> What does "mtx -f /dev/sg1 status" tell you?
>>>
>>> And then you can try the commands listed here: http:// 
>>> www.bacula.org/rel-manual/ 
>>> Autochanger_Support.html#SECTION0002915000000000000000
>>>
>>> Alex
>>>
>>>
>> I've been skimming through alot of forums and the bacula manual pages
>> without much success, I think its a config issue rather than a  
>> hardware
>> one.
>>
>> Below are the test commands I've tried and the output. If anyone  
>> has a
>> working bacula L280 or DLT7000 setup I'd be curious what config is  
>> being
>> used in bacula-sd.conf for the Autochanger and Device.
>>
>> Been playing around with my config, it was setup as below for the  
>> listed
>> tests:
>> bacula-sd.conf
>> ---
>> ..
>> ..
>> Autochanger {
>>   Name = L280-Library
>>   Device = SUN-L280
>>   Changer Device = /dev/sg1
>>   Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
>> }
>>
>> Device {
>>   Name = SUN-L280                 #
>>   Media Type = DLT7000
>>   Archive Device = /dev/nst0
>>   AutomaticMount = yes;               # when device opened, read it
>>   AlwaysOpen = yes;
>>   Device Type = Tape
>>   RandomAccess = yes;
>>   AutoChanger = yes
>>   Drive Index = 0
>> }
>> ..
>> ..
>> ---
>> The mtx-changer script is default as per release the Debian 3.1  
>> backport
>> version 1.38.11-5.
>>
>> Tests:
>> ---
>> [EMAIL PROTECTED]:/etc/bacula/scripts# mtx -f /dev/sg1 status
>>   Storage Changer /dev/sg1:1 Drives, 8 Slots ( 0 Import/Export )
>> Data Transfer Element 0:Full (Storage Element 1 Loaded)
>>       Storage Element 1:Empty
>>       Storage Element 2:Full
>>       Storage Element 3:Empty
>>       Storage Element 4:Empty
>>       Storage Element 5:Empty
>>       Storage Element 6:Empty
>>       Storage Element 7:Empty
>>       Storage Element 8:Empty
>> [EMAIL PROTECTED]:/etc/bacula/scripts# ./mtx-changer /dev/sg1 list 0 / 
>> dev/nst0 0
>> 2:
>> 1:
>> [EMAIL PROTECTED]:/etc/bacula/scripts# ./mtx-changer /dev/sg1 unload 1
>> /dev/nst0 0
>> Unloading Data Transfer Element into Storage Element 1...done
>> [EMAIL PROTECTED]:/etc/bacula/scripts# ./mtx-changer /dev/sg1 load 2 / 
>> dev/nst0 0
>> [EMAIL PROTECTED]:/etc/bacula/scripts# ./mtx-changer /dev/sg1 loaded 0
>> /dev/nst0 0
>> 2
>> [EMAIL PROTECTED]:/etc/bacula/scripts# ./mtx-changer /dev/sg1 unload 2
>> /dev/nst0 0
>> Unloading Data Transfer Element into Storage Element 2...done
>> [EMAIL PROTECTED]:/etc/bacula/scripts# ./mtx-changer /dev/sg1 loaded 0
>> /dev/nst0 0
>> 0
>> ---
>>
>> Running autochanger test:
>> ---
>> [EMAIL PROTECTED]:/etc/bacula/scripts# btape -c ../bacula-sd.conf /dev/ 
>> nst0
>>
>> === 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.
>> 03-Nov 21:26 btape: 3301 Issuing autochanger "loaded drive 0"  
>> command.
>> 03-Nov 21:26 btape: 3302 Autochanger "loaded drive 0", result is  
>> Slot 1.
>> btape: btape.c:338 open device "SUN-L280" (/dev/nst0): OK
>> 03-Nov 21:26 btape: 3301 Issuing autochanger "loaded drive 0"  
>> command.
>> 03-Nov 21:26 btape: 3302 Autochanger "loaded drive 0", result is  
>> Slot 1.
>> btape: btape.c:1198 Bad status from rewind. ERR=dev.c:678 Rewind  
>> error
>> on "SUN-L280" (/dev/nst0). ERR=Input/output error.
>>
>>
>> The test failed, probably because you need to put
>> a longer sleep time in the mtx-script in the load) case.
>> Adding a 30 second sleep and trying again ...
>> 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.
>> 03-Nov 21:37 btape: 3301 Issuing autochanger "loaded drive 0"  
>> command.
>> 03-Nov 21:37 btape: 3302 Autochanger "loaded drive 0", result is  
>> Slot 1.
>> btape: btape.c:338 open device "SUN-L280" (/dev/nst0): OK
>> 03-Nov 21:37 btape: 3301 Issuing autochanger "loaded drive 0"  
>> command.
>> 03-Nov 21:37 btape: 3302 Autochanger "loaded drive 0", result is  
>> Slot 1.
>> btape: btape.c:1198 Bad status from rewind. ERR=dev.c:678 Rewind  
>> error
>> on "SUN-L280" (/dev/nst0). ERR=Input/output error.
>>
>>
>> The test failed, probably because you need to put
>> a longer sleep time in the mtx-script in the load) case.
>> Adding a 30 second sleep and trying again ...
>> 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.
>> 03-Nov 21:48 btape: 3301 Issuing autochanger "loaded drive 0"  
>> command.
>> 03-Nov 21:48 btape: 3302 Autochanger "loaded drive 0", result is  
>> Slot 1.
>> btape: btape.c:338 open device "SUN-L280" (/dev/nst0): OK
>> 03-Nov 21:49 btape: 3301 Issuing autochanger "loaded drive 0"  
>> command.
>> 03-Nov 21:49 btape: 3302 Autochanger "loaded drive 0", result is  
>> Slot 1.
>> 03-Nov 21:49 btape: Fatal Error at dev.c:1525 because:
>> dev.c:1524 Attempt to WEOF on non-appendable Volume
>> btape: btape.c:1198 Bad status from rewind. ERR=dev.c:1524 Attempt to
>> WEOF on non-appendable Volume
>> ..
>> ..
>> ..
>> ---
>> The autochanger test then continues to loop on the WEOF error.
>>
>> At one stage of testing with a different config I was having the  
>> drive
>> timeout and error on the unload command, the following would  
>> appear on
>> the L280 display:
>> ---
>> SET_DRV_TIMEOUT
>> HARDWARE ERR 94h
>> ---
>> If the unload command was ctrl-c'd while waiting for completion  
>> the tape
>> would then eject and be returned to correct slot. Using the drive  
>> itself
>> load and unload works fine which leads me to believe its a software
>> config issue not hardware
>>
>> Thats pretty much the sum of where I'm at! Any ideas would be  
>> appreciated.
>>
>>
>> R
>> GS
>>
>>
>
> Just after posting the above info I uncommented under the load section
> of the mtx-script 'wait_for_drive $device', it now passes the
> autochanger test yay!
>
> However I'm  still unable to label the  volumes :
> ---
> [EMAIL PROTECTED]:/etc/bacula/scripts# bconsole
> Connecting to Director pubslut:9101
> 1000 OK: pubslut-dir Version: 1.38.11 (28 June 2006)
> Enter a period to cancel a command.
> *label
> Using default Catalog name=MyCatalog DB=bacula
> The defined Storage resources are:
>      1: File
>      2: L280-Library
> Select Storage resource (1-2): 2
> Connecting to Storage daemon L280-Library at pubslut:9103 ...
> Enter new Volume name: TapeVolTest1
> Enter slot (0 or Enter for none): 1
> Automatically selected Pool: Default
> Connecting to Storage daemon L280-Library at pubslut:9103 ...
> Sending label command for Volume "TapeVolTest1" Slot 1 ...
> 3301 Issuing autochanger "loaded drive 0" command.
> 3302 Autochanger "loaded drive 0", result: nothing loaded.
> 3304 Issuing autochanger "load slot 1, drive 0" command.
> 3992 Bad autochanger "load slot 1, drive 0": ERR=Child exited with  
> code 1.
> Label command failed for Volume TapeVolTest1.
> Do not forget to mount the drive!!!
> mount
> The defined Storage resources are:
>      1: File
>      2: L280-Library
> Select Storage resource (1-2): 2
> 3301 Issuing autochanger "loaded drive 0" command.
> 3302 Autochanger "loaded drive 0", result: nothing loaded.
> 3902 Cannot mount Volume on Storage Device "SUN-L280" (/dev/nst0)  
> because:
> Requested Volume "" on "SUN-L280" (/dev/nst0) is not a Bacula labeled
> Volume, because: ERR=block.c:957 Read zero bytes at 0:0 on device
> "SUN-L280" (/dev/nst0).
> 3905 Device "SUN-L280" (/dev/nst0) open but no Bacula volume is  
> mounted.
> If this is not a blank tape, try unmounting and remounting the Volume.
> *label
> The defined Storage resources are:
>      1: File
>      2: L280-Library
> Select Storage resource (1-2): 2
> Enter new Volume name: TapeVol1
> Enter slot (0 or Enter for none): 1
> Automatically selected Pool: Default
> Connecting to Storage daemon L280-Library at pubslut:9103 ...
> Sending label command for Volume "TapeVol1" Slot 1 ...
> 3301 Issuing autochanger "loaded drive 0" command.
> 3302 Autochanger "loaded drive 0", result: nothing loaded.
> 3304 Issuing autochanger "load slot 1, drive 0" command.
> 3992 Bad autochanger "load slot 1, drive 0": ERR=Child exited with  
> code 1.
> Label command failed for Volume TapeVol1.
> Do not forget to mount the drive!!!
>
> Any ideas?
>
>
> Thanks in advance
> Gerard

Maybe try the "update slots" command from bconsole?

Our experiences now diverge because my library has a barcode scanner,  
and yours doesn't seem to.

Alex

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to