Sun Cluster Geographic Edition 安装指南

第 3 章 启用和配置 Sun Cluster Geographic Edition 软件

本章介绍了启用和配置 Sun Cluster Geographic Edition 基础结构的步骤。本章包括以下各节:

启用 Sun Cluster Geographic Edition 基础结构

启用 Sun Cluster Geographic Edition 软件后,群集便可以与另一个已启用群集加入伙伴关系。创建群集伙伴关系时,可以使用 CLI,也可以使用 GUI。

有关设置和安装 Sun Cluster Geographic Edition 的更多信息,请参见《Sun Cluster Geographic Edition System Administration Guide》中的第 3  章 “Administering the Sun Cluster Geographic Edition Infrastructure”

要使用 geoadm 命令启用本地群集的伙伴关系成员身份,您必须拥有超级用户访问权限。

Procedure如何启用 Sun Cluster Geographic Edition 软件

此过程仅在本地群集上启用 Sun Cluster Geographic Edition 基础结构。您可以在位于不同地理位置的所有群集上重复执行此过程。

开始之前

确保满足以下条件:

  1. 成为群集节点的超级用户。

  2. 确保与群集名称相同的逻辑主机名可用并已定义。


    # cluster list
    

    如果群集名称不是您想要使用的名称,可使用以下命令更改群集名称:


    # cluster rename -c newclustername clustername
    
    -c newclustername

    指定新的群集名称。

    clustername

    要更改的群集名称。

    有关更多信息,请参见 cluster(1CL) 手册页。


    注 –

    启用了 Sun Cluster Geographic Edition 基础结构后,不得在基础结构呈启用状态的情况下更改群集名。


  3. 确认命名服务和本地 hosts 文件中包含与群集名称匹配的主机条目。

    本地主机文件 (hosts) 位于 /etc/inet 目录下。

  4. 在群集中的一个节点上启动 Sun Cluster Geographic Edition 基础结构。


    # geoadm start
    

    geoadm start 命令仅在本地群集上启用 Sun Cluster Geographic Edition 基础结构。有关详细信息,请参见 geoadm(1M) 手册页。

  5. 检验是否已启用基础结构以及 Sun Cluster Geographic Edition 资源组是否处于联机状态。


    # geoadm show
    # clresourcegroup status geo-clusterstate geo-infrastructure
    # clresource status -g geo-clusterstate,geo-infrastructure
    

    geoadm show 命令的输出结果将显示 Sun Cluster Geographic Edition 基础结构在群集的某一特定节点上处于活动状态。

    clresourcegroup statusclresource status 命令的输出结果将显示 geo-failovercontrolgeo-hbmonitorgeo-clustername 资源以及 geo-infrastructure 资源组在群集的某个节点上处于联机状态。geo-clusterstate 资源组在两个节点上均处于联机状态。

    有关更多信息,请参见 clresourcegroup(1CL)clresource(1CL) 手册页。


示例 3–1 在群集上启用 Sun Cluster Geographic Edition 基础结构

本示例将在 cluster-paris 群集上启用 Sun Cluster Geographic Edition 软件。

  1. cluster-paris 上启动 Sun Cluster Geographic Edition 基础结构。


    phys-paris-1# geoadm start
    
  2. 确保已成功启用 Sun Cluster Geographic Edition 基础结构。


    phys-paris-1# geoadm show
    
    --- CLUSTER LEVEL INFORMATION ---
    Sun Cluster Geographic Edition is active on cluster-paris from node phys-paris-1
    Command execution successful
    phys-paris-1#
  3. 验证 Sun Cluster Geographic Edition 资源组和资源的状态。


    phys-paris-1# clresourcegroup status geo-clusterstate geo-infrastructure
    
    === Cluster Resource Groups ===
    
    Group Name                      Node Name              Suspended            Status
    ----------                      ---------              ---------            ------
    geo-clusterstate                phys-paris-1           No                   Online
                                    phys-paris-2           No                   Online
    
    geo-infrastructure              phys-paris-1           No                   Online
                                    phys-paris-2           No                   Offline
    
    phys-paris-1# clresource status -g geo-clusterstate,geo-infrastructure
    
    === Cluster Resources ===
    
    Resource Name           Node Name       State         Status Message
    -------------           ---------       -----         --------------
    geo-clustername         phys-paris-1    Online        Online - LogicalHostname online.
                            phys-paris-2    Offline       Offline
    
    geo-hbmonitor           phys-paris-1    Online        Online - Daemon OK
                            phys-paris-2    Offline       Offline
    
    geo-failovercontrol     phys-paris-1    Online        Online - Service is online.
                            phys-paris-2    Offline       Offline

接下来的操作

在伙伴群集之间配置信任。转至如何在两个群集之间配置信任

在伙伴群集之间配置信任

在两个群集之间创建伙伴关系之前,您必须先配置 Sun Cluster Geographic Edition 软件以确保两个群集间的安全通信。这种配置必须是彼此照应的。例如,必须将群集 cluster-paris 配置为信任群集 cluster-newyork,同时必须将群集 cluster-newyork 配置为信任群集 cluster-paris

Procedure如何在两个群集之间配置信任

开始之前

确保满足以下条件:

  1. 成为群集节点的超级用户。

  2. 将公钥从远程群集导入到本地群集中。

    在本地群集的一个节点上运行以下命令,以将密钥从远程群集导入到本地群集的一个节点中。


    # geops add-trust -c remotecluster
    
    -c remotecluster

    指定与其组成伙伴关系的群集的逻辑主机名。该逻辑主机名由 Sun Cluster Geographic Edition 软件使用,并映射到远程伙伴群集的名称。例如,远程伙伴群集名可能与以下格式类似:

    cluster-paris

    当您将该选项与 add-trustremote-trust 子命令一起使用时,该选项可指定远程群集上公钥的存储位置的别名。远程群集上的证书的别名具有以下模式:

    remotecluster.certificate[0-9]*

    只有属于远程群集的密钥才应具有这种模式的别名。

    有关 geops 命令的更多信息,请参阅 geops(1M) 手册页。

  3. 在远程伙伴群集的一个节点上重复以上步骤。

  4. 从每个群集的一个节点上检验信任关系。


    # geops verify-trust -c remotecluster
    
接下来的操作

配置并加入伙伴关系。请参见《Sun Cluster Geographic Edition System Administration Guide》中的第 5  章 “Administering Cluster Partnerships”

另请参见

要删除两个群集之间的伙伴关系,请参见《Sun Cluster Geographic Edition System Administration Guide》中的“How to Remove Trust Between Two Clusters”