[pve-devel] [RFC v2 storage] smartctl: use json parsing
Oguz Bektas
o.bektas at proxmox.com
Tue Mar 30 14:23:10 CEST 2021
adapt the smartctl endpoint to run smartctl with the --json or -j flag
to parse it more reasonably.
additionally add the $format parameter, one can choose between 'text'
and 'json' outputs in the API (only relevant for nvme devices, since for
API backwards compatibility we have to keep the 'text' field)
for the unit tests we need to collect the smartctl json outputs from
now. the current tests cover ssd_smart and nvme_smart cases.
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
NOTE: i deleted the rest of the tests so this builds properly with
the unit tests passing. but i could still keep the old outputs and place
the new ones with a new naming scheme, and adapt the
disklist_test.pm to read those instead. i'm open for ideas.
though applying this should result in make'able and working package
PVE/API2/Disks.pm | 9 +-
PVE/Diskmanage.pm | 113 ++---
test/disk_tests/cciss/cciss!c0d0/device/model | 1 -
.../disk_tests/cciss/cciss!c0d0/device/vendor | 1 -
.../cciss/cciss!c0d0/queue/rotational | 1 -
test/disk_tests/cciss/cciss!c0d0/size | 1 -
test/disk_tests/cciss/cciss!c0d0_udevadm | 32 --
test/disk_tests/cciss/disklist | 1 -
test/disk_tests/cciss/disklist_expected.json | 16 -
test/disk_tests/hdd_smart/disklist | 2 -
.../hdd_smart/disklist_expected.json | 30 --
test/disk_tests/hdd_smart/sda/device/vendor | 1 -
.../disk_tests/hdd_smart/sda/queue/rotational | 1 -
test/disk_tests/hdd_smart/sda/size | 1 -
test/disk_tests/hdd_smart/sda_health | 5 -
test/disk_tests/hdd_smart/sda_smart | 40 --
.../hdd_smart/sda_smart_expected.json | 246 -----------
test/disk_tests/hdd_smart/sda_udevadm | 11 -
test/disk_tests/hdd_smart/sdb/device/vendor | 1 -
.../disk_tests/hdd_smart/sdb/queue/rotational | 1 -
test/disk_tests/hdd_smart/sdb/size | 1 -
test/disk_tests/hdd_smart/sdb_health | 5 -
test/disk_tests/hdd_smart/sdb_smart | 36 --
.../hdd_smart/sdb_smart_expected.json | 216 ----------
test/disk_tests/hdd_smart/sdb_udevadm | 11 -
test/disk_tests/nvme_smart/nvme0_smart | 83 +++-
.../nvme_smart/nvme0n1_smart_expected.json | 2 +-
test/disk_tests/sas/disklist | 1 -
test/disk_tests/sas/disklist_expected.json | 17 -
test/disk_tests/sas/sda/device/model | 1 -
test/disk_tests/sas/sda/device/vendor | 1 -
test/disk_tests/sas/sda/queue/rotational | 1 -
test/disk_tests/sas/sda/size | 1 -
test/disk_tests/sas/sda_smart | 20 -
test/disk_tests/sas/sda_smart_expected.json | 6 -
test/disk_tests/sas/sda_udevadm | 31 --
test/disk_tests/sas_ssd/disklist | 1 -
.../disk_tests/sas_ssd/disklist_expected.json | 17 -
test/disk_tests/sas_ssd/sda/device/model | 1 -
test/disk_tests/sas_ssd/sda/device/vendor | 1 -
test/disk_tests/sas_ssd/sda/queue/rotational | 1 -
test/disk_tests/sas_ssd/sda/size | 1 -
test/disk_tests/sas_ssd/sda_smart | 20 -
.../sas_ssd/sda_smart_expected.json | 6 -
test/disk_tests/sas_ssd/sda_udevadm | 31 --
test/disk_tests/ssd_smart/disklist | 4 -
.../ssd_smart/disklist_expected.json | 60 +--
test/disk_tests/ssd_smart/sda_smart | 391 ++++++++++++++++--
.../ssd_smart/sda_smart_expected.json | 378 +++++++----------
test/disk_tests/ssd_smart/sda_udevadm | 4 +-
test/disk_tests/ssd_smart/sdb/device/vendor | 1 -
.../disk_tests/ssd_smart/sdb/queue/rotational | 1 -
test/disk_tests/ssd_smart/sdb/size | 1 -
test/disk_tests/ssd_smart/sdb_smart | 41 --
.../ssd_smart/sdb_smart_expected.json | 256 ------------
test/disk_tests/ssd_smart/sdb_udevadm | 12 -
test/disk_tests/ssd_smart/sdc/device/vendor | 1 -
.../disk_tests/ssd_smart/sdc/queue/rotational | 1 -
test/disk_tests/ssd_smart/sdc/size | 1 -
test/disk_tests/ssd_smart/sdc_smart | 16 -
.../ssd_smart/sdc_smart_expected.json | 16 -
test/disk_tests/ssd_smart/sdc_udevadm | 11 -
test/disk_tests/ssd_smart/sdd/device/vendor | 1 -
.../disk_tests/ssd_smart/sdd/queue/rotational | 1 -
test/disk_tests/ssd_smart/sdd/size | 1 -
test/disk_tests/ssd_smart/sdd_smart | 40 --
.../ssd_smart/sdd_smart_expected.json | 256 ------------
test/disk_tests/ssd_smart/sdd_udevadm | 11 -
test/disk_tests/ssd_smart/sde/device/vendor | 1 -
.../disk_tests/ssd_smart/sde/queue/rotational | 1 -
test/disk_tests/ssd_smart/sde/size | 1 -
test/disk_tests/ssd_smart/sde_smart | 40 --
.../ssd_smart/sde_smart_expected.json | 246 -----------
test/disk_tests/ssd_smart/sde_udevadm | 11 -
test/disk_tests/usages/disklist | 14 -
test/disk_tests/usages/disklist_expected.json | 222 ----------
test/disk_tests/usages/lsblk | 8 -
test/disk_tests/usages/lvs | 6 -
test/disk_tests/usages/mounts | 2 -
test/disk_tests/usages/partlist | 6 -
test/disk_tests/usages/pvs | 7 -
test/disk_tests/usages/sda/device/vendor | 1 -
test/disk_tests/usages/sda/queue/rotational | 1 -
test/disk_tests/usages/sda/size | 1 -
test/disk_tests/usages/sda_udevadm | 12 -
test/disk_tests/usages/sdb/device/vendor | 1 -
test/disk_tests/usages/sdb/queue/rotational | 1 -
test/disk_tests/usages/sdb/size | 1 -
test/disk_tests/usages/sdb_udevadm | 12 -
test/disk_tests/usages/sdc/device/vendor | 1 -
test/disk_tests/usages/sdc/queue/rotational | 1 -
test/disk_tests/usages/sdc/size | 1 -
test/disk_tests/usages/sdc_udevadm | 12 -
test/disk_tests/usages/sdd/device/vendor | 1 -
test/disk_tests/usages/sdd/queue/rotational | 1 -
test/disk_tests/usages/sdd/sdd1/size | 1 -
test/disk_tests/usages/sdd/sdd2/size | 1 -
test/disk_tests/usages/sdd/size | 1 -
test/disk_tests/usages/sdd_udevadm | 12 -
test/disk_tests/usages/sde/device/vendor | 1 -
test/disk_tests/usages/sde/queue/rotational | 1 -
test/disk_tests/usages/sde/sde1/size | 1 -
test/disk_tests/usages/sde/size | 1 -
test/disk_tests/usages/sde_udevadm | 12 -
test/disk_tests/usages/sdf/device/vendor | 1 -
test/disk_tests/usages/sdf/queue/rotational | 1 -
test/disk_tests/usages/sdf/sdf1/size | 1 -
test/disk_tests/usages/sdf/size | 1 -
test/disk_tests/usages/sdf_udevadm | 12 -
test/disk_tests/usages/sdg/device/vendor | 1 -
test/disk_tests/usages/sdg/queue/rotational | 1 -
test/disk_tests/usages/sdg/size | 1 -
test/disk_tests/usages/sdg_udevadm | 12 -
test/disk_tests/usages/sdh/device/vendor | 1 -
test/disk_tests/usages/sdh/queue/rotational | 1 -
test/disk_tests/usages/sdh/size | 1 -
test/disk_tests/usages/sdh_udevadm | 12 -
test/disk_tests/usages/sdi/device/vendor | 1 -
test/disk_tests/usages/sdi/queue/rotational | 1 -
test/disk_tests/usages/sdi/size | 1 -
test/disk_tests/usages/sdi_udevadm | 12 -
test/disk_tests/usages/sdj/device/vendor | 1 -
test/disk_tests/usages/sdj/queue/rotational | 1 -
test/disk_tests/usages/sdj/size | 1 -
test/disk_tests/usages/sdj_udevadm | 12 -
test/disk_tests/usages/sdk/device/vendor | 1 -
test/disk_tests/usages/sdk/queue/rotational | 1 -
test/disk_tests/usages/sdk/size | 1 -
test/disk_tests/usages/sdk_udevadm | 12 -
test/disk_tests/usages/sdl/device/vendor | 1 -
test/disk_tests/usages/sdl/queue/rotational | 1 -
test/disk_tests/usages/sdl/size | 1 -
test/disk_tests/usages/sdl_udevadm | 12 -
test/disk_tests/usages/sdm/device/vendor | 1 -
test/disk_tests/usages/sdm/queue/rotational | 1 -
test/disk_tests/usages/sdm/sdm1/size | 1 -
test/disk_tests/usages/sdm/sdm9/size | 1 -
test/disk_tests/usages/sdm/size | 1 -
test/disk_tests/usages/sdm_udevadm | 12 -
test/disk_tests/usages/sdn/device/vendor | 1 -
test/disk_tests/usages/sdn/queue/rotational | 1 -
test/disk_tests/usages/sdn/size | 1 -
test/disk_tests/usages/sdn_udevadm | 14 -
test/disk_tests/usages/zpool | 6 -
test/disklist_test.pm | 4 +-
145 files changed, 629 insertions(+), 2695 deletions(-)
delete mode 100644 test/disk_tests/cciss/cciss!c0d0/device/model
delete mode 100644 test/disk_tests/cciss/cciss!c0d0/device/vendor
delete mode 100644 test/disk_tests/cciss/cciss!c0d0/queue/rotational
delete mode 100644 test/disk_tests/cciss/cciss!c0d0/size
delete mode 100644 test/disk_tests/cciss/cciss!c0d0_udevadm
delete mode 100644 test/disk_tests/cciss/disklist
delete mode 100644 test/disk_tests/cciss/disklist_expected.json
delete mode 100644 test/disk_tests/hdd_smart/disklist
delete mode 100644 test/disk_tests/hdd_smart/disklist_expected.json
delete mode 100644 test/disk_tests/hdd_smart/sda/device/vendor
delete mode 100644 test/disk_tests/hdd_smart/sda/queue/rotational
delete mode 100644 test/disk_tests/hdd_smart/sda/size
delete mode 100644 test/disk_tests/hdd_smart/sda_health
delete mode 100644 test/disk_tests/hdd_smart/sda_smart
delete mode 100644 test/disk_tests/hdd_smart/sda_smart_expected.json
delete mode 100644 test/disk_tests/hdd_smart/sda_udevadm
delete mode 100644 test/disk_tests/hdd_smart/sdb/device/vendor
delete mode 100644 test/disk_tests/hdd_smart/sdb/queue/rotational
delete mode 100644 test/disk_tests/hdd_smart/sdb/size
delete mode 100644 test/disk_tests/hdd_smart/sdb_health
delete mode 100644 test/disk_tests/hdd_smart/sdb_smart
delete mode 100644 test/disk_tests/hdd_smart/sdb_smart_expected.json
delete mode 100644 test/disk_tests/hdd_smart/sdb_udevadm
delete mode 100644 test/disk_tests/sas/disklist
delete mode 100644 test/disk_tests/sas/disklist_expected.json
delete mode 100644 test/disk_tests/sas/sda/device/model
delete mode 100644 test/disk_tests/sas/sda/device/vendor
delete mode 100644 test/disk_tests/sas/sda/queue/rotational
delete mode 100644 test/disk_tests/sas/sda/size
delete mode 100644 test/disk_tests/sas/sda_smart
delete mode 100644 test/disk_tests/sas/sda_smart_expected.json
delete mode 100644 test/disk_tests/sas/sda_udevadm
delete mode 100644 test/disk_tests/sas_ssd/disklist
delete mode 100644 test/disk_tests/sas_ssd/disklist_expected.json
delete mode 100644 test/disk_tests/sas_ssd/sda/device/model
delete mode 100644 test/disk_tests/sas_ssd/sda/device/vendor
delete mode 100644 test/disk_tests/sas_ssd/sda/queue/rotational
delete mode 100644 test/disk_tests/sas_ssd/sda/size
delete mode 100644 test/disk_tests/sas_ssd/sda_smart
delete mode 100644 test/disk_tests/sas_ssd/sda_smart_expected.json
delete mode 100644 test/disk_tests/sas_ssd/sda_udevadm
delete mode 100644 test/disk_tests/ssd_smart/sdb/device/vendor
delete mode 100644 test/disk_tests/ssd_smart/sdb/queue/rotational
delete mode 100644 test/disk_tests/ssd_smart/sdb/size
delete mode 100644 test/disk_tests/ssd_smart/sdb_smart
delete mode 100644 test/disk_tests/ssd_smart/sdb_smart_expected.json
delete mode 100644 test/disk_tests/ssd_smart/sdb_udevadm
delete mode 100644 test/disk_tests/ssd_smart/sdc/device/vendor
delete mode 100644 test/disk_tests/ssd_smart/sdc/queue/rotational
delete mode 100644 test/disk_tests/ssd_smart/sdc/size
delete mode 100644 test/disk_tests/ssd_smart/sdc_smart
delete mode 100644 test/disk_tests/ssd_smart/sdc_smart_expected.json
delete mode 100644 test/disk_tests/ssd_smart/sdc_udevadm
delete mode 100644 test/disk_tests/ssd_smart/sdd/device/vendor
delete mode 100644 test/disk_tests/ssd_smart/sdd/queue/rotational
delete mode 100644 test/disk_tests/ssd_smart/sdd/size
delete mode 100644 test/disk_tests/ssd_smart/sdd_smart
delete mode 100644 test/disk_tests/ssd_smart/sdd_smart_expected.json
delete mode 100644 test/disk_tests/ssd_smart/sdd_udevadm
delete mode 100644 test/disk_tests/ssd_smart/sde/device/vendor
delete mode 100644 test/disk_tests/ssd_smart/sde/queue/rotational
delete mode 100644 test/disk_tests/ssd_smart/sde/size
delete mode 100644 test/disk_tests/ssd_smart/sde_smart
delete mode 100644 test/disk_tests/ssd_smart/sde_smart_expected.json
delete mode 100644 test/disk_tests/ssd_smart/sde_udevadm
delete mode 100644 test/disk_tests/usages/disklist
delete mode 100644 test/disk_tests/usages/disklist_expected.json
delete mode 100644 test/disk_tests/usages/lsblk
delete mode 100644 test/disk_tests/usages/lvs
delete mode 100644 test/disk_tests/usages/mounts
delete mode 100644 test/disk_tests/usages/partlist
delete mode 100644 test/disk_tests/usages/pvs
delete mode 100644 test/disk_tests/usages/sda/device/vendor
delete mode 100644 test/disk_tests/usages/sda/queue/rotational
delete mode 100644 test/disk_tests/usages/sda/size
delete mode 100644 test/disk_tests/usages/sda_udevadm
delete mode 100644 test/disk_tests/usages/sdb/device/vendor
delete mode 100644 test/disk_tests/usages/sdb/queue/rotational
delete mode 100644 test/disk_tests/usages/sdb/size
delete mode 100644 test/disk_tests/usages/sdb_udevadm
delete mode 100644 test/disk_tests/usages/sdc/device/vendor
delete mode 100644 test/disk_tests/usages/sdc/queue/rotational
delete mode 100644 test/disk_tests/usages/sdc/size
delete mode 100644 test/disk_tests/usages/sdc_udevadm
delete mode 100644 test/disk_tests/usages/sdd/device/vendor
delete mode 100644 test/disk_tests/usages/sdd/queue/rotational
delete mode 100644 test/disk_tests/usages/sdd/sdd1/size
delete mode 100644 test/disk_tests/usages/sdd/sdd2/size
delete mode 100644 test/disk_tests/usages/sdd/size
delete mode 100644 test/disk_tests/usages/sdd_udevadm
delete mode 100644 test/disk_tests/usages/sde/device/vendor
delete mode 100644 test/disk_tests/usages/sde/queue/rotational
delete mode 100644 test/disk_tests/usages/sde/sde1/size
delete mode 100644 test/disk_tests/usages/sde/size
delete mode 100644 test/disk_tests/usages/sde_udevadm
delete mode 100644 test/disk_tests/usages/sdf/device/vendor
delete mode 100644 test/disk_tests/usages/sdf/queue/rotational
delete mode 100644 test/disk_tests/usages/sdf/sdf1/size
delete mode 100644 test/disk_tests/usages/sdf/size
delete mode 100644 test/disk_tests/usages/sdf_udevadm
delete mode 100644 test/disk_tests/usages/sdg/device/vendor
delete mode 100644 test/disk_tests/usages/sdg/queue/rotational
delete mode 100644 test/disk_tests/usages/sdg/size
delete mode 100644 test/disk_tests/usages/sdg_udevadm
delete mode 100644 test/disk_tests/usages/sdh/device/vendor
delete mode 100644 test/disk_tests/usages/sdh/queue/rotational
delete mode 100644 test/disk_tests/usages/sdh/size
delete mode 100644 test/disk_tests/usages/sdh_udevadm
delete mode 100644 test/disk_tests/usages/sdi/device/vendor
delete mode 100644 test/disk_tests/usages/sdi/queue/rotational
delete mode 100644 test/disk_tests/usages/sdi/size
delete mode 100644 test/disk_tests/usages/sdi_udevadm
delete mode 100644 test/disk_tests/usages/sdj/device/vendor
delete mode 100644 test/disk_tests/usages/sdj/queue/rotational
delete mode 100644 test/disk_tests/usages/sdj/size
delete mode 100644 test/disk_tests/usages/sdj_udevadm
delete mode 100644 test/disk_tests/usages/sdk/device/vendor
delete mode 100644 test/disk_tests/usages/sdk/queue/rotational
delete mode 100644 test/disk_tests/usages/sdk/size
delete mode 100644 test/disk_tests/usages/sdk_udevadm
delete mode 100644 test/disk_tests/usages/sdl/device/vendor
delete mode 100644 test/disk_tests/usages/sdl/queue/rotational
delete mode 100644 test/disk_tests/usages/sdl/size
delete mode 100644 test/disk_tests/usages/sdl_udevadm
delete mode 100644 test/disk_tests/usages/sdm/device/vendor
delete mode 100644 test/disk_tests/usages/sdm/queue/rotational
delete mode 100644 test/disk_tests/usages/sdm/sdm1/size
delete mode 100644 test/disk_tests/usages/sdm/sdm9/size
delete mode 100644 test/disk_tests/usages/sdm/size
delete mode 100644 test/disk_tests/usages/sdm_udevadm
delete mode 100644 test/disk_tests/usages/sdn/device/vendor
delete mode 100644 test/disk_tests/usages/sdn/queue/rotational
delete mode 100644 test/disk_tests/usages/sdn/size
delete mode 100644 test/disk_tests/usages/sdn_udevadm
delete mode 100644 test/disk_tests/usages/zpool
diff --git a/PVE/API2/Disks.pm b/PVE/API2/Disks.pm
index 33bca76..a453efc 100644
--- a/PVE/API2/Disks.pm
+++ b/PVE/API2/Disks.pm
@@ -195,6 +195,12 @@ __PACKAGE__->register_method ({
description => "If true returns only the health status",
optional => 1,
},
+ format => {
+ description => "Return json or text",
+ type => 'string',
+ enum => ['text', 'json'],
+ optional => 1,
+ },
},
},
returns => {
@@ -204,6 +210,7 @@ __PACKAGE__->register_method ({
type => { type => 'string', optional => 1 },
attributes => { type => 'array', optional => 1},
text => { type => 'string', optional => 1 },
+ json => { type => 'string', optional => 1 },
},
},
code => sub {
@@ -211,7 +218,7 @@ __PACKAGE__->register_method ({
my $disk = PVE::Diskmanage::verify_blockdev_path($param->{disk});
- my $result = PVE::Diskmanage::get_smart_data($disk, $param->{healthonly});
+ my $result = PVE::Diskmanage::get_smart_data($disk, $param->{healthonly}, $param->{format});
$result->{health} = 'UNKNOWN' if !defined $result->{health};
$result = { health => $result->{health} } if $param->{healthonly};
diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm
index 64bb813..5ed140f 100644
--- a/PVE/Diskmanage.pm
+++ b/PVE/Diskmanage.pm
@@ -81,11 +81,12 @@ sub disk_is_used {
}
sub get_smart_data {
- my ($disk, $healthonly) = @_;
+ my ($disk, $healthonly, $format) = @_;
assert_blockdev($disk);
my $smartdata = {};
my $type;
+ $format = 'text' if !defined($format);
my $returncode = 0;
@@ -95,69 +96,69 @@ sub get_smart_data {
or die "failed to get nvme controller device for $disk\n");
}
- my $cmd = [$SMARTCTL, '-H'];
- push @$cmd, '-A', '-f', 'brief' if !$healthonly;
+ my $cmd = [$SMARTCTL, '-j', '-H'];
+ if (!$healthonly) {
+ push @$cmd, '-Afbrief';
+ }
push @$cmd, $disk;
+ my $smart_result = '';
eval {
- $returncode = run_command($cmd, noerr => 1, outfunc => sub{
- my ($line) = @_;
-
-# ATA SMART attributes, e.g.:
-# ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
-# 1 Raw_Read_Error_Rate POSR-K 100 100 000 - 0
-#
-# SAS and NVME disks, e.g.:
-# Data Units Written: 5,584,952 [2.85 TB]
-# Accumulated start-stop cycles: 34
-
- if (defined($type) && $type eq 'ata' && $line =~ m/^([ \d]{2}\d)\s+(\S+)\s+(\S{6})\s+(\d+)\s+(\d+)\s+(\S+)\s+(\S+)\s+(.*)$/) {
- my $entry = {};
-
- $entry->{name} = $2 if defined $2;
- $entry->{flags} = $3 if defined $3;
- # the +0 makes a number out of the strings
- $entry->{value} = $4+0 if defined $4;
- $entry->{worst} = $5+0 if defined $5;
- # some disks report the default threshold as --- instead of 000
- if (defined($6) && $6 eq '---') {
- $entry->{threshold} = 0;
- } else {
- $entry->{threshold} = $6+0 if defined $6;
- }
- $entry->{fail} = $7 if defined $7;
- $entry->{raw} = $8 if defined $8;
- $entry->{id} = $1 if defined $1;
- push @{$smartdata->{attributes}}, $entry;
- } elsif ($line =~ m/(?:Health Status|self\-assessment test result): (.*)$/ ) {
- $smartdata->{health} = $1;
- } elsif ($line =~ m/Vendor Specific SMART Attributes with Thresholds:/) {
- $type = 'ata';
- delete $smartdata->{text};
- } elsif ($line =~ m/=== START OF (READ )?SMART DATA SECTION ===/) {
- $type = 'text';
- } elsif (defined($type) && $type eq 'text') {
- $smartdata->{text} = '' if !defined $smartdata->{text};
- $smartdata->{text} .= "$line\n";
- # 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/) {
- $smartdata->{health} = "SMART Disabled";
- }
- });
+ run_command($cmd, noerr => 1, outfunc => sub { $smart_result .= shift });
};
my $err = $@;
- # bit 0 and 1 mark an severe smartctl error
- # all others are for disk status, so ignore them
- # see smartctl(8)
- if ((defined($returncode) && ($returncode & 0b00000011)) || $err) {
- die "Error getting S.M.A.R.T. data: Exit code: $returncode\n";
+ my $json_result = decode_json($smart_result);
+
+ my $smart_health = $json_result->{smart_status}->{passed};
+ if (JSON::is_bool($smart_health)) {
+ $smart_health = ($smart_health)? "PASSED" : "FAILED";
+ } else {
+ $smart_health = 'UNKNOWN';
}
- $smartdata->{type} = $type;
+ $smartdata->{health} = $smart_health;
+
+ $type = $json_result->{device}->{type};
+ if ($type eq 'nvme') {
+ $smartdata->{type} = $format; # text or json
+
+ my $wearout = 100.0 - $json_result->{nvme_smart_health_information_log}->{percentage_used} if !$healthonly;
+
+ foreach my $k (sort keys %{$json_result->{nvme_smart_health_information_log}}) {
+ my $v = $json_result->{nvme_smart_health_information_log}->{$k};
+ if ($format eq 'text') {
+ $smartdata->{text} .= "$k : $v\n";
+ } else {
+ $smartdata->{properties}->{$k} = $v;
+ }
+ if ($k eq 'percentage_used') {
+ $smartdata->{wearout} = $wearout;
+ }
+ }
+ delete $smartdata->{attributes}; # this is for ata disks only
+ } else {
+ $smartdata->{type} = 'ata';
+ foreach my $attribute (@{$json_result->{ata_smart_attributes}->{table}}) {
+ # we need to override or delete some fields to fit expected json schema of unit tests
+ my $flags_string = $attribute->{flags}->{string};
+ $flags_string =~ s/\s+$//;
+ $attribute->{flags} = $flags_string;
+ $attribute->{raw} = $attribute->{raw}->{string};
+ $attribute->{threshold} = delete $attribute->{thresh};
+ $attribute->{fail} = ${attribute}->{when_failed} eq "" ? "-" : ${attribute}->{when_failed};
+ delete ${attribute}->{when_failed};
+
+ push @{$smartdata->{attributes}}, $attribute;
+ }
+ my @sorted_attributes = sort { $a->{id} <=> $b->{id} } @{$smartdata->{attributes}};
+ @{$smartdata->{attributes}} = @sorted_attributes;
+ }
+
+ my $exit_status = $json_result->{smartctl}->{exit_status};
+ if ($exit_status ne 0) {
+ die "Error getting S.M.A.R.T. data: Exit code: $exit_status\n";
+ }
return $smartdata;
}
diff --git a/test/disk_tests/cciss/cciss!c0d0/device/model b/test/disk_tests/cciss/cciss!c0d0/device/model
deleted file mode 100644
index 676b97d..0000000
--- a/test/disk_tests/cciss/cciss!c0d0/device/model
+++ /dev/null
@@ -1 +0,0 @@
-LOGICAL_VOLUME
diff --git a/test/disk_tests/cciss/cciss!c0d0/device/vendor b/test/disk_tests/cciss/cciss!c0d0/device/vendor
deleted file mode 100644
index e8b2ad6..0000000
--- a/test/disk_tests/cciss/cciss!c0d0/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-HP
diff --git a/test/disk_tests/cciss/cciss!c0d0/queue/rotational b/test/disk_tests/cciss/cciss!c0d0/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/cciss/cciss!c0d0/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/cciss/cciss!c0d0/size b/test/disk_tests/cciss/cciss!c0d0/size
deleted file mode 100644
index f599e28..0000000
--- a/test/disk_tests/cciss/cciss!c0d0/size
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/test/disk_tests/cciss/cciss!c0d0_udevadm b/test/disk_tests/cciss/cciss!c0d0_udevadm
deleted file mode 100644
index 21e8899..0000000
--- a/test/disk_tests/cciss/cciss!c0d0_udevadm
+++ /dev/null
@@ -1,32 +0,0 @@
-P: /devices/pci0000:40/0000:40:13.0/0000:45:00.0/cciss0/c0d0/block/cciss!c0d0
-N: cciss/c0d0
-S: disk/by-id/cciss-SERIAL111
-S: disk/by-id/wwn-0x00000000000000000000000000000000
-S: disk/by-path/pci-0000:45:00.0-cciss-disk0
-E: DEVLINKS=/dev/disk/by-id/cciss-000000000000000000000000000000000 /dev/disk/by-id/wwn-0x000000000000000000000000000000000/dev/disk/by-path/pci-0000:45:00.0-cciss-disk0
-E: DEVNAME=/dev/cciss/c0d0
-E: DEVPATH=/devices/pci0000:40/0000:40:13.0/0000:45:00.0/cciss0/c0d0/block/cciss!c0d0
-E: DEVTYPE=disk
-E: ID_BUS=cciss
-E: ID_MODEL=LOGICAL_VOLUME
-E: ID_MODEL_ENC=LOGICAL\x20VOLUME\x20\x20
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=cfe72deb-65d1-487c-bdfa-8af66dc1a969
-E: ID_PATH=pci-0000:45:00.0-cciss-disk0
-E: ID_PATH_TAG=pci-0000_45_00_0-cciss-disk0
-E: ID_REVISION=7.24
-E: ID_SCSI=1
-E: ID_SCSI_SERIAL=SERIAL1
-E: ID_SERIAL=SERIAL111
-E: ID_SERIAL_SHORT=SER111
-E: ID_TYPE=disk
-E: ID_VENDOR=HP
-E: ID_VENDOR_ENC=HP\x20\x20\x20\x20\x20\x20
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_VENDOR_EXTENSION=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x00000000000000000000000000000000
-E: MAJOR=104
-E: MINOR=0
-E: SUBSYSTEM=block
-E: TAGS=:systemd:
-E: USEC_INITIALIZED=2247
diff --git a/test/disk_tests/cciss/disklist b/test/disk_tests/cciss/disklist
deleted file mode 100644
index aa174aa..0000000
--- a/test/disk_tests/cciss/disklist
+++ /dev/null
@@ -1 +0,0 @@
-cciss!c0d0
diff --git a/test/disk_tests/cciss/disklist_expected.json b/test/disk_tests/cciss/disklist_expected.json
deleted file mode 100644
index eff58db..0000000
--- a/test/disk_tests/cciss/disklist_expected.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "cciss/c0d0" : {
- "wearout" : "N/A",
- "vendor" : "HP",
- "rpm" : -1,
- "type" : "unknown",
- "serial" : "SER111",
- "osdid" : -1,
- "health" : "UNKNOWN",
- "model" : "LOGICAL_VOLUME",
- "size" : 5120,
- "wwn" : "0x0000000000000000",
- "gpt" : 1,
- "devpath" : "/dev/cciss/c0d0"
- }
-}
diff --git a/test/disk_tests/hdd_smart/disklist b/test/disk_tests/hdd_smart/disklist
deleted file mode 100644
index 9f6776c..0000000
--- a/test/disk_tests/hdd_smart/disklist
+++ /dev/null
@@ -1,2 +0,0 @@
-sda
-sdb
diff --git a/test/disk_tests/hdd_smart/disklist_expected.json b/test/disk_tests/hdd_smart/disklist_expected.json
deleted file mode 100644
index 02a341e..0000000
--- a/test/disk_tests/hdd_smart/disklist_expected.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "sdb" : {
- "devpath" : "/dev/sdb",
- "size" : 1024000,
- "gpt" : 1,
- "osdid" : -1,
- "rpm" : 7200,
- "model" : "ST4000NM0033-9ZM170",
- "vendor" : "ATA",
- "health" : "PASSED",
- "type" : "hdd",
- "wwn" : "0x0000000000000000",
- "wearout" : "N/A",
- "serial" : "00000000"
- },
- "sda" : {
- "osdid" : -1,
- "size" : 1024000,
- "gpt" : 1,
- "devpath" : "/dev/sda",
- "model" : "ST4000DM000-1F2168",
- "rpm" : 5900,
- "type" : "hdd",
- "health" : "PASSED",
- "vendor" : "ATA",
- "serial" : "00000000",
- "wearout" : "N/A",
- "wwn" : "0x0000000000000000"
- }
-}
diff --git a/test/disk_tests/hdd_smart/sda/device/vendor b/test/disk_tests/hdd_smart/sda/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/hdd_smart/sda/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/hdd_smart/sda/queue/rotational b/test/disk_tests/hdd_smart/sda/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/hdd_smart/sda/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/hdd_smart/sda/size b/test/disk_tests/hdd_smart/sda/size
deleted file mode 100644
index 8bd1af1..0000000
--- a/test/disk_tests/hdd_smart/sda/size
+++ /dev/null
@@ -1 +0,0 @@
-2000
diff --git a/test/disk_tests/hdd_smart/sda_health b/test/disk_tests/hdd_smart/sda_health
deleted file mode 100644
index faf4ce3..0000000
--- a/test/disk_tests/hdd_smart/sda_health
+++ /dev/null
@@ -1,5 +0,0 @@
-smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.4.21-1-pve] (local build)
-Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
diff --git a/test/disk_tests/hdd_smart/sda_smart b/test/disk_tests/hdd_smart/sda_smart
deleted file mode 100644
index a3f8f0a..0000000
--- a/test/disk_tests/hdd_smart/sda_smart
+++ /dev/null
@@ -1,40 +0,0 @@
-smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.4.21-1-pve] (local build)
-Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART Attributes Data Structure revision number: 10
-Vendor Specific SMART Attributes with Thresholds:
-ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
- 1 Raw_Read_Error_Rate POSR-- 117 099 006 - 158983656
- 3 Spin_Up_Time PO---- 092 091 000 - 0
- 4 Start_Stop_Count -O--CK 100 100 020 - 189
- 5 Reallocated_Sector_Ct PO--CK 100 100 010 - 0
- 7 Seek_Error_Rate POSR-- 075 060 030 - 30779387
- 9 Power_On_Hours -O--CK 099 099 000 - 1250
- 10 Spin_Retry_Count PO--C- 100 100 097 - 0
- 12 Power_Cycle_Count -O--CK 100 100 020 - 190
-183 Runtime_Bad_Block -O--CK 100 100 000 - 0
-184 End-to-End_Error -O--CK 100 100 099 - 0
-187 Reported_Uncorrect -O--CK 100 100 000 - 0
-188 Command_Timeout -O--CK 100 100 000 - 0 0 0
-189 High_Fly_Writes -O-RCK 100 100 000 - 0
-190 Airflow_Temperature_Cel -O---K 069 061 045 - 31 (Min/Max 20/33)
-191 G-Sense_Error_Rate -O--CK 100 100 000 - 0
-192 Power-Off_Retract_Count -O--CK 100 100 000 - 43
-193 Load_Cycle_Count -O--CK 100 100 000 - 201
-194 Temperature_Celsius -O---K 031 040 000 - 31 (0 17 0 0 0)
-197 Current_Pending_Sector -O--C- 100 100 000 - 0
-198 Offline_Uncorrectable ----C- 100 100 000 - 0
-199 UDMA_CRC_Error_Count -OSRCK 200 200 000 - 0
-240 Head_Flying_Hours ------ 100 253 000 - 1259h+06m+33.546s
-241 Total_LBAs_Written ------ 100 253 000 - 24013587236
-242 Total_LBAs_Read ------ 100 253 000 - 66916845706732
- ||||||_ K auto-keep
- |||||__ C event count
- ||||___ R error rate
- |||____ S speed/performance
- ||_____ O updated online
- |______ P prefailure warning
-
diff --git a/test/disk_tests/hdd_smart/sda_smart_expected.json b/test/disk_tests/hdd_smart/sda_smart_expected.json
deleted file mode 100644
index 01bb860..0000000
--- a/test/disk_tests/hdd_smart/sda_smart_expected.json
+++ /dev/null
@@ -1,246 +0,0 @@
-{
- "attributes" : [
- {
- "threshold" : 6,
- "fail" : "-",
- "flags" : "POSR--",
- "value" : 117,
- "id" : " 1",
- "raw" : "158983656",
- "name" : "Raw_Read_Error_Rate",
- "worst" : 99
- },
- {
- "flags" : "PO----",
- "value" : 92,
- "raw" : "0",
- "name" : "Spin_Up_Time",
- "worst" : 91,
- "id" : " 3",
- "fail" : "-",
- "threshold" : 0
- },
- {
- "value" : 100,
- "flags" : "-O--CK",
- "id" : " 4",
- "name" : "Start_Stop_Count",
- "worst" : 100,
- "raw" : "189",
- "threshold" : 20,
- "fail" : "-"
- },
- {
- "value" : 100,
- "flags" : "PO--CK",
- "id" : " 5",
- "name" : "Reallocated_Sector_Ct",
- "worst" : 100,
- "raw" : "0",
- "threshold" : 10,
- "fail" : "-"
- },
- {
- "flags" : "POSR--",
- "value" : 75,
- "raw" : "30779387",
- "worst" : 60,
- "name" : "Seek_Error_Rate",
- "id" : " 7",
- "fail" : "-",
- "threshold" : 30
- },
- {
- "raw" : "1250",
- "worst" : 99,
- "name" : "Power_On_Hours",
- "id" : " 9",
- "flags" : "-O--CK",
- "value" : 99,
- "fail" : "-",
- "threshold" : 0
- },
- {
- "value" : 100,
- "flags" : "PO--C-",
- "id" : " 10",
- "name" : "Spin_Retry_Count",
- "worst" : 100,
- "raw" : "0",
- "threshold" : 97,
- "fail" : "-"
- },
- {
- "flags" : "-O--CK",
- "value" : 100,
- "id" : " 12",
- "raw" : "190",
- "worst" : 100,
- "name" : "Power_Cycle_Count",
- "threshold" : 20,
- "fail" : "-"
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "flags" : "-O--CK",
- "value" : 100,
- "id" : "183",
- "raw" : "0",
- "worst" : 100,
- "name" : "Runtime_Bad_Block"
- },
- {
- "fail" : "-",
- "threshold" : 99,
- "flags" : "-O--CK",
- "value" : 100,
- "raw" : "0",
- "worst" : 100,
- "name" : "End-to-End_Error",
- "id" : "184"
- },
- {
- "worst" : 100,
- "name" : "Reported_Uncorrect",
- "raw" : "0",
- "id" : "187",
- "value" : 100,
- "flags" : "-O--CK",
- "fail" : "-",
- "threshold" : 0
- },
- {
- "flags" : "-O--CK",
- "value" : 100,
- "raw" : "0 0 0",
- "worst" : 100,
- "name" : "Command_Timeout",
- "id" : "188",
- "fail" : "-",
- "threshold" : 0
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "flags" : "-O-RCK",
- "value" : 100,
- "id" : "189",
- "raw" : "0",
- "name" : "High_Fly_Writes",
- "worst" : 100
- },
- {
- "worst" : 61,
- "name" : "Airflow_Temperature_Cel",
- "raw" : "31 (Min/Max 20/33)",
- "id" : "190",
- "value" : 69,
- "flags" : "-O---K",
- "fail" : "-",
- "threshold" : 45
- },
- {
- "fail" : "-",
- "threshold" : 0,
- "worst" : 100,
- "name" : "G-Sense_Error_Rate",
- "raw" : "0",
- "id" : "191",
- "value" : 100,
- "flags" : "-O--CK"
- },
- {
- "id" : "192",
- "raw" : "43",
- "name" : "Power-Off_Retract_Count",
- "worst" : 100,
- "flags" : "-O--CK",
- "value" : 100,
- "threshold" : 0,
- "fail" : "-"
- },
- {
- "flags" : "-O--CK",
- "value" : 100,
- "raw" : "201",
- "worst" : 100,
- "name" : "Load_Cycle_Count",
- "id" : "193",
- "fail" : "-",
- "threshold" : 0
- },
- {
- "fail" : "-",
- "threshold" : 0,
- "value" : 31,
- "flags" : "-O---K",
- "name" : "Temperature_Celsius",
- "worst" : 40,
- "raw" : "31 (0 17 0 0 0)",
- "id" : "194"
- },
- {
- "value" : 100,
- "flags" : "-O--C-",
- "id" : "197",
- "worst" : 100,
- "name" : "Current_Pending_Sector",
- "raw" : "0",
- "threshold" : 0,
- "fail" : "-"
- },
- {
- "worst" : 100,
- "name" : "Offline_Uncorrectable",
- "raw" : "0",
- "id" : "198",
- "value" : 100,
- "flags" : "----C-",
- "fail" : "-",
- "threshold" : 0
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "value" : 200,
- "flags" : "-OSRCK",
- "id" : "199",
- "worst" : 200,
- "name" : "UDMA_CRC_Error_Count",
- "raw" : "0"
- },
- {
- "raw" : "1259h+06m+33.546s",
- "name" : "Head_Flying_Hours",
- "worst" : 253,
- "id" : "240",
- "flags" : "------",
- "value" : 100,
- "fail" : "-",
- "threshold" : 0
- },
- {
- "fail" : "-",
- "threshold" : 0,
- "name" : "Total_LBAs_Written",
- "worst" : 253,
- "raw" : "24013587236",
- "id" : "241",
- "value" : 100,
- "flags" : "------"
- },
- {
- "flags" : "------",
- "value" : 100,
- "id" : "242",
- "raw" : "66916845706732",
- "worst" : 253,
- "name" : "Total_LBAs_Read",
- "threshold" : 0,
- "fail" : "-"
- }
- ],
- "health" : "PASSED",
- "type" : "ata"
-}
diff --git a/test/disk_tests/hdd_smart/sda_udevadm b/test/disk_tests/hdd_smart/sda_udevadm
deleted file mode 100644
index d9b5497..0000000
--- a/test/disk_tests/hdd_smart/sda_udevadm
+++ /dev/null
@@ -1,11 +0,0 @@
-E: DEVNAME=/dev/sda
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=5900
-E: ID_BUS=ata
-E: ID_MODEL=ST4000DM000-1F2168
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=4f2e07a6-5437-2b4e-b6e8-9cba98639324
-E: ID_SERIAL_SHORT=00000000
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/hdd_smart/sdb/device/vendor b/test/disk_tests/hdd_smart/sdb/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/hdd_smart/sdb/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/hdd_smart/sdb/queue/rotational b/test/disk_tests/hdd_smart/sdb/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/hdd_smart/sdb/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/hdd_smart/sdb/size b/test/disk_tests/hdd_smart/sdb/size
deleted file mode 100644
index 8bd1af1..0000000
--- a/test/disk_tests/hdd_smart/sdb/size
+++ /dev/null
@@ -1 +0,0 @@
-2000
diff --git a/test/disk_tests/hdd_smart/sdb_health b/test/disk_tests/hdd_smart/sdb_health
deleted file mode 100644
index faf4ce3..0000000
--- a/test/disk_tests/hdd_smart/sdb_health
+++ /dev/null
@@ -1,5 +0,0 @@
-smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.4.21-1-pve] (local build)
-Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
diff --git a/test/disk_tests/hdd_smart/sdb_smart b/test/disk_tests/hdd_smart/sdb_smart
deleted file mode 100644
index ce52bea..0000000
--- a/test/disk_tests/hdd_smart/sdb_smart
+++ /dev/null
@@ -1,36 +0,0 @@
-smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.4.10-1-pve] (local build)
-Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART Attributes Data Structure revision number: 10
-Vendor Specific SMART Attributes with Thresholds:
-ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH FAIL RAW_VALUE
- 1 Raw_Read_Error_Rate POSR-- 083 063 044 - 215697022
- 3 Spin_Up_Time PO---- 092 091 000 - 0
- 4 Start_Stop_Count -O--CK 100 100 020 - 265
- 5 Reallocated_Sector_Ct PO--CK 100 100 010 - 0
- 7 Seek_Error_Rate POSR-- 091 060 030 - 1572375006
- 9 Power_On_Hours -O--CK 089 089 000 - 9885
- 10 Spin_Retry_Count PO--C- 100 100 097 - 0
- 12 Power_Cycle_Count -O--CK 100 100 020 - 265
-184 End-to-End_Error -O--CK 100 100 099 - 0
-187 Reported_Uncorrect -O--CK 100 100 000 - 0
-188 Command_Timeout -O--CK 100 100 000 - 0
-189 High_Fly_Writes -O--CK 100 100 000 - 0
-190 Airflow_Temperature_Cel -O-RCK 045 036 045 NOW 55 (147 229 55 24 0)
-191 G-Sense_Error_Rate -O---K 100 100 000 - 0
-192 Power-Off_Retract_Count -O--CK 100 100 000 - 57
-193 Load_Cycle_Count -O--CK 100 100 000 - 265
-194 Temperature_Celsius -O--CK 055 064 000 - 55 (0 16 0 0 0)
-195 Hardware_ECC_Recovered -O---K 023 013 000 - 215697022
-197 Current_Pending_Sector -O--C- 100 100 000 - 0
-198 Offline_Uncorrectable ----C- 100 100 000 - 0
-199 UDMA_CRC_Error_Count -OSRCK 200 200 000 - 0
- ||||||_ K auto-keep
- |||||__ C event count
- ||||___ R error rate
- |||____ S speed/performance
- ||_____ O updated online
- |______ P prefailure warning
diff --git a/test/disk_tests/hdd_smart/sdb_smart_expected.json b/test/disk_tests/hdd_smart/sdb_smart_expected.json
deleted file mode 100644
index 41e55fb..0000000
--- a/test/disk_tests/hdd_smart/sdb_smart_expected.json
+++ /dev/null
@@ -1,216 +0,0 @@
-{
- "attributes" : [
- {
- "threshold" : 44,
- "fail" : "-",
- "id" : " 1",
- "name" : "Raw_Read_Error_Rate",
- "worst" : 63,
- "raw" : "215697022",
- "value" : 83,
- "flags" : "POSR--"
- },
- {
- "flags" : "PO----",
- "value" : 92,
- "id" : " 3",
- "raw" : "0",
- "worst" : 91,
- "name" : "Spin_Up_Time",
- "threshold" : 0,
- "fail" : "-"
- },
- {
- "fail" : "-",
- "threshold" : 20,
- "value" : 100,
- "flags" : "-O--CK",
- "worst" : 100,
- "name" : "Start_Stop_Count",
- "raw" : "265",
- "id" : " 4"
- },
- {
- "flags" : "PO--CK",
- "value" : 100,
- "id" : " 5",
- "raw" : "0",
- "name" : "Reallocated_Sector_Ct",
- "worst" : 100,
- "threshold" : 10,
- "fail" : "-"
- },
- {
- "id" : " 7",
- "raw" : "1572375006",
- "name" : "Seek_Error_Rate",
- "worst" : 60,
- "flags" : "POSR--",
- "value" : 91,
- "threshold" : 30,
- "fail" : "-"
- },
- {
- "raw" : "9885",
- "name" : "Power_On_Hours",
- "worst" : 89,
- "id" : " 9",
- "flags" : "-O--CK",
- "value" : 89,
- "fail" : "-",
- "threshold" : 0
- },
- {
- "fail" : "-",
- "threshold" : 97,
- "value" : 100,
- "flags" : "PO--C-",
- "worst" : 100,
- "name" : "Spin_Retry_Count",
- "raw" : "0",
- "id" : " 10"
- },
- {
- "threshold" : 20,
- "fail" : "-",
- "id" : " 12",
- "raw" : "265",
- "name" : "Power_Cycle_Count",
- "worst" : 100,
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "name" : "End-to-End_Error",
- "worst" : 100,
- "raw" : "0",
- "id" : "184",
- "value" : 100,
- "flags" : "-O--CK",
- "fail" : "-",
- "threshold" : 99
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "id" : "187",
- "raw" : "0",
- "name" : "Reported_Uncorrect",
- "worst" : 100,
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "id" : "188",
- "raw" : "0",
- "name" : "Command_Timeout",
- "worst" : 100,
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "fail" : "-",
- "threshold" : 0,
- "raw" : "0",
- "worst" : 100,
- "name" : "High_Fly_Writes",
- "id" : "189",
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "flags" : "-O-RCK",
- "value" : 45,
- "raw" : "55 (147 229 55 24 0)",
- "worst" : 36,
- "name" : "Airflow_Temperature_Cel",
- "id" : "190",
- "fail" : "NOW",
- "threshold" : 45
- },
- {
- "fail" : "-",
- "threshold" : 0,
- "raw" : "0",
- "worst" : 100,
- "name" : "G-Sense_Error_Rate",
- "id" : "191",
- "flags" : "-O---K",
- "value" : 100
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "id" : "192",
- "raw" : "57",
- "worst" : 100,
- "name" : "Power-Off_Retract_Count",
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "fail" : "-",
- "threshold" : 0,
- "value" : 100,
- "flags" : "-O--CK",
- "name" : "Load_Cycle_Count",
- "worst" : 100,
- "raw" : "265",
- "id" : "193"
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "flags" : "-O--CK",
- "value" : 55,
- "id" : "194",
- "raw" : "55 (0 16 0 0 0)",
- "name" : "Temperature_Celsius",
- "worst" : 64
- },
- {
- "threshold" : 0,
- "fail" : "-",
- "id" : "195",
- "name" : "Hardware_ECC_Recovered",
- "worst" : 13,
- "raw" : "215697022",
- "value" : 23,
- "flags" : "-O---K"
- },
- {
- "worst" : 100,
- "name" : "Current_Pending_Sector",
- "raw" : "0",
- "id" : "197",
- "value" : 100,
- "flags" : "-O--C-",
- "fail" : "-",
- "threshold" : 0
- },
- {
- "worst" : 100,
- "name" : "Offline_Uncorrectable",
- "raw" : "0",
- "id" : "198",
- "value" : 100,
- "flags" : "----C-",
- "fail" : "-",
- "threshold" : 0
- },
- {
- "fail" : "-",
- "threshold" : 0,
- "value" : 200,
- "flags" : "-OSRCK",
- "worst" : 200,
- "name" : "UDMA_CRC_Error_Count",
- "raw" : "0",
- "id" : "199"
- }
- ],
- "type" : "ata",
- "health" : "PASSED"
-}
diff --git a/test/disk_tests/hdd_smart/sdb_udevadm b/test/disk_tests/hdd_smart/sdb_udevadm
deleted file mode 100644
index 3bc3a57..0000000
--- a/test/disk_tests/hdd_smart/sdb_udevadm
+++ /dev/null
@@ -1,11 +0,0 @@
-E: DEVNAME=/dev/sdb
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=7200
-E: ID_BUS=ata
-E: ID_MODEL=ST4000NM0033-9ZM170
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=4f2e07a6-5437-2b4e-b6e8-9cba98639324
-E: ID_SERIAL_SHORT=00000000
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/nvme_smart/nvme0_smart b/test/disk_tests/nvme_smart/nvme0_smart
index f371d5b..2c4e0a6 100644
--- a/test/disk_tests/nvme_smart/nvme0_smart
+++ b/test/disk_tests/nvme_smart/nvme0_smart
@@ -1,22 +1,61 @@
-smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.4.19-1-pve] (local build)
-Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)
-Critical Warning: 0x00
-Temperature: 32 Celsius
-Available Spare: 100%
-Available Spare Threshold: 10%
-Percentage Used: 31%
-Data Units Read: 1,299,288 [665 GB]
-Data Units Written: 5,592,478 [2.86 TB]
-Host Read Commands: 30,360,807
-Host Write Commands: 470,356,196
-Controller Busy Time: 12
-Power Cycles: 98
-Power On Hours: 687
-Unsafe Shutdowns: 21
-Media and Data Integrity Errors: 0
-Error Information Log Entries: 0
+{
+ "json_format_version": [
+ 1,
+ 0
+ ],
+ "smartctl": {
+ "version": [
+ 7,
+ 2
+ ],
+ "svn_revision": "5155",
+ "platform_info": "x86_64-linux-5.11.7-1-pve",
+ "build_info": "(local build)",
+ "argv": [
+ "smartctl",
+ "-j",
+ "-H",
+ "-Afbrief",
+ "/dev/nvme0"
+ ],
+ "exit_status": 0
+ },
+ "device": {
+ "name": "/dev/nvme0",
+ "info_name": "/dev/nvme0",
+ "type": "nvme",
+ "protocol": "NVMe"
+ },
+ "smart_status": {
+ "passed": true,
+ "nvme": {
+ "value": 0
+ }
+ },
+ "nvme_smart_health_information_log": {
+ "critical_warning": 0,
+ "temperature": 35,
+ "available_spare": 100,
+ "available_spare_threshold": 10,
+ "percentage_used": 31,
+ "data_units_read": 4546105,
+ "data_units_written": 16623231,
+ "host_reads": 154011524,
+ "host_writes": 282144186,
+ "controller_busy_time": 355,
+ "power_cycles": 514,
+ "power_on_hours": 2491,
+ "unsafe_shutdowns": 38,
+ "media_errors": 0,
+ "num_err_log_entries": 0,
+ "warning_temp_time": 0,
+ "critical_comp_time": 0
+ },
+ "temperature": {
+ "current": 35
+ },
+ "power_cycle_count": 514,
+ "power_on_time": {
+ "hours": 2491
+ }
+}
diff --git a/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json b/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
index af8eade..57dc97e 100644
--- a/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
+++ b/test/disk_tests/nvme_smart/nvme0n1_smart_expected.json
@@ -1,5 +1,5 @@
{
- "text" : "\nSMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)\nCritical Warning: 0x00\nTemperature: 32 Celsius\nAvailable Spare: 100%\nAvailable Spare Threshold: 10%\nPercentage Used: 31%\nData Units Read: 1,299,288 [665 GB]\nData Units Written: 5,592,478 [2.86 TB]\nHost Read Commands: 30,360,807\nHost Write Commands: 470,356,196\nController Busy Time: 12\nPower Cycles: 98\nPower On Hours: 687\nUnsafe Shutdowns: 21\nMedia and Data Integrity Errors: 0\nError Information Log Entries: 0\n",
+ "text" : "available_spare : 100\navailable_spare_threshold : 10\ncontroller_busy_time : 355\ncritical_comp_time : 0\ncritical_warning : 0\ndata_units_read : 4546105\ndata_units_written : 16623231\nhost_reads : 154011524\nhost_writes : 282144186\nmedia_errors : 0\nnum_err_log_entries : 0\npercentage_used : 31\npower_cycles : 514\npower_on_hours : 2491\ntemperature : 35\nunsafe_shutdowns : 38\nwarning_temp_time : 0\n",
"health" : "PASSED",
"type" : "text",
"wearout": 69
diff --git a/test/disk_tests/sas/disklist b/test/disk_tests/sas/disklist
deleted file mode 100644
index 9191c61..0000000
--- a/test/disk_tests/sas/disklist
+++ /dev/null
@@ -1 +0,0 @@
-sda
diff --git a/test/disk_tests/sas/disklist_expected.json b/test/disk_tests/sas/disklist_expected.json
deleted file mode 100644
index 39b14a5..0000000
--- a/test/disk_tests/sas/disklist_expected.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "sda" : {
- "gpt" : 1,
- "devpath" : "/dev/sda",
- "type" : "unknown",
- "model" : "MODEL1",
- "health" : "UNKNOWN",
- "osdid" : -1,
- "wwn" : "0x0000000000000000",
- "vendor" : "VENDOR1",
- "rpm" : -1,
- "size" : 5120000,
- "serial" : "SER2",
- "wearout" : "N/A",
- "by_id_link" : "/dev/disk/by-id/scsi-00000000000000000"
- }
-}
diff --git a/test/disk_tests/sas/sda/device/model b/test/disk_tests/sas/sda/device/model
deleted file mode 100644
index 6b69674..0000000
--- a/test/disk_tests/sas/sda/device/model
+++ /dev/null
@@ -1 +0,0 @@
-MODEL1
diff --git a/test/disk_tests/sas/sda/device/vendor b/test/disk_tests/sas/sda/device/vendor
deleted file mode 100644
index a7894eb..0000000
--- a/test/disk_tests/sas/sda/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-VENDOR1
diff --git a/test/disk_tests/sas/sda/queue/rotational b/test/disk_tests/sas/sda/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/sas/sda/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/sas/sda/size b/test/disk_tests/sas/sda/size
deleted file mode 100644
index 5caff40..0000000
--- a/test/disk_tests/sas/sda/size
+++ /dev/null
@@ -1 +0,0 @@
-10000
diff --git a/test/disk_tests/sas/sda_smart b/test/disk_tests/sas/sda_smart
deleted file mode 100644
index 856af39..0000000
--- a/test/disk_tests/sas/sda_smart
+++ /dev/null
@@ -1,20 +0,0 @@
-=== START OF READ SMART DATA SECTION ===
-SMART Health Status: OK
-
-Percentage used endurance indicator: 0%
-Current Drive Temperature: 20 C
-Drive Trip Temperature: 70 C
-
-Manufactured in week 47 of year 2012
-Specified cycle count over device lifetime: 0
-Accumulated start-stop cycles: 0
-Specified load-unload count over device lifetime: 0
-Accumulated load-unload cycles: 0
-Elements in grown defect list: 0
-
-Vendor (Seagate) cache information
- Blocks sent to initiator = 1286675833552896
-
-Vendor (Seagate/Hitachi) factory information
- number of hours powered up = 7127.12
- number of minutes until next internal SMART test = 0
diff --git a/test/disk_tests/sas/sda_smart_expected.json b/test/disk_tests/sas/sda_smart_expected.json
deleted file mode 100644
index 2964372..0000000
--- a/test/disk_tests/sas/sda_smart_expected.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "health" : "OK",
- "text" : "\nPercentage used endurance indicator: 0%\nCurrent Drive Temperature: 20 C\nDrive Trip Temperature: 70 C\n\nManufactured in week 47 of year 2012\nSpecified cycle count over device lifetime: 0\nAccumulated start-stop cycles: 0\nSpecified load-unload count over device lifetime: 0\nAccumulated load-unload cycles: 0\nElements in grown defect list: 0\n\nVendor (Seagate) cache information\n Blocks sent to initiator = 1286675833552896\n\nVendor (Seagate/Hitachi) factory information\n number of hours powered up = 7127.12\n number of minutes until next internal SMART test = 0\n",
- "type" : "text",
- "wearout": 100
-}
diff --git a/test/disk_tests/sas/sda_udevadm b/test/disk_tests/sas/sda_udevadm
deleted file mode 100644
index ac0744d..0000000
--- a/test/disk_tests/sas/sda_udevadm
+++ /dev/null
@@ -1,31 +0,0 @@
-P: /devices/pci0000:00/0000:00:03.0/0000:02:00.0/host4/port-4:0/end_device-4:0/target4:0:0/4:0:0:0/block/sda
-N: sda
-S: disk/by-id/scsi-00000000000000000
-S: disk/by-id/wwn-0x0000000000000000
-S: disk/by-path/pci-0000:02:00.0-sas-0x0000000000000000-lun-0
-E: DEVLINKS=/dev/disk/by-id/scsi-00000000000000000 /dev/disk/by-id/wwn-0x0000000000000000 /dev/disk/by-path/pci-0000:02:00.0-sas-0x0000000000000000-lun-0
-E: DEVNAME=/dev/sda
-E: DEVPATH=/devices/pci0000:00/0000:00:03.0/0000:02:00.0/host4/port-4:0/end_device-4:0/target4:0:0/4:0:0:0/block/sda
-E: DEVTYPE=disk
-E: ID_BUS=scsi
-E: ID_MODEL=MODEL1
-E: ID_MODEL_ENC=MODEL1\x20\x20\x20\x20\x20\x20
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=605740f0-44a1-4dc5-9fea-bde166df963e
-E: ID_PATH=pci-0000:02:00.0-sas-0x0000000000000000-lun-0
-E: ID_PATH_TAG=pci-0000_02_00_0-sas-0x0000000000000000-lun-0
-E: ID_REVISION=ES64
-E: ID_SCSI=1
-E: ID_SCSI_SERIAL=SERIAL
-E: ID_SERIAL=SERIAL2
-E: ID_SERIAL_SHORT=SER2
-E: ID_TYPE=disk
-E: ID_VENDOR=VENDOR1
-E: ID_VENDOR_ENC=VENDOR1\x20
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
-E: MAJOR=8
-E: MINOR=0
-E: SUBSYSTEM=block
-E: TAGS=:systemd:
-E: USEC_INITIALIZED=667541
diff --git a/test/disk_tests/sas_ssd/disklist b/test/disk_tests/sas_ssd/disklist
deleted file mode 100644
index 9191c61..0000000
--- a/test/disk_tests/sas_ssd/disklist
+++ /dev/null
@@ -1 +0,0 @@
-sda
diff --git a/test/disk_tests/sas_ssd/disklist_expected.json b/test/disk_tests/sas_ssd/disklist_expected.json
deleted file mode 100644
index dd9b748..0000000
--- a/test/disk_tests/sas_ssd/disklist_expected.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "sda" : {
- "gpt" : 1,
- "devpath" : "/dev/sda",
- "type" : "ssd",
- "model" : "MODEL1",
- "health" : "OK",
- "osdid" : -1,
- "wwn" : "0x0000000000000000",
- "vendor" : "VENDOR1",
- "rpm" : 0,
- "size" : 5120000,
- "serial" : "SER2",
- "wearout" : 100,
- "by_id_link" : "/dev/disk/by-id/scsi-00000000000000000"
- }
-}
diff --git a/test/disk_tests/sas_ssd/sda/device/model b/test/disk_tests/sas_ssd/sda/device/model
deleted file mode 100644
index 6b69674..0000000
--- a/test/disk_tests/sas_ssd/sda/device/model
+++ /dev/null
@@ -1 +0,0 @@
-MODEL1
diff --git a/test/disk_tests/sas_ssd/sda/device/vendor b/test/disk_tests/sas_ssd/sda/device/vendor
deleted file mode 100644
index a7894eb..0000000
--- a/test/disk_tests/sas_ssd/sda/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-VENDOR1
diff --git a/test/disk_tests/sas_ssd/sda/queue/rotational b/test/disk_tests/sas_ssd/sda/queue/rotational
deleted file mode 100644
index 573541a..0000000
--- a/test/disk_tests/sas_ssd/sda/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/test/disk_tests/sas_ssd/sda/size b/test/disk_tests/sas_ssd/sda/size
deleted file mode 100644
index 5caff40..0000000
--- a/test/disk_tests/sas_ssd/sda/size
+++ /dev/null
@@ -1 +0,0 @@
-10000
diff --git a/test/disk_tests/sas_ssd/sda_smart b/test/disk_tests/sas_ssd/sda_smart
deleted file mode 100644
index 856af39..0000000
--- a/test/disk_tests/sas_ssd/sda_smart
+++ /dev/null
@@ -1,20 +0,0 @@
-=== START OF READ SMART DATA SECTION ===
-SMART Health Status: OK
-
-Percentage used endurance indicator: 0%
-Current Drive Temperature: 20 C
-Drive Trip Temperature: 70 C
-
-Manufactured in week 47 of year 2012
-Specified cycle count over device lifetime: 0
-Accumulated start-stop cycles: 0
-Specified load-unload count over device lifetime: 0
-Accumulated load-unload cycles: 0
-Elements in grown defect list: 0
-
-Vendor (Seagate) cache information
- Blocks sent to initiator = 1286675833552896
-
-Vendor (Seagate/Hitachi) factory information
- number of hours powered up = 7127.12
- number of minutes until next internal SMART test = 0
diff --git a/test/disk_tests/sas_ssd/sda_smart_expected.json b/test/disk_tests/sas_ssd/sda_smart_expected.json
deleted file mode 100644
index 2964372..0000000
--- a/test/disk_tests/sas_ssd/sda_smart_expected.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "health" : "OK",
- "text" : "\nPercentage used endurance indicator: 0%\nCurrent Drive Temperature: 20 C\nDrive Trip Temperature: 70 C\n\nManufactured in week 47 of year 2012\nSpecified cycle count over device lifetime: 0\nAccumulated start-stop cycles: 0\nSpecified load-unload count over device lifetime: 0\nAccumulated load-unload cycles: 0\nElements in grown defect list: 0\n\nVendor (Seagate) cache information\n Blocks sent to initiator = 1286675833552896\n\nVendor (Seagate/Hitachi) factory information\n number of hours powered up = 7127.12\n number of minutes until next internal SMART test = 0\n",
- "type" : "text",
- "wearout": 100
-}
diff --git a/test/disk_tests/sas_ssd/sda_udevadm b/test/disk_tests/sas_ssd/sda_udevadm
deleted file mode 100644
index ac0744d..0000000
--- a/test/disk_tests/sas_ssd/sda_udevadm
+++ /dev/null
@@ -1,31 +0,0 @@
-P: /devices/pci0000:00/0000:00:03.0/0000:02:00.0/host4/port-4:0/end_device-4:0/target4:0:0/4:0:0:0/block/sda
-N: sda
-S: disk/by-id/scsi-00000000000000000
-S: disk/by-id/wwn-0x0000000000000000
-S: disk/by-path/pci-0000:02:00.0-sas-0x0000000000000000-lun-0
-E: DEVLINKS=/dev/disk/by-id/scsi-00000000000000000 /dev/disk/by-id/wwn-0x0000000000000000 /dev/disk/by-path/pci-0000:02:00.0-sas-0x0000000000000000-lun-0
-E: DEVNAME=/dev/sda
-E: DEVPATH=/devices/pci0000:00/0000:00:03.0/0000:02:00.0/host4/port-4:0/end_device-4:0/target4:0:0/4:0:0:0/block/sda
-E: DEVTYPE=disk
-E: ID_BUS=scsi
-E: ID_MODEL=MODEL1
-E: ID_MODEL_ENC=MODEL1\x20\x20\x20\x20\x20\x20
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=605740f0-44a1-4dc5-9fea-bde166df963e
-E: ID_PATH=pci-0000:02:00.0-sas-0x0000000000000000-lun-0
-E: ID_PATH_TAG=pci-0000_02_00_0-sas-0x0000000000000000-lun-0
-E: ID_REVISION=ES64
-E: ID_SCSI=1
-E: ID_SCSI_SERIAL=SERIAL
-E: ID_SERIAL=SERIAL2
-E: ID_SERIAL_SHORT=SER2
-E: ID_TYPE=disk
-E: ID_VENDOR=VENDOR1
-E: ID_VENDOR_ENC=VENDOR1\x20
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
-E: MAJOR=8
-E: MINOR=0
-E: SUBSYSTEM=block
-E: TAGS=:systemd:
-E: USEC_INITIALIZED=667541
diff --git a/test/disk_tests/ssd_smart/disklist b/test/disk_tests/ssd_smart/disklist
index 18048d5..9191c61 100644
--- a/test/disk_tests/ssd_smart/disklist
+++ b/test/disk_tests/ssd_smart/disklist
@@ -1,5 +1 @@
sda
-sdb
-sdc
-sdd
-sde
diff --git a/test/disk_tests/ssd_smart/disklist_expected.json b/test/disk_tests/ssd_smart/disklist_expected.json
index d84b9dc..3681cc8 100644
--- a/test/disk_tests/ssd_smart/disklist_expected.json
+++ b/test/disk_tests/ssd_smart/disklist_expected.json
@@ -5,68 +5,12 @@
"rpm" : 0,
"gpt" : 1,
"health" : "PASSED",
- "wearout" : "100",
+ "wearout" : "98",
"osdid" : -1,
"size" : 512000,
"type" : "ssd",
"devpath" : "/dev/sda",
- "model" : "Crucial_CT500MX200SSD1",
+ "model" : "Samsung_SSD_860_EVO_1TB",
"wwn" : "0x0000000000000000"
- },
- "sdb" : {
- "model" : "INTEL_SSDSC2BB080G6",
- "devpath" : "/dev/sdb",
- "osdid" : -1,
- "type" : "ssd",
- "size" : 512000,
- "wwn" : "0x0000000000000000",
- "gpt" : 1,
- "rpm" : 0,
- "vendor" : "ATA",
- "serial" : "000000000000000000",
- "wearout" : "97",
- "health" : "PASSED"
- },
- "sdc" : {
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdc",
- "model" : "Samsung SSD 850 PRO 512GB",
- "osdid" : -1,
- "type" : "ssd",
- "size" : 512000,
- "wearout" : "99",
- "health" : "PASSED",
- "gpt" : 1,
- "rpm" : 0,
- "vendor" : "ATA",
- "serial" : "000000000000"
- },
- "sdd" : {
- "rpm" : 0,
- "gpt" : 1,
- "serial" : "000000000000",
- "vendor" : "ATA",
- "wearout" : "100",
- "health" : "PASSED",
- "devpath" : "/dev/sdd",
- "model" : "SanDisk SD8SB8U1T001122",
- "size" : 512000,
- "osdid" : -1,
- "type" : "ssd",
- "wwn" : "0x0000000000000000"
- },
- "sde" : {
- "type" : "ssd",
- "osdid" : -1,
- "size" : 512000,
- "model" : "KINGSTON SHFS37A120G",
- "devpath" : "/dev/sde",
- "wwn" : "0x0000000000000000",
- "vendor" : "ATA",
- "serial" : "000000000000",
- "gpt" : 1,
- "rpm" : 0,
- "health" : "PASSED",
- "wearout" : "91"
}
}
diff --git a/test/disk_tests/ssd_smart/sda_smart b/test/disk_tests/ssd_smart/sda_smart
index 2857588..907e7da 100644
--- a/test/disk_tests/ssd_smart/sda_smart
+++ b/test/disk_tests/ssd_smart/sda_smart
@@ -1,39 +1,352 @@
-smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.4.21-1-pve] (local build)
-Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART Attributes Data Structure revision number: 16
-Vendor Specific SMART Attributes with Thresholds:
-ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
- 1 Raw_Read_Error_Rate POSR-K 100 100 000 - 0
- 5 Reallocate_NAND_Blk_Cnt -O--CK 100 100 010 - 0
- 9 Power_On_Hours -O--CK 100 100 000 - 1309
- 12 Power_Cycle_Count -O--CK 100 100 000 - 200
-171 Program_Fail_Count -O--CK 100 100 000 - 0
-172 Erase_Fail_Count -O--CK 100 100 000 - 0
-173 Ave_Block-Erase_Count -O--CK 100 100 000 - 12
-174 Unexpect_Power_Loss_Ct -O--CK 100 100 000 - 53
-180 Unused_Reserve_NAND_Blk PO--CK 000 000 000 - 5565
-183 SATA_Interfac_Downshift -O--CK 100 100 000 - 0
-184 Error_Correction_Count -O--CK 100 100 000 - 0
-187 Reported_Uncorrect -O--CK 100 100 000 - 0
-194 Temperature_Celsius -O---K 068 054 000 - 32 (Min/Max 22/46)
-196 Reallocated_Event_Count -O--CK 100 100 000 - 0
-197 Current_Pending_Sector -O--CK 100 100 000 - 0
-198 Offline_Uncorrectable ----CK 100 100 000 - 0
-199 UDMA_CRC_Error_Count -O--CK 100 100 000 - 0
-202 Percent_Lifetime_Used ----CK 100 100 001 - 0
-206 Write_Error_Rate -OSR-- 100 100 000 - 0
-210 Success_RAIN_Recov_Cnt -O--CK 100 100 000 - 0
-246 Total_Host_Sector_Write -O--CK 100 100 000 - 6751830403
-247 Host_Program_Page_Count -O--CK 100 100 000 - 211228065
-248 Bckgnd_Program_Page_Cnt -O--CK 100 100 000 - 253276904
- ||||||_ K auto-keep
- |||||__ C event count
- ||||___ R error rate
- |||____ S speed/performance
- ||_____ O updated online
- |______ P prefailure warning
-
+{
+ "json_format_version": [
+ 1,
+ 0
+ ],
+ "smartctl": {
+ "version": [
+ 7,
+ 2
+ ],
+ "svn_revision": "5155",
+ "platform_info": "x86_64-linux-5.11.7-1-pve",
+ "build_info": "(local build)",
+ "argv": [
+ "smartctl",
+ "-j",
+ "-H",
+ "-Afbrief",
+ "/dev/sda"
+ ],
+ "exit_status": 0
+ },
+ "device": {
+ "name": "/dev/sda",
+ "info_name": "/dev/sda [SAT]",
+ "type": "sat",
+ "protocol": "ATA"
+ },
+ "smart_status": {
+ "passed": true
+ },
+ "ata_smart_attributes": {
+ "revision": 1,
+ "table": [
+ {
+ "id": 5,
+ "name": "Reallocated_Sector_Ct",
+ "value": 100,
+ "worst": 100,
+ "thresh": 10,
+ "when_failed": "",
+ "flags": {
+ "value": 51,
+ "string": "PO--CK ",
+ "prefailure": true,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 0,
+ "string": "0"
+ }
+ },
+ {
+ "id": 9,
+ "name": "Power_On_Hours",
+ "value": 99,
+ "worst": 99,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 50,
+ "string": "-O--CK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 2463,
+ "string": "2463"
+ }
+ },
+ {
+ "id": 12,
+ "name": "Power_Cycle_Count",
+ "value": 99,
+ "worst": 99,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 50,
+ "string": "-O--CK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 499,
+ "string": "499"
+ }
+ },
+ {
+ "id": 177,
+ "name": "Wear_Leveling_Count",
+ "value": 98,
+ "worst": 98,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 19,
+ "string": "PO--C- ",
+ "prefailure": true,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": false
+ },
+ "raw": {
+ "value": 20,
+ "string": "20"
+ }
+ },
+ {
+ "id": 179,
+ "name": "Used_Rsvd_Blk_Cnt_Tot",
+ "value": 100,
+ "worst": 100,
+ "thresh": 10,
+ "when_failed": "",
+ "flags": {
+ "value": 19,
+ "string": "PO--C- ",
+ "prefailure": true,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": false
+ },
+ "raw": {
+ "value": 0,
+ "string": "0"
+ }
+ },
+ {
+ "id": 181,
+ "name": "Program_Fail_Cnt_Total",
+ "value": 100,
+ "worst": 100,
+ "thresh": 10,
+ "when_failed": "",
+ "flags": {
+ "value": 50,
+ "string": "-O--CK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 0,
+ "string": "0"
+ }
+ },
+ {
+ "id": 182,
+ "name": "Erase_Fail_Count_Total",
+ "value": 100,
+ "worst": 100,
+ "thresh": 10,
+ "when_failed": "",
+ "flags": {
+ "value": 50,
+ "string": "-O--CK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 0,
+ "string": "0"
+ }
+ },
+ {
+ "id": 183,
+ "name": "Runtime_Bad_Block",
+ "value": 100,
+ "worst": 100,
+ "thresh": 10,
+ "when_failed": "",
+ "flags": {
+ "value": 19,
+ "string": "PO--C- ",
+ "prefailure": true,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": false
+ },
+ "raw": {
+ "value": 0,
+ "string": "0"
+ }
+ },
+ {
+ "id": 187,
+ "name": "Uncorrectable_Error_Cnt",
+ "value": 100,
+ "worst": 100,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 50,
+ "string": "-O--CK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 0,
+ "string": "0"
+ }
+ },
+ {
+ "id": 190,
+ "name": "Airflow_Temperature_Cel",
+ "value": 73,
+ "worst": 45,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 50,
+ "string": "-O--CK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 27,
+ "string": "27"
+ }
+ },
+ {
+ "id": 195,
+ "name": "ECC_Error_Rate",
+ "value": 200,
+ "worst": 200,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 26,
+ "string": "-O-RC- ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": true,
+ "event_count": true,
+ "auto_keep": false
+ },
+ "raw": {
+ "value": 0,
+ "string": "0"
+ }
+ },
+ {
+ "id": 199,
+ "name": "CRC_Error_Count",
+ "value": 99,
+ "worst": 99,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 62,
+ "string": "-OSRCK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": true,
+ "error_rate": true,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 1,
+ "string": "1"
+ }
+ },
+ {
+ "id": 235,
+ "name": "POR_Recovery_Count",
+ "value": 99,
+ "worst": 99,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 18,
+ "string": "-O--C- ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": false
+ },
+ "raw": {
+ "value": 39,
+ "string": "39"
+ }
+ },
+ {
+ "id": 241,
+ "name": "Total_LBAs_Written",
+ "value": 99,
+ "worst": 99,
+ "thresh": 0,
+ "when_failed": "",
+ "flags": {
+ "value": 50,
+ "string": "-O--CK ",
+ "prefailure": false,
+ "updated_online": true,
+ "performance": false,
+ "error_rate": false,
+ "event_count": true,
+ "auto_keep": true
+ },
+ "raw": {
+ "value": 19999585737,
+ "string": "19999585737"
+ }
+ }
+ ]
+ },
+ "power_on_time": {
+ "hours": 2515
+ },
+ "power_cycle_count": 508,
+ "temperature": {
+ "current": 29
+ }
+}
diff --git a/test/disk_tests/ssd_smart/sda_smart_expected.json b/test/disk_tests/ssd_smart/sda_smart_expected.json
index a71fab2..36da71e 100644
--- a/test/disk_tests/ssd_smart/sda_smart_expected.json
+++ b/test/disk_tests/ssd_smart/sda_smart_expected.json
@@ -1,236 +1,146 @@
{
- "type" : "ata",
- "health" : "PASSED",
- "attributes" : [
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "Raw_Read_Error_Rate",
- "id" : " 1",
- "flags" : "POSR-K",
- "raw" : "0",
- "fail" : "-",
- "value" : 100
- },
- {
- "worst" : 100,
- "threshold" : 10,
- "name" : "Reallocate_NAND_Blk_Cnt",
- "id" : " 5",
- "flags" : "-O--CK",
- "raw" : "0",
- "fail" : "-",
- "value" : 100
- },
- {
- "name" : "Power_On_Hours",
- "threshold" : 0,
- "worst" : 100,
- "value" : 100,
- "fail" : "-",
- "raw" : "1309",
- "flags" : "-O--CK",
- "id" : " 9"
- },
- {
- "threshold" : 0,
- "name" : "Power_Cycle_Count",
- "worst" : 100,
- "raw" : "200",
- "flags" : "-O--CK",
- "fail" : "-",
- "id" : " 12",
- "value" : 100
- },
- {
- "value" : 100,
- "raw" : "0",
- "flags" : "-O--CK",
- "fail" : "-",
- "id" : "171",
- "threshold" : 0,
- "name" : "Program_Fail_Count",
- "worst" : 100
- },
- {
- "value" : 100,
- "id" : "172",
- "raw" : "0",
- "flags" : "-O--CK",
- "fail" : "-",
- "worst" : 100,
- "threshold" : 0,
- "name" : "Erase_Fail_Count"
- },
- {
- "threshold" : 0,
- "name" : "Ave_Block-Erase_Count",
- "worst" : 100,
- "raw" : "12",
- "flags" : "-O--CK",
- "fail" : "-",
- "id" : "173",
- "value" : 100
- },
- {
- "name" : "Unexpect_Power_Loss_Ct",
- "threshold" : 0,
- "worst" : 100,
- "value" : 100,
- "fail" : "-",
- "raw" : "53",
- "flags" : "-O--CK",
- "id" : "174"
- },
- {
- "raw" : "5565",
- "flags" : "PO--CK",
- "fail" : "-",
- "id" : "180",
- "value" : 0,
- "threshold" : 0,
- "name" : "Unused_Reserve_NAND_Blk",
- "worst" : 0
- },
- {
- "name" : "SATA_Interfac_Downshift",
- "threshold" : 0,
- "worst" : 100,
- "fail" : "-",
- "raw" : "0",
- "flags" : "-O--CK",
- "id" : "183",
- "value" : 100
- },
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "Error_Correction_Count",
- "id" : "184",
- "flags" : "-O--CK",
- "raw" : "0",
- "fail" : "-",
- "value" : 100
- },
- {
- "name" : "Reported_Uncorrect",
- "threshold" : 0,
- "worst" : 100,
- "value" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "raw" : "0",
- "id" : "187"
- },
- {
- "worst" : 54,
- "name" : "Temperature_Celsius",
- "threshold" : 0,
- "id" : "194",
- "fail" : "-",
- "flags" : "-O---K",
- "raw" : "32 (Min/Max 22/46)",
- "value" : 68
- },
- {
- "raw" : "0",
- "flags" : "-O--CK",
- "fail" : "-",
- "id" : "196",
- "value" : 100,
- "threshold" : 0,
- "name" : "Reallocated_Event_Count",
- "worst" : 100
- },
- {
- "id" : "197",
- "fail" : "-",
- "flags" : "-O--CK",
- "raw" : "0",
- "value" : 100,
- "worst" : 100,
- "name" : "Current_Pending_Sector",
- "threshold" : 0
- },
- {
- "threshold" : 0,
- "name" : "Offline_Uncorrectable",
- "worst" : 100,
- "flags" : "----CK",
- "raw" : "0",
- "fail" : "-",
- "id" : "198",
- "value" : 100
- },
- {
- "worst" : 100,
- "name" : "UDMA_CRC_Error_Count",
- "threshold" : 0,
- "id" : "199",
- "fail" : "-",
- "raw" : "0",
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "value" : 100,
- "id" : "202",
- "flags" : "----CK",
- "raw" : "0",
- "fail" : "-",
- "worst" : 100,
- "threshold" : 1,
- "name" : "Percent_Lifetime_Used"
- },
- {
- "name" : "Write_Error_Rate",
- "threshold" : 0,
- "worst" : 100,
- "value" : 100,
- "fail" : "-",
- "raw" : "0",
- "flags" : "-OSR--",
- "id" : "206"
- },
- {
- "name" : "Success_RAIN_Recov_Cnt",
- "threshold" : 0,
- "worst" : 100,
- "fail" : "-",
- "raw" : "0",
- "flags" : "-O--CK",
- "id" : "210",
- "value" : 100
- },
- {
- "value" : 100,
- "id" : "246",
- "fail" : "-",
- "raw" : "6751830403",
- "flags" : "-O--CK",
- "worst" : 100,
- "name" : "Total_Host_Sector_Write",
- "threshold" : 0
- },
- {
- "name" : "Host_Program_Page_Count",
- "threshold" : 0,
- "worst" : 100,
- "fail" : "-",
- "raw" : "211228065",
- "flags" : "-O--CK",
- "id" : "247",
- "value" : 100
- },
- {
- "value" : 100,
- "fail" : "-",
- "raw" : "253276904",
- "flags" : "-O--CK",
- "id" : "248",
- "name" : "Bckgnd_Program_Page_Cnt",
- "threshold" : 0,
- "worst" : 100
- }
- ]
+ "attributes" : [
+ {
+ "fail" : "-",
+ "flags" : "PO--CK",
+ "id" : 5,
+ "name" : "Reallocated_Sector_Ct",
+ "raw" : "0",
+ "threshold" : 10,
+ "value" : 100,
+ "worst" : 100
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--CK",
+ "id" : 9,
+ "name" : "Power_On_Hours",
+ "raw" : "2463",
+ "threshold" : 0,
+ "value" : 99,
+ "worst" : 99
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--CK",
+ "id" : 12,
+ "name" : "Power_Cycle_Count",
+ "raw" : "499",
+ "threshold" : 0,
+ "value" : 99,
+ "worst" : 99
+ },
+ {
+ "fail" : "-",
+ "flags" : "PO--C-",
+ "id" : 177,
+ "name" : "Wear_Leveling_Count",
+ "raw" : "20",
+ "threshold" : 0,
+ "value" : 98,
+ "worst" : 98
+ },
+ {
+ "fail" : "-",
+ "flags" : "PO--C-",
+ "id" : 179,
+ "name" : "Used_Rsvd_Blk_Cnt_Tot",
+ "raw" : "0",
+ "threshold" : 10,
+ "value" : 100,
+ "worst" : 100
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--CK",
+ "id" : 181,
+ "name" : "Program_Fail_Cnt_Total",
+ "raw" : "0",
+ "threshold" : 10,
+ "value" : 100,
+ "worst" : 100
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--CK",
+ "id" : 182,
+ "name" : "Erase_Fail_Count_Total",
+ "raw" : "0",
+ "threshold" : 10,
+ "value" : 100,
+ "worst" : 100
+ },
+ {
+ "fail" : "-",
+ "flags" : "PO--C-",
+ "id" : 183,
+ "name" : "Runtime_Bad_Block",
+ "raw" : "0",
+ "threshold" : 10,
+ "value" : 100,
+ "worst" : 100
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--CK",
+ "id" : 187,
+ "name" : "Uncorrectable_Error_Cnt",
+ "raw" : "0",
+ "threshold" : 0,
+ "value" : 100,
+ "worst" : 100
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--CK",
+ "id" : 190,
+ "name" : "Airflow_Temperature_Cel",
+ "raw" : "27",
+ "threshold" : 0,
+ "value" : 73,
+ "worst" : 45
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O-RC-",
+ "id" : 195,
+ "name" : "ECC_Error_Rate",
+ "raw" : "0",
+ "threshold" : 0,
+ "value" : 200,
+ "worst" : 200
+ },
+ {
+ "fail" : "-",
+ "flags" : "-OSRCK",
+ "id" : 199,
+ "name" : "CRC_Error_Count",
+ "raw" : "1",
+ "threshold" : 0,
+ "value" : 99,
+ "worst" : 99
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--C-",
+ "id" : 235,
+ "name" : "POR_Recovery_Count",
+ "raw" : "39",
+ "threshold" : 0,
+ "value" : 99,
+ "worst" : 99
+ },
+ {
+ "fail" : "-",
+ "flags" : "-O--CK",
+ "id" : 241,
+ "name" : "Total_LBAs_Written",
+ "raw" : "19999585737",
+ "threshold" : 0,
+ "value" : 99,
+ "worst" : 99
+ }
+ ],
+ "health" : "PASSED",
+ "type" : "ata"
}
diff --git a/test/disk_tests/ssd_smart/sda_udevadm b/test/disk_tests/ssd_smart/sda_udevadm
index 3290a13..f662221 100644
--- a/test/disk_tests/ssd_smart/sda_udevadm
+++ b/test/disk_tests/ssd_smart/sda_udevadm
@@ -2,9 +2,9 @@ E: DEVNAME=/dev/sda
E: DEVTYPE=disk
E: ID_ATA_ROTATION_RATE_RPM=0
E: ID_BUS=ata
-E: ID_MODEL=Crucial_CT500MX200SSD1
+E: ID_MODEL=Samsung_SSD_860_EVO_1TB
E: ID_PART_TABLE_TYPE=gpt
-E: ID_SERIAL=Crucial_CT500MX200SSD1_000000000000
+E: ID_SERIAL=Samsung_SSD_860_EVO_1TB_000000000000000
E: ID_SERIAL_SHORT=000000000000
E: ID_TYPE=disk
E: ID_WWN=0x0000000000000000
diff --git a/test/disk_tests/ssd_smart/sdb/device/vendor b/test/disk_tests/ssd_smart/sdb/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/ssd_smart/sdb/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/ssd_smart/sdb/queue/rotational b/test/disk_tests/ssd_smart/sdb/queue/rotational
deleted file mode 100644
index 573541a..0000000
--- a/test/disk_tests/ssd_smart/sdb/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/test/disk_tests/ssd_smart/sdb/size b/test/disk_tests/ssd_smart/sdb/size
deleted file mode 100644
index 83b33d2..0000000
--- a/test/disk_tests/ssd_smart/sdb/size
+++ /dev/null
@@ -1 +0,0 @@
-1000
diff --git a/test/disk_tests/ssd_smart/sdb_smart b/test/disk_tests/ssd_smart/sdb_smart
deleted file mode 100644
index 79eea84..0000000
--- a/test/disk_tests/ssd_smart/sdb_smart
+++ /dev/null
@@ -1,41 +0,0 @@
-smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.4.21-1-pve] (local build)
-Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART Attributes Data Structure revision number: 1
-Vendor Specific SMART Attributes with Thresholds:
-ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
- 5 Reallocated_Sector_Ct -O--CK 100 100 000 - 0
- 9 Power_On_Hours -O--CK 100 100 000 - 1259
- 12 Power_Cycle_Count -O--CK 100 100 000 - 191
-170 Available_Reservd_Space PO--CK 100 100 010 - 0
-171 Program_Fail_Count -O--CK 100 100 000 - 0
-172 Erase_Fail_Count -O--CK 100 100 000 - 0
-174 Unsafe_Shutdown_Count -O--CK 100 100 000 - 164
-175 Power_Loss_Cap_Test PO--CK 100 100 010 - 5670 (1 343)
-183 SATA_Downshift_Count -O--CK 100 100 000 - 0
-184 End-to-End_Error PO--CK 100 100 090 - 0
-187 Reported_Uncorrect -O--CK 100 100 000 - 0
-190 Temperature_Case -O---K 072 071 000 - 28 (Min/Max 21/30)
-192 Unsafe_Shutdown_Count -O--CK 100 100 000 - 164
-194 Temperature_Internal -O---K 100 100 000 - 28
-197 Current_Pending_Sector -O--C- 100 100 000 - 0
-199 CRC_Error_Count -OSRCK 100 100 000 - 0
-225 Host_Writes_32MiB -O--CK 100 100 000 - 296600
-226 Workld_Media_Wear_Indic -O--CK 100 100 000 - 3747
-227 Workld_Host_Reads_Perc -O--CK 100 100 000 - 0
-228 Workload_Minutes -O--CK 100 100 000 - 75111
-232 Available_Reservd_Space PO--CK 100 100 010 - 0
-233 Media_Wearout_Indicator -O--CK 097 097 000 - 0
-234 Thermal_Throttle -O--CK 100 100 000 - 0/0
-241 Host_Writes_32MiB -O--CK 100 100 000 - 296600
-242 Host_Reads_32MiB -O--CK 100 100 000 - 1207
- ||||||_ K auto-keep
- |||||__ C event count
- ||||___ R error rate
- |||____ S speed/performance
- ||_____ O updated online
- |______ P prefailure warning
-
diff --git a/test/disk_tests/ssd_smart/sdb_smart_expected.json b/test/disk_tests/ssd_smart/sdb_smart_expected.json
deleted file mode 100644
index 6f55c3e..0000000
--- a/test/disk_tests/ssd_smart/sdb_smart_expected.json
+++ /dev/null
@@ -1,256 +0,0 @@
-{
- "health" : "PASSED",
- "type" : "ata",
- "attributes" : [
- {
- "name" : "Reallocated_Sector_Ct",
- "threshold" : 0,
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "raw" : "0",
- "id" : " 5",
- "value" : 100
- },
- {
- "worst" : 100,
- "name" : "Power_On_Hours",
- "threshold" : 0,
- "id" : " 9",
- "fail" : "-",
- "raw" : "1259",
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "value" : 100,
- "id" : " 12",
- "raw" : "191",
- "flags" : "-O--CK",
- "fail" : "-",
- "worst" : 100,
- "threshold" : 0,
- "name" : "Power_Cycle_Count"
- },
- {
- "id" : "170",
- "raw" : "0",
- "flags" : "PO--CK",
- "fail" : "-",
- "value" : 100,
- "worst" : 100,
- "threshold" : 10,
- "name" : "Available_Reservd_Space"
- },
- {
- "threshold" : 0,
- "name" : "Program_Fail_Count",
- "worst" : 100,
- "value" : 100,
- "raw" : "0",
- "flags" : "-O--CK",
- "fail" : "-",
- "id" : "171"
- },
- {
- "worst" : 100,
- "name" : "Erase_Fail_Count",
- "threshold" : 0,
- "id" : "172",
- "fail" : "-",
- "flags" : "-O--CK",
- "raw" : "0",
- "value" : 100
- },
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "Unsafe_Shutdown_Count",
- "value" : 100,
- "id" : "174",
- "raw" : "164",
- "flags" : "-O--CK",
- "fail" : "-"
- },
- {
- "value" : 100,
- "fail" : "-",
- "flags" : "PO--CK",
- "raw" : "5670 (1 343)",
- "id" : "175",
- "name" : "Power_Loss_Cap_Test",
- "threshold" : 10,
- "worst" : 100
- },
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "SATA_Downshift_Count",
- "value" : 100,
- "id" : "183",
- "raw" : "0",
- "flags" : "-O--CK",
- "fail" : "-"
- },
- {
- "worst" : 100,
- "name" : "End-to-End_Error",
- "threshold" : 90,
- "value" : 100,
- "id" : "184",
- "fail" : "-",
- "raw" : "0",
- "flags" : "PO--CK"
- },
- {
- "worst" : 100,
- "name" : "Reported_Uncorrect",
- "threshold" : 0,
- "value" : 100,
- "id" : "187",
- "fail" : "-",
- "raw" : "0",
- "flags" : "-O--CK"
- },
- {
- "worst" : 71,
- "name" : "Temperature_Case",
- "threshold" : 0,
- "id" : "190",
- "fail" : "-",
- "raw" : "28 (Min/Max 21/30)",
- "flags" : "-O---K",
- "value" : 72
- },
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "Unsafe_Shutdown_Count",
- "value" : 100,
- "id" : "192",
- "raw" : "164",
- "flags" : "-O--CK",
- "fail" : "-"
- },
- {
- "id" : "194",
- "fail" : "-",
- "raw" : "28",
- "flags" : "-O---K",
- "value" : 100,
- "worst" : 100,
- "name" : "Temperature_Internal",
- "threshold" : 0
- },
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "Current_Pending_Sector",
- "value" : 100,
- "id" : "197",
- "raw" : "0",
- "flags" : "-O--C-",
- "fail" : "-"
- },
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "CRC_Error_Count",
- "value" : 100,
- "id" : "199",
- "flags" : "-OSRCK",
- "raw" : "0",
- "fail" : "-"
- },
- {
- "worst" : 100,
- "name" : "Host_Writes_32MiB",
- "threshold" : 0,
- "id" : "225",
- "fail" : "-",
- "flags" : "-O--CK",
- "raw" : "296600",
- "value" : 100
- },
- {
- "value" : 100,
- "id" : "226",
- "raw" : "3747",
- "flags" : "-O--CK",
- "fail" : "-",
- "worst" : 100,
- "threshold" : 0,
- "name" : "Workld_Media_Wear_Indic"
- },
- {
- "worst" : 100,
- "threshold" : 0,
- "name" : "Workld_Host_Reads_Perc",
- "id" : "227",
- "raw" : "0",
- "flags" : "-O--CK",
- "fail" : "-",
- "value" : 100
- },
- {
- "threshold" : 0,
- "name" : "Workload_Minutes",
- "worst" : 100,
- "raw" : "75111",
- "flags" : "-O--CK",
- "fail" : "-",
- "id" : "228",
- "value" : 100
- },
- {
- "fail" : "-",
- "raw" : "0",
- "flags" : "PO--CK",
- "id" : "232",
- "value" : 100,
- "name" : "Available_Reservd_Space",
- "threshold" : 10,
- "worst" : 100
- },
- {
- "value" : 97,
- "fail" : "-",
- "flags" : "-O--CK",
- "raw" : "0",
- "id" : "233",
- "name" : "Media_Wearout_Indicator",
- "threshold" : 0,
- "worst" : 97
- },
- {
- "value" : 100,
- "fail" : "-",
- "raw" : "0/0",
- "flags" : "-O--CK",
- "id" : "234",
- "name" : "Thermal_Throttle",
- "threshold" : 0,
- "worst" : 100
- },
- {
- "worst" : 100,
- "name" : "Host_Writes_32MiB",
- "threshold" : 0,
- "id" : "241",
- "fail" : "-",
- "raw" : "296600",
- "flags" : "-O--CK",
- "value" : 100
- },
- {
- "value" : 100,
- "id" : "242",
- "fail" : "-",
- "raw" : "1207",
- "flags" : "-O--CK",
- "worst" : 100,
- "name" : "Host_Reads_32MiB",
- "threshold" : 0
- }
- ]
-}
diff --git a/test/disk_tests/ssd_smart/sdb_udevadm b/test/disk_tests/ssd_smart/sdb_udevadm
deleted file mode 100644
index bb723c8..0000000
--- a/test/disk_tests/ssd_smart/sdb_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdb
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=INTEL_SSDSC2BB080G6
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=21c18951-8568-488c-a2a8-24441eb4b165
-E: ID_SERIAL=INTEL_SSDSC2BB080G6_000000000000000000
-E: ID_SERIAL_SHORT=000000000000000000
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/ssd_smart/sdc/device/vendor b/test/disk_tests/ssd_smart/sdc/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/ssd_smart/sdc/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/ssd_smart/sdc/queue/rotational b/test/disk_tests/ssd_smart/sdc/queue/rotational
deleted file mode 100644
index 573541a..0000000
--- a/test/disk_tests/ssd_smart/sdc/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/test/disk_tests/ssd_smart/sdc/size b/test/disk_tests/ssd_smart/sdc/size
deleted file mode 100644
index 83b33d2..0000000
--- a/test/disk_tests/ssd_smart/sdc/size
+++ /dev/null
@@ -1 +0,0 @@
-1000
diff --git a/test/disk_tests/ssd_smart/sdc_smart b/test/disk_tests/ssd_smart/sdc_smart
deleted file mode 100644
index 927f6d2..0000000
--- a/test/disk_tests/ssd_smart/sdc_smart
+++ /dev/null
@@ -1,16 +0,0 @@
-smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.4.8-1-pve] (local build)
-Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART Attributes Data Structure revision number: 1
-Vendor Specific SMART Attributes with Thresholds:
-ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
-177 Wear_Leveling_Count PO--CK 099 099 000 - 34
- ||||||_ K auto-keep
- |||||__ C event count
- ||||___ R error rate
- |||____ S speed/performance
- ||_____ O updated onlinie
- |______ P prefailure warning
diff --git a/test/disk_tests/ssd_smart/sdc_smart_expected.json b/test/disk_tests/ssd_smart/sdc_smart_expected.json
deleted file mode 100644
index f0cffcf..0000000
--- a/test/disk_tests/ssd_smart/sdc_smart_expected.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "type" : "ata",
- "health" : "PASSED",
- "attributes" : [
- {
- "value" : 99,
- "fail" : "-",
- "raw" : "34",
- "flags" : "PO--CK",
- "id" : "177",
- "name" : "Wear_Leveling_Count",
- "threshold" : 0,
- "worst" : 99
- }
- ]
-}
diff --git a/test/disk_tests/ssd_smart/sdc_udevadm b/test/disk_tests/ssd_smart/sdc_udevadm
deleted file mode 100644
index 5adb3ef..0000000
--- a/test/disk_tests/ssd_smart/sdc_udevadm
+++ /dev/null
@@ -1,11 +0,0 @@
-E: DEVNAME=/dev/sdc
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=Samsung SSD 850 PRO 512GB
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_SERIAL=SAMSUNG_00000000
-E: ID_SERIAL_SHORT=000000000000
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-
diff --git a/test/disk_tests/ssd_smart/sdd/device/vendor b/test/disk_tests/ssd_smart/sdd/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/ssd_smart/sdd/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/ssd_smart/sdd/queue/rotational b/test/disk_tests/ssd_smart/sdd/queue/rotational
deleted file mode 100644
index 573541a..0000000
--- a/test/disk_tests/ssd_smart/sdd/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/test/disk_tests/ssd_smart/sdd/size b/test/disk_tests/ssd_smart/sdd/size
deleted file mode 100644
index 83b33d2..0000000
--- a/test/disk_tests/ssd_smart/sdd/size
+++ /dev/null
@@ -1 +0,0 @@
-1000
diff --git a/test/disk_tests/ssd_smart/sdd_smart b/test/disk_tests/ssd_smart/sdd_smart
deleted file mode 100644
index 2ad16af..0000000
--- a/test/disk_tests/ssd_smart/sdd_smart
+++ /dev/null
@@ -1,40 +0,0 @@
-smartctl 6.4 2014-10-07 r4002 [x86_64-linux-4.4.19-1-pve] (local build)
-Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART Attributes Data Structure revision number: 4
-Vendor Specific SMART Attributes with Thresholds:
-ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
- 5 Reallocated_Sector_Ct -O--CK 100 100 --- - 0
- 9 Power_On_Hours -O--CK 100 100 --- - 799
- 12 Power_Cycle_Count -O--CK 100 100 --- - 92
-165 Unknown_Attribute -O--CK 100 100 --- - 9699447
-166 Unknown_Attribute -O--CK 100 100 --- - 1
-167 Unknown_Attribute -O--CK 100 100 --- - 46
-168 Unknown_Attribute -O--CK 100 100 --- - 5
-169 Unknown_Attribute -O--CK 100 100 --- - 1079
-170 Unknown_Attribute -O--CK 100 100 --- - 0
-171 Unknown_Attribute -O--CK 100 100 --- - 0
-172 Unknown_Attribute -O--CK 100 100 --- - 0
-173 Unknown_Attribute -O--CK 100 100 --- - 1
-174 Unknown_Attribute -O--CK 100 100 --- - 22
-184 End-to-End_Error -O--CK 100 100 --- - 0
-187 Reported_Uncorrect -O--CK 100 100 --- - 0
-188 Command_Timeout -O--CK 100 100 --- - 0
-194 Temperature_Celsius -O---K 073 064 --- - 27 (Min/Max 23/64)
-199 UDMA_CRC_Error_Count -O--CK 100 100 --- - 0
-230 Unknown_SSD_Attribute -O--CK 100 100 --- - 146029805602
-232 Available_Reservd_Space PO--CK 100 100 004 - 100
-233 Media_Wearout_Indicator -O--CK 100 100 --- - 1574
-234 Unknown_Attribute -O--CK 100 100 --- - 2303
-241 Total_LBAs_Written ----CK 253 253 --- - 2111
-242 Total_LBAs_Read ----CK 253 253 --- - 1542
-244 Unknown_Attribute -O--CK 000 100 --- - 0
- ||||||_ K auto-keep
- |||||__ C event count
- ||||___ R error rate
- |||____ S speed/performance
- ||_____ O updated online
- |______ P prefailure warning
diff --git a/test/disk_tests/ssd_smart/sdd_smart_expected.json b/test/disk_tests/ssd_smart/sdd_smart_expected.json
deleted file mode 100644
index a85e7d7..0000000
--- a/test/disk_tests/ssd_smart/sdd_smart_expected.json
+++ /dev/null
@@ -1,256 +0,0 @@
-{
- "attributes" : [
- {
- "id" : " 5",
- "flags" : "-O--CK",
- "fail" : "-",
- "worst" : 100,
- "raw" : "0",
- "threshold" : 0,
- "value" : 100,
- "name" : "Reallocated_Sector_Ct"
- },
- {
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : " 9",
- "name" : "Power_On_Hours",
- "threshold" : 0,
- "value" : 100,
- "raw" : "799"
- },
- {
- "name" : "Power_Cycle_Count",
- "raw" : "92",
- "threshold" : 0,
- "value" : 100,
- "fail" : "-",
- "worst" : 100,
- "id" : " 12",
- "flags" : "-O--CK"
- },
- {
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "165",
- "name" : "Unknown_Attribute",
- "threshold" : 0,
- "value" : 100,
- "raw" : "9699447"
- },
- {
- "value" : 100,
- "threshold" : 0,
- "raw" : "1",
- "name" : "Unknown_Attribute",
- "flags" : "-O--CK",
- "id" : "166",
- "worst" : 100,
- "fail" : "-"
- },
- {
- "id" : "167",
- "flags" : "-O--CK",
- "fail" : "-",
- "worst" : 100,
- "raw" : "46",
- "value" : 100,
- "threshold" : 0,
- "name" : "Unknown_Attribute"
- },
- {
- "name" : "Unknown_Attribute",
- "raw" : "5",
- "value" : 100,
- "threshold" : 0,
- "fail" : "-",
- "worst" : 100,
- "id" : "168",
- "flags" : "-O--CK"
- },
- {
- "flags" : "-O--CK",
- "id" : "169",
- "worst" : 100,
- "fail" : "-",
- "value" : 100,
- "threshold" : 0,
- "raw" : "1079",
- "name" : "Unknown_Attribute"
- },
- {
- "raw" : "0",
- "threshold" : 0,
- "value" : 100,
- "name" : "Unknown_Attribute",
- "id" : "170",
- "flags" : "-O--CK",
- "fail" : "-",
- "worst" : 100
- },
- {
- "fail" : "-",
- "worst" : 100,
- "id" : "171",
- "flags" : "-O--CK",
- "name" : "Unknown_Attribute",
- "raw" : "0",
- "value" : 100,
- "threshold" : 0
- },
- {
- "name" : "Unknown_Attribute",
- "raw" : "0",
- "value" : 100,
- "threshold" : 0,
- "fail" : "-",
- "worst" : 100,
- "id" : "172",
- "flags" : "-O--CK"
- },
- {
- "name" : "Unknown_Attribute",
- "threshold" : 0,
- "value" : 100,
- "raw" : "1",
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "173"
- },
- {
- "name" : "Unknown_Attribute",
- "value" : 100,
- "threshold" : 0,
- "raw" : "22",
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "174"
- },
- {
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "184",
- "name" : "End-to-End_Error",
- "value" : 100,
- "threshold" : 0,
- "raw" : "0"
- },
- {
- "name" : "Reported_Uncorrect",
- "value" : 100,
- "threshold" : 0,
- "raw" : "0",
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "187"
- },
- {
- "name" : "Command_Timeout",
- "raw" : "0",
- "value" : 100,
- "threshold" : 0,
- "fail" : "-",
- "worst" : 100,
- "id" : "188",
- "flags" : "-O--CK"
- },
- {
- "threshold" : 0,
- "value" : 73,
- "raw" : "27 (Min/Max 23/64)",
- "name" : "Temperature_Celsius",
- "flags" : "-O---K",
- "id" : "194",
- "worst" : 64,
- "fail" : "-"
- },
- {
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "199",
- "name" : "UDMA_CRC_Error_Count",
- "value" : 100,
- "threshold" : 0,
- "raw" : "0"
- },
- {
- "name" : "Unknown_SSD_Attribute",
- "threshold" : 0,
- "value" : 100,
- "raw" : "146029805602",
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "230"
- },
- {
- "raw" : "100",
- "value" : 100,
- "threshold" : 4,
- "name" : "Available_Reservd_Space",
- "id" : "232",
- "flags" : "PO--CK",
- "fail" : "-",
- "worst" : 100
- },
- {
- "threshold" : 0,
- "value" : 100,
- "raw" : "1574",
- "name" : "Media_Wearout_Indicator",
- "flags" : "-O--CK",
- "id" : "233",
- "worst" : 100,
- "fail" : "-"
- },
- {
- "id" : "234",
- "flags" : "-O--CK",
- "fail" : "-",
- "worst" : 100,
- "raw" : "2303",
- "value" : 100,
- "threshold" : 0,
- "name" : "Unknown_Attribute"
- },
- {
- "fail" : "-",
- "worst" : 253,
- "id" : "241",
- "flags" : "----CK",
- "name" : "Total_LBAs_Written",
- "raw" : "2111",
- "value" : 253,
- "threshold" : 0
- },
- {
- "worst" : 253,
- "fail" : "-",
- "flags" : "----CK",
- "id" : "242",
- "name" : "Total_LBAs_Read",
- "threshold" : 0,
- "value" : 253,
- "raw" : "1542"
- },
- {
- "name" : "Unknown_Attribute",
- "value" : 0,
- "threshold" : 0,
- "raw" : "0",
- "worst" : 100,
- "fail" : "-",
- "flags" : "-O--CK",
- "id" : "244"
- }
- ],
- "type" : "ata",
- "health" : "PASSED"
-}
diff --git a/test/disk_tests/ssd_smart/sdd_udevadm b/test/disk_tests/ssd_smart/sdd_udevadm
deleted file mode 100644
index d46a7d4..0000000
--- a/test/disk_tests/ssd_smart/sdd_udevadm
+++ /dev/null
@@ -1,11 +0,0 @@
-E: DEVNAME=/dev/sdd
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=SanDisk SD8SB8U1T001122
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_SERIAL=SANDISK_00000000000
-E: ID_SERIAL_SHORT=000000000000
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-
diff --git a/test/disk_tests/ssd_smart/sde/device/vendor b/test/disk_tests/ssd_smart/sde/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/ssd_smart/sde/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/ssd_smart/sde/queue/rotational b/test/disk_tests/ssd_smart/sde/queue/rotational
deleted file mode 100644
index 573541a..0000000
--- a/test/disk_tests/ssd_smart/sde/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/test/disk_tests/ssd_smart/sde/size b/test/disk_tests/ssd_smart/sde/size
deleted file mode 100644
index 83b33d2..0000000
--- a/test/disk_tests/ssd_smart/sde/size
+++ /dev/null
@@ -1 +0,0 @@
-1000
diff --git a/test/disk_tests/ssd_smart/sde_smart b/test/disk_tests/ssd_smart/sde_smart
deleted file mode 100644
index f6f01d6..0000000
--- a/test/disk_tests/ssd_smart/sde_smart
+++ /dev/null
@@ -1,40 +0,0 @@
-smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.65-1-pve] (local build)
-Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
-
-=== START OF READ SMART DATA SECTION ===
-SMART overall-health self-assessment test result: PASSED
-
-SMART Attributes Data Structure revision number: 10
-Vendor Specific SMART Attributes with Thresholds:
-ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
- 1 Raw_Read_Error_Rate -O--CK 120 120 050 - 0/0
- 5 Retired_Block_Count PO--CK 100 100 003 - 0
- 9 Power_On_Hours_and_Msec -O--CK 091 091 000 - 7963h+07m+54.620s
- 12 Power_Cycle_Count -O--CK 099 099 000 - 1153
-171 Program_Fail_Count -O-R-- 100 100 000 - 0
-172 Erase_Fail_Count -O--CK 100 100 000 - 0
-174 Unexpect_Power_Loss_Ct ----CK 000 000 000 - 113
-177 Wear_Range_Delta ------ 000 000 000 - 1
-181 Program_Fail_Count -O-R-- 100 100 000 - 0
-182 Erase_Fail_Count -O--CK 100 100 000 - 0
-187 Reported_Uncorrect -O--C- 100 100 000 - 0
-189 Airflow_Temperature_Cel ------ 027 049 000 - 27 (Min/Max 2/49)
-194 Temperature_Celsius -O---K 027 049 000 - 27 (Min/Max 2/49)
-195 ECC_Uncorr_Error_Count --SRC- 120 120 000 - 0/0
-196 Reallocated_Event_Count PO--CK 100 100 003 - 0
-201 Unc_Soft_Read_Err_Rate --SRC- 120 120 000 - 0/0
-204 Soft_ECC_Correct_Rate --SRC- 120 120 000 - 0/0
-230 Life_Curve_Status PO--C- 100 100 000 - 100
-231 SSD_Life_Left ------ 091 091 011 - 4294967296
-233 SandForce_Internal -O--CK 000 000 000 - 6317
-234 SandForce_Internal -O--CK 000 000 000 - 4252
-241 Lifetime_Writes_GiB -O--CK 000 000 000 - 4252
-242 Lifetime_Reads_GiB -O--CK 000 000 000 - 34599
-244 Unknown_Attribute ------ 099 099 010 - 4063273
- ||||||_ K auto-keep
- |||||__ C event count
- ||||___ R error rate
- |||____ S speed/performance
- ||_____ O updated online
- |______ P prefailure warning
-
diff --git a/test/disk_tests/ssd_smart/sde_smart_expected.json b/test/disk_tests/ssd_smart/sde_smart_expected.json
deleted file mode 100644
index 1d45c1d..0000000
--- a/test/disk_tests/ssd_smart/sde_smart_expected.json
+++ /dev/null
@@ -1,246 +0,0 @@
-{
- "health": "PASSED",
- "type": "ata",
- "attributes": [
- {
- "fail": "-",
- "id": " 1",
- "raw": "0/0",
- "flags": "-O--CK",
- "name": "Raw_Read_Error_Rate",
- "threshold": 50,
- "value": 120,
- "worst": 120
- },
- {
- "id": " 5",
- "fail": "-",
- "value": 100,
- "worst": 100,
- "threshold": 3,
- "name": "Retired_Block_Count",
- "flags": "PO--CK",
- "raw": "0"
- },
- {
- "fail": "-",
- "id": " 9",
- "raw": "7963h+07m+54.620s",
- "flags": "-O--CK",
- "worst": 91,
- "value": 91,
- "name": "Power_On_Hours_and_Msec",
- "threshold": 0
- },
- {
- "id": " 12",
- "fail": "-",
- "threshold": 0,
- "name": "Power_Cycle_Count",
- "worst": 99,
- "value": 99,
- "flags": "-O--CK",
- "raw": "1153"
- },
- {
- "flags": "-O-R--",
- "raw": "0",
- "worst": 100,
- "value": 100,
- "threshold": 0,
- "name": "Program_Fail_Count",
- "fail": "-",
- "id": "171"
- },
- {
- "fail": "-",
- "id": "172",
- "flags": "-O--CK",
- "raw": "0",
- "name": "Erase_Fail_Count",
- "threshold": 0,
- "worst": 100,
- "value": 100
- },
- {
- "fail": "-",
- "id": "174",
- "raw": "113",
- "flags": "----CK",
- "value": 0,
- "worst": 0,
- "threshold": 0,
- "name": "Unexpect_Power_Loss_Ct"
- },
- {
- "id": "177",
- "fail": "-",
- "value": 0,
- "worst": 0,
- "name": "Wear_Range_Delta",
- "threshold": 0,
- "flags": "------",
- "raw": "1"
- },
- {
- "flags": "-O-R--",
- "raw": "0",
- "threshold": 0,
- "name": "Program_Fail_Count",
- "worst": 100,
- "value": 100,
- "fail": "-",
- "id": "181"
- },
- {
- "threshold": 0,
- "name": "Erase_Fail_Count",
- "value": 100,
- "worst": 100,
- "flags": "-O--CK",
- "raw": "0",
- "id": "182",
- "fail": "-"
- },
- {
- "flags": "-O--C-",
- "raw": "0",
- "value": 100,
- "worst": 100,
- "threshold": 0,
- "name": "Reported_Uncorrect",
- "fail": "-",
- "id": "187"
- },
- {
- "value": 27,
- "worst": 49,
- "name": "Airflow_Temperature_Cel",
- "threshold": 0,
- "flags": "------",
- "raw": "27 (Min/Max 2/49)",
- "id": "189",
- "fail": "-"
- },
- {
- "threshold": 0,
- "name": "Temperature_Celsius",
- "worst": 49,
- "value": 27,
- "flags": "-O---K",
- "raw": "27 (Min/Max 2/49)",
- "id": "194",
- "fail": "-"
- },
- {
- "id": "195",
- "fail": "-",
- "worst": 120,
- "value": 120,
- "threshold": 0,
- "name": "ECC_Uncorr_Error_Count",
- "raw": "0/0",
- "flags": "--SRC-"
- },
- {
- "fail": "-",
- "id": "196",
- "raw": "0",
- "flags": "PO--CK",
- "threshold": 3,
- "name": "Reallocated_Event_Count",
- "value": 100,
- "worst": 100
- },
- {
- "value": 120,
- "worst": 120,
- "threshold": 0,
- "name": "Unc_Soft_Read_Err_Rate",
- "flags": "--SRC-",
- "raw": "0/0",
- "id": "201",
- "fail": "-"
- },
- {
- "raw": "0/0",
- "flags": "--SRC-",
- "value": 120,
- "worst": 120,
- "threshold": 0,
- "name": "Soft_ECC_Correct_Rate",
- "fail": "-",
- "id": "204"
- },
- {
- "value": 100,
- "worst": 100,
- "threshold": 0,
- "name": "Life_Curve_Status",
- "raw": "100",
- "flags": "PO--C-",
- "id": "230",
- "fail": "-"
- },
- {
- "id": "231",
- "fail": "-",
- "worst": 91,
- "value": 91,
- "name": "SSD_Life_Left",
- "threshold": 11,
- "flags": "------",
- "raw": "4294967296"
- },
- {
- "raw": "6317",
- "flags": "-O--CK",
- "name": "SandForce_Internal",
- "threshold": 0,
- "value": 0,
- "worst": 0,
- "fail": "-",
- "id": "233"
- },
- {
- "value": 0,
- "worst": 0,
- "name": "SandForce_Internal",
- "threshold": 0,
- "flags": "-O--CK",
- "raw": "4252",
- "id": "234",
- "fail": "-"
- },
- {
- "worst": 0,
- "value": 0,
- "name": "Lifetime_Writes_GiB",
- "threshold": 0,
- "flags": "-O--CK",
- "raw": "4252",
- "id": "241",
- "fail": "-"
- },
- {
- "flags": "-O--CK",
- "raw": "34599",
- "value": 0,
- "worst": 0,
- "threshold": 0,
- "name": "Lifetime_Reads_GiB",
- "fail": "-",
- "id": "242"
- },
- {
- "threshold": 10,
- "name": "Unknown_Attribute",
- "worst": 99,
- "value": 99,
- "flags": "------",
- "raw": "4063273",
- "id": "244",
- "fail": "-"
- }
- ]
-}
diff --git a/test/disk_tests/ssd_smart/sde_udevadm b/test/disk_tests/ssd_smart/sde_udevadm
deleted file mode 100644
index 440c33a..0000000
--- a/test/disk_tests/ssd_smart/sde_udevadm
+++ /dev/null
@@ -1,11 +0,0 @@
-E: DEVNAME=/dev/sde
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=KINGSTON SHFS37A120G
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_SERIAL=KINGSTON_00000000000
-E: ID_SERIAL_SHORT=000000000000
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-
diff --git a/test/disk_tests/usages/disklist b/test/disk_tests/usages/disklist
deleted file mode 100644
index 648bea5..0000000
--- a/test/disk_tests/usages/disklist
+++ /dev/null
@@ -1,14 +0,0 @@
-sda
-sdb
-sdc
-sdd
-sde
-sdf
-sdg
-sdh
-sdi
-sdj
-sdk
-sdl
-sdm
-sdn
diff --git a/test/disk_tests/usages/disklist_expected.json b/test/disk_tests/usages/disklist_expected.json
deleted file mode 100644
index 93dc251..0000000
--- a/test/disk_tests/usages/disklist_expected.json
+++ /dev/null
@@ -1,222 +0,0 @@
-{
- "sdf" : {
- "gpt" : 1,
- "rpm" : 0,
- "size" : 1536000,
- "type" : "hdd",
- "osdencrypted": 0,
- "osdid" : "444",
- "bluestore" : "0",
- "health" : "UNKNOWN",
- "model" : "MODEL1",
- "used" : "mounted",
- "wearout" : "N/A",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdf",
- "vendor" : "ATA",
- "serial" : "SERIAL1"
- },
- "sde" : {
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sde",
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "health" : "UNKNOWN",
- "rpm" : 0,
- "size" : 1536000,
- "gpt" : 1,
- "osdid" : -1,
- "type" : "hdd",
- "model" : "MODEL1",
- "used" : "Device Mapper",
- "wearout" : "N/A"
- },
- "sdb" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdb",
- "model" : "MODEL1",
- "used" : "LVM",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "osdid" : -1
- },
- "sda" : {
- "model" : "MODEL1",
- "used" : "mounted",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "osdid" : -1,
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sda"
- },
- "sdc" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "devpath" : "/dev/sdc",
- "wwn" : "0x0000000000000000",
- "used" : "ZFS",
- "wearout" : "N/A",
- "model" : "MODEL1",
- "health" : "UNKNOWN",
- "type" : "hdd",
- "osdid" : -1,
- "gpt" : 1,
- "rpm" : 0,
- "size" : 1536000
- },
- "sdd" : {
- "model" : "MODEL1",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "size" : 1536000,
- "rpm" : 0,
- "gpt" : 1,
- "type" : "hdd",
- "osdid" : -1,
- "serial" : "SERIAL1",
- "used": "ZFS",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdd"
- },
- "sdg" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdg",
- "model" : "MODEL1",
- "used" : "LVM",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "bluestore": 1,
- "osdencrypted": 0,
- "osdid" : 1
- },
- "sdh" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdh",
- "model" : "MODEL1",
- "used" : "LVM",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "journals": 1,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "osdid" : -1
- },
- "sdi" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdi",
- "model" : "MODEL1",
- "used" : "LVM",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "db": 1,
- "osdid" : -1
- },
- "sdj" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdj",
- "model" : "MODEL1",
- "used" : "LVM",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "bluestore": 0,
- "type" : "hdd",
- "osdencrypted": 1,
- "osdid" : 0
- },
- "sdk" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdk",
- "model" : "MODEL1",
- "used" : "LVM",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "bluestore": 0,
- "type" : "hdd",
- "osdencrypted": 0,
- "osdid" : 230
- },
- "sdl" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdl",
- "model" : "MODEL1",
- "used" : "LVM",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "osdid" : -1
- },
- "sdm" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdm",
- "model" : "MODEL1",
- "used" : "ZFS",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 1,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "osdid" : -1
- },
- "sdn" : {
- "serial" : "SERIAL1",
- "vendor" : "ATA",
- "wwn" : "0x0000000000000000",
- "devpath" : "/dev/sdn",
- "model" : "MODEL1",
- "used" : "xfs",
- "wearout" : "N/A",
- "health" : "UNKNOWN",
- "gpt" : 0,
- "size" : 1536000,
- "rpm" : 0,
- "type" : "hdd",
- "osdid" : -1
- }
-}
diff --git a/test/disk_tests/usages/lsblk b/test/disk_tests/usages/lsblk
deleted file mode 100644
index 6a725ab..0000000
--- a/test/disk_tests/usages/lsblk
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "blockdevices": [
- {"path":"/dev/sdm", "parttype":null, "fstype":null},
- {"path":"/dev/sdm1", "parttype":"6a898cc3-1dd2-11b2-99a6-080020736631", "fstype":"zfs_member"},
- {"path":"/dev/sdm9", "parttype":"6a945a3b-1dd2-11b2-99a6-080020736631", "fstype":null},
- {"path":"/dev/sdn", "parttype":null, "fstype":"xfs"}
- ]
-}
diff --git a/test/disk_tests/usages/lvs b/test/disk_tests/usages/lvs
deleted file mode 100644
index 3720a80..0000000
--- a/test/disk_tests/usages/lvs
+++ /dev/null
@@ -1,6 +0,0 @@
-/dev/sdg(0);osd-block-01234;ceph.osd_id=1
-/dev/sdh(0);osd-journal-01234;ceph.osd_id=1
-/dev/sdi(0);osd-db-01234;ceph.osd_id=1,dasdf
-/dev/sdj(0);osd-data-01234;ceph.osd_id=0,asfd,ceph.encrypted=1
-/dev/sdk(0);osd-data-231231;ceph.osd_id=230,ceph.fsid=test
-/dev/sdl(0);osd-data-234132;ceph.osd_id=,bar
diff --git a/test/disk_tests/usages/mounts b/test/disk_tests/usages/mounts
deleted file mode 100644
index f8c1cd3..0000000
--- a/test/disk_tests/usages/mounts
+++ /dev/null
@@ -1,2 +0,0 @@
-/dev/sda /mountpoint1
-/dev/sdf1 /var/lib/ceph/osd/ceph-444
diff --git a/test/disk_tests/usages/partlist b/test/disk_tests/usages/partlist
deleted file mode 100644
index 43c1f68..0000000
--- a/test/disk_tests/usages/partlist
+++ /dev/null
@@ -1,6 +0,0 @@
-sdd1
-sdd2
-sde1
-sdf1
-sdm1
-sdm9
diff --git a/test/disk_tests/usages/pvs b/test/disk_tests/usages/pvs
deleted file mode 100644
index 86ec3d4..0000000
--- a/test/disk_tests/usages/pvs
+++ /dev/null
@@ -1,7 +0,0 @@
- /dev/sdb
- /dev/sdg
- /dev/sdh
- /dev/sdi
- /dev/sdj
- /dev/sdk
- /dev/sdl
diff --git a/test/disk_tests/usages/sda/device/vendor b/test/disk_tests/usages/sda/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sda/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sda/queue/rotational b/test/disk_tests/usages/sda/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sda/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sda/size b/test/disk_tests/usages/sda/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sda/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sda_udevadm b/test/disk_tests/usages/sda_udevadm
deleted file mode 100644
index ab04390..0000000
--- a/test/disk_tests/usages/sda_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sda
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdb/device/vendor b/test/disk_tests/usages/sdb/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdb/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdb/queue/rotational b/test/disk_tests/usages/sdb/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdb/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdb/size b/test/disk_tests/usages/sdb/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdb/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdb_udevadm b/test/disk_tests/usages/sdb_udevadm
deleted file mode 100644
index ada1ca8..0000000
--- a/test/disk_tests/usages/sdb_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdb
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdc/device/vendor b/test/disk_tests/usages/sdc/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdc/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdc/queue/rotational b/test/disk_tests/usages/sdc/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdc/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdc/size b/test/disk_tests/usages/sdc/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdc/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdc_udevadm b/test/disk_tests/usages/sdc_udevadm
deleted file mode 100644
index 42845f3..0000000
--- a/test/disk_tests/usages/sdc_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdc
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdd/device/vendor b/test/disk_tests/usages/sdd/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdd/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdd/queue/rotational b/test/disk_tests/usages/sdd/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdd/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdd/sdd1/size b/test/disk_tests/usages/sdd/sdd1/size
deleted file mode 100644
index 83b33d2..0000000
--- a/test/disk_tests/usages/sdd/sdd1/size
+++ /dev/null
@@ -1 +0,0 @@
-1000
diff --git a/test/disk_tests/usages/sdd/sdd2/size b/test/disk_tests/usages/sdd/sdd2/size
deleted file mode 100644
index 8bd1af1..0000000
--- a/test/disk_tests/usages/sdd/sdd2/size
+++ /dev/null
@@ -1 +0,0 @@
-2000
diff --git a/test/disk_tests/usages/sdd/size b/test/disk_tests/usages/sdd/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdd/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdd_udevadm b/test/disk_tests/usages/sdd_udevadm
deleted file mode 100644
index 65e880f..0000000
--- a/test/disk_tests/usages/sdd_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdd
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sde/device/vendor b/test/disk_tests/usages/sde/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sde/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sde/queue/rotational b/test/disk_tests/usages/sde/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sde/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sde/sde1/size b/test/disk_tests/usages/sde/sde1/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sde/sde1/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sde/size b/test/disk_tests/usages/sde/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sde/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sde_udevadm b/test/disk_tests/usages/sde_udevadm
deleted file mode 100644
index db77725..0000000
--- a/test/disk_tests/usages/sde_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sde
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdf/device/vendor b/test/disk_tests/usages/sdf/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdf/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdf/queue/rotational b/test/disk_tests/usages/sdf/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdf/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdf/sdf1/size b/test/disk_tests/usages/sdf/sdf1/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdf/sdf1/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdf/size b/test/disk_tests/usages/sdf/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdf/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdf_udevadm b/test/disk_tests/usages/sdf_udevadm
deleted file mode 100644
index ad49acf..0000000
--- a/test/disk_tests/usages/sdf_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdf
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdg/device/vendor b/test/disk_tests/usages/sdg/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdg/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdg/queue/rotational b/test/disk_tests/usages/sdg/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdg/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdg/size b/test/disk_tests/usages/sdg/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdg/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdg_udevadm b/test/disk_tests/usages/sdg_udevadm
deleted file mode 100644
index 6d40d35..0000000
--- a/test/disk_tests/usages/sdg_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdg
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdh/device/vendor b/test/disk_tests/usages/sdh/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdh/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdh/queue/rotational b/test/disk_tests/usages/sdh/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdh/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdh/size b/test/disk_tests/usages/sdh/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdh/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdh_udevadm b/test/disk_tests/usages/sdh_udevadm
deleted file mode 100644
index 3ff1a9e..0000000
--- a/test/disk_tests/usages/sdh_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdh
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdi/device/vendor b/test/disk_tests/usages/sdi/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdi/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdi/queue/rotational b/test/disk_tests/usages/sdi/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdi/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdi/size b/test/disk_tests/usages/sdi/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdi/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdi_udevadm b/test/disk_tests/usages/sdi_udevadm
deleted file mode 100644
index a9eae5e..0000000
--- a/test/disk_tests/usages/sdi_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdi
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdj/device/vendor b/test/disk_tests/usages/sdj/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdj/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdj/queue/rotational b/test/disk_tests/usages/sdj/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdj/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdj/size b/test/disk_tests/usages/sdj/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdj/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdj_udevadm b/test/disk_tests/usages/sdj_udevadm
deleted file mode 100644
index 39d0cf3..0000000
--- a/test/disk_tests/usages/sdj_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdj
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdk/device/vendor b/test/disk_tests/usages/sdk/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdk/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdk/queue/rotational b/test/disk_tests/usages/sdk/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdk/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdk/size b/test/disk_tests/usages/sdk/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdk/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdk_udevadm b/test/disk_tests/usages/sdk_udevadm
deleted file mode 100644
index 3baef2f..0000000
--- a/test/disk_tests/usages/sdk_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdk
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdl/device/vendor b/test/disk_tests/usages/sdl/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdl/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdl/queue/rotational b/test/disk_tests/usages/sdl/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdl/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdl/size b/test/disk_tests/usages/sdl/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdl/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdl_udevadm b/test/disk_tests/usages/sdl_udevadm
deleted file mode 100644
index ead0622..0000000
--- a/test/disk_tests/usages/sdl_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdl
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdm/device/vendor b/test/disk_tests/usages/sdm/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdm/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdm/queue/rotational b/test/disk_tests/usages/sdm/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdm/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdm/sdm1/size b/test/disk_tests/usages/sdm/sdm1/size
deleted file mode 100644
index 83b33d2..0000000
--- a/test/disk_tests/usages/sdm/sdm1/size
+++ /dev/null
@@ -1 +0,0 @@
-1000
diff --git a/test/disk_tests/usages/sdm/sdm9/size b/test/disk_tests/usages/sdm/sdm9/size
deleted file mode 100644
index 8bd1af1..0000000
--- a/test/disk_tests/usages/sdm/sdm9/size
+++ /dev/null
@@ -1 +0,0 @@
-2000
diff --git a/test/disk_tests/usages/sdm/size b/test/disk_tests/usages/sdm/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdm/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdm_udevadm b/test/disk_tests/usages/sdm_udevadm
deleted file mode 100644
index 9317b9f..0000000
--- a/test/disk_tests/usages/sdm_udevadm
+++ /dev/null
@@ -1,12 +0,0 @@
-E: DEVNAME=/dev/sdm
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_PART_TABLE_TYPE=gpt
-E: ID_PART_TABLE_UUID=8417b93f-eff9-4e8f-8d84-dc2e77fc07a2
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/sdn/device/vendor b/test/disk_tests/usages/sdn/device/vendor
deleted file mode 100644
index 531030d..0000000
--- a/test/disk_tests/usages/sdn/device/vendor
+++ /dev/null
@@ -1 +0,0 @@
-ATA
diff --git a/test/disk_tests/usages/sdn/queue/rotational b/test/disk_tests/usages/sdn/queue/rotational
deleted file mode 100644
index d00491f..0000000
--- a/test/disk_tests/usages/sdn/queue/rotational
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/test/disk_tests/usages/sdn/size b/test/disk_tests/usages/sdn/size
deleted file mode 100644
index 13de30f..0000000
--- a/test/disk_tests/usages/sdn/size
+++ /dev/null
@@ -1 +0,0 @@
-3000
diff --git a/test/disk_tests/usages/sdn_udevadm b/test/disk_tests/usages/sdn_udevadm
deleted file mode 100644
index 5ec4a92..0000000
--- a/test/disk_tests/usages/sdn_udevadm
+++ /dev/null
@@ -1,14 +0,0 @@
-E: DEVNAME=/dev/sdn
-E: DEVTYPE=disk
-E: ID_ATA_ROTATION_RATE_RPM=0
-E: ID_BUS=ata
-E: ID_MODEL=MODEL1
-E: ID_SERIAL=SERIAL1
-E: ID_SERIAL_SHORT=SERIAL1
-E: ID_TYPE=disk
-E: ID_FS_UUID=ab54fba8-48fe-4d37-bbe7-b403f94d3bed
-E: ID_FS_UUID_ENC=ab54fba8-48fe-4d37-bbe7-b403f94d3bed
-E: ID_FS_TYPE=xfs
-E: ID_FS_USAGE=filesystem
-E: ID_WWN=0x0000000000000000
-E: ID_WWN_WITH_EXTENSION=0x0000000000000000
diff --git a/test/disk_tests/usages/zpool b/test/disk_tests/usages/zpool
deleted file mode 100644
index 3431792..0000000
--- a/test/disk_tests/usages/zpool
+++ /dev/null
@@ -1,6 +0,0 @@
-testpool 2.00T 1.00T 2.60T - 5% 28% 1.00x ONLINE -
- /dev/sdc 3.62T 1.02T 2.60T - 5% 28%
-log - - - - - -
- /dev/sdd1 15.9G 2.79M 15.9G - 82% 0%
-cache - - - - - -
- /dev/sdd2 42.5G 36.2G 6.36G - 0% 85%
diff --git a/test/disklist_test.pm b/test/disklist_test.pm
index 7f0e0be..727fb44 100644
--- a/test/disklist_test.pm
+++ b/test/disklist_test.pm
@@ -34,10 +34,10 @@ sub mocked_run_command {
my $dev;
my $type;
if (@$cmd > 3) {
- $dev = $cmd->[5];
+ $dev = $cmd->[4];
$type = 'smart';
} else {
- $dev = $cmd->[2];
+ $dev = $cmd->[3];
$type = 'health';
}
$dev =~ s|/dev/||;
--
2.20.1
More information about the pve-devel
mailing list