在 Windows Server 2016 錯誤網域感知Fault domain awareness in Windows Server 2016

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

容錯讓多部伺服器一同合作,以提供可用性 – 或放另一種方法,以提供節點容錯。Failover Clustering enables multiple servers to work together to provide high availability – or put another way, to provide node fault tolerance. 但今天的企業需要從他們的基礎結構以往更多可用性。But today's businesses demand ever-greater availability from their infrastructure. 若要達到雲朵執行的時間,甚至不太項目,例如底座失敗,架或自然嚴重損壞必須針對保護。To achieve cloud-like uptime, even highly unlikely occurrences such as chassis failures, rack outages, or natural disasters must be protected against. 這就是為何在 Windows Server 2016 容錯也引入底座、架和網站容錯。That's why Failover Clustering in Windows Server 2016 introduces chassis, rack, and site fault tolerance as well.

錯誤網域和容錯是密切相關的概念。Fault domains and fault tolerance are closely related concepts. 錯誤網域是一組分享單點失敗的硬體元件。A fault domain is a set of hardware components that share a single point of failure. 若要將容錯某種程度,您需要在這個層級多個錯誤網域。To be fault tolerant to a certain level, you need multiple fault domains at that level. 例如,將架容錯、您的伺服器和您的資料必須散發跨多個架。For example, to be rack fault tolerant, your servers and your data must be distributed across multiple racks.

這個簡短的影片將會顯示錯誤網域中的 Windows Server 2016 的概觀:This short video presents an overview of fault domains in Windows Server 2016:
按一下此映像來監看錯誤網域中的 Windows Server 2016 的概觀

優點Benefits

  • 儲存空間,包括儲存空間直接存取、使用錯誤網域來最大化資料的安全。Storage Spaces, including Storage Spaces Direct, uses fault domains to maximize data safety.
    靈活度中儲存空間是概念分散式、軟體定義 RAID 等。Resiliency in Storage Spaces is conceptually like distributed, software-defined RAID. 多個複本所有的資料會保持同步,而且如果硬體故障及一份會遺失,其他人的之後還原恢復。Multiple copies of all data are kept in sync, and if hardware fails and one copy is lost, others are recopied to restore resiliency. 若要達到最佳可能恢復,複本則會保留不同錯誤網域中。To achieve the best possible resiliency, copies should be kept in separate fault domains.

  • 健康服務使用錯誤網域提供更有幫助警示。The Health Service uses fault domains to provide more helpful alerts.
    可以位置中繼資料,自動會連同任何後續警示相關聯的每個錯誤網域。Each fault domain can be associated with location metadata, which will automatically be included in any subsequent alerts. 這些項可以協助作業或維護人員,並減少明示硬體錯誤。These descriptors can assist operations or maintenance personnel and reduce errors by disambiguating hardware.

  • 儲存空間相關性伸展叢集使用錯誤的網域。Stretch clustering uses fault domains for storage affinity. 叢集上可遠方加入常見叢集伺服器。Stretch clustering allows faraway servers to join a common cluster. 為獲得最佳效能,應用程式或虛擬機器應該執行這些提供其儲存到附近的伺服器上。For the best performance, applications or virtual machines should be run on servers that are nearby to those providing their storage. 錯誤網域感知能讓這個儲存相關性。Fault domain awareness enables this storage affinity.

層級錯誤網域Levels of fault domains

有四個錯誤網域-網站、架、底座和節點正式層級。There are four canonical levels of fault domains - site, rack, chassis, and node. 自動; 探索節點每個其他的層級是選擇性的。Nodes are discovered automatically; each additional level is optional. 例如,如果您的部署不會使用讓伺服器,底座層級不合理的您。For example, if your deployment does not use blade servers, the chassis level may not make sense for you.

錯誤網域的不同層級的簡圖

使用Usage

您可以使用標記 PowerShell 或 XML 指定錯誤的網域。You can use PowerShell or XML markup to specify fault domains. 這兩種方法是相同,並提供完整的功能。Both approaches are equivalent and provide full functionality.

重要

如果可能的話讓儲存空間直接存取、之前先指定錯誤網域。Specify fault domains before enabling Storage Spaces Direct, if possible. 這可讓底座或架容錯準備集區,層級,並設定靈活度和行計數,例如自動設定。This enables the automatic configuration to prepare the pool, tiers, and settings like resiliency and column count, for chassis or rack fault tolerance. 一旦建立集區與磁碟區,資料將不回溯的回應做的變更來移動錯誤網域拓撲。Once the pool and volumes have been created, data will not retroactively move in response to changes to the fault domain topology. 若要切換節點底座或架讓儲存空間直接存取之後,您應該先收回] 節點,其使用集區的磁碟機Remove-ClusterNode -CleanUpDisksTo move nodes between chassis or racks after enabling Storage Spaces Direct, you should first evict the node and its drives from the pool using Remove-ClusterNode -CleanUpDisks.

透過 PowerShell 定義錯誤網域Defining fault domains with PowerShell

Windows Server 2016 介紹錯誤網域使用下列 cmdlet:Windows Server 2016 introduces the following cmdlets to work with fault domains:

  • Get-ClusterFaultDomain
  • Set-ClusterFaultDomain
  • New-ClusterFaultDomain
  • Remove-ClusterFaultDomain

這個簡短的影片中示範這些 cmdlet] 的使用量。This short video demonstrates the usage of these cmdlets. 按一下 [上叢集錯誤網域 cmdlet] 的使用量觀看這映像

使用Get-ClusterFaultDomain以查看目前網域拓撲錯誤。Use Get-ClusterFaultDomain to see the current fault domain topology. 這將會列出所有節點叢集,加上任何底座、架,或您所建立的網站。This will list all nodes in the cluster, plus any chassis, racks, or sites you have created. 您也可以篩選使用參數,例如-類型-名稱,但這些不一定。You can filter using parameters like -Type or -Name, but these are not required.

Get-ClusterFaultDomain
Get-ClusterFaultDomain -Type Rack
Get-ClusterFaultDomain -Name "server01.contoso.com"

使用New-ClusterFaultDomain以建立新的底座、架或網站。Use New-ClusterFaultDomain to create new chassis, racks, or sites. -Type-Name是必要的參數。The -Type and -Name parameters are required. 預設值的-TypeChassisRack,與SiteThe possible values for -Type are Chassis, Rack, and Site. -Name可以是任何字串。The -Name can be any string. (適用於Node輸入錯誤網域名稱必須實際節點名稱之下,將設定為自動)。(For Node type fault domains, the name must be the actual node name, as set automatically).

New-ClusterFaultDomain -Type Chassis -Name "Chassis 007"
New-ClusterFaultDomain -Type Rack -Name "Rack A"
New-ClusterFaultDomain -Type Site -Name "Shanghai"

重要

Windows Server 無法並不會驗證的任何您所建立的錯誤網域對應至真的世界中的任何項目。Windows Server cannot and does not verify that any fault domains you create correspond to anything in the real, physical world. (聽明顯,但請務必以了解)。兩個實體的世界中,您的節點都在一個架,如果,然後建立-Type Rack錯誤網域中的軟體不神奇地提供架容錯。(This may sound obvious, but it's important to understand.) If, in the physical world, your nodes are all in one rack, then creating two -Type Rack fault domains in software does not magically provide rack fault tolerance. 您必須負責確保您使用下列 cmdlet 所建立的拓撲符合實際排列您的硬體。You are responsible for ensuring the topology you create using these cmdlets matches the actual arrangement of your hardware.

使用Set-ClusterFaultDomain到另一個移動一個錯誤網域。Use Set-ClusterFaultDomain to move one fault domain into another. 條款「家長「和」的子女」常用描述此巢關係。The terms "parent" and "child" are commonly used to describe this nesting relationship. -Name-Parent是必要的參數。The -Name and -Parent parameters are required. -Name,提供移動; 錯誤網域名稱在-Parent,提供目的地的名稱。In -Name, provide the name of the fault domain that is moving; in -Parent, provide the name of the destination. 若要將多個錯誤網域一次,會列出他們的名稱。To move multiple fault domains at once, list their names.

Set-ClusterFaultDomain -Name "server01.contoso.com" -Parent "Rack A"
Set-ClusterFaultDomain -Name "Rack A", "Rack B", "Rack C", "Rack D" -Parent "Shanghai"

重要

錯誤網域移動,當子女移動它們。When fault domains move, their children move with them. 在上面範例中,如果架 A server01.contoso.com 父系,後者不另行購買需要移至上海網站 – 已經有問題,就像是實體世界父一定。In the above example, if Rack A is the parent of server01.contoso.com, the latter does not separately need to be moved to the Shanghai site – it is already there by virtue of its parent being there, just like in the physical world.

您可以看到父子關係輸出中的Get-ClusterFaultDomain,請在ParentNameChildrenNames欄。You can see parent-child relationships in the output of Get-ClusterFaultDomain, in the ParentName and ChildrenNames columns.

您也可以使用Set-ClusterFaultDomain修改其他的某些屬性,錯誤網域。You can also use Set-ClusterFaultDomain to modify certain other properties of fault domains. 例如,您可以提供選擇性-Location-Description的任何錯誤網域中繼資料。For example, you can provide optional -Location or -Description metadata for any fault domain. 如果提供,這項資訊會納入硬體警示從健康服務。If provided, this information will be included in hardware alerting from the Health Service. 您也可以重新命名錯誤網域使用-NewName的參數。You can also rename fault domains using the -NewName parameter. 不要重新命名Node輸入錯誤的網域。Do not rename Node type fault domains.

Set-ClusterFaultDomain -Name "Rack A" -Location "Building 34, Room 4010"
Set-ClusterFaultDomain -Type Node -Description "Contoso XYZ Server"
Set-ClusterFaultDomain -Name "Shanghai" -NewName "China Region"

使用Remove-ClusterFaultDomain移除底座、架或您所建立的網站。Use Remove-ClusterFaultDomain to remove chassis, racks, or sites you have created. -Name是必要的參數。The -Name parameter is required. 您無法移除錯誤網域包含子女 – 第一次,移除子女,或將它們移使用外部Set-ClusterFaultDomainYou cannot remove a fault domain that contains children – first, either remove the children, or move them outside using Set-ClusterFaultDomain. 若要將以外的所有其他錯誤網域錯誤網域,將其-Parent字串空白 (」」)。To move a fault domain outside of all other fault domains, set its -Parent to the empty string (""). 您無法移除Node輸入錯誤的網域。You cannot remove Node type fault domains. 若要一次移除多個錯誤網域,清單他們的名稱。To remove multiple fault domains at once, list their names.

Set-ClusterFaultDomain -Name "server01.contoso.com" -Parent ""
Remove-ClusterFaultDomain -Name "Rack A"

定義錯誤網域 XML 標記Defining fault domains with XML markup

可以使用 XML 式就迫不及待語法指定錯誤網域。Fault domains can be specified using an XML-inspired syntax. 我們建議使用最愛的文字編輯器中,例如 Visual Studio 程式碼 (使用免費在此) 或「記事本」,若要建立的 XML 文件,您可以儲存及重複使用。We recommend using your favorite text editor, such as Visual Studio Code (available for free here) or Notepad, to create an XML document which you can save and reuse.

這個簡短的影片示範指定錯誤網域 XML 標記] 的使用量。This short video demonstrates the usage of XML Markup to specify fault domains.

![C按一下此映像來監看簡短的影片,如何使用 XML 指定錯誤網域]lick this image to watch a short video on how to use XML to specify fault domains](media/Fault-Domains-in-Windows-Server-2016/Part-3-Using-XML-Markup.jpg)

在 [PowerShell,執行下列 cmdlet: Get-ClusterFaultDomainXMLIn PowerShell, run the following cmdlet: Get-ClusterFaultDomainXML. 這會傳回為 XML 叢集,目前錯誤網域規格。This returns the current fault domain specification for the cluster, as XML. 這會反映每個發現<Node>、包裝開頭和結尾在<Topology>標籤。This reflects every discovered <Node>, wrapped in opening and closing <Topology> tags.

執行此輸出儲存到檔案。Run the following to save this output to a file.

Get-ClusterFaultDomainXML | Out-File <Path>  

打開檔案,並新增<Site><Rack>,以及<Chassis>標籤來指定這些節點如何分散的網站、架,以及底座到。Open the file, and add <Site>, <Rack>, and <Chassis> tags to specify how these nodes are distributed across sites, racks, and chassis. 每個標籤必須由唯一名稱Every tag must be identified by a unique Name. 用於節點,您必須在填入預設為保持節點的名稱。For nodes, you must keep the node's name as populated by default.

重要

所有其他標籤選擇性時,它們也必須遵守轉移網站>架>底座>] 節點階層、,必須能正常關閉。While all additional tags are optional, they must adhere to the transitive Site > Rack > Chassis > Node hierarchy, and must be properly closed.
除了名稱手Location="..."Description="..."描述新增到任何標記。In addition to name, freeform Location="..." and Description="..." descriptors can be added to any tag.

範例:兩個網站一個架Example: Two sites, one rack each

<Topology>  
  <Site Name="SEA" Location="Contoso HQ, 123 Example St, Room 4010, Seattle">  
    <Rack Name="A01" Location="Aisle A, Rack 01">  
      <Node Name="Server01" Location="Rack Unit 33" />  
      <Node Name="Server02" Location="Rack Unit 35" />  
      <Node Name="Server03" Location="Rack Unit 37" />  
    </Rack>  
  </Site>  
  <Site Name="NYC" Location="Regional Datacenter, 456 Example Ave, New York City">  
    <Rack Name="B07" Location="Aisle B, Rack 07">  
      <Node Name="Server04" Location="Rack Unit 20" />  
      <Node Name="Server05" Location="Rack Unit 22" />  
      <Node Name="Server06" Location="Rack Unit 24" />  
    </Rack>  
  </Site>  
</Topology> 

範例:兩個底座,讓伺服器Example: two chassis, blade servers

<Topology>  
  <Rack Name="A01" Location="Contoso HQ, Room 4010, Aisle A, Rack 01">  
    <Chassis Name="Chassis01" Location="Rack Unit 2 (Upper)" >  
      <Node Name="Server01" Location="Left" />  
      <Node Name="Server02" Location="Right" />  
    </Chassis>  
    <Chassis Name="Chassis02" Location="Rack Unit 6 (Lower)" >  
      <Node Name="Server03" Location="Left" />  
      <Node Name="Server04" Location="Right" />  
    </Chassis>  
  </Rack>  
</Topology>  

若要設定新的網域錯誤規格,儲存您的 XML 並執行 PowerShell 中。To set the new fault domain specification, save your XML and run the following in PowerShell.

$xml = Get-Content <Path> | Out-String  
Set-ClusterFaultDomainXML -XML $xml

本指南將只兩個範例,但<Site><Rack><Chassis>,與<Node>混合標記,許多其他方式,以反映部署的實體拓撲符合有可能會有任何。This guide presents just two examples, but the <Site>, <Rack>, <Chassis>, and <Node> tags can be mixed and matched in many additional ways to reflect the physical topology of your deployment, whatever that may be. 我們希望這些範例所示這些標記的目的彈性與手位置描述明確他們的值。We hope these examples illustrate the flexibility of these tags and the value of freeform location descriptors to disambiguate them.

選項:位置和描述中繼資料Optional: Location and description metadata

您可以提供選擇性位置描述的任何錯誤網域中繼資料。You can provide optional Location or Description metadata for any fault domain. 如果提供,這項資訊會納入硬體警示從健康服務。If provided, this information will be included in hardware alerting from the Health Service. 這個簡短的影片示範新增這類描述的值。This short video demonstrates the value of adding such descriptors.

![C上看到簡短的影片示範位置描述加入網域錯誤的值]lick to see a short video demonstrating the value of adding location descriptors to fault domains](media/Fault-Domains-in-Windows-Server-2016/part-4-location-description.jpg)

也了See Also