Hi,

On 2/7/2006 9:51 PM, Ryan Sizemore wrote:
Arno,

Thanks for the response. I am not trying to say that bacula *should* use
a particular volume over another. My concern was that bacula was trying
to use a volume that was not in the changer.

Ok. I just wanted to point out that it's rather useless to try to circumvent Baculas volume handling. Of course it should prefer a volume in the changer over one not loaded.

I have run update slots a
number of times, it it shows the correct information.

Have you tried purging the relevant data from the catalog before? Anyway, that should only be useful once you confirmed what Bacula knows about the tapes in the changer.

Tapes 204 & 205
are in the changer, as are 211-217, and this is what is shown when I
update the slots. Volume 209 is shown with a status of 0 for InChanger,
which is correct.

Indeed it does not try to load a tape, but I think that this is because
it wants 209, and it knows it isnt in the changer, so it has nothing to
load. My question is why does it not use some other volume that it knows
is in the changer. I really dont care which one it uses, so long as it
uses a tape that is *in* the changer.

Well, unfortunately I can't give a definitive answer to your question. But let's see:

What command were you referring to when you wrote: Using the newly
introduced query 'List what Bacula thinks is in changer'?

See the following console output:
#que
Available queries:
     1: List Job totals:
     2: List where a File is saved regardless of the directory:
     3: List where the most recent copies of a file are saved:
     4: List last 20 Full Backups for a Client:
     5: List all backups for a Client after a specified time
     6: List all backups for a Client
     7: List Volume Attributes for a selected Volume:
     8: List Volumes used by selected JobId:
     9: List Volumes to Restore All Files:
    10: List Pool Attributes for a selected Pool:
    11: List total files/bytes by Job:
    12: List total files/bytes by Volume:
    13: List Files for a selected JobId:
    14: List Jobs stored in a selected MediaId:
    15: List Jobs stored for a given Volume name:
    16: List last 25 Jobs ordered by start time with long status:
    17: List which media bacula thinks is in changer:
    18: List media metadata concerning life-time
    19: List all backups for a client with FileSet:
    20: List all Media
Choose a query (1-20): Unexpected question has been received.
17
+---------+--------------+--------+---------+------+------+-----------+-----------+
| MediaId | VolumeName   | GB     | Storage | Slot | Pool | MediaType | 
VolStatus |
+---------+--------------+--------+---------+------+------+-----------+-----------+
|       3 | DAT-120-0001 | 9.10   | HPDAT   |    1 | Incr | DDS2      | Full    
  |
|       5 | DAT-120-0003 | 7.18   | HPDAT   |    2 | Incr | DDS2      | Full    
  |
|      11 | DAT-120-0009 | 8.09   | HPDAT   |    3 | Incr | DDS2      | Full    
  |
|      32 | DAT-120-0023 | 8.98   | HPDAT   |    4 | Incr | DDS2      | Full    
  |
|      33 | DAT-120-0024 | 1.31   | HPDAT   |    5 | Incr | DDS2      | Append  
  |
|      37 | DAT-120-0025 | 8.97   | HPDAT   |    6 | Incr | DDS2      | Full    
  |
|      72 | DLT-IV-0010  | 29.63  | DLT     |    1 | Full | DLTIV     | Full    
  |
|      74 | DLT-IV-0011  | 21.13  | DLT     |    2 | Full | DLTIV     | Full    
  |
|      75 | DLT-IV-0012  | 20.32  | DLT     |    3 | Full | DLTIV     | Full    
  |
|      76 | DLT-IV-0013  | 7.45   | DLT     |    4 | Full | DLTIV     | Append  
  |
|      77 | DLT-IV-0014  | 20.34  | DLT     |    5 | Full | DLTIV     | Purged  
  |
|      78 | DLT-IV-0015  | 18.52  | DLT     |    6 | Full | DLTIV     | Purged  
  |
|      79 | DLT-IV-0016  | 18.35  | DLT     |    7 | Full | DLTIV     | Purged  
  |
+---------+--------------+--------+---------+------+------+-----------+-----------+
#

Now, keep in mind I modified my query.sql a bit, but I just confirmed that what I have as query number 17 has number 16 in the query.sql shipped with bacula-1.38.5.tar.gz

I am using Bacula 1.38.5

I don't know how the installation works in case of an upgrade, but it might be possible that the shipped query.sql has not been installed. In this case, try (temporarily) replacing your query.sql (usually in /etc/bacula) with the one found in <build-dir>/src/dird/ and run that query.

I guess, suspect, hope - whatever - that the catalog information regarding volume to slot-in-device relation is broken. If it, the solution might be simple.

Arno

Best Regards,

Ryan Sizemore

Arno Lehmann wrote:


Hi,

On 2/7/2006 6:57 PM, Ryan Sizemore wrote:


I am having a problem picking tapes from the scratch pool using an
autochanger. Here is exactly what is going on:

I have an autochanger with tapes 000200 - 000217 labeled in the Scratch
Pool. According to the bacula documentation, these tapes will be pulled
into the necessary pools as needed when those pools do not have any
appendable tapes. 'List Volumes' currently shows:

Pool: Scratch
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+

| MediaId | VolumeName | VolStatus | VolBytes | VolFiles | VolRetention
| Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+

|       6 | 000209     | Append    |        1 |        0 |    5,184,000
|       1 |   11 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|       7 | 000208     | Append    |        1 |        0 |   31,536,000
|       1 |   12 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|       8 | 000207     | Append    |        1 |        0 |   31,536,000
|       1 |   13 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|       9 | 000206     | Append    |        1 |        0 |   31,536,000
|       1 |   14 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|      10 | 000205     | Append    |        1 |        0 |   31,536,000
|       1 |   20 |         1 | AIT-3     | 0000-00-00 00:00:00 |
|      11 | 000204     | Append    |        1 |        0 |   31,536,000
|       1 |   19 |         1 | AIT-3     | 0000-00-00 00:00:00 |
|      12 | 000203     | Append    |        1 |        0 |   31,536,000
|       1 |   17 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|      13 | 000202     | Append    |        1 |        0 |   31,536,000
|       1 |   18 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|      14 | 000201     | Append    |        1 |        0 |   31,536,000
|       1 |   19 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|      15 | 000200     | Append    |        1 |        0 |   31,536,000
|       1 |   20 |         0 | AIT-3     | 0000-00-00 00:00:00 |
|      16 | 000210     | Append    |        1 |        0 |   31,536,000
|       1 |   11 |         1 | AIT-3     | 0000-00-00 00:00:00 |
|      17 | 000211     | Append    |        1 |        0 |   31,536,000
|       1 |   12 |         1 | AIT-3     | 0000-00-00 00:00:00 |
|      22 | 000216     | Append    |        1 |        0 |   31,536,000
|       1 |   17 |         1 | AIT-3     | 0000-00-00 00:00:00 |
|      23 | 000217     | Append    |        1 |        0 |   31,536,000
|       1 |   18 |         1 | AIT-3     | 0000-00-00 00:00:00 |
+---------+------------+-----------+----------+----------+--------------+---------+------+-----------+-----------+---------------------+


As you can tell, tapes 204 and 205 are the first appendable volumes that
are in the changer. However, when bacula goes to grab a tape for a job,
it grabs 217,


Erm, where do you see that?


though it *thinks* that it is grabbing 209. Here is the
output of the job:

07-Feb 09:41 backuptest-dir: No prior Full backup Job record found.
07-Feb 09:41 backuptest-dir: No prior or suitable Full backup found.
Doing FULL backup.
07-Feb 09:41 backuptest-dir: Start Backup JobId 6,
Job=BackupWindows.2006-02-07_09.41.36
07-Feb 09:41 backuptest-dir: Using Volume "000209" from 'Scratch' pool.
07-Feb 09:41 backuptest-sd: 3301 Issuing autochanger "loaded drive 0"
command.
07-Feb 09:41 backuptest-sd: 3302 Autochanger "loaded drive 0", result:
nothing loaded.
07-Feb 09:41 backuptest-sd: 3301 Issuing autochanger "loaded drive 0"
command.
07-Feb 09:41 backuptest-sd: 3302 Autochanger "loaded drive 0", result:
nothing loaded.
07-Feb 09:41 backuptest-sd: Please mount Volume "000209" on Storage
Device "SDX-700C" (/dev/nst0) for Job BackupWindows.2006-02-07_09.41.36

I am not quite sure why it is asking for volume 209, since it knows it
is not in the changer. I am sure that there is an option I am missing
somewhere, but I just cant seem to find it. Here is the device
configuration:


(which looks ok, provided the device names are correct, the
permissions, the mtx-changer script etc. pp. But as there are no error
messages...)

I'd even say it doesn't try to load any tape. Let's not talk about
which volume Bacula should use - the DIR has it's way of deciding
that, and I don't argue with it.

What happens is, IMO, that the DIR simply isn't aware that the tapes
are available in the changer it's working with.

Have you recently upgraded, and have these tapes been used last time
with Bacula 1.36.something?

If I am right, the StorageId linking the Media to the storage devices
isn't right. Using the newly introduced query 'List what Bacula thinks
is in changer' or similar might tell you that.

To work around that, try an 'update slots' command, possibly after
clearing the changer-related information from the catalog first.

Arno


Autochanger {
 Name = TLS-4220
 Device = SDX-700C
 Changer Device = /dev/sg0
 Changer Command = "/var/lib/bacula/mtx-changer %c %o %S %a %d"
}


Device {
 Name = SDX-700C                        #
 Media Type = AIT-3
 Archive Device = /dev/nst0
 AutomaticMount = yes;               # when device opened, read it
 AlwaysOpen = yes;
 RemovableMedia = yes;
 RandomAccess = no;
 AutoChanger = yes
 Spool Directory = /tmp/bacula-spool
 Maximum Network Buffer Size = 65536
}

We would like the changer to grab the first available tape from the
scratch pool that is in the changer. This seems like it would be a
logical choice.

Best Regards,

Ryan Sizemore


-------------------------------------------------------
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





--
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de


-------------------------------------------------------
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