Sun Java System Messaging Server 6.3 관리 설명서

Procedure2노드 대칭 Messaging Server를 구성하는 방법—예

이 예에서는 두 클러스터 노드의 물리적 호스트 이름이 mars.red.siroe.comvenus.red.siroe.com인 것으로 가정합니다. 설치 및 구성 디렉토리 위치는 고유해야 합니다. 각 노드의 설치 및 구성 디렉토리의 이름이 동일한 경우(예: /opt/SUNWmsgsr 및 /var/opt/SUNWmsgsr) 경합 문제가 발생할 수 있습니다. venusmars에 페일오버될 때 Messaging Server의 두 인스턴스가 동일한 설치 및 구성 디렉토리에서 완료될 경우 경합 문제가 발생합니다.

설치 디렉토리의 경우 /opt/NodeMember /SUNWmsgsr 형식을 사용하고 구성 디렉토리는 /var/opt/NodeMember/SUNWmsgsr 형식을 사용하여 설치 및 구성 디렉토리를 고유한 이름으로 지정하는 것이 좋습니다. 고유하기만 하면 어떤 디렉토리에도 이진 및 구성 데이터를 설치할 수 있습니다.

이 예에서는 두 클러스터 노드의 물리적 호스트 이름이 mars.red.siroe.comvenus.red.siroe.com인 것으로 가정합니다.

mars.red.siroe.com의 경우 이진은 /opt/mars/SUNWmsgsr에 설치되고 구성 데이터는 /var/opt/mars/SUNWmsgsr에 설치됩니다.

venus.red.siroe.com의 경우 이진은 /opt/venus/SUNWmsgsr에 설치되고 구성 데이터는 /var/opt/venus/SUNWmsgsr에 설치됩니다.

해당 논리 IP 주소를 가진 meadowpasture라는 두 논리 호스트 이름이 있습니다. 예를 들어, 두 노드의 /etc/hosts 파일은 다음과 같습니다.


192.18.75.155 meadow.red.siroe.com meadow 
192.18.75.157 pasture.red.siroe.com pasture
  1. Messaging Server Sun Cluster 에이전트 패키지(SUNWscims)를 두 노드 모두에 설치합니다.

  2. 네 개의 파일 시스템을 만듭니다.

    이러한 파일 시스템은 클러스터 파일 시스템이거나 로컬 파일 시스템(페일오버 파일 시스템)입니다.


    /var/opt/mars/SUNWmsgsr
    /var/opt/venus/SUNWmsgsr
    /opt/mars/SUNWmsgsr
    /opt/venus/SUNWmsgsr

    이러한 파일 시스템을 공유 디스크에 마운트해야 합니다. 아래 예에서는 네 개의 클러스터 파일 시스템을 보여 줍니다. 아래 표시된 /etc/vfstab의 내용은 클러스터의 모든 노드에서 비슷해야 합니다.


    # cat /etc/vfstab
    #device  device  mount  FS  fsck  mount  mount  to  mount  to  fsck  point  type 
    pass at_boot_options
    /dev/md/penguin/dsk/d500 /dev/md/penguin/rdsk/d500 /opt/mars/SUNWmsgsr ufs 2 yes 
    logging,global
    /dev/md/penguin/dsk/d400 /dev/md/penguin/rdsk/d400 /var/opt/mars/SUNWmsgsr ufs 2 
    yes logging,global
    /dev/md/polarbear/dsk/d200 /dev/md/polarbear/rdsk/d200 /opt/venus/SUNWmsgsr ufs 2 
    yes  logging,global
    /dev/md/polarbear/dsk/d300 /dev/md/polarbear/rdsk/d300 /var/opt/venus/SUNWmsgsr 
    ufs 2 yes logging,global

    위에 표시된 네 개의 파일 시스템을 로컬 파일 시스템(페일오버 파일 시스템)으로 만들려면 부트 시 마운트 옵션을 no로 설정하고 마운트 옵션의 global 키워드를 제거합니다.


    
    
  3. 기본 노드 구성

    1. 기본 노드에서 필수 자원 유형을 추가합니다.

      그러면 사용할 자원 유형을 Sun Cluster가 인식하도록 구성됩니다. Messaging Server 및 HAStoragePlus 자원을 등록하려면 다음 명령을 사용합니다.


      # scrgadm -a -t SUNW.HAStoragePlus
      # scrgadm -a -t SUNW.ims 
    2. Messaging Server에 대해 MS_RG_MARS라는 페일오버 자원 그룹을 만듭니다.


      # scrgadm -a -g MS_RG_MARS -h mars,venus
    3. meadow라는 논리 호스트 이름 자원을 만든 후 자원 그룹에 추가하여 온라인으로 전환합니다.


      # scrgadm -a -L -g MS_RG_MARS -l meadow
      # scrgadm -c -j meadow -y R_description="LogicalHostname resource for meadow"
      # scswitch -Z -g MS_RG_MARS
    4. 앞에서 만든 파일 시스템을 사용하여 ms-hasp-mars라는 HAStoragePlus 자원을 만듭니다.


      # scrgadm -a -j ms-hasp-mars -g MS_RG_MARS -t SUNW.HAStoragePlus -x 
      FileSystemMountPoints ="/opt/mars/SUNWmsgsr, /var/opt/mars/SUNWmsgsr" -x 
      AffinityOn=TRUE
    5. HAStoragePlus 자원 활성화:


      # scswitch -e -j ms-hasp-mars
  4. Messaging Server를 기본 노드에 설치합니다.

    Communications Suite 설치 프로그램을 사용하여 Messaging Server 패키지를 설치합니다. Messaging Server 이진 및 구성 데이터를 공유 파일 시스템에 설치하는지 확인합니다(단계 2 참조). 예를 들어, 이 Messaging Server 인스턴스의 경우 메시징 이진은 /opt/mars/SUNWmsgsr에 있고 구성 데이터는 /var/opt/mars/SUNWmsgsr에 있습니다.

  5. Messaging Server를 기본 노드에서 설치하고 구성합니다( 1.3 Messaging Server 초기 런타임 구성 만들기 참조).

    초기 런타임 구성 프로그램에 정규화된 호스트 이름을 묻는 메시지가 표시됩니다. 논리 호스트 이름 meadow.red.siroe.com을 입력합니다. 또한 구성 디렉토리를 지정하라는 메시지가 표시됩니다. /var/opt/mars/SUNWmsgsr을 입력합니다.

  6. 기본 노드에서 ha_ip_config 스크립트를 실행하고 논리 IP 주소를 제공합니다.

    이 스크립트는 기본 노드에서만 실행되고 보조 노드에서는 실행되지 않습니다. ha_ip_config 스크립트는 sbin 디렉토리 아래의 설치 디렉토리에 있습니다. 예를 들면 다음과 같습니다.


    # /opt/mars/SUNWmsgsr/sbin/ha_ip_config
    
    Please specify the IP address assigned to the HA logical host name. 
    Use dotted decimal form, a.b.c.d
    
    Logical IP address: 192.18.75.155 
    # This value is the logical IP address of the logical hostname. Refer 
    # to the /etc/hosts file.
    Please specify the path to the top level directory in which iMS is
    installed.
    
    iMS server root: /opt/mars/SUNWmsgsr
    
    . . . 
    
    Updating the file /opt/mars/SUNWmsgsr/config/dispatcher.cnf
    Updating the file /opt/mars/SUNWmsgsr/config/job_controller.cnf
    Setting the service.listenaddr configutil parameter
    Setting the local.snmp.listenaddr configutil parameter
    Setting the service.http.smtphost configutil parameter
    Setting the local.watcher.enable configutil parameter
    Setting the local.autorestart configutil parameter
    Setting the metermaid.config.bindaddr configutil parameters
    Setting the metermaid.config.serveraddr configutil parameters
    Setting the local.ens.port parameter
    Configuration successfully updated
  7. imta.cnf 파일을 수정하고 모든 물리적 호스트 이름 항목(즉, mars)을 HA 논리 호스트 이름(meadow)으로 바꿉니다.

  8. 자원 그룹을 보조 노드(venus)에 페일오버합니다.

    페일오버 후 보조 노드(venus)를 구성합니다.


    # scswitch -z -g MS_RG_VENUS -h mars
  9. 보조 노드(venus)에서 useconfig 유틸리티를 실행합니다. 3.3.3 useconfig 유틸리티 사용을 참조하십시오.

    초기 런타임 구성 프로그램(configure)을 실행하거나 Messaging Server 패키지를 설치할 필요는 없습니다.

    다음 예에서 /var/opt/mars/SUNWmsgsr은 공유 구성 디렉토리입니다.


    # useconfig /var/opt/mars/SUNWmsgsr/setup/configure_20061201124116
    cp /var/opt/mars/SUNWmsgsr/setup/configure_20061201124116/Devsetup.properties
    /opt/mars/SUNWmsgsr/lib/config-templates/Devsetup.properties
    /usr/sbin/groupadd mail
    /usr/sbin/useradd -g mail -d / mailsrv
    /usr/sbin/usermod -G mail mailsrv
    sed -e "s/local.serveruid/mailsrv/" -e "s/local.serveruid/mail/" -e "s:<msg·RootPath>:/opt/mars/SUNWmsgsr:" 
    /opt/mars/SUNWmsgsr/lib/config-templates/devtypes.txt.template > 
    /opt/mars/SUNWmsgsr/lib/config-templates/devtypes.txt
    sed -e "s/local.serveruid/mailsrv/" -e "s/local.serveruid/mail/" -e 
    "s:<msg·RootPath>:/opt/mars/SUNWmsgsr:" 
    /opt/mars/SUNWmsgsr/lib/config-templates/config.ins.template > 
    /opt/mars/SUNWmsgsr/lib/config-templates/config.ins
    /opt/mars/SUNWmsgsr/lib/devinstall -l sepadmsvr:pkgcfg:config -v -m -i 
    /opt/mars/SUNWmsgsr/lib/config-templates/config.ins 
    /opt/mars/SUNWmsgsr/lib/config-templates 
    /opt/mars/SUNWmsgsr/lib/jars /opt/mars/SUNWmsgsr/lib
    devinstall returned 0
    crle -c /var/ld/ld.config -s
     /usr/lib/secure:/opt/SUNWmsgsr/lib:/opt/venus/SUNWmsgsr/lib:/opt/mars/SUNWmsgsr/lib 
    -s /opt/mars/SUNWmsgsr/lib
    See /opt/mars/SUNWmsgsr/install/useconfiglog_20061211155037 for more details
  10. HA Messaging Server 자원을 만든 후 활성화합니다.


    # scrgadm -a -j ms-rs-mars -t SUNW.ims -g MS_RG_MARS -x IMS_serverroot 
    =/opt/mars/SUNWmsgsr -y Resource_dependencies=meadow,ms-hasp-mars
    # scswitch -e -j mail-rs-mars

    위 명령은 Messaging Server에 대해 ms-rs-mars라는 HA Messaging Server 자원을 만듭니다. 이 HA Messaging Server 자원은 /opt/mars/SUNWmsgsr에 설치되고 HA 디스크 자원(앞에서 만든 파일 시스템)과 HA 논리 호스트 이름 meadow에 종속됩니다.

  11. 모든 항목이 제대로 작동하는지 확인합니다.

    Messaging Server 자원을 기본 노드로 다시 페일오버합니다.


     # scswitch -z -g MAIL-RG -h mars
  12. 마찬가지로 Messaging Server의 두 번째 인스턴스에 대해 venus를 기본 노드로, mars를 보조(또는 대기) 노드로 사용하는 다른 페일오버 자원 그룹을 만듭니다.

    이 자원 그룹에 대해 venus를 기본 노드로, MS_RG_VENUS를 자원 그룹으로, pasture를 논리 호스트 이름으로, ms-hasp-venus를 HAStoragePlus 자원으로 사용하여 3-10단계를 반복합니다. 명령은 다음과 같습니다.

    자원 그룹 MS_RG_VENUS 만들기


    # scrgadm -a -g MS_RG_VENUS -h venus,mars

    pasture라는 논리 호스트 이름 자원을 만들어 자원 그룹에 추가한 다음 온라인으로 전환


    # scrgadm -a -L -g MS_RG_VENUS -l pasture
    # scrgadm -c -j pasture -y R_description="LogicalHostname resource for pasture"
    # scswitch -Z -g MS_RG_VENUS

    앞에서 만든 파일 시스템을 사용하여 ms-hasp-venus라는 HAStoragePlus 자원 만들기


    # scrgadm -a -j ms-hasp-venus -g MS_RG_VENUS -t SUNW.HAStoragePlus -x 
    FileSystemMountPoints ="/opt/venus/SUNWmsgsr, /var/opt/venus/SUNWmsgsr" -x 
    AffinityOn=TRUE

    HAStoragePlus 자원 활성화


    # scswitch -e -j ms-hasp-venus

    기본 노드에서 ha_ip_config 스크립트를 실행하고 논리 IP 주소 제공


    # /opt/venus/SUNWmsgsr/sbin/ha_ip_config

    HA Messaging Server 자원을 만든 후 활성화


    # scrgadm -a -j ms-rs-venus -t SUNW.ims -g MS_RG_VENUS -x IMS_serverroot 
    =/opt/venus/SUNWmsgsr -y Resource_dependencies=pasture,ms-hasp-venus
    # scswitch -e -j mail-rs-venus

    자원 그룹을 보조 노드(venus)에 페일오버


    # scswitch -z -g MS_RG_MARS -h venus

    useconfig를 보조 노드(mars)에서 실행하려면 useconfig 유틸리티 실행


    # useconfig /var/opt/venus/SUNWmsgsr/setup/configure_20061201124116

    Messaging Server 자원을 기본 노드로 다시 페일오버하여 모든 사항이 제대로 작동하는지 확인


     # scswitch -z -g MAIL-RG -h venus