[pkg-bacula-devel] Bug#739996: bacula-director-mysql: Bacula chooses youngest, not oldest, available tape

Dennis Boone drb at msu.edu
Mon Feb 24 19:40:25 UTC 2014


Package: bacula-director-mysql
Version: 5.2.6+dfsg-9.1
Severity: normal

Our bacula is asking for additional tape this morning to complete
a full dump.  Full dumps are run weekly.  We have a few more tapes
than are needed to do three weeks of full dumps.  Our retention
period is set to 18 days.

The manual
(http://bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION0014150000000000000000)
states "It is important to know that when the Volume Retention period
expires, Bacula does not automatically recycle a volume. _It attempts
to keep the Volume data intact as long as possible before over writing
the Volume._"  (emphasis added)

Our Full pool definition is:

	Pool {
		Name = HMF
		Pool Type = Backup
	#   Label Format = "HMF"
		Cleaning Prefix = "CLN"
		Recycle = yes
		AutoPrune = yes
		Volume Retention = 18 days
	}

The list of tapes which are currently beyond their retention period are:

+---------+------------+-----------+---------+-------------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes          | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+-------------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|      80 | HMF048L4   | Append    |       1 |   807,716,519,936 |      162 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-03 11:57:12 |
|      79 | HMF050L4   | Full      |       1 |   918,418,358,272 |      184 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-03 08:53:00 |
|      78 | HMF044L4   | Full      |       1 |   846,183,006,208 |      170 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-03 05:12:48 |
|      95 | HMF056L4   | Full      |       1 |   815,028,240,384 |      164 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-03 01:55:05 |
|      77 | HMF047L4   | Full      |       1 | 1,067,510,136,832 |      214 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-02 22:07:28 |
|     122 | HMF070L4   | Full      |       1 |   839,165,411,328 |      168 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-02 16:55:17 |
|     119 | HMF066L4   | Full      |       1 |   852,338,147,328 |      171 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-02 13:37:28 |
|      89 | HMF049L4   | Full      |       1 |   869,932,728,320 |      175 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-02 10:17:16 |
|      82 | HMF042L4   | Full      |       1 |   818,461,802,496 |      164 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-02 06:34:04 |
|      81 | HMF045L4   | Full      |       1 |   842,693,345,280 |      169 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-02 02:49:24 |
|     128 | HMF076L4   | Full      |       1 |   768,285,868,032 |      154 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-01 23:16:17 |
|     129 | HMF077L4   | Full      |       1 |   976,262,004,736 |      196 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-01 19:35:29 |
|     145 | HMF082L4   | Full      |       1 |   978,494,947,328 |      199 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-02-01 05:51:25 |
|      83 | HMF046L4   | Append    |       1 |   726,885,466,112 |      146 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-01-27 14:41:09 |
|     123 | HMF071L4   | Full      |       1 |   975,751,348,224 |      196 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-01-27 11:38:45 |
|     120 | HMF068L4   | Full      |       1 |   754,611,388,416 |      151 |    1,555,200 |       1 |    0 |         0 | LTO-4     | 2014-01-27 07:53:15 |
+---------+------------+-----------+---------+-------------------+----------+--------------+---------+------+-----------+-----------+---------------------+

This morning, Bacula wants HMF048L4, one of the two appendable tapes in
this list.  It seems it should be asking for HMF046L4, if it wants to
use any appendable tapes first, or HMF068, if any expired tape will do.

Obviously, we could force the appendable/expired issue by setting
Volume Use Duration, but that's not really the part that concerns me.
In effect, Bacula is asking for the youngest expired tape, not
the oldest.  This behavior reduces our available dump history from
"might often have three generations" to "will never have more than
two generations".


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.11-1-amd64 (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=es_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to es_US.UTF-8)
Shell: /bin/sh linked to /bin/dash



More information about the pkg-bacula-devel mailing list