Bacula-users

Re: [Bacula-users] Issue with recycling after moving from 2.0 to 2.4

2009-02-20 04:10:24
Subject: Re: [Bacula-users] Issue with recycling after moving from 2.0 to 2.4
From: Yann Cezard <yann.cezard AT univ-pau DOT fr>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 20 Feb 2009 10:06:35 +0100
Yann Cézard a écrit :
> [...]
> Actually, File Retention is configured 13 days for every clients.
> But you know what ? that's a very good point ! I explain myself :
> At the start of my migration, I had 2 director crashes, caused by old 
> configuration
> files for Messages which were mentioning /var/bacula/log instead of 
> /var/lib/bacula/log
>
> I noticed the volumes that were used at the time of the crash had a 
> LastWritten field
> value of "0000-00-00 00:00:00" which was causing trouble recycling, I 
> already fixed
> that days ago, but I didn't thought to look at the File table !
>
> I'll have a look at that, and keep you informed, thanks for pointing it 
> up to me !
>
> Yann
>   
Hi again list,

So I had a look in the Files table, searching for something linked to
duration, but I didn't find anything. I run dbcheck in fixing batch mode,
in the hope it would fix the problem, but I still have problem with 
recycling.

Here is the last exemple from this night.
The Media table looks like this :
####
"MediaId";"VolumeName";"Slot";"PoolId";"MediaType";"MediaTypeId";"LabelType";"FirstWritten";"LastWritten";"LabelDate";"VolJobs";"VolFiles";"VolBlocks";"VolMounts";"VolBytes";"VolParts";"VolErrors";"VolWrites";"VolCapacityBytes";"VolStatus";"Enabled";"Recycle";"VolRetention";"VolUseDuration";"MaxVolJobs";"MaxVolFiles";"MaxVolBytes";"InChanger";"StorageId";"DeviceId";"MediaAddressing";"VolReadTime";"VolWriteTime";"EndFile";"EndBlock";"LocationId";"RecycleCount";"InitialWrite";"ScratchPoolId";"RecyclePoolId";"Comment"
"1";"sciences-full-0001";"0";"76";"File-sciences";"0";"0";"2009-02-12 
22:43:33";"2009-02-12 23:49:38";"2009-02-12 
22:43:33";"1";"0";"20920";"2";"1349578622";"0";"0";"41737";"0";"Used";"1";"1";"1123200";"0";"0";"0";"0";"0";"38";"0";"0";"0";"8351686";"0";"1349578621";"0";"1";"0000-00-00
 
00:00:00";"0";"0";NULL
"9";"sciences-full-0009";"0";"76";"File-sciences";"0";"0";"2009-02-05 
22:42:31";"2009-02-05 22:48:28";"2009-02-05 
22:42:31";"1";"0";"20885";"1";"1347322345";"0";"0";"20886";"0";"Used";"1";"1";"1123200";"0";"0";"0";"0";"0";"38";"0";"0";"0";"3412461";"0";"1347322344";"0";"0";"0000-00-00
 
00:00:00";"0";"0";NULL
####

So as you can see, the LastWritten time of the volume "sciences-full-0009"
is "2009-02-05 22:48:28", and the VolRetention is 1123200 seconds (13 days).

Client is like this :
####
"ClientId";"Name";"Uname";"AutoPrune";"FileRetention";"JobRetention"
"1";"Sciences";"2.4.4 (28Dec08) 
i486-pc-linux-gnu,debian,4.0";"1";"1123200";"1123200"
####

As you can see, Job retention is 1123200 seconds (13 days) to.

And the Full Jobs still in catalogs are:
####
"JobId";"Job";"Name";"Type";"Level";"ClientId";"JobStatus";"SchedTime";"StartTime";"EndTime";"RealEndTime";"JobTDate";"VolSessionId";"VolSessionTime";"JobFiles";"JobBytes";"JobErrors";"JobMissingFiles";"PoolId";"FileSetId";"PriorJobId";"PurgedFiles";"HasBase"
"43";"sciences.2009-02-19_22.30.00.53";"sciences";"B";"F";"1";"A";"2009-02-19 
22:30:00";"2009-02-19 22:45:47";"2009-02-20 09:30:52";"2009-02-20 
09:30:52";"1235118652";"445";"1234558143";"0";"0";"0";"0";"76";"1";"0";"0";"0"
"29";"sciences.2009-02-12_22.30.01.38";"sciences";"B";"F";"1";"T";"2009-02-12 
22:30:01";"2009-02-12 22:43:33";"2009-02-12 23:49:39";"2009-02-12 
23:49:39";"1234478979";"22";"1234454882";"9805";"1346784713";"0";"0";"76";"1";"0";"0";"0"
"15";"sciences.2009-02-05_22.30.00.41";"sciences";"B";"F";"1";"T";"2009-02-05 
22:30:00";"2009-02-05 22:42:31";"2009-02-05 22:48:29";"2009-02-05 
22:48:29";"1233870509";"22";"1233842441";"9801";"1344529845";"0";"0";"76";"1";"0";"0";"0"
####

Shouldn't the Job "sciences.2009-02-05_22.30.00.41" already be gone ?

And this is the messages I received this night :
####

19-fév 22:45 backuppa-sd JobId 43: Job sciences.2009-02-19_22.30.00.53 waiting. 
Cannot find any appendable volumes.
Please use the "label"  command to create a new Volume for:
    Storage:      "SAVE-SCIENCES" (/save/sciences)
    Pool:         PoolSciences-Full
    Media type:   File-sciences

####

19-fév 23:45 backuppa-sd JobId 43: Job sciences.2009-02-19_22.30.00.53 waiting. 
Cannot find any appendable volumes.
Please use the "label"  command to create a new Volume for:
    Storage:      "SAVE-SCIENCES" (/save/sciences)
    Pool:         PoolSciences-Full
    Media type:   File-sciences

####

20-fév 01:45 backuppa-sd JobId 43: Job sciences.2009-02-19_22.30.00.53 waiting. 
Cannot find any appendable volumes.
Please use the "label"  command to create a new Volume for:
    Storage:      "SAVE-SCIENCES" (/save/sciences)
    Pool:         PoolSciences-Full
    Media type:   File-sciences

####

20-fév 05:45 backuppa-sd JobId 43: Job sciences.2009-02-19_22.30.00.53 waiting. 
Cannot find any appendable volumes.
Please use the "label"  command to create a new Volume for:
    Storage:      "SAVE-SCIENCES" (/save/sciences)
    Pool:         PoolSciences-Full
    Media type:   File-sciences

####

So, bacula still doesn't want to prune the disposable volume by itself.
Or the job associated with it ?
If i'm pruning it from bconsole, all is fine :

+---------+--------------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+---------------+---------------------+
| MediaId | VolumeName         | VolStatus | Enabled | VolBytes      | 
VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType     | 
LastWritten         |
+---------+--------------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+---------------+---------------------+
|       1 | sciences-full-0001 | Used      |       1 | 1,349,578,622 
|        0 |    1,123,200 |       1 |    0 |         0 | File-sciences | 
2009-02-12 23:49:38 |
|       9 | sciences-full-0009 | Used      |       1 | 1,347,322,345 
|        0 |    1,123,200 |       1 |    0 |         0 | File-sciences | 
2009-02-05 22:48:28 |
+---------+--------------------+-----------+---------+---------------+----------+--------------+---------+------+-----------+---------------+---------------------+
Enter MediaId or Volume name: 9
The current Volume retention period is: 13 days
Continue? (yes/mod/no): yes
There are no more Jobs associated with Volume "sciences-full-0009". 
Marking it purged.

And the catalog is then
####
"MediaId";"VolumeName";"Slot";"PoolId";"MediaType";"MediaTypeId";"LabelType";"FirstWritten";"LastWritten";"LabelDate";"VolJobs";"VolFiles";"VolBlocks";"VolMounts";"VolBytes";"VolParts";"VolErrors";"VolWrites";"VolCapacityBytes";"VolStatus";"Enabled";"Recycle";"VolRetention";"VolUseDuration";"MaxVolJobs";"MaxVolFiles";"MaxVolBytes";"InChanger";"StorageId";"DeviceId";"MediaAddressing";"VolReadTime";"VolWriteTime";"EndFile";"EndBlock";"LocationId";"RecycleCount";"InitialWrite";"ScratchPoolId";"RecyclePoolId";"Comment"
"1";"sciences-full-0001";"0";"76";"File-sciences";"0";"0";"2009-02-12 
22:43:33";"2009-02-12 23:49:38";"2009-02-12 
22:43:33";"1";"0";"20920";"2";"1349578622";"0";"0";"41737";"0";"Used";"1";"1";"1123200";"0";"0";"0";"0";"0";"38";"0";"0";"0";"8351686";"0";"1349578621";"0";"1";"0000-00-00
 
00:00:00";"0";"0";NULL
"9";"sciences-full-0009";"0";"76";"File-sciences";"0";"0";"2009-02-05 
22:42:31";"2009-02-05 22:48:28";"2009-02-05 
22:42:31";"1";"0";"20885";"1";"1347322345";"0";"0";"20886";"0";"Purged";"1";"1";"1123200";"0";"0";"0";"0";"0";"38";"0";"0";"0";"3412461";"0";"1347322344";"0";"0";"0000-00-00
 
00:00:00";"0";"0";NULL
####
(marked as Purged)

And for the Job, the oldest one is gone :
####
"JobId";"Job";"Name";"Type";"Level";"ClientId";"JobStatus";"SchedTime";"StartTime";"EndTime";"RealEndTime";"JobTDate";"VolSessionId";"VolSessionTime";"JobFiles";"JobBytes";"JobErrors";"JobMissingFiles";"PoolId";"FileSetId";"PriorJobId";"PurgedFiles";"HasBase"
"43";"sciences.2009-02-19_22.30.00.53";"sciences";"B";"F";"1";"A";"2009-02-19 
22:30:00";"2009-02-19 22:45:47";"2009-02-20 09:30:52";"2009-02-20 
09:30:52";"1235118652";"445";"1234558143";"0";"0";"0";"0";"76";"1";"0";"0";"0"
"29";"sciences.2009-02-12_22.30.01.38";"sciences";"B";"F";"1";"T";"2009-02-12 
22:30:01";"2009-02-12 22:43:33";"2009-02-12 23:49:39";"2009-02-12 
23:49:39";"1234478979";"22";"1234454882";"9805";"1346784713";"0";"0";"76";"1";"0";"0";"0"
####

Is the problem in pruning Jobs ???

Any clue is welcome !

Regards,

-- 
Yann Cézard - Administrateur Systèmes Serveurs
Centre de Ressources Informatiques    -    http://cri.univ-pau.fr
Université de Pau et des Pays de l'Adour - http://www.univ-pau.fr


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users