From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path: <f.ebner@proxmox.com>
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 BFE766B39F
for <pve-devel@lists.proxmox.com>; Tue, 26 Jan 2021 12:45:38 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
by firstgate.proxmox.com (Proxmox) with ESMTP id B4A7815A17
for <pve-devel@lists.proxmox.com>; Tue, 26 Jan 2021 12:45:38 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
[212.186.127.180])
(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 id 5DD2F15956
for <pve-devel@lists.proxmox.com>; Tue, 26 Jan 2021 12:45:35 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1EC7A4611A
for <pve-devel@lists.proxmox.com>; Tue, 26 Jan 2021 12:45:35 +0100 (CET)
From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Tue, 26 Jan 2021 12:45:16 +0100
Message-Id: <20210126114530.8753-1-f.ebner@proxmox.com>
X-Mailer: git-send-email 2.20.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results: 0
AWL -0.007 Adjusted score from AWL reputation of From: address
KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/,
medium trust
SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record
SPF_PASS -0.001 SPF: sender matches SPF record
URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
information. [ceph.pm, diskmanage.pm, disks.pm]
Subject: [pve-devel] [PATCH-SERIES] partially fix #2285: extend Diskmanage
to also list partitions
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>,
<mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>,
<mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Tue, 26 Jan 2021 11:45:38 -0000
and fix some other little things along the way (see patches #1, #4, #9).
Mostly re-uses existing functionality, but refactors it, so it can be re-used
for partitions as well. New is the detection of filesystems via lsblk and the
detection of more PVE-relevant partuuids.
In the UI, the current list is replaced by a treepanel including the partitions.
This series does not yet make it possible to select partitons for storage
creation for certain types, which is one of the parts of bug #2285. I felt
like this series was getting rather big already and that there was more
discussion to be had about that and it can always be done as a follow-up series.
The usage of a partition currently always defaults to 'partition'. A good
heuristic to find out when a partition is unused would be needed and/or good
ways to warn the user and ask if they're sure they have the correct partition.
This also ties in to the proposed feature of allowing users to wipe disks under
certain conditions.
storage:
Fabian Ebner (11):
Disks: return correct journal disk candidates
Diskmanage: replace closure with direct hash access
Diskmanage: refactor and rename get_parttype_info
Diskmanage: also check for filesystem type when determining usage
Diskmanage: introduce get_sysdir_size helper
Diskmanage: collect partitions in hash
Diskmanage: introduce usage helper
Diskmanage: also detect BIOS boot, EFI and ZFS reserved type
partitions
Diskmanage: introduce ceph info helper
Diskmanage: save OSD information for individual partitions
Diskmanage: also include partitions with get_disks if flag is set
PVE/API2/Disks.pm | 24 +-
PVE/Diskmanage.pm | 207 +++++++++++-------
test/disk_tests/usages/disklist | 1 +
test/disk_tests/usages/disklist_expected.json | 15 ++
test/disk_tests/usages/lsblk | 7 +-
test/disk_tests/usages/sdd/sdd1/size | 1 +
test/disk_tests/usages/sdd/sdd2/size | 1 +
test/disk_tests/usages/sde/sde1/size | 1 +
test/disk_tests/usages/sdf/sdf1/size | 1 +
test/disk_tests/usages/sdm/sdm1/size | 1 +
test/disk_tests/usages/sdm/sdm9/size | 1 +
test/disk_tests/usages/sdn/device/vendor | 1 +
test/disk_tests/usages/sdn/queue/rotational | 1 +
test/disk_tests/usages/sdn/size | 1 +
test/disk_tests/usages/sdn_udevadm | 14 ++
test/disklist_test.pm | 12 +
16 files changed, 207 insertions(+), 82 deletions(-)
create mode 100644 test/disk_tests/usages/sdd/sdd1/size
create mode 100644 test/disk_tests/usages/sdd/sdd2/size
create mode 100644 test/disk_tests/usages/sde/sde1/size
create mode 100644 test/disk_tests/usages/sdf/sdf1/size
create mode 100644 test/disk_tests/usages/sdm/sdm1/size
create mode 100644 test/disk_tests/usages/sdm/sdm9/size
create mode 100644 test/disk_tests/usages/sdn/device/vendor
create mode 100644 test/disk_tests/usages/sdn/queue/rotational
create mode 100644 test/disk_tests/usages/sdn/size
create mode 100644 test/disk_tests/usages/sdn_udevadm
manager:
Fabian Ebner (1):
api: Ceph: add reminder to remove 'disks' call
PVE/API2/Ceph.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
widget-toolkit:
Fabian Ebner (2):
convert disk list to disk tree including the partitions
move DiskList.js from grid/ to panel/
src/Makefile | 2 +-
src/{grid => panel}/DiskList.js | 97 ++++++++++++++++++++++++++-------
2 files changed, 79 insertions(+), 20 deletions(-)
rename src/{grid => panel}/DiskList.js (72%)
--
2.20.1