运维联盟俱乐部

 找回密码
 立即注册
查看: 1499|回复: 0

[日常管理] 19c gi 替换ocr与ovte

[复制链接]
  • TA的每日心情
    开心
    2023-8-9 11:05
  • 发表于 2021-9-8 13:36:08 | 显示全部楼层 |阅读模式
    1.新建了一个normal冗余的ocr磁盘组用来替换原来的external磁盘组gisuit
    1. ASMCMD> lsdg
    2. State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
    3. MOUNTED  EXTERN  N         512             512   4096  4194304     20480    14444                0           14444              0             N  DATA1/
    4. MOUNTED  EXTERN  N         512             512   4096  4194304      5120     4756                0            4756              0             Y  GISUIT/
    5. MOUNTED  NORMAL  N         512             512   4096  4194304     15360    14820             5120            4850              0             N  OCR/
    复制代码
    2.查看当前的ocr信息
    1. [grid@zy1 ~]$ ocrcheck
    2. Status of Oracle Cluster Registry is as follows :
    3.      Version                  :          4
    4.      Total space (kbytes)     :     491684
    5.      Used space (kbytes)      :      84592
    6.      Available space (kbytes) :     407092
    7.      ID                       : 1003654729
    8.      Device/File Name         :    +GISUIT
    9.                                     Device/File integrity check succeeded

    10.                                     Device/File not configured

    11.                                     Device/File not configured

    12.                                     Device/File not configured

    13.                                     Device/File not configured

    14.      Cluster registry integrity check succeeded

    15.      Logical corruption check bypassed due to non-privileged user

    16. [grid@zy1 ~]$ crsctl check crs
    17. CRS-4638: Oracle High Availability Services is online
    18. CRS-4537: Cluster Ready Services is online
    19. CRS-4529: Cluster Synchronization Services is online
    20. CRS-4533: Event Manager is online
    复制代码
    3.root用户替换当前ocr
    1. [root@zy1 rules.d]# /u01/app/19.0.0/grid/bin/ocrconfig -add +ocr
    2. [root@zy1 rules.d]# /u01/app/19.0.0/grid/bin/ocrcheck
    3. Status of Oracle Cluster Registry is as follows :
    4.      Version                  :          4
    5.      Total space (kbytes)     :     491684
    6.      Used space (kbytes)      :      84592
    7.      Available space (kbytes) :     407092
    8.      ID                       : 1003654729
    9.      Device/File Name         :    +GISUIT
    10.                                     Device/File integrity check succeeded
    11.      Device/File Name         :       +OCR
    12.                                     Device/File integrity check succeeded

    13.                                     Device/File not configured

    14.                                     Device/File not configured

    15.                                     Device/File not configured

    16.      Cluster registry integrity check succeeded

    17.      Logical corruption check succeeded

    18. [root@zy1 rules.d]# /u01/app/19.0.0/grid/bin/ocrconfig -delete +gisuit
    19. [root@zy1 rules.d]# /u01/app/19.0.0/grid/bin/ocrcheck
    20. Status of Oracle Cluster Registry is as follows :
    21.      Version                  :          4
    22.      Total space (kbytes)     :     491684
    23.      Used space (kbytes)      :      84592
    24.      Available space (kbytes) :     407092
    25.      ID                       : 1003654729
    26.      Device/File Name         :       +OCR
    27.                                     Device/File integrity check succeeded

    28.                                     Device/File not configured

    29.                                     Device/File not configured

    30.                                     Device/File not configured

    31.                                     Device/File not configured

    32.      Cluster registry integrity check succeeded

    33.      Logical corruption check succeeded
    复制代码
    4.查看当前vote disk
    1. [grid@zy1 ~]$ crsctl query css votedisk
    2. ##  STATE    File Universal Id                File Name Disk group
    3. --  -----    -----------------                --------- ---------
    4. 1. ONLINE   3afe04fae48d4f1bbff1c8133a7abf20 (AFD:GISUIT1) [GISUIT]
    5. Located 1 voting disk(s).
    复制代码
    5.替换当前vote disk
    1. [grid@zy1 ~]$ crsctl replace votedisk +ocr
    2. Successful addition of voting disk a437cc0b386b4fc5bff82fc302203ac3.
    3. Successful addition of voting disk 3a76c2a2674f4f73bfa1f416da8a378e.
    4. Successful addition of voting disk ed935f921fd24f81bfd3485804df7a11.
    5. Successful deletion of voting disk 3afe04fae48d4f1bbff1c8133a7abf20.
    6. Successfully replaced voting disk group with +ocr.
    7. CRS-4266: Voting file(s) successfully replaced
    8. [grid@zy1 ~]$ crsctl query css votedisk
    9. ##  STATE    File Universal Id                File Name Disk group
    10. --  -----    -----------------                --------- ---------
    11. 1. ONLINE   a437cc0b386b4fc5bff82fc302203ac3 (AFD:OCR1) [OCR]
    12. 2. ONLINE   3a76c2a2674f4f73bfa1f416da8a378e (AFD:OCR2) [OCR]
    13. 3. ONLINE   ed935f921fd24f81bfd3485804df7a11 (AFD:OCR3) [OCR]
    14. Located 3 voting disk(s).
    复制代码
    6.替换默认的ocr备份路径
    1. [root@zy1 rules.d]# /u01/app/19.0.0/grid/bin/ocrconfig -backuploc +ocr
    复制代码
    7.删除原来的gisuit磁盘组
    1. [grid@zy2 ~]$ export ORACLE_SID=+ASM2
    2. [grid@zy2 ~]$ sqlplus / as sysasm

    3. SQL*Plus: Release 19.0.0.0.0 - Production on Wed Sep 8 13:58:04 2021
    4. Version 19.12.0.0.0

    5. Copyright (c) 1982, 2021, Oracle.  All rights reserved.


    6. Connected to:
    7. Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    8. Version 19.12.0.0.0

    9. SQL> select name,state from v$asm_diskgroup;

    10. NAME                   STATE
    11. ------------------------------ -----------
    12. DATA1                   MOUNTED
    13. GISUIT                   MOUNTED
    14. OCR                   MOUNTED

    15. SQL> alter diskgroup gisuit dismount force;

    16. Diskgroup altered.
    17. SQL> drop diskgroup gisuit force including contents;

    18. Diskgroup dropped.
    复制代码


    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    运维联盟俱乐部 ( 冀ICP备19036648号 )

    GMT+8, 2024-5-17 13:49 , Processed in 0.046627 second(s), 21 queries , Gzip On.

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表