Thanks for the response

On Thu, 2006-01-26 at 19:13 +0100, Arno Lehmann wrote:
> Hello,
> 
> On 1/25/2006 10:21 PM, Reggie Dugard wrote:
> > On Tue, 2006-01-24 at 23:07 +0100, Arno Lehmann wrote:
> > 
> >>Hi,
> >>
> >>On 1/24/2006 9:48 PM, Reggie Dugard wrote:
> >>
> >>>I've just started to use Bacula at our site and I've tried to find the
> >>>answer to this question in the manual and in the list archives, but I
> >>>haven't had any luck, so I thought I'd try posting to the list myself.
> >>>Please point me to the appropriate place if this has already been
> >>>answered.  I'm running version 1.38.0 on Fedora Core 4.  I'm running one
> >>>director and one storage daemon.  The definitions of the storage are
> >>>below.
> >>>
> >>>I have 2 8-tape DDS-4 autochangers each of which has one drive.  I was
> >>>originally using bacula with just one of these autochangers and
> >>>everything worked well except that a full backup took 9-10 tapes so I
> >>>couldn't run it completely unattended.  Now I've moved more clients over
> >>>to use bacula along with the second autochanger and I'd like bacula to
> >>>be able to use tapes from both autochangers during the full backup.  I
> >>>have 2 pools of tapes, one for full backups and one for differentials
> >>>and ideally it wouldn't matter if I mixed tapes from both pools in a
> >>>single autochanger.
> >>>
> >>>>From reading the manual, it seems that I need to specify a particular
> >>>Storage for each job and since each Storage maps to a single
> >>>autochanger, I haven't been able to say "just use any DDS-4 capable
> >>>device and find the tape you want"
> >>>
> >>>Have I missed something in my search?  Is this currently possible with
> >>>bacula or should I just split up my clients to use one or the other of
> >>>the changers?
> >>
> >>No, you didn't miss anything. Unfortunately, Bacula can't link multiple 
> >>autochangers together.
> >>
> >>What you *could* try is to set up one virtual autochanger which uses the 
> >>physically different autochangers. This would require serious 
> >>modification of mtx-changer, and you'd have to take great care that 
> >>Bacula never tries to load a tape from autoloader 1 to the drive in 
> >>autoloader 2 :-)
> >>
> >>The easier solution would probably be to have parts of your data be 
> >>stored to each autochanger, and separating by client would probably be 
> >>the easiest solution.
> >>
> > 
> > OK, I attempted to do this, but I don't think I fully understand
> > bacula's method for choosing a tape.  I currently have 2 Pools, one for
> > Full backups and one for Differentials.  I put some tapes from each pool
> > into each of the autochangers (odd numbered tapes in one, even in the
> > other) assuming bacula would choose to write on a tape that was in the
> > storage device defined for a particular job before asking me to mount a
> > tape that is already in another device.
> > 
> > Here's an example.  I have the volumes BacDiff007 and BacDiff009 in the
> > "Dell" autochanger storage device.  BacDiff007 has status Full and
> > BacDiff009 has status Append and is mounted.  When my differential
> > backup job starts it immediately unmounts BacDiff009 and mounts
> > BacDiff007, but then sees that it is full and can't continue.  It almost
> > looks like the director thinks that BacDiff006 which is in slot 1 of the
> > "Sony" autochanger is in slot 1 of the "Dell" changer.
> > 
> > Below is some more info.  Am I missing some setting that would further
> > differentiate the 2 autochangers and what tapes they contain for the
> > Director.
> 
> Hmm. I don't remember if you told us which version of Bacula you're running.

I'm running 1.38.5 upgraded from 1.38 (which is the earliest version
I've used)
> 
> Your problem sounds like you either use 1.36, or have recently upgraded 
> and didn't "clean up" the catalog.

Nope, thats not it.
> 
> In case you use 1.36, I'd recommend to upgrade to 1.38.5 as long as 
> you're still setting everyting up. If you want or have to continue with 
> 1.36, you need to separate your volumes into two pools, each of which 
> should only be used in one autochanger.

So it should be OK to mix tapes from different pools in a given
autochanger in 1.38.5?
> 
> If you're already using 1.38, you should check if the volumes are 
> correctly assigned to the storage device the're in - either use the 
> llist command, or use the query that tells you which media is in which 
> autochanger and which slot (that one was added to the default query.sql 
> file recently, but you might find it in the list archives, too).
> 
OK, I did that and it looks right:
Choose a query (1-17): 16
+---------+------------+--------+---------+------+---------------+-----------+-----------+
| MediaId | VolumeName | GB     | Storage | Slot | Pool          | MediaType | 
VolStatus |
+---------+------------+--------+---------+------+---------------+-----------+-----------+
|     121 | BacDiff007 | 0.43   | Sony    |    1 | Differentials | DDS-4     | 
Full      |
|     120 | BacDiff006 | 30.23  | Dell    |    1 | Differentials | DDS-4     | 
Full      |
|     124 | BacDiff009 | 13.97  | Sony    |    2 | Differentials | DDS-4     | 
Append    |
|     122 | BacDiff008 | 37.96  | Dell    |    2 | Differentials | DDS-4     | 
Full      |
|     125 | BacDiff011 | 0.00   | Sony    |    3 | Differentials | DDS-4     | 
Append    |
|     127 | BacDiff010 | 0.00   | Dell    |    3 | Differentials | DDS-4     | 
Append    |
|     126 | BacDiff013 | 0.00   | Sony    |    4 | Differentials | DDS-4     | 
Append    |
|     128 | BacDiff012 | 0.00   | Dell    |    4 | Differentials | DDS-4     | 
Append    |
|      17 | Bacula017  | 35.76  | Sony    |    5 | Default       | DDS-4     | 
Purged    |
|      16 | Bacula016  | 8.43   | Dell    |    5 | Default       | DDS-4     | 
Append    |
|      19 | Bacula019  | 33.49  | Sony    |    6 | Default       | DDS-4     | 
Purged    |
|      18 | Bacula018  | 23.42  | Dell    |    6 | Default       | DDS-4     | 
Purged    |
|      21 | Bacula021  | 29.82  | Sony    |    7 | Default       | DDS-4     | 
Purged    |
|     123 | Bacula020  | 0.00   | Dell    |    7 | Default       | DDS-4     | 
Append    |
|      23 | Bacula023  | 45.20  | Sony    |    8 | Default       | DDS-4     | 
Full      |
|      22 | Bacula022  | 30.98  | Dell    |    8 | Default       | DDS-4     | 
Full      |
+---------+------------+--------+---------+------+---------------+-----------+-----------+

> Or, as something to try immediately after an upgrade from 1.36, 
> (although I think it's better to understand what's happening) clear the 
> catalog of all storage and slot assignment information with a sqlquery 
> like this: update Media set InChanger=0,Slot=0; and grap that 
> information from the autochangers with the update slots command.
> 
One guess at what's happening is that the job is looking for the oldest
appendable tape which is in a changer and decides that's the one it
wants to use and gets its slot number.  The problem is that the tape is
in the 2nd changer, not the one the job is using.  So it seems as if the
job has the drive that it's using switch to the slot number
corresponding to the tape in the other drive and then realizes that it
can't use the tape that it finds there.

Well that's my current theory anyway.  Please let me know if you have
anymore insights.

> Hope this helps,
> 
> Arno
> 
> > Thanks again,
> > 
> > Reggie
> > 
> > 25-Jan 13:03 hare-sd: 3304 Issuing autochanger "load slot 1, drive 0" 
> > command.
> > 25-Jan 13:04 hare-sd: 3305 Autochanger "load slot 1, drive 0", status is OK.
> > 25-Jan 13:04 hare-sd: 3301 Issuing autochanger "loaded drive 0" command.
> > 25-Jan 13:04 hare-sd: 3302 Autochanger "loaded drive 0", result is Slot 1.
> > 25-Jan 13:04 hare-sd: mamba.2006-01-25_13.02.34 Warning: Director wanted 
> > Volume "BacDiff006".
> >     Current Volume "BacDiff007" not acceptable because:
> >     1000 OK VolName=BacDiff007 VolJobs=1 VolFiles=0 VolBlocks=7154 
> > VolBytes=461518844 VolMounts=1 VolErrors=3 VolWrites=7156 MaxVolBytes=0 
> > VolCapacityBytes=0 VolStatus=Full Slot=1 MaxVolJobs=0 MaxVolFiles=0 
> > InChanger=1 VolReadTime=0 VolWriteTime=0 EndFile=0 EndBlock=7154 VolParts=0 
> > LabelType=0
> > 25-Jan 13:04 hare-sd: 3301 Issuing autochanger "loaded drive 0" command.
> > 25-Jan 13:04 hare-sd: 3302 Autochanger "loaded drive 0", result is Slot 1.
> > 25-Jan 13:04 hare-sd: mamba.2006-01-25_13.02.34 Warning: Director wanted 
> > Volume "BacDiff006".
> >     Current Volume "BacDiff007" not acceptable because:
> >     1000 OK VolName=BacDiff007 VolJobs=1 VolFiles=0 VolBlocks=7154 
> > VolBytes=461518844 VolMounts=1 VolErrors=3 VolWrites=7156 MaxVolBytes=0 
> > VolCapacityBytes=0 VolStatus=Full Slot=1 MaxVolJobs=0 MaxVolFiles=0 
> > InChanger=1 VolReadTime=0 VolWriteTime=0 EndFile=0 EndBlock=7154 VolParts=0 
> > LabelType=0
> > 2
> > 
> > 
> >>Hope that helps,
> >>
> >>Arno
> >>
> >>
> >>>Thanks for your help.
> >>>
> >>
> > Pool: Differentials
> > +---------+------------+-----------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> > | MediaId | VolumeName | VolStatus | VolBytes       | VolFiles | 
> > VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         
> > |
> > +---------+------------+-----------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> > |     119 | BacDiff005 | Full      | 28,591,249,133 |       31 |    
> > 5,184,000 |       1 |    5 |         0 | DDS-4     | 2006-01-20 15:20:19 |
> > |     120 | BacDiff006 | Append    | 30,055,494,201 |       32 |    
> > 5,184,000 |       1 |    1 |         1 | DDS-4     | 2006-01-24 10:14:51 |
> > |     121 | BacDiff007 | Full      |    461,518,844 |        0 |    
> > 5,184,000 |       1 |    1 |         1 | DDS-4     | 2006-01-24 22:29:17 |
> > |     122 | BacDiff008 | Append    |              1 |        0 |    
> > 5,184,000 |       1 |    2 |         1 | DDS-4     | 0000-00-00 00:00:00 |
> > |     124 | BacDiff009 | Append    |              1 |        0 |    
> > 5,184,000 |       1 |    2 |         1 | DDS-4     | 0000-00-00 00:00:00 |
> > 
> > *** From bacula-dir.conf:
> > 
> > Storage {
> >   Name = Sony
> >   Address = hare.merfinllc.com
> >   SDPort = 9103
> >   Password = "xx"
> >   Device = Sony
> >   Media Type = DDS-4
> >   Autochanger = yes
> > }
> > 
> > Storage {
> >   Name = Dell
> >   Address = hare.merfinllc.com
> >   SDPort = 9103
> >   Password = "xx"
> >   Device = Dell
> >   Media Type = DDS-4
> >   Autochanger = yes
> > }
> > 
> > *** From bacula-sd.conf:
> > 
> > Autochanger {
> >   Name = TSL-11000
> >   Device = Sony
> >   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
> >   Changer Device = /dev/sg1
> > }
> > 
> > Device {
> >   Name = Sony
> >   Media Type = DDS-4
> >   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'"
> > }
> > 
> > Autochanger {
> >   Name = DellChanger
> >   Device = Dell
> >   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
> >   Changer Device = /dev/sg3
> > }
> > 
> > Device {
> >   Name = Dell
> >   Media Type = DDS-4
> >   Archive Device = /dev/nst1
> >   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'"
> > }
> > 
> 
-- 
Reggie Dugard <[EMAIL PROTECTED]>
Merfin, LLC




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to