Sun Java System Messaging Server 6.3 管理指南

Procedure配置雙節點 HA 非對稱 Messaging Server—範例

此範例假設有兩個叢集節點,分別有名為 daisy.red.siroe.comlavender.red.siroe.com 的實體主機名稱,並共用一個稱為 budgie 的邏輯主機名稱。

daisy.red.siroe.com 的二進位檔案會安裝在 /opt/SUNWmsgsr,配置資料會安裝在 /var/opt/SUNWmsgsr

邏輯主機名稱 budgie 是指定的邏輯 IP 位址。例如,/etc/hosts 檔案應會如下所示:


192.18.75.157 budgie.red.siroe.com budgie
  1. 在兩個節點上安裝 Messaging Sun Cluster 代理程式 (SUNWscims)。

  2. 建立檔案系統。

    在此範例中,檔案系統 /var/opt/SUNWmsgsr 掛載於共用磁碟上。檔案系統可以是叢集檔案系統或本機檔案系統 (容錯移轉檔案系統)。

  3. 配置主節點 (daisy)。

    1. 在主節點上增加所需的資源類型。

      如此會配置 Sun Cluster 以瞭解要使用的資源類型。若要註冊 Messaging Server 和 HAStoragePlus 資源,請使用下列指令:


      # scrgadm -a -t SUNW.HAStoragePlus
      # scrgadm -a -t SUNW.ims 
    2. 為 Messaging Server 實例建立名為 MS_RG_DAISY 的資源群組。


      # scrgadm -a -g MS_RG_daisy -h daisy,lavender
    3. 建立名為 meadow 的邏輯主機名稱資源,並加入資源群組以進行連線。


      # scrgadm -a -L -g MS_RG_DAISY -l meadow
      # scrgadm -c -j meadow -y R_description="LogicalHostname resource for meadow"
      # scswitch -Z -g MS_RG_DAISY
    4. 利用先前建立的檔案系統,建立名為 ms-hasp-daisy 的 HAStoragePlus 資源。


      # scrgadm -a -j ms-hasp-daisy -g MS_RG_DAISY -t SUNW.HAStoragePlus -x 
      FileSystemMountPoints ="/var/opt/SUNWmsgsr" -x 
      AffinityOn=TRUE
    5. 啟用 HAStoragePlus 資源:


      # scswitch -e -j ms-hasp-daisy
  4. 在主節點上安裝與配置 Messaging Server (請參閱1.3 建立初始 Messaging Server 執行階段配置)。

    初始執行階段配置程式會要求您提供完全合格的主機名稱。請輸入邏輯主機名稱 meadow.red.siroe.com。此程式也會要求您指定配置目錄。請輸入 /var/opt/SUNWmsgsr

  5. 在主節點上執行 ha_ip_config 程序檔,並提供邏輯 IP 位址。

    它僅會執行於主節點上,而不會執行於輔助節點上。ha_ip_config 程序檔位於 sbin 目錄的安裝目錄下。例如:


    # /opt/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/SUNWmsgsr
    
    . . . 
    
    Updating the file /opt/SUNWmsgsr/config/dispatcher.cnf
    Updating the file /opt/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
  6. 修改 imta.cnf 檔案,並利用 HA 邏輯主機名稱 (meadow) 替代所有的實體主機名稱 (daisy)。

  7. 將資源群組容錯移轉至輔助節點 (lavender )。

    容錯移轉之後,接著要配置輔助節點 (lavender)。


    # scswitch -z -g MS_RG_LAVENDER -h daisy
  8. 在輔助節點 (lavender) 上安裝 Messaging Server,並執行 useconfig 公用程式。請參閱3.3.3 使用 useconfig 公用程式

    您無須執行初始執行階段配置程式 (configure)。

    在下例中,/var/opt/SUNWmsgsr 是共用的配置目錄。


    # useconfig /var/opt/SUNWmsgsr/setup/configure_20061201124116
    cp /var/opt/SUNWmsgsr/setup/configure_20061201124116/Devsetup.properties
    /opt/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/SUNWmsgsr:" 
    /opt/SUNWmsgsr/lib/config-templates/devtypes.txt.template > 
    /opt/SUNWmsgsr/lib/config-templates/devtypes.txt
    sed -e "s/local.serveruid/mailsrv/" -e "s/local.serveruid/mail/" -e 
    "s:<msg·RootPath>:/opt/SUNWmsgsr:" 
    /opt//SUNWmsgsr/lib/config-templates/config.ins.template > 
    /opt/SUNWmsgsr/lib/config-templates/config.ins
    /opt/SUNWmsgsr/lib/devinstall -l sepadmsvr:pkgcfg:config -v -m -i 
    /opt/SUNWmsgsr/lib/config-templates/config.ins 
    /opt/SUNWmsgsr/lib/config-templates 
    /opt/SUNWmsgsr/lib/jars /opt/SUNWmsgsr/lib
    devinstall returned 0
    crle -c /var/ld/ld.config -s
     /usr/lib/secure:/opt/SUNWmsgsr/lib:/opt/SUNWmsgsr/lib:/opt/SUNWmsgsr/lib 
    -s /opt/SUNWmsgsr/lib
    See /opt/SUNWmsgsr/install/useconfiglog_20061211155037 for more details
  9. 建立 HA Messaging Server 資源,並加以啟用。


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

    上述指令會為 Messaging Server (安裝在 /opt/SUNWmsgsr 中) 建立名為 ms-rs-daisy 的 HAMessaging Server 資源。此 HAMessaging Server 資源依賴於 HA 磁碟資源 (亦即先前建立的檔案系統) 以及 HA 邏輯主機名稱 meadow

  10. 確認一切運作正常。

    將 Messaging Server 資源容錯移轉回主節點。


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