Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a bug when sas disk in jbod mode #85

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Version 1.3.1
=============
- Added support for test polling_minutes. Requested in [#77](https://github.com/truenas/py-SMART/issues/77) and [#78](https://github.com/truenas/py-SMART/pull/78). Thanks @Gigahawk
- Minnor typo fixed in NvmeAttributes (issue [#81](https://github.com/truenas/py-SMART/issues/81)). Thanks @petersulyok
- Minnor typo fixed in NvmeAttributes (issue [#81](https://github.com/truenas/py-SMART/issues/81)). Thanks @petersulyok
- Minnor fix for JBOD devices (MR [#85](https://github.com/truenas/py-SMART/pull/85)). Thanks @jackeichen
- Fixed __getstate__ method in Device class. (issue [#86](https://github.com/truenas/py-SMART/issues/86)). Thanks @f18m
- **Breaking changes**
- **smartctl.all**:
Expand Down
2 changes: 1 addition & 1 deletion pySMART/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def _classify(self) -> str:
'-l',
'sasphy',
self.dev_reference])
if returncode == 0 and 'SAS SSP' in raw[4]:
if returncode == 0 and len(raw) > 4 and 'SAS SSP' in raw[4]:
fine_interface = 'sas'
# Some older SAS devices do not support the SAS PHY log command.
# For these, see if smartmontools reports a transport protocol.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-372.9.1.el8.x86_64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor: XXXXXXXXXXX
Product: XXXXXXXXXXX
Revision: CA00
Compliance: SPC-5
User Capacity: 800,166,076,416 bytes [800 GB]
Logical block size: 512 bytes
Physical block size: 4096 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Logical Unit id: 0x50025380725029b0
Serial number: XXXXXXXXXXXXXXXX
Device type: disk
Transport protocol: SAS (SPL-3)
Local Time is: Tue Apr 9 08:02:36 2024 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Temperature Warning: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK

Percentage used endurance indicator: 0%
Current Drive Temperature: 42 C
Drive Trip Temperature: 65 C

Manufactured in week 07 of year 2022
Accumulated start-stop cycles: 135
Specified load-unload count over device lifetime: 0
Accumulated load-unload cycles: 0
Elements in grown defect list: 0

Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 0 0 0 0 0 27805.729 0
write: 0 0 0 0 0 9378.908 0
verify: 0 0 0 0 0 0.016 0

Non-medium error count: 84893

SMART Self-test log
Num Test Status segment LifeTime LBA_first_err [SK ASC ASQ]
Description number (hours)
# 1 Background short Completed - 349 - [- - -]

Long (extended) Self-test duration: 3600 seconds [60.0 minutes]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-73-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
Device does not support Background scan results logging

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
smartctl 7.1 2020-04-05 r5049 [x86_64-linux-4.18.0-372.9.1.el8.x86_64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
smartctl 7.2 2021-01-17 r5171 [x86_64-linux-5.13.4-200.fc34.x86_64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

/dev/sdd: Device of type 'scsi' [scsi] detected
/dev/sdd: Device of type 'scsi' [scsi] opened
Loading
Loading