Sun Cluster Geographic Edition 数据复制指南(适用于 Sun StorageTek Availability Suite)

在应用程序联机时创建保护组

在不使应用程序脱机的情况下,要将现有的应用程序资源组添加到新的保护组,请在应用程序资源组处于联机状态的群集上执行以下步骤。

在另一个群集上执行以下步骤。


示例 2–1 在应用程序保持联机状态时创建 Sun StorageTek Availability Suite 保护组

此示例将在应用程序不脱机的情况下创建一个保护组。

在此示例中,apprg1 资源组在 cluster-paris 群集上处于联机状态。

  1. 在群集 cluster-paris 上创建保护组。

    1. 在该群集中某个已运行应用程序资源组的节点上,检查和修复资源组和与资源组具有关联的设备组之间可能存在的 Nodelist 不一致性。

    2. 创建具有匹配 Nodelist 的保护组。


      phys-paris-1# clresourcegroup show -v apprg1 | grep Nodelist
        Nodelist:                                       phys-paris-1 phys-paris-2
      phys-paris-1# cldevicegroup show -v avsdg1 | grep "Node List:"
        Node List:                                       phys-paris-2, phys-paris-1

    此处,设备组节点列表的顺序不同于资源组节点列表的顺序。可按如下所示更改设备组节点列表的顺序:


    phys-paris-1# cldevicegroup set -p preferenced=true \
    -n phys-paris-1,phys-paris-2 avsdg
    

    您还可以对资源组的节点列表进行更改以满足要求。

    创建的保护组具有与资源组和设备组的 Nodelist 相同的 Nodelist


    phys-paris-1# geopg create -d avs -p Nodelist=phys-paris-1,phys-paris-2 \
    -o Primary -s paris-newyork-ps avspg
    phys-paris-1# Protection group "avspg" has been successfully created
  2. 将 Sun StorageTek Availability Suite 设备组 avsdg 添加到该保护组。


    phys-paris-1# geopg add-device-group -p Local_logical_host=lh-paris-1 \
    -p Remote_logical_host=lh-newyork-1 -p Enable_volume_set=True avsdg avspg
    
  3. 检验是否已创建了数据复制资源组和轻量资源组以及它们是否已联机。此外,还需检验是否已通过将 Enable-volume-set 属性设置为 True 而启用了 Sun StorageTek Availability Suite 卷集。


    phys-paris-1# dsstat
    name             t      s       pct     role    ckps    dkps    tps    svt 
    /avsdg/rdsk/d100 P      L      100.00   net      -       0       0      0 
    /avsdg/rdsk/d101                        bmp      0       0       0      0 
    
    phys-paris-1# clresource list -v
    Resource Name         Resource Type            Resource Group
    -------------         -------------            --------------
    geo-clustername       SUNW.LogicalHostname:2   geo-infrastructure
    geo-hbmonitor         SUNW.HBmonitor           geo-infrastructure
    geo-failovercontrol   SUNW.scmasa              geo-infrastructure
    lh-paris-1            SUNW.LogicalHostname:2   avsdg-stor-rg
    avsdg-stor            SUNW.HAStoragePlus:4     avsdg-stor-rg
    avsdg-rep-rs          SUNW.GeoCtlAVS           avspg-rep-rg
    avs-lh                SUNW.LogicalHostname:2   apprg1
    avs-stor              SUNW.HAStoragePlus:4     apprg1
    avs-server-res        SUNW.oracle_server:6     apprg1
    avs-listener-res      SUNW.oracle_listener:5   apprg1
    
    phys-paris-1# clresourcegroup status
    
    === 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
    
    avsdg-stor-rg         phys-paris-1    No         Online
                          phys-paris-2    No         Offline
    
    avspg-rep-rg          phys-paris-1    No         Online
                          phys-paris-2    No         Offline
    
    apprg1                phys-paris-1    No         Online
                          phys-paris-2    No         Offline
    
    phys-paris-1# clresource status
    
    === 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
                          phys-paris-2   Offline     Offline
    
    geo-failovercontrol   phys-paris-1   Online      Online
                          phys-paris-2   Offline     Offline
    
    lh-paris-1            phys-paris-1   Online      Online - LogicalHostname online.
                          phys-paris-2   Offline     Offline
    
    avsdg-stor            phys-paris-1   Online      Online
                          phys-paris-2   Offline     Offline
    
    avsdg-rep-rs          phys-paris-1   Online      Degraded - Logging
                          phys-paris-2   Offline     Offline
    
    avs-lh                phys-paris-1   Online      Online - LogicalHostname online.
                          phys-paris-2   Offline     Offline
    
    avs-stor              phys-paris-1   Online      Online
                          phys-paris-2   Offline     Offline
    
    avs-server-res        phys-paris-1   Online      Online
                          phys-paris-2   Offline     Offline
    
    avs-listener-res      phys-paris-1   Online      Online
                          phys-paris-2   Offline     Offline

    对于 Sun StorageTek Availability Suite 4.0 软件,此命令位于 /usr/sbin/dsstat。对于 Sun StorEdge Availability Suite 3.2.1 软件,此命令位于 /usr/opt/SUNWesm/sbin/dsstat

  4. 从本地激活该保护组。


    phys-paris-1# geopg start -e local avspg
    Processing operation.... this may take a while....
    Protection group "avspg" successfully started.
  5. 将已联机的应用程序资源组添加至该保护组。


    phys-paris-1# geopg add-resource-group apprg1 avspg
    Following resource groups were successfully inserted:
    			"apprg1"

    验证是否已成功添加该应用程序资源组。


    phys-paris-1# geoadm status
    Cluster: cluster-paris
    
       Partnership "paris-newyork-ps"      : OK
          Partner clusters                 : newyork
          Synchronization                  : OK
          ICRM Connection                  : OK
    
          Heartbeat "hb_cluster-paris~cluster-newyork" monitoring \
    "paris-newyork-ps" OK 
             Plug-in "ping-plugin"            : Inactive
             Plug-in "tcp_udp_plugin"         : OK
    
       Protection group "avspg"               : Unknown
          Partnership                         : paris-newyork-ps
          Synchronization                     : Error
    
          Cluster cluster-paris               : Degraded
             Role                             : Primary
             Activation State                 : Activated
             Configuration                    : OK
             Data replication                 : Degraded
             Resource groups                  : OK
    
          Cluster cluster-newyork             : Unknown
             Role                             : Unknown
             Activation State                 : Unknown
             Configuration                    : Unknown
             Data Replication                 : Unknown
             Resource Groups                  : Unknown
  6. 在伙伴群集中的一个节点上,检索该保护组。


    phys-newyork-1# geopg get -s paris-newyork-ps avspg
    Protection group "avspg" has been successfully created.
  7. 检验是否已创建数据复制资源组和轻量资源组以及它们是否已联机。


    phys-newyork-1# dsstat
    name                  t  s   pct    role   ckps   dkps   tps   svt
    /avsdg/rdsk/d100      S  L  100.00  net     -      0      0     0
    /avsdg/rdsk/d101                    bmp     0      0      0     0
    
    
    phys-newyork-1# clresource list -v
    Resource Name         Resource Type            Resource Group
    -------------         -------------            --------------
    geo-clustername       SUNW.LogicalHostname:2   geo-infrastructure
    geo-hbmonitor         SUNW.HBmonitor           geo-infrastructure
    geo-failovercontrol   SUNW.scmasa              geo-infrastructure
    lh-newyork-1          SUNW.LogicalHostname:2   avsdg-stor-rg
    avsdg-stor            SUNW.HAStoragePlus:4     avsdg-stor-rg
    avsdg-rep-rs          SUNW.GeoCtlAVS           avspg-rep-rg
    avs-lh                SUNW.LogicalHostname:2   apprg1
    avs-stor              SUNW.HAStoragePlus:4     apprg1
    avs-server-res        SUNW.oracle_server:6     apprg1
    avs-listener-res      SUNW.oracle_listener:5   apprg1
    
    phys-newyork-1# clresourcegroup status
    
    === Cluster Resource Groups ===
    
    Group Name            Node Name    Suspended    Status
    ----------            ---------    ---------    ------
    geo-clusterstate      phys-newyork-1    No      Online
                          phys-newyork-2    No      Online
    
    geo-infrastructure    phys-newyork-1    No      Online
                          phys-newyork-2    No      Offline
    
    avsdg-stor-rg         phys-newyork-1    No      Online
                          phys-newyork-2    No      Offline
    
    avspg-rep-rg          phys-newyork-1    No      Online
                          phys-newyork-2    No      Offline
    
    apprg1                phys-newyork-1    No      Unmanaged
                          phys-newyork-2    No      Unmanaged
    
    phys-newyork-1# clresource status
    
    === Cluster Resources ===
    
    Resource Name         Node Name        State     Status Message
    -------------         ---------        -----     --------------
    geo-clustername       phys-newyork-1   Online    Online - LogicalHostname online.
                          phys-newyork-2   Offline   Offline
    
    geo-hbmonitor         phys-newyork-1   Online    Online
                          phys-newyork-2   Offline   Offline
    
    geo-failovercontrol   phys-newyork-1   Online    Online
                          phys-newyork-2   Offline   Offline
    
    lh-newyork-1          phys-newyork-1   Online    Online - LogicalHostname online.
                          phys-newyork-2   Offline   Offline
    
    avsdg-stor            phys-newyork-1   Online    Online
                          phys-newyork-2   Offline   Offline
    
    avsdg-rep-rs          phys-newyork-1   Online    Degraded - Logging
                          phys-newyork-2   Offline   Offline
    
    avs-lh                phys-newyork-1   Offline   Offline
                          phys-newyork-2   Offline   Offline
    
    avs-stor              phys-newyork-1   Offline   Offline
                          phys-newyork-2   Offline   Offline
    
    avs-server-res        phys-newyork-1   Offline   Offline
                          phys-newyork-2   Offline   Offline
    
    avs-listener-res      phys-newyork-1   Offline   Offline
                          phys-newyork-2   Offline   Offline 

    对于 Sun StorageTek Availability Suite 4.0 软件,此命令位于 /usr/sbin/dsstat。对于 Sun StorEdge Availability Suite 3.2.1 软件,此命令位于 /usr/opt/SUNWesm/sbin/dsstat

  8. 在伙伴群集上本地激活该保护组。


    phys-newyork-1# geopg start -e local avspg
    Processing operation.... this may take a while....
    Protection group "avspg" successfully started.
  9. 检验是否已成功创建并激活该保护组。

    cluster-paris 上运行 geoadm status 命令会产生如下输出:


    phys-paris-1# geoadm status
    Cluster: cluster-paris
    
    Partnership "paris-newyork-ps": OK
      Partner clusters    : cluster-newyork
      Synchronization     : OK
      ICRM Connection     : OK
    
      Heartbeat "paris-to-newyork" monitoring "cluster-newyork": OK
         Heartbeat plug-in "ping_plugin"   : Inactive
         Heartbeat plug-in "tcp_udp_plugin": OK
    
    Protection group "tcpg"  : OK
      Partnership            : "paris-newyork-ps"
      Synchronization        : OK      
    
      Cluster cluster-paris   : OK
         Role                 : Primary
         PG activation state  : Activated
         Configuration        : OK
         Data replication     : OK
         Resource groups      : OK
    
      Cluster cluster-newyork : OK
         Role                 : Secondary
         PG activation state  : Activated
         Configuration        : OK
         Data replication     : OK    
         Resource groups      : OK