[root@rac1 rules.d]# su - grid
[grid@rac1 ~]$ asmca
1. 創建新的OCR磁盤組:
2. 查看兩個節點是否添加了新的OCR磁盤組:
節點1:
SQL> set linesize 1000
SQL> select name, TOTAL_MB, FREE_MB, state, type, COMPATIBILITY from v$asm_diskgroup;
NAME TOTAL_MB FREE_MB STATE TYPE COMPATIBILITY
------------------------------ ---------- ---------- ----------- ------ ------------------------------------------------------------
ARCH 4096 3302 MOUNTED EXTERN 11.2.0.0.0
DATA 10240 8130 MOUNTED EXTERN 11.2.0.0.0
NEWOCR 9216 9057 MOUNTED NORMAL 11.2.0.0.0
OCR 9216 8290 MOUNTED NORMAL 11.2.
節點2:
set linesize 1000
type, COMPATIBILITY from v$asm_diskgroup; select name, TOTAL_MB, FREE_MB, state,
NAME TOTAL_MB FREE_MB STATE TYPE COMPATIBILITY
------------------------------ ---------- ---------- ----------- ------ ------------------------------------------------------------
ARCH 4096 3302 MOUNTED EXTERN 11.2.0.0.0
DATA 10240 8130 MOUNTED EXTERN 11.2.0.0.0
NEWOCR 0 0 DISMOUNTED 0.0.0.0.0
OCR 9216 8290 MOUNTED NORMAL 11.2.0.0.0
3. 發現節點2,需要手動mount新加的ASM磁盤組:
[ ]
[as sysasm ]$ sqlplus /
SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 6 07:36:04 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL>
SQL> alter diskgroup NEWOCR mount;
Diskgroup altered.
4. 再次查看節點2新加的OCR磁盤組:
set linesize 1000
type, COMPATIBILITY from v$asm_diskgroup; select name, TOTAL_MB, FREE_MB, state,
NAME TOTAL_MB FREE_MB STATE TYPE COMPATIBILITY
------------------------------ ---------- ---------- ----------- ------ ------------------------------------------------------------
ARCH 4096 3302 MOUNTED EXTERN 11.2.0.0.0
DATA 10240 8130 MOUNTED EXTERN 11.2.0.0.0
NEWOCR 9216 8931 MOUNTED NORMAL 11.2.0.0.0
OCR 9216 8290 MOUNTED NORMAL 11.2.0.0.0
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su root
Password:
[root@rac1 grid]# ocrconfig -add +NEWOCR
[root@rac1 grid]# ocrcheck -config
Oracle Cluster Registry configuration is :
Device/File Name : +OCR
Device/File Name : +NEWOCR
[root@rac1 grid]# more /etc/oracle/ocr.loc
#Device/file getting replaced by device +NEWOCR
ocrconfig_loc=+OCR
ocrmirrorconfig_loc=+NEWOCR
local_only=false
[root@rac1 grid]# ocrcheck && crsctl query css votedisk -- 檢查、查看voting disk
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3464
Available space (kbytes) : 258656
ID : 1896437032
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File Name : +NEWOCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE a96d9ab34e494f8fbf921c97da8e6580 (/dev/raw/raw1) [OCR]
2. ONLINE 29b205061cc44f8abf86d791f6cf8db0 (/dev/raw/raw2) [OCR]
3. ONLINE 75fb74dbdd8b4f74bf22870f7d7b59bd (/dev/raw/raw3) [OCR]
Located 3 voting disk(s).
set linesize 1000
type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup; select GROUP_NUMBER,NAME,STATE,
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB V COMPATIBILITY
------------ ------------------------------ ----------- ------ ---------- ---------- - ------------------------------------------------------------
1 ARCH MOUNTED EXTERN 4096 3302 N 11.2.0.0.0
2 DATA MOUNTED EXTERN 10240 8130 N 11.2.0.0.0
3 NEWOCR MOUNTED NORMAL 9216 8388 N 11.2.0.0.0
4 OCR MOUNTED NORMAL 9216 8290 Y 11.2.0.0.0
2. 替換為新添加的OCR:
~]# su - grid
~]$ su root
Password:
grid]# crsctl replace votedisk +NEWOCR
Successful addition of voting disk 9c4a22a517044f4dbf6a8595b0f507f9.
Successful addition of voting disk 372d1b3550844f9cbffaf00b6a2dbe96.
Successful addition of voting disk 08ab4466be804f48bfea02f300de046a.
Successful deletion of voting disk a96d9ab34e494f8fbf921c97da8e6580.
Successful deletion of voting disk 29b205061cc44f8abf86d791f6cf8db0.
Successful deletion of voting disk 75fb74dbdd8b4f74bf22870f7d7b59bd.
Successfully replaced voting disk group with +NEWOCR.
Voting file(s) successfully replaced :
3. 再次查詢使用的OCR磁盤組:
set linesize 1000
type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup; select GROUP_NUMBER,NAME,STATE,
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB V COMPATIBILITY
------------ ------------------------------ ----------- ------ ---------- ---------- - ------------------------------------------------------------
1 ARCH MOUNTED EXTERN 4096 3302 N 11.2.0.0.0
2 DATA MOUNTED EXTERN 10240 8120 N 11.2.0.0.0
3 NEWOCR MOUNTED NORMAL 9216 8292 Y 11.2.0.0.0
4 OCR MOUNTED NORMAL 9216 8386 N 11.2.0.0.0
4. 發現voting file已經在NEWOCR上,然后在兩個節點的root下查詢:
節點1:
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su root
Password:
[root@rac1 grid]# ocrcheck && crsctl query css votedisk
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3464
Available space (kbytes) : 258656
ID : 1896437032
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File Name : +NEWOCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9c4a22a517044f4dbf6a8595b0f507f9 (/dev/raw/raw7) [NEWOCR]
2. ONLINE 372d1b3550844f9cbffaf00b6a2dbe96 (/dev/raw/raw8) [NEWOCR]
3. ONLINE 08ab4466be804f48bfea02f300de046a (/dev/raw/raw9) [NEWOCR]
Located 3 voting disk(s).
節點2:
[root@rac2 ~]# su - grid
[grid@rac2 ~]$ su root
Password:
[root@rac2 grid]# ocrcheck && crsctl query css votedisk
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3464
Available space (kbytes) : 258656
ID : 1896437032
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File Name : +NEWOCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9c4a22a517044f4dbf6a8595b0f507f9 (/dev/raw/raw7) [NEWOCR]
2. ONLINE 372d1b3550844f9cbffaf00b6a2dbe96 (/dev/raw/raw8) [NEWOCR]
3. ONLINE 08ab4466be804f48bfea02f300de046a (/dev/raw/raw9) [NEWOCR]
Located 3 voting disk(s).
[ ]
[as sysasm ]$ sqlplus /
SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 7 19:18:19 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> show parameter spf
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +OCR/rac-cluster/asmparameterf
ile/registry.253.940267187
SQL> create pfile=/home/grid/asmpfile.ora from spfile;
File created.
SQL> create spfile=+NEWOCR from pfile=/home/grid/asmpfile.ora;
File created.
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su root
Password:
[root@rac1 grid]# ocrconfig -delete +OCR
2. 查看OCR和voting disk新的狀態與位置(所有節點):
節點1:
[root@rac1 grid]# ocrcheck && crsctl query css votedisk
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3464
Available space (kbytes) : 258656
ID : 1896437032
Device/File Name : +NEWOCR
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
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9c4a22a517044f4dbf6a8595b0f507f9 (/dev/raw/raw7) [NEWOCR]
2. ONLINE 372d1b3550844f9cbffaf00b6a2dbe96 (/dev/raw/raw8) [NEWOCR]
3. ONLINE 08ab4466be804f48bfea02f300de046a (/dev/raw/raw9) [NEWOCR]
Located 3 voting disk(s).
節點2:
[root@rac2 grid]# ocrcheck && crsctl query css votedisk
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3464
Available space (kbytes) : 258656
ID : 1896437032
Device/File Name : +NEWOCR
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
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9c4a22a517044f4dbf6a8595b0f507f9 (/dev/raw/raw7) [NEWOCR]
2. ONLINE 372d1b3550844f9cbffaf00b6a2dbe96 (/dev/raw/raw8) [NEWOCR]
3. ONLINE 08ab4466be804f48bfea02f300de046a (/dev/raw/raw9) [NEWOCR]
Located 3 voting disk(s).
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su root
Password:
[root@rac1 grid]# crsctl stop crs && crsctl start crs -- 重啟集群
[ ]
[as sysasm ]$ sqlplus /
SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 7 19:46:30 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> show parameter spf
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +NEWOCR/rac-cluster/asmparamet
erfile/registry.253.940706513
2. 檢查磁盤組狀態:
節點1:
set linesize 1000
type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup; Select GROUP_NUMBER,NAME,STATE,
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB V COMPATIBILITY
------------ ------------------------------ ----------- ------ ---------- ---------- ---------------------
1 ARCH MOUNTED EXTERN 4096 3208 N 11.2.0.0.0
2 DATA MOUNTED EXTERN 10240 8120 N 11.2.0.0.0
3 NEWOCR MOUNTED NORMAL 9216 8290 Y 11.2.0.0.0
0 OCR DISMOUNTED 0 0 N 0.0.0.0.0
select GROUP_NUMBER,DISK_NUMBER,STATE,REDUNDANCY,TOTAL_MB,FREE_MB,name,path,failgroup from v$asm_disk order by GROUP_NUMBER;
GROUP_NUMBER DISK_NUMBER STATE REDUNDA TOTAL_MB FREE_MB NAME PATH FAILGROUP
----------- -------- ------- ---------- ---------- ------------------------------ -----------------
0 9 NORMAL UNKNOWN 0 0 /dev/raw/raw11
0 2 NORMAL UNKNOWN 0 0 /dev/raw/raw2
0 3 NORMAL UNKNOWN 0 0 /dev/raw/raw10
0 7 NORMAL UNKNOWN 0 0 /dev/raw/raw6
0 8 NORMAL UNKNOWN 0 0 /dev/raw/raw3
0 1 NORMAL UNKNOWN 0 0 /dev/raw/raw1
1 0 NORMAL UNKNOWN 4096 3208 ARCH_0000 /dev/raw/raw5 ARCH_0000
2 0 NORMAL UNKNOWN 10240 8120 DATA_0000 /dev/raw/raw4 DATA_0000
3 0 NORMAL UNKNOWN 3072 2762 NEWOCR_0000 /dev/raw/raw7 NEWOCR_0000
3 1 NORMAL UNKNOWN 3072 2763 NEWOCR_0001 /dev/raw/raw8 NEWOCR_0001
3 2 NORMAL UNKNOWN 3072 2765 NEWOCR_0002 /dev/raw/raw9 NEWOCR_0002
11 rows selected.
節點2:
set linesize 1000
Select GROUP_NUMBER,NAME,STATE,type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB V COMPATIBILITY
------------------------------ ----------- ------ ---------- ---------- ---------------------
1 ARCH MOUNTED EXTERN 4096 3208 N 11.2.0.0.0
2 DATA MOUNTED EXTERN 10240 8120 N 11.2.0.0.0
3 NEWOCR MOUNTED NORMAL 9216 8290 Y 11.2.0.0.0
0 OCR DISMOUNTED 0 0 N 0.0.0.0.0
select GROUP_NUMBER,DISK_NUMBER,STATE,REDUNDANCY,TOTAL_MB,FREE_MB,name,path,failgroup from v$asm_disk order by GROUP_NUMBER;
GROUP_NUMBER DISK_NUMBER STATE REDUNDA TOTAL_MB FREE_MB NAME PATH FAILGROUP
----------- -------- ------- ---------- ---------- ------------------------------ -----------------
0 9 NORMAL UNKNOWN 0 0 /dev/raw/raw11
0 2 NORMAL UNKNOWN 0 0 /dev/raw/raw2
0 3 NORMAL UNKNOWN 0 0 /dev/raw/raw10
0 7 NORMAL UNKNOWN 0 0 /dev/raw/raw6
0 8 NORMAL UNKNOWN 0 0 /dev/raw/raw3
0 1 NORMAL UNKNOWN 0 0 /dev/raw/raw1
1 0 NORMAL UNKNOWN 4096 3208 ARCH_0000 /dev/raw/raw5 ARCH_0000
2 0 NORMAL UNKNOWN 10240 8120 DATA_0000 /dev/raw/raw4 DATA_0000
3 0 NORMAL UNKNOWN 3072 2762 NEWOCR_0000 /dev/raw/raw7 NEWOCR_0000
3 1 NORMAL UNKNOWN 3072 2763 NEWOCR_0001 /dev/raw/raw8 NEWOCR_0001
3 2 NORMAL UNKNOWN 3072 2765 NEWOCR_0002 /dev/raw/raw9 NEWOCR_0002
11 rows selected.
3. 最后將舊的磁盤組mount并drop掉(在一個節點執行):
~]# su - grid
~]$ sqlplus / as sysasm
Release 11.2.0.4.0 Production on Fri Apr 7 20:00:27 2017 :
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
alter diskgroup OCR mount;
Diskgroup altered.
drop diskgroup OCR including contents;
Diskgroup dropped.
注意:舊的磁盤組只允許在一個節點mount,如果發現多個節點mount,需要在其他節點dismount,否則會刪除不掉舊的磁盤組
[grid@rac1 ~]$ asmcmd
ASMCMD> ls
ARCH/
DATA/
NEWOCR/
更多精彩干貨分享
點擊下方名片關注
IT那活兒
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/129891.html
摘要:主機機房眾多,其中亞太地區的機房有香港臺灣韓國日本等,這些都是連接速度快的機房。本篇文章就來分享一下臺灣香港機房的主機的性能與速度,因為這兩個機房的主機線路都算不錯,對于建站或者跑應用都很方便。GCP,即Google Cloud Platform,谷歌云計算平臺,以前為大家提供免費試用一年的VPS主機,不過現在已經將試用時間縮短到了90天了。新用戶在GCP添加了信用卡驗證后,可以免費贈送30...
摘要:但在現實中,企業云端漫步的道路從來都不是康莊大道,而是隱藏著各種陷阱和困難。如果企業選擇云計算服務,那么這些技術人員很多將被解聘。 如今,越來越多的大企業禁不住應用軟件廠商的誘惑,開始考慮將原來運行在私有數據中心的大型應用系統遷移到云端。而關于云計算的商業價值,形形色色 的云計算服務商通常會告訴企業:云計算可以幫助企業節省成本,增強IT系統與業務靈活性,加快應用部署速度,增強業務創新能力…相...
摘要:對于新手使用云服務器的時候,總會遇到各種問題,例如遠程連接更換操作系統磁盤擴容配置升降配使用快照和鏡像等,下面分享一些阿里云服務器常見操作的使用教程,希望對大家有所幫助。阿里云服務器重置實例密碼。對于新手使用云服務器 的時候,總會遇到各種問題,例如遠程連接、更換操作系統、磁盤擴容、配置升降配、使用快照和鏡像等,下面分享一些阿里云服務器常見操作的使用教程,希望對大家有所幫助。 遠程連接在 EC...
閱讀 1346·2023-01-11 13:20
閱讀 1684·2023-01-11 13:20
閱讀 1132·2023-01-11 13:20
閱讀 1860·2023-01-11 13:20
閱讀 4100·2023-01-11 13:20
閱讀 2704·2023-01-11 13:20
閱讀 1385·2023-01-11 13:20
閱讀 3597·2023-01-11 13:20