Hi, I'm using bacula version 1.38.8 compiled from source.
I'm trying to run the "btape fill" test and am expecting it to use the autoloader without any intervention required. It's not working. Although I've got my Autochanger configured and tapes in slots 1 and 2, the 'btape fill' command tries to rewind and label the nonexistent tape in the drive, and then attempts to fill it. It's not prompting for the first tape, nor is it loading the tape from slot 1 into the drive. I've attached output from running 'btape fill' and the mtx status command. Relevant portions of my bacula-sd.conf are below. Any assistance will be greatly appreciated. Thanks in advance. Sections from bacula-sd.conf: Autochanger { Name = Exabyte Magnum 1x7 LTO-3 Device = LTO-3_1 Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d" Changer Device = /dev/sg2 } Device { Name = LTO-3_1 # Drive Index = 0 Media Type = LTO-3 Device Type = Tape Archive Device = /dev/nst0 AutomaticMount = yes; # when device opened, read it AlwaysOpen = yes; RemovableMedia = yes; RandomAccess = no; AutoChanger = yes # Enable the Alert command only if you have the mtx package loaded Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" } -- Tod Hagan AIRMAP/Climate Change Research Center Institute for the Study of Earth, Oceans, and Space University of New Hampshire Durham, NH 03824 Phone: 603-862-3116
> sudo mtx -f /dev/sg2 status Storage Changer /dev/sg2:1 Drives, 7 Slots ( 0 Import/Export ) Data Transfer Element 0:Empty Storage Element 1:Full :VolumeTag=A00001 Storage Element 2:Full :VolumeTag=A00002 Storage Element 3:Empty:VolumeTag= Storage Element 4:Empty:VolumeTag= Storage Element 5:Empty:VolumeTag= Storage Element 6:Empty:VolumeTag= Storage Element 7:Empty:VolumeTag= > sudo btape -c /etc/bacula/bacula-sd.conf /dev/nst0 Tape block granularity is 1024 bytes. btape: butil.c:272 Using device: "/dev/nst0" for writing. 02-May 11:35 btape: 3301 Issuing autochanger "loaded drive 0" command. 02-May 11:35 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. 02-May 11:35 btape: 3301 Issuing autochanger "loaded drive 0" command. 02-May 11:35 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. btape: btape.c:338 open device "LTO-3_1" (/dev/nst0): OK *fill This command simulates Bacula writing to a tape. It requires either one or two blank tapes, which it will label and write. If you have an autochanger configured, it will use the tapes that are in slots 1 and 2, otherwise, you will be prompted to insert the tapes when necessary. It will print a status approximately every 322 MB, and write an EOF every 3.2 GB. If you have selected the simple test option, after writing the first tape it will rewind it and re-read the last block written. If you have selected the multiple tape test, when the first tape fills, it will ask for a second, and after writing a few more blocks, it will stop. Then it will begin re-reading the two tapes. This may take a long time -- hours! ... Do you want to run the simplified test (s) with one tape or the complete multiple tape (m) test: (s/m) m Multiple tape test selected. 02-May 11:36 btape: 3301 Issuing autochanger "loaded drive 0" command. 02-May 11:36 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. btape: btape.c:1828 Rewind failed. 02-May 11:36 btape: Fatal Error at dev.c:1525 because: dev.c:1524 Attempt to WEOF on non-appendable Volume btape: btape.c:1831 Write EOF failed. 02-May 11:36 btape: 3301 Issuing autochanger "loaded drive 0" command. 02-May 11:36 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. 02-May 11:36 btape: 3301 Issuing autochanger "loaded drive 0" command. 02-May 11:36 btape: 3302 Autochanger "loaded drive 0", result: nothing loaded. Wrote Volume label for volume "TestVolume1". Wrote Start of Session label. 11:36:34 Begin writing Bacula records to first tape ... 02-May 11:36 btape: btape Error: block.c:538 Write error at 0:0 on device "LTO-3_1" (/dev/nst0). ERR=No medium found. 02-May 11:36 btape: btape Error: Error writing final EOF to tape. This Volume may not be readable. dev.c:1542 ioctl MTWEOF error on "LTO-3_1" (/dev/nst0). ERR=No medium found. btape: btape.c:2301 Last block at: 0:0 this_dev_block_num=0 btape: btape.c:2335 End of tape 0:0. VolumeCapacity=0. Write rate = 0.0 KB/s 02-May 11:36 btape: End of medium on Volume "" Bytes=0 Blocks=0 at 02-May-2006 11:36. Mount blank Volume on device "LTO-3_1" (/dev/nst0) and press return when ready: > exit