脚踏实地、勇往直前!
全部博文(1005)
分类: Oracle
2012-03-22 19:53:57
12.显示所有节点的私有、VIP名及节点名
$olsnodes -n -p -i
rac1 1 rac1-priv rac1-vip.mycorpdomain.com
rac2 2 rac2-priv rac2-vip.mycorpdomain.com
13.查看节点应用程序(VIP、GSD、Listener、ONS)的配置
$./srvctl config nodeapps -h
Usage: srvctl config nodeapps -n
-n
-a Display VIP configuration
-g Display GSD configuration
-s Display ONS daemon configuration
-l Display listener configuration
-h Print usage
[oracle@rac1 srvm]$ srvctl config nodeapps -n rac1
rac1 devdb1 /u01/app/oracle/product/10.2.0/db_1
[oracle@rac1 srvm]$ srvctl config nodeapps -n rac1 -a -g -s -l
VIP exists.: /rac1-vip.mycorpdomain.com/192.168.2.31/255.255.255.0/eth0
GSD exists.
ONS daemon exists.
Listener exists.
node02 2008/12/19 03:38:17 /orac/crs/cdata/crs
node02 2008/12/18 20:23:45 /orac/crs/cdata/crs
node01 2008/12/18 04:15:47 /orac/crs/cdata/crs
node01 2008/12/18 04:15:47 /orac/crs/cdata/crs
node01 2008/12/14 04:21:00 /orac/crs/cdata/crs
$ll /orac/crs/cdata/crs/
total 15696
-rw-r--r-- 1 root root 4014080 Dec 18 04:15 backup00.ocr
-rw-r--r-- 1 root root 4014080 Dec 14 04:21 backup01.ocr
2.检查所有节点的ocr情况
[grid@node1 ocrbak]$ cluvfy comp ocr -n all
Verifying OCR integrity
Checking OCR integrity...
Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations
ASM Running check passed. ASM is running on all cluster nodes
Checking OCR config file "/etc/oracle/ocr.loc"...
OCR config file "/etc/oracle/ocr.loc" check successful
Disk group for ocr location "+crs" available on all the nodes
Checking size of the OCR location "+crs" ...
Size check for OCR location "+crs" successful...
Size check for OCR location "+crs" successful...
WARNING:
This check does not verify the integrity of the OCR contents. Execute 'ocrcheck' as a privileged user to verify the contents of OCR.
OCR integrity check passed
Verification of OCR integrity was successful.
[grid@node1 ocrbak]$ more /etc/oracle/ocr.loc
ocrconfig_loc=+crs
local_only=FALSE
3.添加ocr镜像
[root@node1 bin]#/u01/app/oracle/product/10.2.0/crs_1/bin/ocrconfig -replace ocrmirror /dev/raw/raw3
[root@node1 bin]# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1043916
Used space (kbytes) : 4860
Available space (kbytes) : 1039056
ID : 1781838267
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw3
Device/File integrity check succeeded
Cluster registry integrity check succeeded
[root@node1 oracle]# more /etc/oracle/ocr.loc
#Device/file getting replaced by device /dev/raw/raw3
ocrconfig_loc=/dev/raw/raw1
ocrmirrorconfig_loc=/dev/raw/raw3
local_only=false
删除ocr镜像
[root@node1 oracle]# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrconfig -replace ocrmirror
[root@node1 oracle]# more /etc/oracle/ocr.loc
#Device/file /dev/raw/raw3 being deleted
ocrconfig_loc=/dev/raw/raw1
local_only=false
[root@node1 oracle]#
4.删除ocr
删除ocr后,ocr镜像会自动转换为ocr.
node1-> /u01/app/oracle/product/10.2.0/crs_1/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1043916
Used space (kbytes) : 4868
Available space (kbytes) : 1039048
ID : 1781838267
Device/File Name : /dev/raw/raw1
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw3
Device/File integrity check succeeded
Cluster registry integrity check succeeded
[root@node1 ~]# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrconfig -replace ocr
[root@node1 ~]# /u01/app/oracle/product/10.2.0/crs_1/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 2
Total space (kbytes) : 1043916
Used space (kbytes) : 4868
Available space (kbytes) : 1039048
ID : 1781838267
Device/File Name : /dev/raw/raw3
Device/File integrity check succeeded
Device/File not configured
Cluster registry integrity check succeeded
5.添加vote磁盘
最好先关闭crs
[root@node1 oracle]# /etc/init.d/init.crs stop
[root@node2 oracle]# /etc/init.d/init.crs stop
[root@node1 oracle]# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl add css votedisk /dev/raw/raw21
Cluster is not in a ready state for online disk addition
需要添加force参数
[root@node1 oracle]# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl add css votedisk /dev/raw/raw21 -force
Now formatting voting disk: /dev/raw/raw21
successful addition of votedisk /dev/raw/raw21.
[root@node1 oracle]# /u01/app/oracle/product/10.2.0/crs_1/bin/crsctl add css votedisk /dev/raw/raw22 -force
Now formatting voting disk: /dev/raw/raw22
successful addition of votedisk /dev/raw/raw22.
6. 获取css相关设置
node1-> crsctl get css misscount
60
node1-> crsctl get css disktimeout
200
node1-> crsctl get css reboottime
3
16.停止启动具体某个资源
[oracle@node2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.node1.gsd application ONLINE UNKNOWN node1
ora.node1.ons application ONLINE UNKNOWN node1
ora.node1.vip application ONLINE ONLINE node1
ora.node2.gsd application ONLINE UNKNOWN node2
ora.node2.ons application ONLINE UNKNOWN node2
ora.node2.vip application ONLINE ONLINE node2
----------stop-----------------
crs_stop ora.node1.gsd
crs_stop ora.node1.ons
crs_stop ora.node2.gsd
crs_stop ora.node2.ons
--------start------------------
crs_start ora.node1.gsd
crs_start ora.node1.ons
crs_start ora.node2.gsd
crs_start ora.node2.ons
17.重启动CRS(各节点上root用户下执行)
#/etc/init.d/init.crs stop
#/etc/init.d/init.crs start
#/etc/init.d/init.crs enable //随系统启动而自启动,默认选项
#/etc/init.d/init.crs disenable//系统启动后不自动启动