Skip to content

Inexplicable Hard Drive Error

I'm not sure what hardware details would be relevant here but I'll try to supply any asked for. For months now I've had a weird issue. My hard drive activity light will come on and stay on and the computer all but locks up, everything takes forever to execute. Rebooting doesn't fix it and the only thing that will fix it is shutting down, booting back up with a disc that gives a live environment, then running GParted and having it check and repair errors. It never reports any errors, but after I do that it will run fine until the next time it happens (it happens maybe two or three times a week) I assumed my hard drive was going out and so bought a new one only to have the new one do the exact same thing. Any hints on where to start troubleshooting this would be greatky appreciated.

4 points6 comments
Open on Reddit
About this post
Posted
Archived
Score
4 · 100% up
Kind
Text
ID
63rboh

Author

5
posts
54
comments
0
media
View profile

6 comments

I'm totally at a loss, but you can parse through dmesg logs, sudo journalctl -r, for past events, and sudo journalctl -f to follow system messages and errors in realtime. Clues may abound.

1 points

Thank you. I use Arch and I've been Linux only for at least ten years so you'd think I'd know more.

1 points

With I think 4.8 and 4.9 kernel versions, I had issues with all disks locking up for a minute or longer occasionally. Programs then froze when they accessed the drives. When was the last time you did pacman -Syu? If your problem is related to what I saw, it might be fixed with an update.

To research if you have a hardware problem with your HDD, look at the output of smartctl -x or smartctl -a for your drive. I mean, run for example the following if the HDD you are interested in is /dev/sda:

sudo smartctl -x /dev/sda

Search for a list named "Vendor Specific SMART Attributes with Thresholds" in the output. It looks like a table. The entries in that table are explained in this Wikipedia article:

https://en.wikipedia.org/wiki/S.M.A.R.T.

On that Wikipedia page, you'll find a table with descriptions if you scroll down. The lines with a highlighted background are the ones you want to look at.

If you are confused, show the table you see in smartctl's output here so that other people can take a look at it.

For my HDD, the scary entries are named like this in smartctl's output:

Reallocated_Sector_Ct   
Spin_Retry_Count        
Reallocated_Event_Count 
Current_Pending_Sector  
Offline_Uncorrectable   

And there's this entry here that usually means that the data cable is broken and needs to be replaced:

UDMA_CRC_Error_Count    
1 points

I run pacman -Syu daily. Also, thank you so much for this great detailed response. I will give your suggestions a try.

1 points

"all but locks up". So it doesn't lock up and you can run commands if you're patient, and ideally run commands that are quick. So you can investigate. Leave dstat -tcdngym 10 running somewhere you can switch to it, e.g. on a VT, or in screen(1), even if you have to be patient. Look at it occasionally to get an idea of "normal". Next time there's a problem, be patient enough to reach it, you'll have some history, ten seconds a line, and see what's different. Is there lots of paging? A high "wai" percent, waiting on I/O? That will be a step towards asking with more detail.

The smartctl(8) is good, but, again, get a feel for what all the values the drive returns. Run it daily. diff them to see what's changing, e.g. power-on hours, and look for anything odd.

1 points

Thank you as well, I've got dstat running now. Given that Arch users are expected to be a bit more savvy I appreciate the help with something basic like this.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.