]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Diskmanage.pm
Diskmanage: extend wearout detection for SAS disk
[pve-storage.git] / PVE / Diskmanage.pm
index a46cc739225efa24e6667ed2c8b28acb90ed0978..116a99a8e9037515ce340df21f45c2692ee18168 100644 (file)
@@ -134,8 +134,8 @@ sub get_smart_data {
            } elsif (defined($type) && $type eq 'text') {
                $smartdata->{text} = '' if !defined $smartdata->{text};
                $smartdata->{text} .= "$line\n";
-               # extract wearout from nvme text, allow for decimal values
-               if ($line =~ m/Percentage Used:\s*(\d+(?:\.\d+)?)\%/i) {
+               # extract wearout from nvme/sas text, allow for decimal values
+               if ($line =~ m/Percentage Used(?: endurance indicator)?:\s*(\d+(?:\.\d+)?)\%/i) {
                    $smartdata->{wearout} = 100 - $1;
                }
            } elsif ($line =~ m/SMART Disabled/) {