Changes

Repairing and Defragmenting Windows Server 2008 Disks

1,946 bytes added, 19:53, 11 August 2008
New page: The objective of this chapter of Windows Server 2008 Essentials is to cover the subject of checking, repairing and defragmenting FAT, FAT32 and NTFS file systems under Windows Server 2...
The objective of this chapter of [[Windows Server 2008 Essentials]] is to cover the subject of checking, repairing and defragmenting FAT, FAT32 and NTFS file systems under Windows Server 2008 using both graphical and command-line tools.

== Using Check Disk to Scan For and Fix File System Errors ==

The Check Disk tool can be used either to scan for and report errors on a file system, or to locate and fix errors. The graphical from of Check Disk can be invoked either from within Windows Explorer or the Disk Management tool. In either case, invoke the tool by right clicking on the drive in question, selecting ''Properties'', clicking the ''Tools'' tab and pressing the ''Check Now...'' button.

Once invoked, the initial Check Disk dialog will appear providing two options as illustrated below:


[[Image:windows_server_2008_check_disk.jpg|The Windows Server 2008 Disk Check Options]]


If neither of the options are selected when the ''Start'' button is pressed Check Disk will only report, but not attempt to fix errors. In order for Check Disk to repair errors and recover bad sectors during the scan the ''Automatically fix file system errors'' and ''Scan for and attempt recovery of bad sectors'' toggles must be selected respectively.

If the disk drive contains open files, Check Disk will be unable to fix errors located during the scan and will display a dialog warning you of this fact. This warning dialog will also provide the option to have the check run on the next system reboot (before any files are opened). This marks the disk as ''dirty'' forcing Check Disk execution at system startup. This setting may also be specified from the command prompt as follows:

<pre>
fsutil dirty set e:
Volume - e: is now marked dirty
</pre>

The current setting for a volume may be checked at any time using '''fsutil dirty query''':

<pre>
fsutil dirty query
Volume - e: is Dirty
</pre>

== Running Check Disk from the Command-prompt ==