Skip to content

config: add virtual file changer example + documentation#2090

Merged
BareosBot merged 3 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/default-config-add-virtual-disk-changer-example
Apr 16, 2025
Merged

config: add virtual file changer example + documentation#2090
BareosBot merged 3 commits intobareos:masterfrom
bruno-at-bareos:dev/bruno/master/default-config-add-virtual-disk-changer-example

Conversation

@bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Dec 24, 2024

This PR aims to introduce configuration example files for using an
autochanger with virtual disk autonumbered devices.

We also revisit some related chapter of the documentation.

  • device_resource.cc: fix typo and alignment
  • config: add virtual disk changer to default configuration
  • doc: update indexes syntax, rewrap paragraph
  • doc: volume management chapter improvement

After first presentation (2024-01-14), we want to rename disk to file, to respect the rest of the configuration CamelCase should be used, but it is not as practical and equivalent our tape changer is all lowercase.
We want to avoid name finishing with -

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

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
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
TODO
  • Installed the packages and enabled the example files to see if it works

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/default-config-add-virtual-disk-changer-example branch 4 times, most recently from b28db39 to 7ba14b2 Compare January 6, 2025 13:49
@bruno-at-bareos bruno-at-bareos marked this pull request as ready for review January 13, 2025 09:52
@bruno-at-bareos bruno-at-bareos self-assigned this Jan 13, 2025
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/default-config-add-virtual-disk-changer-example branch from e5637f2 to 54b319e Compare January 13, 2025 10:40
@bruno-at-bareos bruno-at-bareos changed the title config: add virtual disk changer example + documentation config: add virtual file changer example + documentation Jan 14, 2025
@bruno-at-bareos bruno-at-bareos marked this pull request as draft January 14, 2025 14:01
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/default-config-add-virtual-disk-changer-example branch from f25da90 to 2b98257 Compare January 20, 2025 09:06
@bruno-at-bareos bruno-at-bareos marked this pull request as ready for review January 27, 2025 09:57
@pstorz pstorz self-requested a review February 3, 2025 16:02
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately was not able to install as we do not have current packages.

@bruno-at-bareos
Copy link
Contributor Author

Unfortunately was not able to install as we do not have current packages.

With your proposed changes a rebuild has been triggered, so packages should be available today.

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/default-config-add-virtual-disk-changer-example branch from 8831976 to e15d126 Compare February 10, 2025 13:36
@wizhippo
Copy link

This configuration has the initial device "vfile0000" "reserved for storage and labeling".

Testing I did a restore and it used vfile0001 by default with no option given to select the reserved device. Is this expected? How is the reserved device used? Does a restore job need to be created that takes advantage of this reserved device? Does it only come into play if none of the vfile0001 - vfile0xxx are available and it then will let you mount the revered device?

Perhaps a some documentation could be added to clarify its use?

@bruno-at-bareos
Copy link
Contributor Author

Unfortunately was not able to install as we do not have current packages.
@pstorz New packages have been created on Feb 10th.

@bruno-at-bareos
Copy link
Contributor Author

bruno-at-bareos commented Feb 10, 2025

This configuration has the initial device "vfile0000" "reserved for storage and labeling".

Testing I did a restore and it used vfile0001 by default with no option given to select the reserved device. Is this expected? How is the reserved device used? Does a restore job need to be created that takes advantage of this reserved device? Does it only come into play if none of the vfile0001 - vfile0xxx are available and it then will let you mount the revered device?

Perhaps a some documentation could be added to clarify its use?

Interesting comment, I will have a check

@wizhippo to let the drive available for restore, you need to set the drive in autoselect=yes mode, then you have a drive more free, but you can't request directly the restore to use it.
So while that reserved drive is super useful for label, it might not be as much for restores especially if the queue of waiting jobs is large, But still can help.

@arogge arogge requested a review from pstorz February 11, 2025 10:58
@pstorz pstorz force-pushed the dev/bruno/master/default-config-add-virtual-disk-changer-example branch from 287c5c7 to d0e7d6e Compare February 27, 2025 05:54
Copy link
Contributor Author

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that renaming to File will improve the situation.
My vote is against for the reason given in the review

@bruno-at-bareos
Copy link
Contributor Author

Important commit for documentation and defaultconfig not directly related are now extracted and presented in #2225

@bruno-at-bareos
Copy link
Contributor Author

Today meeting we decided to setup the example and the configuration, like it was done to replace the default distributed File and FileStorage allowing end user to switch in place jobs without touching any further their configuration.

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/default-config-add-virtual-disk-changer-example branch from 2adec63 to 82e9e42 Compare April 15, 2025 07:53
@bruno-at-bareos bruno-at-bareos added this to the 25.0.0 milestone Apr 15, 2025
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good work! Thank you bruno.

bruno-at-bareos and others added 2 commits April 16, 2025 10:23
- update indexes syntax.
- rewrap paragraph.
- cleanup example from oldies
- remove and adjust `Maximum Concurrent Jobs`
- introduce virtual file autochanger with auto-numbered devices.
- fix spelling Directory -> |dir|
- standardize parameters spelling
- use relative positionning into the rst to source directly config
  example in sources.

config: add virtual disk changer example

`bareos-dir.d/storage/File.conf.example` is using storage resource
defined in `bareos-sd.d/autochanger/FileStorage.conf.example`
virtual file changer is using autonumbered devices defined in
`bareos-sd.d/devices/File.conf.example`

- create virtual_diskchanger.d backend configuration
  to use unix_file_device.d backend
- packaging: add example files to all platforms
- File.conf.example: set Address and Password to be fill'up
  with post install scripts
- named the changer File so it can replace the default distributed
  DIR File storage ressource and FileStorage ressource on SD

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Co-authored-by: Philipp Storz <philipp.storz@bareos.com>
@pstorz pstorz force-pushed the dev/bruno/master/default-config-add-virtual-disk-changer-example branch from e34e466 to 1be752c Compare April 16, 2025 08:24
@BareosBot BareosBot merged commit 1b11c19 into bareos:master Apr 16, 2025
1 check was pending
florian-at-bareos added a commit to florian-at-bareos/bareos that referenced this pull request Apr 23, 2025
bruno-at-bareos added a commit to bruno-at-bareos/bareos that referenced this pull request May 12, 2025
With bareos#2090 *.conf.example files get modified when
installing a package.

on RPM based distributions `rpm -V` should not lead to a altered
package warning.

`*.example.conf` files are marked as config files in the spec file.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
bruno-at-bareos added a commit to bruno-at-bareos/bareos that referenced this pull request May 13, 2025
With bareos#2090 *.conf.example files get modified when
installing a package.

on RPM based distributions `rpm -V` should not lead to a altered
package warning.

`*.example.conf` files are marked as config files in the spec file.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
(cherry picked from commit 8f784bb)
sebsura pushed a commit to bruno-at-bareos/bareos that referenced this pull request May 15, 2025
With bareos#2090 *.conf.example files get modified when
installing a package.

on RPM based distributions `rpm -V` should not lead to a altered
package warning.

`*.example.conf` files are marked as config files in the spec file.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
BareosBot pushed a commit to bruno-at-bareos/bareos that referenced this pull request May 19, 2025
With bareos#2090 *.conf.example files get modified when
installing a package.

on RPM based distributions `rpm -V` should not lead to a altered
package warning.

`*.example.conf` files are marked as config files in the spec file.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
(cherry picked from commit 8f784bb)
florian-at-bareos added a commit to florian-at-bareos/bareos that referenced this pull request May 20, 2025
arogge pushed a commit to florian-at-bareos/bareos that referenced this pull request Jul 8, 2025
With bareos#2090 *.conf.example files get modified when
installing a package.

on RPM based distributions `rpm -V` should not lead to a altered
package warning.

`*.example.conf` files are marked as config files in the spec file.

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/default-config-add-virtual-disk-changer-example branch July 24, 2025 11:47
sebsura pushed a commit to florian-at-bareos/bareos that referenced this pull request Sep 22, 2025
sebsura pushed a commit to florian-at-bareos/bareos that referenced this pull request Oct 13, 2025
arogge pushed a commit to florian-at-bareos/bareos that referenced this pull request Oct 30, 2025
sebsura pushed a commit to florian-at-bareos/bareos that referenced this pull request Oct 31, 2025
sebsura pushed a commit to florian-at-bareos/bareos that referenced this pull request Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants