Hello Martin. Thanks for responding. We end up deleting, erasing and re-labeling all tapes and start from scratch. But how could I change a tape status back to recycle? I don't have this option in bconsole:
*update volume=W001 Parameters to modify: 1: Volume Status 2: Volume Retention Period 3: Volume Use Duration 4: Maximum Volume Jobs 5: Maximum Volume Files 6: Maximum Volume Bytes 7: Recycle Flag 8: Slot 9: InChanger Flag 10: Volume Files 11: Pool 12: Volume from Pool 13: All Volumes from Pool 14: All Volumes from all Pools 15: Enabled 16: RecyclePool 17: Action On Purge 18: Done Select parameter to modify (1-18): 1 Updating Volume "S001" Current Volume status is: Append Possible Values are: 1: Append 2: Archive 3: Disabled 4: Full 5: Used 6: Cleaning 7: Read-Only Choose new Volume Status (1-7): Cheers, Rodrigo -----Original Message----- From: Martin Simmons [mailto:mar...@lispworks.com] Sent: Wednesday, October 27, 2010 4:21 PM To: bacula-users@lists.sourceforge.net Subject: Re: [Bacula-users] Bacula is recycling the wrong tape >>>>> On Tue, 26 Oct 2010 11:25:54 -0200, Rodrigo Ferraz said: > > Hi > > We've been struggling with this problem for a few weeks and i'm completely > out of ideas on how to permanently solve it, so any help will be appreciated. > We have a 'Weekly' pool which comprises 5 different LTO-3 tapes: W001, W002, > ... W005. One tape per whole week. This pool is configured this way: > > Pool { > Name = Weekly > Pool Type = Backup > Recycle = yes > AutoPrune = yes > Volume Use Duration = 4 days > Volume Retention = 15 days > Recycle Oldest Volume = yes > Purge Oldest Volume = yes > Maximum Volumes = 5 > } > > And backup jobs follow this schedule: > > Schedule { > Name = "MonthlyCycle" > Run = Level=Full Pool=Weekly 1st thu at 23:05 > Run = Level=Full Pool=Weekly 2nd-5th mon at 23:05 > Run = Level=Incremental Pool=Weekly 2nd-5th thu at 23:05 } > > The problem is that bacula always recycle the wrong tape on Mondays. For > example, if it is supposed to use tape 'W005' this week, it will recycle and > ask for 'W001', next week's tape. Backup jobs fail and this error comes up: > > 23-Oct 23:05 br01 JobId 666: Start Backup JobId 666, > Job=Backup-br01.2010-10-25_23.05.00_36 > 23-Oct 23:05 br01 JobId 666: Using Device "LTO-3" > 23-Oct 23:05 br01 JobId 666: Warning: Director wanted Volume "W001". > Current Volume "W005" not acceptable because: > 1998 Volume "W005" status is Used, but should be Append, Purged or > Recycle. > 23-Oct 23:05 br01 JobId 666: Please mount Volume "W001" or label a new one > for: > Job: Backup-br01.2010-09-20_23.05.00_36 > Storage: "LTO-3" (/dev/nst0) > Pool: Semanal > Media type: LTO-3 > > Funny thing is that W005 is in fact the oldest volume and first on the queue > to be recycled. > > Pool: Weekly > +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ > | MediaId | VolumeName | VolStatus | Enabled | VolBytes | VolFiles | > VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten | > +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ > | 11 | W005 | Used | 1 | 1 | 0 | > 1,296,000 | 1 | 0 | 0 | LTO-3 | 2010-09-23 23:13:53 | > | 20 | W001 | Recycle | 1 | 1 | 0 | > 1,296,000 | 1 | 0 | 0 | LTO-3 | 2010-09-30 23:11:20 | > | 21 | W002 | Used | 1 | 441,216,792,576 | 445 | > 1,296,000 | 1 | 0 | 0 | LTO-3 | 2010-10-08 02:18:54 | > | 27 | W003 | Used | 1 | 446,883,913,728 | 451 | > 1,296,000 | 1 | 0 | 0 | LTO-3 | 2010-10-15 17:41:38 | > | 28 | W004 | Used | 1 | 450,299,824,128 | 458 | > 1,296,000 | 1 | 0 | 0 | LTO-3 | 2010-10-21 23:14:39 | > +---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ > ... > So every Monday I must open bconsole and manually change back the volume > status of the next tape (in this case W001) to 'Used', so that the current > tape is correctly recycled. But I think this action could be actually > provoking the situation, but I'm not sure. I'm thinking about maybe changing > 'Volume Retention' to a longer time, 28 days for example. Yes, setting W001 to Used might be provoking it. It looks like W005 has been recycled already (VolFiles is 0) but you probably set it to Used manually in the past. This will prevent it from being chosen ahead of W001, which is currently in the Recycle state. Bacula will choose the oldest volume that is in the Recycle state if possible so I suggest setting changing the VolStatus of W005 back to Recycle. Avoid setting any volume to the Used state from now on. Instead use the purge volume command if you need to force the oldest volume to be reused. That might take a few cycles to fix it, but eventually it should start to work automatically without the purge command. __Martin ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users