게시물 261건
   
[RedHat] RHCS 구성 및 리소스 등록 (수정 - 2014.10.29)
글쓴이 : 최장섭 날짜 : 2014-10-28 (화) 17:12 조회 : 13597
RHCS
클러스터는 보통 두대 이상의 컴퓨터가 상호작용하며 특정 작업을 수행하는것을 의미한다.
클러스터는 보통 HA, LBS, High Performence 등의 용도로 사용한다.

여기서는 2개의 node와 1 개의 스토리지 노드를 사용할 것이며,
각각의 노드는 RHEL6.5 데스크탑 버전을 이용했다. 

시나리오
Node-A(Node-1): 192.168.122.130 (10.10.10.130)
Node-B(Node-2): 192.168.122,140 (10.10.10.140)
Node-C(Node-3): 192.168.122.150 (10.10.10.150) (Cluster Management Server)

# cat /etc/hosts 등록
10.10.10.130 130-VM
10.10.10.140 140-VM
10.10.10.150 150-VM

  1. RHCS(RedHat Cluster Suite)와 Conga(Web base management suit) 설치
    모든 노드에 yum groupinstall “High Availability” 커맨드로 관련 패키지를 설치한다.
    # yum groupinstall "High Availability"


  2. 클러스터 관리서버(Node-C)에 yum groupinstall “High Availability Management”로 관련 패키지를 설치한다.
    # yum groupinstall "High Availability Management"

  3. Node-A, B 에서 아래 서비스를 실행한다.
    # chkconfig ricci on
    # chkconfig modclusterd on

    # passwd ricci
    Changing password for user ricci.
    New password:
    BAD PASSWORD: it is too short
    BAD PASSWORD: is too simple
    Retype new password:
    passwd: all authentication tokens updated successfully.

    # /etc/init.d/cman start
    Starting cluster:
    Checking if cluster has been disabled at boot... [ OK ]
    Checking Network Manager... [ OK ]Global setup... [ OK ]
    Loading kernel modules... [ OK ]
    Mounting configfs... [ OK ]
    Starting cman... [ OK ]
    Waiting for quorum... [ OK ]
    Starting fenced... [ OK ]
    Starting dlm_controld... [ OK ]
    Starting gfs_controld... [ OK ]
    Unfencing self... [ OK ]
    Joining fence domain... [ OK ]

    # /etc/init.d/ricci start
    Starting oddjobd: [ OK ]
    Starting ricci: [ OK ]

    # /etc/init.d/rgmanager start
    Starting Cluster Service Manager: [ OK ]

    # /etc/init.d/modclusterd start
    Starting Cluster Module - cluster monitor: Setting verbosity level to LogBasic
    [ OK ]

  4. 매니지먼트 노드에서는 아래 서비스를 시작한다.
    # chkconfig luci on
    # chkconfig ricci on
    # /etc/init.d/luci start
    Starting saslauthd: [ OK ]
    Start luci... [ OK ]
    Point your web browser to https://cent63-c:8084 (or equivalent) to access luci

    # /etc/init.d/ricci start
    Starting oddjobd: [ OK ]
    Starting ricci: [ OK ]

    luci가 실행되지 않는 다면 아래 주소를 참고한다.
    https://access.redhat.com/knowledge/solutions/66259 
    # yum downgrade python-repoze-who-friendlyform-1.0-0.3.b3.el6

    luci 서버에 로그인한다.
    https://서버IP:8084
    (id는 root, 비밀번호는 root의 비밀번호를 입력하면 로그인 할 수 있다._

  5. 이제, Failover domain, Resource, Service Group을 등록하여 사용하면 된다.
    apache 서버를 resource로 등록해 보았으나, 정상작동하지 않아서, 동일 서비스를 스크립트로 지정했더니 잘 되었다.

    각 노드 서버의 터미널 창에서는 clustat 커맨드를 이용하여 확인 가능하다.

    Cluster Status for VM-Cluster @ Tue Oct 28 22:15:40 2014
    Member Status: Quorate
    Member Name                                    ID   Status
     ------ ----                                    ---- ------
     130-VM                                             1 Online, Local
     140-VM                                             2 Online

  6. 클러스터 서비스의 정지.
    # /etc/init.d/rgmanager stop
    # /etc/init.d/cman stop
    # /etc/init.d/ricci stop
    # /etc/init.d/modclusterd stop

  7. 클러스터에서 iSCSI 와 GFS2 사용.
    iscsi 서버: 192.168.100.35

    각 노드에 iscsi와, gfs2 를 설치한다.
    iscsi가 예전 target을 찾고 있다면, 예전 target을 지워준다
    # iscsiadm -m node -o delete <ip address>)

    # yum install iscsi-initiator-utils gfs2-utils

    Node-C 에서, iSCSI 디바이스를 마운트하고, gfs2 화일시스템을 생성한다.
    # mkfs.gfs2 -t Cent63-cluster:gfs2fs -j 4 /dev/sda1
    This will destroy any data on /dev/sda1.
    It appears to contain: data
    Are you sure you want to proceed? [y/n] y
    Device: /dev/sda1
    Blocksize: 4096
    Device Size 5.00 GB (1310465 blocks)
    Filesystem Size: 5.00 GB (1310464 blocks)
    Journals: 4
    Resource Groups: 20
    Locking Protocol: "lock_dlm"
    Lock Table: "Cent63-cluster:gfs2fs"
    UUID: c2c6666b-f069-2ebb-ac05-7446f25b0773

    Node-A, B 에서 iscsi서비스를 실행한 후,  iSCSI 장치를 마운트 하여 사용한다.
    gfs2 덕분에, a 노드에서 화일을 생성하거나 삭제하면, b노드에서도 바로 적용되는것을 볼 수 있다.

    # mount -t gfs2 /dev/sda1 /iscsi

  • 리소스 등록순서
    리소스 생성 -> 페일 오버 -> 서비스 그룹 




이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com