Create partition logical


Applies To: Windows Vista,Windows 7,Windows Server 2008 R2,Windows Server 2008

Creates a logical partition in an existing extended partition. You can only use this command on master boot record (MBR) disks.

For examples of how this command can be used, see Examples.

Syntax


Copy Code

create partition logical [size=<n>] [offset=<n>] [align=<n>] [noerr]

Parameters

Parameter

Description

size=<n>

Specifies the size of the logical partition in megabytes (MB), which must be smaller than the extended partition. If no size is given, the partition continues until there is no more free space in the extended partition.

offset=<n>

Specifies the offset in kilobytes (KB), at which the partition is created. The offset rounds up to completely fill whatever cylinder size is used. If no offset is given, then the partition is placed in the first disk extent that is large enough to hold it. The partition is at least as long in bytes as the number specified by size=<n>. If you specify a size for the logical partition, it must be smaller than the extended partition.

align=<n>

Aligns all volume or partition extents to the closest alignment boundary. Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. <n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.

noerr

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

Remarks

Examples

To create a logical partition of 1000 megabytes in size, in the extended partition of the selected disk, type:


Copy Code

create partition logical size=1000

Additional references

Command-Line Syntax Key

DiskPart