[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Automatic labeling (bug 1014)

On Monday 28 January 2008 19.45:55 Luke Reeves wrote:
> Greetings all.  I've been working at tracking down what I thought was a
> bug in Bacula.  Automatic volume labels prior to Bacula 2.2.5 were based
> on the number of volumes in the pool where the new media is created and
> in that version a change was made so that the incremental component of
> the label was based on the maximum media ID across all volumes.  The
> original behavior is restored by slightly modifying the SQL in newvol.c:
> SELECT MAX(MediaId) FROM Media,Pool WHERE Pool.PoolId=%s
> To:
> So just as I was about to mail that, I found bug 1014
> (http://bugs.bacula.org/view.php?id=1014) which describes this as
> changed behavior and the documentation was updated to reflect that.  I
> can't tell from the bug if this is intentional or not, but to me it
> seems very much like a regression.  

No, it is not a regression.  If you delete a volume, the previous algorithm 
completely fails.

> Consider a site with multiple pools, 
> one for each type of backup.  You might have the numbers in your labels
> scattered across all of your pools, so instead of "FULL0001, FULL0002,
> INC0001, INC0002" you would have "FULL0001, INC0002, FULL0004, INC0004".
>  This is also a problem since labels for the tapes are usually ordered
> in bulk (like say FULL0001 to FULL0120) and skipped numbers will just
> lead to confusion.

Well Automatic volume names is just that, Bacula *automatically* generates the 
volume names and all that really counts for it to work is that they are 
unique.  Automatic labeling was never guaranteed (even with the old 
algorithm) to produce unique sequential label names ...

If you want volume names to follow a specific pattern, then you need to either 
pre-label them manually (or using barcodes), or use something like Bacula 
variables or Python scripting to ensure that they are sequential.

> I found a reference on newvol.c to a bug 921, but I'd think that the fix
> for that causes a larger bug.



This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Bacula-devel mailing list

This mailing list archive is a service of Copilotco.