View Single Post
  #1   (View Single Post)  
Old 9th August 2008
PeterSteele PeterSteele is offline
Port Guard
 
Join Date: Jul 2008
Posts: 43
Default What is best way to monitor for bad sectors?

We are developing an appliance based on FreeBSD 7.0. We will be running a custom FS on top of both UFS and raw partitions and will need to have a way to deal with bad sectors. Ideally we'd like to be able to subscribe to a system event and have FreeBSD alert us when a bad sector is detected. I don't think there is a mechanism to do this though. We've noted that the system does seem to log a message in /var/log/dmesg when a bad sector is encountered, for example, these messages are occurring on one of ours systems right now:

ad8: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=343237347
g_vfs_done():ad8s1d[READ(offset=143525234688, length=2048)]error = 5
ad8: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=343237347
g_vfs_done():ad8s1d[READ(offset=143525234688, length=2048)]error = 5
ad8: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=343237347
g_vfs_done():ad8s1d[READ(offset=143525234688, length=2048)]error = 5

I assume these are due to bad sectors. So we thought one alternative could simply be to have a process that polls and scans /var/log/dmesg periodically and reports back to our management system when one of these errors are detected.

Is this a reliable/reasonable approach? Is there a better way to monitor a system for bad sectors?

I should add that we do have SMART installed and operational, but our experience so far with SMART is that it will not alert us to a sector that goes bad without warning. If we're mistaken about this, we'd appreciate some feedback. Thanks.

Last edited by PeterSteele; 9th August 2008 at 10:57 PM.
Reply With Quote