O管理對O數(shù)據(jù)庫進(jìn)行容災(zāi)VVRVVR_第1頁
O管理對O數(shù)據(jù)庫進(jìn)行容災(zāi)VVRVVR_第2頁
O管理對O數(shù)據(jù)庫進(jìn)行容災(zāi)VVRVVR_第3頁
O管理對O數(shù)據(jù)庫進(jìn)行容災(zāi)VVRVVR_第4頁
O管理對O數(shù)據(jù)庫進(jìn)行容災(zāi)VVRVVR_第5頁
已閱讀5頁,還剩19頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

1、LOGObeikezhangYOUR COMPANY NAME IS HERE專業(yè)丨專注丨精心I卓越隨心編輯,值得下翩有!【0管理】對0數(shù)據(jù)庫進(jìn)行容災(zāi)VVRVVRXXXXXXXX集團(tuán)企業(yè)有限公司Please enter your company's name and contentv對 Oracle 數(shù)據(jù)庫進(jìn)行容災(zāi)(VeritasVolumeReplicator(WR)2008-08-1307:12:08標(biāo)簽:數(shù)據(jù)庫容災(zāi)推送到技術(shù)圈隨著全球信息化時(shí)代的到來,信息數(shù)據(jù)越來越成為企業(yè)關(guān)注的焦點(diǎn),即在各種自然災(zāi)害或者人為破壞的情況下,如何保證生產(chǎn)數(shù)據(jù)的安全和關(guān)鍵業(yè)務(wù)的不中斷運(yùn)行。傳統(tǒng)的保護(hù)方

2、法離 線備份、備份介質(zhì)異地保存在一定程度上可以解決上述問題,但為了能夠?qū)I(yè)務(wù)系統(tǒng)提供更 高的實(shí)時(shí)性和可靠性,保證關(guān)鍵業(yè)務(wù)7x24不中斷,應(yīng)對激烈的市場競爭和提高客戶滿意度,企業(yè)必須在IT系統(tǒng)圍繞“連續(xù)”(BC)主題進(jìn)行構(gòu)建,實(shí)施業(yè)務(wù)連/容災(zāi)備份計(jì)劃,包括業(yè)務(wù)連續(xù)性、高可用性管理、容災(zāi)、數(shù)據(jù)復(fù)制和恢復(fù)方案、安全等,下面就對數(shù)據(jù)復(fù)制技術(shù)做 一個簡單的介紹。根據(jù)數(shù)據(jù)復(fù)制運(yùn)行的位置,可以將數(shù)據(jù)復(fù)制方式分為以下四種:基于存儲(Storage-Based):代表廠商有 EMCSRDF、IBMPPRC/GDPS 、HPBusinessCopy 、HDSTrueCopy等,特點(diǎn)對主機(jī)透明,對應(yīng)用系統(tǒng)的影響較小

3、,技術(shù)成熟,有較多的成功案例,但是投資較大,對網(wǎng)絡(luò)連接的要求也較高?;诜?wù)器(Host-based):代表廠商主要是 Symantec 公司的 VeritasVolumeReplicator(VVR),是存儲卷的復(fù)制技術(shù)。需要占用主機(jī)一定的系統(tǒng)資源?;诖鎯粨Q機(jī)(SAN-Based):運(yùn)行于掛接在存儲網(wǎng)絡(luò)上的專用設(shè)備中,代表廠商有CISCO的 SANTap ,F(xiàn)alconStorIPStor ,TopioSANsafe , DataCoreSANsymphony,Asynchrono usInternetMirrori ng(AIM)等。基于數(shù)據(jù)庫/軟件應(yīng)用:代表廠商有 OracleDat

4、aGuard ,QuestSharePlex ,IBM-DB2 的遠(yuǎn)程 Q復(fù)制,SYBASE的復(fù)制服務(wù)器(ReplicationServer)等,這些技術(shù)都是對數(shù)據(jù)邏輯操作的復(fù)制,屬于邏輯數(shù)據(jù)復(fù)制,而其它3種復(fù)制的是數(shù)據(jù)卷中的數(shù)據(jù)變化,屬于物理數(shù)據(jù)復(fù)制。典型的邏輯數(shù)據(jù)復(fù)制是通過數(shù)據(jù)庫日志實(shí)現(xiàn)的,優(yōu)點(diǎn)是硬件投資小,對生產(chǎn)系統(tǒng)的影響比較小,對主、備用系統(tǒng)的硬件平臺沒有選擇性;可以在廣域網(wǎng)范圍內(nèi)使用。但它對數(shù)據(jù)庫系統(tǒng)有嚴(yán)格的要求,并且主、備用系統(tǒng)必須使用相同的數(shù)據(jù)庫版本。上面介紹的主要的各廠商方案和產(chǎn)品可以參見下圖:本文主要介紹基于主機(jī)和邏輯卷的數(shù)據(jù)復(fù)制VVR。VERITAS的VVR(Veritas

5、VolumeReplicator)是用于有效的災(zāi)難恢復(fù)的數(shù)據(jù)復(fù)制軟件,可以連續(xù)對應(yīng)用數(shù)據(jù)進(jìn)行一個或者多個的拷貝保護(hù)。具有的優(yōu)點(diǎn)主要有:高性能,距離不限,支持異構(gòu)的存儲和操作系統(tǒng),對數(shù)據(jù)的連續(xù)保護(hù),支持同步和異步復(fù)制。VVR系統(tǒng)架構(gòu)如下圖:VVR具有的系統(tǒng)特性如下:(1) 最高支持32個遠(yuǎn)程節(jié)點(diǎn),可以通過基于ip的LAN或者 WAN網(wǎng)絡(luò);(2) 通過對邏輯卷的同步和異步復(fù)制模式,保證數(shù)據(jù)的完整性和一致性;確保備用節(jié)點(diǎn)和主節(jié)點(diǎn)的數(shù)據(jù)具有相同的寫入順序;(4) 支持對網(wǎng)絡(luò)帶寬的管理和定義,支持多鏈路的連接;(5) 支持對備用節(jié)點(diǎn)的脫機(jī)操作,以便在備用節(jié)點(diǎn)進(jìn)行查詢(例如DSS決策支持系統(tǒng))或者數(shù)據(jù)備份

6、;(6) 易管理:同時(shí)支持命令行和圖形界面(VEA);(7) 主備節(jié)點(diǎn)之間支持多種異構(gòu)存儲;(8) 支持不同操作系統(tǒng)平臺之間的復(fù)制;(注:在本文中,因?yàn)樵O(shè)計(jì)到Oracle數(shù)據(jù)庫的復(fù)制,所以主備操作系統(tǒng)必須同一類型,比如必須都是Solaris平臺,版本完全相同的 Oracle版本)(9) 支持主流關(guān)系數(shù)據(jù)庫系統(tǒng),包括Oracle,DB2,Sybase 和Informix ,數(shù)據(jù)文件的存放格式包括邏輯卷(裸設(shè)備)或者文件系統(tǒng);(10) 支持共享的集群環(huán)境中的邏輯卷復(fù)制,比如OracleRAC(RealApplicationClusters)(注:本文中采用的是單節(jié)點(diǎn)Oracle復(fù)制);(11) 支

7、持 Veritasvolumeset;(12) 支持 PDC(PortableDataContainer)環(huán)境的數(shù)據(jù)復(fù)制;VVR數(shù)據(jù)復(fù)制系統(tǒng)主要由下面五個組件組成:eplicatedVolumeGroup(RVG)復(fù)制卷組RVG是位于VxVM 磁盤組(DG)內(nèi)的一組邏輯卷, RVG隸屬于磁盤組的一部分,通過定義這 些邏輯卷,應(yīng)用對邏輯卷的寫操作都可以保持以主節(jié)點(diǎn)上同樣的順序,來寫到備用節(jié)點(diǎn)上。對于多數(shù)數(shù)據(jù)庫系統(tǒng)來說,都是由一些特定的進(jìn)程完成對磁盤的寫操作,比如Oracle系統(tǒng)中的LOWR和DBWR進(jìn)程,而這些寫操作總是依照著一定順序,從而來保證實(shí)例恢復(fù)中數(shù)據(jù)的一致和完整。比如數(shù)據(jù)庫變化通常在寫

8、入日志文件后才會寫入數(shù)據(jù)文件,所以當(dāng)日志文件和數(shù)據(jù)文件屬于要復(fù)制的不同邏輯卷的時(shí)候,它們必須被定義到同一組RVG中。每組RVG最多可以包括2048個數(shù)據(jù)卷。下面介紹 SRL和RLINK,它們也包括在 RVG中。RVG包括一個SRL o數(shù)據(jù)在StorageReplicatorLog(SRL)SRL用于記錄RVG中數(shù)據(jù)寫操作的日志,并循環(huán)被使用。每個寫入RVG中的卷之前,首先要寫到主節(jié)點(diǎn)的SRL中從VxVM的角度來看,SRL是一個單獨(dú)的卷,因?yàn)樗械膶懖僮魇紫纫獙懙絊RL中,這個卷需要有較好的寫性能,所以多數(shù)情況下需要對這個卷進(jìn)行條帶化,并且在不同的盤上mirr0J以保護(hù)數(shù)據(jù),同時(shí)數(shù)據(jù)卷和 SRL

9、卷最好分布在不同的物理磁盤上以得到更好的性能。不允許人工直接對 SRL進(jìn)行訪問。eplicatio nLi nk RLINK用于連接主 RVG和備用RVG之間的一個“鏈接",一個主的RVG最多可以有32個RLINK??梢远xRLINK的多個屬性來調(diào)整數(shù)據(jù)復(fù)制的參數(shù),比如指定復(fù)制的網(wǎng)絡(luò)。DataCha ngeMap(DCM)eplicatedDataSet(RD 一個RDS包括了所有的主節(jié)點(diǎn)和備用節(jié)點(diǎn)的復(fù)制卷組(RVG)。RDS不是一個具體存在的對象,而是一個 VVR復(fù)制技術(shù)中的一個概念。在異步模式下VVR的數(shù)據(jù)復(fù)制和數(shù)據(jù)流向在同步模式下VVR的數(shù)據(jù)復(fù)制和數(shù)據(jù)流向另外,VVR 是 Ve

10、ritasVolumeManager(VxVM) 的一個單獨(dú)的 option ,需要單獨(dú)的 licenseVeritasVolumeReplicator 的安裝主備節(jié)點(diǎn)硬件和軟件配置和版本如下:主節(jié)點(diǎn)機(jī)器名:lxsfrac01SunMicrosystemsSu nFireX4100Server操作系統(tǒng) solaris10u4x86 64VVR 版本:VeritasVolumeReplicator5.0GAOracle 版本:Oracle10gR2EnterpriseEdition磁盤陣列:SAN/HDSAMS1000Public 網(wǎng)卡:e1000g0 私有(復(fù)制)網(wǎng)卡:e1000g1備用節(jié)點(diǎn)機(jī)

11、器名:lxsfrac02軟硬件環(huán)境與主節(jié)點(diǎn)相同兩個節(jié)點(diǎn)分別安裝VVR和vxfs,安裝方法相同,以lxsfrac02為例:放入安裝介質(zhì),一般 Solaris都由vold進(jìn)程自動 mountC _,如果需要手工mount : mount -Fhsfs -oro/dev/dsk/c0t6d0s2/cdrom rootlxsfrac02#cd./volume_replicator/rootlxsfrac02#ls copyrightdocsinstallvvrpkgsrelease_notesscriptstoolsuninstallvvr rootlxsfrac02#ls-ltotal24_rw-r

12、-r-1rootroot476Dec152006copyrightdrwxrwxr-x2rootroot512Jun2110:13docs-rwxr-xr-x1rootroot2283Apr142007installvvr drwxrwxr-x3rootroot1024Jun2110:13pkgs drwxrwxr-x2rootroot512Jun2110:13release_notes drwxrwxr-x3rootroot512Jun2110:13scripts drwxrwxr-x3rootroot512Jun2110:13tools -rwxr-xr-x1rootroot2283Apr

13、142007uninstallvvr rootlxsfrac02#./installvvrlxsfrac02VeritasVolumeReplicator5.0lnstallationProgramCopyright(c)2007SymantecCorporation.Allrightsreserved.Symantec,theSymantecLogoaretrad emarksorregisteredtrademarksofSymantecCorporationoritsaffiliatesintheU.S.andothercountri es.Othernamesmaybetrademar

14、ksoftheirrespectiveowners.TheLicensedSoftwareandDocumentationaredeemedtobe"commercialcomputersoftware"and" commercialcomputersoftwaredocumentation"asdefinedinFARSections12.212andDFARSSecti on227.7202.Logsforinstallvvrarebeingcreatedin/var/tmp/installvvr-mrk46Y.Initialsystemcheck:

15、CheckingVVRinstallationonlxsfrac02notinstalledCheckingarchitectureonlxsfrac02i386VeritasVolumeReplicator5.0lnstallationProgramCheckingsystemlicensing Installinglicensingpackages VVRisnotlicensedonlxsfrac02EnteraVVRIicensekeyforlxsfrac02:* *successfullyregisteredo nl xsfrac02 PermanentVVRIicenseregis

16、teredonlxsfrac02Doyouwanttoenteranotherlicensekeyforlxsfrac02?y,n,q(n) VeritasVolumeReplicator5.0lnstallationProgram Checkinginstalledpackagesonlxsfrac02VeritasVolumeReplicator5.0lnstallationProgram VVRcanbeinstalledwithoutoptionalpackagestoconservediskspace. Additionalpackagesaretypicallyinstalledt

17、osimplifyfutureupgrades.1) RequiredVeritasVolumeReplicatorpackages-855MBrequired2) AIIVeritasVolumeReplicatorpackages-861MBrequired3) StorageFoundationEnterprisepackages-911MBrequired Selectthepackagestobeinstalledonallsystems?1-3,q,?(3)2 VeritasVolumeReplicator5.0InstallationProgramThefollowingVVRp

18、ackageswillbeinstalled:VRTSperlVeritasPerl5.8.8Redistribution VRTSvlicVeritasLicensingVRTSicscoSymantecCommonInfrastructure VRTSpbxSymantecPrivateBranchExchange VRTSsmfSymantecServiceManagementFramework VRTSatSymantecProductAuthenticationService VRTSobc33VeritasEnterpriseAdministratorCoreService VRT

19、SobVeritasEnterpriseAdministratorService VRTSobguiVeritasEnterpriseAdministratorVRTSccgVeritasEnterpriseAdministratorCentralControlGrid VRTSmhVeritasStorageFoundationManagedHostbySymantec VRTSaaVeritasEnterpriseAdministratorActionAgent VRTSsptVeritasSoftwareSupportTools SYMClmaSymantecLicenseInvento

20、ryAgent VRTSvxvmVeritasVolumeManagerBinaries VRTSdsaVeritasDatacenterStorageAgentVRTSfsproVeritasFileSystemManagementServicesProviderVRTSvmmanVeritasVolumeManagerManualPages VRTSvmdocVeritasVolumeManagerDocumentation PressReturntocontinue:.continued:VRTSdcliVeritasDistributedCommandLinelnterface VRT

21、SallocVeritasVolumeManagerlntelligentStorageProvisioning VRTSvmproVeritasVolumeManagerManagementServicesProvider VRTSddlprVeritasDeviceDiscoveryLayerServicesProvider VRTSvrproVeritasVolumeReplicatorClientExtensionandProviderfor VeritasEnterpriseAdministratorVRTSvcsvrVeritasClusterServerAgentsforVVR

22、VRTSjreVeritasJavaRuntimeEnvironmentRedistribution VRTSjre15VeritasJavaRuntimeEnvironmentRedistribution VRTSwebVeritasJavaWebServerVRTSvrwVeritasVolumeReplicatorWebConsoleVRTSvrdocVeritasVolumeReplicatorDocumentationPressReturntocontinue:CheckingforanyAPdriverissuesonlxsfracO2NoneAcopyofapreviousVxV

23、MconfigurationispresentonthesystemlxsfracO2.DoyouwanttorestoreandreusethepreviousVxVMconfigurationofsystemlxsfracO2y,n,q,?(y)n VeritasVolumeReplicator5.0InstallationProgramInstallingVVR:100% InstallationcompletedsuccessfullyonallsystemsItisoptionaltoconfigureVVRnow .I fyouchoosetoconfigureVVRlater,y

24、oucaneitherdosomanually, orruntheinstallvvr-configurecommand.Theproductinstallationscriptscanbefoundin/opt/VRTS/ installdirectoryAreyoureadytoconfigureVVR?y,n,q(y) Theenclosure-basednamingschemeisafeatureofVeritasVolumeManager.Itallowsonetoreferen cedisksusingasymbolicnamethatismoremeaningfulthanthe

25、operatingsystem'snormaldeviceac cessname.Thissymbolicnameistypicallyderivedfromthearrayname.Doyouwanttosetuptheenclosure-basednamingscheme?y,n,q,?(n)yVeritasVolumeReplicator5.0InstallationProgramVeritasVolumeManagerdefaultdiskgroupnameconfiguration:ManyVeritasVolumeManagercommandsaffecttheconten

26、tsorconfigurationofadiskgroup.Such commandsrequirethattheuserspecifyadiskgroup.Thisisaccomplishedbyusingthe-goptionofac ommandorsettingtheVXVM_DEFAULTDGenvironmentvariable.Analternativetothesetwometho dsforsomecommandsistoconfigurethenameofthedefaultdiskgroupofasystem.Note:Thedefaultdiskgroupfeature

27、isnotavailablewiththeDCLIvxadm(1M)andvxquery(1M)com mands.Whenusingthesecommands,arequireddiskgroupmustbeexplicitlyidentifiedusingthe-g option.Doyouwanttosetupadefaultdiskgroupforeachsystem?y,n,q,?(y)nVeritasVolumeReplicator5.0InstallationProgramFollowingarethedefaultportsthatwillbeusedbyVVRonlxsfra

28、c02:PortforVVRheartbeatcommunication:4145Portforvradminddaemon:8199Portforvxrsyncddaemon:8989Portsfordatareplication:Anonymous-PortsTheportsindicatedforVVRheartbeatsandvradmindarelANAassigned.TheportsettingsshouldbeidenticalforsystemsthatwillbepartofthesameReplicatedDataSet.They shouldalsobeidentica

29、lforallthesystemsinacluster.DoyouwanttochangeanyoftheVVRportsonlxsfrac02?y,n,q(n)VeritasVolumeReplicator5.0InstallationProgramVVRStatisticsCollectionToolTheVVRadministrativedaemonvradmindcancollectandmaintainvarious statisticswhicharehelpfulinsolvingVVRperformanceissues.This collectioncanbetunedusin

30、gafewtunableslikethefrequencyfor gatheringthestatisticsandthenumberofdaysforwhichthecollected statisticsshouldbepreserved,afterwhichtheearlierstatisticsare automaticallydeleted.ThefrequencyofVVRstatisticscollectiononlxsfrac02issettoper10seconds.DoyouwanttochangethefrequencyofVVRstatisticscollectiono

31、nlxsfrac02?y,n,q(n)ThemaximumnumberofdaysforwhichVVRstatisticscanberetainedissetto3onlxsfrac02DoyouwanttochangethemaximumnumberofdaysforretainingVVRstatisticsonlxsfrac02?y,n,q( n)VeritasVolumeReplicator5.0lnstallationProgramConfigurationofVVRtunables(Fortheadvanceduser)DoyouwanttoviewormodifyVVRtuna

32、blesonlxsfrac02?y,n,q,?(n) VeritasVolumeReplicator5.0InstallationProgram VerifytheinstallsystemsFullyQualifiedHostnames.Queryingfullyqualifieddomainnameofhost"lxsfrac02"failPressReturntocontinue:UnabletofindFQHNforlxsfrac02!Enterthefullyqualifiedhostnameof"lxsfrac02"or'QUIT&#

33、39;toquitinstall.Enterthefullyqualifiedhostname:lxsfrac02 VeritasVolumeReplicator5.0InstallationProgram Choosehowthisinstallwillbemanaged.Thisproductcanconfiguredoneofthetwofollowingways: *StorageFoundationManagementServermanagedhost(Recommended) *StandalonehostPre-requisitesforStorageFoundationMana

34、gementServermanagedhost: *AStorageFoundationManagementServer(SFMS)isconfigured *SFMSshouldbecurrentlyrunningandfullyoperational.*AuthenticationBrokerthatisusedbySFMSshouldberunning.Thefollowinginformationwouldberequestedduringconfiguration:*ThehostnameoftheSFMS*PreviouslysetSFMSagentaccountpasswordT

35、herearenopre-requisitesfordeployingasastandalonehost. EnablingStorageFoundationManagementServermanagementsimplifiesandimprovesmanage mentofthecomplexdatacenterresources,reducingplannedandunplanneddowntime.EnableStorageFoundationManagementServerManagement?y,n,q(y)nVeritasVolumeReplicator5.0lnstallati

36、onProgramVerifytheinstallsystemsFullyQualifiedHostnames.ConfiguringVEAinSTANDALONEmodeon"lxsfrac02"okConfiguringgridnodeon"lxsfrac02"okRegisteringgridnodeon"lxsfrac02"okConfiguringactionagenton"lxsfrac02"okRegisteringactionagenton"lxsfrac02"okRegiste

37、ringStorageAgenton"lxsfrac02"okDoyouwanttostartVeritasVolumeReplicatorprocessesnow?y,n,q(y)VeritasVolumeReplicator5.0lnstallationProgramStartingVVR:100% StartupcompletedsuccessfullyonallsystemsYoudeclinedtosetupthenameofthedefaultdiskgroupforlxsfrac02.Installationlogfiles,summaryfile,andre

38、sponsefilearesavedat:/opt/VRTS/install/logs/installvvr-mrk46YToenableDynamicMulti-Pathing(DMP),MPxlOmustbedisabled.RefertotheStorageFoundationR eleaseNotesforfurtherdetailsondisablingMPxIO.檢查 vradmindeamon :rootlxsfrac02#ps-ef|grepvrad|grep-vgreproot98081016:24:47?0:00/usr/sbin/vradmind安裝VeritasFile

39、System:安裝過程略rootlxsfrac02#cdfile_system/rootlxsfrac02#ls-ltotal22-rw-r-r-1rootroot476Dec152006copyrightdrwxrwxr-x2rootroot512Jun2110:12docs-rwxr-xr-x1rootroot2283Apr142007installfsdrwxrwxr-x3rootroot1024Jun2110:12pkgsdrwxrwxr-x2rootroot512Jun2110:12release_notesdrwxrwxr-x3rootroot512Jun2110:12script

40、s-rwxr-xr-x1rootroot2283Apr142007uninstallfsrootlxsfrac02#./installfslxsfrac02VeritasVolumeReplicatorVVR的配置1. 兩個節(jié)點(diǎn)上都需要做:修改兩個節(jié)點(diǎn)的/etc/hosts10.198.90.122lxsfrac0110.198.90.139lxsfrac02192.168.0.122lxsfrac01-priv 192.168.0.139lxsfrac02-priv分別創(chuàng)建私有網(wǎng)絡(luò)(專有),建議數(shù)據(jù)復(fù)制使用專用網(wǎng)絡(luò)。rootlxsfrac01#ifc on fige1000g1plumb19

41、2.168.0.122netmask255.255.255.0uprootlxsfrac02#ifc on fige1000g1plumb192.168.0.139netmask255.255.255.0uprootlxsfrac01#p in g192.168.0.139192.168.0.139isalive創(chuàng)建相同名稱的磁盤組(含有最少兩個磁盤),相同名稱數(shù)據(jù)卷oravol ,創(chuàng)建復(fù)制日志卷(SRL),分別在本地安裝Oracle10gR2.( 安裝Oracle過程略。)rootlxsfrac01#vxdgi ni toradgAMS_WMS0_2AMS_WMS0_3rootlxsfrac

42、01#vxassist-goradgmakeoravol10grootlxsfrac01#vxedit-goradgsetuser=oraclegroup=dbamode=644oravolrootlxsfrac01#vxassist-goradgmakesrl800m2. 在備用節(jié)點(diǎn)上修改配置文件/etc/vx/vras/.rdg,讓其包含主節(jié)點(diǎn)上的diskgroupID(這里是1193985774.38.lxsfrac01) 。當(dāng)創(chuàng)建備用 RVG時(shí),這個文件用來對主節(jié)點(diǎn)的授權(quán)??梢酝ㄟ^ vxprint -來得到diskgroupIDrootlxsfrac02#vi/etc/vx/vras/

43、.rdg1193985774.38.lxsfrac01"/etc/vx/vras/.rdg"43li nes,1544characters3. 在主節(jié)點(diǎn)上:創(chuàng)建vxfs文件系統(tǒng)mou nt-Fvxfs-olargefiles/dev/vx/dsk/oradg/oravol/oracle chow no racle:dba/oracle切換到oracle用戶使用dbca建庫,并且所有數(shù)據(jù)文件選擇/oracle目錄創(chuàng)建 PrimaryRVG :rootlxsfrac01#vradmi n-goradgcreatepriora_rvgoravolsrl其中的oravol是要復(fù)制的

44、數(shù)據(jù)卷列表,當(dāng)多于一個時(shí),用逗號隔開。創(chuàng)建 SecondaryRVG:rootlxsfrac01#vradmi n-goradgaddsecora_rvglxsfrac01-privlxsfrac02-priv設(shè)置復(fù)制方式為異步:rootlxsfrac01#vradmin-goradgsetora_rvglxsfrac02-privsynchronous= 開始復(fù)制:rootlxsfrac01#vradmin-goradg-astartrepora_rvgMessagefromPrimary:VxVMVVRvxrlinkWARNINGV-5-1-3359Attachingrlinktonon-

45、emptyrvg.Autosyncwillbeperform ed.VxVMVVRvxrlinkINFOV-5-1-3614Secondarydatavolumesdetectedwithrvgora_rvgasparent:VxVMVVRvxrlinklNFOV-5-1-6183oravol:len=20971520primary_datavol=oravolVxVMVVRvxrlinklNFOV-5-1-3365Autosyncoperationhasstartedrootlxsfrac01#rootlxsfrac01#vradmin-goradg-fstartrepora_rvgVxVM

46、VVRvradminlNFOV-5-52-1203ReplicationtoSecondaryhostlxsfrac02-privalreadystarted.檢查相關(guān)信息和狀態(tài),顯示數(shù)據(jù)復(fù)制過程,可以通過使用-i參數(shù)指定intervalrootlxsfrac01#vxrvg-goradggetrlinksora_rvgrlk_lxsfrac02-priv_ora_rvgrootlxsfrac01#vxrlink-goradgstatusrlk_lxsfrac02-priv_ora_rvgFriNov0217:01:222007VxVMVVRvxrlinklNFOV-5-1-4464Rlink

47、rlk_lxsfrac02-priv_ora_rvgisinAUTOSYNC.9888256Kbyt esremaining.rootlxsfrac01#vxrlink-goradgstatusrlk_lxsfrac02-priv_ora_rvgFriNov0217:02:082007VxVMVVRvxrlinklNFOV-5-1-4464Rlinkrlk_lxsfrac02-priv_ora_rvgisinAUTOSYNC.9375488Kbyt esremaining.rootlxsfrac01#vxrlink-goradgstatusrlk_lxsfrac02-priv_ora_rvgF

48、riNov0217:13:262007VxVMVVRvxrlinklNFOV-5-1-4464Rlinkrlk_lxsfrac02-priv_ora_rvgisinAUTOSYNC.1901824Kbyt esremaining.rootlxsfrac01#vxrlink-goradgstatusrlk_lxsfrac02-priv_ora_rvgFriNov0217:19:162007VxVMVVRvxrlinklNFOV-5-1-4467Rlinkrlk_lxsfrac02-priv_ora_rvgisuptodate可以手工進(jìn)行g(shù)racefully 切換rootlxsfrac01#umo

49、unt/oraclerootlxsfrac01#vradmin-goradgmigrateora_rvglxsfrac02-privVxVMVVRvradminWARNINGV-5-52-93MakesureapplicationsusingPrimarydatavolumesarest opped.vradmin:Continuewithmigrate(y/n)?yrootlxsfrac01#下面我們就在上面搭建好的VVR環(huán)境中對容災(zāi)數(shù)據(jù)進(jìn)行切換測試:注:在下面測試中,主節(jié)點(diǎn)為lxsfrac02,備用節(jié)點(diǎn)為lxsfrac01=顯示主備節(jié)點(diǎn)狀態(tài)rootlxsfrac02#vradmin-gor

50、adg-lrepstatusora_rvgReplicatedDataSet:ora_rvgPrimary:Hostname:lxsfrac02-privRVGname:ora_rvgDGname:oradgRVGstate:enabledforI/ODatavolumes:1VSets:0SRLname:srlSRLsize:800.00MTotalsecondaries:1Secondary:Hostname:lxsfrac01-privRVGname:ora_rvgDGname:oradgRlinkfromPrimary:rlk_lxsfrac01-priv_ora_rvgRlinkto

51、Primary:rlk_lxsfrac02-priv_ora_rvgConfiguredmode:asynchronousLatencyprotection:offSRLprotection:autodcmDatastatus:inconsistentReplicationstatus:resyncinprogress(autosync)Currentmode:asynchronousLoggingto:DCM(contains5181696Kbytes)(autosync)Timestamplnformation:N/ABandwidthLimit:N/A=顯示 replicationlin

52、k 狀態(tài)rootlxsfrac02#vxrlink-goradgstatusrlk_lxsfrac01-priv_ora_rvgMonNov0516:52:512007VxVMVVRvxrlinklNFOV-5-1-4467Rlinkrlk_lxsfrac01-priv_ora_rvgisuptodate=在主節(jié)點(diǎn)插入試驗(yàn)數(shù)據(jù)16:55=oraclelxsfrac02$sysdbaSQL*Plus:Release10.2.0.1.0-ProductiononMonNov516:55:122007Copyright(c)1982,2005,Oracle.Allrightsreserved.Con

53、nectedto:OracleDatabase10gEnterpriseEditionRelease10.2.0.1.0-ProductionWiththePartitioning,OLAPandDataMiningoptionsSQL>createtabletest(avarchar(20)tablespaceusers;_Tablecreated.SQL>insertintotestvalues('1');1rowcreated.SQL>commit;Commitcomplete.SQL>insertintotestvalues('2'

54、;);1rowcreated.SQL>SQL>SQL>commit;Commitcomplete.=立即異常關(guān)閉 oracle 和操作系統(tǒng)rootlxsfrac02#ps-ef|egrep"ora |asm "|grep-vgrep|grep-vcrs|awk'print$2'|xargskill-9 rootlxsfrac02#rootlxsfrac02#ps-ef|greporaroot19301016:08:13?0:02/opt/VRTSobc/pal33/bin/vxpal-aStorageAgent-xoracle1942019

55、419016:55:12?0:00oracleracg1(DESCRIPTI0N=(L0CAL=YES)(ADDRESS=(PR0TOCOL=beq)oracle1941419410016:55:11pts/30:00-bashoracle1941919414016:55:12pts/30:00sqlplus/assysdba root198723725016:56:49pts/20:00greporarootlxsfrac02#rootlxsfrac02#poweroff從系統(tǒng)日志/var/tmp/messages可以查看到相關(guān)信息:Nov516:57:26lxsfrac02poweroff

56、:ID662345auth.critpoweroffedbyroot=在備用節(jié)點(diǎn)進(jìn)行接管rootlxsfrac01#vradmin-goradgmigrateora_rvglxsfrac01-privVxVMVVRvradminWARNINGV-5-52-93MakesureapplicationsusingPrimarydatavolumesarest opped.vradmin:Continuewithmigrate(y/n)?yMessagefromHostlxsfrac01-priv:VxVMVVRvradminERRORV-5-52-449Secondaryora_rvgdoesnothaveanactivePrimary.rootlxsfrac01#rootlxsfrac01#vradmin-goradgtakeoverora_rvgrootlxsfrac01#dateMonNov517:05:13CST2007rootlxsfrac01#vxprint-htqgoradgdgoradgdef

溫馨提示

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

評論

0/150

提交評論