반응형

이놈의 삽질은..

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

정말 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


반응형
반응형

10.2.0.5 2node RAC 에서 한쪽 (Slave) 노드가 자꾸 재기동 되는 현상에서

이것 저것 확인하다가 아래와 같이 에러로그가 있어서 찾아보다가 확신이 안서서

일단은 포워딩 하여 저장해 본다.

아래는 crsd.log 이다.(master)


2015-10-10 12:49:30.874: [ COMMCRS][9526]clsc_receive: (114771870) error 2


2015-10-10 21:54:31.062: [ COMMCRS][9526]clsc_receive: (114771870) error 2


2015-10-13 10:41:30.444: [  CRSEVT][11008]32CAAMonitorHandler :: 0:Could not join /oracle/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


2015-10-13 10:41:30.449: [  CRSEVT][11008]32CAAMonitorHandler :: 0:Action Script /oracle/crs/bin/racgwrap(check) timed out for ora.glvndbp05.vip! (timeout=60)

2015-10-13 10:41:30.449: [  CRSAPP][11008]32CheckResource error for ora.glvndbp05.vip error code = -2

2015-10-13 10:43:03.482: [  CRSEVT][11011]32CAAMonitorHandler :: 0:Could not join /oracle/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


2015-10-13 10:43:03.482: [  CRSEVT][11011]32CAAMonitorHandler :: 0:Action Script /oracle/crs/bin/racgwrap(check) timed out for ora.glvndbp05.vip! (timeout=60)

2015-10-13 10:43:03.482: [  CRSAPP][11011]32CheckResource error for ora.glvndbp05.vip error code = -2

2015-10-13 10:44:36.509: [  CRSEVT][11017]32CAAMonitorHandler :: 0:Could not join /oracle/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


위에서 확인해 보면 정리해서...

[CRSEVT] CAAMonitorHandler :: 0:Could not join .../crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, other: Abnormal termination of the child


[CRSEVT] CAAMonitorHandler :: 0:Action Script ../crs/bin/racgwrap(check) timed out for 오라클.vip! (timeout=60)


이부분이 보인다. 검색해 보니 딱 한분(한국어로 검색...) 올려놔 있어서

정확하게 몰라서 일단은 공유해 본다.


퍼온 것이므로 문제 되면 자삭하겠습니다.


10g RAC 환경에서 있는 bug 인데 racgmain check 데몬이 비정상적으로 fork 되면서 메모리 사용율이 올라가게 되어 결국 나중엔 시스템을 사용할수 없는 지경까지 이르게 됨.

 

 oracle 26024     1  0  Dec  6  ?         0:00 /oracle/crs/bin/racgmain check

 oracle 23218     1  0  Dec  6  ?         0:00 /oracle/crs/bin/racgmain check

 oracle 23179     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 27277     1  0  Dec  6  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle  1028     1  0  Dec  5  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle  7991     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 15324     1  0  Dec  3  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 14314     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle 10895     1  0  Dec  4  ?         0:00 /oracle/ora10/bin/racgmain check

 oracle   404     1  0  Dec  3  ?         0:00 /oracle/ora10/bin/racgmain check


해결책은 아래와 같이 CRS bundle #2 patchset을 적용시키거나 workaround 방법을 써서 조치해 주어야 함.

=====================================================================================


Applies to:

Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.1.0.6

Information in this document applies to any platform.

Oracle Server Enterprise Edition - Version: 10.1.0.2 to 10.2.0.4

Symptoms

System slows down and many "racgmain check" processes may appear in ps output.  CRS log would show the following messages.

oracle@HA5-ZW05:[/home/oracle] ps -ef|grep "racgmain check"|wc -l

1290


~~~~

CAAMonitorHandler :: 0:Action Script /opt/oracle/product/crs/bin/racgwrap(check) timed out for ora.harac1.vip! (timeout=60)

CheckResource error for ora.harac1.vip error code = -2

CAAMonitorHandler :: 0:Could not join /opt/oracle/product/crs/bin/racgwrap(check)

category: 1234, operation: scls_process_join, loc: childcrash, OS error: 0, 

other: Abnormal termination of the child

~~~~

Cause

crsd.bin invokes the racgmain to check the status of the resources that are managed by CRS. The racgmain is invoked through the wrapper script racgwrap. 


If the resource action timed out, crsd kills the action script, which is racgwrap, while racgmain process will not be killed. Over time, this might create lot of orphan racgmain processes in the system. This would eventually slow down the due to the resource contention at the OS level.


Internal bug:6196746  addresses this issue.


Solution


This is fixed in 11.1.0.7 patchset.. If you are running into this issue in 10gR2, please go ahead and apply 10.2.0.4 patchset and the latest CRS bundle patch. This fix is included  in CRS bundle patch from bundle #2 onwards.

Following option could be used as a temporary workaround until the patch is applied.


1.  Make a copy of racgwrap located under $ORACLE_HOME/bin and $CRS_HOME/bin on ALL Nodes


2.  Edit the file racgwrap and modify the last 3 lines from:


~~~

$ORACLE_HOME/bin/racgmain "$@"

status=$?

exit $status


to:


# Line added to fix for Bug 6196746

exec $ORACLE_HOME/bin/racgmain "$@"

~~~


3.  Kill all the orphan racgmain processes running.


$ ps -ef|grep "racgmain check"

oracle 18701 1 0 Aug 1 ? 0:00 /oracle/product/10.2.0/database/bin/racgmain check

oracle 14653 1 0 Aug 1 ? 0:00 /oracle/product/10.2.0/database/bin/racgmain check

oracle 24517 1 0 Aug 1 ? 0:00 /oracle/product/10.2.0/database/bin/racgmain check


$ kill -9 <PID of racgmain>



펌 : http://pat98.tistory.com/376


추가로 찾은 문서도 공유해 본다.


10g/11gR1: Many Orphaned Or Hanging "racgmain" Processes Running (문서 ID 732086.1) <--위에 것과 동일


10g RAC: One node VIP status always shows "UNKNOWN" and "CRS-0223: Resource 'ora.rac-test1.vip' has placement error" when try to startup the VIP. (문서 ID 1993024.1)

Symptoms

Symptom 1:

In 10g RAC on unix platform, VIP on one nodes always shows "UNKNOWN". 


Symptom 2:

When try to start it up, it report following error:

CRS-1028: Dependency analysis failed because of:

CRS-0223: Resource 'ora.rac-test1.vip' has placement error.  


Symptom 3:

In CRSD log, find following error:


2015-03-19 10:51:09.772: [  CRSRES][3737213248][ALERT]0`ora.rac-test1.vip` on member `rac-test1` has experienced an unrecoverable failure.

2015-03-19 10:51:09.772: [  CRSRES][3737213248]0Human intervention required to resume its availability.

2015-03-19 10:51:09.772: [  CRSEVT][3741415744]0CAAMonitorHandler :: 0:Could not execute /u01/app/oracle/product/10.2.0/crs_1/bin/racgwrap(stop) for ora.rac-test2.vip

category: 1234, operation: scls_canexec, loc: , OS error: 0, other: no exe permission, file /u01/app/oracle/product/10.2.0/crs_1/bin/racgwrap    ===> No execute permission for this file.


Solution

1. Shutdown all the resource of this node: instance/asm/nodeapps/crs


2. Change permission of those 2 files to 751 on the node with issue


chmod 751 /u01/app/oracle/product/10.2.0/crs_1/racg/admin/racgwrap

chmod 751 /u01/app/oracle/product/10.2.0/crs_1/bin/racgeut


3. Then you can startup all the resource and check whether VIP is online.



반응형
반응형

ORACLE 10g RAC 테스트 할 필요가 생겼다.


CSS 관련하여 해당 데몬이 죽었을 경우 OS 가 리부팅 되는 것인데,

또한, private IP 가 통신 안될 때에도 DISK 적합성 때문에 OS 강제 리부팅 하는 경우가 있다


이 부분은 다음에 정리 되는데로 올려야 겠다.


아래는 RAC 설치 전 OCFS2 로 파일 시스템 구축 중에 생기는 에러에 대해 정리한 부분이다.


rac1:/root>mkfs.ocfs2 -b 4K -C 32K -N 2 -L "OCFS2Filesystem" /dev/sdb1

mkfs.ocfs2 1.8.0

Cluster stack: classic o2cb

/dev/sdb1 is apparently in use by the system; will not make a ocfs2 volume here!

<--이렇게 에러가 - _ -;;;


아래와 같이 상태 확인

rac1:/root>dmsetup status


rac-vote01: 0 614400 linear 

rac-control02: 0 204800 linear 

rac-undotbs2: 0 1638400 linear 

rac-control01: 0 204800 linear 

rac-undotbs1: 0 1638400 linear 

rac-system: 0 1638400 linear 

rac-users: 0 1638400 linear 

rac-redo06: 0 409600 linear 

rac-spfile: 0 204800 linear 

rac-temp: 0 1638400 linear 

rac-redo05: 0 409600 linear 

rac-redo04: 0 409600 linear 

rac-sysaux: 0 1638400 linear 

rac-redo03: 0 409600 linear 

rac-vote03: 0 614400 linear 

rac-redo02: 0 409600 linear 

rac-ocr02: 0 614400 linear 

rac-vote02: 0 614400 linear 

rac-redo01: 0 409600 linear 

rac-control03: 0 204800 linear 

rac-ocr01: 0 614400 linear 

젠장 내 잘못이다..기존에 raw device 구성 중에 이 짓을 했으니...ㅠㅠ

아래와 같이 지워주자..


rac1:/root>dmsetup remove_all

다시 진행해 보자..!!


rac1:/root>mkfs.ocfs2 -b 4K -C 32K -N 2 -L "OCFS2Filesystem" /dev/sdb1


mkfs.ocfs2 1.8.0

Cluster stack: classic o2cb

Label: OCFS2Filesystem

Features: sparse extended-slotmap backup-super unwritten inline-data strict-journal-super xattr indexed-dirs refcount discontig-bg

Block size: 4096 (12 bits)

Cluster size: 32768 (15 bits)

Volume size: 21467922432 (655149 clusters) (5241192 blocks)

Cluster groups: 21 (tail covers 10029 clusters, rest cover 32256 clusters)

Extent allocator size: 12582912 (3 groups)

Journal size: 134184960

Node slots: 2

Creating bitmaps: done

Initializing superblock: done

Writing system files: done

Writing superblock: done

Writing backup superblock: 3 block(s)

Formatting Journals: done

Growing extent allocator: done

Formatting slot map: done

Formatting quota files: done

Writing lost+found: done

mkfs.ocfs2 successful



완료!!!!!

감사합니다.


출처 : http://blog.helperchoi.com/75


반응형

'OS > LINUX' 카테고리의 다른 글

[펌]PuTTY 한글 깨짐 문제 해결하기  (1) 2016.02.23
[CentOS 6.6] FTP 설정  (1) 2016.02.17

+ Recent posts