將伺服器或磁碟機新增至儲存空間直接存取Adding servers or drives to Storage Spaces Direct

適用於: Windows Server 2019、 Windows Server 2016Applies to: Windows Server 2019, Windows Server 2016

本主題說明如何將伺服器或磁碟機新增至儲存空間直接存取。This topic describes how to add servers or drives to Storage Spaces Direct.

新增伺服器Adding servers

新增伺服器 (通常稱為相應放大) 會增加儲存容量、改善儲存空間的效能,並解除鎖定更佳的儲存空間效率。Adding servers, often called scaling out, adds storage capacity and can improve storage performance and unlock better storage efficiency. 如果您的部署為超交集,新增伺服器也可為您的工作負載提供更多計算資源。If your deployment is hyper-converged, adding servers also provides more compute resources for your workload.


一般部署可以藉由新增伺服器,簡單地相應放大:Typical deployments are simple to scale out by adding servers. 只需要兩個步驟:There are just two steps:

  1. 執行叢集驗證精靈,方法是使用容錯移轉叢集嵌入式管理單元或使用 PowerShell 中的 Test-Cluster Cmdlet (以系統管理員身分執行)。Run the cluster validation wizard using the Failover Cluster snap-in or with the Test-Cluster cmdlet in PowerShell (run as Administrator). 包含您想要加入的新伺服器 <NewNode>Include the new server <NewNode> you wish to add.

    Test-Cluster -Node <Node>, <Node>, <Node>, <NewNode> -Include "Storage Spaces Direct", Inventory, Network, "System Configuration"

    這可確認新的伺服器正在執行 Windows Server 2016 Datacenter Edition、已加入與現有伺服器相同的 Active Directory Domain Services、具有所有必要的角色和功能,並且已正確設定網路。This confirms that the new server is running Windows Server 2016 Datacenter Edition, has joined the same Active Directory Domain Services domain as the existing servers, has all the required roles and features, and has networking properly configured.


    若您重新使用的磁碟機內含您不再需要的舊資料或中繼資料,使用 [磁碟管理]Reset-PhysicalDisk Cmdlet 加以清除。If you are re-using drives that contain old data or metadata you no longer need, clear them using Disk Management or the Reset-PhysicalDisk cmdlet. 若偵測到舊的資料或中繼資料,磁碟機便不會置於集區。If old data or metadata is detected, the drives aren't pooled.

  2. 在叢集上執行下列 Cmdlet 以完成新增伺服器:Run the following cmdlet on the cluster to finish adding the server:

Add-ClusterNode -Name NewNode 


自動加入集區取決於您是否只有一個集區。Automatic pooling depends on you having only one pool. 如果您已經規避標準設定來建立多個集區,您必須自行使用 Add-PhysicalDisk,將新的磁碟機新增至您慣用的集區。If you've circumvented the standard configuration to create multiple pools, you will need to add new drives to your preferred pool yourself using Add-PhysicalDisk.

從 2 個伺服器變為 3 個:解除鎖定三向鏡像From 2 to 3 servers: unlocking three-way mirroring


使用兩個伺服器,您只能建立雙向鏡像磁碟區 (相較於分散式 RAID-1)。With two servers, you can only create two-way mirrored volumes (compare with distributed RAID-1). 使用三個伺服器,您便能建立三向鏡像磁碟區並獲得更佳的容錯。With three servers, you can create three-way mirrored volumes for better fault tolerance. 建議您盡可能使用三向鏡像。We recommend using three-way mirroring whenever possible.

雙向鏡像磁碟區無法就地升級至三向鏡像。Two-way mirrored volumes cannot be upgraded in-place to three-way mirroring. 然而,您可建立新的磁碟區並將資料移轉 (複製,例如透過使用儲存體複本) 至其中,然後移除舊的磁碟區。Instead, you can create a new volume and migrate (copy, such as by using Storage Replica) your data to it, and then remove the old volume.

若要開始建立三向鏡像磁碟區,您有數個好用的選項:To begin creating three-way mirrored volumes, you have several good options. 您可任意選擇想用的選項。You can use whichever you prefer.

選項 1Option 1

在建立期間,於每個新磁碟區上指定 PhysicalDiskRedundancy = 2Specify PhysicalDiskRedundancy = 2 on each new volume upon creation.

New-Volume -FriendlyName <Name> -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -Size <Size> -PhysicalDiskRedundancy 2

選項 2Option 2

或是在集區名為 MirrorResiliencySetting 物件上設定 PhysicalDiskRedundancyDefault = 2Instead, you can set PhysicalDiskRedundancyDefault = 2 on the pool's ResiliencySetting object named Mirror. 接著,任何新的鏡像磁碟區都將自動使用三向鏡像,即使您並未指定亦然。Then, any new mirrored volumes will automatically use three-way mirroring even if you don't specify it.

Get-StoragePool S2D* | Get-ResiliencySetting -Name Mirror | Set-ResiliencySetting -PhysicalDiskRedundancyDefault 2

New-Volume -FriendlyName <Name> -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -Size <Size>

選項 3Option 3

在名為 CapacityStorageTier 範本上設定 PhysicalDiskRedundancy = 2,然後藉由參考該層來建立磁碟區。Set PhysicalDiskRedundancy = 2 on the StorageTier template called Capacity, and then create volumes by referencing the tier.

Set-StorageTier -FriendlyName Capacity -PhysicalDiskRedundancy 2 

New-Volume -FriendlyName <Name> -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -StorageTierFriendlyNames Capacity -StorageTierSizes <Size>

從 3 個伺服器變為 4 個:解除鎖定雙同位From 3 to 4 servers: unlocking dual parity


使用四個伺服器,您便可以使用通常也稱為清除編碼的雙同位 (相較於分散式 RAID-6)。With four servers, you can use dual parity, also commonly called erasure coding (compare to distributed RAID-6). 這會提供與三向鏡像相同的容錯功能,但具有更佳的儲存空間效率。This provides the same fault tolerance as three-way mirroring, but with better storage efficiency. 如需深入了解,請參閱容錯與儲存空間效率To learn more, see Fault tolerance and storage efficiency.

若您的部署規模較小,有多個好用選項可供您開始建立雙同位磁碟區。If you're coming from a smaller deployment, you have several good options to begin creating dual parity volumes. 您可任意選擇想用的選項。You can use whichever you prefer.

選項 1Option 1

在建立期間,於每個新磁碟區上指定 PhysicalDiskRedundancy = 2ResiliencySettingName = ParitySpecify PhysicalDiskRedundancy = 2 and ResiliencySettingName = Parity on each new volume upon creation.

New-Volume -FriendlyName <Name> -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -Size <Size> -PhysicalDiskRedundancy 2 -ResiliencySettingName Parity

選項 2Option 2

在集區名為 ParityResiliencySetting 物件上設定 PhysicalDiskRedundancy = 2Set PhysicalDiskRedundancy = 2 on the pool's ResiliencySetting object named Parity. 接著,任何新的同位磁碟區都將自動使用同位,即使您並未指定亦然。Then, any new parity volumes will automatically use dual parity even if you don't specify it

Get-StoragePool S2D* | Get-ResiliencySetting -Name Parity | Set-ResiliencySetting -PhysicalDiskRedundancyDefault 2

New-Volume -FriendlyName <Name> -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -Size <Size> -ResiliencySettingName Parity

利用四個伺服器,您也可以開始使用鏡像加速的同位,其中的個別磁碟區為部分鏡像及部分同位。With four servers, you can also begin using mirror-accelerated parity, where an individual volume is part mirror and part parity.

為此,您必須更新您的 StorageTier 範本,以同時擁有 [效能] 和 [容量][容量] 層,因為如果您先在四個伺服器上執行 Enable-ClusterS2D 就會加以建立。For this, you will need to update your StorageTier templates to have both Performance and Capacity tiers, as they would be created if you had first run Enable-ClusterS2D at four servers. 具體來說,這兩層都應該具有您容量裝置 (例如 SSD 或 HDD) 的 MediaTypePhysicalDiskRedundancy = 2Specifically, both tiers should have the MediaType of your capacity devices (such as SSD or HDD) and PhysicalDiskRedundancy = 2. [效能] 層應該是 ResiliencySettingName = Mirror,而 [容量] 層應該是 ResiliencySettingName = ParityThe Performance tier should be ResiliencySettingName = Mirror, and the Capacity tier should be ResiliencySettingName = Parity.

選項 3Option 3

您可能會發現最簡單的方式是只移除現有的階層範本,並建立兩個新的階層範本即可。You may find it easiest to simply remove the existing tier template and create the two new ones. 這並不會影響任何透過參考階層範本所建立的預先存在磁碟區:其僅是範本。This will not affect any pre-existing volumes which were created by refering the tier template: it's just a template.

Remove-StorageTier -FriendlyName Capacity

New-StorageTier -StoragePoolFriendlyName S2D* -MediaType HDD -PhysicalDiskRedundancy 2 -ResiliencySettingName Mirror -FriendlyName Performance
New-StorageTier -StoragePoolFriendlyName S2D* -MediaType HDD -PhysicalDiskRedundancy 2 -ResiliencySettingName Parity -FriendlyName Capacity

這樣就完成了!That's it! 您現在已可透過參考這些階層範本建立鏡像加速的同位磁碟區。You are now ready to create mirror-accelerated parity volumes by referencing these tier templates.


New-Volume -FriendlyName "Sir-Mix-A-Lot" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2D* -StorageTierFriendlyNames Performance, Capacity -StorageTierSizes <Size, Size> 

超越 4 個伺服器:絕佳同位效率Beyond 4 servers: greater parity efficiency

當您擴充超過四個伺服器時,新的磁碟區就能受惠於前所未有的絕佳同位編碼效率。As you scale beyond four servers, new volumes can benefit from ever-greater parity encoding efficiency. 例如,介於六到七個伺服器之間,效率會從 50.0% 提升到 66.7%,因為它變為可能可使用 Reed-Solomon 4+2 (而不是 2+2)。For example, between six and seven servers, efficiency improves from 50.0% to 66.7% as it becomes possible to use Reed-Solomon 4+2 (rather than 2+2). 您不需採取任何步驟,就能開始享受這種新的效率;最佳可行的編碼會在您每次建立磁碟區時自動決定。There are no steps you need to take to begin enjoying this new efficiency; the best possible encoding is determined automatically each time you create a volume.

不過,任何預先存在的磁碟區將不會 「轉換」 為範圍更廣泛的新編碼。However, any pre-existing volumes will not be "converted" to the new, wider encoding. 其中一個合理的原因是,這樣做需要大量計算,而此計算確實會影響整個部署中的 「每個單一位元」One good reason is that to do so would require a massive calculation affecting literally every single bit in the entire deployment. 如果您想要讓預先存在的資料以更佳的效率進行編碼,您可以將它移轉至新的磁碟區。If you would like pre-existing data to become encoded at the higher efficiency, you can migrate it to new volume(s).

如需詳細資料,請參閱容錯與儲存空間效率For more details, see Fault tolerance and storage efficiency.

使用底座或機架容錯時新增伺服器Adding servers when using chassis or rack fault tolerance

如果您的部署會使用底座或機架容錯,您必須先指定新伺服器的底座或機架,然後再將它們新增至叢集。If your deployment uses chassis or rack fault tolerance, you must specify the chassis or rack of new servers before adding them to the cluster. 這會告訴儲存空間直接存取,利用最佳方式來分散資料,以充分利用容錯功能。This tells Storage Spaces Direct how best to distribute data to maximize fault tolerance.

  1. 建立節點的暫存容錯網域,方法是開啟已提升權限的 PowerShell 工作階段,然後使用下列命令 (其中 <NewNode> 是新叢集節點的名稱):Create a temporary fault domain for the node by opening an elevated PowerShell session and then using the following command, where <NewNode> is the name of the new cluster node:

    New-ClusterFaultDomain -Type Node -Name <NewNode> 
  2. 將此暫存的容錯網域移至真實世界中新伺服器所在的底座或機架,如 <ParentName> 所指定:Move this temporary fault-domain into the chassis or rack where the new server is located in the real world, as specified by <ParentName>:

    Set-ClusterFaultDomain -Name <NewNode> -Parent <ParentName> 

    如需詳細資訊,請參閱 Windows Server 2016 中的容錯網域感知For more information, see Fault domain awareness in Windows Server 2016.

  3. 將伺服器新增到叢集,如新增伺服器中所述。Add the server to the cluster as described in Adding servers. 當新伺服器加入叢集時,它會自動與預留位置容錯網域產生關聯 (使用它的名稱)。When the new server joins the cluster, it's automatically associated (using its name) with the placeholder fault domain.

新增磁碟機Adding drives

新增磁碟機 (也稱為相應增加) 會增加儲存容量,並可改善效能。Adding drives, also known as scaling up, adds storage capacity and can improve performance. 如果您有可用的插槽,可將磁碟機新增至每個伺服器以擴充儲存容量,而不需新增伺服器。If you have available slots, you can add drives to each server to expand your storage capacity without adding servers. 您可以隨時個別新增快取磁碟機或容量磁碟機。You can add cache drives or capacity drives independently at any time.


強烈建議您所有伺服器都應有相同的儲存體設定。We strongly recommend that all servers have identical storage configurations.


若要相應增加,請連接磁碟機並驗證 Windows 會加以探索。To scale up, connect the drives and verify that Windows discovers them. 其應顯示於 PowerShell 中 Get-PhysicalDisk Cmdlet 的輸出中,且其 CanPool 屬性設為 TrueThey should appear in the output of the Get-PhysicalDisk cmdlet in PowerShell with their CanPool property set to True. 若其顯示為 CanPool = False,您可透過檢查其 CannotPoolReason 屬性了解原因。If they show as CanPool = False, you can see why by checking their CannotPoolReason property.

Get-PhysicalDisk | Select SerialNumber, CanPool, CannotPoolReason

在短時間內,儲存空間直接存取將會自動宣告符合資格的磁碟機、將之新增至儲存集區,而磁碟區將自動平均重新分散到所有磁碟機上Within a short time, eligible drives will automatically be claimed by Storage Spaces Direct, added to the storage pool, and volumes will automatically be redistributed evenly across all the drives. 此時,您已完成並準備好延伸磁碟區建立新磁碟區At this point, you're finished and ready to extend your volumes or create new ones.

如果磁碟機沒有出現,請手動掃描硬體變更。If the drives don't appear, manually scan for hardware changes. 這可以使用 [動作] 功能表下方的 [裝置管理員] 來完成。This can be done using Device Manager, under the Action menu. 如果它們包含舊的資料或中繼資料,請考慮加以重新格式化。If they contain old data or metadata, consider reformatting them. 可透過使用 [磁碟管理]Reset-PhysicalDisk Cmdlet 進行此操作。This can be done using Disk Management or with the Reset-PhysicalDisk cmdlet.


自動加入集區取決於您是否只有一個集區。Automatic pooling depends on you having only one pool. 如果您已經規避標準設定來建立多個集區,您必須自行使用 Add-PhysicalDisk,將新的磁碟機新增至您慣用的集區。If you've circumvented the standard configuration to create multiple pools, you will need to add new drives to your preferred pool yourself using Add-PhysicalDisk.

新增磁碟機或伺服器之後最佳化磁碟機的使用方式Optimizing drive usage after adding drives or servers

經過一段時間,磁碟機有新增或移除,分佈集區中的磁碟機之間的資料可以變得不平均。Over time, as drives are added or removed, the distribution of data among the drives in the pool can become uneven. 在某些情況下,這會導致某些變滿,而其他磁碟機集區中的有很多空間的磁碟機。In some cases, this can result in certain drives becoming full while other drives in pool have much lower consumption.

為了協助保持甚至整個集區的磁碟機配置,儲存空間直接存取會自動最佳化磁碟機使用量之後您將磁碟機或伺服器新增至集區 (這是適用於使用共用 SAS 磁碟機的儲存空間系統手動處理程序)。To help keep drive allocation even across the pool, Storage Spaces Direct automatically optimizes drive usage after you add drives or servers to the pool (this is a manual process for Storage Spaces systems that use Shared SAS enclosures). 最佳化開始新的磁碟機新增至集區之後 15 分鐘的時間。Optimization starts 15 minutes after you add a new drive to the pool. 最佳化集區執行以低優先順序的背景作業,因此可能需要小時或數天才能完成,特別是如果您使用的大型磁碟機。Pool optimization runs as a low-priority background operation, so it can take hours or days to complete, especially if you're using large hard drives.

最佳化使用-一個稱為的最佳化及一個稱為重新平衡-兩個工作,您可以監視其進度,使用下列命令:Optimization uses two jobs - one called Optimize and one called Rebalance - and you can monitor their progress with the following command:


您可以手動最佳化儲存集區Optimize-storagepool cmdlet。You can manually optimize a storage pool with the Optimize-StoragePool cmdlet. 以下是範例:Here's an example:

Get-StoragePool <PoolName> | Optimize-StoragePool