diskmanage: improve setting usage for whole disk with include-partitions

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>
This commit is contained in:
Fabian Ebner
2021-04-16 12:34:50 +02:00
committed by Thomas Lamprecht
parent 1ebd925dcf
commit 415dc3985d

View File

@ -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.