<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618674rWzs.png"></a>
剛開始做的時候聽說openfiler不錯,就決定用它來做背景存儲了,但在做叢集驗證的時候就杯具了,不支援scsi-3 PR,我用的是最新版本2.9.9.1,希望到3.0版本釋出的時候能夠解決此問題.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618678o33k.png"></a>
沒辦法,這裡沒有用微軟自己的WSS,我把目光轉投到了FreeNAS身上去了,用免費的比較實在
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386186828bw6.png"></a>
搭建背景存儲篇:
限于環境的限制,這裡我直接用vmware來安裝FreeNAS了,安裝基本沒什麼好說的,在建立虛拟機的時候這裡選other--freeBSD64-bit
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618683DFf6.png"></a>
安裝完以後這裡選1直接進行配置網卡的IP位址即可
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338619174wk7t.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338619251The9.png"></a>
安裝完成以後我這裡添加3塊SCSI硬碟來做RAID
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386186933G1A.png"></a>
接着我們就可以在存儲選項來建立一個RAID
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618699s8cK.png"></a>
接着在建立好的RAID上面再建立兩個盤,一個用來存儲背景資料,一個用來做仲裁
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618704QBz7.png"></a>
建立完成後的效果圖
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618713OnOF.png"></a>
接着進入服務選項,開啟ISCSI服務
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618718ta9P.png"></a>
進入ISCSI設定選項裡面,在portals裡面改成本機IP位址
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618726evby.png"></a>
允許連接配接網絡裡設定成自己需要使用的網段
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618730u0VK.png"></a>
因為這裡我們建立有兩個盤,是以這裡我們需要增加兩個目标.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618737ohx5.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618741vEI4.png"></a>
接下來把剛才建立好的兩個目标和相應的磁盤對應起來
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386187430kUy.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618744HR0l.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618749JxxY.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618750700c.png"></a>
最後變更一下密碼,警告将會變成綠色.這樣我的背景存儲就搭建成功了.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618754Lo1Y.png"></a>
連接配接存儲篇:
在控制台裡面找到iscsi initiator輸入存儲伺服器的IP位址點快速連接配接可發現兩個盤符,點連接配接即可(在兩台HyperV伺服器上做同樣的操作,使磁盤正常聯機)
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618756iq8z.png"></a>
初始化磁盤使之正常聯機
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618760aarf.png"></a>
最後确認兩台伺服器磁盤聯機都正常以後,存儲連接配接就大功告成.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618766l4aH.png"></a>
故障轉移群集設定篇:
Hyper-V和故障轉移群集兩個角色添加安裝好,這是最基本條件限于篇幅不一一介紹具體添加步驟了,直接切入重點.
進入群集管理器第一步驗證我們配置是否符合群集配置的基本條件,往下走若發現問題請對應解決,這裡基本不會有什麼問題了,不細說了,走完這個流程沒什麼問題就OK
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618772TxpG.png"></a>
接下來說是重點了,建立一個群集
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618774Ufzm.png"></a>
給群集配置一個名稱和IP位址
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386187781atF.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618780ac1n.png"></a>
接下來在群集共享卷上面添加一塊我們從FreeNAS伺服器上映射過來用來存儲資料的卷,這樣完成以後我們兩台伺服器上C槽都會自動生成c:\clusterstorage\volume1這個目錄,我們把資料存儲到volume1裡面實際等同于存儲到背景存儲伺服器上一樣.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618782fWf0.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618786EDmy.png"></a>
具體步驟圖就不全部抓取了,在這裡對應上我們所建立好的仲裁盤即可.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618789sRdh.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386187921TdI.png"></a>
最後在兩台Hyper-V伺服器上把虛拟磁盤和虛拟機存儲路徑改到我們在叢集上建立好的共享存儲卷c:\clusterstorage\volume1\
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618796koLu.png"></a>
故障轉移群集高用性建立篇:
這裡我分兩種方法給大家介紹建立方法
一:通過故障轉移群集管理器來建立
先在兩台Hyper-V伺服器上各建立一台虛拟機,先不需要安裝好系統,
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386187996dcY.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618808itg3.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618812Zw0z.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618817wg5z.png"></a>
确認兩台Hyper-V伺服器上都已建立好了虛拟機
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618820PL5z.png"></a>
接下來就是重點來了,在故障轉移群集裡面配置服務與應用程式實作高可用.在任意一台Hyper-V伺服器上的故障轉移群集管理器上面操作即可.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618823AVp6.png"></a>
這裡一定要選擇虛拟機哈
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618826wkQn.png"></a>
自動檢測到我們所有已建立好的虛拟機
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618830xHPZ.png"></a>
這裡提示告訴我們為以下虛拟機建立高可用
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618832IQ5S.png"></a>
最後大功告成,完成以後我們就可以通過Hyper-V管理器為以下兩台主機裝系統,然後就可以實作快速遷移功能了.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386188348ukg.png"></a>
第二種實作方法:通過SCVMM2008 R2來實作,這種方法要簡便很多,接着往下看
由于前面我們已經建立好了群集主機名稱,在AD裡面可以發現到此群集主機,這裡我們把群集主機添加進來先
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618839pQaf.png"></a>
看到沒此群集有兩個節點在裡面
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618844bDRe.png"></a>
把此主機放到我們建立好的主機群組裡面
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618848Xajp.png"></a>
預設路徑我們這裡可以不管,因為我們已經設定好了,最好我們可以确認到我們的預設路徑放在那裡
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618851mfDM.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618856w4Kl.png"></a>
最後檢視一下路徑,是不是之前我們已設定好的路徑
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618862qTcp.png"></a>
ok,以上工作完成以後,下面正式開始切入重點,看SCVMM是怎麼快速實作主機高可用性哈
在相應Hyper-V伺服器上開始建立一個虛拟機
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386188721cEW.png"></a>
給虛拟機一個名稱
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618878Pion.png"></a>
接下來重點來了,在配置硬體選項裡面其它沒什麼好說的,隻要把此項打個勾才是王道,隻要點了這個選項,我們的虛拟機就實作了高可用性,簡單吧.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618890fYvQ.png"></a>
最後建立好虛拟機就行了.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386188984wde.png"></a>
至此我們故障轉移群集和高可用性就建立完成了
實作快速遷移篇:
接下來就是在Hyper-V伺服器上為建立好的虛拟機安裝好作業系統
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618908dTwc.png"></a>
裝完作業系統以後可以檢視背景存儲所用的磁盤空間.
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618914ZT0E.png"></a>
把虛拟機HyperV-ClientB從虛拟化服務HyperV-3上遷移到Hyper2上去
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618920eFQS.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618926T3mX.png"></a>
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618931hnSC.png"></a>
遷移成功了,真的會丢一個包
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_1338618939lzie.png"></a>
可以看到所有虛拟主機都已在Hyper2主機上運作
<a href="http://allanfan.blog.51cto.com/attachment/201206/2/520839_13386189451KZv.png"></a>
本文轉自allanhi 51CTO部落格,原文連結:http://blog.51cto.com/allanfan/885519,如需轉載請自行聯系原作者