From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3C41F6B6EE for ; Fri, 11 Dec 2020 14:53:14 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 32E8920B7D for ; Fri, 11 Dec 2020 14:52:44 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 9518A20B6F for ; Fri, 11 Dec 2020 14:52:42 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 5E916446D3 for ; Fri, 11 Dec 2020 14:52:42 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 11 Dec 2020 14:52:40 +0100 Message-Id: <20201211135241.27957-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.285 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH storage 1/2] tests: add ssd sas disk X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 13:53:14 -0000 copied from test 'sas' with rotational set to 0 this has then the type 'ssd', rpm: 0, and health: 'OK' Signed-off-by: Dominik Csapak --- 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 | 5 +++ test/disk_tests/sas_ssd/sda_udevadm | 31 +++++++++++++++++++ 9 files changed, 78 insertions(+) create mode 100644 test/disk_tests/sas_ssd/disklist create mode 100644 test/disk_tests/sas_ssd/disklist_expected.json create mode 100644 test/disk_tests/sas_ssd/sda/device/model create mode 100644 test/disk_tests/sas_ssd/sda/device/vendor create mode 100644 test/disk_tests/sas_ssd/sda/queue/rotational create mode 100644 test/disk_tests/sas_ssd/sda/size create mode 100644 test/disk_tests/sas_ssd/sda_smart create mode 100644 test/disk_tests/sas_ssd/sda_smart_expected.json create mode 100644 test/disk_tests/sas_ssd/sda_udevadm diff --git a/test/disk_tests/sas_ssd/disklist b/test/disk_tests/sas_ssd/disklist new file mode 100644 index 0000000..9191c61 --- /dev/null +++ b/test/disk_tests/sas_ssd/disklist @@ -0,0 +1 @@ +sda diff --git a/test/disk_tests/sas_ssd/disklist_expected.json b/test/disk_tests/sas_ssd/disklist_expected.json new file mode 100644 index 0000000..9e7ada3 --- /dev/null +++ b/test/disk_tests/sas_ssd/disklist_expected.json @@ -0,0 +1,17 @@ +{ + "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" : "N/A", + "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 new file mode 100644 index 0000000..6b69674 --- /dev/null +++ b/test/disk_tests/sas_ssd/sda/device/model @@ -0,0 +1 @@ +MODEL1 diff --git a/test/disk_tests/sas_ssd/sda/device/vendor b/test/disk_tests/sas_ssd/sda/device/vendor new file mode 100644 index 0000000..a7894eb --- /dev/null +++ b/test/disk_tests/sas_ssd/sda/device/vendor @@ -0,0 +1 @@ +VENDOR1 diff --git a/test/disk_tests/sas_ssd/sda/queue/rotational b/test/disk_tests/sas_ssd/sda/queue/rotational new file mode 100644 index 0000000..573541a --- /dev/null +++ b/test/disk_tests/sas_ssd/sda/queue/rotational @@ -0,0 +1 @@ +0 diff --git a/test/disk_tests/sas_ssd/sda/size b/test/disk_tests/sas_ssd/sda/size new file mode 100644 index 0000000..5caff40 --- /dev/null +++ b/test/disk_tests/sas_ssd/sda/size @@ -0,0 +1 @@ +10000 diff --git a/test/disk_tests/sas_ssd/sda_smart b/test/disk_tests/sas_ssd/sda_smart new file mode 100644 index 0000000..856af39 --- /dev/null +++ b/test/disk_tests/sas_ssd/sda_smart @@ -0,0 +1,20 @@ +=== 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 new file mode 100644 index 0000000..e096c8b --- /dev/null +++ b/test/disk_tests/sas_ssd/sda_smart_expected.json @@ -0,0 +1,5 @@ +{ + "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" +} diff --git a/test/disk_tests/sas_ssd/sda_udevadm b/test/disk_tests/sas_ssd/sda_udevadm new file mode 100644 index 0000000..ac0744d --- /dev/null +++ b/test/disk_tests/sas_ssd/sda_udevadm @@ -0,0 +1,31 @@ +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 -- 2.20.1