Summary: the "update slots" command fails after changing tapes in the autochanger, causing bacula to have the wrong idea of what volumes are loaded
Environment: OS: linux 2.4.26 (FC1) bacula: 1.38.9 (the director and sd daemons running on the same server) Storage: Dell LTO2 24 slot autochanger with 2 drives The config works fine--bacula is able to move tapes, use both drives, etc. If I load tapes and restart bacula, there's no problem running commands like "label barcodes" or "update slots". If I remove tapes (by issuing "mtx" commands to transfer the tapes to and from the import/export slot, or by removing a tape magazine and bulk loading tapes), without restarting bacula, then bacula gets confused about the capability of the atuochanger. This is _not_ a permissions problem, as the bacula user can run both /usr/sbin/mtx and /usr/local/bacula/bin/mtx-changer successfully from the shell to load tapes or report on the status of the changer. The mtx-changer command correctly reports the number of slots in the autochanger, but bacula continues to give the error "No slots in changer to scan" and claims the device has 0 slots. Examples: --------------------------------------------------------------- [EMAIL PROTECTED] bin]$ ./mtx-changer /dev/changer slots 24 [EMAIL PROTECTED] bin]$ /usr/sbin/mtx -f /dev/changer status Storage Changer /dev/changer:2 Drives, 24 Slots ( 1 Import/Export ) Data Transfer Element 0:Full (Storage Element 18 Loaded):VolumeTag = 000077 Data Transfer Element 1:Empty Storage Element 1:Full :VolumeTag=000002 Storage Element 2:Full :VolumeTag=000004 Storage Element 3:Full :VolumeTag=000005 Storage Element 4:Full :VolumeTag=000006 Storage Element 5:Full :VolumeTag=000019 Storage Element 6:Full :VolumeTag=000073 Storage Element 7:Full :VolumeTag=000007 Storage Element 8:Full :VolumeTag=000030 Storage Element 9:Full :VolumeTag=000009 Storage Element 10:Full :VolumeTag=000011 Storage Element 11:Full :VolumeTag=000012 Storage Element 12:Full :VolumeTag=000051 Storage Element 13:Full :VolumeTag=000052 Storage Element 14:Full :VolumeTag=000059 Storage Element 15:Full :VolumeTag=000060 Storage Element 16:Full :VolumeTag=000042 Storage Element 17:Full :VolumeTag=000076 Storage Element 18:Empty:VolumeTag= Storage Element 19:Full :VolumeTag=000078 Storage Element 20:Full :VolumeTag=000079 Storage Element 21:Full :VolumeTag=000080 Storage Element 22:Full :VolumeTag=000061 Storage Element 23:Full :VolumeTag=000038 Storage Element 24 IMPORT/EXPORT:Empty:VolumeTag= [EMAIL PROTECTED] bin]$ ./bconsole -c ../etc/bconsole.conf Connecting to Director parthenon:9101 1000 OK: parthenon-dir Version: 1.38.9 (02 May 2006) Enter a period to cancel a command. *update slots Using default Catalog name=MyCatalog DB=bacula Automatically selected Storage: pv132t Connecting to Storage daemon pv132t at parthenon:9103 ... 3937 Device "Drive-0" (/dev/tape0) is busy with 1 writer(s). Enter autochanger drive[0]: 1 Connecting to Storage daemon pv132t at parthenon:9103 ... 3937 Device "Drive-0" (/dev/tape0) is busy with 1 writer(s). Device "pv132t" has 0 slots. No slots in changer to scan. *quit --------------------------------------------------------------- Here's my bacula-sd.conf: --------------------------------------------------------------- Storage { # definition of myself Name = parthenon-sd SDPort = 9103 # Director's port WorkingDirectory = "/usr/local/bacula/var/working" Pid Directory = "/usr/local/bacula/var/run" Maximum Concurrent Jobs = 50 } # # List Directors who are permitted to contact Storage daemon # Director { Name = parthenon-dir Password = "" } # # An autochanger device with two drives # Autochanger { Name = pv132t Device = Drive-0 Device = Drive-1 Changer Command = "/usr/local/bacula/bin/mtx-changer %c %o %S %a %d" Changer Device = /dev/changer } Device { Name = Drive-0 # LabelMedia = yes; # lets Bacula label unlabeled media Drive Index = 0 Media Type = LTO2 Archive Device = /dev/tape0 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'" Maximum Spool Size = 80G # For network client Maximum Network Buffer Size = 65536 Spool Directory = /san3/var/spool/bacula Autoselect = yes } Device { Name = Drive-1 # LabelMedia = yes; # lets Bacula label unlabeled media Drive Index = 1 Media Type = LTO2 Archive Device = /dev/tape1 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'" Maximum Spool Size = 90G # For network client Maximum Network Buffer Size = 65536 Spool Directory = /san3/var/spool/bacula Autoselect = yes } --------------------------------------------------------------- Any suggestions would be appreciated. Thanks, Mark ---- Mark Bergman [EMAIL PROTECTED] System Administrator Section of Biomedical Image Analysis 215-662-7310 Department of Radiology, University of Pennsylvania http://pgpkeys.pca.dfn.de:11371/pks/lookup?search=mark.bergman%40.uphs.upenn.edu The information contained in this e-mail message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. ------------------------------------------------------------------------- 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