次の方法で共有


Create a partition or logical drive

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

To create a partition or logical drive

  • Using the Windows interface

  • Using a command line

Using the Windows interface

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

Using a command line

  1. Open Command Prompt.

  2. Type:

    diskpart

  3. At the DISKPART prompt, type:

    list disk

    Make note of the disk number of the disk on which you want to create a primary or extended partition.

  4. At the DISKPART prompt, type:

    select diskn

    Select the disk n where you want to create the primary or extended partition.

  5. At the DISKPART prompt, type one of the following:

    create partition primary [**size=**n] [**offset=**n] [**ID=**byte | GUID] [noerr]

    or

    create partition extended [**size=**n] [**offset=**n] [noerr]

    or

    create partition logical [**size=**n] [**offset=**n] [noerr]

  6. At the DISKPART prompt, type:

    assign letter=D

Value Description

list disk

Displays a list of disks and information about them, such as their size, amount of available free space, whether the disk is a basic or dynamic disk, and whether the disk uses the master boot record (MBR) or GUID partition table (GPT) partition style. The disk marked with an asterisk (*) has focus.

select disk

Selects the specified disk, where n is the disk number, and gives it focus.

create partition primary

Creates a primary partition on the current basic disk. After you create the partition, the focus automatically shifts to the new partition. The partition does not receive a drive letter; you must use the assign command to assign a drive letter to the partition.

create partition extended

Creates an extended partition on the current drive. After the partition has been created, the focus automatically shifts to the new partition. Only one extended partition can be created per disk. This command fails if you attempt to create an extended partition within another extended partition. You must create an extended partition before you can create logical drives.

create partition logical

Creates a logical drive in the extended partition. After the partition has been created, the focus automatically shifts to the new logical drive.

size=n

The size of the partition in megabytes (MB). If no size is given, the partition continues until there is no more unallocated space in the current region. The size is cylinder snapped; the size is rounded to the closest cylinder boundary. For example, if you specify a size of 500 MB, the partition would be rounded up to 504 MB.

offset=n

The byte offset at which to create the partition. If no offset is given, the partition will start at the beginning of the first free space on the disk. For master boot record (MBR) disks, the offset is cylinder snapped; the offset is rounded to the closest cylinder boundary. For example, if you specify an offset that is 27 MB and the cylinder size is 8 MB, the offset is rounded to the 24 MB boundary.

ID=byte | GUID

Intended for Original Equipment Manufacturer (OEM) use only.

Caution

  • Creating partitions with this parameter might cause your computer to crash or be unable to start up. Unless you are an OEM or an IT professional experienced with GPT disks, do not create partitions on GPT disks using the ID=byte | GUID parameter. Instead, always use the create partition efi command to create EFI System partitions, the create partition msr command to create Microsoft Reserved partitions, and the create partition primary command (without the ID=byte | GUID parameter) to create primary partitions on GPT disks.

For MBR disks, you can specify a partition type byte for the partition. If no partition type byte is specified on an MBR disk, the create partition primary command creates a partition of type 0x6. Any partition type byte can be specified with the ID=byte | GUID parameter. DiskPart does not check the partition type byte for validity, nor does it perform any other checking of the ID parameter.

For GPT disks you can specify a partition type GUID for the partition you want to create:

  • EFI System partition: c12a7328-f81f-11d2-ba4b-00a0c93ec93b

  • Microsoft reserved partition: e3c9e316-0b5c-4db8-817d-f92df00215ae

  • Basic data partition: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

  • LDM Metadata partition on a dynamic disk: 5808c8aa-7e8f-42e0-85d2-e1e90434cfb3

  • LDM Data partition on a dynamic disk: af9b60a0-1431-4f62-bc68-3311714a69ad

If no partition type GUID is specified, the create partition primary command creates a basic data partition. Any partition type can be specified with the ID=byte | GUID parameter. DiskPart does not check the partition GUID for validity, nor does it perform any other checking of the ID parameter.

noerr

For scripting only. When an error is encountered, specifies that DiskPart continues to process commands as if the error did not occur. Without the noerr parameter, an error causes DiskPart to exit with an error code.

assign letter=D

Assigns a drive letter, D, to the volume with focus. If no drive letter or mount point is specified, the next available drive letter is assigned. If the drive letter or mount point is already in use, an error is generated.

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.

  • 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 Millennium 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, but no extended partitions or logical drives.

  • You cannot create partitions on removable media using DiskPart.

  • 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

Change a basic disk into a dynamic disk
Create a mounted drive
Format a basic volume
Assign, change, or remove a drive letter
Delete a partition or logical drive
Create a partition or logical drive
Mark a partition as active (32-bit only)
Partition styles
Working with MMC console files
DiskPart