On Saturday 09 April 2005 14:40, Arno Lehmann wrote:
> Hello.
>
> Kern Sibbald wrote:
> > Hello,
> >
> > On Friday 08 April 2005 23:17, Michael Joyner wrote:
> >>Confused.
> >>
> >>I have two stores configured, vxa-0, vxa-1
> >>when I run "update slots" vxa-0, it will mark all the tapes currently in
> >>the loader.
> >>
> >>when I run "update slots" vxa-1, it will unmark all the tapes from the
> >>vxa-0 storage resource. :(
> >>
> >>when I start a backup on vxa-0, but the slots are updated from vxa-1, it
> >>instructs vxa-0 to load tapes based on the slot assignments that are in
> >>vxa-1. finds the wrong label and appropiately fails.
> >>
> >>:(
> >>
> >>Is there not a way to use bacula with two tape changers and one director?
> >
> > Perhaps some of our users have figured out how to do this, but it is one
> > of the weak points of Bacula.  However, in version 1.37, I believe that I
> > have corrected this, but as far as I know, no one has tested it.
>
> I'm using two autochangers here. Kern probably remembers how I manage
> those.
>
> Prerequisites: Tapes for each autochanger need to be of different media
> type. For you, that might be nonsense...

It is a good solution, but might create some annoyances down the road for 
exchanging tapes between autochangers.

>
> I patched bacula's autoloader management a little. In
> src/cats/sql_update.c I now have
> /*
>   * If we have a non-zero InChanger, ensure that no other Media
>   *  record has InChanger set on the same Slot.
>   *
>   * This routine assumes the database is already locked.
>   */
> void
> db_make_inchanger_unique(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
> {
>     if (mr->InChanger != 0 && mr->Slot != 0) {
>        Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
>             "Slot=%d AND MediaType='%s' AND MediaId!=%u",
>              mr->Slot, mr->MediaType, mr->MediaId);
>        Dmsg1(400, "%s\n", mdb->cmd);
>        UPDATE_DB(jcr, mdb, mdb->cmd);
>     }
> }
>
> The ...WHERE clause is the key, I reset only tapes with the same
> MediaType, where Kern's version uses... oops, forgot... PoolId, probably.

Well, 1.36.x does use PoolId, but version 1.37.x uses StorageId, which ties it 
to the specific autochanger being used.

>
> It works for me... In your case, relying on pools might be more useful.
> After all, at baculas current state, you need some difference between
> tapes in the changers, and relying on MediaType is worse than Pool, if
> your drives do accept the same Media...

...

-- 
Best regards,

Kern


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to