配置 ats1,ats2 两个节点的 /etc/hosts 文件:
修改配置文件 /etc/cluster/rhosts,添加 BootIP 和永久 IP:
配置 FC 心跳
ats1 和 ats2 各有一个光纤卡:fcs0,首先确保这两个光纤卡在同一个交换机的 ZONE 里,然后两个节点执行如下命令配置 FC 心跳:
# chdev -P -l fcs0 -a tme=yes # chdev -P -l fscsi0 -a dyntrk=yes -a fc_err_recov=fast_fail
执行成功以后,重启两个分区:
#shutdown – Fr 0
配置共享 VG
创建三个共享 LUN: hdisk2,hdisk3,hdisk4,分别映射给 ats1 和 ats2。 在 ats1 上创建 2 个 Enhanced Concurrent Volume Groups:vg1 和 vg2
# /usr/sbin/mkvg $ARGS -f -y'vg01' -s'32' '-n' -V'38' '-C' hdisk2 # /usr/sbin/mkvg $ARGS -f -y'vg02' -s'32' '-n' -V'39' '-C' hdisk3
在 ats2 上导入新创建的两个 VG:
# /usr/sbin/importvg -y'vg01' hdisk2 # /usr/sbin/importvg -y'vg02' hdisk3
创建 cluster 和资源组
在 ats1 和 ats2 上激活两个 VG:vg01 和 vg02
#varyonvg vg01 #varyonvg vg02
在 ats1 上执行 clmgr 命令创建 cluster,将其命名为:ibm,将 hdisk4 作为 REPOSITORY disk:
#clmgr add cluster ibm NODES=ats1,ats2 REPOSITORY=hdisk4
增加两个 serviceip,若成功则无返回值:
#clmgr add service_ip ats1_service NETWORK=net_ether_01 NETMASK=255.255.255.0 #clmgr add service_ip ats2_service NETWORK=net_ether_01 NETMASK=255.255.255.0
增加两个节点的 persistent IP,若成功则无返回值:
clmgr add persistent_ip ats1_per NETWORK=net_ether_01 NODE=ats1 clmgr add persistent_ip ats2_per NETWORK=net_ether_01 NODE=ats2
增加 application,若成功则无返回值:
#clmgr add application_controller app1 STARTSCRIPT=\start\
创建资源组 rg1,共享 VG 为 vg01,service ip 为 ats1_service,应用为 app1:
#clmgr add resource_group rg1 VOLUME_GROUP=vg01 NODES=ats1,ats2 \\SERVICE_LABEL=ats1_service APPLICATIONS=app1
创建资源组 rg2, 共享 VG 为 vg02,service ip 为 ats2_service,应用为 app1
#clmgr add resource_group rg2 VOLUME_GROUP=vg02 NODES=ats1,ats2 \\SERVICE_LABEL=ats2_service FALLBACK=NFB RECOVERY_METHOD=parallel
同步 cluster:
#clmgr sync cluster
cluster 同步成功以后,启动 cluster
#clmgr online cluster start_cluster BROADCAST=false CLINFO=true
查看 cluster、资源组和资源的状态
查看 cluster 的拓扑信息:
使用 clmgr 命令查看 cluster 和资源组的状态:
#clmgr -a state query cluster #clmgr -a STATE,current -v query rg