Linux Hard Drive Error Checking
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site linux check hard drive health About Us Learn more about Stack Overflow the company Business Learn more about check hard disk health linux command hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is how to check failed disk in linux a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The linux badblocks best answers are voted up and rise to the top How to check the health of a hard drive up vote 65 down vote favorite 20 My SATA drive started clicking and I was unable to access the data. It was not clicking loudly though, like a drive that has already gone bad. After tightening the connections to the hard drive, it stopped clicking and I
Linux Hard Drive Speed Test
was able to access the data again. I have started to move files off of the drive, but I think this drive might still be in good health. I didn't find any data corruption and I haven't had any trouble accessing any files. I have never had an SATA drive fail before so I'm thinking that it could have just been the loose connections that was causing the problem. What tests can I run on this drive to find out how healthy it is? This is the hard drive in question: HITACHI Deskstar T7K250 HDT722525DLA380 (0A31636) 250GB 7200 RPM 8MB Cache SATA 3.0Gb/s 3.5" Hard Drive -Bare Drive linux hard-drive sata share|improve this question edited Aug 3 '10 at 8:57 Mokubai♦ 37.4k1193109 asked Aug 2 '10 at 23:23 tony_sid 4,3952683150 1 Oh, when I answered you hadn't mentioned that it was a deathstar. At least some of the Deskstar line has a very bad reputation for longevity and reliability. Bad enough that the failing drives are termed "deathstar". –Slartibartfast Aug 4 '10 at 2:02 add a comment| 10 Answers 10 active oldest votes up vote 59 down vote accepted sudo smartctl -a /dev/sda |
/ SignupHow-To Windows Linux Mac Mobile Android iOS Web Browsers Chrome OS Gadgets Raspberry Pi Hardware Guides How Things Work Opinions
Linux Smartctl
Software Hacks Software Tools WordPress Start WordPress Blog All CategoriesPremiumDealsGiveaway Follow how to check disk status in linux us: How to Check and Monitor Hard Disk Health on Linux with Smartmontools Obaro Ogbo 14th linux badblocks command Apr 2015 Linux 1 Comment Share Tweet Email SMART (an acronym for the Self-Monitoring, Analysis and Reporting Technology) is found in modern hard drives, and it http://superuser.com/questions/171195/how-to-check-the-health-of-a-hard-drive enables a drive to detect and report on various conditions that may indicate impending failure. Smartmontools is a free software package, available for multiple platforms, that can utilizes the S.M.A.R.T. attributes of a hard drive to enquire about its state. With smartmontools, a tech-savvy admin/user will be adequately warned and prepared for https://www.maketecheasier.com/monitor-hard-disk-health-linux/ a hard drive failure and can make backups before the drive becomes critical.InstallationOn Debian or Ubuntu systems, smartmontools is available via the default repositories.sudo apt-get install smartmontoolsOn Fedora:sudo yum install smartmontoolsInstalling smartmontools package delivers two programs to your system: smartctl, which should be used interactively, and smartd, which, as the name suggests, is a daemon program designed to run in the background.SmartctlSmartctl requires root permissions to run and so must be run by the root user or a user with sudo privileges. Smartctl monitors an entire hard drive (not partitions), hence when run, it should be given the required hard drive as the final argument. For this article, we use "/dev/sda" as the hard drive device file. Be sure to replace that with your hard drive's file.To get information about a drive, use the -i option.sudo smartctl -i /dev/sdaThe above image shows some information about the drive, and we can see, from the highlighted lines, tha
ext3, ext4, etc.). Depending on when was the last time a file system was checked, the system runs the fsck during boot time to check whether http://www.thegeekstuff.com/2012/08/fsck-command-examples the filesystem is in consistent state. System administrator could also run it manually http://www.makeuseof.com/tag/avoid-linux-hdd-faults-and-errors-with-these-tools/ when there is a problem with the filesystems. Make sure to execute the fsck on an unmounted file systems to avoid any data corruption issues. This article explains 10 practical examples on how to execute fsck command to troubleshoot and fix any filesystem errors. 1. Filesystem Check on a Disk Partition First, hard drive view all the available partitions on your system using parted command as shown below. # parted /dev/sda 'print' Number Start End Size Type File system Flags 1 1049kB 106MB 105MB primary fat16 diag 2 106MB 15.8GB 15.7GB primary ntfs boot 3 15.8GB 266GB 251GB primary ntfs 4 266GB 500GB 234GB extended 5 266GB 466GB 200GB logical ext4 6 467GB 486GB 18.3GB logical ext2 7 487GB linux hard drive 499GB 12.0GB logical fat32 lba You can check a specific filesystem (for example: /dev/sda6) as shown below. # fsck /dev/sda6 fsck from util-linux 2.20.1 e2fsck 1.42 (29-Nov-2011) /dev/sda6: clean, 95/2240224 files, 3793506/4476416 blocks The following are the possible exit codes for fsck command. 0 - No errors 1 - Filesystem errors corrected 2 - System should be rebooted 4 - Filesystem errors left uncorrected 8 - Operational error 16 - Usage or syntax error 32 - Fsck canceled by user request 128 - Shared-library error 2. Fsck Command Specific to a Filesystem Type fsck internally uses the respective filesystem checker command for a filesystem check operation. These fsck checker commands are typically located under /sbin. The following example show the various possible fsck checker commands (for example: fsck.ext2, fsck.ext3, fsck.ext4, etc.) # cd /sbin # ls fsck* fsck fsck.cramfs fsck.ext2 fsck.ext3 fsck.ext4 fsck.ext4dev fsck.minix fsck.msdos fsck.nfs fsck.vfat fsck command will give you an error when it doesn't find a filesystem checker for the filesystem that is being checked. For example, if you execute fsck over a ntfs partition, you'll get the following error message. There is no fsck.ntfs under /sbin. So, this gives the fol
and iPad Internet Security Technology News Lifestyle Entertainment Office Productivity Creative Gaming Browsers Social Media Finance Self Improvement Hardware Technology Explained Buying Guides Smart Home DIY Product Reviews Deals Giveaways Top Lists About About MakeUseOf Advertise Privacy Chats Search for: Facebook Pinterest Twitter YouTube Search Popular Topics The Internet Windows iPhone and iPad Android Mac Gaming MakeUseOf 4 Ways to Completely Delete Your HDD Security 4 Ways to Completely Delete Your HDD Kev Quirk Google Now Tells You When Politicians Are Lying Internet Tech News Google Now Tells You When Politicians Are Lying Dave Parrack Top Deals Search Open Menu Close Menu PC & Mobile Windows Mac OS X Linux Android iPhone and iPad Internet Security Technology News Lifestyle Entertainment Office Productivity Creative Gaming Browsers Social Media Finance Self Improvement Hardware Technology Explained Buying Guides Smart Home DIY Product Reviews Deals Giveaways Top Lists About About MakeUseOf Advertise Privacy Chats Facebook Facebook Facebook Facebook Search for: Avoid Linux HDD Faults & Errors With These Tools Linux Avoid Linux HDD Faults & Errors With These Tools Danny Stieben August 4, 2012 04-08-2012 4 minutes Avoid Linux HDD Faults & Errors With These Tools Facebook Twitter Pinterest Stumbleupon Whatsapp Email Ads by Google 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