如何遷移OCR和votingdisk到其他asm磁盤組?針對這個(gè)問題,今天小編總結(jié)這篇有關(guān)OCR和votingdisk的文章,希望能幫助更多想解決這個(gè)問題的朋友找到更加簡單易行的辦法。
創(chuàng)新互聯(lián)建站自2013年起,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站設(shè)計(jì)、網(wǎng)站制作、外貿(mào)營銷網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢想脫穎而出為使命,1280元魏縣做網(wǎng)站,已為上家服務(wù),為魏縣各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18982081108
1.查看ocr和votedisk
[oracle:/home/oracle:RACTEST1] ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3104
Available space (kbytes) : 259016
ID : 44728649
Device/File Name : +OCR1
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 bypassed due to non-privileged user
[oracle:/home/oracle:RACTEST1] crsctl query css votedisk
*## STATE File Universal Id File Name Disk group
SQL> select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT
1 DATA 512 1048576 MOUNTED EXTERN N
2 OCR1 512 1048576 MOUNTED EXTERN Y
2.創(chuàng)建新的ASM diskgroup(asmca圖形界面創(chuàng)建)
create diskgroup OCR normal redundancy disk '/dev/oracleasm/disks/OCR01','/dev/oracleasm/disks/OCR02','/dev/oracleasm/disks/OCR03' attribute 'compatible.asm'='11.2';
SQL> select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT
1 DATA 512 1048576 MOUNTED EXTERN N
2 OCR1 512 1048576 MOUNTED EXTERN Y
3 OCR 512 1048576 MOUNTED NORMAL N
3.votedisk從+OCR1 更改到 +OCR
[oracle:/home/oracle:RACTEST1] crsctl replace votedisk +OCR
Successful addition of voting disk 9b4ac868901f4f89bf191e59baa3442b.
Successful addition of voting disk 2c2eff1ca2ad4f7bbfcdf8fc913dcc45.
Successful addition of voting disk 652d503ff1154fd6bfdfe3273a12d529.
Successful deletion of voting disk a5ef8885d1564f99bf0e0d77286c3b1f.
Successfully replaced voting disk group with +OCR.
CRS-4266: Voting file(s) successfully replaced
[oracle:/home/oracle:RACTEST1] crsctl query css votedisk
*## STATE File Universal Id File Name Disk group
4.更改ocr
[root@ractest1 disks]# ocrconfig -add +OCR
[root@ractest1 disks]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3108
Available space (kbytes) : 259012
ID : 44728649
Device/File Name : +OCR1
Device/File integrity check succeeded
Device/File Name : +OCR
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
[root@ractest1 disks]# ocrconfig -delete +OCR1
[root@ractest1 disks]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3108
Available space (kbytes) : 259012
ID : 44728649
Device/File Name : +OCR
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
5.查看asm參數(shù)文件存放的位置并修改到+OCR上
SQL> show parameter spfile
NAME TYPE VALUE
spfile string +OCR1/ractest-cluster/asmparam
eterfile/registry.253.10297677
13
SQL> create pfile='/oracle/app/product/grid/dbs/pfile_ASM1.ora' from spfile;
File created.
SQL> create spfile='+OCR' from pfile='/oracle/app/product/grid/dbs/pfile_ASM1.ora';
File created.
SQL> show parameter spfile
NAME TYPE VALUE
spfile string +OCR1/ractest-cluster/asmparam
eterfile/registry.253.10297677
13
ora.cvu
1 ONLINE ONLINE ractest2
ora.oc4j
1 OFFLINE OFFLINE
ora.ractest.db
1 ONLINE ONLINE ractest1 Open
2 ONLINE ONLINE ractest2 Open
ora.ractest1.vip
1 ONLINE ONLINE ractest1
ora.ractest2.vip
1 ONLINE ONLINE ractest2
ora.testdb.db
1 ONLINE OFFLINE Instance Shutdown
SQL> show parameter spfile
NAME TYPE VALUE
spfile string +OCR/ractest-cluster/asmparame
terfile/registry.253.102983977
5
7.2節(jié)點(diǎn)重啟crs
[root@ractest2 ~]# crsctl stop crs
[root@ractest2 ~]# crsctl start crs
[root@ractest2 ~]# su - oracle
[oracle:/home/oracle:RACTEST2] srvctl start instance -d RACTEST -n ractest2
SQL> show parameter spfile
NAME TYPE VALUE
spfile string +OCR/ractest-cluster/asmparame
terfile/registry.253.102983977
5
8.刪除 +OCR1
SQL> select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT
1 DATA 512 1048576 MOUNTED EXTERN N
2 OCR1 512 1048576 MOUNTED EXTERN N
3 OCR 512 1048576 MOUNTED NORMAL Y
SQL> drop diskgroup OCR1 including contents;
drop diskgroup OCR1 including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup OCR1 is mounted by another ASM instance
SQL> alter diskgroup OCR1 dismount;
Diskgroup altered.
SQL> select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT
1 DATA 512 1048576 MOUNTED EXTERN N
0 OCR1 0 0 DISMOUNTED N
3 OCR 512 1048576 MOUNTED NORMAL Y
SQL> drop diskgroup OCR1 including contents;
drop diskgroup OCR1 including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15001: diskgroup "OCR1" does not exist or is not mounted
SQL> alter diskgroup OCR1 mount;
Diskgroup altered.
SQL> drop diskgroup OCR1 including contents;
Diskgroup dropped.
SQL> select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT
1 DATA 512 1048576 MOUNTED EXTERN N
3 OCR 512 1048576 MOUNTED NORMAL Y
2節(jié)點(diǎn)查看:
SQL> select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup;
GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT
1 DATA 512 1048576 MOUNTED EXTERN N
3 OCR 512 1048576 MOUNTED NORMAL Y
9.最后在2個(gè)節(jié)點(diǎn)都查看一下
[oracle:/home/oracle:+ASM1] crsctl query css votedisk
*## STATE File Universal Id File Name Disk group
ONLINE 652d503ff1154fd6bfdfe3273a12d529 (/dev/oracleasm/disks/OCR03) [OCR]
Located 3 voting disk(s).
[oracle:/home/oracle:+ASM1] ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3088
Available space (kbytes) : 259032
ID : 44728649
Device/File Name : +OCR
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 bypassed due to non-privileged user
[oracle:/home/oracle:+ASM2] crsctl query css votedisk
*## STATE File Universal Id File Name Disk group
ONLINE 652d503ff1154fd6bfdfe3273a12d529 (/dev/oracleasm/disks/OCR03) [OCR]
Located 3 voting disk(s).
[oracle:/home/oracle:+ASM2] ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3088
Available space (kbytes) : 259032
ID : 44728649
Device/File Name : +OCR
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 bypassed due to non-privileged user
看完這篇文章,你們學(xué)會遷移OCR和votingdisk到其他asm磁盤組的方法了嗎?如果還想學(xué)到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀。
網(wǎng)頁題目:如何遷移OCR和votingdisk到其他asm磁盤組
當(dāng)前地址:http://www.rwnh.cn/article36/jcjpsg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、App開發(fā)、自適應(yīng)網(wǎng)站、品牌網(wǎng)站建設(shè)、ChatGPT、用戶體驗(yàn)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)