34,333
edits
Changes
→Running Check Disk from the Command-prompt
<pre>
C:\Windows\system32>chkdsk e:
The type of the file system is NTFS.
Volume label is New Volume.
WARNING! F parameter not specified.
Running CHKDSK in read-only mode.
CHKDSK is verifying files (stage 1 of 3)...
64 file records processed.
File verification completed.
0 large file records processed.
0 bad file records processed.
0 EA records processed.
0 reparse records processed.
CHKDSK is verifying indexes (stage 2 of 3)...
90 index entries processed.
Index verification completed.
0 unindexed files processed.
CHKDSK is verifying security descriptors (stage 3 of 3)...
64 security descriptors processed.
Security descriptor verification completed.
13 data files processed.
Windows has checked the file system and found no problems.
8385535 KB total disk space.
328864 KB in 9 files.
16 KB in 15 indexes.
0 KB in bad sectors.
44715 KB in use by the system.
43984 KB occupied by the log file.
8011940 KB available on disk.
4096 bytes in each allocation unit.
2096383 total allocation units on disk.
2002985 allocation units available on disk.
</pre>
To perform error fixing, run chkdsk with the ''/F'' option. Alternatively the ''/R'' option will perfrom the same error fixing as ''/F'' but will also check for bad sectors. The ''/X'' option performs the same error corrections as ''/F'' but also dismounts the volume before doing so.
== Defragmenting Disks with Disk Defragmenter ==
Disk defragmentation occurs over time as files written to clusters spread over a wide area of a disk volume. This is the inevitable side effect of files being created and deleted over time and can ultimately result in degraded disk read/write performance.
As such it is considered good practice to regularly monitor, and when necessary, defragment disk volumes.
One method for performing this task is to use the Disk Defragmenter tool which is accessed by right clicking on a disk volume in Windows Explorer or the Disk Management interface in Computer Management and selecting ''Properties''. In the properties dialog, select the ''Tools'' tab and click on ''Defragment Now...''. This will display the inital screen of the Disk Defragmenter as illustrated in the following figure:
[[Image:windows_server_2008_disk_defragmenter.jpg|The Disk Defragmenter]]
The tool will perform a scan of the selected volume and report whether a defragmentation is recommended (and in the above example it is recommended). Click on ''Defragment now...'' to initiate the defragmentation process. This will cause the drive selection dialog to appear. Select one or more disks to defragment form this dialog followed by ''OK'' to trigger the defragmentation process. As each selected drive is defragmented the progress will be displayed together with a button providing the option to cancel the process.
== Automated Disk Defragmentation ==
Windows Server 2008 also provides the option to automatically defragment disk drives as a background task. This is scheduled in the Disk Defragmenter tool which can be accessed eitehr from within Windows Explorer or Disk Management as outlined above. Once invoked, automated disk defragmentation is configured by setting the ''Run on a schedule (recommended)'' toggle:
[[Image:windows_server_2008_auto_defrag.jpg|Setting automated disk defragmentation]]
By default, automated defragmentation occurs at 1am every Wednesday. Once selected, the schedule may be configured by clicking on the ''Modify schedule...'' button where the frequency (daily, weekly, monthly), day and time may be specified:
[[Image:windows_server_2008_defrag_schedule.jpg|Scheduling automated defragmentation]]
To specify the volumes to be automatically defragmented, click on ''Modify volumes...'' and make the required volume selections.
== Defragmenting Disks from the Command-line ==