返回顶部
首页 > 资讯 > 数据库 >更改votingdisk和OCR到其他asm磁盘组
  • 708
分享到

更改votingdisk和OCR到其他asm磁盘组

2024-04-02 19:04:59 708人浏览 薄情痞子
摘要

1.查看ocr和votedisk[oracle:/home/oracle:RACTEST1] ocrcheckStatus of Oracle Cluster ReGIStry is as follows

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


  1. ONLINE a5ef8885d1564f99bf0e0d77286c3b1f (/dev/oracleasm/disks/OCR11) [OCR1]
    Located 1 voting disk(s).

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.创建新的ASM diskgroup(asmca图形界面创建)
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


  1. ONLINE 9b4ac868901f4f89bf191e59baa3442b (/dev/oracleasm/disks/OCR01) [OCR]
  2. ONLINE 2c2eff1ca2ad4f7bbfcdf8fc913dcc45 (/dev/oracleasm/disks/OCR02) [OCR]
  3. ONLINE 652d503ff1154fd6bfdfe3273a12d529 (/dev/oracleasm/disks/OCR03) [OCR]
    Located 3 voting disk(s).

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参数文件存放的位置并修改到+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

6.一节点重启crs
[root@ractest1 disks]# crsctl stop crs
[root@ractest1 disks]# crsctl start crs
[root@ractest1 disks]# su - oracle
[oracle:/home/oracle:RACTEST1] srvctl start instance -d RACTEST -n ractest1
[oracle:/home/oracle:RACTEST1] crs
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
*--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE ractest1
ONLINE ONLINE ractest2
ora.LISTENER.lsnr
ONLINE ONLINE ractest1
ONLINE ONLINE ractest2
ora.OCR.dg
ONLINE ONLINE ractest1
ONLINE ONLINE ractest2
ora.OCR1.dg
ONLINE ONLINE ractest1
ONLINE ONLINE ractest2
ora.asm
ONLINE ONLINE ractest1 Started
ONLINE ONLINE ractest2 Started
ora.gsd
OFFLINE OFFLINE ractest1
OFFLINE OFFLINE ractest2
ora.net1.network
ONLINE ONLINE ractest1
ONLINE ONLINE ractest2
ora.ons
ONLINE ONLINE ractest1
ONLINE ONLINE ractest2
ora.registry.acfs
ONLINE ONLINE ractest1
ONLINE ONLINE ractest2

Cluster Resources

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节点重启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节点查看:
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个节点都查看一下
[oracle:/home/oracle:+ASM1] crsctl query css votedisk
*## STATE File Universal Id File Name Disk group


  1. ONLINE 9b4ac868901f4f89bf191e59baa3442b (/dev/oracleasm/disks/OCR01) [OCR]
  2. ONLINE 2c2eff1ca2ad4f7bbfcdf8fc913dcc45 (/dev/oracleasm/disks/OCR02) [OCR]
  3. 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


  1. ONLINE 9b4ac868901f4f89bf191e59baa3442b (/dev/oracleasm/disks/OCR01) [OCR]
  2. ONLINE 2c2eff1ca2ad4f7bbfcdf8fc913dcc45 (/dev/oracleasm/disks/OCR02) [OCR]
  3. 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
您可能感兴趣的文档:

--结束END--

本文标题: 更改votingdisk和OCR到其他asm磁盘组

本文链接: https://lsjlt.com/news/44229.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
  • 更改votingdisk和OCR到其他asm磁盘组
    1.查看ocr和votedisk[oracle:/home/oracle:RACTEST1] ocrcheckStatus of Oracle Cluster Registry is as follows ...
    99+
    2024-04-02
  • 如何迁移OCR和votingdisk到其他asm磁盘组
    如何迁移OCR和votingdisk到其他asm磁盘组?针对这个问题,今天小编总结这篇有关OCR和votingdisk的文章,希望能帮助更多想解决这个问题的朋友找到更加简单易行的办法。1.查看ocr和vot...
    99+
    2024-04-02
  • 怎么更换ocr和votingdisk磁盘组
    这篇文章主要讲解了“怎么更换ocr和votingdisk磁盘组”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么更换ocr和votingdisk磁盘组”吧!...
    99+
    2024-04-02
  • 如何迁移OCR和VotingDisk并删除原ASM磁盘组
    这篇文章将为大家详细讲解有关如何迁移OCR和VotingDisk并删除原ASM磁盘组,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。由于存储问题,需要将系统迁移到别的存储上...
    99+
    2024-04-02
  • oracle怎么移动OCR , Vote File , ASM SPILE到新的磁盘组
    本篇内容主要讲解“oracle怎么移动OCR , Vote File , ASM SPILE到新的磁盘组”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“oracl...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作