Bacula-users

Re: [Bacula-users] Mount, label, etc not using anything but Drive 0 with an autochanger [Was: SD not using more than 1 drive in autochanger]

2008-11-05 16:24:58
Subject: Re: [Bacula-users] Mount, label, etc not using anything but Drive 0 with an autochanger [Was: SD not using more than 1 drive in autochanger]
From: "Jeff Falgout" <jtfalgout AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 5 Nov 2008 14:22:08 -0700
Thanks Alex,

On Tue, Nov 4, 2008 at 11:11 AM, Alex Chekholko <chekh AT pcbi.upenn DOT edu> 
wrote:
> On Mon, 3 Nov 2008 16:23:10 -0600
> "Jeff Falgout" <jtfalgout AT gmail DOT com> wrote:
>
>> >
>> > *status
>> > <snipped>
>> >
>> > Device status:
>> > Autochanger "T200-1" with devices:
>> >   "T200-1-Drive-0" (/dev/nst0)
>> >   "T200-1-Drive-2" (/dev/nst1)
>> >   "T200-1-Drive-3" (/dev/nst2)
>> > Device "T200-1-Drive-0" (/dev/nst0) is mounted with:
>> >    Volume:      041775L4
>> >    Pool:        Default
>> >    Media type:  LTO-4
>> >    Slot 6 is loaded in drive 0.
>> >    Total Bytes Read=1,024 Blocks Read=1 Bytes/block=1,024
>> >    Positioned at File=0 Block=0
>> > Device "T200-1-Drive-2" (/dev/nst1) is not open.
>> >    Drive 2 status unknown.
>> > Device "T200-1-Drive-3" (/dev/nst2) is not open.
>> >    Drive 3 status unknown.
>> > ====
>
> Do you have your Maximum Concurrent Jobs defined in all of the places where 
> you need it?  You need to set it in up to five places.
> http://www.bacula.org/fr/dev-manual/Tips_and_Suggestions.html#SECTION0081818000000000000000
>
> For example, I don't see it in your Storage section in bacula-dir.conf.

After I posted the original mail, I did add Max Concurrent Jobs to the
Storage definition in bacula-dir.conf. I was missing that originally:

Storage {
 Name = T200-1
# Do not use "localhost" here
 Address = sd.site.com                # N.B. Use a fully qualified name here
 SDPort = 9103
 Password = "xxxxxxxxxxxx"
 Device = "Drive_1"
 Device = "Drive_2"
 Device = "Drive_3"
 Media Type = LTO-4
 Autochanger = yes
 Maximum Concurrent Jobs = 20
}


After a lot of reading through the mailing list, I came across a post
that hinted there was a problem with running "label barcodes" on
anything but the first drive, but running simultaneous jobs DID work .
I was assuming that since I couldn't tell bconsole which drive I
wanted loaded or use (such as in label barcodes, mount, umount, etc)
it was wasn't seeing my other drives. I ran a test backup with
multiple jobs and 2 drives were used, so I was assuming (with out
actually testing) that something was incorrect.

Which leads to my other problem: I ran a third job at the same time
and bacula prompted me for a labeled tape which was in the library and
in the scratch pool but didn't load it into the third drive. That's
where my problem occurs. How can I load it? bconsole ignores the drive
designation when you run "mount". I tried to load the tape through the
library interface, but bacula didn't recognize that the tape was
loaded. Not sure how to get around that one yet.

It looks like something goes wrong somewhere in the ua_select.c file.
I've looked at the section for getting the drive number:

int get_storage_drive(UAContext *ua, STORE *store)
{
  int i, drive = -1;
  /* Get drive for autochanger if possible */
  i = find_arg_with_value(ua, "drive");
  if (i >=0) {
     drive = atoi(ua->argv[i]);
  } else if (store && store->autochanger) {
     /* If our structure is not set ask SD for # drives */
     if (store->drives == 0) {
        store->drives = get_num_drives_from_SD(ua);
     }
     /* If only one drive, default = 0 */
     if (store->drives == 1) {
        drive = 0;
     } else {
        /* Ask user to enter drive number */
        ua->cmd[0] = 0;
        if (!get_cmd(ua, _("Enter autochanger drive[0]: "))) {
           drive = -1;  /* None */
        } else {
           drive = atoi(ua->cmd);
        }
    }
  }
  return drive;
}

but I don't see anything obvious yet.

Jeff

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Bacula-users] Mount, label, etc not using anything but Drive 0 with an autochanger [Was: SD not using more than 1 drive in autochanger], Jeff Falgout <=