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 ------------------------------------------------------------------------- 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