View Issue Details

IDProjectCategoryView StatusLast Update
0001309bareos-core[All Projects] Generalpublic2021-01-19 02:27
ReporterRuth Ivimey-CookAssigned To 
Status newResolutionopen 
Platformamd64OSLinuxOS VersionUbuntu 20.04
Product Version19.2.9 
Fixed in Version 
Summary0001309: Update tape selection so the drive is not fixed
DescriptionCurrently, the tape drive used for writing a job is determined once (fixed) and all tapes must use that drive. At least, that is my understanding.

This means a system with two of the same sort of drives cannot 'double buffer' them so while one is being written the other is waiting to be changed. Also it means a long running job can hog a drive even though there is a tape loaded that would satisfy subsequent jobs in the other drive.

I delved into the code a year or so ago and found the drive selection is quite embedded, and non-trivial to change. However, changing the way bareos selects drives and storage daemons so it only picks the drive once it needs a new volume would make a great deal of sense to me, and open up new ways of deploying Bareos. I did try having two storage daemons each controlling one drive, (rather than one daemon for both) but it makes no difference.

It would be even more fun if the director could expose a type of plugin that could be involved in the selection process: essentially a call from the director to the plugin saying "here's my state, what now", that returned an instruction like "use storage=X volume=Y". It would be within this plugin that user interaction happens (i.e. the current prompt "Please mount append Volume "ZZZ" or label a new one for:", and so plugins could potentially cause an X11 prompt, not just a console one.
Steps To ReproduceOn a system with two tape drives (or equivalent) directly connected:

1. Start a job on one drive that exceeds the remaining length of that tape (tape 1);
2. Insert in the other drive a tape (tape 2) that is suitable for continuing the job once the first tape is full, and mount it;
3. Note that when tape 1 is full, bareos asks for a new tape (tape 2) to be inserted in drive 1, even though the tape its asking for is already mounted in drive 2.

4. Unmount tape 2, eject both tapes, and put the new tape in drive 1.
5. Note that bareos resumes writing the job as expected.

I presume this would also be true when two tape changers were used (i.e. a tape in changer 1 fills, there is a tape in changer 2 that satisfies the need, but bareos won't use it.
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


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-01-19 02:27 Ruth Ivimey-Cook New Issue