public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 00/23] add removable datastores
@ 2023-09-15  6:54 Hannes Laimer
  2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 01/23] tools: add disks utility functions Hannes Laimer
                   ` (25 more replies)
  0 siblings, 26 replies; 46+ messages in thread
From: Hannes Laimer @ 2023-09-15  6:54 UTC (permalink / raw)
  To: pbs-devel

These patches add support for removable datastores. All removable
datastores have a backing-device(a UUID) associated with them. Removable
datastores work like normal ones, just that they can be unplugged. It is
possible to create a removable datastore, sync backups onto it, unplug
it and use it on a different PBS.

The datastore path is also the mountpoint for the removable datastore.
By default when creating one through the web UI it will be
`/mnt/removable-datastores/<UUID>`, using the CLI it is possible to
specify something else. Since a removable datastore is associated with
the UUID of a partition, it is technically possible to have two
removable datastores on the same device, but I don't think there is a
use-case that couldn't also be done using namespaces.

When a removable datastore is deleted and 'destroy-data' is set, the
device has to be plugged in. If 'destroy-data' is not set the datastore
can be deleted even if the device is not present. Removable datastores
are automatically mounted when plugged in. At the API service start all
removable datastores are marked as 'unplugged', unless they are already
mounted.

b404eea5 and e5863f7e are not strictly needed, but they made sense in
this context, so I kept them in this series.

Hannes Laimer (23):
  tools: add disks utility functions
  pbs-api-types: add backing-device to DataStoreConfig
  maintenance: add 'Unpplugged' maintenance type
  disks: add UUID to partition info
  api2: admin: add (un)mount endpoint for removable datastores
  add helper for checking if a removable datastore is available
  api2: removable datastore creation
  ui: add partition selector form
  api2: disks list: add only-unused flag
  ui: add removable datastore creation support
  ui: add (un)mount button to summary
  pbs-api-types: datastore: use new proxmox_scheme::de for
    deserialization
  pbs-api-types: add removable/is-available flag to DataStoreListItem
  ui: display removable datastores in list
  ui: utils: render unplugged maintenance mode correctly
  ui: utils: make parseMaintenanceMode more robust
  ui: add datastore status mask for unplugged removable datastores
  ui: maintenance: fix disable msg field if no type is selected
  ui: maintenance: disable edit if unplugged
  pb-manager: add (un)mount command
  add auto-mounting for removable datastores
  api: mark removable datastores as unplugged after restart
  datastore: handle deletion of removable datastore properly

 debian/proxmox-backup-server.install        |   1 +
 debian/proxmox-backup-server.udev           |   3 +
 etc/Makefile                                |   3 +-
 etc/removable-device-attach@.service.in     |   8 +
 pbs-api-types/src/datastore.rs              |  40 ++++-
 pbs-api-types/src/maintenance.rs            |  35 +++-
 pbs-datastore/src/datastore.rs              |  28 +++-
 pbs-datastore/src/lib.rs                    |   2 +-
 src/api2/admin/datastore.rs                 | 175 +++++++++++++++++++-
 src/api2/config/datastore.rs                |  68 +++++++-
 src/api2/node/disks/mod.rs                  |   8 +
 src/api2/status.rs                          |  18 +-
 src/bin/proxmox-backup-api.rs               |  18 ++
 src/bin/proxmox_backup_manager/datastore.rs |  60 ++++++-
 src/tools/disks/mod.rs                      |  96 +++++++++--
 www/Makefile                                |   1 +
 www/NavigationTree.js                       |  10 +-
 www/Utils.js                                |  20 ++-
 www/css/ext6-pbs.css                        |  20 +++
 www/datastore/DataStoreListSummary.js       |   1 +
 www/datastore/Summary.js                    | 108 ++++++++++--
 www/form/PartitionSelector.js               |  59 +++++++
 www/window/DataStoreEdit.js                 |  47 ++++++
 www/window/MaintenanceOptions.js            |  16 +-
 24 files changed, 785 insertions(+), 60 deletions(-)
 create mode 100644 etc/removable-device-attach@.service.in
 create mode 100644 www/form/PartitionSelector.js

-- 
2.39.2





^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2023-09-21  8:42 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-15  6:54 [pbs-devel] [PATCH proxmox-backup 00/23] add removable datastores Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 01/23] tools: add disks utility functions Hannes Laimer
2023-09-19 13:37   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 02/23] pbs-api-types: add backing-device to DataStoreConfig Hannes Laimer
2023-09-19 13:37   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 03/23] maintenance: add 'Unpplugged' maintenance type Hannes Laimer
2023-09-19 13:37   ` Lukas Wagner
2023-09-21  7:41     ` Hannes Laimer
2023-09-21  8:16       ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 04/23] disks: add UUID to partition info Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 05/23] api2: admin: add (un)mount endpoint for removable datastores Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-21  7:50     ` Hannes Laimer
2023-09-21  8:37       ` Lukas Wagner
2023-09-21  8:41         ` Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 06/23] add helper for checking if a removable datastore is available Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 07/23] api2: removable datastore creation Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 08/23] ui: add partition selector form Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 09/23] api2: disks list: add only-unused flag Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 10/23] ui: add removable datastore creation support Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 11/23] ui: add (un)mount button to summary Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 12/23] pbs-api-types: datastore: use new proxmox_scheme::de for deserialization Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 13/23] pbs-api-types: add removable/is-available flag to DataStoreListItem Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 14/23] ui: display removable datastores in list Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 15/23] ui: utils: render unplugged maintenance mode correctly Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 16/23] ui: utils: make parseMaintenanceMode more robust Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 17/23] ui: add datastore status mask for unplugged removable datastores Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 18/23] ui: maintenance: fix disable msg field if no type is selected Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 19/23] ui: maintenance: disable edit if unplugged Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 20/23] pb-manager: add (un)mount command Hannes Laimer
2023-09-19 13:38   ` Lukas Wagner
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 21/23] add auto-mounting for removable datastores Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 22/23] api: mark removable datastores as unplugged after restart Hannes Laimer
2023-09-15  6:54 ` [pbs-devel] [PATCH proxmox-backup 23/23] datastore: handle deletion of removable datastore properly Hannes Laimer
2023-09-19 13:37 ` [pbs-devel] [PATCH proxmox-backup 00/23] add removable datastores Lukas Wagner
2023-09-19 15:01   ` Thomas Lamprecht
2023-09-19 15:08     ` Lukas Wagner
2023-09-20 10:22   ` Lukas Wagner
2023-09-19 14:03 ` Lukas Wagner
2023-09-19 15:10 ` Lukas Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal