From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 52A547C4BE for ; Fri, 15 Jul 2022 13:58:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 496E027CCA for ; Fri, 15 Jul 2022 13:58:10 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 15 Jul 2022 13:58:09 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 7B93243148 for ; Fri, 15 Jul 2022 13:58:09 +0200 (CEST) From: Aaron Lauterer To: pve-devel@lists.proxmox.com Date: Fri, 15 Jul 2022 13:58:05 +0200 Message-Id: <20220715115808.1385388-1-a.lauterer@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.017 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH storage v2 0/3] disks: add checks, allow add_storage on other nodes X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2022 11:58:40 -0000 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(-) -- 2.30.2