[pve-devel] [PATCH storage] diskmanage: improve setting usage for whole disk with include-partitions
Fabian Ebner
f.ebner at proxmox.com
Fri Apr 16 12:34:50 CEST 2021
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 at 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
More information about the pve-devel
mailing list