How To Check Disk For Errors In Windows [A Complete Guide]

The computer hard disk is the mind of your system which memorize every data about your computer even if it is turned off. In day-to-day basis, we often doesn't take care of it more because it is less prone to errors than the other components of your machine and works almost flawlessly every time. But it is also a mechanical part of your system which might come under the "Error Attack". So here we're discussing about the hard disk errors and the ways to diagnose and prevent them from occurring as well. 

How Could You Know That Your Disk Is Suffering From Errors?

There is a nominal reduce in performance which goes unnoticed many times if your disk is suffering from errors. If the amount of errors is large, the transfer speed of your hard drive reduces eventually as the time goes on. The slump in performance might get unnoticed if the your system is equipped with big memory and mighty processor. Which means that if your system is equipped with robust hardware, even a slight performance dip is worth considering!

The checking disk of errors is very easy and can be performed by a novice user as well. There are actually two methods to do that. One is for regular users which deals with windows' user interface using Windows Explorer and the other one is more robust but a bit harder (Not for geeky personalities though), using Command Line Interface.

As the mass community is not-so geeky, we'll first discuss about the easier way using Windows Explorer.

First of all open "Computer" in Windows Explorer. This will show the drives that are currently connected to your computer.


Now Right Click on the drive that you want to check for errors. Click Properties.


Navigate to Tools tab where you'll find the option to check disk for errors. Click on Check Now (Administrator privileges are required).


The pop-up will come up with two options with the option already checked saying "Automatically fix file system errors" and the other one is "Scan for and attempt recovery of bad errors".

The "Automatically fix file system errors" attempts to solve the detected errors automatically on its own. If this option is left unchecked, the Disk Check utility will only check and display errors, but won't solve it.

If both the options are checked, it will thoroughly check the disk for errors and will also attempt to solve any physical errors on your hard drive if there exists any. Due to such functionality, it is get-able that it will obviously take more time than the regular Disk Checking but it is more accurate as well.

The time taken by this process depends upon the size of the file it is checking. Means, larger the size of file is, the more time it takes to check.
Note If one or more of the files on the hard disk are open, you will receive the following message:Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts?

Click on schedule disk check to schedule it on the next reboot.

Using Command Line Interface 

You can do this above mentioned processes and more with chkdsk.exe utility which runs via command line interface. The command that we'll use is CHKDSK.

Syntax
      CHKDSK [drive:][[path]filename] [/F] [/V] [/R] [/L[:size]] 

Key
   [drive:]   The drive to check. 
   
   filename   File(s) to check for fragmentation (FAT only). 
   
   /F         Automatically Fix file system errors on the disk.

   /X         Fix file system errors on the disk, (Win2003 and above)
              dismounts the volume first, closing all open file handles.
   
   /R         Scan for and attempt Recovery of bad sectors.
   
   /V         Display the full path and name of every file on the disk. 
   
   /L:size    NTFS only: change the log file size to the specified number of kilobytes. 
              If size is not specified, displays the current log size and the drive type
              (FAT or NTFS).

   /C         Skip directory corruption checks. 

   /I         Skip corruption checks that compare directory entries to the
              file record segment (FRS) in the volume's master file table (MFT)

Example:

CHKDSK C: /F

Fixing Errors /F

If the drive is the boot partition, you will be prompted to run the check during the next boot

If you specify the /f switch, chkdsk will show an error if open files are found on the disk.

Chkdsk /f will lock the volume, making data unavailable until chkdsk is finished.

If you use chkdsk /f on a disk with a very large number of files (millions), chkdsk may take a long time to complete.

When you delete a file or folder that has 'custom' permissions, the ACL is not deleted, it is cached. Chkdsk /f will remove ACLs that are no longer used. This is often the cause of the rather worrying message: "Windows found problems with the file system. Run chkdsk with the /F (fix) option to correct these."

It is normal for chkdsk /F to remove unused index entries and unused security descriptors every time you run it, these do not indicate a problem with the file system.

Scan only (without /f switch)

If a file needs to be fixed chkdsk will alert you with a message but will not fix the error(s).
chkdsk may report lost allocation units on the disk - it will produce this report even if the files are in-use (open). If corruption is found, consider closing all files and repairing the disk with /F.

Running chkdsk on a data volume that is in use by another program or process may incorrectly report errors when none are present. To avoid this, close all programs or processes that have open handles to the volume.



 
On computers running Windows 2003 SP1, chkdsk automatically creates a shadow copy, so you can check volumes that are 'in use' by another program or process. This enables an accurate report against a live file server. On earlier versions of Windows, chkdsk would always lock the volume, making data unavailable.

Run at Bootup

Running at bootup is often the easiest way to close all open file handles.

Use the GUI, chkntfs or the FSUTIL dirty commands to set or query the volumes 'dirty' bit so that Windows will run chkdsk when the computer is restarted.

Event Logs

Chkdsk will log error messages in the Event Viewer - System Log.
Chkdsk /f removes ACLs that are no longer used and reports this in the Event Viewer - Application Log.

Cluster (or block) Size

CHKDSK produces a report that shows the the block /cluster size
typically: "4096 bytes in each allocation unit."
When the cluster size is greater than 4 KB on an NTFS volume, none of the NTFS compression functions are available.

Exit codes

0 No errors were found
1 Errors were found and fixed.
2 Could not check the disk, did not or could not fix errors.

Notes:

Consider the time required to run Chkdsk to repair any errors that occur. Chkdsk times are determined by the number of files on the volume and by the number of files in the largest folder. Chkdsk performance was improved by 30% under Windows 2003 and around 50% in 2008 R2.

To issue chkdsk on a hard drive you must be a member of the Administrators group.

When CHKDSK is set to run at boot-up there is a delay to allow the check to be cancelled - this can be configured in the registry:

HKLM\System\CurrentControlSet\Control\Session Manager
REG_DWORD:AutoChkTimeOutData
The value is the time in seconds that you want CHKDSK to wait (0 = no delay) default is 10 seconds.

Chkdsk is also available from the Recovery Console (with different parameters.)

Disk Errors

"The file system structure on the disk is corrupt and unusable"

If you have disk corruption, run the drive manufacturers diagnostics:
Toshiba | Hitachi | ibm | Seagate/Maxtor/Freeagent | Western digital

How To Prevent Disk Errors From Occurring

Well, to fully prevent disks from errors is quite hard task, but you always can take some precautionary measures to reduce the frequency of the occurrence of such errors.
  • Don't ever directly cut the power supply from hard disk. When the hard disk is on and under full operation, the sudden power cuts can hurt your hard disk big times! So prevent your PC from sudden power cuts, which is the only thing that is in our hands to reduce the frequency of error occurrence.
  • Frequently check and fix disk for errors. Use any one of the above mentioned method at least one a month to let your disk operate smoothly.