用dbca構建採用ocfs2儲存的rac database_rhel4_oracle10g rac

wisdomone1發表於2010-03-12
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部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-629328/,如需轉載,請註明出處,否則將追究法律責任。

相關文章