19c 迁移OCR&MTGTDB到新的DISKGROUP

OCR and VOTEDISK

as root user,

1.ocrconfig -add newdiskgroup
ocrconfig -delete olddiskgroup
as grid user,
2.crsctl replace votedisk newdiskgroup
as root user,
3. crsctl query css votedisk
ocrcheck
4. Change asm file
5. Change asm password file
orapwd file='+newdiskgroup/orapwasm' asm=y force=y
SQL> create pfile='/tmp/init/init' from spfile;
SQL> create spfile='+newdiskgroup' from pfile='/tmp/init/init';
Now GPNPTOOL will get updated with new ASM SPFILE location.
That can be verified by below command : (As grid user or root)
$ORACLE_HOME/bin/gpnptool get
5.Restart crs
crsctl stop crs
crsctl start crs
6.check diskname
select name,path,group_number,header_status,total_mb,free_mb from v$asm_disk;
select name,state,usable_file_mb,total_mb,free_mb,required_mirror_free_mb from v$asm_diskgroup
7.Modify the backup location for the OCR
ocrconfig -backuploc

MTGTDB

as root user,run two nodes,
1.# <GI_HOME>/bin/crsctl stop res ora.crf -init
# <GI_HOME>/bin/crsctl modify res ora.crf -attr ENABLED=0 -init
as grid user
2. $ <GI_HOME>/bin/srvctl status mgmtdb
as grid user,run on mgmtdb is running node
3. $ <GI_HOME>/bin/dbca -silent -deleteDatabase -sourceDB -MGMTDB
as grid user,create MGMTDB on new diskgroup
4.dbca -silent -createDatabase -sid -MGMTDB -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -gdbName _mgmtdb -storageType ASM -diskGroupName +DATA -datafileJarLocation $ORACLE_HOME/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck
as grid user ,confirm the node on which MGMTDB is running by executing,
5.srvctl status MGMTDB $ <GI_HOME>/bin/mgmtca
On each node, as root user
6.# <GI_HOME>/bin/crsctl modify res ora.crf -attr ENABLED=1 -init
# <GI_HOME>/bin/crsctl start res ora.crf -init
7 reboot crs crsctl stop crs crsctl start crs

note:处理ASM Password file问题 19.8以后
as grid user:
GI_HOME/bin/asmcmd --nocp credverify
credverify: No credentials in OCR, please run 'credfix' to fix the credentials.
GI_HOME/bin/asmcmd --nocp credfix
op=addcrscreds wrap=/tmp/creds0.xml
credfix: Creating new credentials, no valid credentials in OCR.
credfix: New user created.
op=credimport wrap=/tmp/creds0.xml olr=true force=true
credfix: OLR for has been fixed if credentials were created incorrectly.
credfix: Starting SSH session on node den02rrx.
credfix: OLR for has been fixed if credentials were created incorrectly.
credverify: Credentials created correctly on .
credverify: starting SSH session on node .
credverify: Credentials created correctly on . Exiting SSH session.
credfix: Credentials have been fixed if they were created incorrectly.

posted @ 2021-03-15 17:09  菲阳公社  阅读(225)  评论(0)    收藏  举报