반응형

이놈의 삽질은..

한번 시작하면 몇일을 가니..

정말 OS 담당자가 짜잔 하고 구축 해 놨으면 좋겠다..


몇일 전 Network- Interconnect IP 가 끊어 지는 경우 CSS 데몬이 체크하다가 데이터 정합성 유지를 위해 한쪽 노드의 OS 를 리부팅 하는 경우가 생겼다. (주로 slave쪽을 재기동)


하지만, 네트워크 상에서는 어떠한 에러 로그도 없었다고 하니..

테스트를 해서 증명할 수 밖에..


먼저 나는 10g 에서 하고 싶었는데..10g RAC 구축해 놓은 것이 없어서

어쩔수 없이 11g 에서 테스트를 진행할 수 밖에 없었다.


각설하고..10g File system 구축은 AIX 에서 몇번 했지만 실질적으로 테스트는 11g로 많이 진행 하였기 때문에 이참에 하나 구축할 필요가 있었다.


여러번의 삽질 끝에 완료는 했지만 삽질의 주 요인을 하나 찾아서 공유해 본다.


먼저 10g ocfs 설치는 가급적 yum 으로 진행 했으면 하는 바람이다....

이걸로도 삽질하다가 포기한 적이 있기에....

그리고 ocfs2 설정은 다른 블로그도 많기에 아래 부분만 확인 잘 했으면 한다.


설정 도중 

service o2cb configure 한다.

# service o2cb configure

 

Configuring the O2CB driver.

 

This will configure the on-boot properties of the O2CB driver.

The following questions will determine whether the driver is loaded on

boot.  The current values will be shown in brackets ('[]').  Hitting

ENTER without typing an answer will keep that current value.  Ctrl-C

will abort.

 

Load O2CB driver on boot (y/n) [n]: y

Cluster stack backing O2CB [o2cb]: 

Cluster to start on boot (Enter "none" to clear) [ocfs2]: ocfscluster1

Specify heartbeat dead threshold (>=7) [31]: 

Specify network idle timeout in ms (>=5000) [30000]: 

Specify network keepalive delay in ms (>=1000) [2000]: 

Specify network reconnect delay in ms (>=2000) [2000]: 

Writing O2CB configuration: OK

Loading filesystem "configfs": OK

Mounting configfs filesystem at /sys/kernel/config: OK

Loading stack plugin "o2cb": OK

Loading filesystem "ocfs2_dlmfs": OK

Creating directory '/dlm': OK

Mounting ocfs2_dlmfs filesystem at /dlm: OK

Setting cluster stack "o2cb": OK

Checking O2CB cluster configuration : Failed


위에서 빨간색 부분은 클러스터 명이다.


# o2cb_ctl -C -n ocfscluster1 -t cluster -a name=ocfscluster1


등록한 이후 아래와 같이 각 노드를 클러스터에 등록하는 경우이다.

여기서 내가 잘못한 부분이다.


# o2cb_ctl -C -n ocfsrac1 -t node -a number=0 -a ip_address=192.168.131.100 -a ip_port=7777 -a cluster=ocfscluster1

# o2cb_ctl -C -n ocfsrac2 -t node -a number=1 -a ip_address=192.168.131.110 -a ip_port=7777 -a cluster=ocfscluster1


파란색 부분이 자기 자신에 맞게 설정해 줘야 하는 부분이다.


즉, 다른 부분은 잘못 설정해도 오류가 나지만 ocfsrac1 , ocfsrac2 는 설정 잘못해도 오류가 생기지 않는다.(Host명을 잘못 설정해도 오류가 날일 없겠지...=_=;;)


다른 부분 에러는 내가 판단해서 잘 설정했지만 host 명을 따라 하다 보니 잘못 적은 것이다..에러가 없으니 난 완료된 줄 알았다.


하지만 service o2cb status 를 하게되면 아래와 같이 나온다.


rac1:/root>service o2cb status

Driver for "configfs": Loaded

Filesystem "configfs": Mounted

Stack glue driver: Loaded

Stack plugin "o2cb": Loaded

Driver for "ocfs2_dlmfs": Loaded

Filesystem "ocfs2_dlmfs": Mounted

Checking O2CB cluster "ocfscluster1": Offline


먼 짓을 해도 계속 offline 만 뜬다.. 나머지는 정상적인데...

다른 부분도 추가해서 첨부하자면..


rac1:/root>service o2cb start ocfscluster1

Setting cluster stack "o2cb": OK

Registering O2CB cluster "ocfscluster1": OK

Setting O2CB cluster timeouts : OK

-------------------------------------------------------
rac1:/root>/etc/init.d/o2cb status
Driver for "configfs": Loaded
Filesystem "configfs": Mounted
Stack glue driver: Loaded
Stack plugin "o2cb": Loaded
Driver for "ocfs2_dlmfs": Loaded
Filesystem "ocfs2_dlmfs": Mounted
-------------------------------------------------------
rac1:/root>vi /etc/fstab

LABEL=/                 /                       ext3    defaults        1 1
LABEL=/app              /app                    ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda5         swap                    swap    defaults        0 0
/dev/sdb1               /oradata01               ocfs2   _netdev,datavolume,nointr      0 0


전혀 문제가 없이 나온다.

결국 아래에서 수정 후 정상적으로 공유가 되었다.



즉!!name 에는 자신의 host 명을 설정해 줘야한다!!!


ocfs 설정 참고 자료

http://db.necoaki.net/145


반응형

+ Recent posts