Windows Server 2016 中 health 服務Health Service in Windows Server 2016

適用於 Windows Server 2016Applies to Windows Server 2016

健康服務是 Windows Server 2016,可改善您的日常監視和操作叢集執行儲存空間直接存取體驗中的新功能。The Health Service is a new feature in Windows Server 2016 that improves the day-to-day monitoring and operational experience for clusters running Storage Spaces Direct.

必要條件Prerequisites

健康服務是預設儲存空間直接存取的功能。The Health Service is enabled by default with Storage Spaces Direct. 任何其他動作,不才能設定或 [開始] 它。No additional action is required to set it up or start it. 若要深入了解儲存空間直接存取,請查看儲存空間直接存取 Windows Server 2016 在To learn more about Storage Spaces Direct, see Storage Spaces Direct in Windows Server 2016.

報告Reports

查看健康服務報告See Health Service reports.

錯誤Faults

查看健康服務錯誤See Health Service faults.

控制項目Actions

查看健康服務執行See Health Service actions.

自動化Automation

本節工作流程自動化在磁碟階段 Health 服務的。This section describes workflows which are automated by the Health Service in the disk lifecycle.

磁碟週期Disk Lifecycle

健康服務會自動執行大部分的實體磁碟週期一樣。The Health Service automates most stages of the physical disk lifecycle. 讓我們顯示的初始狀態部署,是完美健康-也就是顯示所有實體磁碟正常運作。Let's say that the initial state of your deployment is in perfect health - which is to say, all physical disks are working properly.

淘汰Retirement

他們可以不使用,對應的錯誤引發時,自動的淘汰實體磁碟。Physical disks are automatically retired when they can no longer be used, and a corresponding Fault is raised. 有幾個案例:There are several cases:

  • 媒體錯誤: 實體磁碟肯定失敗或損壞,而且取代。Media Failure: the physical disk is definitively failed or broken, and must be replaced.

  • 遺失通訊: 實體磁碟已遺失連接連續的超過 15 分鐘。Lost Communication: the physical disk has lost connectivity for over 15 consecutive minutes.

  • 無法回應時應: 實體磁碟已出現超過 5.0 秒三個或更多時間在小時的時間的延遲。Unresponsive: the physical disk has exhibited latency of over 5.0 seconds three or more times within an hour.

注意

如果連接一次,會以多個實體磁碟遺失或 Health 服務會在整個節點或儲存圍繞,淘汰這些磁碟因為有太可能是問題。If connectivity is lost to many physical disks at once, or to an entire node or storage enclosure, the Health Service will not retire these disks since they are unlikely to be the root problem.

如果已停用的磁碟已為多個實體的磁碟的快取提供服務,這些將會自動將指派到另一個快取磁碟如果有的話。If the retired disk was serving as the cache for many other physical disks, these will automatically be reassigned to another cache disk if one is available. 特殊使用者不不需要任何動作。No special user action is required.

還原恢復Restoring resiliency

一旦已停用所在的磁碟,Health 服務會立即開始複製到剩餘實體磁碟還原完整恢復及其資料。Once a physical disk has been retired, the Health Service immediately begins copying its data onto the remaining physical disks, to restore full resiliency. 這已完成後,資料完全安全,並重新錯誤容錯。Once this has completed, the data is completely safe and fault tolerant anew.

注意

此立即還原需要剩餘實體磁碟之間不足可用的容量。This immediate restoration requires sufficient available capacity among the remaining physical disks.

閃爍指示燈Blinking the indicator light

如果可能,請 Health 服務會開始閃爍指示燈已淘汰的磁碟或其位置。If possible, the Health Service will begin blinking the indicator light on the retired physical disk or its slot. 這會繼續不斷,直到已淘汰的磁碟會取代。This will continue indefinitely, until the retired disk is replaced.

注意

有時候,磁碟可能會失敗,無法運作-使甚至其指示燈的方式,例如全部遺失電源。In some cases, the disk may have failed in a way that precludes even its indicator light from functioning - for example, a total loss of power.

實體更換Physical replacement

您應該會取代時可能已停用實體磁碟。You should replace the retired physical disk when possible. 最常,這組成熱-交換-也就是Most often, this consists of a hot-swap - i.e. 關閉節點或儲存圍繞插電就不需要的。powering off the node or storage enclosure is not required. 出現錯誤的很有幫助位置和隨附的資訊。See the Fault for helpful location and part information.

驗證Verification

插入更換磁碟之後,它會確認針對支援的元件文件 (查看下一節)。When the replacement disk is inserted, it will be verified against the Supported Components Document (see the next section).

共用Pooling

如果您允許,在更換磁碟自動會取代輸入使用其前置的集區。If allowed, the replacement disk is automatically substituted into its predecessor's pool to enter use. 此時,系統會返回完美的健康狀態的初始狀態,然後錯誤消失。At this point, the system is returned to its initial state of perfect health, and then the Fault disappears.

支援的元件文件Supported Components Document

健康服務提供執法機制限制的提供系統管理員或方案廠商支援元件文件上使用的儲存空間直接存取的元件。The Health Service provides an enforcement mechanism to restrict the components used by Storage Spaces Direct to those on a Supported Components Document provided by the administrator or solution vendor. 這可以避免使用蓄意不支援的硬體您或其他的瑕疵擔保或支援的合約 compliance 可以幫助。This can be used to prevent mistaken use of unsupported hardware by you or others, which may help with warranty or support contract compliance. 此功能目前僅適用於實體磁碟裝置,包括 Ssd,HDDs,且 NVMe 磁碟機。This functionality is currently limited to physical disk devices, including SSDs, HDDs, and NVMe drives. 支援元件文件可以限制模型、 製造商 (選擇性),以及韌體版本 (選擇性)。The Supported Components Document can restrict on model, manufacturer (optional), and firmware version (optional).

使用Usage

支援元件文件使用 XML 式就迫不及待語法。The Supported Components Document uses 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.

區段Sections

文件具有兩個獨立的章節:磁碟快取The document has two independent sections: Disks and Cache.

如果磁碟區段會提供、 列出的磁碟機才能加入集區。If the Disks section is provided, only the drives listed are allowed to join pools. 任何未列出的磁碟機將無法從加入集區的有效使其使用正式作業。Any unlisted drives are prevented from joining pools, which effectively precludes their use in production. 如果空白的此一節,會允許任何磁碟機加入集區。If this section is left empty, any drive will be allowed to join pools.

如果快取區段會提供、 列出的磁碟機用於快取。If the Cache section is provided, only the drives listed will be used for caching. 如果空白的此一節,儲存空間直接存取會嘗試猜測根據媒體類型及匯流排類型。If this section is left empty, Storage Spaces Direct will attempt to guess based on media type and bus type. 例如,如果您的部署使用固態磁碟機 (SSD) 和硬碟機 (HDD),前者會自動選擇快取。不過,如果您的部署使用所有-flash,您必須指定您要使用的快取以下的高耐力裝置。For example, if your deployment uses solid-state drives (SSD) and hard disk drives (HDD), the former is automatically chosen for caching; however, if your deployment uses all-flash, you may need to specify the higher endurance devices you'd like to use for caching here.

重要

已經集區的磁碟機,以及使用中支援元件文件不回溯適用。The Supported Components Document does not apply retroactively to drives already pooled and in use.

範例Example

<Components>

  <Disks>
    <Disk>
      <Manufacturer>Contoso</Manufacturer>
      <Model>XYZ9000</Model>
      <AllowedFirmware>
        <Version>2.0</Version>
        <Version>2.1</Version>
        <Version>2.2</Version>
      </AllowedFirmware>
      <TargetFirmware>
        <Version>2.1</Version>
        <BinaryPath>\\path\to\image.bin</BinaryPath>
      </TargetFirmware>
    </Disk>
  </Disks>

  <Cache>
    <Disk>
      <Manufacturer>Fabrikam</Manufacturer>
      <Model>QRSTUV</Model>
    </Disk>
  </Cache>

</Components>

若要列出多個磁碟機,只要新增其他<磁碟>中任一個區段的標籤。To list multiple drives, simply add additional <Disk> tags within either section.

若要將此 XML 部署儲存空間直接存取時,使用XML旗標:To inject this XML when deploying Storage Spaces Direct, use the -XML flag:

Enable-ClusterS2D -XML <MyXML>

若要設定或變更支援元件文件儲存空間直接存取部署後 (亦即之後健康服務已執行),請使用下列 PowerShell cmdlet:To set or modify the Supported Components Document once Storage Spaces Direct has been deployed (i.e. once the Health Service is already running), use the following PowerShell cmdlet:

$MyXML = Get-Content <\\path\to\file.xml> | Out-String  
Get-StorageSubSystem Cluster* | Set-StorageHealthSetting -Name "System.Storage.SupportedComponents.Document" -Value $MyXML  

注意

型號、 製造商和韌體版本屬性應該完全符合您取得使用的值取得-平均cmdlet。The model, manufacturer, and the firmware version properties should exactly match the values that you get using the Get-PhysicalDisk cmdlet. 這可能會與您的 「 通用據用量感知器 」 期望,根據您的供應商實作有所不同。This may differ from your "common sense" expectation, depending on your vendor's implementation. 例如 「 Contoso 」,除了製造商可能會 「 CONTOSO LTD,「 或它可能會是空白的模型 」 Contoso XZY9000 」 時。For example, rather than "Contoso", the manufacturer may be "CONTOSO-LTD", or it may be blank while the model is "Contoso-XZY9000".

您可以使用下列 PowerShell cmdlet,確認:You can verify using the following PowerShell cmdlet:

Get-PhysicalDisk | Select Model, Manufacturer, FirmwareVersion  

設定Settings

查看健康服務設定See Health Service settings.

也了See also