Section 2.5: Defragmenting Volumes and Partitions

Defragmenting the disks on all your servers can ensure optimal performance of your disks. Defragmentation is the process of reorganizing your disk so that clusters that make up each file are stored together, instead of being spread around the disk. Windows Server 2003 provides two tools that work with both basic and dynamic disks that are formatted with the FAT, FAT32, or NTFS file systems for performing defragmentation. These tools are the Disk Defragmenter and the defrag command-line utility.

To defragment a disk using the Disk Defragmenter, do the following:

• Click on the START button to display the Start Menu



• Click on SYTEM TOOLS


• In the console three, expand the storage node

• Then click on DISK MANAGEMENT

• Click analyze to analyze your disks and the extent of their fragmentation

• Click view report to view the status of your disk

• If your disks require defragmentation, click defragment to start the process

• When the defragmentation process is complete, click close

You can also use the defrag command-line utility to defragment a disk. The syntax for the defrag command is:

defrag <volume> [-a] [-f] [-v]

Table 2.2: The Defrag Parameters and Switches

Command Description
<volume> The drive letter or mount point to be defragmented.
-a Analyzes the volume and displays an analysis summary indicating whether you should defragment the volume.
-f Forces defragmentation of the volume when low on free space.
-v Displays the complete analysis and defragmentation reports. When used with the -a switch, it displays only the analysis report.

Note: If you press ctrl+c while running the defrag command-line utility, the defragmentation process will be stopped.