国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

Oracle ocr磁盤更換

IT那活兒 / 2072人閱讀
Oracle ocr磁盤更換
一.  創建新的OCR磁盤組

(在一個節點執行就可以)
[root@rac1 rules.d]# su - grid
[grid@rac1 ~]$ asmca

1. 創建新的OCR磁盤組:




2. 查看兩個節點是否添加了新的OCR磁盤組:

節點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.

節點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. 發現節點2,需要手動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. 再次查看節點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磁盤組)(一個節點上執行)
[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. 查詢當前使用的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. 發現voting file已經在NEWOCR上,然后在兩個節點的root下查詢:

節點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).

節點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).


四. 創建ASM實例spfile到新建的OCR ASM磁盤組上

在一個節點以grid用戶登錄ASM實例執行:
[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磁盤組的原位置(在一個節點執行就可以):
[root@rac1 ~]# su - grid
[grid@rac1 ~]$ su rootPassword:
[root@rac1 grid]# ocrconfig -delete +OCR

2. 查看OCR和voting disk新的狀態與位置(所有節點):

節點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).

節點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).


六. 重啟整個集群(所有節點)

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


七. 將舊的OCR磁盤組drop掉

1. 檢查ASM實例的參數文件(參數文件路徑是否是新添加的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. 檢查磁盤組狀態:

節點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.

節點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掉(在一個節點執行):

[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.

注意:舊的磁盤組只允許在一個節點mount,如果發現多個節點mount,需要在其他節點dismount,否則會刪除不掉舊的磁盤組

[grid@rac1 ~]$ asmcmdASMCMD> lsARCH/DATA/NEWOCR/


END


更多精彩干貨分享

點擊下方名片關注

IT那活兒

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/129891.html

相關文章

  • GCP VPS主機性能與速度評測-免費試用90天有香港韓國等多個機房性能出眾

    摘要:主機機房眾多,其中亞太地區的機房有香港臺灣韓國日本等,這些都是連接速度快的機房。本篇文章就來分享一下臺灣香港機房的主機的性能與速度,因為這兩個機房的主機線路都算不錯,對于建站或者跑應用都很方便。GCP,即Google Cloud Platform,谷歌云計算平臺,以前為大家提供免費試用一年的VPS主機,不過現在已經將試用時間縮短到了90天了。新用戶在GCP添加了信用卡驗證后,可以免費贈送30...

    番茄西紅柿 評論0 收藏2637
  • 企業云計算道路隱藏著各種陷阱和困難

    摘要:但在現實中,企業云端漫步的道路從來都不是康莊大道,而是隱藏著各種陷阱和困難。如果企業選擇云計算服務,那么這些技術人員很多將被解聘。 如今,越來越多的大企業禁不住應用軟件廠商的誘惑,開始考慮將原來運行在私有數據中心的大型應用系統遷移到云端。而關于云計算的商業價值,形形色色 的云計算服務商通常會告訴企業:云計算可以幫助企業節省成本,增強IT系統與業務靈活性,加快應用部署速度,增強業務創新能力…相...

    cncoder 評論0 收藏0
  • 阿里云服務器使用教程,新手上云必備功課

    摘要:對于新手使用云服務器的時候,總會遇到各種問題,例如遠程連接更換操作系統磁盤擴容配置升降配使用快照和鏡像等,下面分享一些阿里云服務器常見操作的使用教程,希望對大家有所幫助。阿里云服務器重置實例密碼。對于新手使用云服務器 的時候,總會遇到各種問題,例如遠程連接、更換操作系統、磁盤擴容、配置升降配、使用快照和鏡像等,下面分享一些阿里云服務器常見操作的使用教程,希望對大家有所幫助。 遠程連接在 EC...

    Jonathan Shieber 評論0 收藏0

發表評論

0條評論

IT那活兒

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<