在现有扩展磁盘分区上创建逻辑分区。 创建分区之后,焦点会自动转移到新分区上。
Important
只能在主启动记录 (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.
Syntax
create partition logical [size=<n>] [offset=<n>] [align=<n>] [noerr]
Parameters
Parameter | Description |
---|---|
size=<n> |
以兆字节 (MB) 为单位指定逻辑分区的大小,该大小必须小于扩展磁盘分区。 如果未给出分区大小,则分区会一直继续,直至扩展磁盘分区中没有可用空间为止。 |
offset=<n> |
以千字节 (KB) 为单位指定创建分区的偏移量。 偏移量被近似为较大的值,以占满所使用的全部柱面。 如果未给出偏移量,则将该分区放置在可以足够容纳它的第一个磁盘区域中。 The partition is at least as long in bytes as the number specified by size=<n> . 如果指定逻辑分区的大小,它必须小于扩展磁盘分区。 |
align=<n> |
将所有卷或分区范围与最近的对齐边界对齐。 通常与硬件 RAID 逻辑单元号 (LUN) 阵列一起使用以提高性能。
<n> 是从磁盘开始到最近对齐边界的千字节 (KB) 数。 |
noerr | 仅用于脚本。 出现错误时,DiskPart 继续处理命令,就像未发生错误一样。 如果没有此参数,则错误会导致 DiskPart 退出并显示错误代码。 |
Remarks
- If the size and offset parameters aren't specified, the logical partition is created in the largest disk extent available in the extended partition.
Examples
要创建大小为 1000 兆字节的逻辑分区,请在所选磁盘的扩展磁盘分区中键入:
create partition logical size=1000