規劃 Azure Stack HCI 中的磁片區Plan volumes in Azure Stack HCI

適用于: Azure Stack HCI、版本 20H2;Windows Server 2019Applies to: Azure Stack HCI, version 20H2; Windows Server 2019

本主題提供如何在 Azure Stack HCI 中規劃磁片區的指引,以符合工作負載的效能和容量需求,包括選擇其檔案系統、復原類型和大小。This topic provides guidance for how to plan volumes in Azure Stack HCI to meet the performance and capacity needs of your workloads, including choosing their filesystem, resiliency type, and size.

檢閱:什麼是磁碟區Review: What are volumes

磁碟區是您放置工作負載所需檔案的位置,例如 Hyper-V 虛擬機器的 VHD 或 VHDX 檔案。Volumes are where you put the files your workloads need, such as VHD or VHDX files for Hyper-V virtual machines. 磁片區會結合存放集區中的磁片磁碟機,以引入 儲存空間直接存取的容錯、擴充性和效能優點,以及 Azure Stack HCI 背後軟體定義的儲存技術。Volumes combine the drives in the storage pool to introduce the fault tolerance, scalability, and performance benefits of Storage Spaces Direct, the software-defined storage technology behind Azure Stack HCI.


在儲存空間直接存取的整份文件中,我們會使用「磁碟區」一詞來連帶稱呼磁碟區和磁碟區底下的虛擬磁碟,包括叢集共用磁碟區 (CSV) 和 ReFS 等其他內建 Windows 功能所提供的功能。Throughout documentation for Storage Spaces Direct, we use term "volume" to refer jointly to the volume and the virtual disk under it, including functionality provided by other built-in Windows features such as Cluster Shared Volumes (CSV) and ReFS. 即使您不了解這些實作層級的差異,也可以順利規劃及部署儲存空間直接存取。Understanding these implementation-level distinctions is not necessary to plan and deploy Storage Spaces Direct successfully.


叢集中的所有伺服器可以同時存取所有磁碟區。All volumes are accessible by all servers in the cluster at the same time. 一旦建立之後,這些磁碟區就會顯示在所有伺服器上的 C:\ClusterStorage\Once created, they show up at C:\ClusterStorage\ on all servers.

螢幕擷取畫面會顯示名為 ClusterStorage 的 [檔案瀏覽器] 視窗,其中包含名為 Volume1、Volume2 和 Volume3 的磁片區。

選擇要建立的磁碟區數目Choosing how many volumes to create

建議的磁碟區數目為叢集中伺服器數目的倍數。We recommend making the number of volumes a multiple of the number of servers in your cluster. 例如,如果您有 4 部伺服器,則比起建立 3 個或 5 個磁碟區,建立 4 個磁碟區的效能會更一致。For example, if you have 4 servers, you will experience more consistent performance with 4 total volumes than with 3 or 5. 這可讓叢集在伺服器之間平均分配「擁有權」 (一部伺服器處理一個磁碟區的中繼資料協調流程)。This allows the cluster to distribute volume "ownership" (one server handles metadata orchestration for each volume) evenly among servers.

建議您將每個叢集的磁片區總數限制為64個磁片區。We recommend limiting the total number of volumes to 64 volumes per cluster.

選擇檔案系統Choosing the filesystem

我們建議您將新的 復原檔案系統 (ReFS) 用於儲存空間直接存取。We recommend using the new Resilient File System (ReFS) for Storage Spaces Direct. ReFS 是專為虛擬化打造的頂級檔案系統,其優點包括大幅的效能加速和內建的資料損毀保護。ReFS is the premier filesystem purpose-built for virtualization and offers many advantages, including dramatic performance accelerations and built-in protection against data corruption. 支援幾乎所有主要 NTFS 功能,包括 Windows Server 1709 版和更新版本中的重復資料刪除。It supports nearly all key NTFS features, including Data Deduplication in Windows Server version 1709 and later. 如需詳細資訊,請參閱 ReFS 功能比較表See the ReFS feature comparison table for details.

如果您的工作負載需要 ReFS 尚不支援的功能,您可以改用 NTFS。If your workload requires a feature that ReFS doesn't support yet, you can use NTFS instead.


具有不同檔案系統的磁碟區可以並存在相同叢集中。Volumes with different file systems can coexist in the same cluster.

選擇復原類型Choosing the resiliency type

儲存空間直接存取中的磁碟區可提供復原能力來防範硬體問題 (例如磁碟機或伺服器故障),以及在整個伺服器維護期間 (例如軟體更新) 支援持續可用性。Volumes in Storage Spaces Direct provide resiliency to protect against hardware problems, such as drive or server failures, and to enable continuous availability throughout server maintenance, such as software updates.


您可以選擇的復原類型與您擁有的磁碟機類型無關。Which resiliency types you can choose is independent of which types of drives you have.

兩部伺服器With two servers

使用叢集中的兩部伺服器,您可以使用雙向鏡像,也可以使用嵌套的復原功能。With two servers in the cluster, you can use two-way mirroring or you can use nested resiliency.

雙向鏡像會為所有資料保留兩份複本,每部伺服器的磁片磁碟機上都有一個複本。Two-way mirroring keeps two copies of all data, one copy on the drives in each server. 其儲存效率為 50%;若要寫入 1 TB 的資料,存放集區中至少需要 2 TB 的實體儲存體容量。Its storage efficiency is 50 percent; to write 1 TB of data, you need at least 2 TB of physical storage capacity in the storage pool. 雙向鏡像可以一次安全地容忍一個硬體故障 (一部伺服器或磁片磁碟機) 。Two-way mirroring can safely tolerate one hardware failure at a time (one server or drive).

圖表顯示標示為數據的磁片區和依圓形箭號連接的複製,而且這兩個磁片區都與伺服器中的磁片 bank 相關聯。

嵌套復原功能可在具有雙向鏡像的伺服器之間提供資料恢復功能,然後在具有雙向鏡像或鏡像加速同位的伺服器內新增復原功能。Nested resiliency provides data resiliency between servers with two-way mirroring, then adds resiliency within a server with two-way mirroring or mirror-accelerated parity. 即使一部伺服器正在重新開機或無法使用,也會提供資料恢復功能。Nesting provides data resilience even when one server is restarting or unavailable. 其儲存效率是具有嵌套雙向鏡像的25%,以及嵌套鏡像加速同位的大約35-40%。Its storage efficiency is 25 percent with nested two-way mirroring and around 35-40 percent for nested mirror-accelerated parity. 嵌套復原可以安全地容忍兩個硬體故障 (兩個磁片磁碟機,或是伺服器和其餘伺服器) 的磁片磁碟機。Nested resiliency can safely tolerate two hardware failures at a time (two drives, or a server and a drive on the remaining server). 由於這項新增的資料恢復功能,建議您在兩部伺服器叢集的生產環境部署上使用嵌套復原。Because of this added data resilience, we recommend using nested resiliency on production deployments of two-server clusters. 如需詳細資訊,請參閱 嵌套復原For more info, see Nested resiliency.


具有三部伺服器With three servers

有三種伺服器,您應該使用三向鏡像,以取得更好的容錯和效能。With three servers, you should use three-way mirroring for better fault tolerance and performance. 三向鏡像保留所有資料的三份複本,每個伺服器的磁碟機上各有一份複本。Three-way mirroring keeps three copies of all data, one copy on the drives in each server. 其儲存效率為 33.3%-若要寫入 1 TB 的資料,存放集區中至少需要 3 TB 的實體儲存體容量。Its storage efficiency is 33.3 percent – to write 1 TB of data, you need at least 3 TB of physical storage capacity in the storage pool. 三向鏡像可以安全地容忍 至少兩個硬體問題 (磁片磁碟機或伺服器) 一次Three-way mirroring can safely tolerate at least two hardware problems (drive or server) at a time. 如果有2個節點無法使用,儲存集區將會遺失仲裁,因為無法使用2/3 的磁片,且虛擬磁片將會無法存取。If 2 nodes become unavailable the storage pool will lose quorum, since 2/3 of the disks are not available, and the virtual disks will be unaccessible. 不過,節點可能會關閉,而另一個節點上的一或多個磁片可能會失敗,且虛擬磁片將維持在線上。However, a node can be down and one or more disks on another node can fail and the virtual disks will remain online. 例如,如果您在一個磁碟機或伺服器突然故障時重新啟動另一部伺服器,所有資料都將保有安全性,且持續可供存取。For example, if you're rebooting one server when suddenly another drive or server fails, all data remains safe and continuously accessible.


具有四個以上伺服器With four or more servers

有四部以上的伺服器,您可以選擇每個磁片區是否使用三向鏡像、雙重同位 (通常稱為「抹除編碼」 ) ,或混搭兩者與鏡像加速同位。With four or more servers, you can choose for each volume whether to use three-way mirroring, dual parity (often called "erasure coding"), or mix the two with mirror-accelerated parity.

雙同位提供與三向鏡像相同的容錯功能,但具有更佳的儲存效率。Dual parity provides the same fault tolerance as three-way mirroring but with better storage efficiency. 有四部伺服器,其儲存效率為 50.0%;若要儲存 2 TB 的資料,您需要在存放集區中有 4 TB 的實體儲存體容量。With four servers, its storage efficiency is 50.0 percent; to store 2 TB of data, you need 4 TB of physical storage capacity in the storage pool. 這66.7 可增加7部伺服器的儲存效率,並持續提升至80.0% 的儲存效率。This increases to 66.7 percent storage efficiency with seven servers, and continues up to 80.0 percent storage efficiency. 缺點是同位編碼大量耗用運算資源,這可能會限制其效能。The tradeoff is that parity encoding is more compute-intensive, which can limit its performance.


要使用的復原類型,端視您的工作負載需求。Which resiliency type to use depends on the needs of your workload. 以下資料表摘要說明哪些工作負載適合每種復原類型,以及每種復原類型的效能和儲存效率。Here's a table that summarizes which workloads are a good fit for each resiliency type, as well as the performance and storage efficiency of each resiliency type.

復原類型Resiliency type 容量效率Capacity efficiency 速度Speed 工作負載Workloads
鏡像Mirror 顯示33% 的儲存效率
三向鏡像:33%Three-way mirror: 33%
雙向鏡像:50%Two-way-mirror: 50%
顯示100% 的效能
效能最高Highest performance
虛擬化工作負載Virtualized workloads
其他高效能工作負載Other high performance workloads
鏡像加速的同位Mirror-accelerated parity 顯示大約50% 的儲存效率
取決於鏡像和同位的比例Depends on proportion of mirror and parity
顯示大約20% 的效能
比鏡像慢很多,但速度最多兩倍雙同位Much slower than mirror, but up to twice as fast as dual-parity
最適用于大型順序寫入和讀取Best for large sequential writes and reads
封存與備份Archival and backup
虛擬化桌面基礎結構Virtualized desktop infrastructure
雙同位Dual-parity 顯示大約80% 的儲存效率
4部伺服器:50%4 servers: 50%
16部伺服器:最高80%16 servers: up to 80%
顯示大約10% 的效能
寫入時 & CPU 使用率的最高 i/o 延遲Highest I/O latency & CPU usage on writes
最適用于大型順序寫入和讀取Best for large sequential writes and reads
封存與備份Archival and backup
虛擬化桌面基礎結構Virtualized desktop infrastructure

當效能是最重要時When performance matters most

有嚴格延遲需求,或需要很多混合隨機 IOPS (例如 SQL Server 資料庫或重視效能的 Hyper-V 虛擬機器) 的工作負載,應該執行於使用鏡像的磁碟區上,以達到最佳效能。Workloads that have strict latency requirements or that need lots of mixed random IOPS, such as SQL Server databases or performance-sensitive Hyper-V virtual machines, should run on volumes that use mirroring to maximize performance.


鏡像比任何其他復原類型都還要快速。Mirroring is faster than any other resiliency type. 我們幾乎所有的效能範例都會使用鏡像。We use mirroring for nearly all our performance examples.

當容量最關緊要時When capacity matters most

不常寫入的工作負載 (例如資料倉儲或「冷」的儲存空間),應該執行於使用雙同位的磁碟區上,將儲存效率最大化。Workloads that write infrequently, such as data warehouses or "cold" storage, should run on volumes that use dual parity to maximize storage efficiency. 某些其他工作負載,例如傳統檔案伺服器、虛擬桌面基礎結構 (VDI),或不會建立許多快速飄移隨機 IO 流量和/或不需要最佳效能的其他項目,在您的審慎考慮後,也可以使用雙同位。Certain other workloads, such as traditional file servers, virtual desktop infrastructure (VDI), or others that don't create lots of fast-drifting random IO traffic and/or don't require the best performance may also use dual parity, at your discretion. 相較於鏡像,同位不可避免地增加 CPU 使用率和 IO 延遲,尤其是在寫入時。Parity inevitably increases CPU utilization and IO latency, particularly on writes, compared to mirroring.

當大量寫入資料時When data is written in bulk

以大量的連續傳遞(例如封存或備份目標)撰寫的工作負載有另一個選項:一個磁片區可以混合使用鏡像和雙同位。Workloads that write in large, sequential passes, such as archival or backup targets, have another option: one volume can mix mirroring and dual parity. 寫入首先登陸鏡像部分,稍後逐漸移動至同位部分。Writes land first in the mirrored portion and are gradually moved into the parity portion later. 當大型寫入到達時,這會加速擷取並減少資源使用,藉由允許大量耗用運算資源的同位編碼以較長的時間發生。This accelerates ingestion and reduces resource utilization when large writes arrive by allowing the compute-intensive parity encoding to happen over a longer time. 當調整鏡像部分和同位部分大小,請考慮將一次發生的寫入數量(例如一次每日備份)應該會舒適地放在鏡像部分中。When sizing the portions, consider that the quantity of writes that happen at once (such as one daily backup) should comfortably fit in the mirror portion. 例如,如果您每日一次擷取 100 GB,考慮使用 150 GB 到 200 GB 的鏡像,其他部分則使用雙同位。For example, if you ingest 100 GB once daily, consider using mirroring for 150 GB to 200 GB, and dual parity for the rest.

結果儲存效率視您選擇的比例而定。The resulting storage efficiency depends on the proportions you choose. 如需範例,請參閱此示範See this demo for some examples.


如果您觀察到透過資料內嵌大幅減少寫入效能中途,可能表示鏡像部分不夠大,或是鏡像加速同位不適合您的使用案例。If you observe an abrupt decrease in write performance partway through data ingestion, it may indicate that the mirror portion is not large enough or that mirror-accelerated parity isn't well suited for your use case. 例如,如果寫入效能從 400 MB/秒減少為 40 MB/s,請考慮展開鏡像部分或切換至三向鏡像。As an example, if write performance decreases from 400 MB/s to 40 MB/s, consider expanding the mirror portion or switching to three-way mirror.

關於 NVMe、SSD 和 HDD 部署About deployments with NVMe, SSD, and HDD

在具有兩種磁碟機類型的部署中,較快的磁碟機提供快取,而較慢的磁碟機提供容量。In deployments with two types of drives, the faster drives provide caching while the slower drives provide capacity. 這是自動發生 – 如需詳細資訊,請參閱了解儲存空間直接存取中的快取This happens automatically – for more information, see Understanding the cache in Storage Spaces Direct. 在這類部署,所有磁碟區最終放在同一個類型的磁碟機 – 容量磁碟機上。In such deployments, all volumes ultimately reside on the same type of drives – the capacity drives.

在具有全部三種磁碟機類型的部署中,只有最快的磁碟機 (NVMe) 提供快取,並讓其他兩種類型的磁碟機(SSD 及 HDD)提供容量。In deployments with all three types of drives, only the fastest drives (NVMe) provide caching, leaving two types of drives (SSD and HDD) to provide capacity. 針對每個磁碟區,您可以選擇將它完全放在 SSD 層上、完全放在 HDD 層上,或是它橫跨這兩個。For each volume, you can choose whether it resides entirely on the SSD tier, entirely on the HDD tier, or whether it spans the two.


我們建議使用 SSD 層,將最重視效能的工作負載放在全快閃裝置上。We recommend using the SSD tier to place your most performance-sensitive workloads on all-flash.

選擇磁碟區大小Choosing the size of volumes

建議您將每個磁片區的大小限制為 Windows Server 2019 中的 64 TB。We recommend limiting the size of each volume to 64 TB in Windows Server 2019.


如果您使用依賴磁片區陰影複製服務的備份解決方案 (VSS) 和 Volsnap 軟體提供者(檔案伺服器工作負載很常見),將磁片區大小限制為 10 TB 將可改善效能和可靠性。If you use a backup solution that relies on the Volume Shadow Copy service (VSS) and the Volsnap software provider—as is common with file server workloads—limiting the volume size to 10 TB will improve performance and reliability. 使用較新 Hyper-V RCT API 和/或 ReFS 區塊複製和/或原生 SQL 備份 API 的備份解決方案,磁碟區大小達到 32 TB 以上時也可以順利執行。Backup solutions that use the newer Hyper-V RCT API and/or ReFS block cloning and/or the native SQL backup APIs perform well up to 32 TB and beyond.


磁碟區大小是指其可用容量,可以儲存的資料量。The size of a volume refers to its usable capacity, the amount of data it can store. 這是由 New-Volume cmdlet 的 -Size 參數提供,然後當您執行 Get-Volume cmdlet 時顯示在 Size 屬性中。This is provided by the -Size parameter of the New-Volume cmdlet and then appears in the Size property when you run the Get-Volume cmdlet.

大小不同於磁碟區使用量,它占儲存集區的實體儲存總容量。Size is distinct from volume's footprint, the total physical storage capacity it occupies on the storage pool. 使用量視其復原類型而定。The footprint depends on its resiliency type. 例如,使用三向鏡像的磁碟區有其大小三倍大的使用量。For example, volumes that use three-way mirroring have a footprint three times their size.

磁碟區使用量需要放在儲存集區中。The footprints of your volumes need to fit in the storage pool.

圖表顯示 2 TB 的磁片區,相較于儲存集區中 6 TB 的使用量,有三個指定的乘數。

保留容量Reserve capacity

在儲存集區中保留某些容量,提供磁碟空間在磁碟機故障之後「就地」修復,而改進資料安全性與效能。Leaving some capacity in the storage pool unallocated gives volumes space to repair "in-place" after drives fail, improving data safety and performance. 如果容量充足,立即、就地、平行修復甚至可以在故障的磁碟機更換之前將磁碟區還原為完整復原。If there is sufficient capacity, an immediate, in-place, parallel repair can restore volumes to full resiliency even before the failed drives are replaced. 此動作會自動執行。This happens automatically.

我們建議每個伺服器保留相當於一個容量磁碟機的容量,最多 4 個磁碟機。We recommend reserving the equivalent of one capacity drive per server, up to 4 drives. 在您的審慎考慮後,您可以保留更多,但這個最低建議保證任何磁碟機故障之後的立即、就地、平行修復成功。You may reserve more at your discretion, but this minimum recommendation guarantees an immediate, in-place, parallel repair can succeed after the failure of any drive.


例如,如果您有 2 部伺服器並使用數個 1 TB 容量磁碟機,將集區的 2 x 1 = 2 TB 設定為保留。For example, if you have 2 servers and you are using 1 TB capacity drives, set aside 2 x 1 = 2 TB of the pool as reserve. 如果您有 3 部伺服器和數個 1 TB 容量磁碟機,設定 3 x 1 = 3 TB 為保留。If you have 3 servers and 1 TB capacity drives, set aside 3 x 1 = 3 TB as reserve. 如果您有 4 部以上伺服器和數個 1 TB 容量磁碟機,設定 4 x 1 = 4 TB 為保留。If you have 4 or more servers and 1 TB capacity drives, set aside 4 x 1 = 4 TB as reserve.


在具有全部三種磁碟機類型 (NVMe + SSD + HDD) 的叢集中,我們建議每個伺服器保留相當於一個 SSD 加上一個 HDD 的容量,每個伺服器最多 4 個磁碟機。In clusters with drives of all three types (NVMe + SSD + HDD), we recommend reserving the equivalent of one SSD plus one HDD per server, up to 4 drives of each.

範例:容量計劃Example: Capacity planning

請考慮一個有四部伺服器的叢集。Consider one four-server cluster. 每個伺服器擁有一些快取磁碟機,加上 16 個 2 TB 磁碟機的容量。Each server has some cache drives plus sixteen 2 TB drives for capacity.

4 servers x 16 drives each x 2 TB each = 128 TB

從這個儲存集區的 128 TB 中,我們將保留四個磁碟機 (或 8 TB),以便在磁碟機故障之後進行就地修復,不需要急著更換磁碟。From this 128 TB in the storage pool, we set aside four drives, or 8 TB, so that in-place repairs can happen without any rush to replace drives after they fail. 集區中剩下 120 TB 實體儲存容量,我們可用來建立磁碟區。This leaves 120 TB of physical storage capacity in the pool with which we can create volumes.

128 TB – (4 x 2 TB) = 120 TB

假設我們的部署需要裝載某些高度活躍 Hyper-V 虛擬電腦,但是我們也有很多冷儲存空間儲存寒冷 – 要保留的舊檔案和備份。Suppose we need our deployment to host some highly active Hyper-V virtual machines, but we also have lots of cold storage – old files and backups we need to retain. 因為我們有四部伺服器,我們建立四個磁碟區。Because we have four servers, let's create four volumes.

我們將在虛擬機器放在前兩個磁碟區,Volume1Volume2Let's put the virtual machines on the first two volumes, Volume1 and Volume2. 我們選擇 ReFS 做為檔案系統(適用於更快速的建立和檢查點)和三向鏡像復原類型以達到最佳效能。We choose ReFS as the filesystem (for the faster creation and checkpoints) and three-way mirroring for resiliency to maximize performance. 我們將冷儲存空間放在其他兩個磁碟區 Volume 3Volume 4Let's put the cold storage on the other two volumes, Volume 3 and Volume 4. 我們選擇 NTFS 做為檔案系統 (適用於重複資料刪除) 和雙同位復原類型,將容量最大化。We choose NTFS as the filesystem (for Data Deduplication) and dual parity for resiliency to maximize capacity.

我們不需要讓所有磁碟區大小相同,但為了簡化,例如我們可以讓它們全部都是 12 TB。We aren't required to make all volumes the same size, but for simplicity, let's – for example, we can make them all 12 TB.

Volume1Volume2 每個都佔用 12 tb x 33.3% 效率 = 36 tb 的實體儲存體容量。Volume1 and Volume2 will each occupy 12 TB x 33.3 percent efficiency = 36 TB of physical storage capacity.

Volume3Volume4 每個都佔用 12 tb x 50.0% 效率 = 24 tb 的實體儲存體容量。Volume3 and Volume4 will each occupy 12 TB x 50.0 percent efficiency = 24 TB of physical storage capacity.

36 TB + 36 TB + 24 TB + 24 TB = 120 TB

四個磁碟區上可完全容納在我們集區中的可用實體儲存空間容量。The four volumes fit exactly on the physical storage capacity available in our pool. 完美!Perfect!

圖表顯示 2 12 TB 的三向鏡像磁片區,每個磁片區都與 36 TB 的儲存空間相關聯,以及 2 12 TB 的雙重同位磁片區,每個磁片區都與 24 TB 相關聯,全都佔用 120 TB 的儲存


您不需要立即建立所有磁碟區。You don't need to create all the volumes right away. 您隨時可以延伸磁碟區,或稍後建立新的磁碟區。You can always extend volumes or create new volumes later.

為了簡化,這整個範例使用十進位 (以 10 為底數) 單位,表示 1 TB = 1,000,000,000,000 位元組。For simplicity, this example uses decimal (base-10) units throughout, meaning 1 TB = 1,000,000,000,000 bytes. 不過,Windows 中的儲存數量以二進位 (以 2 為底數) 單位表示。However, storage quantities in Windows appear in binary (base-2) units. 例如,每個 2 TB 磁碟機在 Windows 中顯示為 1.82 TiB。For example, each 2 TB drive would appear as 1.82 TiB in Windows. 同樣地,128 TB 儲存集區顯示為 116.41 TiB。Likewise, the 128 TB storage pool would appear as 116.41 TiB. 這是預期行為。This is expected.


請參閱 在 Azure Stack HCI 中建立磁片區。See Creating volumes in Azure Stack HCI.

後續步驟Next steps

如需詳細資訊,請參閱:For more information, see also: