溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

ASM重命名包含OCR/vote file的磁盤組

發(fā)布時(shí)間:2020-08-10 21:31:18 來源:ITPUB博客 閱讀:170 作者:Davis_itpub 欄目:關(guān)系型數(shù)據(jù)庫
Rename Diskgroup having OCR , Vote File , ASM SPILE [ID 1335975.1]
適用于11R2;
11R2提供renamedg,可在磁盤組dismount時(shí)將其重命名;如果該磁盤組包含OCR/vote file,則dismount前需將其遷移至中間磁盤;

大致思路如下:
創(chuàng)建一個(gè)臨時(shí)磁盤組temp,將OCR/vote file遷移至此;
將spfile也遷移到temp,重啟CRS;
卸載并重命名原磁盤組,并重新加載;
將ocr/vote file/spfile遷回,重啟CRS;

創(chuàng)建臨時(shí)磁盤組
create diskgroup TEMP normal redundancy
disk 'ORCL:DISK4' ,'ORCL:DISK5' ,'ORCL:DATA4' ,'ORCL:DATA6'
attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0', 'au_size'='4M';

遷移ocr/vote file
$ORACLE_HOME/bin/bin/ocrconfig -add +TEMP
$ORACLE_HOME/bin/bin/ocrconfig -delete +DATA
$ORACLE_HOME/bin/crsctl replace votedisk +TEMP
完成后調(diào)用ocrcheck檢查完整性

遷移spfile

重啟CRS
crsctl stop crs
crsctl start crs

重命名磁盤組
alter diskgroup data dismount; renamedg phase=both dgname=DATA newdgname=CRS verbose=true
輸出如下
Parsing parameters..
Parameters in effect:
Old DG name : DATA
New DG name : CRS
Phases :
Phase 1
Phase 2
Discovery str : (null)
Clean : TRUE
Raw only : TRUE
renamedg operation: phase=both dgname=DATA newdgname=CRS verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK1 with disk number:0 and timestamp (32955539 -2120261632)
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK2 with disk number:1 and timestamp (32955539 -2120261632)
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK3 with disk number:2 and timestamp (32955539 -2120261632)
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK6 with disk number:5 and timestamp (32955539 -2120261632)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK1 with disk number:0 and timestamp (32955539 -2120261632)
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK2 with disk number:1 and timestamp (32955539 -2120261632)
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK3 with disk number:2 and timestamp (32955539 -2120261632)
Identified disk ASM:/opt/oracle/extapi/32/asm/orcl/1/libasm.so:ORCL:DISK6 with disk number:5 and timestamp (32955539 -2120261632)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:0
Checking disk number:1
Checking disk number:2
Checking disk number:5
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for ORCL:DISK1
Modifying the header
Looking for ORCL:DISK2
Modifying the header
Looking for ORCL:DISK3
Modifying the header
Looking for ORCL:DISK6
Modifying the header
Completed phase 2
Terminating kgfd context 0xb7ee8050

重新加載磁盤組并遷回OCR
alter diskgroup CRS mount
$ORACLE_HOME/bin/ocrconfig -add +CRS
$ORACLE_HOME/bin/ocrconfig -delete +TEMP
$ORACLE_HOME/bin/crsctl replace votedisk +CRS

遷回spfile并重啟CRS

刪除temp磁盤組并將其信息從集群中移除
alter diskgroup TEMP dismount;
drop diskgroup temp including contents;
srvctl remove diskgroup -g data
srvctl remove diskgroup -g TEMP
向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI