Partager via


Management tasks for disks and volumes

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

Managing disks and volumes

Managing disks and volumes includes creating and formatting partitions, logical drives, and volumes; setting disk quotas to limit disk usage; defragmenting volumes to improve file-system performance; and checking for file-system errors and bad sectors on a hard disk. The Windows Server 2003 family provides many tools you can use to effectively manage disks and volumes on new or existing systems. These tools include Disk Management, Disk Defragmenter, disk quotas, and error checking.

Some of the most common tasks are creating partitions or logical drives, formatting basic volumes, extending basic volumes, and defragmenting volumes. You can also manage disks and volumes from the Managing disks and volumes from the command line. For information about disk quotas, see Disk Quotas. For information about error checking, see Detecting and Repairing Disk Errors. For more information about other tasks for managing disks and volumes, see Disk Managment How To....

To create a partition or logical drive

  1. Open Computer Management (Local).

  2. In the console tree, click Computer Management (Local), click Storage, and then click Disk Management.

  3. Right-click an unallocated region of a basic disk, and then click New Partition, or right-click free space in an extended partition, and then click New Logical Drive.

  4. In the New Partition wizard, click Next, click Primary partition, Extended partition, or Logical drive, and then follow the instructions on your screen.

Notes

  • To perform this procedure on a local computer, you must be a member of the Backup Operators group or Administrators group on the local computer, or you must have been delegated the appropriate authority. To perform this procedure remotely, you must be a member of the Backup Operators group or Administrators group on the remote computer. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.

  • To open Computer Management, click Start, click Control Panel, double-click Administrative Tools, and then double-click Computer Management.

  • You can create primary partitions, extended partitions, and logical drives only on basic disks. You should create basic volumes instead of dynamic volumes if this computer also runs MS-DOS, Windows 95, Windows 98, Windows Millinnium Edition, Windows NT 4.0, or Windows XP Home Edition.

  • On a master boot record (MBR) disk, you can create up to four primary partitions, or three primary partitions, one extended partition, and unlimited logical drives.

  • On a GUID partition table (GPT) disk, you can create up to 128 primary partitions.

To format a basic volume

  1. Open Computer Management (Local).

  2. In the console tree, click Computer Management (Local), click Storage, and then click Disk Management.

  3. Right-click the partition, logical drive, or basic volume you want to format (or reformat), and then click Format.

  4. Select the options you want, and then click OK.

Notes

  • To perform this procedure on a local computer, you must be a member of the Backup Operators group or Administrators group on the local computer, or you must have been delegated the appropriate authority. To perform this procedure remotely, you must be a member of the Backup Operators group or Administrators group on the remote computer. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.

  • To open Computer Management, click Start, click Control Panel, double-click Administrative Tools, and then double-click Computer Management.

  • You cannot format system, boot, OEM, or unknown partitions.

  • File compression is supported only on NTFS volumes with cluster sizes 4 KB and smaller.

  • If you select the Perform a quick format check box, the files are removed from the disk but the disk is not scanned for bad sectors. Use this option only if this disk has been previously formatted and you are sure the disk is not damaged.

To extend a basic volume

  1. Open Command Prompt.

  2. Type:

    diskpart

  3. At the DISKPART prompt, type:

    list volume

    Make note of the number of the basic volume you want to extend.

  4. At the DISKPART prompt, type:

    select volumen

    Selects the basic volume, n, you want to extend into contiguous, empty space on the same disk.

  5. At the DISKPART prompt, type:

    extend [**size=**n]

    Extends the selected volume by size=n megabytes (MB).

Notes

  • To perform this procedure on a local computer, you must be a member of the Backup Operators group, Administrators group, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure. For more information, see Default local groups, Default groups, and Using Run as.

  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.

  • To extend a basic volume, it must either not be formatted with a file system or it must be formatted with the NTFS file system.

  • You can only extend a basic volume onto the same disk.

  • You can only extend a basic volume if it is followed by contiguous unallocated space.

  • For more information about Disk Management and the diskpart command, see Disk Management and DiskPart.

To defragment a volume

  1. Open Disk Defragmenter.

  2. Click the volume that you want to defragment, and then click Defragment.

    After the defragmentation is complete, Disk Defragmenter displays the results in Estimated disk usage after defragmentation.

  3. Click View Report to view the Defragmentation Report, which displays detailed information about the volume you defragmented.

Notes

  • To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.

  • To open Disk Defragmenter, click Start, point to All programs, point to Accessories, point to System Tools, and then click Disk Defragmenter.

  • You should analyze volumes before defragmenting them. This tells you whether you need to take the time to defragment them.

  • A volume must have at least 15% free space for Disk Defragmenter to completely and adequately defragment it. Disk Defragmenter uses this space as a sorting area for file fragments. If a volume has less than 15% free space, Disk Defragmenter will only partially defragment it. To increase the free space on a volume, delete unneeded files or move them to another disk.

  • You cannot defragment volumes that the file system has marked as dirty, which indicates possible corruption. You must run chkdsk on a dirty volume before you can defragment it. You can determine if a volume is dirty by using the fsutil dirty query command. For more information about the chkdsk command, see chkdsk. For more information about the fsutil dirty command, see Fsutil: dirty.

  • The time that Disk Defragmenter takes to defragment a volume depends on several factors, including the size of the volume, the number and size of files on the volume, the percentage of fragmentation in the volume, and available system resources.

  • You can defragment only local file system volumes, and you can run only one instance of Disk Defragmenter at a time.

  • To stop or temporarily interrupt defragmenting a volume, click Stop or Pause, respectively.

  • If you start Disk Defragmenter while performing a backup on the same volume, Disk Defragmenter stops.

  • Running the defrag command and Disk Defragmenter are mutually exclusive. If you are using Disk Defragmenter to defragment a volume and you run the defrag command at a command prompt, the defrag command fails. Conversely, if you run the defrag command, and open Disk Defragmenter, the defragmentation options in Disk Defragmenter are unavailable.

  • For more information about Disk Defragmenter and the defrag command, see Disk Defragmenter and Defrag.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.