From: Peter S. <pet...@te...> - 2005-05-09 15:45:34
|
On Mon, 2005-05-09 at 11:41 +0200, Kern Sibbald wrote: <SNIP> > > > > > The autoloader part of bacula-sd.conf contains > > > Device { > > > Name = TL0 # TapeLoader - drive 0 > > > Media Type = DLT35 # > > > Drive Index = 0 > > > Archive Device = /dev/tape2 # Normal archive device > > > Changer Device = /dev/changer # Generic SCSI device name > > > AutomaticMount = yes; # when device opened, read it > > > Changer Command = "/opt/bacula/mtx-changer-ps.sh %c %o %S %a %d %j" > > > Autochanger = yes > > > AlwaysOpen = yes; > > > RemovableMedia = yes; > > > RandomAccess = no; > > > LabelMedia = yes; > > > Maximum Spool Size = 7G > > > Maximum Job Spool Size = 7G > > > Spool Directory = /spare/bacula/spool > > > } > > > > > > Device { > > > Name = TL1 # TapeLoader - drive 0 > > > Media Type = DLT35 # > > > Drive Index = 1 > > > Archive Device = /dev/tape3 # Normal archive device > > > Changer Device = /dev/changer # Generic SCSI device name > > > AutomaticMount = yes; # when device opened, read it > > > Changer Command = "/opt/bacula/mtx-changer-ps.sh %c %o %S %a %d" > > > Autochanger = yes > > > AlwaysOpen = yes; > > > RemovableMedia = yes; > > > RandomAccess = no; > > > LabelMedia = yes; > > > Maximum Spool Size = 7G > > > Maximum Job Spool Size = 7G > > > Spool Directory = /spare/bacula/spool > > > } > > I would recommend that you modify your SD conf file as follows: > - Remove the Changer Device and Changer Commands from both the Device > resources. This is not required, but recommended. > - Create the following new resource in your bacula-sd.conf file: > > Autochanger { > Name = "DLT-changer" # any name you want > Changer Device = /dev/changer # Generic SCSI device name > Changer Command = "/opt/bacula/mtx-changer-ps.sh %c %o %S %a %d" > Device = TL0, TL1 > } > > Then modify your bacula-dir.conf file so that instead of referencing TL0 or > TL1 in your Storage resource on the Device directive, you reference > DLT-changer -- that is, use: > > Storage { > Name = ... > Device = "DLT-changer" > ... > } One of the new things related to autochanger, one I'm waiting for, good. I just had to try it directly but bumped into problem, it doesn't work. I think I did what you wrote (didn't find it in the manual, guess it's not there yet) but when I tried "update slot=TL892" it complained that it's not an autochanger device. root@riker:/opt/bacula # echo update slots storage=TL892|./bconsole Connecting to Director riker:9101 1000 OK: riker-dir Version: 1.37.18 (09 May 2005) Enter a period to cancel a command. update slots storage=TL892 Using default Catalog name=MyCatalog DB=bacula Connecting to Storage daemon TL892 at riker.intra.techwiz.ca:9103 ... 3993 Not a autochanger device. Device "TL892" has 0 slots. I added "Autochanger = Yes;" in the Autochanger resource but that was not permitted. >From bacula-sd.conf Autochanger { Name = "TL892" Changer Device = /dev/changer # Generic SCSI device name Changer Command = "/opt/bacula/mtx-changer-ps.sh %c %o %S %a %d" Device = TL0, TL1 } Device { Name = TL0 # TapeLoader - drive 0 Media Type = DLT35 # Drive Index = 0 Archive Device = /dev/tape2 # Normal archive device AutomaticMount = yes; # when device opened, read it Autochanger = yes AlwaysOpen = yes; RemovableMedia = yes; RandomAccess = no; LabelMedia = yes; Maximum Spool Size = 7G Maximum Job Spool Size = 7G Spool Directory = /spare/bacula/spool } Device { Name = TL1 # TapeLoader - drive 0 Media Type = DLT35 # Drive Index = 1 Archive Device = /dev/tape3 # Normal archive device AutomaticMount = yes; # when device opened, read it Autochanger = yes AlwaysOpen = yes; RemovableMedia = yes; RandomAccess = no; LabelMedia = yes; Maximum Spool Size = 7G Maximum Job Spool Size = 7G Spool Directory = /spare/bacula/spool } >From bacula-dir.conf Storage { Name = TL892 Device = TL892 Address = riker.intra.techwiz.ca # N.B. Use a fully qualified name here SDPort = 9103 Password = "obscured" Media Type = DLT35 Autochanger = yes Maximum Concurrent Jobs = 4 } > > The above change will possibly not solve your problem, but it should allow you > to use both drives without worrying about which one, and it will > automatically ensure that you mtx-changer-ps script is locked. If you are > explicitly locking in the mtx-changer-ps, you can remove it, since Bacula > will do this for you -- at least that is the theory ... I don't have a two > drive autochanger yet, and to the best of my knowledge no one has tested > this. I don't mind testing it. I have two tapedrives in my tapelibrary but I only use one for now. My changer script is mostly modified to not just "sleep xx" but poll for status and give some debug logs. No interlocking here. > > > > > > Complete config files and more can be found at > > http://www.techwiz.ca/~peters/bacula/ > > Thanks for the above. I see better what is going on with your bacula-dir.conf. > > Could you please do a "list volumes" in the console and either put it on your > web site or send it in an email? "list volumes" is now added to my "ShowConfig.sh" script I also have http://portal.techwiz.ca/bacula-web/ > > I still would prefer this to be resolved via a bug report. > Before submitting a bug report I like to confirm that it's not a config error and also be able to make a clear and concise description of the problem. I did see that you now fixed it so Unless you ask for it I won't make a bug report (unless it still is a problem). |