首页 > Linux操作系统 > Linux操作系统 > hacmp 5.5配置步骤
| 配置hacmp 1. 配置集群 root@db:/>smitty hacmp. Initialization and Standard Configuration Configure an HACMP Cluster and Nodes * Cluster Name [cluster] New Nodes (via selected communication paths) [] + Currently Configured Node(s) [app_boot db_boot] (选择boot IP地址) 2.配置服务地址 Initialization and Standard Configuration Configure Resources to Make Highly Available Configure Service IP Labels/Addresses ---- Add a Service IP Label/Address 添加两台主机的服务地址 + * IP Label/Address [db_svc] + Prefix Length [] # * Network Name [net_ether_01] + * IP Label/Address [app_svc] + Prefix Length [] # * Network Name [net_ether_01] + * Network Name 决定了与之对应的Service IP默认在哪个网卡上启动 ---- Change/Show a Service IP Label/Address ---- Remove Service IP Label(s)/Address(es) 3.配置网络 Extended Configuration Extended Topology Configuration ---- Configure HACMP Networks ------- Add a Network to the HACMP Cluster select a Network Type 选择 ether * Network Name net_ether_01 New Network Name [] * Network Type [ether] + * Netmask [255.255.255.192] + * Enable IP Address Takeover via IP Aliases [No] ------采用老方法IP接管,不是IP别名 + IP Address Offset for Heartbeating over IP Aliases [] * Network attribute public * Enable IP Address Takeover via IP Aliases [Yes] 此选项决定了HACMP的IP切换方式,但值得一提的是只有“boot”、“standby”、“service”三个IP分别为三个不同网段时必须选用IP Aliases方式。如果“boot”、“standby”其中一个与“service”为同一个网段时必须选用IP Replace,则此选项应选“NO”。 4.配置应用服务器 Initialization and Standard Configuration Configure Resources to Make Highly Available Configure Application Servers ---- Add an Application Server Server Name appserver Start Script [/home/app_start.sh] Stop Script [/home/app_stop.sh] Server Name dbserver Start Script [/home/db_start.sh] Stop Script [/home/db_stop.sh] ---- Change/Show an Application Server ----- Remove an Application Server 需要手动在两个节点上建立“/home/app_start.sh”、“home/db_stop.sh”并保证其有执行权限。如果是双机互备的话需要建立两个App Server。方法相同。 5.配置资源组 Initialization and Standard Configuration Configure HACMP Resource Groups -----Add a Resource Group Resource Group Name rg_app Participating Nodes (Default Node Priority) [app db ] ---这个有顺序的,表示rg_app资源中 m2m_app为主 + Startup Policy Online On Home Node Only + Fallover Policy Fallover To Next Priority Node In The List + Fallback Policy Fallback To Higher Priority Node In The List Resource Group Name rg_db Participating Nodes (Default Node Priority) [db app] ---这个有顺序的,表示rg_db资源中 m2m_db为主 Startup Policy Online On Home Node Only + Fallover Policy Fallover To Next Priority Node In The List + Fallback Policy Fallback To Higher Priority Node In The List + ---- Change/Show a Resource Group ---- Remove a Resource Group --- Change/Show Resources for a Resource Group (standard) “Participating Nodes”选项决定了资源组中节点的优先级,写在前面的节点其优先级高于后面的节点。 根据实际需求决定资源组的:“Startup Policy”、“Fallover Policy”、“Fallback Policy”。 Startup Policy: Online On Home Node Only: 只在主节点启动。在 “Participating Nodes”中写在第一位的节点启动。 Online On First Available Node:在第一个启动的节点启动。在“Participating Nodes”中所选择的所有节点中最先启动的节点上启动。 Online Using Distribution Policy:按照分布策略启动 Online On All Available Nodes:在所有启动的节点中启动。做并发群集时选择此项。如:Oracle RAC Fallover Policy: Fallover To Next Priority Node In The List:节点失败时资源组迁移到下一优先级节点 Fallover Using Dynamic Node Priority:节点失败时动态选择迁移节点 Bring Offline (On Error Node Only):将资源组下线 Fallback Policy: Fallback To Higher Priority Node In The List:节点恢复时资源组返回优先级高的节点 Never Fallback:不进行资源组回迁 6.修改资源组里面的资源信息 Initialization and Standard Configuration Configure HACMP Resource Groups ------- Change/Show Resources for a Resource Group (standard) Resource Group Name rg_app Participating Nodes (Default Node Priority) app db Startup Policy Online On Home Node Only Fallover Policy Fallover To Next Priority Node In The List Fallback Policy Fallback To Higher Priority Node In The List Service IP Labels/Addresses [app_svc] + Application Servers [appserver] + Volume Groups [appvg2] + Use forced varyon of volume groups, if necessary false + Filesystems (empty is ALL for VGs specified) [ ] Resource Group Name rg_db Participating Nodes (Default Node Priority) db app Startup Policy Online On Home Node Only Fallover Policy Fallover To Next Priority Node In The List Fallback Policy Fallback To Higher Priority Node In The List Service IP Labels/Addresses [db_svc] + Application Servers [dbserver] + Volume Groups [dbvg2] + Use forced varyon of volume groups, if necessary false + Filesystems (empty is ALL for VGs specified) [] + 6.配置串口网络 Extended Configuration Extended Topology Configuration Configure HACMP Networks Add a Network to the HACMP cluster 选择rs232 * Network Name [net_rs232_01] * Network Type rs232 Extended Configuration Extended Topology Configuration ---Configure HACMP Communication Interfaces/Devices ---Add Communication Interfaces/Devices Add Pre-defined communication Interfaces and Devices communication Devices 按照提示选中两个串口名称 * Device Name db_tty0] * Network Type rs232 * Network Name net_rs232_01 * Device Path [/dev/tty0] * Node Name [db] * Device Name [app_tty0] * Network Type rs232 * Network Name net_rs232_01 * Device Path [/dev/tty0] * Node Name [app] --- Change/Show Communication Interfaces/Devices ----Remove Communication Interfaces/Devices ---Update HACMP Communication Interface with Operating System Settings 7.同步双机 Extended Configuration Extended verification and synchronization 进去后,先选择校验,如果校验成功再执行同步! 8.测试HA切换 root@ db:/>netstat -in Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll en0 1500 link#2 0.21.5e.60.61.70 193 0 113 0 0 en0 1500 192.168.10 192.168.10.24 193 0 113 0 0 en1 1500 link#3 0.21.5e.60.61.71 90 0 29 0 0 en1 1500 192.168.0 192.168.0.14 90 0 29 0 0 lo0 16896 link#1 467 0 469 0 0 lo0 16896 127 127.0.0.1 467 0 469 0 0 lo0 16896 ::1 467 0 469 0 0 root@ db:/>smitty clstart 启动双机 * Start now, on system restart or both now + Start Cluster Services on these nodes [app] + * Manage Resource Groups Automatically + BROADCAST message at startup? true + Startup Cluster Information Daemon? false + Ignore verification errors? false + Automatically correct errors found during Interactively Extended Configuration Extended Resource Configuration Extended Topology Configuration --Configure HACMP Nodes -- Configure HACMP Sites -- Configure HACMP Networks -- Configure HACMP Communication Interfaces/Devices -- Configure HACMP Persistent Node IP Label/Addresses -- Configure HACMP Global Networks -- Configure HACMP Network Modules -- Configure Topology Services and Group Services -- Show HACMP Topology 删除hacmp配置,重新配置 Extended Configuration - Extended Topology Configuration -- Configure an HACMP Cluster ------ Remove an HACMP Cluster |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9390331/viewspace-691057/ ,如需转载,请注明出处,否则将追究法律责任。