View Issue Details

IDProjectCategoryView StatusLast Update
0000387bareos-core[All Projects] storage daemonpublic2015-03-31 10:39
ReporterogagnonAssigned Topstorz 
Status closedResolutionwon't fix 
Product Version14.2.2 
Fixed in Version 
Summary0000387: Renaming a misplaced volume

Something that had happened to me often is that I did not configured the "Scratch Pool" of a Pool and then there is a "one time volume" that needs a new volume with a specific name but then it grabs a forgotten Purged volume in the Scratch Pool.

After that, my hands are tied. I have to wait for the volume to get Full and then modify the SQL database and the headers/checksum of the Volume to put back that volume in line for my scripts.

I've looked at the format of the volume at

The headers for the volume name is quite simple (a char of 128 bytes for the volume name). Getting the checksum is also simple to change. Why not add function to change the name of an already labelled volume ?

Searching on google for Bacula gives answers to manually do it but it would very easy to add a function in the console to do it since the Volume Name at the beginning is a char[128] and the checksum can be changed.
Additional InformationIf it is not in your plans, I've been on Bareos code a lot and I can send a patch to do it. It would a pleasure ! ;-)

TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-19.2: impact
bareos-19.2: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action




2015-01-15 15:55

administrator   ~0001186

Hello Olivier,

If I understand you right, what you are looking for is what the "relabel" command does.

Please see the docs, chapter "5.9 When The Tape Fills" (


    Do a list volumes in the Console and select the oldest Volume for relabeling.
    If you have setup your Retention periods correctly, the Volume should have VolStatus Purged.
    If the VolStatus is not set to Purged, you will need to purge the database of Jobs that are written on that Volume. Do so by using the command purge jobs volume in the Console. If you have multiple Pools, you will be prompted for the Pool then enter the VolumeName (or MediaId) when requested.
    Then simply use the relabel command to relabel the Volume.


2015-01-15 16:18

reporter   ~0001188

The term "relabel" would be the good one but with the "relabel" command, the volume has to be purged of its job which would be unfortunate since the jobs on the volume are good. Only the label name is wrong.


2015-01-19 09:04

administrator   ~0001192

Hello Olivier,

we are not planning to implement what you are asking for.
As you say yourself, if everything is properly set up, this problem does not arise.

I suggest the following to ease/solve your problem:

You do not have to wait until the tape fills, you can set it to "used" at any time. It will then not be used for writing anymore.

Also, you can migrate the contents from your tape to another pool and free the tape that way.

I am not sure if it is possible to only write the label block on a tape and still be able to read the rest of the tape.

If you want to put effort into this, I would suggest you can play around with the "btape" code to see if you can get your wished functionality running.

I think that btape would be the right place for such a command.

Very best regards,



2015-01-19 12:19

administrator   ~0001194

wait for feedback from Olivier.


2015-02-21 13:22

reporter   ~0001278

Sorry for the wait.

The problem is your assumption that I want to rename tapes. I agree that for a (physical) tape, my suggestion does not make sense. You right a tape from Alpha to Omega and store it somewhere.

I am talking about File volumes on a filesystem which has random access and is just a file with a name, a label written in the headers of the file and a checksum.


2015-03-31 10:39

administrator   ~0001658

Hello Olivier,

we are not going to invest ressources into this feature.

If you want to work an that yourself, patches are of course welcome.

Very best regards,


Issue History

Date Modified Username Field Change
2015-01-04 09:19 ogagnon New Issue
2015-01-15 15:55 pstorz Note Added: 0001186
2015-01-15 15:55 pstorz Assigned To => pstorz
2015-01-15 15:55 pstorz Status new => assigned
2015-01-15 15:56 pstorz Status assigned => feedback
2015-01-15 16:18 ogagnon Note Added: 0001188
2015-01-15 16:18 ogagnon Status feedback => assigned
2015-01-19 09:04 pstorz Note Added: 0001192
2015-01-19 12:19 maik Note Added: 0001194
2015-01-19 12:19 maik Status assigned => feedback
2015-02-21 13:22 ogagnon Note Added: 0001278
2015-02-21 13:22 ogagnon Status feedback => assigned
2015-03-31 10:39 pstorz Note Added: 0001658
2015-03-31 10:39 pstorz Status assigned => closed
2015-03-31 10:39 pstorz Resolution open => won't fix