Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.
From personal experience, whenever I have a problem with any component in my computer, it’s more often the hard drive than anything else. My CPU has never failed me, nor my RAM, and my motherboard only once – partially. However, if I still had all the hard drives which have caused me some sort of grief or failed completely, it would sum up to a good-sized pile.
However, you can prolong the life of your hard drives through careful monitoring and maintenance. If you’re a Linux user, there are a number of tools which you can use to achieve this. There should be a tool for every type of user, including graphical tools as well as command line commands.
Gnome Disk Utility
The Gnome Disk Utility is my recommended pick when it comes to graphical tools, and it should be more than enough for most users. Overall, you can do a lot with this program, but it also has a number of features pertaining to disk faults and errors.
First and foremost, Gnome Disk Utility lets you look at the S.M.A.R.T. data of your hard drive (a special area on your hard drive which keeps track of what works and doesn’t work on your hard drive) and lets you know if there’s anything you should be aware of in case you haven’t noticed any operational issues yet. You can also initiate self-tests of your hard drive so you can be sure that the S.M.A.R.T. data being shown is current and accurate.
Gnome Disk Utility should already be installed by default on most distributions.
If you’re familiar with GParted, you can also use it to run checks on your filesystems to make sure that they do not have any issues either. These checks can also help fix issues which may be caused by physical hard drive issues, primarily by marking the affected blocks as unusable. This way, if the only issue with your hard drive is a couple of bad sectors, you can let the filesystem know about the issue so that it won’t be tempted to use those bad sectors.
Then, you can continue using your hard drive as if there was nothing wrong with it – albeit with a tad bit less total storage since you won’t be able to use those sectors anymore. You can also use GParted to not only check your Linux partitions, but also a certain number of other filesystems as well, including NTFS. To see which types of filesystems GParted can check, click here.
GParted usually needs to be installed from your respective repositories, but it should be found under the name gparted.
A popular command line tool to look up S.M.A.R.T. information on a drive is smartctl. Although it’s not nearly as user-friendly simply because it’s a command line tool, it is still very useful for people who feel comfortable in the terminal and know how to use it or look up commands that go along with the tool.
To check whether a hard drive supports S.M.A.R.T., you can run
smartctl -i /dev/sdx where you replace the x with the letter of your drive. If you only have one drive, it’s most likely going to be a, otherwise you’ll need to look it up via your preferred method. You can then check if a hard drive is failing by using
smartctl -d ata -H /dev/sdx, again replacing the x for your drive’s letter.
There’s much more you can do with smartctl, but those are some commands you can use to get started.
Thankfully, there’s a graphical tool which uses the smartctl tool called gsmartcontrol. With this tool you can still see a lot of technological data about your hard drive, but in a more organized and relatively visually appealing form when compared to the command line tool. There are a good number of things you can configure, and worth checking out.
Armed with these tools, you should be able to easily monitor the status of your hard drive and know what’s happening to it. When you’re informed, you can prepare appropriately to either prolong the life of the drive or have a substitute ready when it’s needed. These are the tools I definitely recommend checking out first, although there’s always others which you can use.
Don’t forget to make sure your data is safe in case your hard drive does fail! Check out our MakeUseOf guide for data recovery.
Are hard drive failures an issue for you? How often do they occur, and what do you do to detect or prevent them? Are there any other tools worth noting? Let us know in the comments!
Image Credit: Sim75 (Simon Lane Photography)