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

Aaron Lauterer a.lauterer at proxmox.com
Fri Jul 15 13:58:05 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 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 | 19 +++++---
 PVE/API2/Disks/LVM.pm       | 11 +++--
 PVE/API2/Disks/LVMThin.pm   | 11 +++--
 PVE/API2/Disks/ZFS.pm       | 86 +++++++++++++++++++++----------------
 PVE/API2/Storage/Config.pm  | 22 ++++++++++
 PVE/Diskmanage.pm           | 12 ++++++
 PVE/Storage.pm              | 27 ++++++++++++
 7 files changed, 138 insertions(+), 50 deletions(-)


More information about the pve-devel mailing list