[pve-devel] [PATCH storage 3/7] add ssd and smart regression tests
Dominik Csapak
d.csapak at proxmox.com
Mon Oct 17 10:31:23 CEST 2016
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
test/disk_tests/ssd_smart/disklist | 5 +
test/disk_tests/ssd_smart/disklist_expected.json | 77 +++++++
test/disk_tests/ssd_smart/sda/device/vendor | 1 +
test/disk_tests/ssd_smart/sda/queue/rotational | 1 +
test/disk_tests/ssd_smart/sda/size | 1 +
test/disk_tests/ssd_smart/sda_smart | 39 ++++
test/disk_tests/ssd_smart/sda_smart_expected.json | 236 ++++++++++++++++++++
test/disk_tests/ssd_smart/sda_udevadm | 11 +
test/disk_tests/ssd_smart/sdb/device/vendor | 1 +
test/disk_tests/ssd_smart/sdb/queue/rotational | 1 +
test/disk_tests/ssd_smart/sdb/size | 1 +
test/disk_tests/ssd_smart/sdb_smart | 41 ++++
test/disk_tests/ssd_smart/sdb_smart_expected.json | 256 ++++++++++++++++++++++
test/disk_tests/ssd_smart/sdb_udevadm | 12 +
test/disk_tests/ssd_smart/sdc/device/vendor | 1 +
test/disk_tests/ssd_smart/sdc/queue/rotational | 1 +
test/disk_tests/ssd_smart/sdc/size | 1 +
test/disk_tests/ssd_smart/sdc_smart | 16 ++
test/disk_tests/ssd_smart/sdc_smart_expected.json | 16 ++
test/disk_tests/ssd_smart/sdc_udevadm | 11 +
test/disk_tests/ssd_smart/sdd/device/vendor | 1 +
test/disk_tests/ssd_smart/sdd/queue/rotational | 1 +
test/disk_tests/ssd_smart/sdd/size | 1 +
test/disk_tests/ssd_smart/sdd_smart | 40 ++++
test/disk_tests/ssd_smart/sdd_smart_expected.json | 16 ++
test/disk_tests/ssd_smart/sdd_udevadm | 11 +
test/disk_tests/ssd_smart/sde/device/vendor | 1 +
test/disk_tests/ssd_smart/sde/queue/rotational | 1 +
test/disk_tests/ssd_smart/sde/size | 1 +
test/disk_tests/ssd_smart/sde_smart | 19 ++
test/disk_tests/ssd_smart/sde_smart_expected.json | 46 ++++
test/disk_tests/ssd_smart/sde_udevadm | 11 +
32 files changed, 878 insertions(+)
create mode 100644 test/disk_tests/ssd_smart/disklist
create mode 100644 test/disk_tests/ssd_smart/disklist_expected.json
create mode 100644 test/disk_tests/ssd_smart/sda/device/vendor
create mode 100644 test/disk_tests/ssd_smart/sda/queue/rotational
create mode 100644 test/disk_tests/ssd_smart/sda/size
create mode 100644 test/disk_tests/ssd_smart/sda_smart
create mode 100644 test/disk_tests/ssd_smart/sda_smart_expected.json
create mode 100644 test/disk_tests/ssd_smart/sda_udevadm
create mode 100644 test/disk_tests/ssd_smart/sdb/device/vendor
create mode 100644 test/disk_tests/ssd_smart/sdb/queue/rotational
create mode 100644 test/disk_tests/ssd_smart/sdb/size
create mode 100644 test/disk_tests/ssd_smart/sdb_smart
create mode 100644 test/disk_tests/ssd_smart/sdb_smart_expected.json
create mode 100644 test/disk_tests/ssd_smart/sdb_udevadm
create mode 100644 test/disk_tests/ssd_smart/sdc/device/vendor
create mode 100644 test/disk_tests/ssd_smart/sdc/queue/rotational
create mode 100644 test/disk_tests/ssd_smart/sdc/size
create mode 100644 test/disk_tests/ssd_smart/sdc_smart
create mode 100644 test/disk_tests/ssd_smart/sdc_smart_expected.json
create mode 100644 test/disk_tests/ssd_smart/sdc_udevadm
create mode 100644 test/disk_tests/ssd_smart/sdd/device/vendor
create mode 100644 test/disk_tests/ssd_smart/sdd/queue/rotational
create mode 100644 test/disk_tests/ssd_smart/sdd/size
create mode 100644 test/disk_tests/ssd_smart/sdd_smart
create mode 100644 test/disk_tests/ssd_smart/sdd_smart_expected.json
create mode 100644 test/disk_tests/ssd_smart/sdd_udevadm
create mode 100644 test/disk_tests/ssd_smart/sde/device/vendor
create mode 100644 test/disk_tests/ssd_smart/sde/queue/rotational
create mode 100644 test/disk_tests/ssd_smart/sde/size
create mode 100644 test/disk_tests/ssd_smart/sde_smart
create mode 100644 test/disk_tests/ssd_smart/sde_smart_expected.json
create mode 100644 test/disk_tests/ssd_smart/sde_udevadm
diff --git a/test/disk_tests/ssd_smart/disklist b/test/disk_tests/ssd_smart/disklist
new file mode 100644
index 0000000..18048d5
--- /dev/null
+++ b/test/disk_tests/ssd_smart/disklist
@@ -0,0 +1,5 @@
+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
new file mode 100644
index 0000000..f00717f
--- /dev/null
+++ b/test/disk_tests/ssd_smart/disklist_expected.json
@@ -0,0 +1,77 @@
+{
+ "sda" : {
+ "serial" : "000000000000",
+ "vendor" : "ATA",
+ "rpm" : 0,
+ "gpt" : 1,
+ "health" : "PASSED",
+ "journals" : 0,
+ "wearout" : "N/A",
+ "osdid" : -1,
+ "size" : 512000,
+ "type" : "ssd",
+ "devpath" : "/dev/sda",
+ "model" : "Crucial_CT500MX200SSD1",
+ "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",
+ "journals" : 0,
+ "health" : "PASSED"
+ },
+ "sdc" : {
+ "wwn" : "0x0000000000000000",
+ "devpath" : "/dev/sdc",
+ "model" : "Samsung SSD 850 PRO 512GB",
+ "osdid" : -1,
+ "type" : "ssd",
+ "size" : 512000,
+ "wearout" : "99",
+ "journals" : 0,
+ "health" : "PASSED",
+ "gpt" : 1,
+ "rpm" : 0,
+ "vendor" : "ATA",
+ "serial" : "000000000000"
+ },
+ "sdd" : {
+ "rpm" : 0,
+ "gpt" : 1,
+ "serial" : "000000000000",
+ "vendor" : "ATA",
+ "journals" : 0,
+ "wearout" : "N/A",
+ "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",
+ "journals" : 0
+ }
+}
diff --git a/test/disk_tests/ssd_smart/sda/device/vendor b/test/disk_tests/ssd_smart/sda/device/vendor
new file mode 100644
index 0000000..531030d
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sda/device/vendor
@@ -0,0 +1 @@
+ATA
diff --git a/test/disk_tests/ssd_smart/sda/queue/rotational b/test/disk_tests/ssd_smart/sda/queue/rotational
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sda/queue/rotational
@@ -0,0 +1 @@
+0
diff --git a/test/disk_tests/ssd_smart/sda/size b/test/disk_tests/ssd_smart/sda/size
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sda/size
@@ -0,0 +1 @@
+1000
diff --git a/test/disk_tests/ssd_smart/sda_smart b/test/disk_tests/ssd_smart/sda_smart
new file mode 100644
index 0000000..2857588
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sda_smart
@@ -0,0 +1,39 @@
+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
+
diff --git a/test/disk_tests/ssd_smart/sda_smart_expected.json b/test/disk_tests/ssd_smart/sda_smart_expected.json
new file mode 100644
index 0000000..a71fab2
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sda_smart_expected.json
@@ -0,0 +1,236 @@
+{
+ "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
+ }
+ ]
+}
diff --git a/test/disk_tests/ssd_smart/sda_udevadm b/test/disk_tests/ssd_smart/sda_udevadm
new file mode 100644
index 0000000..3290a13
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sda_udevadm
@@ -0,0 +1,11 @@
+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_PART_TABLE_TYPE=gpt
+E: ID_SERIAL=Crucial_CT500MX200SSD1_000000000000
+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
new file mode 100644
index 0000000..531030d
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdb/device/vendor
@@ -0,0 +1 @@
+ATA
diff --git a/test/disk_tests/ssd_smart/sdb/queue/rotational b/test/disk_tests/ssd_smart/sdb/queue/rotational
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdb/queue/rotational
@@ -0,0 +1 @@
+0
diff --git a/test/disk_tests/ssd_smart/sdb/size b/test/disk_tests/ssd_smart/sdb/size
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdb/size
@@ -0,0 +1 @@
+1000
diff --git a/test/disk_tests/ssd_smart/sdb_smart b/test/disk_tests/ssd_smart/sdb_smart
new file mode 100644
index 0000000..79eea84
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdb_smart
@@ -0,0 +1,41 @@
+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
new file mode 100644
index 0000000..6f55c3e
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdb_smart_expected.json
@@ -0,0 +1,256 @@
+{
+ "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
new file mode 100644
index 0000000..bb723c8
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdb_udevadm
@@ -0,0 +1,12 @@
+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
new file mode 100644
index 0000000..531030d
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdc/device/vendor
@@ -0,0 +1 @@
+ATA
diff --git a/test/disk_tests/ssd_smart/sdc/queue/rotational b/test/disk_tests/ssd_smart/sdc/queue/rotational
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdc/queue/rotational
@@ -0,0 +1 @@
+0
diff --git a/test/disk_tests/ssd_smart/sdc/size b/test/disk_tests/ssd_smart/sdc/size
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdc/size
@@ -0,0 +1 @@
+1000
diff --git a/test/disk_tests/ssd_smart/sdc_smart b/test/disk_tests/ssd_smart/sdc_smart
new file mode 100644
index 0000000..927f6d2
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdc_smart
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 0000000..f0cffcf
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdc_smart_expected.json
@@ -0,0 +1,16 @@
+{
+ "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
new file mode 100644
index 0000000..5adb3ef
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdc_udevadm
@@ -0,0 +1,11 @@
+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
new file mode 100644
index 0000000..531030d
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdd/device/vendor
@@ -0,0 +1 @@
+ATA
diff --git a/test/disk_tests/ssd_smart/sdd/queue/rotational b/test/disk_tests/ssd_smart/sdd/queue/rotational
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdd/queue/rotational
@@ -0,0 +1 @@
+0
diff --git a/test/disk_tests/ssd_smart/sdd/size b/test/disk_tests/ssd_smart/sdd/size
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdd/size
@@ -0,0 +1 @@
+1000
diff --git a/test/disk_tests/ssd_smart/sdd_smart b/test/disk_tests/ssd_smart/sdd_smart
new file mode 100644
index 0000000..2ad16af
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdd_smart
@@ -0,0 +1,40 @@
+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
new file mode 100644
index 0000000..99175d8
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdd_smart_expected.json
@@ -0,0 +1,16 @@
+{
+ "attributes" : [
+ {
+ "id" : "232",
+ "fail" : "-",
+ "raw" : "100",
+ "flags" : "PO--CK",
+ "value" : 100,
+ "worst" : 100,
+ "name" : "Available_Reservd_Space",
+ "threshold" : 4
+ }
+ ],
+ "type" : "ata",
+ "health" : "PASSED"
+}
diff --git a/test/disk_tests/ssd_smart/sdd_udevadm b/test/disk_tests/ssd_smart/sdd_udevadm
new file mode 100644
index 0000000..d46a7d4
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sdd_udevadm
@@ -0,0 +1,11 @@
+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
new file mode 100644
index 0000000..531030d
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sde/device/vendor
@@ -0,0 +1 @@
+ATA
diff --git a/test/disk_tests/ssd_smart/sde/queue/rotational b/test/disk_tests/ssd_smart/sde/queue/rotational
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sde/queue/rotational
@@ -0,0 +1 @@
+0
diff --git a/test/disk_tests/ssd_smart/sde/size b/test/disk_tests/ssd_smart/sde/size
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sde/size
@@ -0,0 +1 @@
+1000
diff --git a/test/disk_tests/ssd_smart/sde_smart b/test/disk_tests/ssd_smart/sde_smart
new file mode 100644
index 0000000..147790b
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sde_smart
@@ -0,0 +1,19 @@
+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: 10
+Vendor Specific SMART Attributes with Thresholds:
+ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
+177 Wear_Leveling_Count ------ 000 000 000 - 0
+230 Unknown_SSD_Attribute PO--C- 100 100 000 - 100
+231 Temperature_Celsius ------ 091 091 011 - 4294967296
+233 Media_Wearout_Indicator -O--CK 000 000 000 - 43362
+ ||||||_ 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
new file mode 100644
index 0000000..f4e4bdf
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sde_smart_expected.json
@@ -0,0 +1,46 @@
+{
+ "attributes" : [
+ {
+ "worst" : 0,
+ "threshold" : 0,
+ "name" : "Wear_Leveling_Count",
+ "value" : 0,
+ "id" : "177",
+ "raw" : "0",
+ "flags" : "------",
+ "fail" : "-"
+ },
+ {
+ "worst" : 100,
+ "name" : "Unknown_SSD_Attribute",
+ "threshold" : 0,
+ "id" : "230",
+ "fail" : "-",
+ "flags" : "PO--C-",
+ "raw" : "100",
+ "value" : 100
+ },
+ {
+ "worst" : 91,
+ "threshold" : 11,
+ "name" : "Temperature_Celsius",
+ "id" : "231",
+ "flags" : "------",
+ "raw" : "4294967296",
+ "fail" : "-",
+ "value" : 91
+ },
+ {
+ "worst" : 0,
+ "threshold" : 0,
+ "name" : "Media_Wearout_Indicator",
+ "id" : "233",
+ "flags" : "-O--CK",
+ "raw" : "43362",
+ "fail" : "-",
+ "value" : 0
+ }
+ ],
+ "type" : "ata",
+ "health" : "PASSED"
+}
diff --git a/test/disk_tests/ssd_smart/sde_udevadm b/test/disk_tests/ssd_smart/sde_udevadm
new file mode 100644
index 0000000..440c33a
--- /dev/null
+++ b/test/disk_tests/ssd_smart/sde_udevadm
@@ -0,0 +1,11 @@
+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
+
--
2.1.4
More information about the pve-devel
mailing list