Hi,

I've updated my long time running bacula 2.0.3 to 2.2.6 two weeks ago. I've
found something that makes the scratch pool nearly unusable with the
changes that were done in 2.2.x regarding pruning.

Some of my config settings:

Differential Pool:
Volume Retention = 31 day

Job:
File Retention = 90 days
Job Retention = 6 months


I've a daily cronjob that issues the 'status dir days=4' command to trigger
pruning/recycling.

This was working fine for the last 8 months. After the volume retention time
was over volumes were markes as pruned and recycled during the next backup.

* status dir days=4
[...]
You have messages.
*mess
04-Okt 18:05 VU0EM005-dir: Pruned 3 Jobs on Volume "06D125L3" from catalog.
04-Okt 18:05 VU0EM005-dir: Recycled volume "06D125L3"


After my update to bacula 2.2.6, the status dir command does not prune the
volumes anymore. Instead a volume from the scratch pool is used.

You have messages.
*mess
22-Nov 13:46 VU0EM005-dir JobId 0: Using Volume "06D141L3" from 'Scratch' pool.


Here's my Differential pool after that bacula message. There was at least one
volume that could have been pruned (06D125L3).

Pool: Differential
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| mediaid | volumename | volstatus | enabled | volbytes       | volfiles | 
volretention | recycle | slot |
inchanger | mediatype | lastwritten         |
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       6 | 06D125L3   | Used      |       1 |  9,816,468,480 |       11 |    
2,678,400 |       1 |    6 |         1 | LTO3      | 2007-10-14 00:25:18 |
|       7 | 06D126L3   | Used      |       1 | 18,565,585,920 |       20 |    
2,678,400 |       1 |    7 |         1 | LTO3      | 2007-10-21 00:33:04 |
|       8 | 06D127L3   | Used      |       1 | 29,770,094,592 |       31 |    
2,678,400 |       1 |    8 |         1 | LTO3      | 2007-10-28 00:46:41 |
|      19 | 06D137L3   | Used      |       1 | 74,883,142,656 |       76 |    
2,678,400 |       1 |   18 |         1 | LTO3      | 2007-11-18 01:10:57 |
|      37 | 06D124L3   | Used      |       1 | 10,923,623,424 |       12 |    
2,678,400 |       1 |    5 |         1 | LTO3      | 2007-11-11 00:31:07 |
|      49 | 06D141L3   | Append    |       1 |         64,512 |        0 |    
2,678,400 |       1 |   22 |         1 | LTO3      |                     |
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+



Looking at the release notes, there has been some work to optimize pruning in 
2.2.x:

http://sourceforge.net/mailarchive/forum.php?thread_name=200708111036.55201.kern%40sibbald.com&forum_name=bacula-announce
 [^]

- Volumes are pruned only when absolutely necessary -- this may cause
your database to grow compared to prior Bacula versions.
[...]
- Volumes are no longer pruned during 'status dir'


This changes makes the scratch pool useless, because bacula does not prune
volumes during the 'status dir' command, but still decides if a volume of the
scratch pool will be used. This way a volume of the scrach pool will be moved
to the Differential (or Full) pool all the time the command is issued. I'm not
sure what happens at backup time, if the status command was not issued before.
Maybe bacula will then  prune the volume and do what is expected.

Downgrading to 2.0.3 restored the expected behaviour, 06D125L3 was pruned
any recycled. No scratch pool volume was used.

You have messages.
*mess
23-Nov 08:51 VU0EM005-dir: Pruned 3 Jobs on Volume "06D126L3" from catalog.
23-Nov 08:51 VU0EM005-dir: Pruned 3 Jobs on Volume "06D125L3" from catalog.
23-Nov 08:51 VU0EM005-dir: Recycled volume "06D125L3"


IMHO, the scratch pool should only be used if no other volume can be used, it's
a last restort if I forgot to add the right amount of volumes to a pool, or if
the retention times are set wrong.

IMHO, bacula should't decide to use a scatch pool's volume at a time it doesn't
prune volumes. This have to be done at the same time.


I've opened a bug report (1019) which is still in state 'feedback'.


Ralf

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to