成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

Oracle ocr磁盤更換

IT那活兒 / 2093人閱讀
Oracle ocr磁盤更換
一.  創(chuàng)建新的OCR磁盤組

(在一個(gè)節(jié)點(diǎn)執(zhí)行就可以)
[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 1000SQL> 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.0DATA 10240 8130 MOUNTED EXTERN 11.2.0.0.0NEWOCR 9216 9057 MOUNTED NORMAL 11.2.0.0.0OCR 9216 8290 MOUNTED NORMAL 11.2.

節(jié)點(diǎn)2:

SQL> set linesize 1000SQL> 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.0DATA 10240 8130 MOUNTED EXTERN 11.2.0.0.0NEWOCR 0 0 DISMOUNTED 0.0.0.0.0OCR 9216 8290 MOUNTED NORMAL 11.2.0.0.0

3. 發(fā)現(xiàn)節(jié)點(diǎn)2,需要手動(dòng)mount新加的ASM磁盤組:

[root@rac2 ~]# su - grid[grid@rac2 ~]$ sqlplus / as sysasm
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 ProductionWith the Real Application Clusters and Automatic Storage Management options
SQL> SQL> alter diskgroup NEWOCR mount;
Diskgroup altered.

4. 再次查看節(jié)點(diǎn)2新加的OCR磁盤組:

SQL> set linesize 1000SQL> 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.0DATA 10240 8130 MOUNTED EXTERN 11.2.0.0.0NEWOCR 9216 8931 MOUNTED NORMAL 11.2.0.0.0OCR 9216 8290 MOUNTED NORMAL 11.2.0.0.0


二. 添加OCR信息到新的OCR磁盤組

(遷移OCR磁盤組)(一個(gè)節(jié)點(diǎn)上執(zhí)行)
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su rootPassword:
[root@rac1 grid]# ocrconfig -add +NEWOCR
[root@rac1 grid]# ocrcheck -configOracle 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=+OCRocrmirrorconfig_loc=+NEWOCRlocal_only=false
[root@rac1 grid]# ocrcheck && crsctl query css votedisk -- 檢查、查看voting diskStatus 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).


三. 遷移VOTE DISK到新建的ASM磁盤組OCR上

1. 查詢當(dāng)前使用的OCR磁盤組:
SQL> set linesize 1000SQL> 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 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:

[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su rootPassword: [root@rac1 grid]# crsctl replace votedisk +NEWOCRSuccessful 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.CRS-4266: Voting file(s) successfully replaced

3. 再次查詢使用的OCR磁盤組:

SQL> set linesize 1000SQL> 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 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 rootPassword:
[root@rac1 grid]# ocrcheck && crsctl query css votediskStatus 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 rootPassword:
[root@rac2 grid]# ocrcheck && crsctl query css votediskStatus 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).


四. 創(chuàng)建ASM實(shí)例spfile到新建的OCR ASM磁盤組上

在一個(gè)節(jié)點(diǎn)以grid用戶登錄ASM實(shí)例執(zhí)行:
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ sqlplus / as sysasm
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 ProductionWith 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.


五.  刪除OCR原位置的ASM磁盤組OCR

1. 刪除舊的OCR磁盤組的原位置(在一個(gè)節(jié)點(diǎn)執(zhí)行就可以):
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su rootPassword:
[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 votediskStatus 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 votediskStatus 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).


六. 重啟整個(gè)集群(所有節(jié)點(diǎn))

[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su rootPassword:
[root@rac1 grid]# crsctl stop crs && crsctl start crs -- 重啟集群


七. 將舊的OCR磁盤組drop掉

1. 檢查ASM實(shí)例的參數(shù)文件(參數(shù)文件路徑是否是新添加的OCR磁盤組):
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ sqlplus / as sysasm
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 ProductionWith 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:

SQL> set linesize 1000SQL> 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

SQL> 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:

SQL> set linesize 1000SQL> 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

SQL> 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_000211 rows selected.

3. 最后將舊的磁盤組mount并drop掉(在一個(gè)節(jié)點(diǎn)執(zhí)行):

[root@rac1 ~]# su - grid
[grid@rac1 ~]$ sqlplus / as sysasm
SQL*Plus: 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 ProductionWith the Real Application Clusters and Automatic Storage Management options
SQL> alter diskgroup OCR mount;
Diskgroup altered.
SQL> 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 ~]$ asmcmdASMCMD> lsARCH/DATA/NEWOCR/


END


更多精彩干貨分享

點(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

相關(guān)文章

  • GCP VPS主機(jī)性能與速度評(píng)測(cè)-免費(fèi)試用90天有香港韓國等多個(gè)機(jī)房性能出眾

    摘要:主機(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...

    番茄西紅柿 評(píng)論0 收藏2637
  • 企業(yè)云計(jì)算道路隱藏著各種陷阱和困難

    摘要:但在現(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)新能力…相...

    cncoder 評(píng)論0 收藏0
  • 阿里云服務(wù)器使用教程,新手上云必備功課

    摘要:對(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...

    Jonathan Shieber 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<