Disk errors
Contents
UDMA mode
I ran into a problem booting an embedded Linux system where the kernel log would show failed attempts to set UDMA mode on an IDE Solid State Drive. It would start with UDMA/44 then try UDMA/33, UDMA/25, UDMA/16, and eventually end up in PIO mode with no DMA selected.
The problem turned out to be a faulty setup of the RAM and configuration of the DMA controller in the embedded SOC. There were a number of bad things happening. First, the version of the SOC chip we were using had bad cache coherency and DMA bus arbitration problems. Second, our memory map layout in the bootloader didn't match the layout of the Linux Kernel -- this caused some weird problems! If a network cable was plugged into the device during boot and a packet came in just as the boot loader was switching to the kernel then it was possible for the DMA controller to put the packet data into memory that thee kernel was using for something else. This would cause all kinds of other weird problems in addition to the one below.
mpc512x_ide: fsl_ata_dma_timer_expiry hda: fifo_kill=58 fsl_dma_end:dma transfer read err. hda: lost interrupt hda: dma_intr: status=0x59 { DriveReady SeekComplete DataRequest Error } hda: dma_intr: error=0x84 <3>{ DriveStatusError BadCRC } ide: failed opocode was: unknown hda: UDMA/16 mode selected __fsl_ata_resetproc: resetting ATA controller ide0: reset: success mpc512x_ide: fsl_ata_dma_timer_expiry hda: fifo_kill=58 fsl_dma_end:dma transfer read err. pending:00000000 hda: dma_intr: status=0x59 { DriveReady SeekComplete DataRequest Error } hda: dma_intr: error=0x84 <3>{ DriveStatusError BadCRC } ide: failed opocode was: unknown hda: no DMA mode selected __fsl_ata_resetproc: resetting ATA controller hda: drive not ready for command ide0: reset: success
Smartmon
Smartmon isn't always easy to understand.
WORST and THRESH are a scaled value. RAW_VALUE usually makes the most sense to a human.
Here is appears that my drive got over 50 degrees C at least once in the past.
Also there have been 47 UNC errors at LBA = 0x0fffffff = 268435455. The drive only saves the most recent five errors.
But the drive also reports SMART overall-health self-assessment test result: PASSED. What does this mean? I think it means that maybe it got hot and had trouble reading part of the drive, but for whatever reason the drive doesn't think this is a permanently bad situation.
Also, it's strange that it reports Error: UNC at LBA = 0x0fffffff = 268435455. I'm sure LBA=0x0fffffff is not a real block. Perhaps some piece of software requested the drive read from this block and the drive got confused, but rather than report back to the client that the read request was invalid the drive got confused and registered this as a physical error. Firmware bug?
I read that UNC errors can have soft causes. In other words, the ECC code may have failed, but that does not necessarily mean you have a hardware problem. It may indicate a power loss where the drive was unable to finish a block. An `fsck` may show a filesystem error that corresponds to the LBA of the error.
One thing I've noticed from searching the web is that many people are alarmist and reactionary when it comes to analyzing these reports. For instance, some people want to see 'Hardware_ECC_Recovered' show zero errors even though the value may well be within spec and this attribute shows the error was recovered after all! All drives always have errors at some level. Another funny one is the Seek_Error_Rate (Attribute ID# 7) RAW_VALUE which is always going up. It actually goes up pretty fast -- more than 1 a second. People often freak out over this even though this is the raw value, not the normalized value. The 'WHEN_FAILED' attribute doesn't even show that the drive has failed this parameter.
Still, I think I'll test my backups and run `fsck`.
# smartctl --all /dev/sda smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION SECTION === Device Model: ST9320421AS Serial Number: 5TJ09W81 Firmware Version: SD13 User Capacity: 320,072,933,376 bytes Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 8 ATA Standard is: ATA-8-ACS revision 4 Local Time is: Tue Feb 23 00:27:07 2010 PST SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED See vendor-specific Attribute list for marginal Attributes. General SMART Values: Offline data collection status: (0x82) Offline data collection activity was completed without error. Auto Offline Data Collection: Enabled. Self-test execution status: ( 0) The previous self-test routine completed without error or no self-test has ever been run. Total time to complete Offline data collection: ( 0) seconds. Offline data collection capabilities: (0x7b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 1) minutes. Extended self-test routine recommended polling time: ( 95) minutes. Conveyance self-test routine recommended polling time: ( 2) minutes. SCT capabilities: (0x103b) SCT Status supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 10 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000f 115 098 006 Pre-fail Always - 97873865 3 Spin_Up_Time 0x0003 098 097 000 Pre-fail Always - 0 4 Start_Stop_Count 0x0032 099 099 020 Old_age Always - 1838 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 6 7 Seek_Error_Rate 0x000f 079 060 030 Pre-fail Always - 4385869775 9 Power_On_Hours 0x0032 090 090 000 Old_age Always - 9458 10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 1 12 Power_Cycle_Count 0x0032 100 037 020 Old_age Always - 134 184 Unknown_Attribute 0x0032 100 100 099 Old_age Always - 0 187 Reported_Uncorrect 0x0032 053 053 000 Old_age Always - 47 188 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 6 189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0 190 Airflow_Temperature_Cel 0x0022 051 045 045 Old_age Always In_the_past 49 (Lifetime Min/Max 23/52) 191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0 192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 14 193 Load_Cycle_Count 0x0032 068 068 000 Old_age Always - 64826 194 Temperature_Celsius 0x0022 049 055 000 Old_age Always - 49 (0 20 0 0) 195 Hardware_ECC_Recovered 0x001a 047 035 000 Old_age Always - 97873865 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 254 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0 SMART Error Log Version: 1 ATA Error Count: 47 (device log contains only the most recent five errors) CR = Command Register [HEX] FR = Features Register [HEX] SC = Sector Count Register [HEX] SN = Sector Number Register [HEX] CL = Cylinder Low Register [HEX] CH = Cylinder High Register [HEX] DH = Device/Head Register [HEX] DC = Device Command Register [HEX] ER = Error register [HEX] ST = Status register [HEX] Powered_Up_Time is measured from power on, and printed as DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes, SS=sec, and sss=millisec. It "wraps" after 49.710 days. Error 47 occurred at disk power-on lifetime: 9062 hours (377 days + 14 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 25 00 08 ff ff ff ef 00 00:10:58.846 READ DMA EXT 27 00 00 00 00 00 e0 00 00:10:58.815 READ NATIVE MAX ADDRESS EXT ec 00 00 00 00 00 a0 00 00:10:58.806 IDENTIFY DEVICE ef 03 46 00 00 00 a0 00 00:10:58.783 SET FEATURES [Set transfer mode] 27 00 00 00 00 00 e0 00 00:10:58.731 READ NATIVE MAX ADDRESS EXT Error 46 occurred at disk power-on lifetime: 9062 hours (377 days + 14 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 25 00 08 ff ff ff ef 00 00:10:55.878 READ DMA EXT 27 00 00 00 00 00 e0 00 00:10:55.847 READ NATIVE MAX ADDRESS EXT ec 00 00 00 00 00 a0 00 00:10:55.839 IDENTIFY DEVICE ef 03 46 00 00 00 a0 00 00:10:55.818 SET FEATURES [Set transfer mode] 27 00 00 00 00 00 e0 00 00:10:55.763 READ NATIVE MAX ADDRESS EXT Error 45 occurred at disk power-on lifetime: 9062 hours (377 days + 14 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 25 00 08 ff ff ff ef 00 00:10:52.855 READ DMA EXT 27 00 00 00 00 00 e0 00 00:10:52.823 READ NATIVE MAX ADDRESS EXT ec 00 00 00 00 00 a0 00 00:10:52.815 IDENTIFY DEVICE ef 03 46 00 00 00 a0 00 00:10:52.792 SET FEATURES [Set transfer mode] 27 00 00 00 00 00 e0 00 00:10:52.739 READ NATIVE MAX ADDRESS EXT Error 44 occurred at disk power-on lifetime: 9062 hours (377 days + 14 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 25 00 08 ff ff ff ef 00 00:10:49.947 READ DMA EXT 27 00 00 00 00 00 e0 00 00:10:49.916 READ NATIVE MAX ADDRESS EXT ec 00 00 00 00 00 a0 00 00:10:49.907 IDENTIFY DEVICE ef 03 46 00 00 00 a0 00 00:10:49.886 SET FEATURES [Set transfer mode] 27 00 00 00 00 00 e0 00 00:10:49.832 READ NATIVE MAX ADDRESS EXT Error 43 occurred at disk power-on lifetime: 9062 hours (377 days + 14 hours) When the command that caused the error occurred, the device was active or idle. After command completion occurred, registers were: ER ST SC SN CL CH DH -- -- -- -- -- -- -- 40 51 00 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- 25 00 08 ff ff ff ef 00 00:10:47.031 READ DMA EXT 27 00 00 00 00 00 e0 00 00:10:47.000 READ NATIVE MAX ADDRESS EXT ec 00 00 00 00 00 a0 00 00:10:46.992 IDENTIFY DEVICE ef 03 46 00 00 00 a0 00 00:10:46.970 SET FEATURES [Set transfer mode] 27 00 00 00 00 00 e0 00 00:10:46.912 READ NATIVE MAX ADDRESS EXT SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Short offline Completed without error 00% 9458 - # 2 Short offline Completed without error 00% 0 - SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.