SMART: Difference between revisions
m Added categories |
m →Usage |
||
| Line 1: | Line 1: | ||
SMART (Self-Monitoring, Analysis and Reporting Technology) is a monitoring system included in all computer hard drives and solid state drives. | SMART (Self-Monitoring, Analysis and Reporting Technology) is a monitoring system included in all computer hard drives and solid state drives. | ||
== Usage == | ==Usage== | ||
On Linux, install the {{code|smartmon-tools}} package. Use the {{code|smartctl}} utility. | On Linux, install the {{code|smartmon-tools}} package. Use the {{code|smartctl}} utility. | ||
=== Show Disk Information === | ===Show Disk Information=== | ||
To show all capabilities, monitored attributes, errors, etc. of a particular disk, run: | To show all capabilities, monitored attributes, errors, etc. of a particular disk, run: | ||
{{highlight|lang=terminal|code= | {{highlight|lang=terminal|code= | ||
| Line 10: | Line 10: | ||
}} | }} | ||
=== Run Self-Test === | ===Run Self-Test=== | ||
Use the {{code|--test=[offline|short|long]}} option to begin a self-test on the device. To abort a test, use the {{code|-X}} or {{code|--abort}} option. | Use the {{code|--test=[offline|short|long]}} option to begin a self-test on the device. To abort a test, use the {{code|-X}} or {{code|--abort}} option. | ||
== Troubleshooting == | ==Troubleshooting== | ||
=== USB Support === | ===USB Support=== | ||
When working with hard drives connected via USB, you need to disable USB Attached SCSI (UAS). Otherwise, {{code|smartctl}} will report: | When working with hard drives connected via USB, you need to disable USB Attached SCSI (UAS). Otherwise, {{code|smartctl}} will report: | ||
{{highlight|lang=terminal|code= | {{highlight|lang=terminal|code= | ||
| Line 24: | Line 24: | ||
}} | }} | ||
Use one of three methods described in the [[Disable UAS]] page. Once UAS is disabled, {{code|1=smartctl}} should be able to report the SMART parameters. For some devices, you may need to also pass in a <code>-d</code> option to <code>smartctl</code>. Check the supported devices page. https://www.smartmontools.org/wiki/Supported_USB-Devices for more information. | |||
See also: https://askubuntu.com/questions/637450/cannot-perform-smart-data-and-self-test-on-external-hard-drive | See also: https://askubuntu.com/questions/637450/cannot-perform-smart-data-and-self-test-on-external-hard-drive | ||
==Attributes== | |||
Some attributes of note. | |||
;Reallocated_Sector_Ct | |||
:Disks automatically remap bad sectors to a pool of reserved sectors. This attribute is the number of sectors that have been reallocated. | |||
;Current_Pending_Sector | |||
:The number of sectors that the disk had issues reading. The sector will be reallocated when either: 1. the sector can be read properly or 2. the sector is written over. | |||
==See Also== | |||
*http://www.t13.org/Documents/UploadedDocuments/docs2008/D1699r6a-ATA8-ACS.pdf | |||
* http://www.t13.org/Documents/UploadedDocuments/docs2008/D1699r6a-ATA8-ACS.pdf | |||
{{Navbox Linux}}[[Category:Linux]] | {{Navbox Linux}} | ||
[[Category:Linux]] | |||
[[Category:LinuxUtilities]] | [[Category:LinuxUtilities]] | ||
Revision as of 03:46, 2 December 2020
SMART (Self-Monitoring, Analysis and Reporting Technology) is a monitoring system included in all computer hard drives and solid state drives.
Usage
On Linux, install the smartmon-tools package. Use the smartctl utility.
Show Disk Information
To show all capabilities, monitored attributes, errors, etc. of a particular disk, run:
# smartctl -a /dev/sda
Run Self-Test
Use the short option to begin a self-test on the device. To abort a test, use the -X or --abort option.
Troubleshooting
USB Support
When working with hard drives connected via USB, you need to disable USB Attached SCSI (UAS). Otherwise, smartctl will report:
# smartctl -a /dev/sdb
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.6.14-300.fc32.x86_64] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
Read Device Identity failed: scsi error unsupported field in scsi command
Use one of three methods described in the Disable UAS page. Once UAS is disabled, smartctl should be able to report the SMART parameters. For some devices, you may need to also pass in a -d option to smartctl. Check the supported devices page. https://www.smartmontools.org/wiki/Supported_USB-Devices for more information.
Attributes
Some attributes of note.
- Reallocated_Sector_Ct
- Disks automatically remap bad sectors to a pool of reserved sectors. This attribute is the number of sectors that have been reallocated.
- Current_Pending_Sector
- The number of sectors that the disk had issues reading. The sector will be reallocated when either: 1. the sector can be read properly or 2. the sector is written over.