Windows Server 2016 Storage Replica

來源:互聯網
上載者:User

標籤:windowsserver2016   storagespace   it   

Windows Server 2016 Storage Replica


儲存副本是Windows Server 2016中的一個新的功能,它是一種與傳統存放裝置種類(NAS/DAS/SAN)無關,基於Block層級的儲存副本機制。儲存副本支援採用同步複製和非同步複製兩種不同的資料複寫方式,儲存副本以SMB通訊協議來進行資料的複寫和傳送。它可以使用任何固定的磁碟儲存,以及任何的儲存結構。儲存副本不需要群集技術,並且它可以使用容錯移轉叢集管理員、PowerShell、WMI進行管理。

同步複製和非同步複製兩種不同的複寫方式的區別如下:

同步複寫機制:當採用「同步(Synchronous)」複寫機制時,系統將會保證每次的資料 IO 作業完成之前,都會將資料寫入至少兩個不同的位置之後,才會回複給上層的應用程式已完成 IO 作業。 所以,當來源端節點主機發生故障損壞事件時,便可以進行容錯備援的切換動作,接著讓應用程式使用目的端節點主機的資料快速恢複運作。因此,它適合應用於需要高可用性及災難複原,也就是「零資料損失(Zero Data Loss)」的營運服務。

下列為採用同步複寫機制時,兩端主機之間資料複寫的動作如下:

1.應用程式發出寫入資料需求。

2.來源端節點主機將資料寫入至本地端儲存資源「日誌(Log)」當中,同時透過 SMB 3 協議將資料轉送至目的端節點主機。

3.目的端節點主機,將所收到的資料寫入至本地端儲存資源「日誌(Log)」當中。

4.目的端節點主機寫入完成後,回複給來源端主機已完成 IO 動作。

5.來源端節點主機回複應用程式確認已完成 IO 動作。

650) this.width=650;" title="clip_image002[5]" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image002[5]" src="http://s3.51cto.com/wyfs02/M02/89/78/wKiom1gUS8LjG6YpAABYiU0Ez6M959.jpg" height="300" />

非同步複寫機制:當採用「非同步(Asynchronous)」複寫機制時,系統會在本地端完成 IO 作業後便立即回複給上層的應用程式,之後才將資料複寫到另一個位置。因此,這樣的資料複寫機制仍然有資料遺失的風險存在,只能達成「近乎零資料損失(Near Zero Data Loss)」的運作環境,因此並不適合用於需要高可用性的運作環境中(例如,容錯移轉叢集)。

下列為採用非同步複寫機制時,兩端主機之間資料複寫的動作如下:

1.應用程式發出寫入資料需求。

2.來源端節點主機將資料寫入至本地端儲存資源「日誌(Log)」當中。

3.來源端節點主機回複應用程式確認已完成 IO 動作。

4.透過 SMB 3 協議將資料轉送至目的端節點主機。

5.目的端節點主機,將所收到的資料寫入至本地端儲存資源「日誌(Log)」當中。

6.目的端節點主機寫入完成後,回複給來源端主機已完成 IO 動作。

650) this.width=650;" title="clip_image004[5]" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image004[5]" src="http://s3.51cto.com/wyfs02/M00/89/79/wKiom1gUS8PQu9VwAABcw0oVy5E614.jpg" height="311" />

在本次實驗中,我將使用兩台Windows Server 2016 Datacenter進行測試,兩台伺服器位於同一域(VCloud.Lab)內。我們假設兩台伺服器在不同樓層,以能夠應對故障損壞。在Windows Server 2016中,並沒有GUI介面可以進行配置,所以本次實驗環境我們統一採用PowerShell進行配置。

650) this.width=650;" title="clip_image006" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image006" src="http://s3.51cto.com/wyfs02/M00/89/76/wKioL1gUS8SgYLTeAABINpPN8xU888.jpg" height="336" />

1、建立複製夥伴關係

在本次實驗中我分別為兩台伺服器增加了兩塊磁碟,分別是資料盤(Data),大小50GB;日誌盤(Log),大小15GB。如所示:

SRNode1:

650) this.width=650;" title="clip_image007" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image007" src="http://s3.51cto.com/wyfs02/M01/89/79/wKiom1gUS8WBOT4hAAAhkVZwgVc240.png" height="297" />

650) this.width=650;" title="clip_image008[5]" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image008[5]" src="http://s3.51cto.com/wyfs02/M02/89/79/wKiom1gUS8azJBCuAAAYHLZ3rhg921.png" height="136" />

SRNode2:

650) this.width=650;" title="clip_image009" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image009" src="http://s3.51cto.com/wyfs02/M02/89/79/wKiom1gUS8fB0mf-AAAhTlkjkGQ919.png" height="288" />

650) this.width=650;" title="clip_image010[5]" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image010[5]" src="http://s3.51cto.com/wyfs02/M00/89/79/wKiom1gUS8fyMG0lAAAXKnBtYOc606.png" height="137" />

為兩台伺服器安裝儲存副本角色,使用如下PS命令:

Invoke-Command -ComputerName SRNode1,SRNode2 -Command {Install-WindowsFeature -Name Storage-Replica,FS-FileServer -Restart }

650) this.width=650;" title="clip_image012[5]" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image012[5]" src="http://s3.51cto.com/wyfs02/M00/89/76/wKioL1gUS8jzA8-WAAA6mB6auhQ570.jpg" height="132" />

使用Test-SRTopology命令來進行儲存副本測試,運行如下PS命令:

Test-SRTopology -SourceComputerName SRNode1 -SourceVolumeName d: -SourceLogVolumeName e: -DestinationComputerName SRNode2 -DestinationVolumeName d: -DestinationLogVolumeName e: -DurationInMinutes 5 -ResultPath c:\Log\

650) this.width=650;" title="clip_image014" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image014" src="http://s3.51cto.com/wyfs02/M01/89/76/wKioL1gUS8nB4UREAABJi8nQ5O0759.jpg" height="131" />

測試完成以後如所示:

650) this.width=650;" title="clip_image016" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image016" src="http://s3.51cto.com/wyfs02/M02/89/79/wKiom1gUS8uwek8NAABcj2dpmpY392.jpg" height="145" />

測試完成以後會生產測試報告,如所示:

650) this.width=650;" title="clip_image018" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image018" src="http://s3.51cto.com/wyfs02/M01/89/76/wKioL1gUS8yRTrDnAAEjuVGAYd0115.jpg" height="1125" />

使用New-SRPartnership命令來進行建立儲存副本,具體命令如下所示:

New-SRPartnership -SourceComputerName SRNode1 -SourceRGName SR-SRNode1 -SourceVolumeName D: -SourceLogVolumeName E: -DestinationComputerName SRNode2 -DestinationRGName SR-SRNode2 -DestinationVolumeName D: -DestinationLogVolumeName E: -LogSizeInBytes 5GB -Verbose

650) this.width=650;" title="clip_image020" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image020" src="http://s3.51cto.com/wyfs02/M00/89/79/wKiom1gUS8yw7-xsAAA_af9XMNY430.jpg" height="117" />

建立完成,如所示:

650) this.width=650;" title="clip_image022" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image022" src="http://s3.51cto.com/wyfs02/M01/89/79/wKiom1gUS82zpe7jAABhUXnZFEA029.jpg" height="189" />

建立完成以後切換到節點SRNode2會發現其Data(D)盤已經不可用:

650) this.width=650;" title="clip_image023" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image023" src="http://s3.51cto.com/wyfs02/M02/89/79/wKiom1gUS86RA_7OAAAkTaMGl60341.png" height="166" />

2、監控複製效能:

開啟效能監控器,點擊綠色的+:

650) this.width=650;" title="clip_image025" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image025" src="http://s3.51cto.com/wyfs02/M02/89/76/wKioL1gUS8_ToJENAABG3zbNAn8808.jpg" height="244" />

點擊 Storage Replica Statistics,然後點擊添加,點擊確定:

650) this.width=650;" title="clip_image027" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image027" src="http://s3.51cto.com/wyfs02/M02/89/76/wKioL1gUS9DBa8xSAACsV5_Heic608.jpg" height="387" />

運行如下PS命令進行測試Copy-Item C:\Windows\System32\Drivers d: -Recurse

650) this.width=650;" title="clip_image029" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image029" src="http://s3.51cto.com/wyfs02/M00/89/76/wKioL1gUS9GQomIHAAAgbsUAZvM395.jpg" height="37" />

資料開始複製以後觀察效能監控器,如所示:

650) this.width=650;" title="clip_image031" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image031" src="http://s3.51cto.com/wyfs02/M00/89/76/wKioL1gUS9KAd86OAACqMQbWfNo264.jpg" height="389" />

3、配置反轉複寫方向

在這個步驟中我會將SRNode2配置為原始伺服器,SRNode1配置為目標伺服器。

以管理員身份開啟Windows PowerShell,鍵入如下PS命令:

Set-SRPartnership -NewSourceComputerName SRNode2 -SourceRGName SR-SRNode2 -DestinationComputerName SRNode1 -DestinationRGName SR-SRNode1 -Confirm:$False

650) this.width=650;" title="clip_image033" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image033" src="http://s3.51cto.com/wyfs02/M01/89/79/wKiom1gUS9PQ7Th2AAAnHjsnmxM118.jpg" height="71" />

命令執行完成,如所示:

650) this.width=650;" title="clip_image035" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image035" src="http://s3.51cto.com/wyfs02/M02/89/79/wKiom1gUS9SxdQu5AAA479JJa8E547.jpg" height="111" />

登陸到SRNode1可以看到D盤以標記為不可用:

650) this.width=650;" title="clip_image037" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image037" src="http://s3.51cto.com/wyfs02/M00/89/79/wKiom1gUS9STi4q5AAAbb0VIARw558.jpg" height="62" />

4、刪除複製副本

在此步驟中我將刪除Windows卷複製。

以管理員身份開啟Windows PowerShell:

在開始刪除之前,我將通過以下兩個PS命令查詢儲存副本組和儲存的夥伴關係:Get-SRGroup、Get-SRPartnership.如所示:

650) this.width=650;" title="clip_image039" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image039" src="http://s3.51cto.com/wyfs02/M01/89/79/wKiom1gUS9Xz2CGYAACiC07dAG0220.jpg" height="297" />

650) this.width=650;" title="clip_image040[5]" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image040[5]" src="http://s3.51cto.com/wyfs02/M02/89/79/wKiom1gUS9bCNY3BAAAdS_VP_8I757.png" height="185" />

使用如下命令刪除複製:

Get-SRPartnership | Remove-SRPartnership -Confirm:$False

650) this.width=650;" title="clip_image042" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image042" src="http://s3.51cto.com/wyfs02/M02/89/76/wKioL1gUS9fhLQpsAAAeIBuq61o261.jpg" height="52" />

Remove-SRGroup -Name SR-SRNode2:

650) this.width=650;" title="clip_image043" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image043" src="http://s3.51cto.com/wyfs02/M02/89/76/wKioL1gUS9iSkUOhAAAJUdjl_GM503.png" height="48" />

成功刪除,如所示:

650) this.width=650;" title="clip_image045" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image045" src="http://s3.51cto.com/wyfs02/M01/89/79/wKiom1gUS9nzDZFoAABQeOKIeY0079.jpg" height="132" />

切換到SRNode1刪除SRGroup:

Remove-SRGroup -Name SR-SRNode1

650) this.width=650;" title="clip_image046[5]" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image046[5]" src="http://s3.51cto.com/wyfs02/M01/89/76/wKioL1gUS9nS6EsIAAAJXHO64Z8205.png" height="40" />

查看SRNode1和SRNode2的磁碟機都已正常:

650) this.width=650;" title="clip_image048" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image048" src="http://s3.51cto.com/wyfs02/M02/89/79/wKiom1gUS9riEiDQAAAd1hl6esY165.jpg" height="111" />650) this.width=650;" title="clip_image050" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image050" src="http://s3.51cto.com/wyfs02/M00/89/79/wKiom1gUS9uiogpeAAAgz7nY5ns593.jpg" height="112" />

確認每個伺服器的D盤都存在之前複製的Drivers檔案夾:

650) this.width=650;" title="clip_image051" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image051" src="http://s3.51cto.com/wyfs02/M00/89/76/wKioL1gUS9ywt0f2AAAVYGbZNa0883.png" height="94" />

 650) this.width=650;" title="clip_image052" style="border-top:0px;border-right:0px;background-image:none;border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px;" border="0" alt="clip_image052" src="http://s3.51cto.com/wyfs02/M01/89/76/wKioL1gUS92T8SGmAAAWs-RYRHM460.png" height="114" />

本文出自 “吳玉章的微軟部落格” 部落格,請務必保留此出處http://wuyvzhang.blog.51cto.com/9992636/1867094

Windows Server 2016 Storage Replica

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.