ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称

技术ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称 ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称ORACLE

ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称

ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称

发表于2013 年11 月13 日由惜分飞

联系:手机/微信(86 13429648788) QQ(107644445)

标题:ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称

作者:惜分飞?版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利。]

今天看着我这个单节点的12C rac,突然觉得光学字符识别所在的磁盘组叫做DG_SYS有点不舒服,想改成系统数据组。处理方法是先把ocr/votedisk/asm spfile迁移到已经存在的空对地导弹中,然后修改磁盘组名称,最后迁移到新名称磁盘组中(本次处理流程当前运行情况

[grid @ xifenfi ~]$ crsctl状态res -t

-

名称目标状态服务器状态详细信息

-

本地资源

-

奥拉ASMNET1LSNR _ ASM.lsnr

在线在线西芬飞稳定

奥拉数据

在线在线西芬飞稳定

奥拉LISTENER.lsnr .

在线在线西芬飞稳定

ora.net1.network

在线在线西芬飞稳定

ora.ons

在线在线西芬飞稳定

ora.proxy_advm

线上线下喜峰飞稳定

-

群集资源

-

奥拉LISTENER_SCAN1.lsnr

一在线在线喜峰飞稳定

奥拉MGMTLSNR .

1 ONLINE ONLINE新飞169。254 .196 .108 10.1

0.30.22,稳定

ora.asm

一在线在线喜峰飞起步,稳定

2离线离线稳定

3离线离线稳定

ora.cdb.db

一在线在线西芬菲开放,直刺

LE
ora.cvu
1 ONLINE ONLINE xifenfei STABLE
ora.oc4j
1 ONLINE ONLINE xifenfei STABLE
ora.scan1.vip
1 ONLINE ONLINE xifenfei STABLE
ora.xifenfei.vip
1 ONLINE ONLINE xifenfei STABLE
--------------------------------------------------------------------------------
SQL select * from v$version;
BANNER CON_ID
-------------------------------------------------------------------------------- ----------
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
PL/SQL Release 12.1.0.1.0 - Production 0
CORE 12.1.0.1.0 Production 0
TNS for Linux: Version 12.1.0.1.0 - Production 0
NLSRTL Version 12.1.0.1.0 - Production 0
SQL select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DG_SYS MOUNTED
DATA MOUNTED
[grid@xifenfei ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 60a037da30714f6bbfe5d90206ff27a7 (/dev/sdc2) [DG_SYS]
Located 1 voting disk(s).
[grid@xifenfei ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 4
Total space (kbytes) : 409568
Used space (kbytes) : 1380
Available space (kbytes) : 408188
ID : 2132096904
Device/File Name : +DG_SYS
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
SQL show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DG_SYS/xff-cluster/ASMPARAMET
ERFILE/registry.253.825640465

修改ocr路径
ocrconfig -add和ocrconfig -delete完成ocr更换磁盘组,该过程可以在线处理

[root@xifenfei ~]# ocrconfig -add +data
--alert 日志
2013-09-09 22:32:40.799:
[crsd(5064)]CRS-1007:The OCR/OCR mirror location was replaced by +data.
[root@xifenfei ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 4
Total space (kbytes) : 409568
Used space (kbytes) : 1380
Available space (kbytes) : 408188
ID : 2132096904
Device/File Name : +DG_SYS
Device/File integrity check succeeded
Device/File Name : +data
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
[root@xifenfei ~]# ocrconfig -delete +DG_SYS
--alert 日志
2013-09-09 22:35:53.585:
[crsd(5064)]CRS-1010:The OCR mirror location +DG_SYS was removed.
[root@xifenfei ~]# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 4
Total space (kbytes) : 409568
Used space (kbytes) : 1380
Available space (kbytes) : 408188
ID : 2132096904
Device/File Name : +data
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

修改votedisk路径
通过crsctl replace votedisk命令修改

[root@xifenfei ~]# crsctl replace votedisk +DATA
Successful addition of voting disk 161ddea0a5fe4f28bfb67536e6105122.
Successful deletion of voting disk 60a037da30714f6bbfe5d90206ff27a7.
Successfully replaced voting disk group with +DATA.
CRS-4266: Voting file(s) successfully replaced
-alert日志
2013-09-09 22:38:15.259:
[cssd(4685)]CRS-1605:CSSD voting file is online: /dev/sdb; details in /u01/app/12.1/grid/product/log/xifenfei/cssd/ocssd.log.
2013-09-09 22:38:15.259:
[cssd(4685)]CRS-1626:A Configuration change request completed successfully
2013-09-09 22:38:15.285:
[cssd(4685)]CRS-1601:CSSD Reconfiguration complete. Active nodes are xifenfei .
[root@xifenfei ~]# crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 161ddea0a5fe4f28bfb67536e6105122 (/dev/sdb) [DATA]
Located 1 voting disk(s).

修改asm spfile位置

[grid@xifenfei ~]$ gpnptool get -o-
Success.
…………
orcl:ASM-Profile id="asm" DiscoveryString="/dev/sd*" SPFile="+DG_SYS/xff-cluster/ASMPARAMETERFILE/registry.253.825640465" Mode="legacy"/
…………
[grid@xifenfei ~]$ sqlplus / as sysasm
SQL*Plus: Release 12.1.0.1.0 Production on Mon Sep 9 22:42:05 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL create pfile='/tmp/pfile.asm' from spfile;
File created.
SQL create spfile='+DATA' FROM PFILE='/tmp/pfile.asm';
File created.
[grid@xifenfei ~]$ gpnptool get -o-
Success.
…………
orcl:ASM-Profile id="asm" DiscoveryString="/dev/sd*" SPFile="+DATA/xff-cluster/ASMPARAMETERFILE/registry.253.825720159" Mode="legacy"/
…………

这里证明create asm spfile会自动修改spfile在gpnptool对应的profile里面的配置,无需人工干预

重启crs
为了使得asm使用新的磁盘组中的spfile文件

[root@xifenfei ~]# crsctl stop crs
[root@xifenfei ~]# crsctl start crs

验证+DG_SYS磁盘组未被使用

[grid@xifenfei ~]$ sqlplus / as sysasm
SQL*Plus: Release 12.1.0.1.0 Production on Mon Sep 9 22:59:49 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATA/xff-cluster/ASMPARAMETER
FILE/registry.253.825720159
ASMCMD lsof
DB_Name Instance_Name Path
+ASM +ASM1 +DATA.255.819326577
cdb cdb1 +DATA/CDB/CONTROLFILE/current.274.819356503
cdb cdb1 +DATA/CDB/DATAFILE/sysaux.278.819355829
cdb cdb1 +DATA/CDB/DATAFILE/system.269.819356101
cdb cdb1 +DATA/CDB/DATAFILE/undotbs1.276.819356317
cdb cdb1 +DATA/CDB/DATAFILE/users.279.819356309
cdb cdb1 +DATA/CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/pdbseed_temp01.dbf
cdb cdb1 +DATA/CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/sysaux.272.819356709
cdb cdb1 +DATA/CDB/DD7C48AA5A4404A2E04325AAE80A403C/DATAFILE/system.271.819356709
cdb cdb1 +DATA/CDB/ONLINELOG/group_1.277.822736453
cdb cdb1 +DATA/CDB/ONLINELOG/group_2.280.822736461
cdb cdb1 +DATA/CDB/ONLINELOG/group_3.275.822736397
cdb cdb1 +DATA/CDB/TEMPFILE/temp.273.819356649

dismount +DG_SYS磁盘组

ASMCMD lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 20480 3369 0 3369 0 Y DATA/
MOUNTED EXTERN N 512 4096 1048576 5451 5231 0 5231 0 N DG_SYS/
ASMCMD umount dg_sys
ASMCMD lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 20480 3369 0 3369 0 Y DATA/

修改asm dg名称
修改磁盘组+DG_SYS为+SYS_DG

[grid@xifenfei ~]$ renamedg phase=both dgname=DG_SYS newdgname=SYS_DG verbose=true
Parsing parameters..
Parameters in effect:
Old DG name : DG_SYS
New DG name : SYS_DG
Phases :
Phase 1
Phase 2
Discovery str : (null)
Clean : TRUE
Raw only : TRUE
renamedg operation: phase=both dgname=DG_SYS newdgname=SYS_DG verbose=true
Executing phase 1
Discovering the group
Performing discovery with string:
Identified disk UFS:/dev/sdc2 with disk number:0 and timestamp (32990496 1727895552)
Checking for hearbeat...
Re-discovering the group
Performing discovery with string:
Identified disk UFS:/dev/sdc2 with disk number:0 and timestamp (32990496 1727895552)
Checking if the diskgroup is mounted or used by CSS
Checking disk number:0
Generating configuration file..
Completed phase 1
Executing phase 2
Looking for /dev/sdc2
Modifying the header
Completed phase 2
Terminating kgfd context 0x7fceeb02a0a0

mount +SYS_DG

SQL select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATA MOUNTED
SYS_DG DISMOUNTED
SQL alter diskgroup sys_dg mount;
Diskgroup altered.
SQL select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATA MOUNTED
SYS_DG MOUNTED

asm spfile/ocr/votedisk迁移从+DATA到+SYS_DG

SQL create spfile='+SYS_DG' FROM pfile='/tmp/pfile.asm';
File created.
[root@xifenfei ~]# ocrconfig -add +SYS_DG
[root@xifenfei ~]# ocrconfig -DELETE +DATA
[root@xifenfei ~]# crsctl replace votedisk +SYS_DG
Successful addition of voting disk 9694a31053ea4ff4bfb57891461a1296.
Successful deletion of voting disk 161ddea0a5fe4f28bfb67536e6105122.
Successfully replaced voting disk group with +SYS_DG.
CRS-4266: Voting file(s) successfully replaced
[root@xifenfei ~]# crsctl stop crs
[root@xifenfei ~]# crsctl start crs

删除ocr里面老磁盘组(+DG_SYS)信息

[root@xifenfei ~]# crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE xifenfei STABLE
ora.DATA.dg
ONLINE ONLINE xifenfei STABLE
ora.DG_SYS.dg
ONLINE OFFLINE xifenfei STABLE
ora.LISTENER.lsnr
ONLINE ONLINE xifenfei STABLE
ora.SYS_DG.dg
ONLINE ONLINE xifenfei STABLE
ora.net1.network
ONLINE ONLINE xifenfei STABLE
ora.ons
ONLINE ONLINE xifenfei STABLE
ora.proxy_advm
ONLINE OFFLINE xifenfei STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE xifenfei STABLE
ora.MGMTLSNR
1 ONLINE ONLINE xifenfei 169.254.196.108 10.1
0.30.22,STABLE
ora.asm
1 ONLINE ONLINE xifenfei Started,STABLE
2 OFFLINE OFFLINE STABLE
3 OFFLINE OFFLINE STABLE
ora.cdb.db
1 ONLINE ONLINE xifenfei Open,STABLE
ora.cvu
1 ONLINE ONLINE xifenfei STABLE
ora.oc4j
1 ONLINE ONLINE xifenfei STABLE
ora.scan1.vip
1 ONLINE ONLINE xifenfei STABLE
ora.xifenfei.vip
1 ONLINE ONLINE xifenfei STABLE
--------------------------------------------------------------------------------
[root@xifenfei ~]# srvctl remove diskgroup -diskgroup dg_sys
[root@xifenfei ~]# crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE xifenfei STABLE
ora.DATA.dg
ONLINE ONLINE xifenfei STABLE
ora.LISTENER.lsnr
ONLINE ONLINE xifenfei STABLE
ora.SYS_DG.dg
ONLINE ONLINE xifenfei STABLE
ora.net1.network
ONLINE ONLINE xifenfei STABLE
ora.ons
ONLINE ONLINE xifenfei STABLE
ora.proxy_advm
ONLINE OFFLINE xifenfei STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE xifenfei STABLE
ora.MGMTLSNR
1 ONLINE ONLINE xifenfei 169.254.196.108 10.1
0.30.22,STABLE
ora.asm
1 ONLINE ONLINE xifenfei Started,STABLE
2 OFFLINE OFFLINE STABLE
3 OFFLINE OFFLINE STABLE
ora.cdb.db
1 ONLINE ONLINE xifenfei Open,STABLE
ora.cvu
1 ONLINE ONLINE xifenfei STABLE
ora.oc4j
1 ONLINE ONLINE xifenfei STABLE
ora.scan1.vip
1 ONLINE ONLINE xifenfei STABLE
ora.xifenfei.vip
1 ONLINE ONLINE xifenfei STABLE
--------------------------------------------------------------------------------

至此ocr/votedisk/asm spfile所在磁盘组修改名称完成,因为该库是一个单节点的rac,如果是两个或者更多节点的rac可以实现不停机的情况下进行(分步重启节点).该处理过程和11.2 rac完全相同,未有任何的改变

  • ORACLE 12C RAC hub AND leaf 相互转换
  • oracle 12.1 RAC的ocr磁盘组异常恢复
  • OCR/Vote disk 维护操作
  • 安装 ORACLE 12C 单节点RAC
  • has a disk HB, but no network HB—-traceroute不通导致
  • crfclust.bdb文件过大处理
  • 公有云安装19c rac遇到问题—169网段udp异常
  • oracle rac 12.2 执行root.sh报CLSRSC-400
  • 修改11.2 RAC 的 SCAN IP
  • 一次 CRS-1013: ASM 磁盘组中的 OCR 位置不可访问 故障分析
  • RAC维护命令
  • 因asm sga_target设置不当导致11gr2 rac无法正常启动

此条目发表在ORACLE 12C,Oracle RAC分类目录,贴了ORACLE 12C,oracle rac标签。将固定链接加入收藏夹。
←oracle 12.1 RAC的ocr磁盘组异常恢复
一次数据库优化全过程分析→

ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称》有 1 条评论

内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/114072.html

(0)

相关推荐

  • Hive常用查询命令和使用方法

    技术Hive常用查询命令和使用方法这期内容当中小编将会给大家带来有关Hive常用查询命令和使用方法,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。1. 将日志文件传到HDFS ```ba

    攻略 2021年11月11日
  • FP Tree算法原理是什么

    技术FP Tree算法原理是什么FP Tree算法原理是什么,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。Apriori算法是挖掘频繁项集的经典算法,需要多

    攻略 2021年12月3日
  • SpringBoot怎么实现持久化登录状态获取

    技术SpringBoot怎么实现持久化登录状态获取本篇内容主要讲解“SpringBoot怎么实现持久化登录状态获取”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“SpringB

    攻略 2021年11月9日
  • 如何用Python帮你打码

    技术如何用Python帮你打码这期内容当中小编将会给大家带来有关如何用Python帮你打码,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。引言所谓的像素图,就是对图像做一个颗粒化的效果,

    攻略 2021年10月25日
  • redis的五种数据类型以及用途(redis 有哪些数据类型)

    技术Redis中的特殊数据类型有哪些这篇文章将为大家详细讲解有关Redis中的特殊数据类型有哪些,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。Redis除了5种基础数据类型,还有三种特

    攻略 2021年12月22日
  • 怎么用Vue实现大屏页面的屏幕自适应

    技术怎么用Vue实现大屏页面的屏幕自适应本篇内容介绍了“怎么用Vue实现大屏页面的屏幕自适应”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅

    攻略 2021年10月22日