Gih's Blog

只言片语

smitty hacmp 配置 HA 备忘

2011-07-25 by gihnius, tagged as aix

配置2节点 HA cluster 的smitty配置过程:

准备:参考: HACMP规划的一般步骤步骤:

  • 创建cluster以及节点:
  • # smitty hacmp
    Initialization and Standard Configuration
    Configure an HACMP Cluster and Nodes 
    输入cluster的名字, 根据/etc/hosts的配置, 选择相应的节点.
  • 添加服务ip地址:
  • # smitty hacmp
    Initialization and Standard Configuration
    Configure Resources to Make Highly Available
    Configure Service IP Labels/Addresses
    Add a Service IP Label/Address 
    输入ip 地址以及网络名.
  • 建立资源组:
  • # smitty hacmp
    Initialization and Standard Configuration
    Configure HACMP Resource Groups
    Add a Resource Group 
    输入资源组名称. 习惯上给资源组的名称加上"_rg"方便识别. 同时选上所在的节点. Fallback Policy: 选 "Nerver Fallback", 这样当资源组已经在备节点运行时, 启动主节点就不会自动接管. 主备的次序取决于添加的节点名的次序.
  • 向资源组里添加服务ip地址:
  • # smitty hacmp
    Initialization and Standard Configuration
    Configure HACMP Resource Groups
    Change/Show Resources for a Resource Group (standard) 
    选择之前刚建立的资源组, 添加上服务ip地址.
  • 检验与同步:
  • # smitty hacmp
    Extended Configuration
    Extended Verification and Synchronization 
    结果显示"Ok"就ok. h还可以尝试选上 "Automatically correct errors".
  • 启动 HACMP cluster:
  • # smitty hacmp
    System Management (C-SPOC)
    Manage HACMP Services
    Start Cluster Services 
    选择要启动的节点, 同时启动 clinfo "Cluster Information Daemon".
  • 检查状态:
  • # clstat -ao
    # cldump 
    显示 cluster STABLE 以及节点 Up.扩展: 配置磁盘心跳在节点连接的 SAN 存储上选择一个比较小的 disk (hdisk OR vpath OR hdiskpower). 记下其 PVID.
  • 建立 concurrent VG:
  • # smitty hacmp
    System Management (C-SPOC)
    HACMP Concurrent Logical Volume Management
    Concurrent Volume Groups
    Create a Concurrent Volume Group 
    选择两个节点, 添加刚才选好disk的 PVID, 起一个vg名跟其它vg区别大一点, 比如 heartbeat_vg.
  • 添加磁盘心跳网络:
  • # smitty hacmp
    Extended Configuration
    Extended Topology Configuration
    Configure HACMP Networks
    Add a Network to the HACMP Cluster 
    选择刚才的"heartbeat_vg"为默认网络名.
  • 自动添加相关信息:
  • # smitty hacmp
    Extended Configuration
    Discover HACMP-related Information from Configured Nodes 
  • 添加磁盘:
  • # smitty hacmp
    Extended Configuration
    Extended Topology Configuration
    Configure HACMP Communication Interfaces/Devices
    Add Communication Interfaces/Devices
    Add Discovered Communication Interface and Devices Communication Devices 
    分别在两个节点上选相同的磁盘.
  • 同步配置:
  • # smitty hacmp
    Extended Configuration
    Extended Verification and Synchronization 
    结果显示"Ok"就ok. h还可以尝试选上 "Automatically correct errors".