[pve-devel] [PATCH storage 08/14] Diskmanage: also detect BIOS boot, EFI and ZFS reserved type partitions
Fabian Ebner
f.ebner at proxmox.com
Tue Jan 26 12:45:24 CET 2021
as they are relevant to most PVE setups.
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
PVE/Diskmanage.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index 32789f2..b8ba498 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -613,6 +613,17 @@ sub get_disks {
return 'ZFS' if $zfshash->{$devpath};
my $info = $lsblk_info->{$devpath} // {};
+
+ my $parttype = $info->{parttype};
+ if (defined($parttype)) {
+ return 'BIOS boot'
+ if $parttype eq '21686148-6449-6e6f-744e-656564454649';
+ return 'EFI'
+ if $parttype eq 'c12a7328-f81f-11d2-ba4b-00a0c93ec93b';
+ return 'ZFS reserved'
+ if $parttype eq '6a945a3b-1dd2-11b2-99a6-080020736631';
+ }
+
my $fstype = $info->{fstype};
if (defined($fstype)) {
return "${fstype} (mounted)" if $mounted->{$devpath};
--
2.20.1
More information about the pve-devel
mailing list