> > I'm gettin mail to root on a new install of FC3. (Haven't had time to > > update it yet.) > > > > The messages come in pairs, especially after booting up in the morning. > > The first is the offline uncorrectable, and the second is the current > > pending, the number of sectors is five. > > > > I've been digging around in the manpage for smartd and smartctl and I > > don't really see much about what should be done. One comment in a > > mailing list post suggests -U 0 and -C 0 in smartd.conf to silence the > > complaints, but I have the idea that would just be looking to lose data. > > > > I've done smartctl -a /dev/hda and had a look at what that tells me. > > > > Are there tools available to help figure out which files the problem > > sectors are in so I can check what should be there and maybe push a > > write on the sectors to force remapping? > > http://smartmontools.sourceforge.net/BadBlockHowTo.txt Thanks, Alexander. It occurs to me that I should have mentioned that I have an lvm partition on this disk. I read the manpages for lvm, and I didn't find anything that explained how to convert the lvm sizes and extents to physical sector numbers. But it's a fresh install. I did remove the last logical partition and cut two partitions in the space there, but I haven't done any resizing. So I thought I could get a rought idea just by converting everything to bytes. (debugfs doesn't seem to work on lvm?) But if my math is right, it looks like the sector giving errors is off the end of the disk. Here's the relevant stuff -- From the mail to root: ----------------------------------------------------------------------- Subject: SMART error (OfflineUncorrectableSector) detected on host: ... The following warning/error was logged by the smartd daemon: Device: /dev/hda, 5 Offline uncorrectable sectors For details see host's SYSLOG (default: /var/log/messages). ... Subject: SMART error (CurrentPendingSector) detected on host: ... The following warning/error was logged by the smartd daemon: Device: /dev/hda, 5 Currently unreadable (pending) sectors For details see host's SYSLOG (default: /var/log/messages). ... ----------------------------------------------------------------------- The output of smartctl: ----------------------------------------------------------------------- [root@rees-linux ~]# smartctl -a /dev/hda smartctl version 5.33 [i386-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen Home page is http://smartmontools.sourceforge.net/ === START OF INFORMATION SECTION === Device Model: ST340823A Serial Number: 7EF26EF7 Firmware Version: 3.11 User Capacity: 40,020,664,320 bytes Device is: In smartctl database [for details use: -P show] ATA Version is: 5 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Wed Jun 15 11:26:19 2005 JST 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 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: ( 422) seconds. Offline data collection capabilities: (0x1b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. No Conveyance Self-test supported. No 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. No General Purpose Logging support. Short self-test routine recommended polling time: ( 1) minutes. Extended self-test routine recommended polling time: ( 44) minutes. 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 0x000e 077 061 025 Old_age Always - 118562424 3 Spin_Up_Time 0x0002 070 070 000 Old_age Always - 0 4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 16 5 Reallocated_Sector_Ct 0x0032 100 100 036 Old_age Always - 6 7 Seek_Error_Rate 0x000e 072 060 030 Old_age Always - 16545793 9 Power_On_Hours 0x0032 074 074 000 Old_age Always - 23266 10 Spin_Retry_Count 0x0012 100 100 097 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 31 194 Temperature_Celsius 0x0022 040 047 000 Old_age Always - 40 195 Hardware_ECC_Recovered 0x001a 077 065 000 Old_age Always - 125304958 197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 5 198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 5 199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0000 100 100 000 Old_age Offline - 0 202 TA_Increase_Count 0x0032 100 253 000 Old_age Always - 0 SMART Error Log Version: 1 ATA Error Count: 101 (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 101 occurred at disk power-on lifetime: 23215 hours (967 days + 7 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 31 eb 50 e4 Error: UNC at LBA = 0x0450eb31 = 72411953 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 03 58 2f eb 50 e4 00 01:48:01.941 READ DMA c8 03 60 27 eb 50 e4 00 01:47:57.331 READ DMA c8 03 68 1f eb 50 e4 00 01:47:52.723 READ DMA c8 03 70 17 eb 50 e4 00 01:47:48.084 READ DMA c8 03 78 0f eb 50 e4 00 01:47:43.470 READ DMA Error 100 occurred at disk power-on lifetime: 23215 hours (967 days + 7 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 31 eb 50 e4 Error: UNC at LBA = 0x0450eb31 = 72411953 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 03 60 27 eb 50 e4 00 01:47:57.331 READ DMA c8 03 68 1f eb 50 e4 00 01:47:52.723 READ DMA c8 03 70 17 eb 50 e4 00 01:47:48.084 READ DMA c8 03 78 0f eb 50 e4 00 01:47:43.470 READ DMA c8 03 80 07 eb 50 e4 00 01:47:37.861 READ DMA Error 99 occurred at disk power-on lifetime: 23215 hours (967 days + 7 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 31 eb 50 e4 Error: UNC at LBA = 0x0450eb31 = 72411953 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 03 68 1f eb 50 e4 00 01:47:52.723 READ DMA c8 03 70 17 eb 50 e4 00 01:47:48.084 READ DMA c8 03 78 0f eb 50 e4 00 01:47:43.470 READ DMA c8 03 80 07 eb 50 e4 00 01:47:37.861 READ DMA c8 03 80 87 ea 50 e4 00 01:47:37.857 READ DMA Error 98 occurred at disk power-on lifetime: 23215 hours (967 days + 7 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 31 eb 50 e4 Error: UNC at LBA = 0x0450eb31 = 72411953 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 03 70 17 eb 50 e4 00 01:47:48.084 READ DMA c8 03 78 0f eb 50 e4 00 01:47:43.470 READ DMA c8 03 80 07 eb 50 e4 00 01:47:37.861 READ DMA c8 03 80 87 ea 50 e4 00 01:47:37.857 READ DMA c8 03 80 07 ea 50 e4 00 01:47:37.846 READ DMA Error 97 occurred at disk power-on lifetime: 23215 hours (967 days + 7 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 31 eb 50 e4 Error: UNC at LBA = 0x0450eb31 = 72411953 Commands leading to the command that caused the error were: CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name -- -- -- -- -- -- -- -- ---------------- -------------------- c8 03 78 0f eb 50 e4 00 01:47:43.470 READ DMA c8 03 80 07 eb 50 e4 00 01:47:37.861 READ DMA c8 03 80 87 ea 50 e4 00 01:47:37.857 READ DMA c8 03 80 07 ea 50 e4 00 01:47:37.846 READ DMA c8 03 80 87 e9 50 e4 00 01:47:37.840 READ DMA SMART Self-test log structure revision number 1 No self-tests have been logged. [To run self-tests, use: smartctl -t] Device does not support Selective Self Tests/Logging ----------------------------------------------------------------------- The output of fdisk: ----------------------------------------------------------------------- [root@rees-linux ~]# fdisk -l Disk /dev/hda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 33 265041 83 Linux /dev/hda2 34 425 3148740 82 Linux swap /dev/hda3 426 4865 35664300 8e Linux LVM ----------------------------------------------------------------------- Calculations in bc: ----------------------------------------------------------------------- [root@rees-linux ~]# bc bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. lba=72411953 print 16065 * 512 * 4865 40015987200 print 255*63 16065 print 255*63*4865 78156225 start=255*63*425 print start+lba 79239578 print (start+lba)*512 40570663936 ----------------------------------------------------------------------- Should I be printing start-lba there? And, once I do have an idea in which lvm volume it's located, is there a flag for debugfs that I've missed, to allow me to work on an lvm volume? Or are there lvm tools? -- Joel Rees <rees@xxxxxxxxxxx> digitcom, inc. 株式会社デジコム Kobe, Japan +81-78-672-8800 ** <http://www.ddcom.co.jp> **