Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I decided to run the long set of SMART tests on my HD using smartctl and I got a line of dubious output.
Num Test_Description Status Remaining LifeTime(hours)
# 1 Extended offline Completed: read failure 50% 7770
LBA_of_first_error
2043198420
I'm not an expert so I don't know if this is a warning of failure or not.
It also seems, from the message, that the tests did not complete, is this the case?
This means there are bad blocks, but do run 'smartctl -a /dev/sda' and post the output. The test did complete, if it didn't it would have said user terminated, but it clearly says that it completed with read failure (bad blocks).
That's not too bad for a drive that gets started and stopped quite a bit (average running time ~40 minutes). You've got 13 sectors that have been reallocated to spares and 4 more that are pending reallocation (currently visible to the OS as bad sectors -- will be corrected or reallocated the next time they are written). Until that happens the long test will not run to completion without error.
The easiest way to clear out the bad sectors is just to overwrite the entire drive with zeros. Obviously that destroys the current contents entirely, so you would need a way to back up and restore anything you wanted to save. The procedure for identifying what files (if any) are affected and doing the minimum damage to your data is on the Bad block HOWTO page at the smartmontools web site. That's a discouragingly long page, but it contains several different examples for different filesystems, and you will only be concerned with one of the cases. The procedure does have to be performed separately for each bad sector, though, so you will probably need to go through it at least 4 times. (You could have more bad sectors not yet in the "pending" list because there has never been any attempt to read them.)
Whether this drive should continue to be used depends on whether new bad sectors continue to develop. You can't determine that until you discover all of the current bad sectors.
Yeah, the drive looks fine other than the bad sectors. Do keep a backup of your data as usual, and continue monitoring it. It is true that lots of bad blocks may mean the drive is failing, but I don't think this is the case here because everything else looks fine.
You could zero the drive, but with 2 TB drive that takes a long time. The drive should automatically reallocate the bad blocks.
Ok, so I do nothing and hope the drive reallocates the sectors. I don't like the passive role much, is there a way I can ask the drive "Do you have lots of additional sectors or are you running out and I need to replace you"?
Also, what do you mean by zeroing the drive? I was thinking, and have the parts to, finally, impliment a raid 3 array, so I'm planning to backup my data and plug the two new drives in and set the BIOS to raid 3 (I'm assuming that the BIOS will not preserve the data). So, I'm planning on having down time and Linux re-installation time so if there's something I can do, to make matters better, please say so.
Replace "X" with the appropriate drive letter, and do NOT make a mistake. The blocksize ("bs=") parameter is fairly arbitrary, but going larger than 256k or so makes little difference in speed. (It's going to take perhaps 5 or 6 hours an a 2TB drive with a direct SATA interface.)
The drive currently has plenty of spare sectors. As it uses them, you will see the number in the "VALUE" column for Reallocated_Sector_Ct decrease from 100 toward its threshold value of 5, but the drive really should be replaced long before it gets that far. Once all of the currently bad sectors have been found and reallocated, any continuing increase the the RAW_VALUE for that parameter should be taken as a sign that the drive is seriously in trouble.
Last edited by rknichols; 12-17-2014 at 08:02 PM.
Reason: Add time estimate
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.