I believe Chris Schwerdt on the devel list has outlined the exact
problem with the post " find_next_volume_for_append algorithm issue".

Regards,

Ryan Sizemore

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. I have run update slots a
>number of times, it it shows the correct information. 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.
>
>What command were you referring to when you wrote: Using the newly
>introduced query 'List what Bacula thinks is in changer'?
>
>I am using Bacula 1.38.5
>
>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
>>>
>>>      
>>>
>
>
>
>-------------------------------------------------------
>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
>  
>



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