快捷搜索:  as  2018  FtCWSyGV  С˵  test  xxx  Ψһ  w3viyKQx

葡京娱乐场7098app_龟发之家论坛



Voting Disk和OCR是Oracle Clusterware的2部分。Voting Disk里面记录着节点成员的信息。如RAC数据库中有哪些节点成员,节点增添或者删除时也同样会将信息记录进来。Voting Disk必须寄放在共享存储上,平日来说是寄放在裸设备上。为了包管Voting Disk的安然,必要设置设置设备摆设摆设多个Voting Disk,Oracle建议Voting Disk的个数应该为奇数个,如 1、3、5个,葡京娱乐场7098app每个Voting Disk的大年夜小约为20MB。

OCR 记录的是节点成员的设置设置设备摆设摆设信息,如数据库、ASM、实例、监听器、VIP等CRS资本的设置设置设备摆设摆设信息。CRS进程治理的信息来自OCR的内容。OCR存储的设置设置设备摆设摆设信息因此目录树的形式来记录一系列“键-值”对应信息的。OCR记录着 CRS进程治理资本的所有设置设置设备摆设摆设信息。大年夜小约为100MB。

对Voting Disk的变动必须用root来进行。

添加一个Voting Disk成员:crsctl add css votedisk /dev/raw/raw3'

删除一个Voting Disk成员:crsctl delete css votedisk /dev/raw/raw3'

对OCR的增添、删除和替代设置设置设备摆设摆设可以由root用户经由过程ocrconfig -replace来操作:

ocrconfig -replace /dev/raw/raw1

留意:增添、删除Voting Disk及规复Voting Disk和OCR时,RAC中的所有资本都必须竣事。

Voting Disk和OCR寄放的信息是至关紧张的,一旦他们损掉或者毁坏的话,Clusterware将无法启动,这样全部RAC都无法启动。是以必要对Voting Disk和OCR进行完整的备份。

对Voting Disk的备份操作可以经由过程dd敕令来操作。

查看位置:

#crsctl query css votedisk

备份操作:

#dd if=/dev/raw/raw2 f=/home/oracle/voting_disk.bak

规复操作:

#dd if=/home/oracle/voting_disk.bak f=/dev/raw/raw2

默认环境下,RAC会在此中一个节点上每4个小时都自动备份一次OCR。并保留近来的3次备份,别的还保留近来两天以及近来两个周末的备份。这个可以经由过程敕令ocrconfig -showbackup来查看。OCR默认的备份路径为$CRS_HOME/cdata/crs。可以经由过程ocrconfig -backuploc来变动OCR的备份路径。OCR自动备份的光阴距离无法改动。我们还可以经由过程ocrconfig -export 来到处OCR的内容,也可以经由过程经由过程ocrconfig -import导入OCR的内容。

可以用ocrconfig -restore 敕令对OCR进行规复。

./ocrconfig -restore /u01/oracle/product/10g/crs/cdata/crs/backup00.ocr

添加Voting Disk:

[root@rhel1 bin]#./crsctl add css votedisk /u01/ocfs2fs/vdisk2

Cluster is not in a ready state for online disk addition

[root@rhel1 bin]#./crsctl add css votedisk /u01/ocfs2fs/vdisk2-force

Now formatting voting disk: /u01/ocfs2fs/vdisk2

successful addition of votedisk /u01/ocfs2fs/vdisk2. chown oracle:oinstall /u01/ocfs2fs/vdisk2

chmod 775 /u01/ocfs2fs/vdisk2

[root@rhel1 bin]# /etc/init.crs start

[root@rhel1 bin]#./crsc葡京娱乐场7098apptl query css votedisk

0. 0 /u01/ocfs2fs/vdisk

1. 0 /u01/ocfs2fs/vdisk2

留意:add voting disk必须是所有办事都关闭的环境下完成。

添加OCR镜像:

[root@rhel1 bin]# touch /u01/ocfs2fs/ocr2

[root@rhel1 bin]#./ocrconfig -replace ocrmirror /u01/ocfs2fs/ocr2

[root@rhel1 bin]#./ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 262120

Used space (kbytes) : 2756

Available space (kbytes) : 259364

ID : 2062708016

Device/File Name : /u01/ocfs2fs/ocr

Device/File integrity check succeeded

Device/File Name : /u01/ocfs2fs/ocr2

Device/File integrity check succeeded

Cluster registry integrity check succeeded

留意:add ocr可所以在线完成。

删除OCR镜像:

[root@rhel1 bin]#./ocrconfig -replace ocrmirror

[root@rhel1 bin]#./ocrcheck

Status of Oracle Cluster Registry is as follows :

Version : 2

Total space (kbytes) : 262120

Used space (kbytes) : 2756

Available space (kbytes) : 259364

ID : 2062708016

Device/File Name : /u01/ocfs2fs/ocr

Device/File integrity check succeeded

Device/File not configured

Cluster registry integrity check succeeded

[root@rhel1 bin]#cat /etc/oracle/ocr.loc

#Device/file /u01/ocfs2fs/ocr2 being deleted

ocrconfig_loc=/u01/ocfs2fs/ocr 删除Voting Disk:

[root@rhel1 bin]#./crsctl delete css votedisk /u01/ocfs2fs/vdisk2

Cluster is not in a ready state for online disk removal

[root@rhel1 bin]#./crsctl stop crs

Stopping resources. This could take several minutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@rhel1 bin]# ./crsctl delete css votedisk /u01/ocfs2fs/vdisk2

Cluster is not in a ready state for online disk removal

[root@rhel1 bin]#./crsctl delete css votedisk /u01/ocfs2fs/vdisk2-force

successful deletion of votedisk /u01/ocfs2fs/vdisk2.

[root@rhel1 bin]#./crsctl query css votedisk

0. 0 /u01/ocfs2fs/vdisk

located 1 votedisk(s).

备份、规复Voting Disk:

[root@rhel1 bin]#./crsctl check crs

Failure 1 contacting CSS daemon

Cannot communicate with CRS

Cannot葡京娱乐场7098app communicate with EVM

[root@rhel1 bin]# dd if=/u01/ocfs2fs/vdisk f=/home/oracle/vdisk_bak //备份,ocfs2也可直接copy

20000+0 records in

20000+0 records out

10240000 bytes (10 MB) copied, 0.301106 seconds, 34.0 MB/s

[root@rhel1 bin]# rm -rf /u01/ocfs2fs/vdisk

[root@rhel1 bin]#dd if=/home/oracle/vdisk_bak f=/u01/ocfs2fs/vdisk //规复,ocfs2也可直接copy

20000+0 records in

20000+0 records out

10240000 bytes (10 MB) copied, 0.173678 seconds, 59.0 MB/s

[root@rhel1 bin]# chown oracle:oinstall /u01/ocfs2fs/vdisk

[root@rhel1 bin]# chmod 775 /u01/ocfs2fs/vdisk

[root@rhel1 bin]#/etc/init.d/init.crs start

Startup will be queued to init within 30 seconds.

[root@rhel1 bin]#./crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

备份、规复OCR:

[root@rhel1 bin]# ./crsctl stop crs

Stopping resources. This could take several minutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@rhel1 bin]# cat /etc/oracle/ocr.loc

#Device/file /u01/ocfs2fs/ocr2 being deleted

ocrconfig_loc=/u01/ocfs2fs/ocr

local_only=false

[root@rhel1 bin]# mv /u01/ocfs2fs/ocr /u01/ocfs2fs/ocr_bak

[root@rhel1 crs_1]# cd cdata

[root@rhel1 cdata]# cd crs

[root@rhel1 crs]# ll

total 23144

-rwxrwxr-x 1 oracle dba 3514368 Mar 1 11:00 13968559

-rwxrwxr-x 1 oracle dba 3514368 Mar 1 07:00 33426182

-rw-r--r-- 1 root root 3182592 Mar 8 15:17 34809936

-rwxrwxr-x 1 oracle d葡京娱乐场7098appba 3514368 Feb 27 09:38 backup00.ocr

-rwxrwxr-x 1 oracle dba 3514368 Feb 8 06:02 backup01.ocr

-rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 backup02.ocr

-rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 day.ocr

-rwxrwxr-x 1 oracle dba 2142208 Nov 8 19:25 week.ocr

[root@rhel1 crs]# cd ../../bin

[root@rhel1 bin]# ./ocrconfig -restore /u葡京娱乐场7098app01/app/oracle/crs_1/cdata/crs/backup02.ocr

PROT-16: Internal Error

[root@rhel1 bin]#touch /u01/ocfs2fs/ocr

[root@rhel1 bin]#./ocrconfig -restore /u01/app/oracle/crs_1/cdata/crs/backup02.ocr

[root@rhel1 bin]# ./crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

[root@rhel1 bin]# ./crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

查看和改变自动备份目录的敕令如下:

./ocrconfig -showbackup //查看自动备份。

./ocrconfig -backuploc //改变自动备份目录。

您可能还会对下面的文章感兴趣: