移除儲存空間直接存取中的伺服器Removing servers in Storage Spaces Direct

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

本主題說明如何使用 PowerShell 移除儲存空間直接存取中的伺服器。This topic describes how to remove servers in Storage Spaces Direct using PowerShell.

移除伺服器,但保留其磁碟機Remove a server but leave its drives

如果您想要很快將伺服器加回至叢集,或如果您想要保留其磁碟機來將它們移到另一個伺服器,您可以從集區中移除伺服器,但從儲存集區中移除其磁碟機。If you intend to add the server back into the cluster soon, or if you intend to keep its drives by moving them to another server, you can remove the server from the cluster without removing its drives from the storage pool. 如果您使用容錯移轉叢集管理員移除伺服器,這是預設行為。This is the default behavior if you use Failover Cluster Manager to remove the server.

使用 PowerShell 中的 Remove-ClusterNode cmdlet:Use the Remove-ClusterNode cmdlet in PowerShell:

Remove-ClusterNode <Name>

這個 cmdlet 快速成功,無論任何容量考量,因為儲存集區會「記住」遺失的磁碟機,並期待它們回來。This cmdlet succeeds quickly, regardless of any capacity considerations, because the storage pool "remembers" the missing drives and expects them to come back. 遺失的磁碟機沒有資料移動。There is no data movement away from the missing drives. 當它們遺失時,其 OperationalStatus 會顯示為「通訊中斷」,而且您的磁碟區會顯示 [不完整]。While they remain missing, their OperationalStatus will show as "Lost Communication", and your volumes will show "Incomplete".

當磁碟機返回時,它們會被自動偵測及與集區重新關聯,即使它們已在新的伺服器。When the drives come back, they are automatically detected and re-associated with the pool, even if they are now in a new server.

警告

請勿將具有集區資料的磁碟機從一部伺服器分散到其他多部伺服器。Do not distribute drives with pool data from one server into multiple other servers. 例如,如果有 10 個磁碟機的伺服器故障(例如因為它的主機板或開機磁碟機故障),您可以將所有 10 個磁碟機移到一部新伺服器,但您無法將每個分別移到其他不同的伺服器。For example, if one server with ten drives fails (because its motherboard or boot drive failed, for instance), you can move all ten drives into one new server, but you cannot move each of them separately into different other servers.

移除伺服器和其磁碟機Remove a server and its drives

如果您想要從叢集永久移除伺服器(有時稱為向內延展),您可以從叢集移除伺服器從儲存集區中移除其磁碟機。If you want to permanently remove a server from the cluster (sometimes referred to as scaling-in), you can remove the server from the cluster and remove its drives from the storage pool.

使用 Remove-ClusterNode cmdlet 搭配選擇性的 -CleanUpDisks 旗標:Use the Remove-ClusterNode cmdlet with the optional -CleanUpDisks flag:

Remove-ClusterNode <Name> -CleanUpDisks

這個 cmdlet 可能需要很長的時間(有時候很多小時)執行,因為 Windows 必須將該伺服器上儲存的所有資料移至叢集中的其他伺服器。This cmdlet might take a long time (sometimes many hours) to run because Windows must move all the data stored on that server to other servers in the cluster. 完成後,磁碟機會從儲存集區永久移除,讓受影響的磁碟區回到良好狀態。Once this is complete, the drives are permanently removed from the storage pool, returning affected volumes to a healthy state.

需求Requirements

若要永久向內延展 (移除伺服器其磁碟機),您的叢集必須符合下列兩個要求。To permanently scale-in (remove a server and its drives), your cluster must meet the following two requirements. 如果不符合,Remove-ClusterNode -CleanUpDisks cmdlet 會立即傳回錯誤,然後才會開始任何的資料移動,以減少干擾。If it doesn't, the Remove-ClusterNode -CleanUpDisks cmdlet will return an error immediately, before it begins any data movement, to minimize disruption.

足夠的容量Enough capacity

首先,剩餘的伺服器必須有足夠的儲存容量,以容納您的所有磁碟區。First, you must have enough storage capacity in the remaining servers to accomodate all your volumes.

例如,如果您有四部伺服器,每部伺服器都有 10 x 1 TB 磁碟機,您有 40 TB 實體儲存總容量。For example, if you have four servers, each with 10 x 1 TB drives, you have 40 TB of total physical storage capacity. 移除一部伺服器和其所有磁碟機之後,您將剩下 30 TB 的容量。After removing one server and all its drives, you will have 30 TB of capacity left. 如果您的磁碟區使用量總計超過 30 TB,它們無法裝入剩餘的伺服器,因此 cmdlet 將會傳回錯誤並不會移動任何資料。If the footprints of your volumes are more than 30 TB together, they won't fit in the remaining servers, so the cmdlet will return an error and not move any data.

足夠的容錯網域Enough fault domains

第二,您必須有足夠的容錯網域(通常是伺服器)以提供磁碟區復原功能。Second, you must have enough fault domains (typically servers) to provide the resiliency of your volumes.

例如,如果您的磁碟區在伺服器層級使用三向鏡像復原類型,除非您有 3 個伺服器,否則磁碟區無法完全正常。For example, if your volumes use three-way mirroring at the server level for resiliency, they cannot be fully healthy unless you have at least three servers. 如果您擁有三個伺服器,並嘗試移除其中一個伺服器和其所有磁碟機,cmdlet 會傳回錯誤並不會移動任何資料。If you have exactly three servers, and then attempt to remove one and all its drives, the cmdlet will return an error and not move any data.

下表顯示每個復原類型所需的最少容錯網域數目。This table shows the minimum number of fault domains required for each resiliency type.

復原Resiliency 最小必要容錯網域Minimum required fault domains
雙向鏡像Two-way mirror 22
三向鏡像Three-way mirror 33
雙同位Dual parity 44

注意

短時間像是故障或維護期間可以有較少的伺服器。It is okay to briefly have fewer servers, such as during failures or maintenance. 不過,若要讓磁碟區恢復完全良好的狀態,您必須有上面所列的伺服器數目下限。However, in order for volumes to return to a fully healthy state, you must have the minimum number of servers listed above.

請參閱See also