Bacula-users

Re: [Bacula-users] Bacula wants to create volumes that already exist

2008-09-10 14:49:09
Subject: Re: [Bacula-users] Bacula wants to create volumes that already exist
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 10 Sep 2008 20:48:23 +0200
Hi,

10.09.2008 19:50, Joshua J. Kugler wrote:
> Well, I thought I had it set to Purge Oldest, but I didn't.  That was my 
> intention, but the directive wasn't there (yes, I'm aware of the 
> implications).  So, that solved that problem.

Good.

>  But why was it trying to 
> create volumes that already exist? That seems like a true bug in 
> Bacula.

Bug... maybe. Rather, it's some sort of a known limitation you can run 
into from time to time.

The way Bacula figures out the names for autolabeled new volumes is a 
bit limited.

In earlier versions, it took the number of existing volumes per pool, 
increased that, and used that number as a starting point. It then, if 
a volume of that name existed, tried to simply increase the number and 
retried a few times (you see the retries in the output).

The current version takes, as the starting number to try, the number 
of all volumes from all pools, but otherwise works identical as far as 
I know.

This works ok if you only create volumes and never delete them. 
However, once you start deleting volumes, you end up with a 
discrepancy between volume names and volume numbers.

Today, this is less likely to result in problems, but it's still 
easily possible, especially if you only use one pool.

Summary: The algorithm Bacula uses to determine can definitely be 
improved. This is, however, not a serious issue for most users, so 
noone ever worked on it.

There is no easy workaround.
You can, naturally, always create volumes manually. File volumes can 
be precreated without wasting much disk space, so this is what I 
usually do.

If you want to have automatic volume labeling and also need to delete 
volumes or move them between pools, the only solution I can think of 
now is to just create "fake" volumes.

For older versions of Bacula, you would need volumes in each pool 
where this problem happens that you name not the usual way. For 
example, add volumes with names like Fake001, Fake002, and so on. Then 
make sure these volumes are never actually used, for example by 
setting them to "used" and not recycleable, or mark them as "error".

With the current version of Bacula, you can create a pool dedicated to 
those fake volumes.

This increases the catalog size a bit, and can look funny in the 
status or reports you use, but should work.

Arno

> j
> 
> On Wednesday 10 September 2008, Joshua J. Kugler said something like:
>> Bump?
>>
>> These volumes exist in the database on and disk, but Bacula keeps
>> trying to create them.  Does anyone know what's wrong?  There is
>> plenty of space on the disk to which it's backing up, and I have
>> Bacula configured to recycle the oldest volume, so I'm not sure why
>> it's not purging the oldest, and going from there.
>>
>> Ideas?
>>
>> j
>>
>> On Monday 08 September 2008, Joshua J. Kugler said something like:
>>> Came in this morning and noticed a client needed intervention. 
>>> This is a disk-to-dist backup.
>>>
>>> 08-Sep 09:51 adelie-dir: hyperion.2008-09-07_23.05.04 Warning:
>>> Wanted to create Volume "File-0192", but it already exists. Trying
>>> again. 08-Sep 09:51 adelie-dir: hyperion.2008-09-07_23.05.04
>>> Warning: Wanted to create Volume "File-0193", but it already
>>> exists. Trying again. 08-Sep 09:51 adelie-dir:
>>> hyperion.2008-09-07_23.05.04 Warning: Wanted to create Volume
>>> "File-0194", but it already exists. Trying again. 08-Sep 09:51
>>> adelie-dir: hyperion.2008-09-07_23.05.04 Warning: Wanted to create
>>> Volume "File-0195", but it already exists. Trying again. 08-Sep
>>> 09:51 adelie-dir: hyperion.2008-09-07_23.05.04 Warning: Wanted to
>>> create Volume "File-0196", but it already exists. Trying again.
>>> 08-Sep 09:51 adelie-dir: hyperion.2008-09-07_23.05.04 Warning:
>>> Wanted to create Volume "File-0197", but it already exists. Trying
>>> again. 08-Sep 09:51 adelie-dir: hyperion.2008-09-07_23.05.04
>>> Warning: Wanted to create Volume "File-0198", but it already
>>> exists. Trying again. 08-Sep 09:51 adelie-dir:
>>> hyperion.2008-09-07_23.05.04 Warning: Wanted to create Volume
>>> "File-0199", but it already exists. Trying again. 08-Sep 09:51
>>> adelie-dir: hyperion.2008-09-07_23.05.04 Warning: Wanted to create
>>> Volume "File-0200", but it already exists. Trying again. 08-Sep
>>> 09:51 adelie-dir: hyperion.2008-09-07_23.05.04 Warning: Wanted to
>>> create Volume "File-0201", but it already exists. Trying again.
>>> 08-Sep 09:51 adelie-dir: hyperion.2008-09-07_23.05.04 Error: Too
>>> many failures. Giving up creating Volume name.
>>> 08-Sep 09:51 adelie-dir: Pruning oldest volume "File-0041"
>>> 08-Sep 09:51 adelie-sd: Job hyperion.2008-09-07_23.05.04 waiting.
>>> Cannot find any appendable volumes.
>>> Please use the "label"  command to create a new Volume for:
>>>     Storage:      "FileStorage" (/backup/bacula)
>>>     Media type:   File
>>>     Pool:         Default
>>>
>>> We have the system configured to automatically recycle oldest
>>> volume. These volumes were on disk and in the database, but it was
>>> trying to create them anyway.  We're using an SQLite database.  I
>>> don't know what's going on. Does anyone else?
> 
> 
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

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