create volume mirrorcreate volume mirror

适用于: 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 a volume mirror by using the two specified dynamic disks. 创建卷后,焦点会自动转移到新卷。After the volume has been created, the focus automatically shifts to the new volume.


create volume mirror [size=<n>] disk=<n>,<n>[,<n>,...] [align=<n>] [noerr]


参数Parameter 说明Description
大小 =<n>size=<n> 指定卷在每个磁盘上占用的磁盘空间量(以兆字节 (MB) 为单位)。Specifies the amount of disk space, in megabytes (MB), that the volume will occupy on each disk. 如果没有指定大小,新建卷将占据最小磁盘上的剩余可用空间以及其他磁盘上相同大小的空间。If no size is given, the new volume takes up the remaining free space on the smallest disk and an equal amount of space on each subsequent disk.
disk = <n><n> [ ,<n>,... ]disk=<n>,<n>[,<n>,...] 指定在其上创建镜像卷的动态磁盘。Specifies the dynamic disks on which the mirror volume is created. 需要两个动态磁盘来创建镜像卷。You need two dynamic disks to create a mirror volume. 在每个磁盘上分配的空间量等于使用 size 参数指定的大小。An amount of space that is equal to the size specified with the size parameter is allocated on each disk.
align =<n>align=<n> 将所有卷区与最接近的对齐边界对齐。Aligns all volume extents to the closest alignment boundary. 此参数通常与硬件 RAID 逻辑单元号( (LUN) 阵列一起使用,以提高性能。This parameter is 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.


若要创建大小为 1000 mb 的镜像卷,请在磁盘1和2上键入:To create a mirrored volume of 1000 megabytes in size, on disks 1 and 2, type:

create volume mirror size=1000 disk=1,2

其他参考Additional References