Bacula-users

Re: [Bacula-users] Automatic volume numbering

2009-04-05 14:01:30
Subject: Re: [Bacula-users] Automatic volume numbering
From: Kevin Keane <subscription AT kkeane DOT com>
Date: Sun, 5 Apr 2009 10:56:26 -0700
John Drescher wrote:
>> On 04/04/2009 04:52, Kevin Keane wrote:
>>     
>>> No, it's documented behavior. The numbers are actually the media IDs -
>>> basically, the database primary key. If you deleted these volumes from
>>> bacula completely, the numbering would start at 0005.
>>>
>>>       
>> Documented where, exactly?  I see no reference to this in the Director
>> configuration documentation.
>>
>>     
>>> The reason for this scheme is to ensure that there are no collisions.
>>>
>>>       
>
> This happened as a result of a bugfix. I am not sure of the exact
> conditions that could lead to the bug but I believe deleting a volume
> could cause 2 volumes to have the same label. There were long
> discussions on the lists a few years back on how to fix this bug and
> the current method was what was chosen by the developers.
>   
Yes, that's right. Unfortunately this bug is still not completely fixed 
(at least, I assume that this is the scenario):

The original scheme was based on the number of volumes in the pool. That 
broke down when you deleted volumes from the "middle" of the pool.

Let's say that you have a pool with 10 volume, labeled bacula0, bacula1, 
..., bacula 9

The next volume would then be labeled bacula10. The trouble arises if 
you delete volume, say, bacula4. That leaves 9 volumes in the pool - so 
the next volume would be labeled bacula9. But bacula9 already exists. 
Using the media ID sidesteps that issue, very elegantly, too.

Unfortunately, the problem still exists if you use variable expansion. 
In that case, you have to use ${NumVol} to get the number of the volume 
- and ${NumVol} still has the old behavior, and I actually ran into that 
problem.

-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users