> > [...] > > FWIW, after reading this thread, I've slightly modified smartmontoolsso> > that when smartctl prints the error log (-l error) it ALSO prints theLBA> > at which a READ or WRITE command failed.> > Thank you very much for patching smartctl and explaining howto calulate> the LBA from those values.

You're welcome!

> So at least my hd crash had some sense.

Yes. One of the 512-byte sectors became unreadable, so when the OSasked for the data from that sector, the disk generated a hard error.

> > [Note that this is a 28-bit sector address. If a disk is larger than2^37> > Bytes = 137 GB, then some LBAs can't be written in 28 bits, in whichcase> > there won't be a summary error log entry. If the disk is smaller than> > 2^37 Bytes then the failing LBA address should always be logged.]> > Why are we bound to a 28 bit value?> As there are currently more and more disks out there with >=260GB, I> think this will be an issue very soon.

To quote from the ATA specifications:

"The summary error log supports 28-bit addressing only".

This summary error log is the error log currently printed bysmartmontools. In principle, for ATA 6 and 7, there are two additionallogs: 'Comprehensive SMART error' log and 'Extended ComprehensiveSMART error log'. The 'Comprehensive SMART error log' is also 28-bitaddresses only. The 'Extended' log also supports 48-bit addresses.

The '-l directory' option to smartctl will show what logs your disksupports.

When I actually get my hands on a disk that supports the 'Extended'log, I'll add code to smartmontools to print it. However, at least upto this point I have not seen a disk that supports it. To cite oneexample, a recent Maxtor 250 GB disk (manufacture date Jan 28, 2004) Device Model: Maxtor 6Y250P0 Serial Number: Y60PYXBE Firmware Version: YAR41BW0does NOT support the Extended error logs.

Once I find a disk that actually supports the logs, I need to use theATA READ LOG EXT command to get the logs. In order to issue thiscommand under Linux, I need to use the . HDIO_DRIVE_TASKFILE ioctl().In my experience many distribution kernels (eg, Redhat) don't supportthis ioctl(), so users may need to rebuilt their kernels in order tobe able to read the Extended error logs.