在VMware Server 2.0.2上安装Oracle 10g RAC手把手详解(二)
number = 0
name = rac1
cluster = ocfs2
node:
ip_port = 7777
ip_address = 192.168.8.242
number = 1
name = rac2
cluster = ocfs2
ocfs2console 传输配置文件
[root@rac2 ~]# more /etc/ocfs2/cluster.conf
node:
ip_port = 7777
ip_address = 192.168.8.241
number = 0
name = rac1
cluster = ocfs2
www.2cto.com
node:
ip_port = 7777
ip_address = 192.168.8.242
number = 1
name = rac2
cluster = ocfs2
cluster:
node_count = 2
name = ocfs2
cluster:
node_count = 2
name = ocfs2
[root@rac1 ~]# /etc/init.d/o2cb unload
[root@rac2 ~]# /etc/init.d/o2cb unload
配置心跳
[root@rac1 ~]# /etc/init.d/o2cb configure
[root@rac2 ~]# /etc/init.d/o2cb configure
[root@rac1 ~]# /etc/init.d/o2cb status
Module "configfs": Loaded
Filesystem "configfs": Mounted
Module "ocfs2_nodemanager": Loaded
Module "ocfs2_dlm": Loaded
Module "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster ocfs2: Online
Heartbeat dead threshold: 1200
Network idle timeout: 30000
Network keepalive delay: 2000
Network reconnect delay: 2000
Checking O2CB heartbeat: Not active
[root@rac2 ~]# /etc/init.d/o2cb status
Module "configfs": Loaded
Filesystem "configfs": Mounted
Module "ocfs2_nodemanager": Loaded
Module "ocfs2_dlm": Loaded
Module "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
Checking O2CB cluster ocfs2: Online
Heartbeat dead threshold: 1200
Network idle timeout: 30000
Network keepalive delay: 2000
Network reconnect delay: 2000
Checking O2CB heartbeat: Not active
[root@rac1 ~]# fdisk -l
Disk /dev/sdb: 536 MB, 536870912 bytes
64 heads, 32 sectors/track, 512 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
ocfs2console 格式化 /dev/sdb
挂载
[root@rac1 ~]# mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /ocfs
[root@rac2 ~]# mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /ocfs
[root@rac1 ~]# vi /etc/fstab
[root@rac2 ~]# vi /etc/fstab
/dev/sdb1 /ocfs ocfs2 _netdev,datavolume,nointr 0 0
[root@rac1 ~]# df -h
[root@rac2 ~]# df -h
[root@rac1 ~]# cd /ocfs
[root@rac1 ocfs]# ll
total 1
drwxr-xr-x 2 root root 1024 Aug 12 00:51 lost+found
[root@rac1 ocfs]# mkdir cluster
[root@rac1 ocfs]# chown -R oracle:dba /ocfs
[root@rac2 soft]# cd /ocfs
[root@rac2 ocfs]# ll
total 2
drwxr-xr-x 2 oracle dba 1024 Aug 12 01:00 cluster
drwxr-xr-x 2 oracle dba 1024 Aug 12 00:51 lost+found
rac1->cd /soft
rac1->ll
total 12
drwxrwxrwx 9 oracle oinstall 4096 Jun 3 12:14 clusterware
drwxrwxrwx 6 oracle oinstall 4096 Jul 3 2005 database
drwxr-xr-x 3 root root 4096 Nov 22 2009 rac
rac1->more ~/.bash_profile
rac2->more ~/.bash_profile
PATH=$PATH:$HOME/bin
export PS1="`/bin/hostname -s`->"
export EDITOR=vim
export ORACLE_SID=devdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/
sbin:/usr/local/bin:/
sbin:/usr/local/bin:/
usr/X11R6/bin
u