中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

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

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle 11g rac OCR磁盤組重命名(創建時OCR磁盤組命名錯誤之后的糾正方案)

發布時間:2020-08-08 16:55:20 來源:ITPUB博客 閱讀:315 作者:edge_dba 欄目:關系型數據庫
參考Rename Diskgroup having OCR , Vote File , ASM SPILE (文檔 ID 1335975.1)
目標:
Consider a 11.2 Grid Infrastructure with CLUSTER setup having OCR ,Vote File and ASM SPFILE on a diskgroup. 
Under certain circumstances you may wish to rename that diskgroup.
"renamedg" utility can be used to rename of the diskgroup when the diskgroup is dismounted.
But since the diskgroup contains OCR and Vote File we need to use an intermediate diskgroup for storing OCR and Vote File temporarily while renaming the actual diskgroup.

更改條件說明:
-> Name of Temporary diskgroup is TEMP.
-> OCR,Voting Disks and ASM SPFILE are originally stored in a diskgroup DATA.
-> Diskgroup DATA should be renamed to CRS.
-> $ORACLE_HOME points to GRID Home.
-> Cluster is up and running in all nodes of RAC.

操作:
1 創建臨時磁盤組:
Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands:
sqlplus '/as sysasm'
create diskgroup TEMP normal redundancy disk '/dev/asm11' ,'/dev/asm12' ,'/dev/asm13' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0', 'au_size'='4M';

2 遷移
Move OCR and Vote file from DATA to <TEMP> :

$ORACLE_HOME/bin/bin/ocrconfig -add +TEMP
$ORACLE_HOME/bin/bin/ocrconfig -delete +DATA
$ORACLE_HOME/bin/crsctl replace votedisk +TEMP
Successful addition of voting disk 9d351cfdbef64facbfe2d1519880ef33.
Successful addition of voting disk 302c23b19e864f92bfa68eda9045e5cc.
Successful addition of voting disk 6eeca4920acb4f8fbf6ec5a4e2b8ea7b.
Successful deletion of voting disk 32f7d65cf17d4fa3bf2932998251635f.
Successful deletion of voting disk 10c31fb0891d4f5abfb38ef34cd49f4d.
Successful deletion of voting disk 7d6f7d6480554f01bfc2621a3adb8f5f.
Successfully replaced voting disk group with +TEMP.
CRS-4266: Voting file(s) successfully replaced

檢查完整性
$ORACLE_HOME/bin/crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9d351cfdbef64facbfe2d1519880ef33 (ORCL:DISK4) [TEMP]
2. ONLINE 302c23b19e864f92bfa68eda9045e5cc (ORCL:DISK5) [TEMP]
3. ONLINE 6eeca4920acb4f8fbf6ec5a4e2b8ea7b (ORCL:DATA4) [TEMP]
Located 3 voting disk(s).
$ORACLE_HOME/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2804
Available space (kbytes) : 259316
ID : 1778064925
Device/File Name : +TEMP
Device/File integrity check succeeded

Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded

3 遷移spfile,從DATA遷移到TEMP diskgroup上
Change ASM SPFILE location from DATA to TEMP diskgroup.
sqlplus '/as sysasm'
create pfile='/tmp/init/init' from spfile;
create spfile='+TEMP' from pfile='/tmp/init/init';
Now GPNPTOOL will get updated with new ASM SPFILE location.
That can be verified by below command :
$ORACLE_HOME/bin/gpnptool get

4 2個節點重啟crs
Restart CRS on all nodes to startup CRS using new SPFILE from TEMP diskgroup
crsctl stop crs
crsctl start crs

5 卸載OLD盤(即DATA盤) 
Dismount the OLD Diskgroup on all cluster nodes
Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands:
sqlplus '/as sysasm'
alter diskgroup data dismount;

6 重命名OLD盤(即重命名DATA盤為CRS盤)
Rename OLD diskgroup to NEW diskgroup name
renamedg phase=both dgname=DATA newdgname=CRS verbose=true 

查詢磁盤信息
set line 1000
set pages 599
col path format a30
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 掛載CRS盤
Mount the renamed diskgroup on All the nodes
Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands:
sqlplus '/as sysasm'
alter diskgroup CRS mount;
查詢磁盤信息
select name,state,usable_file_mb,total_mb,free_mb,required_mirror_free_mb from v$asm_diskgroup;

8 遷移OCR和vote file到新的磁盤CRS
Move OCR and Vote file from TEMP Diskgroup to CRS Diskgroup

$ORACLE_HOME/bin/ocrconfig -add +CRS
$ORACLE_HOME/bin/ocrconfig -delete +TEMP
$ORACLE_HOME/bin/crsctl replace votedisk +CRS
Successful addition of voting disk ae0f06430e724fb7bf3757a7cdf8a101.
Successful addition of voting disk 1b355413f5904f5abff181938191ed97.
Successful addition of voting disk a7f75c9872ac4f6fbf77bbcb10ea17a6.
Successful deletion of voting disk 9d351cfdbef64facbfe2d1519880ef33.
Successful deletion of voting disk 302c23b19e864f92bfa68eda9045e5cc.
Successful deletion of voting disk 6eeca4920acb4f8fbf6ec5a4e2b8ea7b.
Successfully replaced voting disk group with +CRS.
CRS-4266: Voting file(s) successfully replaced

9 修改spfile 路徑
Change ASM SPFILE location from TEMP to CRS Diskgroup:
Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands
sqlplus '/as sysasm'
create spfile='+CRS' from pfile='/tmp/init/init';

10 2個節點重啟crs
Restart CRS on all nodes to startup CRS using new SPFILE from TEMP diskgroup
crsctl stop crs
crsctl start crs

11 刪掉臨時的TEMP磁盤組
Drop the Intermediate Diskgroup TEMP 
Login as SYSASM using SQLPLUS into ASM instance on one node and run below commands::
drop diskgroup temp including contents;
NOTE: Diskgroup TEMP must be mounted in order to be able to drop it.You need to mount it (if it is not already mounted at CRS startup) and then run "drop diskgroup.."

12 刪除磁盤的信息
Need to Remove the Diskgroup Resources TEMP and <OLD Diskgroup Name> from Oracle Clusterware
srvctl remove diskgroup -g DATA
srvctl remove diskgroup -g TEMP

13 驗證信息
Ensure ALL Cluster resources are started successfully using below sample commands
$ORACLE_HOME/bin/crsctl stat res -init -t
$ORACLE_HOME/bin/crsctl check cluster -all
$ORACLE_HOME/bin/crsctl stat res -t
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

富宁县| 临沧市| 大方县| 曲沃县| 五大连池市| 儋州市| 化州市| 宁海县| 易门县| 濮阳县| 城步| 凤山县| 高邑县| 岚皋县| 望奎县| 永胜县| 贵德县| 林西县| 上蔡县| 防城港市| 湾仔区| 九江市| 平果县| 资源县| 北流市| 昭平县| 那坡县| 长葛市| 嘉祥县| 磐安县| 大洼县| 东丽区| 八宿县| 湘阴县| 长岭县| 安远县| 平谷区| 广宁县| 体育| 怀远县| 巴东县|