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 83378689E2 for ; Fri, 10 Sep 2021 10:03:41 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7101010C6E for ; Fri, 10 Sep 2021 10:03:11 +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 id D931010C5F for ; Fri, 10 Sep 2021 10:03:10 +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 A87C04469D for ; Fri, 10 Sep 2021 10:03:10 +0200 (CEST) To: Thomas Lamprecht , Proxmox VE development discussion References: <20210907093055.39627-1-f.ebner@proxmox.com> From: Fabian Ebner Message-ID: Date: Fri, 10 Sep 2021 10:03:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 1.358 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 NICE_REPLY_A -1.975 Looks like a legit reply (A) 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. [zfs.pm] Subject: Re: [pve-devel] [PATCH storage] fix #3610: properly build ZFS detail tree 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, 10 Sep 2021 08:03:41 -0000 Am 09.09.21 um 18:24 schrieb Thomas Lamprecht: > On 07.09.21 11:30, Fabian Ebner wrote: >> Previously, top-level vdevs like log or special were wrongly added as >> children of the previous outer vdev instead of the root. >> >> Fix it by also showing the vdev with the same name as the pool and >> start counting from level 1 (the pool itself serves as the root and >> should be the only one with level 0). This results in the same kind >> of structure as in PBS and (except for the root) zpool status itself. >> >> Signed-off-by: Fabian Ebner >> --- >> PVE/API2/Disks/ZFS.pm | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/PVE/API2/Disks/ZFS.pm b/PVE/API2/Disks/ZFS.pm >> index 0418794..60077c4 100644 >> --- a/PVE/API2/Disks/ZFS.pm >> +++ b/PVE/API2/Disks/ZFS.pm >> @@ -240,8 +240,8 @@ __PACKAGE__->register_method ({ >> $config = 1; >> } elsif ($config && $line =~ m/^(\s+)(\S+)\s*(\S+)?(?:\s+(\S+)\s+(\S+)\s+(\S+))?\s*(.*)$/) { >> my ($space, $name, $state, $read, $write, $cksum, $msg) = ($1, $2, $3, $4, $5, $6, $7); >> - if ($name ne "NAME" and $name ne $param->{name}) { >> - my $lvl= int(length($space)/2); # two spaces per level >> + if ($name ne "NAME") { >> + my $lvl = int(length($space) / 2) + 1; # two spaces per level >> my $vdev = { >> name => $name, >> msg => $msg, >> > > hmm, I get the idea and can see how one could assert that this is more correct, > but as it is presented it'd be a bit more confusing too, IMO, as it does not > matches the zpool status CLI output anymore. > > I.e., the following (real): >> NAME STATE READ WRITE CKSUM >> zpt ONLINE 0 0 0 >> mirror-0 ONLINE 0 0 0 >> scsi-0QEMU_QEMU_HARDDISK_drive-scsi3 ONLINE 0 0 0 >> scsi-0QEMU_QEMU_HARDDISK_drive-scsi4 ONLINE 0 0 0 >> logs >> scsi-0QEMU_QEMU_HARDDISK_drive-scsi5 ONLINE 0 0 0 > > > Is suggested to be (adapted): >> NAME STATE READ WRITE CKSUM >> zpt ONLINE >> zpt ONLINE 0 0 0 >> mirror-0 ONLINE 0 0 0 >> scsi-0QEMU_QEMU_HARDDISK_drive-scsi3 ONLINE 0 0 0 >> scsi-0QEMU_QEMU_HARDDISK_drive-scsi4 ONLINE 0 0 0 >> logs >> scsi-0QEMU_QEMU_HARDDISK_drive-scsi5 ONLINE 0 0 0 > Is 'logs' aligned with the outer 'zpt' or the inner 'zpt'? It's intended to be the inner one, but in the mail it looks like the outer one to me. > > How about hiding the root in the devices tree and add a line to the > KV grid above instead? E.g., something that would then render: > > Pool () > > That can be a GUI change only, did not really checked implementation details, but > I'd like to clear that up before applying this patch. > I suppose that should be done for PBS too then? And PVE should switch to using the ZFSDetail window from widget-toolkit?