I apologize if you've already supplied this information, but would you mind attaching the output of the following three commands:
mtx -f /dev/sg4 status mtx-changer /dev/sg4 list mtx-changer /dev/sg4 slots -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Felczak Sent: Monday, October 23, 2006 3:06 PM To: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] Bacula not loading autochanger (lots more info) Still having the same problem, but after seeing the recent thread about required information I figured I'd best include the form with the information requested. ========= SUPPORT =============== Bacula version: 1.38.9 (I had thought earlier it was 1.36.3 due to some inaccurate documentation left behind by the person who had originally installed it earlier this year, but checked and verified that the installed version is indeed 1.38.9.) OS type and version: Fedora Core 4 (Linux) Here is output from uname -a: Linux sandy.siderean.com 2.6.16-1.2115_FC4smp #1 SMP Mon Jun 5 15:01:58 EDT 2006 i686 i686 i386 GNU/Linux How was Bacula built/installed? Was installed from rpms by a former sysadmin from whom I inherited the project. Concise description of the problem: Bacula doesn't load tapes into autochanger when it needs them. Instead it keeps prompting to have them manually losded. Won't even load them with the bconsole mount command. Just reports mount OK and logs message requesting me to mount the tape. Had previously posted to the list. Arno suggested I replace all references to "VXA-Tape" with "VXA-Library" in the director configuration. I've done so, but the problem still persists. Bacula output showing the problem: *messages 23-Oct 13:14 sandy-dir: Start Backup JobId 234, Job=Sandy.2006-10-23_13.14.17 23-Oct 13:14 sandy-sd: 3301 Issuing autochanger "loaded drive 0" command. 23-Oct 13:14 sandy-sd: 3302 Autochanger "loaded drive 0", result: nothing loaded. 23-Oct 13:14 sandy-sd: 3301 Issuing autochanger "loaded drive 0" command. 23-Oct 13:14 sandy-sd: 3302 Autochanger "loaded drive 0", result: nothing loaded. 23-Oct 13:14 sandy-sd: Please mount Volume "A0000001" on Storage Device "VXA-Drive" (/dev/nst0) for Job Sandy.2006-10-23_13.14.17 Steps to reproduce the problem: 1. Re/Start all 3 bacula daemons. (They and the MySQL DB are all configured to run as services.) 2. Issue the run command. 3. Select a backup job to run. 4. Once the job has started, check messages. 5. Note that Bacula has requested manual load of volume into drive, rather than having the autochanger load the drive as it should. Other information (optional): A copy of your config.out file (if built from source): n/a, not built from source Tape drive/autochanger (for tape problems): Exabyte VXA PacketLoader 1x10 1U with a single VXA-2 tape drive and 10 slots, the last of which contains a cleaning cartridge. Have you run btape "test" command? I ran it last week, and remember both the "test" and "autochanger" portions passed. When I tried the multiple-tape "fill" test it also failed to load the second tape, but per Kern's earlier post to the list I understand this is a known bug in btape which doesn't in itself necessarily indicate that Bacula won't work with the autochanger. Since I've made a number of configuration changes since then, figured I should probably run it again. Only problem is, the documentation is ambiguous as to exactly what "device_name" to specify on the command line when invoking btape. If I specify the device file for the autochanger itself, I get [EMAIL PROTECTED] bacula]# btape -c /etc/bacula/bacula-sd.conf -v /dev/sg4 Tape block granularity is 1024 bytes. btape: butil.c:265 Could not find device "/dev/sg4" in config file /etc/bacula/bacula-sd.conf. 23-Oct 14:19 btape: btape Fatal error: butil.c:154 Cannot find device "/dev/sg4" in config file /etc/bacula/bacula-sd.conf. This even though /dev/sg4 is indeed in the bacula-sd.conf file, as the value of "Changer Device" in both the Autochanger and Device resources. So tried giving it the autochanger's resource name instead: [EMAIL PROTECTED] bacula]# btape -c /etc/bacula/bacula-sd.conf -v VXA-Library Tape block granularity is 1024 bytes. btape: butil.c:265 Could not find device "VXA-Library" in config file /etc/bacula/bacula-sd.conf. 23-Oct 14:20 btape: btape Fatal error: butil.c:154 Cannot find device "VXA-Library" in config file /etc/bacula/bacula-sd.conf. This despite the fact that "VXA-Library" is also indeed in the bacula-sd.conf file as the value of the "Name" directive in the autochanger resource. If I give it the name of the drive's resource it gets in, but fails to load the tape when I run test: [EMAIL PROTECTED] bacula]# btape -c /etc/bacula/bacula-sd.conf -v VXA-Drive Tape block granularity is 1024 bytes. btape: butil.c:272 Using device: "VXA-Drive" for writing. 23-Oct 14:42 btape: 3301 Issuing autochanger "loaded drive 0" command. 23-Oct 14:42 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. 23-Oct 14:42 btape: 3301 Issuing autochanger "loaded drive 0" command. 23-Oct 14:42 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. btape: btape.c:338 open device "VXA-Drive" (/dev/nst0): OK *test === Write, rewind, and re-read test === I'm going to write 1000 records and an EOF then write 1000 records and an EOF, then rewind, and re-read the data to verify that it is correct. This is an *essential* feature ... 23-Oct 14:43 btape: 3301 Issuing autochanger "loaded drive 0" command. 23-Oct 14:43 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. btape: btape.c:775 Bad status from rewind. ERR=dev.c:678 Rewind error on "VXA-Drive" (/dev/nst0). ERR=No medium found. Curiously enough, though, if I run the "autochanger" test it loads the tape just fine! *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. Nothing loaded in the drive. OK. 3303 Issuing autochanger "load 1 0" command. 3303 Autochanger "load 1 0" status is OK. 23-Oct 14:45 btape: 3301 Issuing autochanger "loaded drive 0" command. 23-Oct 14:45 btape: 3302 Autochanger "loaded drive 0", result is Slot 1. btape: btape.c:338 open device "VXA-Drive" (/dev/nst0): OK btape: btape.c:1206 Rewound "VXA-Drive" (/dev/nst0) btape: btape.c:1213 Wrote EOF to "VXA-Drive" (/dev/nst0) The test autochanger worked!! I get pretty much the same results if I invoke btape with the drive's physical device name /dev/nst0. The "test" test only works if a tape is already loaded in the drive, but the "autochanger" tape loads a tape if the drive is empty. Looking back on it, I think I must have had a tape already loaded in the drive when I ran the initial tests last week. Database problems: what database are you using? Probably not a database problem, but database is MySQL What is the database version? 4.1.19 If the output involves configuration files, consider attaching bacula-dir.conf, bacula-fd.conf, and bacula-sd.conf if necessary, appropriate. Here are the relevent sections of the bacula-sd.conf and bacula-dir.conf, with passwords removed, and also the modified section of mtx-changer: >From bacula-sd.conf: ******************** Autochanger { Name = VXA-Library Device = VXA-Drive Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" Changer Device = /dev/sg4 } Device { Name = VXA-Drive Media Type = VXA-2 Archive Device = /dev/nst0 Autochanger = YES Drive Index = 0 Changer Device = /dev/sg4 Offline On Unmount = no Hardware End of Medium = no BSF at EOM = yes Backward Space Record = yes Fast Forward Space File = yes TWO EOF = yes } >From bacula-dir.conf: ********************* Storage { Name = VXA-Library Address = sandy.siderean.com Password = <removed> Device = VXA-Library MediaType = VXA-2 Autochanger = yes } Modified portion of mtx-changer script: *************************************** # Increase the sleep time if you have a slow device # or remove the sleep and add the following: wait_for_drive $device sleep 15 exit $rtn ;; list) debug "Doing mtx -f $ctl -- to list volumes" make_temp_file # Enable the following if you are using barcodes and need an inventory # $(MTX) -f $ctl inventory # ${MTX} -f $ctl status >${TMPFILE} # rtn=$? # cat ${TMPFILE} | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \\ $4}" | sed "s/Full *\(:VolumeTag=\)*//" # cat ${TMPFILE} | grep "^Data Transfer Element [0-9]*:Full (Storage Element \ [0-9]" | awk '{printf "%s:%s\n",$7,$10}' # rm -f ${TMPFILE} >/dev/null 2>&1 # # If you have a VXA PacketLoader and the above does not work, try # turning it off and enabling the following line. ${MTX} -f $ctl status | grep " *Storage Element [0-9]*:.*Full" | sed "s/*Stor\ age Element //" | sed "s/Full :VolumeTag=//" exit $rtn ;; This is after I implemented Arno's earlier suggestion to replace references to "VXA-Tape" with "VXA-Library" and also some other suggestions for this type of problem that I found in earlier threads in the list archives. I also noticed in an earlier thread about a similar problem back in March of this year, Arno suggested that running the "update slots" command might help. AL> It is possible that the catalog doesn't have any information about volumes AL> available in the autochanger. The easiest resolution in that case is diong AL> an 'update slots [scan] storage=Autoloader' in a Bacula console. This sounded useful, so gave it a try and got the following bizarre output: *update slots Using default Catalog name=MyCatalog DB=bacula Automatically selected Storage: VXA-Library Connecting to Storage daemon VXA-Library at sandy.siderean.com:9103 ... Connecting to Storage daemon VXA-Library at sandy.siderean.com:9103 ... 3306 Issuing autochanger "slots" command. Device "VXA-Library" has 10 slots. Connecting to Storage daemon VXA-Library at sandy.siderean.com:9103 ... 3301 Issuing autochanger "loaded drive 0" command. 3302 Autochanger "loaded drive 0", result: nothing loaded. 3306 Issuing autochanger "list" command. Invalid Slot number: Storage Element 1:A0000001 Invalid Slot number: Storage Element 2:A0000002 Invalid Slot number: Storage Element 3:A0000003 Invalid Slot number: Storage Element 4:A0000004 Invalid Slot number: Storage Element 5:A0000005 Invalid Slot number: Storage Element 6:A0000006 Invalid Slot number: Storage Element 7:A0000007 Invalid Slot number: Storage Element 9:A0000009 Invalid Slot number: Storage Element 10:CLNA0001 No Volumes found to label, or no barcodes. Note that it skips from slot 7 to slot 9 without any mantion of slot 8 despite the fact that slot 8 exists, contains a tape labelled A0000008, and can be successfully loaded and unloaded by mtx-changer. Clearly it sees that the drive has 10 slots, why can't it number them correctly? Is this something I have to configure somewhere? John J. Felczak Build & Integration Manager Siderean Software, Inc. ---------------------------------------------------------------------- Here's Arno's reply to my original post, included for purposes of thread continuity... Message: 7 Date: Sat, 21 Oct 2006 21:12:15 +0200 From: Arno Lehmann <[EMAIL PROTECTED]> Subject: Re: [Bacula-users] Bacula not loading autochanger To: "bacula-users@lists.sourceforge.net" <bacula-users@lists.sourceforge.net> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi, On 10/21/2006 4:15 AM, John Felczak wrote: > Bacula 1.36.3 on Fedora Core 4 Consider upgrading to 1.38. It has some enhancements, and it is much more likely to get qualified support as many list users dropped 1.36 quite a while ago... > Exabyte VXA Packetloader 1x10 1U > > Bacula seems able to successfully query this autochanger if it's loaded, and I can unload it using the unmount command in bconsole, but instead of loading the drive when running a backup or restore job, it prompts for a manual mount: > > 20-Oct 13:59 sandy-sd: 3301 Issuing autochanger "loaded drive 0" command. > 20-Oct 13:59 sandy-sd: 3302 Autochanger "loaded drive 0", result: nothing loaded. > 20-Oct 13:59 sandy-sd: RestoreFiles.2006-10-20_13.55.44 Warning: acquire.c:146 Couldn't rewind device "VXA-Drive" (/dev/nst0): ERR=dev.c:678 Rewind error on "VXA-Drive" (/dev/nst0). ERR=No medium found. > > 20-Oct 13:59 sandy-sd: Please mount Volume "A0000001" on Storage > Device "VXA-Drive" (/dev/nst0) for Job RestoreFiles.2006-10-20_13.55.44 20-Oct 14:01 sandy-sd: 3301 Issuing autochanger "loaded drive 0" command. > 20-Oct 14:01 sandy-sd: 3302 Autochanger "loaded drive 0", result: nothing loaded. > 20-Oct 14:01 sandy-sd: RestoreFiles.2006-10-20_13.55.44 Warning: acquire.c:146 Couldn't rewind device "VXA-Drive" (/dev/nst0): ERR=dev.c:678 Rewind error on "VXA-Drive" (/dev/nst0). ERR=No medium found. > > 20-Oct 14:01 sandy-sd: Please mount Volume "A0000001" on Storage > Device "VXA-Drive" (/dev/nst0) for Job > RestoreFiles.2006-10-20_13.55.44 > > Here are the storage definitions from my bacula-sd.conf: > > Autochanger { > Name = "VXA-Library" > Device = "VXA-Drive" > Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" > Changer Device = /dev/sg4 > } Interesting. Are you sure you run 1.36, not 1.38? IIRC, the Autochanger resource was only implemented with 1.38... > Device { > Maximum Changer Wait = 120 > Name = "VXA-Drive" > Archive Device = /dev/nst0 > Device Type = Tape > Media Type = "VXA-2" > Autochanger = Yes > Changer Device = /dev/sg4 > Drive Index = 0 > Autoselect = yes > AlwaysOpen = yes > Removable Media = yes > Random Access = no > Label Media = yes > Automatic Mount = yes; > } > > Isn't that what autochangers are supposed to be for? > > BTW, I can load, unload, and do any of the various tape library operations from mtx-changer at the command line. The btape test and btape autochanger test both pass. The btape multiple tape fill command also fails to load the drive, but from what I've seen on the list that's a known btape bug, and shouldn't prevent bacula from properly using the autochanger the way it doesn't seem to be doing. > > If I try unmount and mount commands from bconsole I get the following: > > *unmount > Automatically selected Storage: VXA-Tape Ah, that's it... it seems like your director configuration doesn't know about VXA-Library but only references VXA-Tape... If you actually have a 1.38 version running reference the Autochanger device wherever possible, i.e. everywhere except where you really know why you want a drive, not the autochanger, addressed. > Connecting to Storage daemon VXA-Tape at sandy.siderean.com:9103 ... > 3301 Issuing autochanger "loaded drive 0" command. > 3302 Autochanger "loaded drive 0", result is Slot 8. > 3307 Issuing autochanger "unload slot 8, drive 0" command. > 3001 Device "VXA-Drive" (/dev/nst0) unmounted. > > > *mount > Automatically selected Storage: VXA-Tape > 3301 Issuing autochanger "loaded drive 0" command. > 3302 Autochanger "loaded drive 0", result: nothing loaded. > 3301 Issuing autochanger "loaded drive 0" command. > 3302 Autochanger "loaded drive 0", result: nothing loaded. > 3905 Device "VXA-Drive" (/dev/nst0) open but no Bacula volume is mounted. > If this is not a blank tape, try unmounting and remounting the Volume. > > So bacula seems to know how to unload the drive but not how to load it, and there doesn't seem to be any "load" command I can use to tell bconsole to load the tape either. No, there's no load command or anything... you can, to contibue your backups for example :-) unmount the drive from bconsole, use mtx to load the next tape, and then mount from bconsole. > > Ideas, anyone? Sure, and I hope they help you. Arno ------------------------------------------------------------------------- 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 ------------------------------------------------------------------------- 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