5

I get an email about the same SMART error every day. I'd like to configure the SMART daemon to ignore this specific error, but only this, since I still want to now if anything changes or gets worse.

This email was generated by the smartd daemon running on:

 host name: jon
DNS domain: [Unknown]
NIS domain: (none)

The following warning/error was logged by the smartd daemon:

Device: /dev/sdb [SAT], 11 Currently unreadable (pending) sectors


For details see host's SYSLOG.

You can also use the smartctl utility for further investigation.
The original email about this issue was sent at Sun Nov 25 02:30:45 2012 CET
Another email message will be sent in 24 hours if the problem persists.

When this first happened, the number of unreadable sectors was slowly increasing, so made a backup and tried many things described in this thread: https://serverfault.com/questions/104417/how-do-i-easily-repair-a-single-unreadable-block-on-a-linux-disk

As you can see from the email, this was 1.5 years ago, so I don't exactly remember what I tried and what not. However, the disk remains stable and working since then, so I don't see any reason to change anything. (Yes, I regularly create backups.)

I can only think of a workaround, which would be to ignore all mails containing this exact text, but this would only be treating symptoms, not the cause.

Edit:

I know many or most of you will give me the "replace the disk" advice, which in general is the best possible advice for a question like "I get this error, what should I do?"

But please, please accept that I'm aware of the risk and asking a very specific question regarding the SMART daemon. I didn't find anything in the docs that would indicate it is possible to do what I want, but I wanted to double check here first before going with my workaround.

Update:

About a week ago, the counter went down to 1 again. I have no idea what caused this, I did not maintenance work whatsoever on that machine. After more than 2 years, 11 sectors just got okay again. This is really weird.

5
  • 6
    Replace the disk.
    – Dan
    Jul 25, 2014 at 12:36
  • 2
    The disk is working fine, why should I replace it? If there is a way to stop that message from being sent, it is preferable over ignoring the message after it's been sent.
    – Sentry
    Jul 25, 2014 at 13:06
  • 6
    To use an analogy, this is the equivalent of asking how to make a smoke detector ignore a fire that hasn't spread from the bedroom yet. Get out of the house already.
    – Andrew B
    Jul 25, 2014 at 13:33
  • @Sentry: short answer, unlike some other SMART errors, reallocated sector count has the tendency to grow parabolically, and go from just one or two sectors to hundreds suprisingly quickly. there is no guarantee that this will be the case for your disk, just a very common outcome. Jul 25, 2014 at 16:10
  • 1
    @FrankThomas I know, I'm actually surprised that it hasn't crashed yet. Like I said, it was increasing for a few days and remained at 11 for the last 1.5 years. But replacing the disk is just a little less effort than restoring from a crash. Unless I really have to do something because it crashed, I stick to "Never change a running" system.
    – Sentry
    Jul 25, 2014 at 16:15

4 Answers 4

6

you need change config /etc/smartd.conf

add arguments to you setting:

-t -I 197  

It ignore attribute 197 - Pending Sectors

like this(Example):

/dev/ad0 -H -l error -l selftest -t -I 197
2

The simplest way to make the message stop without replacing the disk is to force the disk to either mark the sectors as good or bad instead of "maybe possibly bad", which is what "pending" means. You can do this by forcing a full read of the disk:

sudo dd if=/dev/sdb of=/dev/null bs=64K conv=noerror

This will read every sector of the disk and ignore errors, forcing the disk to re-check each pending sector and tell you if the sectors are actually bad or not.

Note, while this will clear the current 11 pending sectors, it may discover new potentially bad sectors in the process (resulting in a non-zero pending sector count). Run this again until there are no more pending sectors.

2
  • I think I've actually tried that back when the error occurred the first time, but I will give it a go. Can I do this with the file system mounted? The thing is: The bad sectors are on the root partition and it always is a pain in the a** to boot into a recovery system. Which is why I try to prevent that as much as I can.
    – Sentry
    Jul 25, 2014 at 16:17
  • 2
    You can do this while the disk is mounted, but it will degrade system performance until it completes. If you did this back when the error occurred the first time, then these are new possibly-failing sectors that have been detected since then. Jul 25, 2014 at 16:19
1

Hmm... I don't know how you can re-configure smartd, but I now that you can make OMD[1] ignore certain SMART errors (I once did this with a stabilized reallocated sector count). Maybe this is also an option for you if you want to monitor more parameters of your box than just the SMART readings.

0
1

Some drives are known to return this error wrongly such as Crucial MX500 series SSDs. One solution is to set up a custom drive db file at /etc/smart_drivedb.h containing the following (I had to edit to match my firmware number):

  { "Crucial/Micron MX500 SSDs",
    "CT(250|500|1000|2000)MX500SSD[14]", // tested with CT500MX500SSD1/M3CR023
    "M3CR032", // Firmware with bogus attribute 197
    "This firmware returns bogus raw values in attribute 197",
  //"-v 1,raw48,Raw_Read_Error_Rate "
    "-v 5,raw48,Reallocate_NAND_Blk_Cnt "
  //"-v 9,raw24(raw8),Power_On_Hours "
  //"-v 12,raw48,Power_Cycle_Count "
    "-v 171,raw48,Program_Fail_Count "
    "-v 172,raw48,Erase_Fail_Count "
    "-v 173,raw48,Ave_Block-Erase_Count "
    "-v 174,raw48,Unexpect_Power_Loss_Ct "
    "-v 180,raw48,Unused_Reserve_NAND_Blk "
    "-v 183,raw48,SATA_Interfac_Downshift "
    "-v 184,raw48,Error_Correction_Count "
  //"-v 187,raw48,Reported_Uncorrect "
  //"-v 194,tempminmax,Temperature_Celsius "
  //"-v 196,raw16(raw16),Reallocated_Event_Count "
    "-v 197,raw48,Bogus_Current_Pend_Sect " // Randomly flips 0 <> 1
  //"-v 198,raw48,Offline_Uncorrectable "
  //"-v 199,raw48,UDMA_CRC_Error_Count "
    "-v 202,raw48,Percent_Lifetime_Remain "
    "-v 206,raw48,Write_Error_Rate "
    "-v 210,raw48,Success_RAIN_Recov_Cnt "
    "-v 246,raw48,Total_LBAs_Written "
    "-v 247,raw48,Host_Program_Page_Count "
    "-v 248,raw48,FTL_Program_Page_Count"
  }

After creating the file run service smartd restart to update the smartd service. Then you can grep smartd /var/log/syslog to see that it's enabled for the drive.

Source: Smartmontools support ticket

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .