- 论坛徽章:
- 0
|
看来不少的兄弟觉得有帮助,所以贴出来了。
Install Oracle 10g R2 RAC on SFRAC
Eric Zhang
1. jumpstart install 2 nodes : sxrtfs01 and sxrtfs04
OS version : solaris 10 x64 u2 .
swap 8g
/ 40gb
sxrtfs01 10.198.90.92
sxrtfs04 10.198.90.91
2. Modify /etc/hosts on both nodes
sxrtfs01: /etc/hosts
# Internet host table
#
127.0.0.1 localhost
10.198.90.92 sxrtfs01 loghost
10.198.90.91 sxrtfs04
192.168.13.1 sxrtfs01-priv
192.168.13.4 sxrtfs04-priv
10.198.90.8 sxrtfs01-vip
10.198.90.4 sxrtfs04-vip
sxrtfs04:/etc/hosts
# Internet host table
#
127.0.0.1 localhost
10.198.90.91 sxrtfs04 loghost
10.198.90.92 sxrtfs01
192.168.13.1 sxrtfs01-priv
192.168.13.4 sxrtfs04-priv
#
10.198.90.8 sxrtfs01-vip
10.198.90.4 sxrtfs04-vip
3. configure root user's rsh configure
#cd /
#vi .rhosts
+
# rsh sxrtfs04
Last login: Sat Aug 25 19:32:44 from 172.29.0.82
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
#
# rsh sxrtfs01
Last login: Sat Aug 25 19:32:35 from 172.29.0.82
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
#
4. change root 's sh
root:x:0:0:Super-User:/:/usr/bin/bash
5. modify /etc/system on both nodes
add
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
6. sync cluster time
-bash-3.00# svcs -a|grep time
disabled Jul_31 svc:/network/daytime:dgram
disabled Jul_31 svc:/network/daytime:stream
disabled Jul_31 svc:/network/time:dgram
disabled Jul_31 svc:/network/time:stream
-bash-3.00# svcadm enable time:stream
-bash-3.00# svcadm enable time:dgram
-bash-3.00# rdate sxsfrac04
Fri Aug 3 18:34:53 2007
7. /etc/profile (should only change oracle user's .here just for easier)
PATH=$PATH:/usr/sbin:/sbin:/usr/bin:/usr/lib/vxvm/bin:\
/opt/VRTSvxfs/sbin:/opt/VRTSvcs/bin:/opt/VRTS/bin:\
/opt/VRTSvcs/rac/bin:/opt/VRTSob/bin:/opt/VRTSvcs/vxfen/bin/:.
MANPATH=$MANPATH:/usr/share/man:/opt/VRTS/man:.
ORACLE_BASE=/opt/app/oracle
ORACLE_HOME=/opt/app/oracle/orahome
ORACLE_SID=rac
CRS_BASE=/opt/app/crs
CRS_HOME=/opt/app/crs/crshome
PATH=$PATH:$ORACLE_HOME/bin:$CRS_HOME/bin
CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME\
/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export ORACLE_BASE ORACLE_HOME PATH MANPATH
8. reboot all the nodes
9. Install SFRAC
-bash-3.00# cd /net/10.198.90.16/re/release_train/x86/5.0x64/alpha/5.0x64-2007-06-20a/dvd1/storage_foundation_for_oracle_rac
-bash-3.00# ./installsfrac -rsh sxrtfs01 sxrtfs04 -installonly
SFRAC的licence:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXX
10 . Add oracle user and group
groupadd -g 301 dba
groupadd -g 300 oinstall
mkdir -p /export/home/oracle
useradd -u 250 -c "Oracle user" -d /export/home/oracle -g "oinstall" -G dba -m -s /usr/bin/bash oracle
passwd oracle
10. configure SFRAC
-bash-3.00# ./installsfrac -rsh sxrtfs01 sxrtfs04 -configure
Enter the unique cluster name: [?] ericrac
Enter the unique Cluster ID number between 0-65535: [b,?] 8899
Enter the NIC for the first private heartbeat link on sxrtfs01: [b,?] e1000g1
Would you like to configure a second private heartbeat link? [y,n,q,b,?] (y)
Enter the NIC for the second private heartbeat link on sxrtfs01: [b,?] e1000g2
Would you like to configure a third private heartbeat link? [y,n,q,b,?] (n)
Are you using the same NICs for private heartbeat links on all systems? [y,n,q,b,?] (y) y
Do you want to add single user access on sxrtfs01 [y,n,q,?] (y)
Enter login account name for DBA user: oracle
Do you want to add group access on sxrtfs01 [y,n,q,?] (y)
Enter group name for DBA users: dba
11. reboot all the nodes
12. check the cluster's status
-bash-3.00# hastatus
attempting to connect....connected
group resource system message
--------------- -------------------- -------------------- --------------------
sxrtfs01 RUNNING
sxrtfs04 RUNNING
cvm sxrtfs01 ONLINE
cvm sxrtfs04 ONLINE
-------------------------------------------------------------------------
vxfsckd sxrtfs01 ONLINE
vxfsckd sxrtfs04 ONLINE
cvm_clus sxrtfs01 ONLINE
cvm_clus sxrtfs04 ONLINE
cvm_vxconfigd sxrtfs01 ONLINE
-------------------------------------------------------------------------
cvm_vxconfigd sxrtfs04 ONLINE
on sxrtfs01
-bash-3.00# lltconfig -a list
Link 0 (e1000g1):
Node 0 sxrtfs01 : 00:14:4F:28:59:3D permanent
Node 1 sxrtfs04 : 00:14:4F:3F:CB:61
Link 1 (e1000g2):
Node 0 sxrtfs01 : 00:14:4F:28:59:3E permanent
Node 1 sxrtfs04 : 00:14:4F:3F:CB:62
on sxrtfs04
-bash-3.00# lltconfig -a list
Link 0 (e1000g1):
Node 0 sxrtfs01 : 00:14:4F:28:59:3D
Node 1 sxrtfs04 : 00:14:4F:3F:CB:61 permanent
Link 1 (e1000g2):
Node 0 sxrtfs01 : 00:14:4F:28:59:3E
Node 1 sxrtfs04 : 00:14:4F:3F:CB:62 permanent
-bash-3.00# gabconfig -a
GAB Port Memberships
============================
Port a gen dd2f01 membership 01
Port b gen dd2f05 membership 01
Port d gen dd2f02 membership 01
Port f gen dd2f0c membership 01
Port h gen dd2f05 membership 01
Port o gen dd2f04 membership 01
Port v gen dd2f08 membership 01
Port w gen dd2f0a membership 01
13. prepare I/O fencing
-bash-3.00# vxdg init vxfencoorddg EMC_CLARiiON0_0 EMC_CLARiiON0_1 EMC_CLARiiON0_2
-bash-3.00# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
EMC_CLARiiON0_0 auto:cdsdisk EMC_CLARiiON0_0 vxfencoorddg online
EMC_CLARiiON0_1 auto:cdsdisk EMC_CLARiiON0_1 vxfencoorddg online
EMC_CLARiiON0_2 auto:cdsdisk EMC_CLARiiON0_2 vxfencoorddg online
EMC_CLARiiON0_3 auto:cdsdisk - - online
EMC_CLARiiON0_4 auto:cdsdisk - - online
c1t2d0s2 auto:none - - online invalid
c3t0d0s2 auto - - error
-bash-3.00# vxdg list
NAME STATE ID
vxfencoorddg enabled,cds 1188179750.18.sxrtfs04
-bash-3.00#
14. set I/O fencing disk propertise
-bash-3.00# vxdg -g vxfencoorddg set coordinator=on
15. check I/O fencing disk set up
-bash-3.00# vxfentsthdw -n -c vxfencoorddg
VERITAS vxfentsthdw version 5.0 Solaris
The utility vxfentsthdw works on the two nodes of the cluster.
The utility verifies that the shared storage one intends to use is
configured to support I/O fencing. It issues a series of vxfenadm
commands to setup SCSI-3 registrations on the disk, verifies the
registrations on the disk, and removes the registrations from the disk.
This is the logfile generated for vxfensthdw
Enter the first node of the cluster:
sxrtfs01
Enter the second node of the cluster:
sxrtfs04
********************************************
Testing sxrtfs01 /dev/rdsk/c0t600601608FA51A004C2F11C14B75DB11d0s2 sxrtfs04 /dev/rdsk/c0t600601608FA51A004C2F11C14B75DB11d0s2
Evaluate the disk before testing ........................... Pre-existing keys
I/O fencing appears to be configured.
Please shutdown fencing then continue.
16. deport I/O fencing disk group
-bash-3.00# vxdg deport vxfencoorddg
-bash-3.00# vxdg -t import vxfencoorddg
-bash-3.00# vxdg deport vxfencoorddg
17 . on each node
-bash-3.00# echo "vxfencoorddg" >/etc/vxfendg
18. config I/O fencing to VCS
-bash-3.00# haconf -dump
-bash-3.00# hastop -all
-bash-3.00# /etc/init.d/vxfen stop
Stopping vxfen..
Stopping vxfen.. Done
-bash-3.00#
-bash-3.00# cd /etc/VRTSvcs/conf/config
-bash-3.00# cp main.cf main.orig
-bash-3.00#
-bash-3.00# vi /etc/VRTSvcs/conf/config/main.cf
cluster ericrac (
UserNames = { admin = dlmElgLimHmmKumGlj }
Administrators = { admin }
HacliUserLevel = COMMANDROOT
UseFence = SCSI3
)
-bash-3.00# hacf -verify /etc/VRTSvcs/conf/config
-bash-3.00# rcp main.cf sxrtfs01:/etc/VRTSvcs/conf/config
19 . choose fencing mode
on each node
For dmp configuration:
-bash-3.00# cp /etc/vxfen.d/vxfenmode_scsi3_dmp /etc/vxfenmode
For raw configuration:
-bash-3.00# cp /etc/vxfen.d/vxfenmode_scsi3_raw /etc/vxfenmode
-bash-3.00# /etc/init.d/vxfen start
Starting vxfen..
Checking for /etc/vxfendg
Starting vxfen.. Done
-bash-3.00# /opt/VRTS/bin/hastart
-bash-3.00#
20 . check
-bash-3.00# hastatus
attempting to connect....connected
group resource system message
--------------- -------------------- -------------------- --------------------
sxrtfs01 RUNNING
sxrtfs04 RUNNING
cvm sxrtfs01 ONLINE
cvm sxrtfs04 ONLINE
-------------------------------------------------------------------------
vxfsckd sxrtfs01 ONLINE
vxfsckd sxrtfs04 ONLINE
cvm_clus sxrtfs01 ONLINE
cvm_clus sxrtfs04 ONLINE
cvm_vxconfigd sxrtfs01 ONLINE
-------------------------------------------------------------------------
cvm_vxconfigd sxrtfs04 ONLINE
-bash-3.00# gabconfig -a
GAB Port Memberships
===============================================================
Port a gen dd2f01 membership 01
Port b gen dd2f15 membership 01
Port d gen dd2f02 membership 01
Port f gen dd2f1e membership 01
Port h gen dd2f18 membership 01
Port o gen dd2f04 membership 01
Port v gen dd2f1a membership 01
Port w gen dd2f1c membership 01
-bash-3.00#
-bash-3.00# vxfenadm -d
I/O Fencing Cluster Information:
================================
Fencing Protocol Version: 201
Fencing Mode: SCSI3
Fencing SCSI3 Disk Policy: raw
Cluster Members:
0 (sxrtfs01)
* 1 (sxrtfs04)
RFSM State Information:
node 0 in state 8 (running)
node 1 in state 8 (running)
-bash-3.00#
[ 本帖最后由 blue_stone 于 2007-9-7 18:17 编辑 ] |
|