Re: [Bacula-users] convincing Bacula to use a different tape than it requested
Normally when Bacula asks for a specific volume and the volume is not "available" it will put up a message requesting the volume. If you then put a different volume into the drive (assuming it is a tape), Bacula will use that volume if it is appropriate (correct Media Type, Pool, Volume Status, ...). Since I haven't seen the exact messages that Bacula was displaying, it is not easy to understand why Bacula was rejecting your proposed volume(s). Normally if you do an "llist volume=requesting" and an "llist volume=" you should be able to see if there is or is not a match on Media Type, Pool, Volume Status, ... Best regards, Kern On 02/12/2018 12:11 AM, Tilman Schmidt wrote: Forcing Bacula to use particular tapes is not my objective. (That would be easy - just put every tape in a pool of its own.) What I'm asking for is a sensible way to handle the situation when Bacula requests an unavailable volume. That does happen. It's more frequent with standalone drives but it occurs occasionally with autochangers, too. The specific instance I described was just one example. So what is the appropriate action when Bacula decides to use a tape that for whatever reason is not available for use? Thanks, Tilman Am 07.02.2018 um 10:21 schrieb Kern Sibbald: Bacula is designed to decide itself which tapes to use and when. If you are trying to force it to use particular tapes it is possible, but it is outside the design envelop, so you will almost surely run into problems. On 06.02.2018 00:54, Tilman Schmidt wrote: Just encountered the situation again. Bacula requested last month's tape "Januar" since its use period hadn't expired yet, but it's the next full backup which should go onto the new month's tape "Februar". Tape "Januar" has VolStatus=Append. Tape "Februar" has VolStatus=Used with VolFiles=0 since it's way beyond any applicable retention periods, but Bacula rejects it because of its Status and never considers promoting it to "Purged" . Running bconsole command "prune volume=Februar" asks for confirmation, then emits the message Found no Job associated with the Volume "Februar" to prune and does nothing. Bacula continues to reject the tape. Running bconsole command "purge volume=Februar" emits an alarming message This command can be DANGEROUS!!! then proceeds, *without* waiting for confirmation, to update VolStatus of tape "Februar" to Purged. Now Bacula accepts the tape. Is all that how it should be? Is there a way to run the purge command automatically for volumes that have reached the "VolStatus=Used && VolFiles=0" state? Thanks, Tilman Am 08.01.2018 um 00:34 schrieb Tilman Schmidt: Hello Heitor, Am 15.12.2017 um 15:41 schrieb Heitor Faria: running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE Leap 42.3 with a standalone LTO tape drive. Note: Meanwhile upgraded to 9.0.6. [Sometimes Bacula requests] a tape that for some reason cannot or should not be used for that job. Then if I mount a different tape, Bacula will immediately eject it again, claiming that it is in the wrong state ("Used" instead of "Recycle") and insisting I mount the one it requested. How can I convince Bacula to recycle and use the tape I give it? You can forccefully recycle this tape with the purge command. Ok, that worked, but I'm not quite happy with that solution yet. * The situation has occurred again today, Bacula requesting volume "Mai-2" instead of "Januar" which I wanted it to use. * I first checked volume "Januar" which had not been in use for way beyond its retention period of 91 days, and was listed in the catalog with VolFiles=0, so it should be available for recycling: *llist volume=Januar MediaId: 52 VolumeName: Januar Slot: 0 PoolId: 1 MediaType: LTO-2 MediaTypeId: 0 FirstWritten: 1970-01-01 01:00:00 LastWritten: 2017-01-30 00:39:15 LabelDate: 2017-01-02 20:49:20 VolJobs: 0 VolFiles: 0 VolBlocks: 0 VolParts: 0 VolCloudParts: 0 CacheRetention: 0 VolMounts: 25 VolBytes: 1 VolABytes: 0 VolAPadding: 0 VolHoleBytes: 0 VolHoles: 0 LastPartBytes: 0 VolErrors: 0 VolWrites: 20,112,985 VolCapacityBytes: 0 VolStatus: Used Enabled: 1 Recycle: 1 VolRetention: 7,862,400 VolUseDuration: 2,678,400 MaxVolJobs: 0 MaxVolFiles: 0 MaxVolBytes: 0 InChanger: 0 EndFile: 92 EndBlock: 5,628 VolType: 0 LabelType: 0 StorageId: 4 DeviceId: 0 MediaAddressing: 0 VolReadTime: 0 VolWriteTime: 39,796,045,456 LocationId: 0 RecycleCount: 6 InitialWrite: -00-00 00:00:00 ScratchPoolId: 0 RecyclePoolId: 0 ActionOnPurge: 0 ExpiresIn: 0 Comment:
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
You can disable the volume or change the volume status to Full if you don't intend to append any additional data. If you disable the volume, you will need to enable it in order to use it. I deal in sets of 10 volumes and run into situations where Bacula want a volume that has an earlier expiration than the set of perfectly acceptable recyclable media that is available. I script the import and export of the media to disable or enable the volumes being transferred so that I don't have this particular issue. Patti On 2/11/18, 6:18 PM, "Tilman Schmidt"wrote: Forcing Bacula to use particular tapes is not my objective. (That would be easy - just put every tape in a pool of its own.) What I'm asking for is a sensible way to handle the situation when Bacula requests an unavailable volume. That does happen. It's more frequent with standalone drives but it occurs occasionally with autochangers, too. The specific instance I described was just one example. So what is the appropriate action when Bacula decides to use a tape that for whatever reason is not available for use? Thanks, Tilman Am 07.02.2018 um 10:21 schrieb Kern Sibbald: > Bacula is designed to decide itself which tapes to use and when. If you > are trying to force it to use particular tapes it is possible, but it is > outside the design envelop, so you will almost surely run into problems. > > > > On 06.02.2018 00:54, Tilman Schmidt wrote: >> Just encountered the situation again. >> Bacula requested last month's tape "Januar" since its use period hadn't >> expired yet, but it's the next full backup which should go onto the new >> month's tape "Februar". >> Tape "Januar" has VolStatus=Append. >> Tape "Februar" has VolStatus=Used with VolFiles=0 since it's way beyond >> any applicable retention periods, but Bacula rejects it because of its >> Status and never considers promoting it to "Purged" . >> >> Running bconsole command "prune volume=Februar" asks for confirmation, >> then emits the message >> >>Found no Job associated with the Volume "Februar" to prune >> >> and does nothing. Bacula continues to reject the tape. >> >> Running bconsole command "purge volume=Februar" emits an alarming message >> >>This command can be DANGEROUS!!! >> >> then proceeds, *without* waiting for confirmation, to update VolStatus >> of tape "Februar" to Purged. Now Bacula accepts the tape. >> >> Is all that how it should be? >> >> Is there a way to run the purge command automatically for volumes that >> have reached the "VolStatus=Used && VolFiles=0" state? >> >> Thanks, >> Tilman >> >> Am 08.01.2018 um 00:34 schrieb Tilman Schmidt: >>> Hello Heitor, >>> >>> Am 15.12.2017 um 15:41 schrieb Heitor Faria: > running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE > Leap > 42.3 with a standalone LTO tape drive. >>> Note: Meanwhile upgraded to 9.0.6. >>> > [Sometimes Bacula requests] a tape that for some > reason cannot or should not be used for that job. > Then if I mount a different tape, Bacula will immediately eject it > again, claiming that it is in the wrong state ("Used" instead of > "Recycle") and insisting I mount the one it requested. > How can I convince Bacula to recycle and use the tape I give it? You can forccefully recycle this tape with the purge command. >>> Ok, that worked, but I'm not quite happy with that solution yet. >>> >>> * The situation has occurred again today, Bacula requesting volume >>> "Mai-2" instead of "Januar" which I wanted it to use. >>> * I first checked volume "Januar" which had not been in use for way >>> beyond its retention period of 91 days, and was listed in the catalog >>> with VolFiles=0, so it should be available for recycling: >>> >>> *llist volume=Januar >>>MediaId: 52 >>> VolumeName: Januar >>> Slot: 0 >>> PoolId: 1 >>> MediaType: LTO-2 >>>MediaTypeId: 0 >>> FirstWritten: 1970-01-01 01:00:00 >>>LastWritten: 2017-01-30 00:39:15 >>> LabelDate: 2017-01-02 20:49:20 >>>VolJobs: 0 >>> VolFiles: 0 >>> VolBlocks: 0 >>> VolParts: 0 >>> VolCloudParts: 0 >>> CacheRetention: 0 >>> VolMounts: 25 >>> VolBytes: 1 >>> VolABytes: 0 >>>VolAPadding: 0 >>> VolHoleBytes: 0 >>> VolHoles: 0 >>> LastPartBytes: 0 >>> VolErrors: 0 >>> VolWrites: 20,112,985 >>> VolCapacityBytes: 0 >>> VolStatus: Used >>>Enabled: 1 >>>
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
Hello, 2018-02-12 0:11 GMT+01:00 Tilman Schmidt: > (...) > > So what is the appropriate action when Bacula decides to use a tape that > for whatever reason is not available for use? > > Could you define "is not available for use"? For Bacula the tape available for use has a status Append, so when a tape "is not available for use" it should has a different status. You can ask Bacula to manage volume status for you and in most cases it do, i.e. it sets Full status when written to maximum size, etc. best regards -- Radosław Korzeniewski rados...@korzeniewski.net -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
Forcing Bacula to use particular tapes is not my objective. (That would be easy - just put every tape in a pool of its own.) What I'm asking for is a sensible way to handle the situation when Bacula requests an unavailable volume. That does happen. It's more frequent with standalone drives but it occurs occasionally with autochangers, too. The specific instance I described was just one example. So what is the appropriate action when Bacula decides to use a tape that for whatever reason is not available for use? Thanks, Tilman Am 07.02.2018 um 10:21 schrieb Kern Sibbald: > Bacula is designed to decide itself which tapes to use and when. If you > are trying to force it to use particular tapes it is possible, but it is > outside the design envelop, so you will almost surely run into problems. > > > > On 06.02.2018 00:54, Tilman Schmidt wrote: >> Just encountered the situation again. >> Bacula requested last month's tape "Januar" since its use period hadn't >> expired yet, but it's the next full backup which should go onto the new >> month's tape "Februar". >> Tape "Januar" has VolStatus=Append. >> Tape "Februar" has VolStatus=Used with VolFiles=0 since it's way beyond >> any applicable retention periods, but Bacula rejects it because of its >> Status and never considers promoting it to "Purged" . >> >> Running bconsole command "prune volume=Februar" asks for confirmation, >> then emits the message >> >> Found no Job associated with the Volume "Februar" to prune >> >> and does nothing. Bacula continues to reject the tape. >> >> Running bconsole command "purge volume=Februar" emits an alarming message >> >> This command can be DANGEROUS!!! >> >> then proceeds, *without* waiting for confirmation, to update VolStatus >> of tape "Februar" to Purged. Now Bacula accepts the tape. >> >> Is all that how it should be? >> >> Is there a way to run the purge command automatically for volumes that >> have reached the "VolStatus=Used && VolFiles=0" state? >> >> Thanks, >> Tilman >> >> Am 08.01.2018 um 00:34 schrieb Tilman Schmidt: >>> Hello Heitor, >>> >>> Am 15.12.2017 um 15:41 schrieb Heitor Faria: > running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE > Leap > 42.3 with a standalone LTO tape drive. >>> Note: Meanwhile upgraded to 9.0.6. >>> > [Sometimes Bacula requests] a tape that for some > reason cannot or should not be used for that job. > Then if I mount a different tape, Bacula will immediately eject it > again, claiming that it is in the wrong state ("Used" instead of > "Recycle") and insisting I mount the one it requested. > How can I convince Bacula to recycle and use the tape I give it? You can forccefully recycle this tape with the purge command. >>> Ok, that worked, but I'm not quite happy with that solution yet. >>> >>> * The situation has occurred again today, Bacula requesting volume >>> "Mai-2" instead of "Januar" which I wanted it to use. >>> * I first checked volume "Januar" which had not been in use for way >>> beyond its retention period of 91 days, and was listed in the catalog >>> with VolFiles=0, so it should be available for recycling: >>> >>> *llist volume=Januar >>> MediaId: 52 >>> VolumeName: Januar >>> Slot: 0 >>> PoolId: 1 >>> MediaType: LTO-2 >>> MediaTypeId: 0 >>> FirstWritten: 1970-01-01 01:00:00 >>> LastWritten: 2017-01-30 00:39:15 >>> LabelDate: 2017-01-02 20:49:20 >>> VolJobs: 0 >>> VolFiles: 0 >>> VolBlocks: 0 >>> VolParts: 0 >>> VolCloudParts: 0 >>> CacheRetention: 0 >>> VolMounts: 25 >>> VolBytes: 1 >>> VolABytes: 0 >>> VolAPadding: 0 >>> VolHoleBytes: 0 >>> VolHoles: 0 >>> LastPartBytes: 0 >>> VolErrors: 0 >>> VolWrites: 20,112,985 >>> VolCapacityBytes: 0 >>> VolStatus: Used >>> Enabled: 1 >>> Recycle: 1 >>> VolRetention: 7,862,400 >>> VolUseDuration: 2,678,400 >>> MaxVolJobs: 0 >>> MaxVolFiles: 0 >>> MaxVolBytes: 0 >>> InChanger: 0 >>> EndFile: 92 >>> EndBlock: 5,628 >>> VolType: 0 >>> LabelType: 0 >>> StorageId: 4 >>> DeviceId: 0 >>> MediaAddressing: 0 >>> VolReadTime: 0 >>> VolWriteTime: 39,796,045,456 >>> LocationId: 0 >>> RecycleCount: 6 >>> InitialWrite: -00-00 00:00:00 >>> ScratchPoolId: 0 >>> RecyclePoolId: 0 >>> ActionOnPurge: 0 >>> ExpiresIn: 0 >>> Comment: NULL >>> >>> * I tried to prune the volume. Bacula asked me whether I was sure, then >>> told me there was nothing to do: >>> >>> *prune volume=Januar >>> The current Volume retention period is: 3 months 1 day >>> Continue? (yes/mod/no): yes >>> Found no Job associated with the Volume "Januar" to prune >>> >>> After that, Bacula would still
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
Bacula is designed to decide itself which tapes to use and when. If you are trying to force it to use particular tapes it is possible, but it is outside the design envelop, so you will almost surely run into problems. On 06.02.2018 00:54, Tilman Schmidt wrote: Just encountered the situation again. Bacula requested last month's tape "Januar" since its use period hadn't expired yet, but it's the next full backup which should go onto the new month's tape "Februar". Tape "Januar" has VolStatus=Append. Tape "Februar" has VolStatus=Used with VolFiles=0 since it's way beyond any applicable retention periods, but Bacula rejects it because of its Status and never considers promoting it to "Purged" . Running bconsole command "prune volume=Februar" asks for confirmation, then emits the message Found no Job associated with the Volume "Februar" to prune and does nothing. Bacula continues to reject the tape. Running bconsole command "purge volume=Februar" emits an alarming message This command can be DANGEROUS!!! then proceeds, *without* waiting for confirmation, to update VolStatus of tape "Februar" to Purged. Now Bacula accepts the tape. Is all that how it should be? Is there a way to run the purge command automatically for volumes that have reached the "VolStatus=Used && VolFiles=0" state? Thanks, Tilman Am 08.01.2018 um 00:34 schrieb Tilman Schmidt: Hello Heitor, Am 15.12.2017 um 15:41 schrieb Heitor Faria: running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE Leap 42.3 with a standalone LTO tape drive. Note: Meanwhile upgraded to 9.0.6. [Sometimes Bacula requests] a tape that for some reason cannot or should not be used for that job. Then if I mount a different tape, Bacula will immediately eject it again, claiming that it is in the wrong state ("Used" instead of "Recycle") and insisting I mount the one it requested. How can I convince Bacula to recycle and use the tape I give it? You can forccefully recycle this tape with the purge command. Ok, that worked, but I'm not quite happy with that solution yet. * The situation has occurred again today, Bacula requesting volume "Mai-2" instead of "Januar" which I wanted it to use. * I first checked volume "Januar" which had not been in use for way beyond its retention period of 91 days, and was listed in the catalog with VolFiles=0, so it should be available for recycling: *llist volume=Januar MediaId: 52 VolumeName: Januar Slot: 0 PoolId: 1 MediaType: LTO-2 MediaTypeId: 0 FirstWritten: 1970-01-01 01:00:00 LastWritten: 2017-01-30 00:39:15 LabelDate: 2017-01-02 20:49:20 VolJobs: 0 VolFiles: 0 VolBlocks: 0 VolParts: 0 VolCloudParts: 0 CacheRetention: 0 VolMounts: 25 VolBytes: 1 VolABytes: 0 VolAPadding: 0 VolHoleBytes: 0 VolHoles: 0 LastPartBytes: 0 VolErrors: 0 VolWrites: 20,112,985 VolCapacityBytes: 0 VolStatus: Used Enabled: 1 Recycle: 1 VolRetention: 7,862,400 VolUseDuration: 2,678,400 MaxVolJobs: 0 MaxVolFiles: 0 MaxVolBytes: 0 InChanger: 0 EndFile: 92 EndBlock: 5,628 VolType: 0 LabelType: 0 StorageId: 4 DeviceId: 0 MediaAddressing: 0 VolReadTime: 0 VolWriteTime: 39,796,045,456 LocationId: 0 RecycleCount: 6 InitialWrite: -00-00 00:00:00 ScratchPoolId: 0 RecyclePoolId: 0 ActionOnPurge: 0 ExpiresIn: 0 Comment: NULL * I tried to prune the volume. Bacula asked me whether I was sure, then told me there was nothing to do: *prune volume=Januar The current Volume retention period is: 3 months 1 day Continue? (yes/mod/no): yes Found no Job associated with the Volume "Januar" to prune After that, Bacula would still eject the volume, asking I insert volume "Mai-2" instead. * Only when I actually purged the volume Bacula marked it as purged and subsequently accepted to use it: *purge volume=Januar This command can be DANGEROUS!!! It purges (deletes) all Files from a Job, JobId, Client or Volume; or it purges (deletes) all Jobs from a Client or Volume without regard to retention periods. Normally you should use the PRUNE command, which respects retention periods. There are no more Jobs associated with Volume "Januar". Marking it purged. *llist volume=Januar MediaId: 52 VolumeName: Januar Slot: 0 PoolId: 1 MediaType: LTO-2 MediaTypeId: 0 FirstWritten: 1970-01-01 01:00:00 LastWritten: 2017-01-30 00:39:15 LabelDate: 2017-01-02 20:49:20 VolJobs: 0 VolFiles: 0 VolBlocks: 0 VolParts: 0 VolCloudParts: 0 CacheRetention: 0 VolMounts: 25 VolBytes: 1 VolABytes: 0
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
Just encountered the situation again. Bacula requested last month's tape "Januar" since its use period hadn't expired yet, but it's the next full backup which should go onto the new month's tape "Februar". Tape "Januar" has VolStatus=Append. Tape "Februar" has VolStatus=Used with VolFiles=0 since it's way beyond any applicable retention periods, but Bacula rejects it because of its Status and never considers promoting it to "Purged" . Running bconsole command "prune volume=Februar" asks for confirmation, then emits the message Found no Job associated with the Volume "Februar" to prune and does nothing. Bacula continues to reject the tape. Running bconsole command "purge volume=Februar" emits an alarming message This command can be DANGEROUS!!! then proceeds, *without* waiting for confirmation, to update VolStatus of tape "Februar" to Purged. Now Bacula accepts the tape. Is all that how it should be? Is there a way to run the purge command automatically for volumes that have reached the "VolStatus=Used && VolFiles=0" state? Thanks, Tilman Am 08.01.2018 um 00:34 schrieb Tilman Schmidt: > Hello Heitor, > > Am 15.12.2017 um 15:41 schrieb Heitor Faria: >>> running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE Leap >>> 42.3 with a standalone LTO tape drive. > > Note: Meanwhile upgraded to 9.0.6. > >>> [Sometimes Bacula requests] a tape that for some >>> reason cannot or should not be used for that job. >>> Then if I mount a different tape, Bacula will immediately eject it >>> again, claiming that it is in the wrong state ("Used" instead of >>> "Recycle") and insisting I mount the one it requested. >>> How can I convince Bacula to recycle and use the tape I give it? >> >> You can forccefully recycle this tape with the purge command. > > Ok, that worked, but I'm not quite happy with that solution yet. > > * The situation has occurred again today, Bacula requesting volume > "Mai-2" instead of "Januar" which I wanted it to use. > * I first checked volume "Januar" which had not been in use for way > beyond its retention period of 91 days, and was listed in the catalog > with VolFiles=0, so it should be available for recycling: > > *llist volume=Januar > MediaId: 52 >VolumeName: Januar > Slot: 0 >PoolId: 1 > MediaType: LTO-2 > MediaTypeId: 0 > FirstWritten: 1970-01-01 01:00:00 > LastWritten: 2017-01-30 00:39:15 > LabelDate: 2017-01-02 20:49:20 > VolJobs: 0 > VolFiles: 0 > VolBlocks: 0 > VolParts: 0 > VolCloudParts: 0 >CacheRetention: 0 > VolMounts: 25 > VolBytes: 1 > VolABytes: 0 > VolAPadding: 0 > VolHoleBytes: 0 > VolHoles: 0 > LastPartBytes: 0 > VolErrors: 0 > VolWrites: 20,112,985 > VolCapacityBytes: 0 > VolStatus: Used > Enabled: 1 > Recycle: 1 > VolRetention: 7,862,400 >VolUseDuration: 2,678,400 >MaxVolJobs: 0 > MaxVolFiles: 0 > MaxVolBytes: 0 > InChanger: 0 > EndFile: 92 > EndBlock: 5,628 > VolType: 0 > LabelType: 0 > StorageId: 4 > DeviceId: 0 > MediaAddressing: 0 > VolReadTime: 0 > VolWriteTime: 39,796,045,456 >LocationId: 0 > RecycleCount: 6 > InitialWrite: -00-00 00:00:00 > ScratchPoolId: 0 > RecyclePoolId: 0 > ActionOnPurge: 0 > ExpiresIn: 0 > Comment: NULL > > * I tried to prune the volume. Bacula asked me whether I was sure, then > told me there was nothing to do: > > *prune volume=Januar > The current Volume retention period is: 3 months 1 day > Continue? (yes/mod/no): yes > Found no Job associated with the Volume "Januar" to prune > > After that, Bacula would still eject the volume, asking I insert volume > "Mai-2" instead. > > * Only when I actually purged the volume Bacula marked it as purged and > subsequently accepted to use it: > > *purge volume=Januar > > This command can be DANGEROUS!!! > > It purges (deletes) all Files from a Job, > JobId, Client or Volume; or it purges (deletes) > all Jobs from a Client or Volume without regard > to retention periods. Normally you should use the > PRUNE command, which respects retention periods. > There are no more Jobs associated with Volume "Januar". Marking it purged. > > *llist volume=Januar > MediaId: 52 >VolumeName: Januar > Slot: 0 >PoolId: 1 > MediaType: LTO-2 > MediaTypeId: 0 > FirstWritten: 1970-01-01 01:00:00 > LastWritten: 2017-01-30 00:39:15 > LabelDate: 2017-01-02 20:49:20 > VolJobs: 0 > VolFiles: 0 > VolBlocks: 0 > VolParts: 0 > VolCloudParts: 0 >CacheRetention: 0 > VolMounts: 25 > VolBytes: 1 > VolABytes: 0 > VolAPadding: 0 > VolHoleBytes: 0 > VolHoles: 0 > LastPartBytes: 0
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
Hello Heitor, Am 15.12.2017 um 15:41 schrieb Heitor Faria: >> running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE Leap >> 42.3 with a standalone LTO tape drive. Note: Meanwhile upgraded to 9.0.6. >> [Sometimes Bacula requests] a tape that for some >> reason cannot or should not be used for that job. >> Then if I mount a different tape, Bacula will immediately eject it >> again, claiming that it is in the wrong state ("Used" instead of >> "Recycle") and insisting I mount the one it requested. >> How can I convince Bacula to recycle and use the tape I give it? > > You can forccefully recycle this tape with the purge command. Ok, that worked, but I'm not quite happy with that solution yet. * The situation has occurred again today, Bacula requesting volume "Mai-2" instead of "Januar" which I wanted it to use. * I first checked volume "Januar" which had not been in use for way beyond its retention period of 91 days, and was listed in the catalog with VolFiles=0, so it should be available for recycling: *llist volume=Januar MediaId: 52 VolumeName: Januar Slot: 0 PoolId: 1 MediaType: LTO-2 MediaTypeId: 0 FirstWritten: 1970-01-01 01:00:00 LastWritten: 2017-01-30 00:39:15 LabelDate: 2017-01-02 20:49:20 VolJobs: 0 VolFiles: 0 VolBlocks: 0 VolParts: 0 VolCloudParts: 0 CacheRetention: 0 VolMounts: 25 VolBytes: 1 VolABytes: 0 VolAPadding: 0 VolHoleBytes: 0 VolHoles: 0 LastPartBytes: 0 VolErrors: 0 VolWrites: 20,112,985 VolCapacityBytes: 0 VolStatus: Used Enabled: 1 Recycle: 1 VolRetention: 7,862,400 VolUseDuration: 2,678,400 MaxVolJobs: 0 MaxVolFiles: 0 MaxVolBytes: 0 InChanger: 0 EndFile: 92 EndBlock: 5,628 VolType: 0 LabelType: 0 StorageId: 4 DeviceId: 0 MediaAddressing: 0 VolReadTime: 0 VolWriteTime: 39,796,045,456 LocationId: 0 RecycleCount: 6 InitialWrite: -00-00 00:00:00 ScratchPoolId: 0 RecyclePoolId: 0 ActionOnPurge: 0 ExpiresIn: 0 Comment: NULL * I tried to prune the volume. Bacula asked me whether I was sure, then told me there was nothing to do: *prune volume=Januar The current Volume retention period is: 3 months 1 day Continue? (yes/mod/no): yes Found no Job associated with the Volume "Januar" to prune After that, Bacula would still eject the volume, asking I insert volume "Mai-2" instead. * Only when I actually purged the volume Bacula marked it as purged and subsequently accepted to use it: *purge volume=Januar This command can be DANGEROUS!!! It purges (deletes) all Files from a Job, JobId, Client or Volume; or it purges (deletes) all Jobs from a Client or Volume without regard to retention periods. Normally you should use the PRUNE command, which respects retention periods. There are no more Jobs associated with Volume "Januar". Marking it purged. *llist volume=Januar MediaId: 52 VolumeName: Januar Slot: 0 PoolId: 1 MediaType: LTO-2 MediaTypeId: 0 FirstWritten: 1970-01-01 01:00:00 LastWritten: 2017-01-30 00:39:15 LabelDate: 2017-01-02 20:49:20 VolJobs: 0 VolFiles: 0 VolBlocks: 0 VolParts: 0 VolCloudParts: 0 CacheRetention: 0 VolMounts: 25 VolBytes: 1 VolABytes: 0 VolAPadding: 0 VolHoleBytes: 0 VolHoles: 0 LastPartBytes: 0 VolErrors: 0 VolWrites: 20,112,985 VolCapacityBytes: 0 VolStatus: Purged Enabled: 1 Recycle: 1 VolRetention: 7,862,400 VolUseDuration: 2,678,400 MaxVolJobs: 0 MaxVolFiles: 0 MaxVolBytes: 0 InChanger: 0 EndFile: 92 EndBlock: 5,628 VolType: 0 LabelType: 0 StorageId: 4 DeviceId: 0 MediaAddressing: 0 VolReadTime: 0 VolWriteTime: 39,796,045,456 LocationId: 0 RecycleCount: 6 InitialWrite: -00-00 00:00:00 ScratchPoolId: 0 RecyclePoolId: 0 ActionOnPurge: 0 ExpiresIn: 0 Comment: NULL Isn't that the wrong way around? Shouldn't Bacula ask for confirmation on the *dangerous* command, and execute the *safe* one without asking? And shouldn't there be a non-dangerous way to promote a volume that *already* has no more jobs associated with it from status Used to Purged? Thanks, Tilman -- Tilman SchmidtE-Mail: til...@imap.cc Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite) -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org!
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
On 15/12/17 15:07, Tilman Schmidt wrote: On my server I see tapes staying in the "Used" status long after their retention has expired. Correct. Retention is the _minimum_ period before the tape can be marked for reuse Only when Bacula needs a tape *and* it cannot find one with status "Append" or "Recycle" it will select one in state "Full" or "Used" and recycle it. Also correct - and if you have a recycle pool, only if that is empty too. {purge] > However I already tried that and it didn't help. It reported that all jobs had been purged from the tape but still did not recycle it. After a tape is purged Bacula won't recycle it until the next time it checks the drive (assuming it's waiting for a tape). You can speed things up by telling it to mount the drive that it's waiting for (use slot 0). -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
Hello Heitor, thanks for your answer. On Fri, Dec 15, 2017, at 15:41, Heitor Faria wrote: > If tape has Used status, its volume retention is not over yet. That doesn't match what I observe. On my server I see tapes staying in the "Used" status long after their retention has expired. Only when Bacula needs a tape *and* it cannot find one with status "Append" or "Recycle" it will select one in state "Full" or "Used" and recycle it. > > How can I convince Bacula to recycle and use the tape I give it? > > You can forccefully recycle this tape with the purge command. Thanks, I'll try that, although I'm a bit reluctant because that command doesn't respect retention periods, so the operator must be very careful to select a tape that is in fact eligible for recycling. For that reason I'd have preferred the prune command. However I already tried that and it didn't help. It reported that all jobs had been purged from the tape but still did not recycle it. Regards, Tilman -- Tilman Schmidt til...@imap.cc -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] convincing Bacula to use a different tape than it requested
> Hello list, Hello, Tilman, > running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE Leap > 42.3 with a standalone LTO tape drive. > When the loaded tape is full, or unsuitable for the backup job for some > other reason, Bacula will eject it, select another tape from the > appropriate pool, and emit an "Intervention needed" message for the > operator to load that tape. > In general, this works well. > Every once in a while however, Bacula selects a tape that for some > reason cannot or should not be used for that job. > Then if I mount a different tape, Bacula will immediately eject it > again, claiming that it is in the wrong state ("Used" instead of > "Recycle") and insisting I mount the one it requested. If tape has Used status, its volume retention is not over yet. > How can I convince Bacula to recycle and use the tape I give it? You can forccefully recycle this tape with the purge command. > aTdHvAaNnKcSe, yWoEuLCaOrMeE, > -- > Tilman Schmidt > til...@imap.cc Regards, -- === Heitor Medrado de Faria | CEO Bacula do Brasil & USA | Visto EB-1 | LPIC-III | EMC 05-001 | ITIL-F • Não seja tarifado pelo tamanho dos seus backups, conheça o Bacula Enterprise http://www.bacula.com.br/enterprise/ • Ministro treinamento e implementação in-company do Bacula Community http://www.bacula.com.br/in-company/ Brazil +55 (61) 98268-4220 | USA +1 (323) 300-5387 | www.bacula.com.br Indicamos as capacitações complementares: Shell básico e Programação em Shell com Julio Neves | Zabbix com Adail Host. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] convincing Bacula to use a different tape than it requested
Hello list, running Bacula 7.4.4 (same problem with version 5.2.13) on openSUSE Leap 42.3 with a standalone LTO tape drive. When the loaded tape is full, or unsuitable for the backup job for some other reason, Bacula will eject it, select another tape from the appropriate pool, and emit an "Intervention needed" message for the operator to load that tape. In general, this works well. Every once in a while however, Bacula selects a tape that for some reason cannot or should not be used for that job. Then if I mount a different tape, Bacula will immediately eject it again, claiming that it is in the wrong state ("Used" instead of "Recycle") and insisting I mount the one it requested. How can I convince Bacula to recycle and use the tape I give it? aTdHvAaNnKcSe, -- Tilman Schmidt til...@imap.cc -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users