4286811 How To ADDREMOVEREPLACEMOVE OCR or Vote disk.docx
- 文档编号:11808112
- 上传时间:2023-06-02
- 格式:DOCX
- 页数:13
- 大小:18.77KB
4286811 How To ADDREMOVEREPLACEMOVE OCR or Vote disk.docx
《4286811 How To ADDREMOVEREPLACEMOVE OCR or Vote disk.docx》由会员分享,可在线阅读,更多相关《4286811 How To ADDREMOVEREPLACEMOVE OCR or Vote disk.docx(13页珍藏版)》请在冰点文库上搜索。
4286811HowToADDREMOVEREPLACEMOVEOCRorVotedisk
HowTo:
OCR/VotediskMaintenanceOperations:
(ADD/REMOVE/REPLACE/MOVE) 2011-12-1119:
42:
13
分类:
Linux
OCR/VotediskMaintenanceOperations:
(ADD/REMOVE/REPLACE/MOVE)[ID428681.1]
Modified 23-SEP-2011 Type HOWTO Status PUBLISHED
InthisDocument
Goal
Solution
References
Appliesto:
OracleServer-EnterpriseEdition-Version:
10.2.0.1to11.1.0.7-Release:
10.2to11.1
Informationinthisdocumentappliestoanyplatform.
OracleServerEnterpriseEdition-Version:
10.2.0.1to10.2.0.4
Goal
Thegoalofthisnoteistoprovidestepstoadd,remove,replaceormoveanOracleClusterRepository(OCR)orvotingdiskinOracleClusterware10gRealese2(10.2.0.1andlater)environments.ItwillalsoprovidestepstomoveOCR/votingandASMdevicesfromrawdevicetoblockdevice.
ThisarticleisintendedforDBA’sandSupportEngineerswhoneedtomodify,ormoveOCRandvotingdisksfiles,customerswhohaveanexistingclusteredenvironmentdeployedonastoragearrayandmightwanttomigratetoanewstoragearraywithminimaldowntime.
Typically,onewouldsimplycporddthefilesoncethenewstoragehasbeenpresentedtothehosts.Inthiscase,itisalittlemoredifficultbecause:
1.TheOracleClusterwarehastheOCRandvotingdisksopenandisactivelyusingthem.(Bothprimaryandmirrors)
2.Thereisa“clusterAPI”providedforthisfunction(ocrconfig,andcrsctl),whichistheappropriateinterfacethantypicalcpand/orddcommands.
Itishighlyrecommendedtotakeabackupofthevotingdisk,andOCRdevicebeforemakinganychanges.
OracleClusterRegistry(OCR)andVotingDiskAdditionalclarifications
ThefollowingstepsassumetheclusterissetupusingOracleredundancywith3votingdisksand2OCR.
Solution
ADD/REMOVE/REPLACE/MOVEOCRDevice
Note:
Youmustbeloggedinastherootuser,becauserootownstheOCRfiles."crsctl-replace"commandcanonlybeissuedwhenCRSisrunning,otherwisePROT-1:
Failedtoinitializeocrconfig
willoccur.
MakesurethereisarecentcopyoftheOCRfilebeforemakinganychanges:
ocrconfig–showbackup
IfthereisnotarecentbackupcopyoftheOCRfile,anexportcanbetakenforthecurrentOCRfile.UsethefollowingcommandtogenerateanexportoftheonlineOCRfile:
In10.2
#ocrconfig–export
In11.1
#ocrconfig-manualbackup
node12008/08/0606:
11:
58/crs/cdata/crs/backup_20080807_003158.ocr
Ifyoushouldneedtorecoverusingthisfile,thefollowingcommandcanbeused:
#ocrconfig-import
ToseewhetherOCRishealthy,runanocrcheck,whichshouldreturnwith“succeeded“,likebelow.
#ocrcheck
StatusofOracleClusterRegistryisasfollows:
Version:
2
Totalspace(kbytes):
497928
Usedspace(kbytes):
312
Availablespace(kbytes):
497616
ID:
576761409
Device/FileName:
/dev/raw/raw1
Device/Fileintegritychecksucceeded
Device/FileName:
/dev/raw/raw2
Device/Fileintegritychecksucceeded
Clusterregistryintegritychecksucceeded
1.ToaddanOCRMIRRORdevicewhenonlyOCRdevicedefined:
ToaddanOCRmirrordevice,providethefullpathincludingfilename.
#ocrconfig-replaceocrmirror
2.ToremoveanOCRdevice:
ToremoveanOCRdevice:
#ocrconfig-replaceocr
*OnceanOCRdeviceisremoved,ocrmirrordeviceautomaticallychangestobeOCRdevice.
*ItisnotallowedtoremoveOCRdeviceifonly1OCRdeviceisdefined,thecommandwillreturnPROT-16.
ToremoveanOCRmirrordevice:
#ocrconfig-replaceocrmirror
Afterremoval,theoldOCR/OCRMIRRORcanbedeletediftheyareonclusterfilesystem.
3.ToreplaceormovethelocationofanOCRdevice:
Note. 1.AnocrmirrormustbeinplacebeforetryingtoreplacetheOCRdevice.Theocrconfig–replacewillfailwithPROT-16,ifthereisnoocrmirror.
2.IfanOCRdeviceisreplacedwithadeviceofadifferentsize,thesizeofthenewdevicewillnotbereflecteduntiltheclusterwareisrestarted.
3.IfOCRisonclusterfilesystem,thenewOCRorOCRMIRRORfilemustbetouchedfirstbeforereplacecommandcanbeissued.OtherwisePROT-21:
Invalidparameterwilloccur.
ToreplacetheOCRdevicewith
#ocrconfig-replaceocr
ToreplacetheOCRmirrordevicewith
#ocrconfig-replaceocrmirror
ExampleMovingOCRfromRawDevicetoBlockDevice
TheOCRdiskmustbeownedby root,inthe oinstall group,andmusthavepermissionssetto640.Provideatleast100MBdiskspacefortheOCR.
InthisexampletheOCRfileswillbeonthefollowingdevices:
/dev/raw/raw1
/dev/raw/raw2
FormovingtheOCR fromrawdevicetoblockdevicetherearetwodifferentways.One,whichrequiresafullclusteroutage,andonewithnooutage.Theofflinemethodisrecommendedfor10.2andearliersinceaclusteroutageisrequiredanywaysduetoanOraclebug,whichpreventsonlineadditionanddeletionofvotingfiles.Thisbugisfixedin11.1,soeitheronlineorofflinemethodcanbeemployedin11.1onwards.
Method1(Online)
Ifthereareadditionalblockdevicesofsameorlargersizeavailable,onecanperform.'ocrconfig-replace'.
PROS:
Noclusteroutagerequired.Run2commandsandchangesarereflectedacrosstheentirecluster.
CONS:
Needtemporaryadditionalblockdeviceswith256MBinsize.Onecanreclaimthestoragepointedbytherawdeviceswhentheoperationcompletes.
·Ononenodeasrootrun:
#ocrconfig-replaceocr/dev/sdb1
#ocrconfig-replaceocrmirror/dev/sdc1
Foreveryocrconfigorocrcheckcommandatracefileto$CRS_Home/log/
OracleDatabase10gCRSRelease10.2.0.4.0ProductionCopyright1996,2008Oracle.Allrightsreserved.
2008-08-0607:
07:
10.424:
[OCRCONF][3086866112]ocrconfigstarts...
2008-08-0607:
07:
11.328:
[OCRCONF][3086866112]SuccessfullyreplacedOCRandsetblock0
2008-08-0607:
07:
11.328:
[OCRCONF][3086866112]Exiting[status=success]...
NowrunocrchecktoverifyiftheOCRispointingtotheblockdeviceandnoerrorisreturned.
StatusofOracleClusterRegistryisasfollows:
Version:
2
Totalspace(kbytes):
497776
Usedspace(kbytes):
3844
Availablespace(kbytes):
493932
ID:
576761409
Device/FileName:
/dev/sdb1
Device/Fileintegritychecksucceeded
Device/FileName:
/dev/sdc2
Device/Fileintegritychecksucceeded
Clusterregistryintegritychecksucceeded
Method2(Offline)
Inplacemethodwhenadditionalstorageisnotavailable,butthisrequiresclusterdowntime.
Belowtheexistingmappingfromtherawbindingstotheblockdevices,isdefinedin/etc/sysconfig/rawdevices
/dev/raw/raw1/dev/sdb1
/dev/raw/raw2/dev/sdc1
#raw-qa
/dev/raw/raw1:
boundtomajor8,minor17
/dev/raw/raw2:
boundtomajor8,minor33
#ls–ltra/dev/raw/raw*
crw-r-----1rootoinstall162,1Jul2410:
39/dev/raw/raw1
crw-r-----1rootoinstall162,2Jul2410:
39/dev/raw/raw2
#ls-ltra/dev/*
brw-r-----1rootoinstall8,17Jul2410:
39/dev/sdb1
brw-r-----1rootoinstall8,33Jul2410:
39/dev/sdc1
1.ShutdownOracleClusterwareonallnodesusing"crsctlstopcrs"asroot.
2.Onallnodesrunthefollowingcommandsasroot:
#ocrconfig-repairocr/dev/sdb1
#ocrconfig-repairocrmirror/dev/sdc1
3.Ononenodeasrootrun:
#ocrconfig-overwrite
Inthe$CRS_Home/log/
cat/crs/log/node1/client/ocrconfig_20022.log
OracleDatabase10gCRSRelease10.2.0.4.0ProductionCopyright1996,2008Oracle.Allrightsreserved.
2008-08-0606:
41:
29.736:
[OCRCONF][3086866112]ocrconfigstarts...
2008-08-0606:
41:
31.535:
[OCRCONF][3086866112]SuccessfullyoverwroteOCRconfigurationondisk
2008-08-0606:
41:
31.535:
[OCRCONF][3086866112]Exiting[status=success]...
AsaverificationsteprunocrcheckonallnodesandtheDevice/FileNameshouldreflecttheblockdevicesreplacingtherawdevices:
#ocrcheck
StatusofOracleClusterRegistryisasfollows:
Version:
2
Totalspace(kbytes):
497776
Usedspace(kbytes):
3844
Availablespace(kbytes):
493932
ID:
576761409
Device/FileName:
/dev/sdb1
Device/Fileintegritychecksucceeded
Device/FileName:
/dev/sdc1
Device/Fileintegritychecksucceeded
Clusterregistryintegritychecksucceeded
ExampleofaddinganOCRdevicefileonrawdevice
Ifyouhaveupgradedyourenvironmentfromapreviousversion,whereyouonlyhadoneOCRdevicefile,youcanusethefollowingsteptoaddanOCRMIRRORfile.
Add/dev/raw/raw2asOCRmirrordevice
#ocrconfig-replaceocrmirror/dev/raw/raw2
Exampleofadding/replacingOCR/OCRMIRRORonclusterfilesystem
ThenewOCR/OCRMIRRORfileontheclusterfilesystemmustexistbeforeadd/replacecanhappen.Forexample,thenewOCRandOCRMIRRORwillbelocatedunder:
/cluster_fs/OCR/newocr.dat
/cluster_fs/OCR/newocrm.dat
Asrootuser:
#touch/cluster_fs/OCR/newocr.dat
#touch/cluster_fs/OCR/newocrm.dat
#chownroot:
oinstall/cluster_fs/OCR/newocr.dat
#chownroot:
oinstall/cluster_fs/OCR/newocrm.dat
#chmod640/cluster_fs/OCR/newocr.dat
#chmod640/cluster_fs/OCR/newocrm.dat
ToaddOCRMIRROR:
#ocrconfig-replaceocrmirror/cluster_fs/OCR/newocrm.dat
ToreplaceOCRorOCRMIRROR:
#ocrconfig-replaceocr/cluster_fs/OCR/newocr.dat
#ocrconfig-replaceocrmirror/cluster_fs/OCR/newocrm.dat
ADD/DELETE/MOVEVotingDisk
Note:
1.crs
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 4286811 How To ADDREMOVEREPLACEMOVE OCR or Vote disk
链接地址:https://www.bingdoc.com/p-11808112.html