public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [SERIES proxmox-backup/proxmox/widget-toolkit 00/28] add removable datastore support
@ 2022-07-05 13:08 Hannes Laimer
  2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-widget-toolkit 1/1] proxy: allow setting of reader config Hannes Laimer
                   ` (27 more replies)
  0 siblings, 28 replies; 42+ messages in thread
From: Hannes Laimer @ 2022-07-05 13:08 UTC (permalink / raw)
  To: pbs-devel

Adds removable-device which has 
 * _unique_ 'name'
 * _unique_ 'uuid'
 * 'initialized': true if the chunkstore is already created on the
    device, if false, it will be created the next time it is mounted
 * 'store': the datastore the device is associated with, the path of the
    datastore will be used as a mountpoint for this removable-device

When a new datastore is created it has to be makred as 'removable', if
it is marked as removable the creation of the chunkstore is skipped.
After the creation a removable datastore has no remoavbale-devices
associated with with.

When creating a new removable-device a name, uuid and store have to be
provided, by default a removable device is not initialized. If a device
already contains a chunkstore (possibly created on a different PBS)
initialized has to be set to true.

Unmounting a removable-device puts the associated datastore in
'unplugged' maintenance mode, but it is only really unplugged after all
already started reading and writing operations to the datastore are
finished. The 'unplugged' maintenance mode prevents the start of reading
and writing operations to the datastore, the only way to change the
maintenance mode from 'unplugged' to something else is by mounting(not
mount, but through PBS) a removable-device associated with the
datastore.

Mounting a removable-device device
 1. if nothing else is already mounted there
  -> mount
  otherwise bail!
 2. if removable device has to be initialized
  -> create chunckstore
 3. maintenance mode is changed from 'unplugged' to none.

UI-wise this series adds icons specific to datastores that are marked as
removable, removable-devices behave very similar to sync/prune jobs in
the UI. One grid with all the removable-devices and a grid per datastore
only containing the removable-devices associated to the current
datastore.

Since the maintenance mode has to be changed 'in code' and not just
through the API, the print_property_string function is add to schema.

WIP:
 * list of jobs(per removable-device) that should be triggert when the removable-device
   is mounted mounted.

The patches for proxmox-backup depends on the changes in proxmox and in
proxmox-widget-toolkit. Version bump needed.
(patch 19 needs the changes in proxmox-widget-toolkit)
(patches >=6 need the changes in proxmox)

Since the maintenance mode has to be changed 'in code' and not just
through the API, the print_property_string function is add to schema.

* proxmox
Hannes Laimer (1):
  schema: add print_property_string function

 proxmox-schema/src/schema.rs | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)


* proxmox-widget-toolkit
Hannes Laimer (1):
  proxy: allow setting of reader config

 src/data/ProxmoxProxy.js | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)


* proxmox-backup
Hannes Laimer (26):
  api-types: add RemovableDeviceConfig
  config: make RemovableDeviceConfig savable to config file
  api-types: add "removable" field to DataStoreConfig
  api2: add config endpoints for RemovableDeviceConfig
  api-types: add "unplugged" maintenance type
  api-types: add set_maintenance_mode function to DataStoreConfig
  api2: datastore create: don't init chunkstore if removable
  tools: disks: add mount and unmount helper
  api2: admin: add unmount-device endpoint to datastore
  api2: admin: add mount-device and list endpoint for RemavableDevices
  tools: disks: add uuid to PrtitionInfo
  api-types: add "removable" to DataStoreListItem
  ui: utils: remove parseMaintenanceMode function
  ui: maintenance edit: disable description in maintenance edit if no
    type is selected
  ui: config: add RemovableDeviceView
  ui: add "no removable device present" mask to summary
  ui: add removable datastore specific icons to list
  ui: window: add RemovableDeviceEdit
  ui: form: add PartitionSelector
  ui: add "removable" checkbox to datastore edit
  ui: disable maintenance update while removable datastore is unplugged
  ui: datstore selector: add icon for removable datastores
  api2: admin: add mount-device endpoint that just takes an UUID
  cli: manager: add removable-device commands
  debian/etc: add udev rules and simple service for automounting
  api: mark all removable datastores as 'unplugged' after restart

 debian/proxmox-backup-server.install          |   1 +
 debian/proxmox-backup-server.udev             |   3 +
 etc/Makefile                                  |   3 +-
 etc/removable-device-attach@.service.in       |   6 +
 pbs-api-types/src/datastore.rs                |  26 ++
 pbs-api-types/src/lib.rs                      |   3 +
 pbs-api-types/src/maintenance.rs              |  16 +-
 pbs-api-types/src/removable_device.rs         |  79 +++++
 pbs-config/src/lib.rs                         |   1 +
 pbs-config/src/removable_device.rs            |  63 ++++
 pbs-datastore/src/datastore.rs                |   2 +-
 src/api2/admin/datastore.rs                   |  98 +++++-
 src/api2/admin/mod.rs                         |   6 +
 src/api2/admin/removable_device.rs            | 283 +++++++++++++++++
 src/api2/config/datastore.rs                  |  52 +++-
 src/api2/config/mod.rs                        |   2 +
 src/api2/config/removable_device.rs           | 284 ++++++++++++++++++
 src/bin/proxmox-backup-api.rs                 |  15 +
 src/bin/proxmox-backup-manager.rs             |   1 +
 src/bin/proxmox_backup_manager/mod.rs         |   2 +
 .../removable_device.rs                       | 209 +++++++++++++
 src/tools/disks/mod.rs                        |  27 +-
 www/Makefile                                  |   3 +
 www/NavigationTree.js                         |  19 +-
 www/Utils.js                                  |  27 +-
 www/config/RemovableDeviceView.js             | 211 +++++++++++++
 www/css/ext6-pbs.css                          |  29 ++
 www/datastore/DataStoreList.js                |   5 +
 www/datastore/Panel.js                        |   9 +
 www/datastore/Summary.js                      |  17 +-
 www/form/DataStoreSelector.js                 |   3 +
 www/form/PartitionSelector.js                 |  61 ++++
 www/window/DataStoreEdit.js                   |  10 +
 www/window/MaintenanceOptions.js              |  23 +-
 www/window/RemovableDeviceEdit.js             |  76 +++++
 35 files changed, 1614 insertions(+), 61 deletions(-)
 create mode 100644 etc/removable-device-attach@.service.in
 create mode 100644 pbs-api-types/src/removable_device.rs
 create mode 100644 pbs-config/src/removable_device.rs
 create mode 100644 src/api2/admin/removable_device.rs
 create mode 100644 src/api2/config/removable_device.rs
 create mode 100644 src/bin/proxmox_backup_manager/removable_device.rs
 create mode 100644 www/config/RemovableDeviceView.js
 create mode 100644 www/form/PartitionSelector.js
 create mode 100644 www/window/RemovableDeviceEdit.js

-- 
2.30.2





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

end of thread, other threads:[~2022-07-29  9:24 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05 13:08 [pbs-devel] [SERIES proxmox-backup/proxmox/widget-toolkit 00/28] add removable datastore support Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-widget-toolkit 1/1] proxy: allow setting of reader config Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox 1/1] schema: add print_property_string function Hannes Laimer
2022-07-06 11:31   ` Wolfgang Bumiller
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 01/26] api-types: add RemovableDeviceConfig Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 02/26] config: make RemovableDeviceConfig savable to config file Hannes Laimer
2022-07-06 11:33   ` Wolfgang Bumiller
2022-07-06 11:44     ` Thomas Lamprecht
2022-07-07  8:35       ` Hannes Laimer
2022-07-29  8:26         ` Thomas Lamprecht
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 03/26] api-types: add "removable" field to DataStoreConfig Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 04/26] api2: add config endpoints for RemovableDeviceConfig Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 05/26] api-types: add "unplugged" maintenance type Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 06/26] api-types: add set_maintenance_mode function to DataStoreConfig Hannes Laimer
2022-07-06 11:40   ` Wolfgang Bumiller
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 07/26] api2: datastore create: don't init chunkstore if removable Hannes Laimer
2022-07-06 11:35   ` Wolfgang Bumiller
2022-07-07  9:06     ` Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 08/26] tools: disks: add mount and unmount helper Hannes Laimer
2022-07-06 11:42   ` Wolfgang Bumiller
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 09/26] api2: admin: add unmount-device endpoint to datastore Hannes Laimer
2022-07-06 11:43   ` Wolfgang Bumiller
2022-07-07  9:11     ` Hannes Laimer
2022-07-29  9:24       ` Wolfgang Bumiller
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 10/26] api2: admin: add mount-device and list endpoint for RemavableDevices Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 11/26] tools: disks: add uuid to PrtitionInfo Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 12/26] api-types: add "removable" to DataStoreListItem Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 13/26] ui: utils: remove parseMaintenanceMode function Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 14/26] ui: maintenance edit: disable description in maintenance edit if no type is selected Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 15/26] ui: config: add RemovableDeviceView Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 16/26] ui: add "no removable device present" mask to summary Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 17/26] ui: add removable datastore specific icons to list Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 18/26] ui: window: add RemovableDeviceEdit Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 19/26] ui: form: add PartitionSelector Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 20/26] ui: add "removable" checkbox to datastore edit Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 21/26] ui: disable maintenance update while removable datastore is unplugged Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 22/26] ui: datstore selector: add icon for removable datastores Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 23/26] api2: admin: add mount-device endpoint that just takes an UUID Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 24/26] cli: manager: add removable-device commands Hannes Laimer
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 25/26] debian/etc: add udev rules and simple service for automounting Hannes Laimer
2022-07-06 11:49   ` Wolfgang Bumiller
2022-07-05 13:08 ` [pbs-devel] [PATCH proxmox-backup 26/26] api: mark all removable datastores as 'unplugged' after restart Hannes Laimer

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