規劃儲存空間直接存取中的磁碟區Planning volumes in Storage Spaces Direct

適用於:Windows Server 2016Applies To: Windows Server 2016

此主題提供如何規劃儲存空間直接存取中的磁碟區,符合您工作負載的效能與容量需要,包括選擇它們的系統、復原類型和大小。This topic provides guidance for how to plan volumes in Storage Spaces Direct 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 the datastores where you put the files your workloads need, such as VHD or VHDX files for Hyper-V virtual machines. 磁碟區結合儲存集區的磁碟機,導入儲存空間直接存取的容錯、延展性和效能好處。Volumes combine the drives in the storage pool to introduce the fault tolerance, scalability, and performance benefits of Storage Spaces Direct.


在儲存空間直接存取的文件中,我們將磁碟區和其下的虛擬磁碟,包括提供其他內建 Windows 功能如叢集共用磁碟區 (CSV) 和 ReFS 所提供的功能,合稱為「磁碟區」一詞。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.


選擇建立多少磁碟區Choosing how many volumes to create

我們建議磁碟區數目是您叢集中伺服器數目的倍數。We recommend making the number of volumes a multiple of the number of servers in your cluster. 例如,如果您有 4 部伺服器,您會遇到更一致的效能與 4 總磁碟區超過 3 或 5。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.

我們建議每個叢集的磁碟區總數限制為 32。We recommend limiting the total number of volumes to 32 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. 不過,它還不支援特定的功能,例如重複資料刪除。However, it does not yet support certain features, such as Data Deduplication.

如果您的工作負載需要 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

具有兩個伺服器的叢集的唯一選項是雙向鏡像。The only option for clusters with two servers is two-way mirroring. 這保留所有資料的兩份複本,每個伺服器的磁碟機上各有一份複本。This keeps two copies of all data, one copy on the drives in each server. 其儲存效率是 50%,因此若要撰寫 1 TB 的資料,儲存集區需要至少 2 TB 的實體儲存容量。Its storage efficiency is 50% – 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 (drive or server) at a time.


如果您有兩個以上伺服器,我們建議改為使用下列一種復原類型。If you have more than two servers, we recommend using one of the following resiliency types instead.

具有三部伺服器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% – 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. 例如,如果您重新開機一部伺服器,同時突然另一部磁碟機或伺服器故障,所有資料會保持安全,持續可供存取。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.

雙同位提供與三向鏡像相同的容錯功能,但具有更佳的儲存效率。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% – to store 2 TB of data, you need 4 TB of physical storage capacity in the storage pool. 使用七部伺服器時增加到 66.7% 儲存效率,並持續增至 80.0% 儲存效率。This increases to 66.7% storage efficiency with seven servers, and continues up to 80.0% 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%
Two 雙向鏡像: 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%的效能
比不上鏡像,但為雙同位 fast 向上至按兩次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%的效能
最高的 I/O 延遲與寫入上的 CPU 使用率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

在大型、連續行程中寫入的工作負載 (例如封存或備份目標),有另一種 Windows Server 2016 的新選項:一個磁碟區可以混合鏡像和雙同位。Workloads that write in large, sequential passes, such as archival or backup targets, have another option that is new in Windows Server 2016: 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.


如果您部分資料 injestion 透過觀察突然寫入效能會降低,它可能表示鏡像部分不是足以或鏡像加速同位不適合您的使用案例。If you observe an abrupt decrease in write performance partway through data injestion, 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/s 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

儲存空間直接存取中的磁碟區可以是最多 32 TB 的任何大小。Volumes in Storage Spaces Direct can be any size up to 32 TB.


如果您使用依賴磁碟區陰影複製服務 (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.


保留容量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% 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% 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!



您不需要立即建立所有磁碟區。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.


請參閱建立儲存空間直接存取中的磁碟區See Creating volumes in Storage Spaces Direct.

請參閱See also