Partilhar via


Extend a basic volume

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

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).

Value Description

list volume

Displays a list of basic and dynamic volumes on all disks.

select volume

Selects the specified volume, where n is the volume number, and gives it focus. If no volume is specified, the select command lists the current volume with focus. You can specify the volume by number, drive letter, or mount point path. On a basic disk, selecting a volume also gives the corresponding partition focus.

extend

Extends the volume with focus into next contiguous unallocated space. For basic volumes, the unallocated space must be on the same disk as, and must follow (be of higher sector offset than) the partition with focus. A dynamic simple or spanned volume can be extended to any empty space on any dynamic disk. Using this command, you can extend an existing volume into newly created space.

If the partition was previously formatted with the NTFS file system, the file system is automatically extended to occupy the larger partition. No data loss occurs. If the partition was previously formatted with any file system format other than NTFS, the command fails with no change to the partition.

You cannot extend the current system or boot partitions.

size=n

The amount of space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk is extended to take up all of the next contiguous unallocated space.

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 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 DiskPart, see Related Topics.

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.

See Also

Concepts

Basic disks and volumes
Partition styles
Manage Basic Volumes
Working with MMC console files
DiskPart