| 10 | * 使用 `smartmontools` 套件中的 `smartctl` 指令 |
| 11 | {{{ |
| 12 | ~$ sudo smartctl --scan |
| 13 | /dev/sda -d scsi # /dev/sda, SCSI device |
| 14 | /dev/sdb -d scsi # /dev/sdb, SCSI device |
| 15 | /dev/bus/4 -d megaraid,0 # /dev/bus/4 [megaraid_disk_00], SCSI device |
| 16 | /dev/bus/4 -d megaraid,1 # /dev/bus/4 [megaraid_disk_01], SCSI device |
| 17 | /dev/bus/4 -d megaraid,4 # /dev/bus/4 [megaraid_disk_04], SCSI device |
| 18 | /dev/bus/4 -d megaraid,5 # /dev/bus/4 [megaraid_disk_05], SCSI device |
| 19 | }}} |
| 20 | {{{ |
| 21 | ~$ sudo smartctl -d scsi -a /dev/sda |
| 22 | smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.4.0-98-generic] (local build) |
| 23 | Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org |
| 24 | |
| 25 | === START OF INFORMATION SECTION === |
| 26 | Vendor: DELL |
| 27 | Product: PERC H700 |
| 28 | Revision: 2.10 |
| 29 | User Capacity: 898,990,342,144 bytes [898 GB] |
| 30 | Logical block size: 512 bytes |
| 31 | Logical Unit id: 0x6782bcb064ffe400213fc03a08c8a728 |
| 32 | Serial number: 0028a7c8083ac03f2100e4ff64b0bc82 |
| 33 | Device type: disk |
| 34 | Local Time is: Tue Nov 28 17:48:32 2017 CST |
| 35 | SMART support is: Unavailable - device lacks SMART capability. |
| 36 | |
| 37 | === START OF READ SMART DATA SECTION === |
| 38 | |
| 39 | Error Counter logging not supported |
| 40 | |
| 41 | Device does not support Self Test logging |
| 42 | }}} |
| 43 | |
| 44 | 要繞過 RAID 卡的話,不能用 scsi 型態,要根據 scan 結果 |
| 45 | {{{ |
| 46 | ~$ sudo smartctl -a /dev/bus/4 -d sat+megaraid,0 |
| 47 | smartctl 6.2 2013-07-26 r3841 [x86_64-linux-4.4.0-98-generic] (local build) |
| 48 | Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org |
| 49 | |
| 50 | === START OF INFORMATION SECTION === |
| 51 | Device Model: PLEXTOR PX-256S3C |
| 52 | Serial Number: P02721101697 |
| 53 | LU WWN Device Id: 5 002303 100e60e35 |
| 54 | Firmware Version: 1.01 |
| 55 | User Capacity: 256,060,514,304 bytes [256 GB] |
| 56 | Sector Size: 512 bytes logical/physical |
| 57 | Rotation Rate: Solid State Device |
| 58 | Device is: Not in smartctl database [for details use: -P showall] |
| 59 | ATA Version is: ACS-2 (minor revision not indicated) |
| 60 | SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s) |
| 61 | Local Time is: Tue Nov 28 17:50:13 2017 CST |
| 62 | SMART support is: Available - device has SMART capability. |
| 63 | SMART support is: Enabled |
| 64 | |
| 65 | === START OF READ SMART DATA SECTION === |
| 66 | SMART overall-health self-assessment test result: PASSED |
| 67 | Warning: This result is based on an Attribute check. |
| 68 | |
| 69 | General SMART Values: |
| 70 | Offline data collection status: (0x00) Offline data collection activity |
| 71 | was never started. |
| 72 | Auto Offline Data Collection: Disabled. |
| 73 | Self-test execution status: ( 0) The previous self-test routine completed |
| 74 | without error or no self-test has ever |
| 75 | been run. |
| 76 | Total time to complete Offline |
| 77 | data collection: ( 0) seconds. |
| 78 | Offline data collection |
| 79 | capabilities: (0x11) SMART execute Offline immediate. |
| 80 | No Auto Offline data collection support. |
| 81 | Suspend Offline collection upon new |
| 82 | command. |
| 83 | No Offline surface scan supported. |
| 84 | Self-test supported. |
| 85 | No Conveyance Self-test supported. |
| 86 | No Selective Self-test supported. |
| 87 | SMART capabilities: (0x0003) Saves SMART data before entering |
| 88 | power-saving mode. |
| 89 | Supports SMART auto save timer. |
| 90 | Error logging capability: (0x01) Error logging supported. |
| 91 | General Purpose Logging supported. |
| 92 | Short self-test routine |
| 93 | recommended polling time: ( 1) minutes. |
| 94 | Extended self-test routine |
| 95 | recommended polling time: ( 10) minutes. |
| 96 | SCT capabilities: (0x003d) SCT Status supported. |
| 97 | SCT Error Recovery Control supported. |
| 98 | SCT Feature Control supported. |
| 99 | SCT Data Table supported. |
| 100 | |
| 101 | SMART Attributes Data Structure revision number: 1 |
| 102 | Vendor Specific SMART Attributes with Thresholds: |
| 103 | ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE |
| 104 | 1 Raw_Read_Error_Rate 0x002f 100 100 000 Pre-fail Always - 0 |
| 105 | 5 Reallocated_Sector_Ct 0x0003 100 100 000 Pre-fail Always - 0 |
| 106 | 9 Power_On_Hours 0x0002 100 100 000 Old_age Always - 1318 |
| 107 | 12 Power_Cycle_Count 0x0003 100 100 000 Pre-fail Always - 7 |
| 108 | 170 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0 |
| 109 | 171 Unknown_Attribute 0x0003 100 100 000 Pre-fail Always - 0 |
| 110 | 172 Unknown_Attribute 0x0003 100 100 000 Pre-fail Always - 0 |
| 111 | 173 Unknown_Attribute 0x0003 100 100 000 Pre-fail Always - 19 |
| 112 | 174 Unknown_Attribute 0x0003 100 100 000 Pre-fail Always - 2 |
| 113 | 175 Program_Fail_Count_Chip 0x0003 100 100 000 Pre-fail Always - 0 |
| 114 | 176 Erase_Fail_Count_Chip 0x0003 100 100 000 Pre-fail Always - 0 |
| 115 | 178 Used_Rsvd_Blk_Cnt_Chip 0x0003 100 100 000 Pre-fail Always - 0 |
| 116 | 179 Used_Rsvd_Blk_Cnt_Tot 0x0003 100 100 000 Pre-fail Always - 0 |
| 117 | 180 Unused_Rsvd_Blk_Cnt_Tot 0x0033 100 100 005 Pre-fail Always - 65 |
| 118 | 181 Program_Fail_Cnt_Total 0x0003 100 100 000 Pre-fail Always - 0 |
| 119 | 182 Erase_Fail_Count_Total 0x0003 100 100 000 Pre-fail Always - 0 |
| 120 | 183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0 |
| 121 | 195 Hardware_ECC_Recovered 0x0003 100 100 000 Pre-fail Always - 0 |
| 122 | 199 UDMA_CRC_Error_Count 0x0003 100 100 000 Pre-fail Always - 0 |
| 123 | 232 Available_Reservd_Space 0x0003 100 100 010 Pre-fail Always - 100 |
| 124 | 233 Media_Wearout_Indicator 0x0003 100 100 000 Pre-fail Always - 6466 |
| 125 | 241 Total_LBAs_Written 0x0003 100 100 000 Pre-fail Always - 111376 |
| 126 | 242 Total_LBAs_Read 0x0003 100 100 000 Pre-fail Always - 3972 |
| 127 | |
| 128 | SMART Error Log Version: 1 |
| 129 | No Errors Logged |
| 130 | |
| 131 | SMART Self-test log structure revision number 0 |
| 132 | Warning: ATA Specification requires self-test log structure revision number = 1 |
| 133 | No self-tests have been logged. [To run self-tests, use: smartctl -t] |
| 134 | |
| 135 | |
| 136 | Selective Self-tests/Logging not supported |
| 137 | }}} |