ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 用dbca构建采用ocfs2存储的rac database_rhel4_oracle10g rac

用dbca构建采用ocfs2存储的rac database_rhel4_oracle10g rac

原创 Linux操作系统 作者:wisdomone1 时间:2010-03-12 12:38:36 0 删除 编辑
1,根据你的系统内核到oracle官网下载如下对应的ocfs2 rpm包
-rw-r--r--  1 root root    330628 Mar 11 00:54 ocfs2-2.6.9-42.EL-1.2.9-1.el4.i686.rpm
-rw-r--r--  1 root root    305279 Mar 11 00:54 ocfs2-2.6.9-42.ELsmp-1.2.9-1.el4.i686.rpm
-rw-r--r--  1 root root    173056 Mar 11 00:54 ocfs2console-1.2.7-1.el4.i386.rpm
-rw-r--r--  1 root root   1044312 Mar 11 00:54 ocfs2-tools-1.2.7-1.el4.i386.rpm

2,在每个rac节点安装以上所有rpm包
  rpm -ivh ocfs2*
3,在任何一个rac节点,请以root用户运行ocfs2console,添加ocfs2集群节点,并传播相关配置信息到所有rac节点
4,在每个rac节点上,运行如下脚本
/etc/init.d/o2cb status
/etc/init.d/o2cb load  --与之对应为unload
/etc/init.d/o2cb configure

/etc/init.d/o2cb enable

5,并确认每个rac节点上面的o2cb及ocfs2服务配置并开启
chkconfig --list o2cb
chkconfig --list ocfs2

若没有信息显示,请运行如下脚本
chkconfig --add o2cb
chkconfig --add ocfs2

6,在任何一个rac节点,运行ocfs2console,进行格式化工作(注:只在一个节点运行就可)
 以上工作可以用命令行工具进行:mkfs.ocfs2

7,在所有rac节点运行如下命令
mkdir -p /data
chown oracle:oinstall /data
chmod 755 /data

8,在所有rac节点mount格式化后的ocfs2文件系统
mount -t ocfs2 -o datavolume,nointr /dev/sda2 /data

9,在任何一个rac节点,以oracle用户运行dbca

若在dbca运行中报如下错误:
运行dbca采用ocfs2作为存储时,报错如下:
ora-29702

-bash-3.00$ cd $ORACLE_BASE
-bash-3.00$ ls
10201_clusterware_linux32.zip  10201_database_linux32.zip  admin  clusterware  database  Desktop  localarch  product
-bash-3.00$ cd admin/
-bash-3.00$ ls
+ASM  capitek  ocfs2
-bash-3.00$ cd ocfs2/
-bash-3.00$ ls
adump  bdump  cdump  dpdump  pfile  udump
-bash-3.00$ cd bdump/
-bash-3.00$ ls
alert_ocfs2.log  ocfs2_diag_12900.trc  ocfs2_lmon_12904.trc
-bash-3.00$ more alert_ocfs2.log
Thu Mar 11 01:21:13 2010
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Thu Mar 11 01:21:15 2010
Errors in file /u01/app/oracle/admin/ocfs2/udump/ocfs2_ora_12896.trc:
ORA-27504: IPC error creating OSD context
ORA-27300: OS system dependent operation:skgxnqtsz failed with status: 0
ORA-27301: OS failure message: Error 0
ORA-27302: failure occurred at: SKGXN not av
clsssinit ret = 21
interconnect information is not available from OCR
  WARNING: No cluster interconnect has been specified. Depending on
           the communication driver configured Oracle cluster traffic
           may be directed to the public interface of this machine.
           Oracle recommends that RAC clustered databases be configured
           with a private interconnect for enhanced security and
           performance.
Shared memory segment for instance monitoring created
Picked latch-free SCN scheme 2
Using LOG_ARCHIVE_DEST_1 parameter default value as /u01/app/oracle/product/10.2.0/db_1/dbs/arch
Autotune of undo retention is turned on.
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.1.0.
System parameters with non-default values:
  processes                = 150
  sga_target               = 218103808
  control_files            = /data/ocfs2/control01.ctl, /data/ocfs2/control02.ctl, /data/ocfs2/control03.ctl
  db_block_size            = 8192
  compatible               = 10.2.0.1.0
  db_file_multiblock_read_count= 16
  undo_management          = AUTO
  undo_tablespace          = UNDOTBS1
  remote_login_passwordfile= EXCLUSIVE
  db_domain                =
  dispatchers              = (PROTOCOL=TCP) (SERVICE=ocfs2XDB)
  job_queue_processes      = 10
  background_dump_dest     = /u01/app/oracle/admin/ocfs2/bdump
  user_dump_dest           = /u01/app/oracle/admin/ocfs2/udump
  core_dump_dest           = /u01/app/oracle/admin/ocfs2/cdump
  audit_file_dest          = /u01/app/oracle/admin/ocfs2/adump
  db_name                  = ocfs2
  open_cursors             = 300
  pga_aggregate_target     = 71303168
Cluster communication is configured to use the following interface(s) for this instance
  192.168.125.8
Thu Mar 11 01:21:16 2010
cluster interconnect IPC version:Oracle UDP/IP
IPC Vendor 1 proto 2
PSP0 started with pid=4, OS id=12902
LMON started with pid=5, OS id=12904
PMON started with pid=2, OS id=12898
DIAG started with pid=3, OS id=12900
LMD0 started with pid=6, OS id=12906
MMAN started with pid=7, OS id=12908
DBW0 started with pid=8, OS id=12910
CKPT started with pid=10, OS id=12914
LGWR started with pid=9, OS id=12912
SMON started with pid=11, OS id=12916
CJQ0 started with pid=13, OS id=12920
RECO started with pid=12, OS id=12918
Thu Mar 11 01:21:17 2010
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
MMNL started with pid=15, OS id=12924
MMON started with pid=14, OS id=12922
Thu Mar 11 01:21:17 2010
starting up 1 shared server(s) ...
USER: terminating instance due to error 29702
Instance terminated by USER, pid = 12896
-bash-3.00$ ls
alert_ocfs2.log  ocfs2_diag_12900.trc  ocfs2_lmon_12904.trc
-bash-3.00$ more ocfs2_lmon_12904.trc
/u01/app/oracle/admin/ocfs2/bdump/ocfs2_lmon_12904.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1
System name:    Linux
Node name:      capitek1
Release:        2.6.9-42.ELsmp
Version:        #1 SMP Wed Jul 12 23:27:17 EDT 2006
Machine:        i686
Instance name: ocfs2
Redo thread mounted by this instance: 0
Oracle process number: 5
Unix process pid: 12904, image: oracle@capitek1 (LMON)

*** SERVICE NAME:() 2010-03-11 01:21:16.885
*** SESSION ID:(168.1) 2010-03-11 01:21:16.885
GES resources 64 pool 1
GES enqueues 128
GES IPC: Receivers 1  Senders 1
GES IPC: Buffers  Receive 1000  Send (i:100 b:100) Reserve 100
GES IPC: Msg Size  Regular 388  Batch 4096
Batching factor: enqueue replay 99, ack 110
Batching factor: cache replay 71 size per lock 56
kjxggin: receive buffer size = 32768
2010-03-11 01:21:19.748: [  OCROSD]utopen:7:failed to open OCR file/disk /dev/raw/raw4 , errno=13, os err string=Permission denied
2010-03-11 01:21:19.750: [  OCRRAW]proprinit: Could not open raw device
2010-03-11 01:21:19.749: [ default]a_init:7!: Backend init unsuccessful : [26]
2010-03-11 01:21:19.749: [ CSSCLNT]clsssinit: Unable to access OCR device in OCR init.
kgxgncin: CLSS init failed with status 21
kjxgmin: kgxgncin fails - (2)
kjxggin: generic group layer init fails
*** 2010-03-11 01:21:19.749
Global Enqueue Service Shutdown
*** 2010-03-11 01:21:19.752
global enqueue service detaching from CM:pid=12904
-bash-3.00$ exit
logout
[root@capitek1 ~]# more /etc/rc.d/rc.local
#!/bin/sh
#
# This script. will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style. init stuff.

touch /var/lock/subsys/local
insmod /lib/modules/2.6.9-42.EL/kernel/drivers/char/hangcheck-timer.ko  hangcheck_tick=30 hangcheck_margin=180
raw /dev/raw/raw1 /dev/hdd1
raw /dev/raw/raw2 /dev/hdd2

raw /dev/raw/raw3 /dev/hdd3

raw /dev/raw/raw4 /dev/hdb1

raw /dev/raw/raw5 /dev/hdb2
chown oracle:dba /dev/hdd[1-3]
chmod 660 /dev/hdd[1-3]

--ocr
chown root:oinstall  /dev/hdb1
chown root:oinstall /dev/raw/raw4
chmod 660 /dev/hdb1
chmod 660 /dev/raw/raw4

--voting disk
chown oracle:oinstall /dev/hdb2
chown oracle:oinstall /dev/raw/raw5
chmod 660 /dev/hdb2
chmod 660 /dev/raw/raw5


说明:ocr没有正常读取,根据lmon进程trc及alert进行分析,并手工启动/etc/init.d/init.crs start(在所有rac节点),因在vmware上测试,crs进程启动比较慢,静心等待就是.

继续运行dbca一切ok

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

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690159