[pbs-devel] [PATCH proxmox/proxmox-backup v2] Automatically select a drive (if part of a changer) when loading tapes

Laurențiu Leahu-Vlăducu l.leahu-vladucu at proxmox.com
Thu Feb 6 13:28:30 CET 2025


This patch adds the possibility to load tapes into drives
automatically by specifying a changer. This is useful for larger tape
libraries. Choosing a drive is done by using the drive that has not
been used the longest.

At the moment, this patch implements the functionality for automatic
loading both over the API and using the proxmox-backup CLI tool, as
well as in the web UI when selecting a changer. A second patch will
add the same functionality when configuring backup jobs.

Partially fixes #3351


Changes since v1:
* Improved commit messages
* Applied rustfmt / pve-eslint correctly everywhere
* Rebased to the latest changes from master
* Restructured some functions to improve code readability
* Renamed some structs to make it clear what they do (note: the
  underlying file name is still generic to use it for other
  tape-related features that serialize states in the future)


proxmox:

Laurențiu Leahu-Vlăducu (1):
  pbs-api-types: Added changer schema for automatic drive assignment

 pbs-api-types/src/tape/changer.rs | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)


proxmox-backup:

Laurențiu Leahu-Vlăducu (2):
  proxmox-backup-api/proxy: Add proxmox-product-config as dependency
  Automatically select a drive (if part of a changer) when loading tapes

 Cargo.toml                      |   2 +
 src/api2/tape/changer.rs        | 131 +++++++++++++++++++++++++++++++-
 src/bin/proxmox-backup-api.rs   |   2 +
 src/bin/proxmox-backup-proxy.rs |   4 +-
 src/bin/proxmox-tape.rs         |  48 ++++++++++--
 src/tape/changer/mod.rs         |  23 +++++-
 src/tape/drive/virtual_tape.rs  |   8 +-
 src/tape/drive_info.rs          |  56 ++++++++++++++
 src/tape/mod.rs                 |   1 +
 src/tools/mod.rs                |   9 +++
 www/tape/ChangerStatus.js       |  15 +++-
 11 files changed, 281 insertions(+), 18 deletions(-)
 create mode 100644 src/tape/drive_info.rs

-- 
2.39.5





More information about the pbs-devel mailing list