ITPub博客

首页 > 数据库 > Oracle > 11Gr2 RAC udev ASM openfiler(安装文档)

11Gr2 RAC udev ASM openfiler(安装文档)

原创 Oracle 作者:lovehewenyu 时间:2013-08-22 14:37:31 0 删除 编辑

11Gr2 RAC udev ASM openfiler(安装文档)

 

一、11Gr2 RAC安装前准备

ASM disk

find iscsi target;

iscsiadm -m discovery -t st -p 192.168.1.218

auto iscsi target;

iscsiadm -m node -T iqn.2006-01.com.openfiler:data-2 -p 192.168.1.218 --op update -n node.startup -v automatic

iscsiadm -m node -T iqn.2006-01.com.openfiler:data-1 -p 192.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 -p 192.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

using maclean lius scripts and modify

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\", WNER=\"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", WNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c4500683251766f572d715049732d6e665541", NAME="data02", WNER="grid", GROUP="asmadmin", MODE="0660"

 

start_udev

ls -l /dev/asm*

 

increase tmpfs

vi /etc/fstab  --(take effect for ever)

shmfs /dev/shm tmpfs size=4g 0

mount -a

df -h /dev/shm

 

increase tmp

mkdir -p /u01/tmp

chmod -R a+wr /u01/tmp

vi .bash_profile

export TMPDIR=/u01/tmp

 

increase swap

mkdir -p /u01/swap

dd if=/dev/zero f=/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 swap swap defaults 0  0

mount -a

free -m

 

yum install binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibcglibc-common glibc-devel glibc-headers ksh-20060214 libaio libaio-devel libgcc libstdc++- libstdc++-devel make-3.81 sysstat unixODBC unixODBC-devel

 

configuration CVU is require cvuqdisk-1.0.7-1.rpm and SSH user equivalence

rpm -ivh /u01/grid/rpm/cvuqdisk-1.0.7-1.rpm --(CVU)

 

configuration SSH user 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、以上步骤以满足无口令的SSH11.2或更高的版本必须使用无口令SSH

2、我们还得继续配置SSH用户等效性来满足CVU的需求!)

touch ~/.ssh/authorized_keys

ls -l ~/.ssh/

ssh racdou01 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

yes

oracle --grids password

ssh racdou02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

yes

oracle --grids password

ls -l ~/.ssh/

scp ~/.ssh/authorized_keys racdou02:.ssh/authorized_keys

oracle --grids password

check SSH user equivalence;

ssh racdou01 hostname

ssh racdou02 hostname

--execute above on node01 and dont need password is success!

 

vi /etc/hosts

## Public Network -(eth0)

192.168.1.201   racdou01

192.168.1.202   racdou02

## Private Interconnect -(eth1)

10.10.10.1      racdou01-priv

10.10.10.2      racdou02-priv

## Public Virtual IP (VIP) addresses -(eth0:1)

192.168.1.221   racdou01-vip

192.168.1.222   racdou02-vip

## Single Client Access Name (SCAN)

192.168.1.223   racdou-scan

## Private Storage Network 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

--check CTSS(GI installation alter)

crsctl check ctss

 

create groupuserdirectory

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/grid

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 -p 16384

        ulimit -n 65536

    else

        ulimit -u 16384 -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              soft    nproc   2047

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 -pre crsinst -fixup -n racdou01,racdou02 -verbose

 

二、安装GI与检查GI健康状况

Installation Oracle Grid Infrastucture

Xmanager

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  --OCR and VOTE DISK

    Asm disk status is member and can't create asm disk group

解决方案:

asm disks add volumes groups and dd asm disk header

检查GI健康状况

Check CRS status

[grid@racdou01 ~]$ crsctl check crs

CRS-4638: Oracle High Availability Services is online

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager 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.lsnr ora....er.type ONLINE    ONLINE    racdou01   

ora....N1.lsnr ora....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....network ora....rk.type ONLINE    ONLINE    racdou01   

ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE              

ora.ons        ora.ons.type   ONLINE    ONLINE    racdou01   

ora....SM1.asm application    ONLINE    ONLINE    racdou01   

ora....01.lsnr application    ONLINE    ONLINE    racdou01   

ora....u01.gsd application    OFFLINE   OFFLINE              

ora....u01.ons application    ONLINE    ONLINE    racdou01   

ora....u01.vip ora....t1.type ONLINE    ONLINE    racdou01   

ora....SM2.asm application    ONLINE    ONLINE    racdou02   

ora....02.lsnr application    ONLINE    ONLINE    racdou02   

ora....u02.gsd application    OFFLINE   OFFLINE              

ora....u02.ons application    ONLINE    ONLINE    racdou02   

ora....u02.vip ora....t1.type ONLINE    ONLINE    racdou02   

ora....ry.acfs ora....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 css votedisk

--oracle culsterware 11.2以后,不在支持dd备份和恢复表决磁盘,因而使用该命令备份和恢复可能导致丢失表决盘数据;oracle clusterware以后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

export DISPLAY=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@racdou01 bin]$ chmod +s oracle

[grid@racdou02 bin]$ chmod +s oracle

EM地址

https://racdou01:1158/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

 


未完待续~~~~~

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26442936/viewspace-769040/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Oracle 回收站清理
请登录后发表评论 登录
全部评论
Oracle,Mysql,EMC 存储,NBU备份

注册时间:2012-02-03

  • 博文量
    267
  • 访问量
    1295770