]> git.proxmox.com Git - pve-storage.git/commitdiff
Diskmanage: also detect BIOS boot, EFI and ZFS reserved type partitions
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 26 Jan 2021 11:45:24 +0000 (12:45 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 6 Feb 2021 12:52:20 +0000 (13:52 +0100)
as they are relevant to most PVE setups.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Diskmanage.pm

index 431316122bf0078ffaeb3c754a4fa5d117221f5d..13b544c6baeda000163f9bf292c73962c9504e88 100644 (file)
@@ -612,6 +612,17 @@ sub get_disks {
            return 'ZFS' if $zfshash->{$devpath};
 
            my $info = $lsblk_info->{$devpath} // {};
            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};
            my $fstype = $info->{fstype};
            if (defined($fstype)) {
                return "${fstype} (mounted)" if $mounted->{$devpath};