Oracle/RAC

Oracle-RAC(RHEL4, raw device, 10g) #4 Equivalence, Clusterware 설치

에몽이ㅋ 2012. 3. 7. 01:13
http://gyh214.tistory.com/143 과 거의 흡사하나
Clusterware 설치에서 OCR 위치지정, 선호디스크위치지정 부분이 다릅니다. 

 이제부터는 RAC1, RAC2 둘다 켜져있는 상태에서 작업하세요
Equivalence 설정(oracle 계정에서 실행하세요)
1.node 1,2 둘다 실행
$ mkdir .ssh
$ ssh-keygen -t rsa
$ ssh-keygen -t dsa
(keygen 실행이후 각각 엔터 3번)

2. node 1(RAC1)만 실행
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys
(실행 하고 메시지 뜨면 known host : yes로 등록 후 password 입력)

3. node 1,2 둘다실행
$ ssh rac1 date
$ ssh rac1-priv date
$ ssh rac2 date
$ ssh rac2-priv date
known host : yes로 모두 등록하시고, 암호를 묻지않으면 성공!
(실패하면 .ssh 폴더를 지운 후 1번부터 3번까지 다시 실행하세요)



Clusterware설치& 패치
(NODE1 or NODE2 둘중 하나에서만 작업하세요, 둘다 켜져 있어야합니다)

파일준비
$ mkdir pkg
$ pwd
/home/oracle/pkg
$ ls
10201_clusterware_linux32.zip  10201_database_linux32.zip  p8202632_10205_LINUX.zip

$ unzip 10201_clusterware_linux32.zip && unzip 10201_database_linux32.zip && unzip p8202632_10205_LINUX.zip

$ cd ~/pkg/clusterware/
$ ./runInstaller


[root@rac1 ~]# /home/oracle/oraInventory/orainstRoot.sh
다음 권한 변경 중/home/oracle/oraInventory 대상 770.
그룹 이름 변경 중 /home/oracle/oraInventory 대상 dba.
스크립트 실행이 완료되었습니다.

[root@rac2 ~]# /home/oracle/oraInventory/orainstRoot.sh
다음 권한 변경 중/home/oracle/oraInventory 대상 770.
그룹 이름 변경 중 /home/oracle/oraInventory 대상 dba.
스크립트 실행이 완료되었습니다


[root@rac1 ~]# /home/oracle/product/10g/crs/root.sh
WARNING: directory '/home/oracle/product/10g' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/home/oracle/product/10g' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw2
Format of 1 voting devices complete.
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        rac1
CSS is inactive on these nodes.
        rac2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.

[root@rac2 ~]# /home/oracle/product/10g/crs/root.sh
WARNING: directory '/home/oracle/product/10g' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/home/oracle/product/10g' is not owned by root
WARNING: directory '/home/oracle/product' is not owned by root
WARNING: directory '/home/oracle' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning default hostname rac1 for node 1.
assigning default hostname rac2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        rac1
        rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
제공된 인터페이스 "eth0"이(가) 공용이 아닙니다. 가상 IP를 구성하려면 공용 인터페이스를 사용해야 합니다.

위 오류 발생시 노드 2에서 루트 계정으로 vipca 실행
# vipca


Clusterware 설치완료



이후 clusterware 패치
cd ~/pkg/Disk1
./runInstaller

한 후 별다른 변동없이
(중간에 홈 마지막/crs 확인하시고  << 홈세부정보지정
OraCrs10g_home, /home/oracle/product/10g/crs ,
노드 2개 다 선택된거 확인하시고)
다음다음 눌러서 스크립트 실행까지 갑니다.


node1에서 루트계정으로
/home/oracle/product/10g/crs/bin/crsctl stop crs
/home/oracle/product/10g/crs/install/root102.sh
node2에서 루트계정으로
/home/oracle/product/10g/crs/bin/crsctl stop crs
/home/oracle/product/10g/crs/install/root102.sh 
들을 차례대로 실행시키세요(동시에 실행시키면 안됩니다.)


[root@rac1 ~]# /home/oracle/product/10g/crs/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@rac1 ~]# /home/oracle/product/10g/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /home/oracle/product/10g/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/home/oracle/product/10g' is not owned by root
....생략....
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/home/oracle/product/10g/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /home/oracle/product/10g/crs/install/paramfile.crs

[root@rac2 ~]# /home/oracle/product/10g/crs/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@rac2 ~]# /home/oracle/product/10g/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /home/oracle/product/10g/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/home/oracle/product/10g' is not owned by root
....생략....
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/home/oracle/product/10g/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /home/oracle/product/10g/crs/install/paramfile.crs