使用共用存放裝置的延展式叢集複寫Stretch Cluster Replication Using Shared Storage

適用於:Windows Server (半年度管道)、Windows Server 2016Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016

在這個評估範例中,您將在單一延展式叢集中設定這些電腦及其存放裝置 (其中兩個節點會共用一組存放裝置,以及兩個節點會共用另一組存放裝置),接著複寫將保留這兩組已在叢集中進行鏡像處理的存放裝置,以便能夠立即進行容錯移轉。In this evaluation example, you will configure these computers and their storage in a single stretch cluster, where two nodes share one set of storage and two nodes share another set of storage, then replication keeps both sets of storage mirrored in the cluster to allow immediate failover. 雖然並非必要,但這些節點及其存放裝置應位在不同的實體網站。These nodes and their storage should be located in separate physical sites, although it is not required. 有個別的步驟可用來建立 Hyper-V 和檔案伺服器叢集以做為範例案例。There are separate steps for creating Hyper-V and File Server clusters as sample scenarios.

重要

在這個評估中,不同網站中的伺服器必須能夠透過網路來與其他伺服器進行通訊,但不會有任何實體連線來連至其他網站的共用存放裝置。In this evaluation, servers in different sites must be able to communicate with the other servers via a network, but not have any physical connectivity to the other site's shared storage. 這個案例不會使用儲存空間直接存取。This scenario does not make use of Storage Spaces Direct.

詞彙Terms

本逐步解說使用下列環境做為範例:This walkthrough uses the following environment as an example:

  • 名為 SR-SRV01SR-SRV02SR-SRV03SR-SRV04 的四部伺服器,形成名為 SR-SRVCLUS 的單一叢集。Four servers, named SR-SRV01, SR-SRV02, SR-SRV03, and SR-SRV04 formed into a single cluster called SR-SRVCLUS.

  • 代表示兩個不同資料中心的一對邏輯「網站」,一個名為 Redmond,而另一個名為 BellevueA pair of logical "sites" that represent two different data centers, with one called Redmond and the other called Bellevue.

注意

您最少可以只使用兩個節點,其中每一個節點分別位於每個網站中。You can use only as few as two nodes, where one node each is in each site. 不過,您將無法只透過兩部伺服器來執行內部網站的容錯移轉。However, you will not be able to perform intra-site failover with only two servers. 您最多可以使用 64 個節點。You can use as many as 64 nodes.

此圖顯示 Redmond 中的兩個節點,會使用 Bellevue 網站中相同叢集的兩個節點進行複寫

圖 1:延展式叢集中的存放裝置複寫FIGURE 1: Storage Replication in a stretch cluster

必要條件Prerequisites

  • Active Directory Domain Services 樹系 (不需要執行 Windows Server 2016)。Active Directory Domain Services forest (does not need to run Windows Server 2016).
  • 至少在兩部伺服器安裝 Windows Server 2016 Datacenter Edition。At least two servers with Windows Server 2016 Datacenter Edition installed. 最多可支援 64 個節點的叢集。Supports up to 64 node cluster.
  • 兩組共用的存放裝置,使用 SAS JBOD (例如搭配「儲存空間」)、光纖通道 SAN、共用 VHDX 或 iSCSI 目標。Two sets of shared storage, using SAS JBODs (such as with Storage Spaces), Fibre Channel SAN, Shared VHDX, or iSCSI Target. 存放裝置應包含 HDD 和 SSD 媒體的混合,且必須支援「持續保留」。The storage should contain a mix of HDD and SSD media and must support Persistent Reservation. 您要將每組存放裝置設定為只能供其中兩部伺服器使用 (非對稱)。You will make each storage set available to two of the servers only (asymmetric).
  • 每組存放裝置必須允許建立至少兩個虛擬磁碟,一個供複寫的資料使用,另一個供記錄檔使用。Each set of storage must allow creation of at least two virtual disks, one for replicated data and one for logs. 實體存放裝置的所有資料磁碟上,必須都要有相同的磁區大小。The physical storage must have the same sector sizes on all the data disks. 實體存放裝置的所有記錄檔磁碟上,必須都要有相同的磁區大小。The physical storage must have the same sector sizes on all the log disks.
  • 每部伺服器上至少要有一個 1GbE 連線,以進行同步複寫,但最好是 RDMA。At least one 1GbE connection on each server for synchronous replication, but preferably RDMA.
  • 每部伺服器至少要有 2 GB 的 RAM 和兩個核心。At least 2GB of RAM and two cores per server. 如需更多虛擬機器,您需要更多的記憶體和核心。You will need more memory and cores for more virtual machines.
  • 適當的防火牆與路由器規則,以允許在所有節點之間提供 ICMP、SMB (連接埠 445,若為 SMB 直接傳輸,需再加上 5445) 以及 WS-MAN (連接埠 5985) 雙向流量。Appropriate firewall and router rules to allow ICMP, SMB (port 445, plus 5445 for SMB Direct) and WS-MAN (port 5985) bi-directional traffic between all nodes.
  • 針對同步複寫,伺服器間的網路頻寬必須足以容納您的 IO 寫入工作負載,以及平均 =5ms 的來回延遲。A network between servers with enough bandwidth to contain your IO write workload and an average of =5ms round trip latency, for synchronous replication. 非同步複寫沒有建議的延遲值。Asynchronous replication does not have a latency recommendation.
  • 複寫的儲存體不可位於包含 Windows 作業系統資料夾的磁碟機上。The replicated storage cannot be located on the drive containing the Windows operating system folder.

這其中許多需求都可以使用 Test-SRTopology Cmdlet 來判斷。Many of these requirements can be determined by using the Test-SRTopology cmdlet. 如果您至少在一部伺服器上安裝儲存體複本或儲存體複本管理工具功能,便可存取此工具。You get access to this tool if you install Storage Replica or the Storage Replica Management Tools features on at least one server. 只要安裝此 Cmdlet 即可,不需要將儲存體複本設定為使用此工具。There is no need to configure Storage Replica to use this tool, only to install the cmdlet. 下列步驟中會包含詳細資訊。More information is included in the following steps.

佈建作業系統、功能、角色、儲存體及網路Provision operating system, features, roles, storage, and network

  1. 在所有伺服器節點上安裝 Windows Server 2016 Datacenter Edition。Install Windows Server 2016 Datacenter Edition on all server nodes. 請不要選擇標準版 (如果有的話),因為當中不包含儲存體複本。Do not choose Standard Edition if it is available, as it does not contain Storage Replica. 完全支援使用 Windows Server 桌面體驗、核心和 Nano 安裝模式。Use of Windows Server Desktop Experience, Core, and Nano installation modes are all supported.

    重要

    從此時開始,一律要以所有伺服器上內建系統管理員群組成員的網域使用者身分登入。From this point on, always logon as a domain user who is a member of the built-in administrator group on all servers. 請務必記住,在圖形化伺服器安裝或在 Windows 10 電腦上執行時,一開始要提升 PowerShell 和 CMD 命令提示字元的權限。Always remember to elevate your PowerShell and CMD prompts going forward when running on a graphical server installation or on a Windows 10 computer.

  2. 新增網路資訊並將節點加入網域,然後將它們重新啟動。Add network information and join the nodes to the domain, then restart them.

    注意

    此時,本指南假設您在延展式叢集中使用了兩對伺服器。As of this point, the guide presumes you have two pairings of servers for use in a stretch cluster. WAN 或 LAN 網路會分隔伺服器,而伺服器會隸屬於實體或邏輯網站。A WAN or LAN network separate the servers and the servers belong to either physical or logical sites. 本指南假設 SR-SRV01SR-SRV02 位於 Redmond 網站,而 SR-SRV03SR-SRV04 位於 Bellevue 網站。The guide considers SR-SRV01 and SR-SRV02 to be in site Redmond and SR-SRV03 and SR-SRV04 to be in site Bellevue.

  3. 將第一組共用 JBOD 存放裝置機箱、共用 VHDX、iSCSI 目標或 FC SAN 連接到 Redmond 網站中的伺服器。Connect the first set of shared JBOD storage enclosure, Shared VHDX, iSCSI target, or FC SAN to the servers in site Redmond.

  4. 將第二組存放裝置連接到 Bellevue 網站中的伺服器。Connect the second set of storage to the servers in site Bellevue.

  5. 視需要在四個節點上全部安裝最新的廠商存放裝置和機箱韌體與驅動程式、最新的廠商 HBA 驅動程式、最新的廠商 BIOS/UEFI 韌體、最新的廠商網路驅動程式,以及最新的主機板晶片組驅動程式。As appropriate, install latest vendor storage and enclosure firmware and drivers, latest vendor HBA drivers, latest vendor BIOS/UEFI firmware, latest vendor network drivers, and latest motherboard chipset drivers on all four nodes. 視需要重新啟動節點。Restart nodes as needed.

    注意

    如需設定共用儲存體和網路硬體,請參閱硬體廠商的文件。Consult your hardware vendor documentation for configuring shared storage and networking hardware.

  6. 確定伺服器的 BIOS/UEFI 設定能提供高效能,例如停用 C-State、設定 QPI 速度、啟用 NUMA,以及設定最高的記憶體頻率。Ensure that BIOS/UEFI settings for servers enable high performance, such as disabling C-State, setting QPI speed, enabling NUMA, and setting highest memory frequency. 務必將 Windows Server 中的電源管理設定為高效能。Ensure power management in Windows Server is set to high performance. 視需要重新啟動。Restart as required.

  7. 如下所示設定角色:Configure roles as follows:

    • 圖形化方法Graphical method

      執行 ServerManager.exe,然後按一下 [管理][新增伺服器] 來新增所有伺服器節點。Run ServerManager.exe and add all server nodes by clicking Manage and Add Servers.

      重要

      在每個節點上安裝 [容錯移轉叢集][儲存體複本] 角色和功能,然後將它們重新啟動。Install the Failover Clustering, and Storage Replica roles and features on each of the nodes and restart them. 如果計劃要使用像是 Hyper-V、檔案伺服器等其他角色,您也可以現在安裝它們。If planning to use other roles like Hyper-V, File Server, etc. you can install them now too.

    • 使用 Windows PowerShell 方法Using Windows PowerShell method

      SR-SRV04 或遠端管理電腦上,於 Windows PowerShell 主控台執行下列命令,為延展式叢集在這四個節點上安裝所需的功能與角色,並將它們重新啟動:On SR-SRV04 or a remote management computer, run the following command in a Windows PowerShell console to install the required features and roles for a stretch cluster on the four nodes and restart them:

      $Servers = 'SR-SRV01','SR-SRV02','SR-SRV03','SR-SRV04'  
      
      $Servers | foreach { Install-WindowsFeature -ComputerName $_ -Name Storage-Replica,Failover-Clustering,FS-FileServer -IncludeManagementTools -restart }  
      

      如需這些步驟的詳細資訊,請參閱安裝或解除安裝角色、角色服務或功能For more information on these steps, see Install or Uninstall Roles, Role Services, or Features.

  8. 如下所示設定儲存體:Configure storage as follows:

    重要

    • 您必須在每個機箱上建立兩個磁碟區︰一個供資料使用,而另一個供記錄檔使用。You must create two volumes on each enclosure: one for data and one for logs.
    • 記錄檔和資料磁碟必須初始化為 GPT,而非多位元率 (MBR)。Log and data disks must be initialized as GPT, not MBR.
    • 這兩個資料磁碟區的大小必須相同。The two data volumes must be of identical size.
    • 這兩個記錄檔磁碟區的大小應該相同。The two log volumes should be of identical size.
    • 所有複寫的資料磁碟都必須有相同的磁區大小。All replicated data disks must have the same sector sizes.
    • 所有記錄檔磁碟都必須有相同的磁區大小。All log disks must have the same sector sizes.
    • 記錄磁碟區應該使用快閃記憶儲存體和高效能復原設定。The log volumes should use flash-based storage and high performance resiliency settings. Microsoft 建議記錄檔儲存體應該要比資料儲存體更快。Microsoft recommends that the log storage be as faster than the data storage. 記錄檔磁碟區不得用於其他工作負載。Log volumes must never be used for other workloads.
    • 資料磁碟可以使用 HDD、SSD 或階層式組合,而且可以使用鏡像或同位空間,或是 RAID 1 或 10、RAID 5 或 RAID 50。The data disks can use HDD, SSD, or a tiered combination and can use either mirrored or parity spaces or RAID 1 or 10, or RAID 5 or RAID 50.
    • 記錄磁碟區預設必須至少有 9 GB,而且根據記錄需求,可以更大或更小。The log volume must be at least 9GB by default and can to be larger or smaller based on log requirements.
    • 磁碟區必須使用 NTFS 或 ReFS 格式化。The volumes must be formatted with NTFS or ReFS.
    • 檔案伺服器角色只有在操作 Test-SRTopology 時才需要,因為它會開啟必要的防火牆連接埠進行測試。The File Server role is only necessary for Test-SRTopology to operate, as it opens the necessary firewall ports for testing.
    • 對於 JBOD 機箱:For JBOD enclosures:

      1. 確定每組成對的伺服器節點只能看到該網站的存放裝置機箱 (亦即非對稱式存放裝置),同時已正確設定 SAS 連線。Ensure that each set of paired server nodes can see that site's storage enclosures only (i.e. asymmetric storage) and that the SAS connections are correctly configured.

      2. 遵循在獨立伺服器上部署儲存空間中提供的步驟 1-3,使用 Windows PowerShell 或伺服器管理員,使用儲存空間佈建儲存體。Provision the storage using Storage Spaces by following Steps 1-3 provided in the Deploy Storage Spaces on a Stand-Alone Server using Windows PowerShell or Server Manager.

    • 對於 iSCSI 儲存體:For iSCSI storage:

      1. 確定每組成對的伺服器節點只能看到該網站的存放裝置機箱 (亦即非對稱式存放裝置)。Ensure that each set of paired server nodes can see that site's storage enclosures only (i.e. asymmetric storage). 如果使用 iSCSI,您應該使用一張以上的網路介面卡。You should use more than one single network adapter if using iSCSI.

      2. 使用廠商的文件來佈建儲存體。Provision the storage using your vendor documentation. 如果使用 Windows iSCSI 目標,請參閱 iSCSI 目標區塊儲存體,作法If using Windows-based iSCSI Targeting, consult iSCSI Target Block Storage, How To.

    • 對於 FC SAN 存放裝置:For FC SAN storage:

      1. 確定每組成對的伺服器節點只能看到該網站的存放裝置機箱 (亦即非對稱式存放裝置),而您已將主機正確分區。Ensure that each set of paired server nodes can see that site's storage enclosures only (i.e. asymmetric storage) and that you have properly zoned the hosts.

      2. 使用廠商的文件來佈建儲存體。Provision the storage using your vendor documentation.

針對一般用途的叢集設定 Hyper-V 容錯移轉叢集或檔案伺服器Configure a Hyper-V Failover Cluster or a File Server for a General Use Cluster

設定伺服器節點之後,下一個步驟就是建立下列其中一種類型的叢集:After you setup your server nodes, the next step is to create one of the following types of clusters:

設定 Hyper-V 容錯移轉叢集 Configure a Hyper-V Failover Cluster

注意

如果您想要建立檔案伺服器叢集,而非 Hyper-V 叢集,請略過本節並移至設定適用於一般用途叢集的檔案伺服器一節。Skip this section and go to the Configure a file server for general use cluster section, if you want to create a file server cluster and not a Hyper-V cluster.

您現在將建立標準的容錯移轉叢集。You will now create a normal failover cluster. 完成設定、驗證及測試之後,您將會使用儲存體複本加以延展。After configuration, validation, and testing, you will stretch it using Storage Replica. 您可以直接在叢集節點上,或從包含 Windows Server 2016 RSAT 管理工具的遠端管理電腦,執行下列所有步驟。You can perform all of the steps below on the cluster nodes directly or from a remote management computer that contains the Windows Server 2016 RSAT management tools.

圖形化方法Graphical method

  1. 執行 cluadmin.mscRun cluadmin.msc.

  2. 驗證建議的叢集並分析結果,以確保您能繼續進行。Validate the proposed cluster and analyze the results to ensure you can continue.

    注意

    由於使用的是非對稱式存放裝置,您應該預期會在叢集驗證時發生存放裝置錯誤。You should expect storage errors from cluster validation, due to the use of asymmetric storage.

  3. 建立 Hyper-V 計算叢集。Create the Hyper-V compute cluster. 確定叢集名稱等於或少於 15 個字元。Ensure that the cluster name is 15 characters or fewer. 以下使用的範例是 SR-SRVCLUSThe example used below is SR-SRVCLUS.

  4. 設定檔案共用見證或雲端見證,以在發生網站遺失時提供仲裁。Configure a File Share Witness or Cloud Witness to provide quorum in the event of site loss.

    注意

    Windows Server 2016 現在包含雲端 (Azure) 見證選項。Windows Server 2016 now includes an option for Cloud (Azure)-based Witness. 您可以選擇此仲裁選項,而不是檔案共用見證。You can choose this quorum option instead of the file share witness.

    警告

    如需仲裁設定的詳細資訊,請參閱設定和管理 Windows Server 2012 容錯移轉叢集中的仲裁指南的見證設定For more information about quorum configuration, see the Configure and Manage the Quorum in a Windows Server 2012 Failover Cluster guide's Witness Configuration. 如需 Set-ClusterQuorum Cmdlet 的詳細資訊,請參閱 Set-ClusterQuorumFor more information on the Set-ClusterQuorum cmdlet, see Set-ClusterQuorum.

  5. 檢閱 Windows Server 2012 中 Hyper-V 叢集的網路建議,並確定您是以最佳方式設定叢集網路。Review Network Recommendations for a Hyper-V Cluster in Windows Server 2012 and ensure that you have optimally configured cluster networking.

  6. 在 Redmond 網站中,將一個磁碟新增到叢集 CSV。Add one disk in the Redmond site to the cluster CSV. 若要這樣做,在 [存放裝置] 區段的 [磁碟] 節點中,使用滑鼠右鍵按一下來源磁碟,然後按一下 [新增至叢集共用磁碟區]To do so, right click a source disk in the Disks node of the Storage section, and then click Add to Cluster Shared Volumes.

  7. 只遵循部署 Hyper-V 叢集指南的步驟 7-10,在 Redmond 網站中來建立測試虛擬機器,以確保叢集可在第一個測試網站中共用存放裝置的兩個節點內運作正常。Using the Deploy a Hyper-V Cluster guide, follow steps 7-10 within Redmond site to create a test virtual machine only to ensure the cluster is working normally within the two nodes sharing the storage in the first test site.

  8. 如果您要建立兩個節點延展叢集,必須先新增所有儲存體才能繼續進行。If you're creating a two-node stretch cluster, you must add all storage before continuing. 若要這樣做,在叢集節點上使用系統管理權限開啟 PowerShell 工作階段,並執行下列命令︰Get-ClusterAvailableDisk -All | Add-ClusterDiskTo do so, open a PowerShell session with administrative permissions on the cluster nodes, and run the following command: Get-ClusterAvailableDisk -All | Add-ClusterDisk.

    這是 Windows Server 2016 中內建的行為。This is by-design behavior in Windows Server 2016.

  9. 啟動 Windows PowerShell,然後使用 Test-SRTopology Cmdlet 來判斷您是否符合所有儲存體複本需求。Start Windows PowerShell and use the Test-SRTopology cmdlet to determine if you meet all the Storage Replica requirements.

    例如,若要驗證兩個建議的延展式叢集節點,其中每一個都有 D:E: 磁碟區,並且執行測試 30 分鐘:For example, to validate two of the proposed stretch cluster nodes that each have a D: and E: volume and run the test for 30 minutes:

    1. 將所有可用的存放裝置移至 SR-SRV01Move all available storage to SR-SRV01.
    2. 在容錯移轉叢集管理員的 [角色] 區段中,按一下 [建立空白角色]Click Create Empty Role in the Roles section of Failover Cluster Manager.
    3. 將線上存放裝置新增至名為 [新角色] 的空白角色。Add the online storage to that empty role named New Role.
    4. 將所有可用的存放裝置移至 SR-SRV03Move all available storage to SR-SRV03.
    5. 在容錯移轉叢集管理員的 [角色] 區段中,按一下 [建立空白角色]Click Create Empty Role in the Roles section of Failover Cluster Manager.
    6. 將空白的 [新角色 (2)] 移至 SR-SRV03Move the empty New Role (2) to SR-SRV03.
    7. 將線上存放裝置新增至名為 [新角色 (2)] 的空白角色。Add the online storage to that empty role named New Role (2).
    8. 現在您已利用磁碟機代號掛接了所有存放裝置,接著可以使用 Test-SRTopology 來評估叢集。Now you have mounted all your storage with drive letters, and can evaluate the cluster with Test-SRTopology.

      例如:For example:

       MD c:\temp  
      
       Test-SRTopology -SourceComputerName SR-SRV01 -SourceVolumeName D: -SourceLogVolumeName E: -DestinationComputerName SR-SRV03 -DestinationVolumeName D: -DestinationLogVolumeName E: -DurationInMinutes 30 -ResultPath c:\temp        
      

      重要

      在指定的來源磁碟區上,若評估期間使用的測試伺服器沒有任何寫入 IO 負載,請考慮新增工作負載,否則 Test-SRTopology 將不會產生有用的報告。When using a test server with no write IO load on the specified source volume during the evaluation period, consider adding a workload or it Test-SRTopology will not generate a useful report. 您應該使用和實際執行類似的工作負載來測試,才能看出實際的數字與建議的記錄檔大小。You should test with production-like workloads in order to see real numbers and recommended log sizes. 或者,只要在測試期間,將一些檔案複製到來源磁碟區,或下載並執行 DISKSPD 以產生寫入 IO 即可。Alternatively, simply copy some files into the source volume during the test or download and run DISKSPD to generate write IOs. 例如,會寫入 D: 磁碟區長達十分鐘的少量 IO 工作負載範例:For instance, a sample with a low write IO workload for ten minutes to the D: volume:
      Diskspd.exe -c1g -d600 -W5 -C5 -b4k -t2 -o2 -r -w5 -i100 d:\test.dat

  10. 檢查 TestSrTopologyReport-< 日期 >.html 報告,以確定您符合儲存體複本需求,並記下初始同步時間預測和記錄檔建議。Examine the TestSrTopologyReport-< date >.html report to ensure you meet the Storage Replica requirements and note the initial sync time prediction and log recommendations.

    此畫面顯示複寫報告

  11. 將磁碟回復成可用的存放裝置,並移除暫時的空白角色。Return the disks to Available Storage and remove the temporary empty roles.

  12. 一旦滿足之後,請移除測試虛擬機器。Once satisfied, remove the test virtual machine. 視需要將任何實際的測試虛擬機器新增到建議的來源節點,以進行進一步評估。Add any real test virtual machines needed for further evaluation to a proposed source node.

  13. 設定延展式叢集網站感知,如此一來,伺服器 SR-SRV01SR-SRV02 會位於 Redmond 網站,且 SR-SRV03SR-SRV04 會位於 Bellevue 網站,而 Redmond 是適用於來源存放裝置和 VM 之節點擁有權的慣用網站:Configure stretch cluster site awareness so that servers SR-SRV01 and SR-SRV02 are in site Redmond, SR-SRV03 and SR-SRV04 are in site Bellevue, and Redmond is preferred for node ownership of the source storage and VMs:

    New-ClusterFaultDomain -Name Seattle -Type Site -Description "Primary" -Location "Seattle Datacenter"  
    
    New-ClusterFaultDomain -Name Bellevue -Type Site -Description "Secondary" -Location "Bellevue Datacenter"  
    
    Set-ClusterFaultDomain -Name sr-srv01 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv02 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv03 -Parent Bellevue  
    Set-ClusterFaultDomain -Name sr-srv04 -Parent Bellevue  
    
    (Get-Cluster).PreferredSite="Seattle"
    

    注意

    沒有任何選項可以使用 Windows Server 2016 中的容錯移轉叢集管理員來設定網站感知。There is no option to configure site awareness using Failover Cluster Manager in Windows Server 2016.

  14. (選擇性) 設定叢集網路和 Active Directory,以進行更快速的 DNS 網站容錯移轉。(Optional) Configure cluster networking and Active Directory for faster DNS site failover. 您可以利用 Hyper-V 軟體定義的網路功能、延展的 VLAN、網路抽象裝置、降低的 DNS TTL,以及其他常見的技巧。You can utilize Hyper-V software defined networking, stretched VLANs, network abstraction devices, lowered DNS TTL, and other common techniques.

    如需詳細資訊,請參閱 Microsoft Ignite 工作階段:Stretching Failover Clusters and Using Storage Replica in Windows Server vNext (在 Windows Server vNext 中延展容錯移轉叢集和使用儲存體複本) 和 Enable Change Notifications between Sites - How and Why? (啟用網站之間的變更通知 - 方式與原因?) 部落格文章。For more information, review the Microsoft Ignite session: Stretching Failover Clusters and Using Storage Replica in Windows Server vNext and the Enable Change Notifications between Sites - How and Why? blog post.

  15. (選擇性) 設定 VM 復原能力,讓客體在節點失敗期間不會長時間暫停。(Optional) Configure VM resiliency so that guests do not pause for long during node failures. 相反地,在它們會在 10 秒內容錯移轉至新的複寫來源存放裝置。Instead, they failover to the new replication source storage within 10 seconds.

    (Get-Cluster).ResiliencyDefaultPeriod=10  
    

    注意

    Windows Server 2016 中的容錯移轉叢集管理員,沒有可供設定 VM 復原能力的選項。There is no option to configure VM resiliency using Failover Cluster Manager in Windows Server 2016.

Windows PowerShell 方法Windows PowerShell method

  1. 測試建議的叢集並分析結果,以確保您能繼續進行:Test the proposed cluster and analyze the results to ensure you can continue:

    Test-Cluster SR-SRV01, SR-SRV02, SR-SRV03, SR-SRV04  
    

    注意

    由於使用的是非對稱式存放裝置,您應該預期會在叢集驗證時發生存放裝置錯誤。You should expect storage errors from cluster validation, due to the use of asymmetric storage.

  2. 建立 Hyper-V 計算叢集 (您必須指定自己的靜態 IP 位址,而叢集將使用此位址)。Create the Hyper-V compute cluster (you must specify your own static IP address the cluster will use). 確定叢集名稱等於或少於 15 個字元:Ensure that the cluster name is 15 characters or fewer:

    New-Cluster -Name SR-SRVCLUS -Node SR-SRV01, SR-SRV02, SR-SRV03, SR-SRV04 -StaticAddress <your IP here>  
    
  3. 在指向共用 (裝載於網域控制站或一些其他獨立伺服器上) 的叢集中,設定檔案共用見證或雲端 (Azure) 見證。Configure a File Share Witness or Cloud (Azure) witness in the cluster that points to a share hosted on the domain controller or some other independent server. 例如:For example:

    Set-ClusterQuorum -FileShareWitness \\someserver\someshare  
    

    注意

    Windows Server 2016 現在包含雲端 (Azure) 見證選項。Windows Server 2016 now includes an option for Cloud (Azure)-based Witness. 您可以選擇此仲裁選項,而不是檔案共用見證。You can choose this quorum option instead of the file share witness.

    如需仲裁設定的詳細資訊,請參閱設定和管理 Windows Server 2012 容錯移轉叢集中的仲裁指南的見證設定For more information about quorum configuration, see the Configure and Manage the Quorum in a Windows Server 2012 Failover Cluster guide's Witness Configuration. 如需 Set-ClusterQuorum Cmdlet 的詳細資訊,請參閱 Set-ClusterQuorumFor more information on the Set-ClusterQuorum cmdlet, see Set-ClusterQuorum.

  4. 檢閱 Windows Server 2012 中 Hyper-V 叢集的網路建議,並確定您是以最佳方式設定叢集網路。Review Network Recommendations for a Hyper-V Cluster in Windows Server 2012 and ensure that you have optimally configured cluster networking.

  5. 如果您要建立兩個節點延展叢集,必須先新增所有儲存體才能繼續進行。If you're creating a two-node stretch cluster, you must add all storage before continuing. 若要這樣做,在叢集節點上使用系統管理權限開啟 PowerShell 工作階段,並執行下列命令︰Get-ClusterAvailableDisk -All | Add-ClusterDiskTo do so, open a PowerShell session with administrative permissions on the cluster nodes, and run the following command: Get-ClusterAvailableDisk -All | Add-ClusterDisk.

    這是 Windows Server 2016 中內建的行為。This is by-design behavior in Windows Server 2016.

  6. 只遵循部署 Hyper-V 叢集指南的步驟 7-10,在 Redmond 網站中來建立測試虛擬機器,以確保叢集可在第一個測試網站中共用存放裝置的兩個節點內運作正常。Using the Deploy a Hyper-V Cluster guide, follow steps 7-10 within Redmond site to create a test virtual machine only to ensure the cluster is working normally within the two nodes sharing the storage in the first test site.

  7. 一旦滿足之後,請移除測試 VM。Once satisfied, remove the test VM. 視需要將任何實際的測試虛擬機器新增到建議的來源節點,以進行進一步評估。Add any real test virtual machines needed for further evaluation to a proposed source node.

  8. 設定延展式叢集網站感知,如此一來,伺服器 SR-SRV01SR-SRV02 會位於 Redmond 網站,且 SR-SRV03SR-SRV04 會位於 Bellevue 網站,而 Redmond 是適用於來源存放裝置和虛擬機器之節點擁有權的慣用網站:Configure stretch cluster site awareness so that servers SR-SRV01 and SR-SRV02 are in site Redmond, SR-SRV03 and SR-SRV04 are in site Bellevue, and Redmond is preferred for node ownership of the source storage and virtual machines:

    New-ClusterFaultDomain -Name Seattle -Type Site -Description "Primary" -Location "Seattle Datacenter"  
    
    New-ClusterFaultDomain -Name Bellevue -Type Site -Description "Secondary" -Location "Bellevue Datacenter"  
    
    Set-ClusterFaultDomain -Name sr-srv01 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv02 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv03 -Parent Bellevue  
    Set-ClusterFaultDomain -Name sr-srv04 -Parent Bellevue  
    
    (Get-Cluster).PreferredSite="Seattle"  
    
  9. (選擇性) 設定叢集網路和 Active Directory,以進行更快速的 DNS 網站容錯移轉。(Optional) Configure cluster networking and Active Directory for faster DNS site failover. 您可以利用 Hyper-V 軟體定義的網路功能、延展的 VLAN、網路抽象裝置、降低的 DNS TTL,以及其他常見的技巧。You can utilize Hyper-V software defined networking, stretched VLANs, network abstraction devices, lowered DNS TTL, and other common techniques.

    如需詳細資訊,請參閱 Microsoft Ignite 工作階段:Stretching Failover Clusters and Using Storage Replica in Windows Server vNext (在 Windows Server vNext 中延展容錯移轉叢集和使用儲存體複本) 和 Enable Change Notifications between Sites - How and Why (啟用網站之間的變更通知 - 方式與原因)。For more information, review the Microsoft Ignite session: Stretching Failover Clusters and Using Storage Replica in Windows Server vNext and Enable Change Notifications between Sites - How and Why.

  10. (選擇性) 設定 VM 復原能力,讓來賓不會因為長期處於節點失敗而暫停。(Optional) Configure VM resiliency so that guests do not pause for long periods during node failures. 相反地,在它們會在 10 秒內容錯移轉至新的複寫來源存放裝置。Instead, they failover to the new replication source storage within 10 seconds.

    (Get-Cluster).ResiliencyDefaultPeriod=10  
    

    注意

    Windows Server 2016 中的容錯移轉叢集管理員,沒有 VM 復原能力的選項。There is no option to VM Resiliency using Failover Cluster Manager in Windows Server 2016.

設定適用於一般用途叢集的檔案伺服器 Configure a File Server for General Use Cluster

注意

如果您已經設定 Hyper-V 容錯移轉叢集 (如設定 Hyper-V 容錯移轉叢集中所述),請略過本節。Skip this section if you have already configured a Hyper-V Failover cluster as described in Configure a Hyper-V Failover Cluster.

您現在將建立標準的容錯移轉叢集。You will now create a normal failover cluster. 完成設定、驗證及測試之後,您將會使用儲存體複本加以延展。After configuration, validation, and testing, you will stretch it using Storage Replica. 您可以直接在叢集節點上,或從包含 Windows Server 2016 RSAT 管理工具的遠端管理電腦,執行下列所有步驟。You can perform all of the steps below on the cluster nodes directly or from a remote management computer that contains the Windows Server 2016 RSAT management tools.

圖形化方法Graphical method

  1. 執行 cluadmin.msc。Run cluadmin.msc.

  2. 驗證建議的叢集並分析結果,以確保您能繼續進行。Validate the proposed cluster and analyze the results to ensure you can continue.

    注意

    由於使用的是非對稱式存放裝置,您應該預期會在叢集驗證時發生存放裝置錯誤。You should expect storage errors from cluster validation, due to the use of asymmetric storage.

  3. 建立適用於一般用途存放裝置叢集的檔案伺服器。Create the File Server for General Use storage cluster. 確定叢集名稱等於或少於 15 個字元。Ensure that the cluster name is 15 characters or fewer. 以下使用的範例是 SR-SRVCLUS。The example used below is SR-SRVCLUS.

  4. 設定檔案共用見證或雲端見證,以在發生網站遺失時提供仲裁。Configure a File Share Witness or Cloud Witness to provide quorum in the event of site loss.

    注意

    Windows Server 2016 現在包含雲端 (Azure) 見證選項。Windows Server 2016 now includes an option for Cloud (Azure)-based Witness. 您可以選擇此仲裁選項,而不是檔案共用見證。You can choose this quorum option instead of the file share witness.

    注意

    如需仲裁設定的詳細資訊,請參閱設定和管理 Windows Server 2012 容錯移轉叢集中的仲裁指南的見證設定For more information about quorum configuration, see the Configure and Manage the Quorum in a Windows Server 2012 Failover Cluster guide's Witness Configuration. 如需 Set-ClusterQuorum Cmdlet 的詳細資訊,請參閱 Set-ClusterQuorumFor more information on the Set-ClusterQuorum cmdlet, see Set-ClusterQuorum.

  5. 如果您要建立兩個節點延展叢集,必須先新增所有儲存體才能繼續進行。If you're creating a two-node stretch cluster, you must add all storage before continuing. 若要這樣做,在叢集節點上使用系統管理權限開啟 PowerShell 工作階段,並執行下列命令︰Get-ClusterAvailableDisk -All | Add-ClusterDiskTo do so, open a PowerShell session with administrative permissions on the cluster nodes, and run the following command: Get-ClusterAvailableDisk -All | Add-ClusterDisk.

    這是 Windows Server 2016 中內建的行為。This is by-design behavior in Windows Server 2016.

  6. 請確定您是以最佳方式設定叢集網路。Ensure that you have optimally configured cluster networking.

    注意

    繼續進行下一個步驟之前,必須先在所有節點上安裝檔案伺服器角色。The File Server role must be installed on all nodes prior to continuing to the next step. |

  7. [角色] 中,按一下 [設定角色]Under Roles, click Configure Role. 檢閱 [在您開始前],然後按 [下一步]Review Before you Begin and click Next.

  8. 選取 [檔案伺服器],然後按 [下一步]Select File Server and click Next.

  9. 保留選取 [一般用途的檔案伺服器],然後按 [下一步]Leave File Server for general use selected and click Next.

  10. [用戶端存取點] 命名 (15 個字元或更少),然後按 [下一步]Provide a Client Access Point name (15 characters or fewer) and click Next.

  11. 選取磁碟做為您的資料磁碟區,然後按 [下一步]Select a disk to be your data volume and click Next.

  12. 檢閱您的設定,然後按 [下一步]Review your settings and click Next. 按一下 [完成]Click Finish.

  13. 在新的檔案伺服器角色上按滑鼠右鍵,再按一下 [新增檔案共用]Right click your new File Server role and click Add File Share. 繼續執行精靈以設定共用。Proceed through the wizard to configure shares.

  14. 選擇性︰新增其他會在此網站中使用另一個存放裝置的檔案伺服器角色。Optional: Add another File Server role that uses the other storage in this site.

  15. 設定延展式叢集網站感知,如此一來,伺服器 SR-SRV01 和 SR-SRV02 會位於 Redmond 網站,且 SR-SRV03 和 SR-SRV04 會位於 Bellevue 網站,而 Redmond 是適用於來源存放裝置和 VM 之節點擁有權的慣用網站:Configure stretch cluster site awareness so that servers SR-SRV01 and SR-SRV02 are in site Redmond, SR-SRV03 and SR-SRV04 are in site Bellevue, and Redmond is preferred for node ownership of the source storage and VMs:

    New-ClusterFaultDomain -Name Seattle -Type Site -Description "Primary" -Location "Seattle Datacenter"  
    
    New-ClusterFaultDomain -Name Bellevue -Type Site -Description "Secondary" -Location "Bellevue Datacenter"  
    
    Set-ClusterFaultDomain -Name sr-srv01 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv02 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv03 -Parent Bellevue  
    Set-ClusterFaultDomain -Name sr-srv04 -Parent Bellevue  
    
    (Get-Cluster).PreferredSite="Seattle"  
    

    注意

    沒有任何選項可以使用 Windows Server 2016 中的容錯移轉叢集管理員來設定網站感知。There is no option to configure site awareness using Failover Cluster Manager in Windows Server 2016.

  16. (選擇性) 設定叢集網路和 Active Directory,以進行更快速的 DNS 網站容錯移轉。(Optional) Configure cluster networking and Active Directory for faster DNS site failover. 您可以利用延展的 VLAN、網路抽象裝置、降低的 DNS TTL,以及其他常見的技巧。You can utilize stretched VLANs, network abstraction devices, lowered DNS TTL, and other common techniques.

    如需詳細資訊,請參閱 Microsoft Ignite 工作階段:Stretching Failover Clusters and Using Storage Replica in Windows Server vNext (在 Windows Server vNext 中延展容錯移轉叢集和使用儲存體複本) 和部落格文章:Enable Change Notifications between Sites - How and Why (啟用網站之間的變更通知 - 方式與原因)。For more information, review the Microsoft Ignite session Stretching Failover Clusters and Using Storage Replica in Windows Server vNext and the blog post Enable Change Notifications between Sites - How and Why.

PowerShell 方法PowerShell Method

  1. 測試建議的叢集並分析結果,以確保您能繼續進行:Test the proposed cluster and analyze the results to ensure you can continue:

     Test-Cluster SR-SRV01, SR-SRV02, SR-SRV03, SR-SRV04  
    

    注意

    由於使用的是非對稱式存放裝置,您應該預期會在叢集驗證時發生存放裝置錯誤。You should expect storage errors from cluster validation, due to the use of asymmetric storage.

  2. 建立 Hyper-V 計算叢集 (您必須指定自己的靜態 IP 位址,而叢集將使用此位址)。Create the Hyper-V compute cluster (you must specify your own static IP address the cluster will use). 確定叢集名稱等於或少於 15 個字元:Ensure that the cluster name is 15 characters or fewer:

    New-Cluster -Name SR-SRVCLUS -Node SR-SRV01, SR-SRV02, SR-SRV03, SR-SRV04 -StaticAddress <your IP here>  
    
  3. 在指向共用 (裝載於網域控制站或一些其他獨立伺服器上) 的叢集中,設定檔案共用見證或雲端 (Azure) 見證。Configure a File Share Witness or Cloud (Azure) witness in the cluster that points to a share hosted on the domain controller or some other independent server. 例如:For example:

    Set-ClusterQuorum -FileShareWitness \\someserver\someshare  
    

    注意

    Windows Server 2016 現在包含雲端 (Azure) 見證選項。Windows Server 2016 now includes an option for Cloud (Azure)-based Witness. 您可以選擇此仲裁選項,而不是檔案共用見證。You can choose this quorum option instead of the file share witness.

    如需仲裁設定的詳細資訊,請參閱設定和管理 Windows Server 2012 容錯移轉叢集中的仲裁指南的見證設定For more information about quorum configuration, see the Configure and Manage the Quorum in a Windows Server 2012 Failover Cluster guide's Witness Configuration. 如需 Set-ClusterQuorum Cmdlet 的詳細資訊,請參閱 Set-ClusterQuorumFor more information on the Set-ClusterQuorum cmdlet, see Set-ClusterQuorum.

  4. 如果您要建立兩個節點延展叢集,必須先新增所有儲存體才能繼續進行。If you're creating a two-node stretch cluster, you must add all storage before continuing. 若要這樣做,在叢集節點上使用系統管理權限開啟 PowerShell 工作階段,並執行下列命令︰Get-ClusterAvailableDisk -All | Add-ClusterDiskTo do so, open a PowerShell session with administrative permissions on the cluster nodes, and run the following command: Get-ClusterAvailableDisk -All | Add-ClusterDisk.

    這是 Windows Server 2016 中內建的行為。This is by-design behavior in Windows Server 2016.

  5. 請確定您是以最佳方式設定叢集網路。Ensure that you have optimally configured cluster networking.

  6. 設定檔案伺服器角色。Configure a File Server role. 例如:For example:

    Get-ClusterResource  
    Add-ClusterFileServerRole -Name SR-CLU-FS2 -Storage "Cluster Disk 4"  
    
    MD e:\share01  
    
    New-SmbShare -Name Share01 -Path f:\share01 -ContinuouslyAvailable $false  
    
    1. 設定延展式叢集網站感知,如此一來,伺服器 SR-SRV01 和 SR-SRV02 會位於 Redmond 網站,且 SR-SRV03 和 SR-SRV04 會位於 Bellevue 網站,而 Redmond 是適用於來源存放裝置和虛擬機器之節點擁有權的慣用網站:Configure stretch cluster site awareness so that servers SR-SRV01 and SR-SRV02 are in site Redmond, SR-SRV03 and SR-SRV04 are in site Bellevue, and Redmond is preferred for node ownership of the source storage and virtual machines:
    New-ClusterFaultDomain -Name Seattle -Type Site -Description "Primary" -Location "Seattle Datacenter"  
    
    New-ClusterFaultDomain -Name Bellevue -Type Site -Description "Secondary" -Location "Bellevue Datacenter"  
    
    Set-ClusterFaultDomain -Name sr-srv01 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv02 -Parent Seattle  
    Set-ClusterFaultDomain -Name sr-srv03 -Parent Bellevue  
    Set-ClusterFaultDomain -Name sr-srv04 -Parent Bellevue  
    
    (Get-Cluster).PreferredSite="Seattle"  
    
  7. (選擇性) 設定叢集網路和 Active Directory,以進行更快速的 DNS 網站容錯移轉。(Optional) Configure cluster networking and Active Directory for faster DNS site failover. 您可以利用延展的 VLAN、網路抽象裝置、降低的 DNS TTL,以及其他常見的技巧。You can utilize stretched VLANs, network abstraction devices, lowered DNS TTL, and other common techniques.

    如需詳細資訊,請參閱 Microsoft Ignite 工作階段:Stretching Failover Clusters and Using Storage Replica in Windows Server vNext (在 Windows Server vNext 中延展容錯移轉叢集和使用儲存體複本) 和部落格文章:Enable Change Notifications between Sites - How and Why (啟用網站之間的變更通知 - 方式與原因)。For more information, review the Microsoft Ignite session Stretching Failover Clusters and Using Storage Replica in Windows Server vNext and the blog post Enable Change Notifications between Sites - How and Why.

設定延展式叢集Configure a stretch cluster

現在您將使用容錯移轉叢集管理員或 Windows PowerShell,來設定延展式叢集。Now you will configure the stretch cluster, using either Failover Cluster Manager or Windows PowerShell. 您可以直接在叢集節點上,或從包含 Windows Server 2016 RSAT 管理工具的遠端管理電腦,執行下列所有步驟。You can perform all of the steps below on the cluster nodes directly or from a remote management computer that contains the Windows Server 2016 RSAT management tools.

容錯移轉叢集管理員方法Failover Cluster Manager Method

  1. 對於 Hyper-V 工作負載,在某一個您想要複寫出資料的節點上,從您的可用磁碟將來源資料磁碟新增至叢集共用磁碟區 (如果尚未設定)。For Hyper-V workloads, on one node where you have the data you wish to replicate out, add the source data disk from your available disks to cluster shared volumes if not already configured. 請勿新增所有磁碟;只要新增單一磁碟。Do not add all the disks; just add the single disk. 此時,有一半的磁碟將會顯示離線,因為這是非對稱式存放裝置。At this point, half the disks will show offline because this is asymmetric storage.
    如果複寫實體磁碟資源 (PDR) 工作負載類似一般用途的檔案伺服器,您就已經備妥角色連接的磁碟。If replicating a physical disk resource (PDR) workload like File Server for general use, you already have a role-attached disk ready to go.

    此畫面顯示容錯移轉叢集管理員

  2. 在 CSV 磁碟或角色連接的磁碟上按滑鼠右鍵、按一下 [複寫],然後按一下 [啟用]Right-click the CSV disk or role-attached disk, click Replication, and then click Enable.

  3. 選取適當的目的地資料磁碟區,然後按 [下一步]Select the appropriate destination data volume and click Next. 顯示的目的地磁碟將擁有大小與所選取來源磁碟相同的磁碟區。The destination disks shown will have a volume the same size as the selected source disk. 在這些精靈對話方塊之間移動時,可用的存放裝置將會自動移動,並視需要在背景上線。When moving between these wizard dialogs, the available storage will automatically move and come online in the background as needed.

    此畫面顯示 [設定存放裝置複本] 精靈的 [選取目的地磁碟] 頁面

  4. 選取適當的來源記錄磁碟,然後按 [下一步]Select the appropriate source log disk and click Next. 來源記錄磁碟區必須是在使用 SSD 或同樣快速媒體的磁碟上,而不是轉盤式磁碟。The source log volume should be on a disk that uses SSD or similarly fast media, not spinning disks.

  5. 選取適當的目的地記錄檔磁碟區,然後按 [下一步]。Select the appropriate destination log volume and click Next. 顯示的目的地記錄磁碟將擁有大小與所選來源記錄磁碟區相同的磁碟區。The destination log disks shown will have a volume the same size as the selected source log disk volume.

  6. 如果目的地磁碟區不包含先前來自來源伺服器的資料複本,請保留 [覆寫目的地磁碟區] 上的 [覆寫磁碟區] 值。Leave the Overwrite Volume value at Overwrite destination Volume if the destination volume does not contain a previous copy of the data from the source server. 如果目的地包含來自最新備份或先前複寫的類似資料,選取 [已植入資料的目的地磁碟],然後按 [下一步]If the destination does contain similar data, from a recent backup or previous replication, select Seeded destination disk, and then click Next.

  7. 如果您不打算使用 RPO 複寫,請保留 [同步複寫] 上的 [複寫模式] 值。Leave the Replication Mode value at Synchronous Replication if you plan to use zero RPO replication. 如果您想要透過較高延遲的網路來延展叢集,或在主要網站節點上需要較低的 IO 延遲,請將它變更為 [非同步複寫]Change it to Asynchronous Replication if you plan to stretch your cluster over higher latency networks or need lower IO latency on the primary site nodes.

  8. 如果您不打算稍後搭配複寫群組中的其他磁碟配對來使用寫入順序,請保留 [最高效能] 上的 [一致性群組] 值。Leave the Consistency Group value at Highest Performance if you do not plan to use write ordering later with additional disk pairs in the replication group. 如果您打算進一步將磁碟新增到此複寫群組,而且您需要保證寫入順序,選取 [啟用寫入順序],然後按 [下一步]If you plan to add further disks to this replication group and you require guaranteed write ordering, select Enable Write Ordering, and then click Next.

  9. [下一步] 以設定複寫和延展性叢集資訊。Click Next to configure replication and the stretch cluster formation.

    此畫面顯示 [設定存放裝置複本] 精靈的 [選取確認] 頁面

  10. 在 [摘要] 畫面中,記下完成的對話方塊結果。On the Summary screen, note the completion dialog results. 您可以在 Web 瀏覽器中檢視此報告。You can view the report in a web browser.

  11. 此時,您已經在這兩半的叢集之間設定了儲存體複本關聯性,但複寫正在進行中。At this point, you have configured a Storage Replica partnership between the two halves of the cluster but replication is ongoing. 有數種方式可以透過圖形化工具來檢視複寫的狀態。There are several ways to see the state of replication via a graphical tool.

    1. 使用 [複寫角色] 欄和 [複寫] 索引標籤。完成初始同步時,來源和目的地磁碟的複寫狀態都必須是 [持續複寫中]Use the Replication Role column and the Replication tab. When done with initial synchronization, the source and destination disks will have a Replication Status of Continuously Replicating.

      此畫面顯示容錯移轉叢集管理員中磁碟的 [複寫] 索引標籤

    2. 啟動 eventvwr.exeStart eventvwr.exe.

      1. 在來源伺服器上,瀏覽至 應用程式和服務 \ Microsoft \ Windows \ StorageReplica \ 系統管理,然後檢查事件5015、5002、5004、1237、5001 及 2200。On the source server, navigate to Applications and Services \ Microsoft \ Windows \ StorageReplica \ Admin and examine events 5015, 5002, 5004, 1237, 5001, and 2200.

      2. 在目的地伺服器上,瀏覽至 應用程式和服務 \ Microsoft \ Windows \ StorageReplica \ 操作,然後等候事件 1215。On the destination server, navigate to Applications and Services \ Microsoft \ Windows \ StorageReplica \ Operational and wait for event 1215. 此事件會說明已複製的位元組數目和所花費的時間。This event states the number of copied bytes and the time taken. 範例:Example:

        Log Name:      Microsoft-Windows-StorageReplica/Operational  
        Source:        Microsoft-Windows-StorageReplica  
        Date:          4/6/2016 4:52:23 PM  
        Event ID:      1215  
        Task Category: (1)  
        Level:         Information  
        Keywords:      (1)  
        User:          SYSTEM  
        Computer:      SR-SRV03.Threshold.nttest.microsoft.com  
        Description:  
        Block copy completed for replica.  
        
        ReplicationGroupName: Replication 2  
        ReplicationGroupId: {c6683340-0eea-4abc-ab95-c7d0026bc054}  
        ReplicaName: \\?\Volume{43a5aa94-317f-47cb-a335-2a5d543ad536}\  
        ReplicaId: {00000000-0000-0000-0000-000000000000}  
        End LSN in bitmap:   
        LogGeneration: {00000000-0000-0000-0000-000000000000}  
        LogFileId: 0  
        CLSFLsn: 0xFFFFFFFF  
        Number of Bytes Recovered: 68583161856  
        Elapsed Time (ms): 140  
        
      3. 在目的地伺服器上,瀏覽至 應用程式和服務 \ Microsoft \ Windows \ StorageReplica \ 系統管理,然後檢查事件 5009、1237、5001、5015、5005 及 2200,以了解處理進度。On the destination server, navigate to Applications and Services \ Microsoft \ Windows \ StorageReplica \ Admin and examine events 5009, 1237, 5001, 5015, 5005, and 2200 to understand the processing progress. 此序列中應該不會有任何錯誤警告。There should be no warnings of errors in this sequence. 其中將會有許多指出進度的 1237 事件。There will be many 1237 events; these indicate progress.

        警告

        在初始同步完成之前,CPU 和記憶體使用量很可能會超過正常情況。CPU and memory usage are likely to be higher than normal until initial synchronization completes.

Windows PowerShell 方法Windows PowerShell method

  1. 確定您是以提升權限的系統管理員帳戶來執行 Powershell 主控台。Ensure your Powershell console is running with an elevated administrator account.
  2. 只能將來源資料存放裝置新增至叢集以做為 CSV。Add the source data storage only to the cluster as CSV. 若要取得可用磁碟的大小、磁碟分割及磁碟區配置,請使用下列命令:To get the size, partition, and volume layout of the available disks, use the following commands:

    Move-ClusterGroup -Name "available storage" -Node sr-srv01  
    
    $DiskResources = Get-ClusterResource | Where-Object { $_.ResourceType -eq 'Physical Disk' -and $_.State -eq 'Online' }  
    $DiskResources | foreach {  
        $resource = $_  
        $DiskGuidValue = $resource | Get-ClusterParameter DiskIdGuid  
    
        Get-Disk | where { $_.Guid -eq $DiskGuidValue.Value } | Get-Partition | Get-Volume |  
            Select @{N="Name"; E={$resource.Name}}, @{N="Status"; E={$resource.State}}, DriveLetter, FileSystemLabel, Size, SizeRemaining  
    } | FT -AutoSize  
    
    Move-ClusterGroup -Name "available storage" -Node sr-srv03  
    
    $DiskResources = Get-ClusterResource | Where-Object { $_.ResourceType -eq 'Physical Disk' -and $_.State -eq 'Online' }  
    $DiskResources | foreach {  
        $resource = $_  
        $DiskGuidValue = $resource | Get-ClusterParameter DiskIdGuid  
    
        Get-Disk | where { $_.Guid -eq $DiskGuidValue.Value } | Get-Partition | Get-Volume |  
            Select @{N="Name"; E={$resource.Name}}, @{N="Status"; E={$resource.State}}, DriveLetter, FileSystemLabel, Size, SizeRemaining  
    } | FT -AutoSize  
    
  3. 使用下列方式,將正確的磁碟設定為 CSV:Set the correct disk to CSV with:

    Add-ClusterSharedVolume -Name "Cluster Disk 4"  
    Get-ClusterSharedVolume  
    Move-ClusterSharedVolume -Name "Cluster Disk 4" -Node sr-srv01  
    
  4. 設定延展式叢集,指定下列內容:Configure the stretch cluster, specifying the following:

    • 來源和目的地節點 (其中的來源資料是 CSV 磁碟,但所有其他磁碟都不是)。Source and destination nodes (where the source data is a CSV disk and all other disks are not).

    • 來源和目的地複寫群組名稱。Source and Destination replication group names.

    • 來源和目的地磁碟,其中的磁碟分割大小會相符。Source and destination disks, where the partition sizes match.

    • 來源和目的地記錄磁碟區,其中沒有足夠的可用空間來容納這兩個磁碟上的記錄檔大小,而此存放裝置是 SSD 或同樣快速的媒體。Source and destination log volumes, where there is enough free space to contain the log size on both disks and the storage is SSD or similar fast media.

    • 來源和目的地記錄磁碟區,其中沒有足夠的可用空間來容納這兩個磁碟上的記錄檔大小,而此存放裝置是 SSD 或同樣快速的媒體。Source and destination log volumes, where there is enough free space to contain the log size on both disks and the storage is SSD or similar fast media.

    • 記錄檔大小。Log size.

    • 來源記錄磁碟區必須是在使用 SSD 或同樣快速媒體的磁碟上,而不是轉盤式磁碟。The source log volume should be on a disk that uses SSD or similarly fast media, not spinning disks.

    New-SRPartnership -SourceComputerName sr-srv01 -SourceRGName rg01 -SourceVolumeName "C:\ClusterStorage\Volume1" -SourceLogVolumeName e: -DestinationComputerName sr-srv03 -DestinationRGName rg02 -DestinationVolumeName d: -DestinationLogVolumeName e:  
    

    注意

    您也可以在每個網站的某一個節點上使用 New-SRGroupNew-SRPartnership,分階段建立複寫,而不是一次建立全部。You can also use New-SRGroup on one node in each site and New-SRPartnership to create replication in stages, rather than all at once.

  5. 判斷複寫進度。Determine the replication progress.

    1. 在來源伺服器上,執行下列命令,並檢查 5015、5002、5004、1237、5001 及 2200 事件︰On the source server, run the following command and examine events 5015, 5002, 5004, 1237, 5001, and 2200:

      Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica -max 20  
      
    2. 在目的地伺服器上,執行下列命令來查看可顯示建立合作關係的儲存體複本事件。On the destination server, run the following command to see the Storage Replica events that show creation of the partnership. 此事件會說明已複製的位元組數目和所花費的時間。This event states the number of copied bytes and the time taken. 範例:Example:

      Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica | Where-Object {$_.ID -eq "1215"} | fl  
      
      TimeCreated  : 4/6/2016 4:52:23 PM  
      ProviderName : Microsoft-Windows-StorageReplica  
      Id           : 1215  
      Message      : Block copy completed for replica.  
      
         ReplicationGroupName: Replication 2  
         ReplicationGroupId: {c6683340-0eea-4abc-ab95-c7d0026bc054}  
         ReplicaName: ?Volume{43a5aa94-317f-47cb-a335-2a5d543ad536}  
         ReplicaId: {00000000-0000-0000-0000-000000000000}  
         End LSN in bitmap:   
         LogGeneration: {00000000-0000-0000-0000-000000000000}  
         LogFileId: 0  
         CLSFLsn: 0xFFFFFFFF  
         Number of Bytes Recovered: 68583161856  
         Elapsed Time (ms): 140  
      
    3. 在目的地伺服器上,執行下列命令,並檢查 5009、1237、5001、5015、5005 及 2200 事件,以了解處理進度。On the destination server, run the following command and examine events 5009, 1237, 5001, 5015, 5005, and 2200 to understand the processing progress. 此序列中應該不會有任何錯誤警告。There should be no warnings of errors in this sequence. 其中將會有許多指出進度的 1237 事件。There will be many 1237 events; these indicate progress.

      Get-WinEvent -ProviderName Microsoft-Windows-StorageReplica | FL  
      
    4. 或者,複本的目的地伺服器群組會隨時說明待複製的位元組數目,並可透過 PowerShell 進行查詢。Alternately, the destination server group for the replica states the number of byte remaining to copy at all times, and can be queried through PowerShell. 例如:For example:

      (Get-SRGroup).Replicas | Select-Object numofbytesremaining  
      

      和進度範例 (將不會終止) 一樣:As a progress sample (that will not terminate):

      while($true) {  
      
       $v = (Get-SRGroup -Name "Replication 2").replicas | Select-Object numofbytesremaining  
       [System.Console]::Write("Number of bytes remaining: {0}`r", $v.numofbytesremaining)  
       Start-Sleep -s 5  
      }  
      
  6. 若要在延展式叢集內取得複寫來源和目的地狀態,使用 Get-SRGroupGet-SRPartnership 來查看延展式叢集中複寫的設定狀態。To get replication source and destination state within the stretch cluster, use Get-SRGroup and Get-SRPartnership to see the configured state of replication in the stretch cluster.

    Get-SRGroup  
    Get-SRPartnership  
    (Get-SRGroup).replicas  
    

管理延展式叢集複寫Manage stretched cluster replication

現在您將要管理與操作延展式叢集。Now you will manage and operate your stretch cluster. 您可以直接在叢集節點上,或從包含 Windows Server 2016 RSAT 管理工具的遠端管理電腦,執行下列所有步驟。You can perform all of the steps below on the cluster nodes directly or from a remote management computer that contains the Windows Server 2016 RSAT management tools.

圖形化工具方法Graphical Tools Method

  1. 使用容錯移轉叢集管理員,來判斷目前的複寫來源與目的地及其狀態。Use Failover Cluster Manager to determine the current source and destination of replication and their status.

  2. 若要測量複寫效能,請在來源和目的地節點上執行 Perfmon.exeTo measure replication performance, run Perfmon.exe on both the source and destination nodes.

    1. 在目的地節點上:On the destination node:

      1. 針對資料磁碟區新增儲存體複本統計資料物件及其效能計數器。Add the Storage Replica Statistics objects with all their performance counters for the data volume.

      2. 檢查結果。Examine the results.

    2. 在來源節點上:On the source node:

      1. 針對資料磁碟區新增儲存體複本統計資料儲存體複本磁碟分割 I/O 統計資料物件及其所有的效能計數器 (後者只適用於目前來源伺服器上的資料)。Add the Storage Replica Statistics and Storage Replica Partition I/O Statistics objects with all their performance counters for the data volume (the latter is only available with data on the current source server).

      2. 檢查結果。Examine the results.

  3. 若要改變延展式叢集內的複寫來源和目的地,請使用下列方法:To alter replication source and destination within the stretch cluster, use the following methods:

    1. 若要在相同網站的節點之間移動來源複寫︰在來源 CSV 上按滑鼠右鍵、按一下 [移動存放裝置]、按一下 [選取節點],然後選取同一個網站中的節點。To move the source replication between nodes in the same site: right-click the source CSV, click Move Storage, click Select Node, and then select a node in the same site. 如果針對已指派角色的磁碟使用非 CSV 的存放裝置,您就要移動該角色。If using non-CSV storage for a role assigned disk, you move the role.

    2. 若要將來源複寫從某一個網站移至另一個網站︰在來源 CSV 上按滑鼠右鍵、按一下 [移動存放裝置]、按一下 [選取節點],然後選取另一個網站中的節點。To move the source replication from one site to another: right-click the source CSV, click Move Storage, click Select Node, and then select a node in another site. 如果您設定了慣用的網站,就可以使用最可能的節點,一律將來源存放裝置移至慣用網站中的節點。If you configured a preferred site, you can use best possible node to always move the source storage to a node in the preferred site. 如果針對已指派角色的磁碟使用非 CSV 的存放裝置,您就要移動該角色。If using non-CSV storage for a role assigned disk, you move the role.

    3. 若要執行計劃的容錯移轉且複寫方向是從某一個網站到另一個網站:在某一個網站中,使用 ServerManager.exeSConfig 同時關閉這兩個節點。To perform planned failover the replication direction from one site to another: shutdown both nodes in one site using ServerManager.exe or SConfig.

    4. 若要執行非計劃的容錯移轉且複寫方向是從某一個網站到另一個網站:在某一個網站中,同時關閉這兩個節點的電源。To perform unplanned failover the replication direction from one site to another: cut power to both nodes in one site.

      注意

      在 Windows Server 2016 中,您可能需要使用容錯移轉叢集管理員或 Move-ClusterGroup,在節點重新上線之後,手動將目的地磁碟移回另一個網站。In Windows Server 2016, you may need to use Failover Cluster Manager or Move-ClusterGroup to move the destination disks back to the other site manually after the nodes come back online.

      注意

      儲存空間複本會卸載目的地磁碟區。Storage Replica dismounts the destination volumes. 這是原本設計的做法。This is by design.

  4. 若要在 Windows Server 2016 中變更預設 8 GB 的記錄檔大小,以滑鼠右鍵按一下來源和目的地記錄磁碟、按一下 [複寫記錄檔] 索引標籤,然後變更這兩個磁碟上的大小以使其相符。To change the log size from the default 8GB in Windows Server 2016, right-click both the source and destination log disks, click the Replication Log tab, then change the sizes on both the disks to match.

    注意

    預設記錄檔大小為 8 GB。The default log size is 8GB. 根據 Test-SRTopology Cmdlet 的結果,您可能會決定以較高或較低的值來使用 -LogSizeInBytesDepending on the results of the Test-SRTopology cmdlet, you may decide to use -LogSizeInBytes with a higher or lower value.

  5. 若要將另一對複寫的磁碟新增到現有的複寫群組,您必須確定在可用存放裝置中至少有一個額外的磁碟。To add another pair of replicated disks to the existing replication group, you must ensure that there is at least one extra disk in available storage. 您接著可以滑鼠右鍵按一下來源磁碟,並選取 [新增複寫合作關係]You can then right-click the Source disk and select Add replication partnership.

    注意

    可用的存放裝置中需要「虛設」磁碟,是因為要用於迴歸而非刻意。This need for an additional 'dummy' disk in available storage is due to a regression and not intentional. 容錯移轉叢集管理員先前通常支援新增更多磁碟,這在未來的版本中將會再度支援。Failover Cluster Manager previously support adding more disks normally and will again in a later release.

  6. 移除現有的複寫:To remove the existing replication:

    1. 啟動 cluadmin.mscStart cluadmin.msc.

    2. 以滑鼠右鍵按一下來源 CSV 磁碟、按一下 [複寫],然後按一下 [移除]Right-click the source CSV disk and click Replication, then click Remove. 接受警告提示。Accept the warning prompt.

    3. (選擇性) 從 CSV 移除存放裝置,並讓它回到可用的存放裝置中,以進行進一步測試。Optionally, remove the storage from CSV to return it to available storage for further testing.

      注意

      在返回可用的存放裝置之後,您可能需要使用 DiskMgmt.mscServerManager.exe,將磁碟機代號加回磁碟區。You may need to use DiskMgmt.msc or ServerManager.exe to add back drive letters to volumes after return to available storage.

Windows PowerShell 方法Windows PowerShell Method

  1. 使用 Get-SRGroup(Get-SRGroup).Replicas,來判斷目前的複寫來源與目的地及其狀態。Use Get-SRGroup and (Get-SRGroup).Replicas to determine the current source and destination of replication and their status.

  2. 若要測量複寫效能,請在來源和目的地節點上使用 Get-Counter Cmdlet。To measure replication performance, use the Get-Counter cmdlet on both the source and destination nodes. 計數器名稱如下:The counter names are:

    • \Storage Replica Partition I/O Statistics()\Number of times flush paused\Storage Replica Partition I/O Statistics()\Number of times flush paused

    • \Storage Replica Partition I/O Statistics()\Number of pending flush I/O\Storage Replica Partition I/O Statistics()\Number of pending flush I/O

    • \Storage Replica Partition I/O Statistics()\Number of requests for last log write\Storage Replica Partition I/O Statistics()\Number of requests for last log write

    • \Storage Replica Partition I/O Statistics()\Avg. Flush Queue Length\Storage Replica Partition I/O Statistics()\Avg. Flush Queue Length

    • \Storage Replica Partition I/O Statistics()\Current Flush Queue Length\Storage Replica Partition I/O Statistics()\Current Flush Queue Length

    • \Storage Replica Partition I/O Statistics()\Number of Application Write Requests\Storage Replica Partition I/O Statistics()\Number of Application Write Requests

    • \Storage Replica Partition I/O Statistics()\Avg. Number of requests per log write\Storage Replica Partition I/O Statistics()\Avg. Number of requests per log write

    • \Storage Replica Partition I/O Statistics()\Avg. App Write Latency\Storage Replica Partition I/O Statistics()\Avg. App Write Latency

    • \Storage Replica Partition I/O Statistics()\Avg. App Read Latency\Storage Replica Partition I/O Statistics()\Avg. App Read Latency

    • \Storage Replica Statistics()\Target RPO\Storage Replica Statistics()\Target RPO

    • \Storage Replica Statistics()\Current RPO\Storage Replica Statistics()\Current RPO

    • \Storage Replica Statistics()\Avg. Log Queue Length\Storage Replica Statistics()\Avg. Log Queue Length

    • \Storage Replica Statistics()\Current Log Queue Length\Storage Replica Statistics()\Current Log Queue Length

    • \Storage Replica Statistics()\Total Bytes Received\Storage Replica Statistics()\Total Bytes Received

    • \Storage Replica Statistics()\Total Bytes Sent\Storage Replica Statistics()\Total Bytes Sent

    • \Storage Replica Statistics()\Avg. Network Send Latency\Storage Replica Statistics()\Avg. Network Send Latency

    • \Storage Replica Statistics()\Replication State\Storage Replica Statistics()\Replication State

    • \Storage Replica Statistics()\Avg. Message Round Trip Latency\Storage Replica Statistics()\Avg. Message Round Trip Latency

    • \Storage Replica Statistics()\Last Recovery Elapsed Time\Storage Replica Statistics()\Last Recovery Elapsed Time

    • \Storage Replica Statistics()\Number of Flushed Recovery Transactions\Storage Replica Statistics()\Number of Flushed Recovery Transactions

    • \Storage Replica Statistics()\Number of Recovery Transactions\Storage Replica Statistics()\Number of Recovery Transactions

    • \Storage Replica Statistics()\Number of Flushed Replication Transactions\Storage Replica Statistics()\Number of Flushed Replication Transactions

    • \Storage Replica Statistics()\Number of Replication Transactions\Storage Replica Statistics()\Number of Replication Transactions

    • \Storage Replica Statistics()\Max Log Sequence Number\Storage Replica Statistics()\Max Log Sequence Number

    • \Storage Replica Statistics()\Number of Messages Received\Storage Replica Statistics()\Number of Messages Received

    • \Storage Replica Statistics()\Number of Messages Sent\Storage Replica Statistics()\Number of Messages Sent

    如需 Windows PowerShell 中效能計數器的詳細資訊,請參閱 Get-CounterFor more information on performance counters in Windows PowerShell, see Get-Counter.

  3. 若要改變延展式叢集內的複寫來源和目的地,請使用下列方法:To alter replication source and destination within the stretch cluster, use the following methods:

    1. 若要在 Redmond 網站中將複寫來源從某個節點移到另一個節點,可使用 Move-ClusterSharedVolume Cmdlet 來移動 CSV 資源。To move the replication source from one node to another in the Redmond site, move the CSV resource using the Move-ClusterSharedVolume cmdlet.

      Get-ClusterSharedVolume | fl *  
      Move-ClusterSharedVolume -Name "cluster disk 4" -Node sr-srv02  
      
    2. 若要「計劃性」地將複寫方向從某個網站移到另一個網站,可使用 Move-ClusterSharedVolume Cmdlet 來移動 CSV 資源。To move the replication direction from one site to another "planned", move the CSV resource using the Move-ClusterSharedVolume cmdlet.

      Get-ClusterSharedVolume | fl *  
      Move-ClusterSharedVolume -Name "cluster disk 4" -Node sr-srv04  
      

      這也會移動適用於另一個網站和節點的記錄檔和資料。This will also move the logs and data appropriately for the other site and nodes.

    3. 若要執行非計劃的容錯移轉且複寫方向是從某一個網站到另一個網站:在某一個網站中,同時關閉這兩個節點的電源。To perform unplanned failover the replication direction from one site to another: cut power to both nodes in one site.

      注意

      儲存空間複本會卸載目的地磁碟區。Storage Replica dismounts the destination volumes. 這是原本設計的做法。This is by design.

  4. 若要在 Windows Server 2016 中變更預設的 8 GB 記錄檔大小,請在來源和目的地儲存體複本群組上使用 Set-SRGroupTo change the log size from the default 8GB in Windows Server 2016, use Set-SRGroup on both the source and destination Storage Replica Groups. 例如,若要將所有記錄檔設定為 2 GB:For example, to set all logs to 2GB:

    Get-SRGroup | Set-SRGroup -LogSizeInBytes 2GB  
    Get-SRGroup  
    
  5. 若要將另一對複寫的磁碟新增到現有的複寫群組,您必須確定在可用存放裝置中至少有一個額外的磁碟。To add another pair of replicated disks to the existing replication group, you must ensure that there is at least one extra disk in available storage. 您接著可以滑鼠右鍵按一下來源磁碟,並選取 [新增複寫合作關係]。You can then right click the Source disk and select add replication partnership.

    注意

    可用的存放裝置中需要「虛設」磁碟,是因為要用於迴歸而非刻意。This need for an additional 'dummy' disk in available storage is due to a regression and not intentional. 容錯移轉叢集管理員先前通常支援新增更多磁碟,這在未來的版本中將會再度支援。Failover Cluster Manager previously support adding more disks normally and will again in a later release.

    使用 Set-SRPartnership Cmdlet 搭配 -SourceAddVolumePartnership-DestinationAddVolumePartnership 參數。Use the Set-SRPartnership cmdlet with the -SourceAddVolumePartnership and -DestinationAddVolumePartnership parameters.

  6. 若要移除複寫,在任何節點上使用 Get-SRGroup、Get-SRPartnership``Remove-SRGroupRemove-SRPartnershipTo remove replication, use Get-SRGroup, Get-SRPartnership, Remove-SRGroup, and Remove-SRPartnership on any node.

    Get-SRPartnership | Remove-SRPartnership  
    Get-SRGroup | Remove-SRGroup  
    

    注意

    如果使用遠端管理電腦,您必須將叢集名稱指定給這些 Cmdlet,並提供這兩個 RG 名稱。If using a remote management computer you will need to specify the cluster name to these cmdlets and provide the two RG names.

另請參閱See Also