ITPub博客

首页 > 数据库 > Oracle > RAC重用裸设备

RAC重用裸设备

原创 Oracle 作者:nathanzhn 时间:2014-04-07 22:45:56 0 删除 编辑

环境:

VBOX

ORACLE ENTERPRISE LINUX 5.8_X86_64

ORACLE DATABASE 10.2.0.1.0

ORACLE CLUSTERWARE 10.2.0.1.0

在重新搭建一套RAC环境的时候,因为不想多建新的OCR/VOTING DISK共享磁盘,就打算使用上一套RAC环境中用过的共享磁盘。也考虑过,重用这些共享磁盘,可能会出一些状况,打算尝试一下,看看在哪些步骤上会出问题。

为了减少出错几率,在使用UDEV绑定裸设备(共有5个裸设备供OCR、VOTING DISK使用,OCR: /dev/raw/raw1-/dev/sdb1; /dev/raw/raw2-/dev/sdc1; VOTING DISK: /dev/raw/raw3-/dev/sdd1; /dev/raw/raw4-/dev/sde1; /dev/raw/raw5-/dev/sdf1)之前,把原分区sdb1, sdc1, sdd1, sde1, sdf1用fdisk删除并重建了分区。

开始安装CLUSTERWARE,安装过程没有问题,按照上面的分布方式把裸设备分配给了OCR/VOTING DISK。

但是在第一个节点执行$ORA_CRS_HOME/root.sh时,报错:

[root@rac5 rules.d]# /s01/app/oracle/product/10.2.0/crs_1/root.sh
WARNING: directory '/s01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/s01/app/oracle/product' is not owned by root
WARNING: directory '/s01/app/oracle' is not owned by root
WARNING: directory '/s01/app' is not owned by root
WARNING: directory '/s01' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
Failed to upgrade Oracle Cluster Registry configuration

同时发现:

[root@rac5 rules.d]# ll /dev/raw/
total 0
crw-r----- 1 root   oinstall 162, 1 Apr  7 08:12 raw1
crw-r----- 1 root   oinstall 162, 2 Apr  7 08:12 raw2
crw-r--r-- 1 oracle oinstall 162, 3 Apr  7 08:12 raw3
crw-r--r-- 1 oracle oinstall 162, 4 Apr  7 08:12 raw4
crw-r--r-- 1 oracle oinstall 162, 5 Apr  7 08:12 raw5

查看日志:

/s01/app/oracle/product/10.2.0/crs_1/log/rac5/client/ocrconfig_6661.log

Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle.  All rights reserved.
2014-04-07 08:12:14.376: [ OCRCONF][1305384672]ocrconfig starts...
2014-04-07 08:12:14.376: [ OCRCONF][1305384672]Upgrading OCR data
2014-04-07 08:12:14.390: [ OCRCONF][1305384672]OCR already in current version.
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Failed to call clsssinit (21)
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Failed to make a backup copy of OCR
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Exiting [status=failed]...

 

果然,“不负我望”,还是出问题了,看来用fdisk不解决问题啊!

查了一番帖子,采用了如下方式:

[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdb1
dd: writing to `/dev/sdb1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 76.6793 seconds, 7.0 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdc1
dd: writing to `/dev/sdc1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 74.1222 seconds, 7.2 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdd1
dd: writing to `/dev/sdd1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 76.5027 seconds, 7.0 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sde1
dd: writing to `/dev/sde1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 75.4561 seconds, 7.1 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdf1
dd: writing to `/dev/sdf1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 74.4116 seconds, 7.2 MB/s

 

然后重新执行root.sh,就成功了!其实我对dd也不熟悉,查了一下说法:/dev/zero文件代表一个永远输出 0的设备文件,使用它作输入可以得到全为空的文件。

好吧,就是把之前被用过的几个裸设备变成彻底空白。就可以重新使用了。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26521853/viewspace-1137428/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-01-23

  • 博文量
    49
  • 访问量
    262692