VM30DM30雙機(jī)高可用方案配置指導(dǎo)(神州天勤外部版)114_第1頁
VM30DM30雙機(jī)高可用方案配置指導(dǎo)(神州天勤外部版)114_第2頁
VM30DM30雙機(jī)高可用方案配置指導(dǎo)(神州天勤外部版)114_第3頁
VM30DM30雙機(jī)高可用方案配置指導(dǎo)(神州天勤外部版)114_第4頁
VM30DM30雙機(jī)高可用方案配置指導(dǎo)(神州天勤外部版)114_第5頁
已閱讀5頁,還剩70頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

圖2-6所示的對(duì)話框提示輸入root用戶的密碼,然后再點(diǎn)擊,就可以登錄服務(wù)器。EnterPassword對(duì)話框安裝前的配置準(zhǔn)備安裝雙機(jī)軟件前,需要登錄服務(wù)器A和服務(wù)器B進(jìn)行一些配置操作。登錄服務(wù)器操作請(qǐng)參見“REF_Ref200421546\r\h2.3.1REF_Ref200421546\h使用SSH工具登錄服務(wù)器”。磁盤分區(qū)服務(wù)器A和服務(wù)器B上要求分別分出大小相同的一個(gè)磁盤分區(qū)(推薦40GB),并掛在相同的目錄下(如/dev/sda2)。該分區(qū)下不要存放任何用戶的文件,以便配置磁盤鏡像軟件。卸載pgsql若VM或DM安裝的pgsql是8.2之前的版本,則安裝雙機(jī)軟件前需要卸載該pgsql。進(jìn)行卸載pgsql操作前,請(qǐng)使用命令rpm–qa|greppostgres查看是否已安裝pgsql。若沒有安裝pgsql,則無需進(jìn)行卸載pgsql操作。以服務(wù)器A為例,卸載pgsql的操作步驟如下:在LINUX下,通過vi命令新建卸載腳本uninpgc44.sh#!/bin/shrpm-e--nodepsmysql-5.0.45-7.el5rpm-e--nodepspostgresql-libs-8.1.11-1.el5_1.1rpm-epostgresql-python-7.4.13-2.RHEL4.1rpm-epostgresql-test-7.4.13-2.RHEL4.1rpm-epostgresql-pl-7.4.13-2.RHEL4.1rpm-epostgresql-tcl-7.4.13-2.RHEL4.1rpm-efreeradius-postgresql-1.0.1-3.RHEL4.3rpm-epostgresql-jdbc-7.4.13-2.RHEL4.1rpm-epostgresql-odbc-7.3-8.RHEL4.1rpm-epostgresql-docs-7.4.13-2.RHEL4.1rpm-epostgresql-devel-7.4.13-2.RHEL4.1rpm-epostgresql-contrib-7.4.13-2.RHEL4.1rpm-epostgresql-server-7.4.13-2.RHEL4.1rpm-epostgresql-7.4.13-2.RHEL4.1rpm-emod_auth_pgsql-2.0.1-7.1.i386rpm-ephp-pgsql-4.3.9-3.15.i386rpm-ecyrus-sasl-sql-2.1.19-5.EL4.i386rpm-edovecot-0.99.11-4.EL4.i386rpm-eperl-DBD-Pg-1.31-6.i386rpm-epostgresql-7.4.13-2.RHEL4.1.i386rpm-elibdbi-dbd-pgsql-0.6.5-10.RHEL4.1.i386rpm-eqt-PostgreSQL-3.3.3-9.3.i386rpm-epostgresql-libs-7.4.13-2.RHEL4.1rpm-e--nodepspostgresql-libs-8.4.9-1.el6_1.1.i686rpm-e--nodepspostgresql-devel-8.4.9-1.el6_1.1.i686rpm-e--nodepspostgresql-8.4.9-1.el6_1.1.i686將uninpgc44.sh腳本放在/home目錄下,然后執(zhí)行下面命令:[root@local~]#cd/home[root@localhome]#chmod777uninpgc44.sh[root@localhome]#./uninpgc44.sh執(zhí)行腳本后,用命令rpm–qa|greppostgres查看是否卸載完全。執(zhí)行命令后,若顯示信息為空,則表示完全卸載;若有顯示信息,則表示不完全卸載,需繼續(xù)用rpm-e--nodeps(上面rpm–qa|greppostgres命令得到的rpm包名)進(jìn)行卸載。服務(wù)器B上的pgsql卸載操作與此類似,請(qǐng)參考上面步驟完成即可。配置主機(jī)名與心跳通道名在服務(wù)器A上進(jìn)行如下操作:對(duì)需修改的文件進(jìn)行備份,以便修改錯(cuò)誤時(shí)可恢復(fù)原文件[root@local~]#cp/etc/hosts/etc/hosts.bak心跳通道名[root@local~]#vi/etc/hosts#Donotremovethefollowingline,orvariousprograms#thatrequirenetworkfunctionalitywillfail.#localhost.localdomainlocalhost0HAserver11HAserver20hbhb201hbhb21說明:修改完成后,按<Esc>鍵,如果需要保存修改內(nèi)容再退出,請(qǐng)輸入“:wq!”;如果不保存修改直接退出,請(qǐng)輸入“:q!”。完成服務(wù)器A的配置后,在服務(wù)器B上復(fù)制A的配置文件,操作如下:對(duì)需修改的文件進(jìn)行備份,以便修改錯(cuò)誤時(shí)可恢復(fù)原文件[root@HAserver2~]#cp/etc/hosts/etc/hosts.bak復(fù)制服務(wù)器A的配置文件到服務(wù)器B[root@Haserver2~]#scproot@0:/etc/hosts/etc/hosts在服務(wù)器A上修改/etc/sysconfig/network[root@Haserver1~]#vi/etc/sysconfig/networkNETWORKING=yesHOSTNAME=HAserver1GATEWAY=在服務(wù)器B上修改/etc/sysconfig/network[root@Haserver2~]#vi/etc/sysconfig/networkNETWORKING=yesHOSTNAME=HAserver2GATEWAY=執(zhí)行changegw.sh腳本。將如下附帶的changegw.sh腳本上傳到主機(jī)和備機(jī)服務(wù)器中。隨后執(zhí)行該腳本。[root@node105~]#shchangegw.sh注意:如果服務(wù)器是CentOS6.2系統(tǒng),那么請(qǐng)先執(zhí)行如下命令:禁掉NetworkManager服務(wù):[root@HAserver2home]#/etc/init.d/NetworkManagerstop[root@HAserver2home]#chkconfigNetworkManageroff使用reboot命令分別重啟服務(wù)器A和服務(wù)器B,使主機(jī)名、心跳通道名生效。修改完成后,確認(rèn)心跳線已連接好后,按照心跳線名字互ping,以確定網(wǎng)絡(luò)和心跳線聯(lián)通正常:[root@HAserver1~]#pingHAserver2PINGHAserver2(1)56(84)bytesofdata.64bytesfromHAserver2(1):icmp_seq=1ttl=64time=0.063ms64bytesfromHAserver2(1):icmp_seq=2ttl=64time=0.062ms64bytesfromHAserver2(1):icmp_seq=3ttl=64time=0.059ms64bytesfromHAserver2(1):icmp_seq=4ttl=64time=0.062msHAserver2pingstatistics4packetstransmitted,4received,0%packetloss,time5002msrttmin/avg/max/mdev=0.059/0.066/0.082/0.013ms[root@HAserver1~]#pinghbhb21PINGhbhb21(1)56(84)bytesofdata.64bytesfromhbhb21(1):icmp_seq=1ttl=64time=0.052ms64bytesfromhbhb21(1):icmp_seq=2ttl=64time=0.058ms64bytesfromhbhb21(1):icmp_seq=3ttl=64time=0.051ms64bytesfromhbhb21(1):icmp_seq=4ttl=64time=0.047mshbhb21pingstatistics4packetstransmitted,4received,0%packetloss,time3006msrttmin/avg/max/mdev=0.047/0.052/0.058/0.004ms[root@HAserver2~]#pingHAserver1PINGHAserver1(0)56(84)bytesofdata.64bytesfromHAserver1(0):icmp_seq=1ttl=64time=0.068ms64bytesfromHAserver1(0):icmp_seq=2ttl=64time=0.073ms64bytesfromHAserver1(0):icmp_seq=3ttl=64time=0.059ms64bytesfromHAserver1(0):icmp_seq=4ttl=64time=0.064msHAserver1pingstatistics4packetstransmitted,4received,0%packetloss,time3001msrttmin/avg/max/mdev=0.059/0.066/0.073/0.005ms[root@HAserver2~]#pinghbhb20PINGhbhb20(0)56(84)bytesofdata.64bytesfromhbhb20(0):icmp_seq=1ttl=64time=0.050ms64bytesfromhbhb20(0):icmp_seq=2ttl=64time=0.046ms64bytesfromhbhb20(0):icmp_seq=3ttl=64time=0.047ms64bytesfromhbhb20(0):icmp_seq=4ttl=64time=0.046mshbhb20pingstatistics4packetstransmitted,4received,0%packetloss,time3000msrttmin/avg/max/mdev=0.046/0.047/0.050/0.005ms雙機(jī)軟件運(yùn)行狀態(tài)確認(rèn)雙機(jī)軟件安裝需嚴(yán)格按照配置手冊(cè)進(jìn)行安裝、初始配置,并對(duì)磁盤鏡像軟件進(jìn)行配置操作。確認(rèn)安裝成功后,進(jìn)行VM/DM的安裝。雙機(jī)軟件相關(guān)的開局和維護(hù)由合作方負(fù)責(zé),H3C負(fù)責(zé)iVS的應(yīng)用平臺(tái)軟件(雙機(jī)模式)的安裝,在安裝VM/DM前,請(qǐng)確認(rèn)雙機(jī)軟件運(yùn)行狀態(tài)。在本文描述中,默認(rèn)所有操作在以下配置下進(jìn)行,如果主機(jī)名、drbd設(shè)備名、磁盤分區(qū)、IP地址與下表不同,請(qǐng)?jiān)趯?duì)應(yīng)的操作中根據(jù)現(xiàn)場的配置進(jìn)行更改,將操作中涉及以下配置更改為符合現(xiàn)場實(shí)際情況。項(xiàng)目描述舉例Hostname配置雙機(jī)功能的節(jié)點(diǎn)服務(wù)器的主機(jī)名服務(wù)器A:HAserver1服務(wù)器B:HAserver2Devicedrbd設(shè)備名,如/dev/drbd0說明:兩個(gè)節(jié)點(diǎn)服務(wù)器對(duì)應(yīng)的drbd設(shè)備需一致服務(wù)器A:/dev/drbd0服務(wù)器B:/dev/drbd0Diskdrbd設(shè)備所對(duì)應(yīng)的物理磁盤分區(qū)服務(wù)器A:/dev/sda2服務(wù)器B:/dev/sda2Addressdrbd設(shè)備通信所用的IP地址及端口,即心跳網(wǎng)口IP地址及端口說明:drbd設(shè)備所用的網(wǎng)絡(luò)最好是直連網(wǎng)絡(luò),不同的drbd設(shè)備所用的端口應(yīng)當(dāng)不同服務(wù)器A:0:7788服務(wù)器B:1:7788Drbd運(yùn)行狀態(tài)確認(rèn)雙機(jī)VM需要使用drbd磁盤鏡像,因此需要進(jìn)行drbd運(yùn)行狀態(tài)確認(rèn)。雙機(jī)DM不需要使用drbd磁盤鏡像,因此不需要進(jìn)行drbd運(yùn)行狀態(tài)確認(rèn),請(qǐng)?zhí)^本節(jié),直接進(jìn)行3.2雙機(jī)運(yùn)行狀態(tài)確認(rèn)。Drbd連接狀態(tài)確認(rèn)如下所示,drbd已啟動(dòng)成功,心跳線連接正常。[root@HAserver1home]#netstat-antActiveInternetconnections(serversandestablished)ProtoRecv-QSend-QLocalAddressForeignAddressStatetcp00:631:*LISTENtcp00:25:*LISTENtcp000:77881:48997ESTABLISHEDtcp000:549021:7788ESTABLISHED[root@HAserver2ha-h3c]#netstat-antActiveInternetconnections(serversandestablished)ProtoRecv-QSend-QLocalAddressForeignAddressStatetcp00:631:*LISTENtcp00:25:*LISTENtcp001:77880:54902ESTABLISHEDtcp001:489970:7788ESTABLISHEDDrbd運(yùn)行狀態(tài)確認(rèn)服務(wù)器是CentOS5.3系統(tǒng):執(zhí)行命令cat/proc/drbd可查看drbd的狀態(tài)。如果drbd的數(shù)據(jù)已經(jīng)同步,則顯示Consistent狀態(tài),如下:[root@HAserver1~]#cat/proc/drbdversion:0.7.24(api:79/proto:74)SVNRevision:2875buildbyroot@HAserver1,2009-09-0717:05:350:cs:Connectedst:Secondary/Secondaryld:Consistentns:5840nr:77464dw:83304dr:8434al:13bm:128lo:0pe:0ua:0ap:0如果drbd的數(shù)據(jù)未同步,則顯示Inconsistent狀態(tài),如下:[root@HAserver1~]#cat/proc/drbdversion:0.7.24(api:79/proto:74)SVNRevision:2875buildbyroot@HAserver1,2009-09-0716:05:350:cs:Connectedst:Secondary/Secondaryld:Inconsistentns:5840nr:77464dw:83304dr:8434al:13bm:128lo:0pe:0ua:0ap:0服務(wù)器是CentOS6.2系統(tǒng):執(zhí)行命令cat/proc/drbd可查看drbd的狀態(tài)。如果drbd的數(shù)據(jù)已經(jīng)同步,則顯示UpToDate狀態(tài),如下:[root@HAserver1~]#cat/proc/drbdversion:0.7.25(api:79/proto:74)0:cs:Connectedro:Primary/Secondaryds:UpToDate/UpToDateCrns:872956nr:0dw:0dr:872956al:0bm:162lo:0pe:0ua:0ap:0如果drbd的數(shù)據(jù)未同步,則顯示Inconsistent狀態(tài),如下:[root@HAserver1~]#cat/proc/drbdversion:0.7.24(api:79/proto:74)0:cs:Connectedro:Secondary/Secondaryds:Inconsistent/InconsistentCrns:0nr:0dw:0dr:0al:0bm:0lo:0pe:0ua:0ap:0如果數(shù)據(jù)未同步,請(qǐng)參照天勤配置手冊(cè)進(jìn)行同步Drbd切換確認(rèn)確認(rèn)項(xiàng)1:將服務(wù)器A設(shè)為Primary節(jié)點(diǎn)服務(wù)器是CentOS5.3系統(tǒng):若服務(wù)器A的drbd狀態(tài)為“Secondary/Secondaryld:Consistent”,則使用下面命令使服務(wù)器A為Primary節(jié)點(diǎn):[root@HAserver1~]drbdadmprimaryall[root@HAserver1~]#cat/proc/drbdversion:0.7.25(api:79/proto:74)GIT-hash:3a9c7c136a9af8df921b3628129dafbe212ace9fbuildbyroot@HAserver20,2010-12-2117:26:590:cs:Connectedst:Primary/Secondaryld:Consistentns:374420nr:0dw:374420dr:1615al:102bm:254lo:0pe:0ua:0ap:0此時(shí),在服務(wù)器B上查看drbd狀態(tài),應(yīng)為:[root@HAserver21tmp]#cat/proc/drbdversion:0.7.25(api:79/proto:74)GIT-hash:3a9c7c136a9af8df921b3628129dafbe212ace9fbuildbyroot@HAserver21,2010-12-2116:33:250:cs:Connectedst:Secondary/Primaryld:Consistentns:0nr:374420dw:374420dr:0al:0bm:127lo:0pe:0ua:0ap:0服務(wù)器是CentOS6.2系統(tǒng):若服務(wù)器A的drbd狀態(tài)為“Secondary/Secondaryld:Inconsistent”,則使用下面命令使服務(wù)器A為Primary節(jié)點(diǎn),且drbd會(huì)自動(dòng)進(jìn)行同步:[root@HAserver1home]#drbdsetup/dev/drbd0primary-o[root@HAserver1home]#cat/proc/drbdversion:0.7.19(api:79/proto:74)SVNRevision:2224Mbuildbyroot@HAserver1,2009-09-0716:05:350:cs:SyncSourcest:Primary/Secondaryds:UpToDate/InconsistentCrns:127260nr:0dw:0dr:135312al:0bm:867lo:0pe:39ua:2013ap:0[>]sync'ed:1.9%(6744/6869)Mfinish:0:11:21speed:10,004(9,776)K/sec確認(rèn)項(xiàng)2:掛載Primary節(jié)點(diǎn)當(dāng)Primary節(jié)點(diǎn)的drbd狀態(tài)為“Primary/Secondaryld:Consistent”時(shí),請(qǐng)進(jìn)行mountPrimary節(jié)點(diǎn)的磁盤鏡像設(shè)備操作,以便掛載應(yīng)用程序的共享數(shù)據(jù)到磁盤鏡像設(shè)備。Secondary節(jié)點(diǎn)無需掛載。[root@HAserver1home]#mount/dev/drbd0/mnt/syncdata/[root@HAserver1home]#ll/mnttotal4drwxr-xr-x3rootroot4096Oct2611:19syncdata[root@HAserver1home]#cd/mnt/syncdata/[root@HAserver1syncdata]#lslost+found出現(xiàn)“l(fā)ost+found”目錄,則表示mount操作成功。確認(rèn)項(xiàng)三:測試將Primary節(jié)點(diǎn)切換為Secondary節(jié)點(diǎn)[root@HAserver1syncdata]#cd/mnt[root@HAserver1mnt]#umount/dev/drbd0[root@HAserver1mnt]#drbdadmsecondaryall[root@HAserver1mnt]#cat/proc/drbdversion:0.7.19(api:79/proto:74)SVNRevision:2224Mbuildbyroot@HAserver1,2009-09-0717:05:350:cs:Connectedst:Secondary/Secondaryld:Consistentns:7179080nr:0dw:145164dr:7034178al:63bm:1416lo:0pe:0ua:0ap:0文件系統(tǒng)配置文件確認(rèn)在服務(wù)器A和服務(wù)器B上必須要使用“#”注掉用于drbd磁盤鏡像的分區(qū)label。如果分區(qū)表中沒有LABEL=/dev/sda2,也為正常狀態(tài)。在服務(wù)器A和服務(wù)器B上執(zhí)行以下命令,查看用于drbd磁盤鏡像的分區(qū)label是否被注掉:[root@HAserver1home]#more/etc/fstab#Thisfileiseditedbyfstab-sync-see'manfstab-sync'fordetailsLABEL=//ext3defaults11LABEL=/boot1/bootext3defaults12none/dev/ptsdevptsgid=5,mode=62000#LABEL=/dev/sda2/dev/sda2ext3defaults12none/dev/shmtmpfsdefaults00none/procprocdefaults00none/syssysfsdefaults00雙機(jī)運(yùn)行狀態(tài)確認(rèn)啟動(dòng)skygeha_admin管理工具root@HAserver1~]#skygeha_adminSKYGEHA6.0ConfigurationUtilityToolsTheconfhaprovidesacommand-lineuserinterfacethatenablestomonitorandmanageSkygeHAsystemsandservices.Youcanobtainhelpbyenteringhelpandoneofthefollowingcommands:node|loglevel|mail|service|help|quit進(jìn)入node菜單HA>nodeSupportthefollowsubcommands:config|start|stop|status|synconfigDescription:config:Setupthesystemsofa2-nodeHA.start:Startskygehaserveronthenode.stop:Stopskygehaserveronthendoe.status:Getlocalskygehaserverstatus.synconfig:Copylocalskygehaconfigfiletoanothernode查看節(jié)點(diǎn)狀態(tài)在menberstatus確認(rèn)服務(wù)器A和服務(wù)器B都是up的;在channelstatus確認(rèn)心跳線狀態(tài)為ONLINE。HA:Node>statusSkygeHAConfiguration(SkygeHA6.0):WedDec2210:42:55CST2010Memberstatus:MemberIdSystemstatusHAserver200UpHAserver211UpChannelstatus:NameTypeStatushbhb20<-->hbhb21networkONLINEServicestatus:NameOnHAserver20OnHAserver21請(qǐng)確認(rèn)以上狀態(tài)如上文所述,如果不符合,請(qǐng)參照天勤HA安裝指導(dǎo)或聯(lián)系天勤售后人員解決。以上狀態(tài)均正確時(shí),可以進(jìn)行VM/DM安裝。雙機(jī)VM使用指導(dǎo)雙機(jī)VM3.0的安裝、配置、升級(jí)、卸載操作,只配置一個(gè)雙機(jī)服務(wù)svcvm。如果需要申請(qǐng)雙機(jī)license,可在完成本章配置并通過雙機(jī)軟件啟動(dòng)VM服務(wù)后,登錄系統(tǒng)查看“幫助”中雙機(jī)license的申請(qǐng)步驟。雙機(jī)環(huán)境下安裝VM3.0軟件注意:如果此前沒有執(zhí)行2.4.3HYPERLINK配置主機(jī)名與心跳通道名章節(jié)(5) 執(zhí)行changegw.sh腳本這條命令,請(qǐng)?jiān)诖颂幨紫葘⒅鱾錂C(jī)的drbd服務(wù)停止,隨后執(zhí)行該腳本,否則服務(wù)可能無法正常運(yùn)行。執(zhí)行完成后將主備機(jī)的drbd服務(wù)啟動(dòng)起來。安裝VM3.0軟件之前,應(yīng)確保兩臺(tái)服務(wù)器上都停止skygeha服務(wù),只啟動(dòng)drbd。在主機(jī)上面完成“REF_Ref200857597\r\hREF_Ref200857597\hmountPrimary節(jié)點(diǎn)的磁盤鏡像設(shè)備”的操作后(可按照3.1.3確認(rèn)項(xiàng)一和確認(rèn)項(xiàng)二進(jìn)行操作),可以進(jìn)行VM8500軟件主機(jī)和從機(jī)的安裝。[root@HAserver1~]#/etc/init.d/skygehastop[root@HAserver1]#/etc/init.d/drbdstart[root@HAserver1]#mount/dev/drbd0/mnt/syncdata/在服務(wù)器A上安裝VM8500軟件當(dāng)服務(wù)器A的狀態(tài)為“Primary/Secondaryld:Consistent”時(shí),可在服務(wù)器A上安裝VM8500軟件的主機(jī)。使用SSH等工具,將安裝包壓縮文件(假設(shè)為Vm8500.tar.gz)拷貝到服務(wù)器LINUX系統(tǒng)下的一個(gè)工作目錄(假設(shè)為/home)下,并使用tar命令解壓縮。[root@HAserver1home]#tarxvfzVm8500.tar.gz在/home目錄下將生成安裝目錄VM8500。進(jìn)入安裝目錄VM8500,進(jìn)行安裝操作:[root@HAserver1home]#cdvm8500[root@localhostvm8500]#shvminstall.shYouhavealreadyinstalledvm8500Alldataandconfigurationwillbelostduringvm8500installation,doyouwanttocontinue?[yes/no]:yesBegintostopvm8500serversBegintostopvm8500server...VmdaemonisalreadystoppedStoppingPostgresql:[OK]StoppostmastersucceededShuttingdownIMGSERVERservices:CImgSigHandler::handle_signalsignalSIGTERMStopvm8500serverssucceeded.Begintouninstallvm8500serversBegintouninstallvm8500server...vm8500isinstalledinthisserver.Begintouninstallvm8500Begintouninstallvmserver...Uninstallvmserverfinished...Uninstallingpdt_imosmayaffectotherproduct,suchasDM/MS/ISC/VXDoyouwanttocontinuetouninstall?[yes/no]:yBegintouninstallpdt_imos...Uninstallpdt_imosfinished...vm8500uninstallsucceededUninstallserverssucceeded!Uninstallvm8500serverssucceeded!vm8500installationbegins...Pleasechoosethelanguageofvm(default0.Chinese):0.Chinese1.EnglishPleaseinputyouchoice:(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultLANGUAGE:0.ChineseWhatversionofVMdoyouwanttoinstall[default:1.stand-aloneVM]:1.stand-aloneVM2.highability(HA)VMPleaseinputyourchoice:2此時(shí)選擇2,即安裝雙機(jī)VMWhatversionofhighabilityVMdoyouwanttoinstall:1.PrimaryVM2.SecondaryVMPleaseinputyourchoice:1此時(shí),安裝主機(jī)選1,安裝從機(jī)選2。Pleaseinputvm8500deviceID[default:vmserver]:此時(shí)輸入安裝的設(shè)備id(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultDeviceID:vmserverPleaseinputserverport[default:5060]:此時(shí)輸入服務(wù)端口號(hào)(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultServerPort:5060PleaseinputSNMPport[default:162]:此時(shí)輸入snmp端口號(hào)(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultSnmpPort:162PleaseinputserverIPaddress[suchas1]:2此時(shí)要輸入服務(wù)的浮動(dòng)IP,要與下面設(shè)置的浮動(dòng)IP(4.2.2配置使用磁盤鏡像設(shè)備的服務(wù))保持一致,并且該IP地址是網(wǎng)絡(luò)中不存在的同網(wǎng)段的IP地址。startinstalldatabaseInstallingpgsqlchangeinstalldirchangepgsqllogdirectorychangepgdatadirectory。。。。。。Installvm8500succeeded在服務(wù)器B上安裝VM3.0軟件當(dāng)服務(wù)器B的狀態(tài)為“Secondary/Secondaryld:Consistent”或“Secondary/Primaryld:Consistent”時(shí),可在服務(wù)器B上安裝VM3.0軟件。使用SSH等工具,將安裝包壓縮文件(假設(shè)為Vm8500.tar.gz)拷貝到服務(wù)器LINUX系統(tǒng)下的一個(gè)工作目錄(假設(shè)為/home)下,并使用tar命令解壓縮。[root@HAserver2home]#tarxvfzVm8500.tar.gz在/home目錄下將生成安裝目錄VM8500。進(jìn)入安裝目錄VM8500,進(jìn)行安裝操作:[root@HAserver2home]#cdvm8500[root@localhostvm8500]#shvminstall.shYouhavealreadyinstalledvm8500Alldataandconfigurationwillbelostduringvm8500installation,doyouwanttocontinue?[yes/no]:yesBegintostopvm8500serversBegintostopvm8500server...VmdaemonisalreadystoppedStoppingPostgresql:[OK]StoppostmastersucceededShuttingdownIMGSERVERservices:CImgSigHandler::handle_signalsignalSIGTERMStopvm8500serverssucceeded.Begintouninstallvm8500serversBegintouninstallvm8500server...vm8500isinstalledinthisserver.Begintouninstallvm8500Begintouninstallvmserver...Uninstallvmserverfinished...Uninstallingpdt_imosmayaffectotherproduct,suchasDM/MS/ISC/VXDoyouwanttocontinuetouninstall?[yes/no]:yBegintouninstallpdt_imos...Uninstallpdt_imosfinished...vm8500uninstallsucceededUninstallserverssucceeded!Uninstallvm8500serverssucceeded!vm8500installationbegins...Pleasechoosethelanguageofvm(default0.Chinese):0.Chinese1.EnglishPleaseinputyouchoice:(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultLANGUAGE:0.ChineseWhatversionofVMdoyouwanttoinstall[default:1.stand-aloneVM]:1.stand-aloneVM2.highability(HA)VMPleaseinputyourchoice:2此時(shí)選擇2,即安裝雙機(jī)VMWhatversionofhighabilityVMdoyouwanttoinstall:1.PrimaryVM2.SecondaryVMPleaseinputyourchoice:2此時(shí),安裝主機(jī)選1,安裝從機(jī)選2。Pleaseinputvm8500deviceID[default:vmserver]:此時(shí)輸入安裝的設(shè)備id(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultDeviceID:vmserverPleaseinputserverport[default:5060]:此時(shí)輸入服務(wù)端口號(hào)(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultServerPort:5060PleaseinputSNMPport[default:162]:此時(shí)輸入snmp端口號(hào)(此時(shí)可直接回車選擇默認(rèn)值)UsedefaultSnmpPort:162PleaseinputserverIPaddress[suchas1]:2此時(shí)要輸入服務(wù)的浮動(dòng)IP,要與下面設(shè)置的浮動(dòng)IP(4.2.2配置使用磁盤鏡像設(shè)備的服務(wù))保持一致,并且該IP地址是網(wǎng)絡(luò)中不存在的同網(wǎng)段的IP地址。startinstalldatabaseInstallingpgsqlchangeinstalldirchangepgsqllogdirectorychangepgdatadirectory。。。。。。Installvm8500succeeded配置VM3.0的雙機(jī)功能啟動(dòng)skygeha在服務(wù)器A上啟動(dòng)skygeha后,需立即在服務(wù)器B上啟動(dòng)skygeha,以免服務(wù)器A長時(shí)間等待服務(wù)器B。[root@HAserver1~]#skygeha_adminSKYGEHA6.0ConfigurationUtilityToolsTheconfhaprovidesacommand-lineuserinterfacethatenablestomonitorandmanageSkygeHAsystemsandservices.Youcanobtainhelpbyenteringhelpandoneofthefollowingcommands:node|loglevel|mail|service|help|quitHA>nodeSupportthefollowsubcommands:config|start|stop|status|synconfigDescription:config:Setupthesystemsofa2-nodeHA.start:Startskygehaserveronthenode.stop:Stopskygehaserveronthendoe.status:Getlocalskygehaserverstatus.synconfig:CopylocalskygehaconfigfiletoanothernodeHA:Node>start0)HAserver1[localnode]1)HAserver2quitHA:Service>Chooseservicetostart:0PerformingskygehastartPerformingDRBDstartDRBDisalreadystarted.CompletedDRBDstartStartingSkygeha...done.CompletedskygehastartPleaseusestatuscommandtochecktheclusterstat[root@HAserver2~]#skygeha_adminSKYGEHA6.0ConfigurationUtilityToolsTheconfhaprovidesacommand-lineuserinterfacethatenablestomonitorandmanageSkygeHAsystemsandservices.Youcanobtainhelpbyenteringhelpandoneofthefollowingcommands:node|loglevel|mail|service|help|quitHA>nodeSupportthefollowsubcommands:config|start|stop|status|synconfigDescription:config:Setupthesystemsofa2-nodeHA.start:Startskygehaserveronthenode.stop:Stopskygehaserveronthendoe.status:Getlocalskygehaserverstatus.synconfig:CopylocalskygehaconfigfiletoanothernodeHA:Node>start0)HAserver11)HAserver2[localnode]quitHA:Service>Chooseservicetostart:1PerformingskygehastartPerformingDRBDstartStartingDRBDresources:[d0s0n0]..done.CompletedDRBDstartStartingSkygeha...done.CompletedskygehastartPleaseusestatuscommandtochecktheclusterstat配置使用磁盤鏡像設(shè)備的服務(wù)首先檢查主從機(jī)上的drbd狀態(tài),應(yīng)保持正常運(yùn)行,但確保主從機(jī)都不要掛載磁盤鏡像設(shè)備,掛載的動(dòng)作將由雙機(jī)軟件自動(dòng)完成。[root@HAserver1mnt]#umount/dev/drbd0我們需要在skygeHA正常工作時(shí)執(zhí)行skygeha_admin工具的service配置子工具。注意:skygeHA采用時(shí)間戳來判斷兩個(gè)節(jié)點(diǎn)的配置是否同步,所以不要輕易修改系統(tǒng)時(shí)間。如果確實(shí)需要修改系統(tǒng)時(shí)間,請(qǐng)先停止skygeHA,修改完系統(tǒng)時(shí)間后,再重新啟動(dòng)skygeHA。service配置命令Service配置子工具包含add、del、enable、disable、relocate、modify等功能。如下:[root@HAserver1~]#skygeha_adminSKYGEHA6.0ConfigurationUtilityToolsTheconfhaprovidesacommand-lineuserinterfacethatenablestomonitorandmanageSkygeHAsystemsandservices.Youcanobtainhelpbyenteringhelpandoneofthefollowingcommands:node|loglevel|mail|service|help|quitHA>serviceSupportthefollowsubcommands:add|del|mod|enable|disable|relocate|show|finishDescription:add:Addsaclusterservicetotheclusterdatabase.Thecommandpromptsyouforinformationaboutserviceresourcesandpropertiesdel:Deletesthespecifiedservice.mod:Modifiestheresourcesorpropertiesofanexistingservice.enable:Enablesthespecifieddisabledserviceandrestartsit.disable:Disablesthespecifiedrunningservice.Adisabledserviceisstillconfiguredonaclustersystem,butitisnolongerrunning.Youmustenableadisabledservicetorestartit.relocate:Relocatesthespecifiedrunningservicetotheothernode.Iftheothernodeisdown,theservicewillbestartedupwhenitjoinsthecluster.show:Displaysthecurrentstatusofthespecifiedservice.finish:exitservicepropmt,swithtoHA>.HA:Service>添加svcvm服務(wù)執(zhí)行serviceaddHA:Service>add輸入服務(wù)的名字和類型HA:Service>servicename:svcvmSvcvm名字可以任意取。配置服務(wù)的優(yōu)先節(jié)點(diǎn)如果該服務(wù)有優(yōu)先節(jié)點(diǎn),當(dāng)優(yōu)先節(jié)點(diǎn)啟動(dòng)時(shí),這個(gè)服務(wù)將會(huì)首先選擇在優(yōu)先節(jié)點(diǎn)上運(yùn)行。優(yōu)先節(jié)點(diǎn)缺省值為None,即不選擇優(yōu)先節(jié)點(diǎn)。HA:Service>Preferrednodeid(0/1/None)[None]:(說明:此處請(qǐng)直接回車即可,無需輸入)配置服務(wù)的用戶腳本配置服務(wù)的用戶腳本是啟動(dòng)和停止應(yīng)用程序的腳本。配置服務(wù)的用戶腳本時(shí),請(qǐng)輸入全路徑名。一個(gè)服務(wù)最多只能配置一個(gè)用戶腳本。HA:Service>Userscript(e.g,"/etc/init.d/myapp"):/usr/local/hcha/vmsv.sh配置服務(wù)檢測腳本HA:Service>Checkscript(e.g,"/opt/skygeha/usercheck/mycheck"orNone)[None]:/usr/local/hcha/chkvmsv.sh配置服務(wù)檢測腳本時(shí)需要指定如下的參數(shù):Checkinterval:檢測服務(wù)的時(shí)間間隔,缺省值是5秒。Checktimeout:等待檢測結(jié)果的超時(shí)時(shí)長,缺省值是30秒。Maxerrorcount:運(yùn)行檢測腳本連續(xù)出錯(cuò)的最大次數(shù),缺省是3次。當(dāng)達(dá)到此次數(shù)時(shí),認(rèn)為該服務(wù)在該機(jī)器上已出錯(cuò),需要進(jìn)行切換。HA:Service>Checkinterval[5]:HA:Service>Checktimeout[30]:HA:Service>Checkmaxerrorcount[3]:設(shè)置啟動(dòng)/停止服務(wù)超時(shí)時(shí)間服務(wù)啟動(dòng)/停止的超時(shí)時(shí)間,即skygeHA能夠接受的服務(wù)啟動(dòng)或者停止的最大時(shí)間。如果用戶應(yīng)用在此時(shí)間范圍內(nèi)沒有成功啟動(dòng)或者停止,skygeHA即認(rèn)為服務(wù)啟動(dòng)或者停止失敗。啟動(dòng)服務(wù)的時(shí)間=啟動(dòng)drbd的時(shí)間+mount設(shè)備的時(shí)間+啟動(dòng)IP的時(shí)間+啟動(dòng)用戶腳本的時(shí)間啟動(dòng)drbd的時(shí)間=磁盤分區(qū)大小/drbd網(wǎng)絡(luò)帶寬+余量例如:系統(tǒng)配置了2個(gè)drbd設(shè)備,分區(qū)大小分別為500MB、1GB,使用同一個(gè)網(wǎng)絡(luò)接口,網(wǎng)絡(luò)帶寬為100Mbps,則啟動(dòng)drbd的時(shí)間=(500*8/100+1024*8/100)*2+100=344停止服務(wù)的時(shí)間=停止用戶腳本的時(shí)間+停止IP的時(shí)間+umount設(shè)備的時(shí)間+停止drbd的時(shí)間停止服務(wù)的超時(shí)時(shí)間的估算方法可以參考啟動(dòng)服務(wù)的超時(shí)時(shí)間的估算方法HA:Service>starttimeout[300]:HA:Service>stoptimeout[300]:為svcvm服務(wù)的配置一個(gè)浮動(dòng)IP地址服務(wù)可以綁定浮動(dòng)IP地址,浮動(dòng)IP地址隨著服務(wù)而浮動(dòng),也就是說這個(gè)IP地址所在的節(jié)點(diǎn)也就是服務(wù)所在的節(jié)點(diǎn)。一個(gè)服務(wù)最多可以配置16個(gè)浮動(dòng)IP地址。配置浮動(dòng)IP地址時(shí),必須正確輸入如下參數(shù):Netinterfacecount:是指浮動(dòng)IP的個(gè)數(shù)Netinterface:浮動(dòng)IP地址綁定的網(wǎng)卡。Netmask:浮動(dòng)IP地址的子網(wǎng)掩碼。Broadcast:浮動(dòng)IP地址的廣播地址。HA:Service>Netinterfacecount(0,16)[1]:HA:Service>NetIPaddress(e.g.):2此時(shí),輸入已配置的服務(wù)地址HA:Service>Netinterface[eth0]:HA:Service>Netmask[]:HA:Service>Netbroadcast(e.g.55):55配置磁盤設(shè)備在配置磁盤設(shè)備時(shí),請(qǐng)指定相應(yīng)的drbd設(shè)備。一個(gè)服務(wù)最多可以配置16個(gè)磁盤設(shè)備。HA:Service>Devicenumber(0-16)[0]:1Devicenumber即共享磁盤分區(qū)數(shù)量。如果使用共享磁盤,要使用幾個(gè)就輸入數(shù)字幾。SkygeHA6.0最多可以支持16個(gè)磁盤設(shè)備。HA:Service>Devicename(e.g/dev/sda1or/dev/drbd0):/dev/drbd0Devicename,共享磁盤分區(qū)名稱。這里可以使用共享磁盤上的分區(qū)名稱,也可以使用DRBD設(shè)備名,如/dev/drbd0。配置磁盤設(shè)備的mount信息需要指定的參數(shù)如下:“Deviceowner”,mount共享磁盤分區(qū)時(shí)的用戶名(UID)。對(duì)于普通用戶應(yīng)用程序,選擇root用戶即可;對(duì)于數(shù)據(jù)庫應(yīng)用,那么就需要選擇oracle或者mysql用戶了?!癉evicegroup”,mount共享磁盤分區(qū)時(shí)的組名(GID)。對(duì)于普通用戶應(yīng)用程序,選擇root用戶即可;對(duì)于數(shù)據(jù)庫應(yīng)用,那么就需要選擇dba或者ointall用戶了。“Devicemode”,即mount共享磁盤分區(qū)時(shí)的訪問權(quán)限,一般為755?!癉evicemountpoint”,即共享磁盤分區(qū)在系統(tǒng)上的掛載點(diǎn)?!癉evicemountoptions”,即mount共享磁盤分區(qū)時(shí)的選項(xiàng),一般選擇rw,sync。“Devicemountforceunmnt”,是指定umount共享磁盤分區(qū)時(shí)是否殺死仍然在該分區(qū)上運(yùn)行的進(jìn)程?!癉evicemountfile-systemtype”,即共享磁盤分區(qū)上的文件系統(tǒng)類型,一般選擇EXT3?!癉evicecheckdevice”,指定是否檢查磁盤設(shè)備,默認(rèn)為yes?!癉eviceisSCSI”,指定共享磁盤設(shè)備是否是SCSI設(shè)備,默認(rèn)為no,請(qǐng)確認(rèn)一下您的共享磁盤設(shè)備的類型,如果是SCSI設(shè)備請(qǐng)選擇yes“Devicechecktimeout”,是磁盤檢測的超時(shí)時(shí)間,默認(rèn)為300秒。一般情況下選默認(rèn)值就可以,如果磁盤負(fù)載比較大,請(qǐng)適當(dāng)調(diào)大超時(shí)時(shí)間。HA:Service>Deviceowner:rootHA:Service>Devicegroup:rootHA:Service>Devicemode(e.g.755):755HA:Service>Devicemountpoint(e.g./opt/app):/mnt/syncdataHA:Service>Devicemountoptions(e.g.rw):rwHA:Service>Devicemountforceumount(yes/no)[yes]:yesHA:Service>Devicemountfile-systemtype(e.g.ext3):ext3HA:Service>Devicecheckdevice(yes/no)[yes]:此處請(qǐng)參照如下注意事項(xiàng)進(jìn)行配置注意:如果服務(wù)器是CentOS5.3系統(tǒng),那么請(qǐng)輸入yes:如果服務(wù)器是CentOS6.2系統(tǒng),那么請(qǐng)輸入no:HA:Service>DeviceisSCSI(yes/no)[no]:noHA:Service>Devicechecktimeout[300]:300是否disable服務(wù)如果設(shè)為“yes”,服務(wù)將不會(huì)立即被啟動(dòng),只能以后由用戶手動(dòng)選擇節(jié)點(diǎn)啟動(dòng)。如果設(shè)為“no”,服務(wù)將會(huì)立即在本地節(jié)點(diǎn)啟動(dòng)。一般建議這里選擇yes,等服務(wù)配置完成后,手工選擇節(jié)點(diǎn)來啟動(dòng)服務(wù)HA:Service>Disableservice(yes/no)[yes]:yes設(shè)置停止服務(wù)失敗時(shí)是否reboot設(shè)備HA:Service>Rebootsystemifstoptheservicefailed(yes/no)[yes]:no確認(rèn)已配置的服務(wù)信息,完成服務(wù)的添加操作servicename:svcvmservicetype:hadisabled:yesuserscript:/usr/local/hcha/vmsv.shcheckscript:/usr/local/hcha/chkvmsv.shcheckinterval:10checktimeout:10maxerrorcount:10IPaddress0:2netinterface0:eth1netmask0:broadcast0:55device0:/dev/drbd0mountpoint,device0:/mnt/syncdatamountfstype,device0:ext3mountoptions,device0:rwforceunmount,device0:yesowner,device0:rootgroup,device0:rootmode,device0:755starttimeout:300stoptimeout:300rebootsystemifstopservicefailed:noAddsvcvmserviceasshown?(yes/no/?)yesAddedsvcvm.提示:當(dāng)配置完畢后,可以使用exit命令退出serviceHA:Service>exitHA>查看skygeha服務(wù)狀態(tài)完成skygeha服務(wù)的配置操作后,查看skygeha狀態(tài):[root@HAserver1~]#skygeha_adminSKYGEHA6.0ConfigurationUtilityToolsTheconfhaprovidesacommand-lineuserinterfacethatenablestomonitorandmanageSkygeHAsystemsandservices.Youcanobtainhelpbyenteringhelpandoneofthefollowingcommands:node|loglevel|mail|service|help|quitHA>nodeSupportthefollowsubcommands:config|start|stop|status|synconfigDescription:config:Setupthesystemsofa2-nodeHA.start:Startskygehaserveronthenode.stop:Stopskygehaserveronthendoe.status:Getlocalskygehaserverstatus.synconfig:CopylocalskygehaconfigfiletoanothernodeHA:Node>statusSkygeHAConfiguration(SkygeHA6.0):FriOct0816:30:14CST2010Memberstatus:MemberIdSystemstatusHAserver10UpHAserver21UpChannelstatus:NameTypeStatushbhb20<-->hbhb21networkONLINEServicestatus:NameOnHAserver1OnHAserver2svcvmdisableddisabledHA:Node>啟動(dòng)服務(wù)添加完服務(wù)后,我們就可以手工啟動(dòng)服務(wù)器了HA:Service>enable0)svcvmquitHA:Service>Chooseservicetoenable:00)HAserver11)HAserver2quitHA:Service>Choosenodetoenable:0Enableservice0succeded!HA:Service>查看svcvm服務(wù)的狀態(tài)HA:Service>exitHA>nodeSupportthefollowsubcommands:config|start|stop|status|synconfigDescription:config:Setupthesystemsofa2-nodeHA.start:Startskygehaserveronthenode.stop:Stopskygehaserveronthendoe.status:Getlocalskygehaserverstatus.synconfig:CopylocalskygehaconfigfiletoanothernodeHA:Node>statusSkygeHAConfiguration(SkygeHA6.0):FriOct0816:39:12CST2010Memberstatus:MemberIdSystemstatusHAserver10UpHAserver21UpChannelstatus:NameTypeStatushbhb20<-->hbhb21networkONLINEServicestatus:NameOnHAserver1OnHAserver2svcvmrunningstoppedHA:Node>設(shè)置服務(wù)器重啟時(shí)自動(dòng)啟動(dòng)skygeha與drbd服務(wù)在服務(wù)器A配置如下命令:[root@HAserver1ha-h3c]#chkconfigskygehaon[root@HAserver1ha-h3c]#chkconfigdrbdon

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論