create partition extendedcreate partition extended

适用于: Windows Server (半年通道) ,Windows Server 2019,Windows Server 2016,Windows Server 2012 R2,Windows Server 2012Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

在具有焦点的磁盘上创建扩展分区。Creates an extended partition on the disk with focus. 创建分区之后,焦点会自动转移到新分区上。After the partition has been created, the focus automatically shifts to the new partition.

重要

只能在主启动记录上使用此命令 (MBR) 磁盘。You can use this command only on Master Boot Record (MBR) disks. 必须使用 " 选择磁盘 " 命令选择基本 MBR 磁盘,并将焦点移动到该磁盘。You must use the select disk command to select a basic MBR disk and shift the focus to it.

创建逻辑驱动器之前,必须创建扩展分区。You must create an extended partition before you can create logical drives. 每个磁盘上只能创建一个扩展分区。Only one extended partition can be created per disk. 如果试图在其他扩展分区内创建扩展分区,则此命令会失败。This command fails if you attempt to create an extended partition within another extended partition.

语法Syntax

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

参数Parameters

参数Parameter 说明Description
大小 =<n>size=<n> 指定分区的大小,以兆字节 (MB) 为单位。Specifies the size of the partition in megabytes (MB). 如果没有给定大小,则分区会一直继续,直到扩展分区中没有可用空间为止。If no size is given, the partition continues until there is no more free space in the extended partition.
offset =<n>offset=<n> 指定在其中创建分区 (KB) 的偏移量(kb)。Specifies the offset in kilobytes (KB), at which the partition is created. 如果未给出偏移量,分区将从磁盘上可用空间的开始处开始,该空间足以容纳新的分区。If no offset is given, the partition will start at the beginning of the free space on the disk that is large enough to hold the new partition.
align =<n>align=<n> 将所有分区区区对齐到最接近的对齐边界。Aligns all partition extents to the closest alignment boundary. 通常与硬件 RAID 逻辑单元号一起使用 (LUN) 阵列以提高性能。Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. <n> 从磁盘开始到最接近的对齐边界 (KB) 的千字节数。<n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerrnoerr 仅用于脚本。For scripting only. 出现错误时,DiskPart 继续处理命令,就像未发生错误一样。When an error is encountered, DiskPart continues to process commands as if the error did not occur. 如果没有此参数,则错误会导致 DiskPart 退出并出现错误代码。Without this parameter, an error causes DiskPart to exit with an error code.

示例Examples

若要创建大小为 1000 mb 的扩展分区,请键入:To create an extended partition of 1000 megabytes in size, type:

create partition extended size=1000

其他参考Additional References