Disk Defragmenter Tools and Settings

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Disk Defragmenter Tools and Settings

In this section

  • Disk Defragmenter Tools

  • Disk Defragmenter Registry Entries

  • Disk Defragmenter Group Policy Settings

  • Disk Defragmenter WMI Classes

  • Related Information

Disk Defragmenter Tools

The following tools are associated with Disk Defragmenter.

Defrag.exe: Disk Defragmenter

Category

Operating system tool

Version compatibility

All versions of the Disk Defragmenter command-line tool in the Windows Server 2003 family are identical.

Disk Defragmenter displays a blinking cursor while it is analyzing and defragmenting a volume. When Disk Defragmenter finishes analyzing a volume, it displays the analysis report. When Disk Defragmenter finishes defragmenting a volume, it displays the defragmentation report. After the process completes, Disk Defragmenter exits to the command prompt. The command-line version of Disk Defragmenter will analyze a volume only if the -a option is used.

For more information about Defrag.exe, see "Command Line References" in the Tools and Settings Collection.

Dfrg.msc: Disk Defragmenter snap-in

Category

Operating system tool

Version compatibility

All versions of the Disk Defragmenter snap-in in the Windows Server 2003 family are identical.

The Disk Defragmenter snap-in is divided into two main areas. The upper part lists the volumes on the local computer and allows you to select a volume to analyze and defragment. The lower part displays a graphical representation of the fragmentation on the volume. The colors indicate the condition of the volume:

  • Red areas show fragmented files.

  • Blue areas show contiguous (unfragmented) files.

  • White areas show free space on the volume. White areas on an NTFS volume might also represent the MFT zone. For more information about the MFT zone, see "NTFS Technical Reference".

  • Green areas show files that cannot be moved. The green areas usually represent the paging file, but on NTFS volumes, green areas might also represent space used by the NTFS change journal and the NTFS log file.

Disk Defragmenter Registry Entries

The following registry entries are associated with Disk Defragmenter.

The information here is provided as a reference for use in troubleshooting or verifying that the required settings are applied. It is recommended that you do not directly edit the registry unless there is no other alternative. Modifications to the registry are not validated by the registry editor or by Windows before they are applied, and as a result, incorrect values can be stored. This can result in unrecoverable errors in the system. When possible, use Group Policy or other Windows tools, such as Microsoft Management Console (MMC), to accomplish tasks rather than editing the registry directly. If you must edit the registry, use extreme caution.

For more information about registry entries, see "Registry Reference" in the Tools and Settings Collection.

BootOptimizeFunction

The following registry entries are located under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction.

Enable

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

Version

Windows Server 2003

Accepted values for this entry are Y or N. If the entry is set to Y, Windows automatically optimizes the file location for boot optimization. This optimization occurs automatically if the system is idle for 10 minutes. Boot optimization improves startup time by locating startup files in contiguous clusters on the volume, reducing the movement of the disk head when reading the volume.

LcnEndLocation

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

Version

Windows Server 2003

Stores the logical cluster number (LCN) that specifies the end location of the files moved by Disk Defragmenter for boot optimization.

LcnStartLocation

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

Version

Windows Server 2003

Stores the LCN that specifies the starting location of the files moved by Disk Defragmenter for boot optimization.

OptimizeComplete

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

Version

Windows Server 2003

Stores the value that indicates whether the optimize operation is complete.

OptimizeError

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

Version

Windows Server 2003

Stores an error message if an error was encountered during the optimization process.

Dfrg

The following registry entries are located under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg.

FreeSpaceErrorLevel

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg

Version

Windows Server 2003

Sets the percentage of volume capacity that must be free space for Disk Defragmenter to use as a sorting area. The default value is 15.

PathName

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg

Version

Windows Server 2003

Stores the path to the resource DLL for defragmentation, usually *systemroot\*system32.

ResourceDllName

Registry path

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg

Version

Windows Server 2003

Stores the name of the resource DLL for defragmentation, usually systemroot\system32\DfrgRes.dll.

Disk Defragmenter Group Policy Settings

The following table lists and describes the Group Policy settings that are associated with Disk Defragmenter.

Group Policy Settings Associated with Disk Defragmenter

Group Policy Setting Description

Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Back up files and directories

Allows the Administrator to bypass access control list (ACL) check when obtaining the file handle during the defragmentation procedure.

For more information about Group Policy settings, see "Group Policy Settings Reference" in the Tools and Settings Collection.

Disk Defragmenter WMI Classes

The following table lists and describes the WMI classes that are associated with Disk Defragmenter. The Win32_Volume class contains the Defrag method, used to defragment a FAT or NTFS volume.

WMI Classes Associated with Disk Defragmenter

Class Name Namespace Version Compatibility

Win32_Volume

\root\cimv2

Windows Server 2003

For more information about these WMI classes, see the WMI SDK documentation on MSDN.

The following resources contain additional information that is relevant to this section.