CAFE

RHCS(클러스터 HA)

RHEL Cluster 또는 RHEL HA 의 설정파일(cluster.conf) 검증방법

작성자이누기|작성시간10.10.13|조회수1,453 목록 댓글 0

출처: https://access.redhat.com/kb/docs/DOC-41096

 

Cluster를 구성시 해당 cluster.conf 파일에 대한 검증 방법이다.

RHEL Cluster 또는 RHEL HA configuration 파일에 대해서 어떻게 검증할까?

Article ID: 41096 - Created on: May 10, 2010 4:47 AM - Last Modified:  Oct 5, 2010 9:00 AM

Issue

Red Hat Enterprise Linux (RHEL) 4, 5 or 6에서 설정 파일 변경을 어떻게 cluster.conf 파일을 검증할 수 있나?

 

Environment

Red Hat Enterprise Linux (RHEL) 4 or 5 Clusters

Red Hat Enterprise Linux (RHEL) 6 High Availability

Resolution

한가지 방법은  luci 나 system-config-cluster 를 사용하여 만들어지는 경우 이 툴들에서 동작한다면 에러를 만들지 않을 것이다.

다만 수작업으로 고쳤을 때 : cluster.conf  xml파일을 XML 툴을 이용해서 작성하거나 또는 RHEL에서 제공하는 xmllint를 이용할 수 있다.

간단한 체크 예:

# xmllint --noout /etc/cluster/cluster.conf
# echo $?
0

 

이는 간단한 XML 검증이다: 위의 에러가 없다는 의미는 XML 파일자체가 vaild 하다는 것이다. 만약 XML 레벨의 에러가 나타난 다면(xml 자체가 invaild ) 결과값 1을 보여줄 것이다.

Validating RHEL 5 Cluster Configuration

만약 XML 자체 검증을 넘어 한단계 더 나아가 Cluster 스키마에 대한 검증을 하고자 한다면,  아래와 같은 명령을 통해 가능할 것이다.(system-config-cluster 스키마):

# xmllint --relaxng /usr/share/system-config-cluster/misc/cluster.ng \
          --noout /etc/cluster/cluster.conf
/etc/cluster/cluster.conf validates

그러나 주의해라 위의 결과는 100% 정확하지는 않다. 왜냐하면 위에서 검증에 쓰이는 system-config-cluster의 스키마는 항상  모든 것을 감지해 주지는 않는다.

Validating RHEL 6 High Availability Configuration

 

만약 XML 자체 검증을 넘어 한단계 더 나아가 Cluster 스키마에 대한 검증을 하고자 한다면,  아래와 같은 명령을 통해 가능할 것이다.(cluster core packanging):

 

# xmllint --relaxng /usr/share/cluster/cluster.rng \
          --noout /etc/cluster/cluster.conf
/etc/cluster/cluster.conf validates

또한 cluster.conf 파일은 cman 초기 스크립트에서 cluster startup 의 일부로 검증된다.cluster.conf 파일은 또한 RHEL 6 HA Cluster이 동작하는 cluster 설정을 동기화하기 위해  'cman_tool version -r'  명령이 호출될 때 검증된다. 

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼