[root@rac1 rules.d]# su - grid
[grid@rac1 ~]$ asmca
1. 創(chuàng)建新的OCR磁盤組:
2. 查看兩個(gè)節(jié)點(diǎn)是否添加了新的OCR磁盤組:
節(jié)點(diǎn)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.
節(jié)點(diǎn)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. 發(fā)現(xiàn)節(jié)點(diǎn)2,需要手動(dòng)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. 再次查看節(jié)點(diǎn)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. 發(fā)現(xiàn)voting file已經(jīng)在NEWOCR上,然后在兩個(gè)節(jié)點(diǎn)的root下查詢:
節(jié)點(diǎn)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).
節(jié)點(diǎn)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新的狀態(tài)與位置(所有節(jié)點(diǎn)):
節(jié)點(diǎn)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).
節(jié)點(diǎn)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. 檢查磁盤組狀態(tài):
節(jié)點(diǎn)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.
節(jié)點(diǎn)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掉(在一個(gè)節(jié)點(diǎn)執(zhí)行):
~]# 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.
注意:舊的磁盤組只允許在一個(gè)節(jié)點(diǎn)mount,如果發(fā)現(xiàn)多個(gè)節(jié)點(diǎn)mount,需要在其他節(jié)點(diǎn)dismount,否則會(huì)刪除不掉舊的磁盤組
[grid@rac1 ~]$ asmcmd
ASMCMD> ls
ARCH/
DATA/
NEWOCR/
更多精彩干貨分享
點(diǎn)擊下方名片關(guān)注
IT那活兒
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/129891.html
摘要:主機(jī)機(jī)房眾多,其中亞太地區(qū)的機(jī)房有香港臺(tái)灣韓國日本等,這些都是連接速度快的機(jī)房。本篇文章就來分享一下臺(tái)灣香港機(jī)房的主機(jī)的性能與速度,因?yàn)檫@兩個(gè)機(jī)房的主機(jī)線路都算不錯(cuò),對(duì)于建站或者跑應(yīng)用都很方便。GCP,即Google Cloud Platform,谷歌云計(jì)算平臺(tái),以前為大家提供免費(fèi)試用一年的VPS主機(jī),不過現(xiàn)在已經(jīng)將試用時(shí)間縮短到了90天了。新用戶在GCP添加了信用卡驗(yàn)證后,可以免費(fèi)贈(zèng)送30...
摘要:但在現(xiàn)實(shí)中,企業(yè)云端漫步的道路從來都不是康莊大道,而是隱藏著各種陷阱和困難。如果企業(yè)選擇云計(jì)算服務(wù),那么這些技術(shù)人員很多將被解聘。 如今,越來越多的大企業(yè)禁不住應(yīng)用軟件廠商的誘惑,開始考慮將原來運(yùn)行在私有數(shù)據(jù)中心的大型應(yīng)用系統(tǒng)遷移到云端。而關(guān)于云計(jì)算的商業(yè)價(jià)值,形形色色 的云計(jì)算服務(wù)商通常會(huì)告訴企業(yè):云計(jì)算可以幫助企業(yè)節(jié)省成本,增強(qiáng)IT系統(tǒng)與業(yè)務(wù)靈活性,加快應(yīng)用部署速度,增強(qiáng)業(yè)務(wù)創(chuàng)新能力…相...
摘要:對(duì)于新手使用云服務(wù)器的時(shí)候,總會(huì)遇到各種問題,例如遠(yuǎn)程連接更換操作系統(tǒng)磁盤擴(kuò)容配置升降配使用快照和鏡像等,下面分享一些阿里云服務(wù)器常見操作的使用教程,希望對(duì)大家有所幫助。阿里云服務(wù)器重置實(shí)例密碼。對(duì)于新手使用云服務(wù)器 的時(shí)候,總會(huì)遇到各種問題,例如遠(yuǎn)程連接、更換操作系統(tǒng)、磁盤擴(kuò)容、配置升降配、使用快照和鏡像等,下面分享一些阿里云服務(wù)器常見操作的使用教程,希望對(duì)大家有所幫助。 遠(yuǎn)程連接在 EC...
閱讀 1356·2023-01-11 13:20
閱讀 1707·2023-01-11 13:20
閱讀 1215·2023-01-11 13:20
閱讀 1906·2023-01-11 13:20
閱讀 4165·2023-01-11 13:20
閱讀 2757·2023-01-11 13:20
閱讀 1402·2023-01-11 13:20
閱讀 3671·2023-01-11 13:20