11Gr2RAC udev ASM openfiler(安装文档)
一、11Gr2 RAC安装前准备
ASM disk
findiscsi target;
iscsiadm -m discovery -t st -p 192.168.1.218
autoiscsi target;
iscsiadm -m node -T iqn.2006-01.com.openfiler:data-2 -p192.168.1.218 --op update -n node.startup -v automatic
iscsiadm -m node -T iqn.2006-01.com.openfiler:data-1 -p192.168.1.218 --op update -n node.startup -v automatic
iscsiadm -m node -T iqn.2006-01.com.openfiler:ocr1 -p 192.168.1.218--op update -n node.startup -v automatic
iscsiadm -m node -T iqn.2006-01.com.openfiler:ocr2 -p192.168.1.218 --op update -n node.startup -v automatic
chkconfig iscsid on
chkconfig iscsi on
service iscsi restart
fdisk -l
udev bind asm disks
usingmaclean liu’sscripts andmodify
for i in b c d e f g h i j k ; do echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s %p\", RESULT==\"`scsi_id -g -u -s /block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" done |
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c4500306f656d6f472d68456a722d7332707a", NAME="data01", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c4500683251766f572d715049732d6e665541", NAME="data02", OWNER="grid", GROUP="asmadmin", MODE="0660" |
start_udev
ls -l /dev/asm*
increasetmpfs
vi /etc/fstab --(take effect for ever)
shmfs /dev/shm tmpfs size=4g0
mount -a
df -h /dev/shm
increasetmp
mkdir -p /u01/tmp
chmod -R a+wr/u01/tmp
vi .bash_profile
exportTMPDIR=/u01/tmp
increaseswap
mkdir -p /u01/swap
dd if=/dev/zeroof=/u01/swap/swap bs=1024 count=2048000
mkswap/u01/swap/swap
swapon/u01/swap/swap
free -m
vi /etc/fstab --(take effect for ever)
/u01/swap/swap swapswap defaults 0 0
mount -a
free -m
yum install binutils compat-libstdc++ elfutils-libelfelfutils-libelf-devel gcc gcc-c++ glibcglibc-common glibc-devel glibc-headersksh-20060214 libaio libaio-devel libgcc libstdc++- libstdc++-devel make-3.81sysstat unixODBC unixODBC-devel
configuration CVU isrequire cvuqdisk-1.0.7-1.rpm andSSH user equivalence
rpm -ivh /u01/grid/rpm/cvuqdisk-1.0.7-1.rpm --(CVU)
configurationSSHuser equivalence
su - grid
id
id grid --(id and id grid id same)
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen-t dsa
[Enter]
[Enter]
[Enter]
--execute above on all nodes
( 1、以上步骤以满足无口令的SSH;11.2或更高的版本必须使用无口令SSH。
2、我们还得继续配置SSH用户等效性来满足CVU的需求!)
touch~/.ssh/authorized_keys
ls -l ~/.ssh/
ssh racdou01 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
yes
oracle--grid’s password
ssh racdou02 cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys
yes
oracle --grid’s password
ls -l ~/.ssh/
scp ~/.ssh/authorized_keys racdou02:.ssh/authorized_keys
oracle --grid’s password
check SSH user equivalence;
ssh racdou01 hostname
ssh racdou02 hostname
--executeabove on node01 and don’tneed password is success!
vi /etc/hosts
## Public Network-(eth0)
192.168.1.201 racdou01
192.168.1.202 racdou02
## PrivateInterconnect -(eth1)
10.10.10.1 racdou01-priv
10.10.10.2 racdou02-priv
## Public VirtualIP (VIP) addresses -(eth0:1)
192.168.1.221 racdou01-vip
192.168.1.222 racdou02-vip
## Single ClientAccess Name (SCAN)
192.168.1.223 racdou-scan
## Private StorageNetwork for Openfiler
192.168.1.218
--config CTSS (uninstall ntpd server)
/sbin/service ntpd stop
chkconfig ntpd off
mv /etc/ntp.conf /etc/ntp.conf_bk
rm /var/run/ntpd.pid
--checkCTSS(GI installation alter)
crsctl check ctss
create group、user、directory
groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper
groupadd-g 504 asmadmin
groupadd -g 505 asmoper
groupadd -g 506 asmdba
useradd -u 501 -g oinstall -G dba,oper,asmdba oracle
useradd -u 8001 -g oinstall -G asmadmin,asmdba,asmoper,dba grid
passwd oracle
passwd grid
--oracle database
mkdir -p /u01/app/
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01/app
chown -R oracle:oinstall /u01/app/oracle
chown grid:oinstall /u01/app/oraInventory
--oracle grid infrastructure
mkdir-p /u01/app/11.2.0/grid
chown-R grid:oinstall /u01/app/grid
chown-R grid:oinstall /u01/app/11.2.0/grid
chmod-R 775 /u01
vi /etc/profile
if [ /$USER = "oracle" ] || [ /$USER ="grid" ]; then
if [ /$SHELL ="/bin/ksh" ]; then
ulimit -p16384
ulimit -n65536
else
ulimit -u16384 -n 65536
fi
umask 022
fi
vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 524288
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
sysctl –p
vi /etc/security/limits.conf
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240
su - oracle
vi .bash_profile
export ORACLE_SID=racdb3
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export TMP=/tmp
export TMPDIR=/u01/tmp
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:
umask 022
su - grid
vi .bash_profile
export ORACLE_SID=+ASM3
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export CRS_HOME=/u01/app/11.2.0/grid
export TMP=/tmp
export TMPDIR=/u01/tmp
export PATH=$PATH:$HOME/bin:$CRS_HOME/bin:$ORACLE_HOME/bin:
umask 022
check oracle clusterware requirements
./runcluvfy.sh stage -precrsinst -fixup -n racdou01,racdou02 -verbose
二、安装GI与检查GI健康状况
Installation OracleGrid Infrastucture
export DISPLAY=192.168.1.25:0.0
/u01/grid/runInstaller
注意事项:
[INS-40414]安装程序检测到系统上有未使用的 Oracle集群注册表 (OCR) 位置指针文件 (/etc/oracle/ocr.loc)。
解决方案:
rm /etc/oracle/ocr.loc
使用无口令SSH连接
ASM --(OCRand VOTE DISK)
Asm disk status is member and can't createasm disk group
解决方案:
asm disks add volumes groups and dd asm disk header
检查GI健康状况
Check CRS status
[grid@racdou01 ~]$crsctl check crs
CRS-4638: OracleHigh Availability Services is online
CRS-4537: ClusterReady Services is online
CRS-4529: ClusterSynchronization Services is online
CRS-4533: EventManager is online
Check cluster status
[root@racdou01 ~]#crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE racdou01
ora....ER.lsnrora....er.type ONLINE ONLINE racdou01
ora....N1.lsnrora....er.type ONLINE ONLINE racdou01
ora.asm ora.asm.type ONLINE ONLINE racdou01
ora.eons ora.eons.type ONLINE ONLINE racdou01
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....networkora....rk.type ONLINE ONLINE racdou01
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE racdou01
ora....SM1.asmapplication ONLINE ONLINE racdou01
ora....01.lsnrapplication ONLINE ONLINE racdou01
ora....u01.gsdapplication OFFLINE OFFLINE
ora....u01.onsapplication ONLINE ONLINE racdou01
ora....u01.vipora....t1.type ONLINE ONLINE racdou01
ora....SM2.asmapplication ONLINE ONLINE racdou02
ora....02.lsnrapplication ONLINE ONLINE racdou02
ora....u02.gsdapplication OFFLINE OFFLINE
ora....u02.onsapplication ONLINE ONLINE racdou02
ora....u02.vipora....t1.type ONLINE ONLINE racdou02
ora....ry.acfsora....fs.type ONLINE ONLINE racdou01
ora.scan1.vip ora....ip.type ONLINE ONLINE racdou01
--蓝色部分为11.2.0.2启动服务项,11.2.0.1无影响
Check cluster nodes
olsnodes –n
Check TNS
ps -ef | grep lsnr| grep -v 'grep' | grep -v 'ocfs' | > awk '{print $9}'
--all nodes
Check OCR status
orccheck
Check voting disks
crsctl query cssvotedisk
--oracle culsterware 11.2以后,不在支持dd备份和恢复表决磁盘,因而使用该命令备份和恢复可能导致丢失表决盘数据;oracleclusterware以后OCR会自动备份表决盘数据,并将表决盘数据自动恢复到任何添加的表决盘中!
Backup root.sh scripts
cp/u01/app/11.2.0/grid/root.sh /u01/app/11.2.0/grid/racdou01-20130822.root.sh_bk
--all nodes
三、安装Oracle软件
Installation Oracle Database software
Xmanager
exportDISPLAY=192.168.1.25:0.0
/u01/database/runInstaller
注意事项:
Installation Oracle Database software only
[INS-06006] 未在以下节点之间设置无口令 SSH连接: [racdou01, racdou02]。
解决方案:输入oracle用户的密码,并点击设置按钮,建立无口令SSH连接,最后测试无口令连接
[INS-32016] 所选Oracle主目录包含目录或文件。是否确实要继续?
解决方案:直接忽略即可,但是安装GI的时候必须在不同的目录下!谨记
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
--all nodes
四、使用DBCA创建Oracle Database
dbca
11gr2 dbca无法发现磁盘组问题(grid可以发现)
解决方案:
[grid@racdou01bin]$ chmod +s oracle
[grid@racdou02bin]$ chmod +s oracle
EM地址
至此RAC安装结束
五、参考文献
http://www.oracle.com/technetwork/cn/articles/hunter-rac11gr2-iscsi-083834-zhs.html
六、日常管理
11gr2 rac 基本管理命令(一)
http://space.itpub.net/26442936/viewspace-767342
11gr2 rac 基本备份恢复(二)
http://space.itpub.net/26442936/viewspace-767453
11gr2 rac create a controlfile (resetlogs)
http://space.itpub.net/26442936/viewspace-767380
Service-side TAF
http://space.itpub.net/26442936/viewspace-767327
未完待续~~~~~