[pve-devel] [PATCH storage v3 0/3] disks: add checks, allow add_storage on other nodes

Aaron Lauterer a.lauterer at proxmox.com
Fri Aug 19 17:01:18 CEST 2022


This series deals mainly with 2 things, adding more checks prior to
actually setting up a new local storage to avoid leaving behind half
provisioned disks in case a storage (lvm, zfs, ...) of the same name
already exists.
Secondly, to change the behavior regarding the "Add Storage" flag. It
allows to keep in enabled and will create the local storage and add the
node to the nodes list of the PVE storage config if there already exists
one in the cluster.

The first patch is a prerequisite to be able to check if a mount path
for the Directory storage type is already mounted.
The second patch implements the actual checks.
The third patch adds the changed behavior for the "Add Storage" part.

More in the actual patches.

changes since
v2:
- add comments about return value
- moved VGs checks into worker
- moved storage parameter checks into create_or_update with dry run
option

v1:
- recommended changes by Dominik & Fabian E
- some lines were in the wrong patches due to some mistakes during
reordering the patches

Aaron Lauterer (3):
  diskmanage: add mounted_paths
  disks: die if storage name is already in use
  disks: allow add_storage for already configured local storage

 PVE/API2/Disks/Directory.pm |  49 +++++++++++-----
 PVE/API2/Disks/LVM.pm       |  39 +++++++++----
 PVE/API2/Disks/LVMThin.pm   |  40 +++++++++----
 PVE/API2/Disks/ZFS.pm       | 113 ++++++++++++++++++++++--------------
 PVE/API2/Storage/Config.pm  |  51 ++++++++++++++++
 PVE/Diskmanage.pm           |  13 +++++
 6 files changed, 224 insertions(+), 81 deletions(-)

-- 
2.30.2






More information about the pve-devel mailing list