The Benefits of Using CHKDSK

 

According to Microsoft, relatively minor file and directory corruption can lead into major corruption on the Windows system hard drive if it is not corrected soon after it is detected. Concern over "down time" can in some cases out weigh the necessity of taking corrective action. The risk here is that delaying corrective action can potentially lead to placing major system data in jeopardy.

 

This article deals with an often overlooked utility that has been provided by Microsoft with the Windows operating system to correct these types of problems.

 

CHKDSK is a native Windows tool that can determine the extent of file and file system corruption. It uses a command-line interface to verify the logical integrity of a file system on Windows for both FAT and NTFS file systems. When CHKDSK encounters logical inconsistencies it takes action to repair the file system data.

 

Syntax Usage:

 

image\ebx_-295953512.gif

 

 

Under most circumstances, running CHKDSK with the "/F" and "/R" switches will require the restarting of Windows because of open handles on the shared drive. Normally, when the computer restarts, there are no services or drivers running that prevent CHKDSK from checking the disk.

 

After executing CHKDSK at the prompt, selecting "Y" for yes, will cause CHKDSK to execute the next time Windows is rebooted.

 

How CHKDSK works:

 

Essentially, using CHKDSK with the "/F" and "/R" switches executes 4 major passes over the system hard drive, examining each file record and verifying the consistency of each directory. If discrepancies or inconsistencies are found, they are noted in CHKDSK’s output.

 

When an orphaned file is found, it can often be restored to its rightful directory, provided that directory is still around. If the directory that should hold the file no longer exists, CHKDSK will create a directory in the root directory and place the file there.

CHKDSK will then take action to repair any file system data.

 

When the "/R" switch is used, CHKDSK attempts to read every sector on the volume to confirm that the sector is usable.

 

Options for using CHKDSK:

 

When disk corruption is detected on a volume, Microsoft recommends three basic choices:

 

·      Do nothing. For a mission critical server that is expected to be online 24 hours a day, this is often the choice of necessity. As mentioned earlier, the drawback to this option is that relatively minor corruption can lead to major corruption of system and application data. Therefore, this option should only be considered when keeping a system up is more important that the integrity of the data stored on the corrupted volume because all data on the corrupted volume should be considered "at risk" until CHKDSK is run. 

·      Run a full CHKDSK (with "/F" and "/R" switches). This option repairs all file system data, restoring all user data that can be recovered by means of an automated process. The drawback to this option is that a full CHKDSK can require several hours of downtime for a mission critical server at an inopportune time. 

·      Run an abbreviated CHKDSK using some combination of the "/C" and "/I" (NTFS only) switches. This option repairs the kinds of corruption that can "snowball" into bigger problems in much less time than a full CHKDSK would require, but does not repair all the corruption that might exist. A full CHKDSK will still be required at some future time to guarantee that all the data that can be recovered has been recovered.

In conclusion, while the Microsoft CHKDSK utility is not a panacea for all hard drive and file system problems that you may encounter, it is an important tool in the system administrator’s toolbox for dealing with these kinds of problems. In most cases, CHKDSK will find and correct the problem enabling you to get the NT system back into production in a fairly quick and painless fashion. The critical point is not to delay too long in using this Microsoft utility, thereby placing your NT system data in jeopardy.