11Gr2 RAC udev ASM openfiler(安裝文件)

lovehewenyu發表於2013-08-22

11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 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 liu ’s scripts and modify

11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 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 11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 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]

11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) --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

11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 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

--execute above on node01 and don ’t 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 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

11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 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

11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 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

11Gr2 RAC udev ASM openfiler(安裝文件) 11Gr2 RAC udev ASM openfiler(安裝文件) 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 地址

 

至此RAC安裝結束

五、參考文獻

 

六、日常管理

 

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章