在 Azure Stack HCI 中创建卷Create volumes in Azure Stack HCI

适用于:Azure Stack HCI,版本 20H2Applies to: Azure Stack HCI, version 20H2

本主题介绍如何使用 Windows Admin Center 和 Windows PowerShell 在 Azure Stack HCI 群集中创建卷、如何处理卷中的文件,以及如何在卷中启用重复数据删除和压缩。This topic describes how to create volumes on an Azure Stack HCI cluster by using Windows Admin Center and Windows PowerShell, how to work with files on the volumes, and how to enable data deduplication and compression on volumes. 若要了解如何为延伸群集创建卷并设置复制,请参阅创建延伸卷To learn how to create volumes and set up replication for stretched clusters, see Create stretched volumes.

创建三向镜像卷Create a three-way mirror volume

若要使用 Windows Admin Center 创建三向镜像卷:To create a three-way mirror volume using Windows Admin Center:

  1. 在 Windows 管理中心,连接到群集,然后从 "工具" 窗格中选择 ""。In Windows Admin Center, connect to a cluster, and then select Volumes from the Tools pane.
  2. 在“卷”页上选择“库存”选项卡,然后选择“创建卷”。 On the Volumes page, select the Inventory tab, and then select Create volume.
  3. 在“创建卷”窗格中输入卷的名称,并将“复原”保留为“三向镜像”。 In the Create volume pane, enter a name for the volume, and leave Resiliency as Three-way mirror.
  4. 在“HDD 上的大小”中指定卷的大小。In Size on HDD, specify the size of the volume. 例如 5 TB。For example, 5 TB (terabytes).
  5. 选择“创建”。Select Create.

创建卷可能需要几分钟时间,具体取决于大小。Depending on the size, creating the volume can take a few minutes. 卷创建好之后,右上方会显示通知。Notifications in the upper-right will let you know when the volume is created. 新卷将显示在“库存”列表中。The new volume appears in the Inventory list.

观看有关如何创建三向镜像卷的快速视频。Watch a quick video on how to create a three-way mirror volume.

创建镜像加速奇偶校验卷Create a mirror-accelerated parity volume

镜像加速奇偶校验 (MAP) 降低硬盘驱动器上卷的占用量。Mirror-accelerated parity (MAP) reduces the footprint of the volume on the HDD. 例如,三向镜像卷意味着每 10 TB 的卷大小需要 30 TB 的占用空间。For example, a three-way mirror volume would mean that for every 10 terabytes of size, you will need 30 terabytes as footprint. 为了减少占用空间开销,请创建使用镜像加速奇偶校验的卷。To reduce the overhead in footprint, create a volume with mirror-accelerated parity. 这样,即使只有 4 台服务器,也可以镜像最活跃的 20% 数据,然后使用空间效率更高的奇偶校验来存储剩余数据,从而将占用空间从 30 TB 减到 22 TB。This reduces the footprint from 30 terabytes to just 22 terabytes, even with only 4 servers, by mirroring the most active 20 percent of data, and using parity, which is more space efficient, to store the rest. 可以调整奇偶校验和镜像之比,在性能与容量方面做出最适合工作负荷的取舍。You can adjust this ratio of parity and mirror to make the performance versus capacity tradeoff that's right for your workload. 例如,使用 90% 的奇偶校验和 10% 的镜像所带来的性能效果不太理想,但可以进一步优化占用空间。For example, 90 percent parity and 10 percent mirror yields less performance but streamlines the footprint even further.

备注

镜像加速奇偶校验卷需要复原文件系统 (ReFS) 。Mirror-accelerated parity volumes require Resilient File System (ReFS).

若要在 Windows Admin Center 创建使用镜像加速奇偶校验的卷:To create a volume with mirror-accelerated parity in Windows Admin Center:

  1. 在 Windows 管理中心,连接到群集,然后从 "工具" 窗格中选择 ""。In Windows Admin Center, connect to a cluster, and then select Volumes from the Tools pane.
  2. 在“卷”页上选择“库存”选项卡,然后选择“创建卷”。 On the Volumes page, select the Inventory tab, and then select Create volume.
  3. 在“创建卷”窗格中输入卷的名称。In the Create volume pane, enter a name for the volume.
  4. 在“复原”中选择“镜像加速奇偶校验”。 In Resiliency, select Mirror-accelerated parity.
  5. 在“奇偶校验百分比”中选择奇偶校验的百分比。In Parity percentage, select the percentage of parity.
  6. 选择“创建”。Select Create.

观看有关如何创建镜像加速奇偶校验卷的快速视频。Watch a quick video on how to create a mirror-accelerated parity volume.

打开卷并添加文件Open volume and add files

若要在 Windows Admin Center 中打开卷并将文件添加到卷:To open a volume and add files to the volume in Windows Admin Center:

  1. 在 Windows 管理中心,连接到群集,然后从 "工具" 窗格中选择 ""。In Windows Admin Center, connect to a cluster, and then select Volumes from the Tools pane.

  2. 在“卷”页上选择“库存”选项卡。 On the Volumes page, select the Inventory tab.

  3. 在卷列表中,选择要打开的卷的名称。In the list of volumes, select the name of the volume that you want to open.

    在卷详细信息页上,可以看到卷的路径。On the volume details page, you can see the path to the volume.

  4. 在页面顶部选择“打开”。At the top of the page, select Open. 随即会在 Windows Admin Center 中启动“文件”工具。This launches the Files tool in Windows Admin Center.

  5. 导航到卷的路径。Navigate to the path of the volume. 可在此处浏览卷中的文件。Here you can browse the files in the volume.

  6. 选择“上传”,然后选择要上传的文件。Select Upload, and then select a file to upload.

  7. 使用浏览器中的“后退”按钮返回到 Windows Admin Center 中的“工具”窗格。 Use the browser Back button to go back to the Tools pane in Windows Admin Center.

观看有关如何打开卷和添加文件的快速视频。Watch a quick video on how to open a volume and add files.

启用重复数据删除和压缩Turn on deduplication and compression

重复数据删除和压缩是根据每个卷进行管理的。Deduplication and compression is managed per volume. 重复数据删除和压缩使用后处理模型,这意味着,在该功能运行之前,你看不到节省的空间。Deduplication and compression uses a post-processing model, which means that you won't see savings until it runs. 该功能在运行时会处理所有文件,甚至包括以前就已存在的文件。When it does, it'll work over all files, even those that were there from before.

若要了解详细信息,请参阅启用卷加密、重复数据删除和压缩To learn more, see Enable volume encryption, deduplication, and compression

使用 Windows PowerShell 创建卷Create volumes using Windows PowerShell

首先,从 Windows 的“开始”菜单启动 Windows PowerShell。First, launch Windows PowerShell from the Windows start menu. 建议使用 New-Volume cmdlet 来为 Azure Stack HCI 创建卷。We recommend using the New-Volume cmdlet to create volumes for Azure Stack HCI. 它可以提供最快且最直接的体验。It provides the fastest and most straightforward experience. 此单个 cmdlet 会自动创建虚拟磁盘,对其进行分区和格式化,使用匹配的名称创建卷,并将其添加到群集共享卷 - 这些全都在一个简单的步骤中完成。This single cmdlet automatically creates the virtual disk, partitions and formats it, creates the volume with matching name, and adds it to cluster shared volumes – all in one easy step.

New-Volume cmdlet 具有你将始终需要提供的四个参数:The New-Volume cmdlet has four parameters you'll always need to provide:

  • FriendlyName: 所需的任何字符串,例如 “Volume1”FriendlyName: Any string you want, for example "Volume1"

  • 文件系统: 建议为所有卷 CSVFS_ReFS (;镜像加速奇偶校验卷需要) 或 CSVFS_NTFSFileSystem: Either CSVFS_ReFS (recommended for all volumes; required for mirror-accelerated parity volumes) or CSVFS_NTFS

  • StoragePoolFriendlyName: 你的存储池名称,例如 “S2D on ClusterName”StoragePoolFriendlyName: The name of your storage pool, for example "S2D on ClusterName"

  • Size: 卷的大小,例如 “10 TB”Size: The size of the volume, for example "10TB"

    备注

    Windows 以及 PowerShell 使用二进制(基数为 2)数字进行计数,而系统经常使用十进制(基数为 10)数字来标记驱动器。Windows, including PowerShell, counts using binary (base-2) numbers, whereas drives are often labeled using decimal (base-10) numbers. 这可以说明定义为 1,000,000,000,000 字节的“1 TB”驱动器在 Windows 中显示为大约“909 GB”的原因。This explains why a "one terabyte" drive, defined as 1,000,000,000,000 bytes, appears in Windows as about "909 GB". 这是正常情况。This is expected. 使用 New-Volume 创建卷时,你应使用二进制(基数为 2)数字指定 Size 参数。When creating volumes using New-Volume, you should specify the Size parameter in binary (base-2) numbers. 例如,指定“909 GB”或“0.909495TB”将创建大约 1,000,000,000,000 字节的卷。For example, specifying "909GB" or "0.909495TB" will create a volume of approximately 1,000,000,000,000 bytes.

示例:具有 2 个或 3 个服务器Example: With 2 or 3 servers

为使操作更简单,如果你的部署仅涉及两个服务器,则存储空间直通将自动使用双向镜像进行复原。To make things easier, if your deployment has only two servers, Storage Spaces Direct will automatically use two-way mirroring for resiliency. 如果你的部署仅涉及三个服务器,则它将自动使用三向镜像。If your deployment has only three servers, it will automatically use three-way mirroring.

New-Volume -FriendlyName "Volume1" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -Size 1TB

示例:具有 4 个以上的服务器Example: With 4+ servers

如果你具有四个或更多个服务器,则可以使用可选的 ResiliencySettingName 参数来选择复原类型。If you have four or more servers, you can use the optional ResiliencySettingName parameter to choose your resiliency type.

  • ResiliencySettingName镜像奇偶校验ResiliencySettingName: Either Mirror or Parity.

在以下示例中,“Volume2” 使用三向镜像,“Volume3” 使用双奇偶校验(通常称为“擦除编码”)。In the following example, "Volume2" uses three-way mirroring and "Volume3" uses dual parity (often called "erasure coding").

New-Volume -FriendlyName "Volume2" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -Size 1TB -ResiliencySettingName Mirror
New-Volume -FriendlyName "Volume3" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -Size 1TB -ResiliencySettingName Parity

使用存储层Using storage tiers

在涉及三种驱动器类型的部署中,一个卷可以跨越 SSD 和 HDD 层以在每类驱动器上驻留一部分。In deployments with three types of drives, one volume can span the SSD and HDD tiers to reside partially on each. 同样,在涉及四个或更多个服务器的部署中,一个卷可以混合镜像和双奇偶校验以在每个服务器上驻留一部分。Likewise, in deployments with four or more servers, one volume can mix mirroring and dual parity to reside partially on each.

为帮助你创建此类卷,Azure Stack HCI 为性能) 提供了名为 MirrorOn * 媒体 名称 * 和 NestedMirrorOn * 媒体 名称 (* 的默认层级模板,并为容量) 提供 ParityOn * 媒体 名称 * 和 NestedParityOn * 媒体 名称 * (,其中 媒体 空间为 HDD 或 SSD。To help you create such volumes, Azure Stack HCI provides default tier templates called MirrorOn*MediaType* and NestedMirrorOn*MediaType* (for performance), and ParityOn*MediaType* and NestedParityOn*MediaType* (for capacity), where MediaType is HDD or SSD. 这些模板代表基于介质类型的存储层,并封装更快容量驱动器上的三向镜像的定义, (如果适用) ,以及在慢速容量驱动器上 (双重奇偶校验(如果适用)) 。The templates represent storage tiers based on media types and encapsulate definitions for three-way mirroring on the faster capacity drives (if applicable), and dual parity on the slower capacity drives (if applicable).

可以通过在群集中的任何服务器上运行 StorageTier cmdlet 来查看它们。You can see them by running the Get-StorageTier cmdlet on any server in the cluster.

Get-StorageTier | Select FriendlyName, ResiliencySettingName, PhysicalDiskRedundancy

例如,如果有一个只有 HDD 的双节点群集,则输出可能如下所示:For example, if you have a two-node cluster with only HDD, your output might look something like this:

FriendlyName      ResiliencySettingName PhysicalDiskRedundancy
------------      --------------------- ----------------------
NestedParityOnHDD Parity                                     1
Capacity          Mirror                                     1
NestedMirrorOnHDD Mirror                                     3
MirrorOnHDD       Mirror                                     1

若要创建分层卷,请使用 New-Volume cmdlet 的 StorageTierFriendlyNamesStorageTierSizes 参数引用这些层模板。To create tiered volumes, reference these tier templates using the StorageTierFriendlyNames and StorageTierSizes parameters of the New-Volume cmdlet. 例如,以下 cmdlet 会创建一个按 30:70 的比例混合三向镜像和双奇偶校验的卷。For example, the following cmdlet creates one volume which mixes three-way mirroring and dual parity in 30:70 proportions.

New-Volume -FriendlyName "Volume1" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -StorageTierFriendlyNames MirrorOnHDD, Capacity -StorageTierSizes 300GB, 700GB

根据需要重复操作以创建多个卷。Repeat as needed to create more than one volume.

嵌套复原卷Nested resiliency volumes

嵌套复原仅适用于两个服务器的群集;如果群集有三个或更多服务器,则无法使用嵌套复原功能。Nested resiliency only applies to two-server clusters; you can't use nested resiliency if your cluster has three or more servers. 嵌套复原允许两个服务器的群集同时承受多个硬件故障,而不会丢失存储可用性,从而允许用户、应用和虚拟机在不中断的情况下继续运行。Nested resiliency enables a two-server cluster to withstand multiple hardware failures at the same time without loss of storage availability, allowing users, apps, and virtual machines to continue to run without disruption. 若要了解详细信息,请参阅 计划卷:选择复原类型To learn more, see Plan volumes: choosing the resiliency type.

创建嵌套存储层Create nested storage tiers

创建 NestedMirror 层:To create a NestedMirror tier:

New-StorageTier -StoragePoolFriendlyName S2D* -FriendlyName NestedMirror -ResiliencySettingName Mirror -NumberOfDataCopies 4 -MediaType HDD -CimSession 2nodecluster

创建 NestedParity 层:To create a NestedParity tier:

New-StorageTier -StoragePoolFriendlyName S2D* -FriendlyName NestedParity -ResiliencySettingName Parity -NumberOfDataCopies 2 -PhysicalDiskRedundancy 1 -NumberOfGroups 1 -FaultDomainAwareness StorageScaleUnit -ColumnIsolation PhysicalDisk -MediaType HDD -CimSession 2nodecluster

创建嵌套卷Create nested volumes

若要创建 NestedMirror 卷:To create a NestedMirror volume:

New-Volume -StoragePoolFriendlyName S2D* -FriendlyName MyMirrorNestedVolume -StorageTierFriendlyNames NestedMirror -StorageTierSizes 500GB -CimSession 2nodecluster

若要创建 NestedParity 卷:To create a NestedParity volume:

New-Volume -StoragePoolFriendlyName S2D* -FriendlyName MyParityNestedVolume -StorageTierFriendlyNames NestedMirror,NestedParity -StorageTierSizes 200GB, 1TB -CimSession 2nodecluster

存储层摘要表Storage tier summary table

下表汇总了可在 Azure Stack HCI 中创建/的存储层。The following tables summarize the storage tiers that are/can be created in Azure Stack HCI.

NumberOfNodes:2NumberOfNodes: 2

FriendlyNameFriendlyName MediaTypeMediaType ResiliencySettingNameResiliencySettingName NumberOfDataCopiesNumberOfDataCopies PhysicalDiskRedundancyPhysicalDiskRedundancy NumberOfGroupsNumberOfGroups FaultDomainAwarenessFaultDomainAwareness ColumnIsolationColumnIsolation 备注Note
MirrorOnHDDMirrorOnHDD HDDHDD 镜像Mirror 22 11 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
MirrorOnSSDMirrorOnSSD SSDSSD 镜像Mirror 22 11 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
MirrorOnSCMMirrorOnSCM SCMSCM 镜像Mirror 22 11 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
NestedMirrorOnHDDNestedMirrorOnHDD HDDHDD 镜像Mirror 44 33 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk manualmanual
NestedMirrorOnSSDNestedMirrorOnSSD SSDSSD 镜像Mirror 44 33 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk manualmanual
NestedMirrorOnSCMNestedMirrorOnSCM SCMSCM 镜像Mirror 44 33 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk manualmanual
NestedParityOnHDDNestedParityOnHDD HDDHDD ParityParity 22 11 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk manualmanual
NestedParityOnSSDNestedParityOnSSD SSDSSD ParityParity 22 11 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk manualmanual
NestedParityOnSCMNestedParityOnSCM SCMSCM ParityParity 22 11 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk manualmanual

NumberOfNodes:3NumberOfNodes: 3

FriendlyNameFriendlyName MediaTypeMediaType ResiliencySettingNameResiliencySettingName NumberOfDataCopiesNumberOfDataCopies PhysicalDiskRedundancyPhysicalDiskRedundancy NumberOfGroupsNumberOfGroups FaultDomainAwarenessFaultDomainAwareness ColumnIsolationColumnIsolation 备注Note
MirrorOnHDDMirrorOnHDD HDDHDD 镜像Mirror 33 22 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
MirrorOnSSDMirrorOnSSD SSDSSD 镜像Mirror 33 22 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
MirrorOnSCMMirrorOnSCM SCMSCM 镜像Mirror 33 22 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created

NumberOfNodes: 4 +NumberOfNodes: 4+

FriendlyNameFriendlyName MediaTypeMediaType ResiliencySettingNameResiliencySettingName NumberOfDataCopiesNumberOfDataCopies PhysicalDiskRedundancyPhysicalDiskRedundancy NumberOfGroupsNumberOfGroups FaultDomainAwarenessFaultDomainAwareness ColumnIsolationColumnIsolation 备注Note
MirrorOnHDDMirrorOnHDD HDDHDD 镜像Mirror 33 22 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
MirrorOnSSDMirrorOnSSD SSDSSD 镜像Mirror 33 22 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
MirrorOnSCMMirrorOnSCM SCMSCM 镜像Mirror 33 22 11 StorageScaleUnitStorageScaleUnit 物理磁盘PhysicalDisk 自动创建auto created
ParityOnHDDParityOnHDD HDDHDD ParityParity 11 22 自动Auto StorageScaleUnitStorageScaleUnit StorageScaleUnitStorageScaleUnit 自动创建auto created
ParityOnSSDParityOnSSD SSDSSD ParityParity 11 22 自动Auto StorageScaleUnitStorageScaleUnit StorageScaleUnitStorageScaleUnit 自动创建auto created
ParityOnSCMParityOnSCM SCMSCM ParityParity 11 22 自动Auto StorageScaleUnitStorageScaleUnit StorageScaleUnitStorageScaleUnit 自动创建auto created

后续步骤Next steps

有关相关主题和其他存储管理任务,另请参阅:For related topics and other storage management tasks, see also: