Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1173118
  • 博文数量: 245
  • 博客积分: 10185
  • 博客等级: 上将
  • 技术积分: 2744
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-30 17:07
文章分类

全部博文(245)

文章存档

2015年(1)

2014年(1)

2013年(1)

2012年(1)

2011年(37)

2010年(20)

2009年(14)

2008年(38)

2007年(88)

2006年(44)

分类: 服务器与存储

2007-11-30 09:38:37

转自Eric_zhang 

1. jumpstart install 2 nodes : sxrtfs01 and sxrtfs04
  OS version :  solaris 10 x64 u2 .
   swap  8G 
   /     40G
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 
#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 
# 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
# svcadm enable time:stream
# svcadm enable time:dgram
# 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 
# cd /net/10.198.90.16/re/release_train/x86/5.0x64/alpha/5.0x64-2007-06-20a/dvd1/storage_foundation_for_oracle_rac
# ./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 
./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 

# 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 
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 
 
# 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
 

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 

# vxdg init vxfencoorddg EMC_CLARiiON0_0 EMC_CLARiiON0_1 EMC_CLARiiON0_2
 
# 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
 
# vxdg list
NAME         STATE           ID
vxfencoorddg enabled,cds          1188179750.18.sxrtfs04
14.  set I/O fencing disk propertise 
# vxdg -g vxfencoorddg set coordinator=on
15. check I/O fencing disk set up 
# 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   
# vxdg deport vxfencoorddg
# vxdg -t import vxfencoorddg
# vxdg deport vxfencoorddg
17 . on each node 
  # echo "vxfencoorddg" >/etc/vxfendg
18. config I/O fencing to VCS
# haconf -dump
 # hastop -all
# /etc/init.d/vxfen stop
Stopping vxfen..
Stopping vxfen.. Done
# cd /etc/VRTSvcs/conf/config
# cp main.cf main.orig
# vi /etc/VRTSvcs/conf/config/main.cf
cluster ericrac (
        UserNames = { admin = dlmElgLimHmmKumGlj }
        Administrators = { admin }
        HacliUserLevel = COMMANDROOT
        UseFence = SCSI3
        )
# hacf -verify /etc/VRTSvcs/conf/config
# rcp main.cf sxrtfs01:/etc/VRTSvcs/conf/config
19 . choose fencing mode 
 on each node 
  For dmp configuration:
# cp /etc/vxfen.d/vxfenmode_scsi3_dmp /etc/vxfenmode
For raw configuration:
# cp /etc/vxfen.d/vxfenmode_scsi3_raw /etc/vxfenmode
# /etc/init.d/vxfen start
Starting vxfen..
Checking for /etc/vxfendg
Starting vxfen.. Done
# /opt/VRTS/bin/hastart
20 . check 
# 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
# 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
#
# 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)
21. configure rsh for oracle user 
# cd /export/home
# chown -R oracle:oinstall oracle
# su - oracle
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
$ echo "+" >.rhosts
22.   prepare  to install CRS 
# cd /opt/VRTS/install
# ./installsfrac -rsh sxrtfs01 sxrtfs04 -configure
 
Enter Oracle UNIX user name:  (oracle)
Enter Oracle UNIX user id (numerical):  250
Enter Oracle UNIX user home dir:  /export/home/oracle
Enter Oracle UNIX group name:  (oinstall)
Enter Oracle UNIX group id (numerical):  300
User oracle already exists on all the nodes with the same configuration.
Do you want to create secondary groups for Oracle user? [y,n,q] (y)
 
Enter Oracle UNIX secondary group name:  dba
Enter Oracle UNIX secondary group id (numerical):  301
 
Group dba already exists on all the nodes.
 
Adding Oracle user (oracle) to group (dba) on sxrtfs01 ......... Done
Adding Oracle user (oracle) to group (dba) on sxrtfs04 ......... Done
 
Press [Return] to continue:
Enter the private IP for sxrtfs01:  192.168.13.1
Checking 192.168.13.1 in /etc/hosts on sxrtfs01 ............ exists
Discovering NICs on sxrtfs01..discovered e1000g0 e1000g1 e1000g2 e1000g3
Enter the NIC 1 for private network for sxrtfs01 (x if done): e1000g1
Enter the NIC 2 for private network for sxrtfs01 (x if done): e1000g2
Enter the NIC 3 for private network for sxrtfs01 (x if done):  x
Enter the private IP for sxrtfs04:  192.168.13.4
    Checking 192.168.13.4 in /etc/hosts on sxrtfs04 .......... exists
 Discovering NICs on sxrtfs04 ...discovered e1000g0 e1000g1 e1000g2 e1000g3
Enter the NIC 1 for private network for sxrtfs04 (x if done):(e1000g1)
Enter the NIC 2 for private network for sxrtfs04 (x if done):(e1000g2)
Enter the NIC 3 for private network for sxrtfs04 (x if done):  x
Enter the netmask for private network:  255.255.255.0

阅读(2259) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~