View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001309||bareos-core||[All Projects] General||public||2021-01-19 02:27||2021-01-19 02:27|
|Reporter||Ruth Ivimey-Cook||Assigned To|
|Platform||amd64||OS||Linux||OS Version||Ubuntu 20.04|
|Fixed in Version|
|Summary||0001309: Update tape selection so the drive is not fixed|
|Description||Currently, 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 Reproduce||On 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.
|Tags||No tags attached.|