all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH storage] diskmanage: improve setting usage for whole disk with include-partitions
@ 2021-04-16 10:34 Fabian Ebner
  2021-04-16 10:52 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2021-04-16 10:34 UTC (permalink / raw)
  To: pve-devel

in case a disk with partitions also has an fstype set, which happens for our ZFS
boot disks. Do not change the behavior without include-partitons, as we
prefer(red) to be more specific than simply 'partitions' then.

Reported in the enterprise support channel.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 PVE/Diskmanage.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index 64bb813..853d333 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -713,6 +713,9 @@ sub get_disks {
 		next if $partitions->{$part}->{used} eq 'partition';
 		$used //= $partitions->{$part}->{used};
 	    }
+	} else {
+	    # fstype might be set even if there are partitions, but showing that is confusing
+	    $used = 'partitions' if scalar(keys %{$partitions});
 	}
 	$used //= 'partitions' if scalar(keys %{$partitions});
 	# multipath, software raid, etc.
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH storage] diskmanage: improve setting usage for whole disk with include-partitions
  2021-04-16 10:34 [pve-devel] [PATCH storage] diskmanage: improve setting usage for whole disk with include-partitions Fabian Ebner
@ 2021-04-16 10:52 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-04-16 10:52 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Ebner

On 16.04.21 12:34, Fabian Ebner wrote:
> in case a disk with partitions also has an fstype set, which happens for our ZFS
> boot disks. Do not change the behavior without include-partitons, as we
> prefer(red) to be more specific than simply 'partitions' then.
> 
> Reported in the enterprise support channel.
> 
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>  PVE/Diskmanage.pm | 3 +++
>  1 file changed, 3 insertions(+)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-16 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 10:34 [pve-devel] [PATCH storage] diskmanage: improve setting usage for whole disk with include-partitions Fabian Ebner
2021-04-16 10:52 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal