-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default config: use virtual disk changer as FileStorage
#1467
base: master
Are you sure you want to change the base?
Conversation
This commit switches the FileStorage to be a multidevice instead of one single device. As the name stays the same updates should be as smooth as possible.
241714a
to
3f45fc5
Compare
3f45fc5
to
ed847e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice start, I've some concerns, please see suggestions and remarks.
@@ -0,0 1,6 @@ | |||
Autochanger { | |||
Name = "FileStorage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 remarks: we shouldn't call it FileStorage as the name was used previously to describe the device and dir storage.
FileStorageChanger or FileChanger
Then if we keep the CamelCase format for the Name, then the filename should be using the same format
I understand that keeping FileStorage here allow the director config to be kept as it is. But what will happen to people having a working installation? Moving suddenly to a multiple devices will completely change the behavior, isn't it?
Can we test it in a systemtest?
Name = "FileStorage" | ||
Changer Device = /dev/null # required for virtual disk changer | ||
Changer Command = "" # required for virtual disk changer | ||
Device = FileStorage # basename of the multidevice devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align comments?
Device = FileStorage # basename of the multidevice devices | |
Device = FileStorage # basename of the multidevice devices |
@@ -1,4 1,5 @@ | |||
Device { | |||
Description = "Multiplied file device. A connecting Director must have the same Name and MediaType." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the name will be the autochanger name
Description = "Multiplied file device. A connecting Director must have the same Name and MediaType." | |
Description = "Multiplied file device. A connecting Director must have the same MediaType." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should AutoChanger = yes also be set?
@@ -1,4 1,5 @@ | |||
Device { | |||
Description = "Multiplied file device. A connecting Director must have the same Name and MediaType." | |||
Name = FileStorage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about placing the number just below the name, so people will better understand why they got FileStorage0001 etc. Isn't 10 a too high number?
More you have read/write device, more volumes you will use, and you will have to explain users, that they will need as much volume per day equal the number of devices if concurrency is high enough of course.
Name = FileStorage | |
Name = FileStorage | |
Count = 10 # Number of instances |
Maybe going to 4 will be easier to explain and document like you have 2 writer / 2 reader for AI etc...
@@ -7,5 8,6 @@ Device { | |||
AutomaticMount = yes; # when device opened, read it | |||
RemovableMedia = no; | |||
AlwaysOpen = no; | |||
Description = "File device. A connecting Director must have the same Name and MediaType." | |||
Count = 10 # Number of instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Count = 10 # Number of instances |
as placed just after the name
@@ -2,6 2,7 @@ | |||
@backenddir@/libbareossd-file.so* | |||
@scriptdir@/disk-changer | |||
@configtemplatedir@/bareos-sd.d/device/FileStorage.conf | |||
@configtemplatedir@/bareos-sd.d/autochanger/filechanger.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depending of action (name formating) this need to be adjusted.
@@ -6,6 6,7 @@ | |||
@dir(bareos,bareos,0750) %%ETCDIR%%/bareos-sd.d/messages | |||
@dir(bareos,bareos,0750) %%ETCDIR%%/bareos-sd.d/storage | |||
@sample(bareos,bareos,0640) %%ETCDIR%%/bareos-sd.d/device/FileStorage.conf.sample | |||
@sample(bareos,bareos,0640) %%ETCDIR%%/bareos-sd.d/autochanger/filechanger.conf.sample |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment below about filename/name
@@ -1260,6 1260,7 @@ mkdir -p %{?buildroot}/%{_libdir}/bareos/plugins/vmware_plugin | |||
%attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/bareos-sd.d/ndmp | |||
%attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/bareos-sd.d/messages | |||
%attr(0750, %{storage_daemon_user}, %{daemon_group}) %dir %{_sysconfdir}/%{name}/bareos-sd.d/storage | |||
%attr(0640, %{storage_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/%{name}/bareos-sd.d/autochanger/filechanger.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment below about filename/name
@@ -0,0 1,6 @@ | |||
Autochanger { | |||
Name = "FileStorage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name = "FileStorage" | |
Name = "FileStorage" | |
Description = "A virtual autochanger for file device. A connecting Director must have the same Name and use the MediaType of related device. |
Also forget to mention, if this become the default configuration, I guess it would be a good idea, that it become also the default configuration for a bunch of the systemtest, what's your thoughts on this ? |
Can you confirm the value of this? Using a virtual autochanger does not automatically allow concurrent/parallel jobs where the data is written to serrate volumes does it? To do that you still would have to list our all the devices in the director sd config. |
The whole point of this is to use an autochanger in the SD so that you just mention that autochanger in the director's configuration. |
I understand this part but what does using an autochanger on 'disk' do that a 'non-autochanger disk' storage provide? Does is allow parallel jobs to run saving each job to separate volume? or does it behave just like tape and only one volume is mounted at a time so you have no benefit of parallel jobs to separate volumes? |
One volume at a time per device. But you can easily add 100 Devices to your file autochanger (which would be a real pain to configure without collecting them in an autochanger). |
Sorry to drag the out, "One volume at a time per device" If an autochanger has 10 devices defined by count 10, then '10 devices' can be mounted at once and 10 concurrent jobs will run writing to 10 volumes on 10 devices? As I have never used tape, maybe I misunderstand that an autochanger can change multiple tape drives at once instead only one, If this is the case then I see the value of the virtual auto changer. |
Yes that's the case. |
In case we will certainly add the following tricks to keep the first drive always available for label and restore.
By default a label will can use the drive 0 label volume=test storage=vchanger drive 0 yes |
Great tip thank you. |
The whole objective of this PR is to be the next default, but migrating the existent is tricky ;-) |
#2090 might be a candidate to superseed this one. |
This PR changes the existing single storage device "FileStorage" into a multiple device disk autochanger.
This should make the default config better suitable to scale on customer installations compared to the old configuration.
Backport of PR #0000 to bareos-2x (remove this line, if it no backport)
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-tool
to have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests