Aix双机配置简化版

来源:互联网 发布:淘宝号怎么更换身份证 编辑:程序博客网 时间:2024/05/16 03:07

 Aix双机配置简化版

配置
1.准备工作
(1)原有的cluster删除(如果没有双机,跳过)
   smitty hacmp
   extended configuration--extended topology configuration--configure an hacmp cluster--remove
(2)/etc/hosts  (需要根据现场情况修改)
   示例:   
   127.0.0.1       loopback boss170     
   192.168.0.170   mds1_boot       mds1
   192.168.1.170   mds1_stb
   192.168.0.171   mds2_boot       mds2
   10.69.5.151     mds_ora_svc
   10.69.5.150     mds_app_svc
   192.168.1.171   mds2_stb  mds2
 
在两个节点上配置/etc/es/sbin/cluster/etc/clrhosts文件(根据现场情况修改)
#vi /usr/es/sbin/cluster/etc/rhosts
mds1
mds2
 
 
(3)网卡配置完成(根据现场情况修改)
   ifconfig en5 detach执行后 再在en5配置ip的时候不能生效
   需要通过 smitty tcpip
            minimum configuration&startup 生效一下
   在further configuration
     network interfaces
     network interface
     selection/change show characteristic
 
(4)tty配置完成
   检查 lsdev -Cc tty
   若未配置 smitty tty
            add a tty
            tty rs232 asynchronous terminal
   检查连通 cat /etc/hosts>/dev/tty0 (host1)
            cat</dev/tty0(host2)
   注:若只有一个串口 在双机启动时串口被占用 不能检查
 
(5)两个节点都已识别vg信息
  lspv
  示例:importvg -y appvg hdisk3
 
 
蓝色部分参照指导书
2.拓扑结构配置
  (1)定义cluster name
  (2)定义node
  (3)定义节点的通讯路径add network(ether和rs232)
  (4)根据通讯路径查找个节点相关资源
     smitty hacmp
     extended configuration
     discover hacmp-related information from configured
  (5)将通讯接口加入所属网络和节点
     smitty hacmp
     extend configuration
     extend topology configuration
     configure hacmp communication interfaces/devices
     add communication interface/devices
     add discovered communication
     communication interfaces|communication device(esc+7)
  (6)检查
     show cluster topology
  (7)同步
     extended configuration
     extended verification and synchronization
     (automatically correct errors found during  yes)
     出错误:/usr/es/sbin/cluster/etc/rhosts
             重启守护进程:ps -ef|grep clcomd
                          stopsrc -p 第一个进程号
                          startsrc -s clcomdES
 
差别主要在这绿色部分(指导书里面是pro后台,proweb前台,以及数据库都在一套双机,
所以需要三个资源组,这个局点因为数据库已经在另外的双机搞好了,所以只需要pro后台和proweb前台两个资源组就可以了
 
3.资源配置
  (1)定义资源组 
     smitty hacmp
     extended configuration
     extended resource configuration
     hacmp extended resource group configuration
     add a resource group
     (online on first available node|fallover to next priority node|fallback to higher priority node)
     优先级按照先后顺序
  (2)配置service ip
     smitty hacmp
     extended configuration
     extended resource configuration
     hacmp extended resources configuration
     configure hacmp service ip labels/address
     add a service ip label/address
  (3)配置应用服务
     smitty hacmp
     extended configuration
     extended resource configuration
     hacmp extended resources configuration
     configure hacmp applications
     configure hacmp application servers
     add an application server
  (4)配置资源组属性
     smitty hacmp
     extended configuration
     extended resource configuration
     hacmp extended resources configuration
     change/show resources and attributes for a resource group
  (5)同步
 
后面的都是些维护的命令
 
维护
1.启动
  smitty clstart
  startup cluster information daemon  true
2.停止
  smitty clstop(graceface|takeover|forced)
3.察看进程
  lssrc -g cluster
  若状态长时间处于pending时 kill -9 强制关闭
4.察看cluster日志
  /usr/es/adm/cluster.log  可进一步确定双机的起停
  tail -f /  实时刷新
  /usr/sbin/cluster/history/*.*  查看每天日志
5.察看hacmp系统运行状态
  /usr/sbin/cluster/clstat -a
  or smitty hacmp
     problem determination tools
     view current state  会显示详细的双机信息
6.察看hacmp日志
  /tmp/hacmp.out
7.切换测试
  ip断开       ifconfig en0 down
  主机down机   shutdown -Fr
8.日常维护指南
  (1)激活资源组|去激活资源组|移动资源组|应用可用性分析
     smitty hacmp
     system management
     hacmp resource group and application management
     bring a resource group online|offline|to another node|application availability analysis
  (2)hacmp配置的备份与恢复
     smitty hacmp
     extended configuration
     snapshot configuration
     add a cluster snapshot|apply
9.手工切换
smitty hacmp
manage hacmp service
hacmp resource group and applicationmanagement
move a resource group to another node
 
lssrc -g cluster
lssrc -g clcomdES
 
startsrc
(1)看状态/usr/sbin/cluster/clstat –a
(2)进程lssrc -g cluster
(3)维护日志/tmp/hacmp.out
           /usr/es/adm/cluster.log
 
 
附录
常用命令:
察看系统hacmp资源状态:./usr/es/sbin/cluster/utilities/clfindres
察看系统hacmp网络配置:./usr/es/sbin/cluster/utilities/cllscf
察看系统hacmp配置的一个节点情况:./usr/es/sbin/cluster/utilities/clshowres -n 'host'
察看系统hacmp配置的一个资源组配置:./usr/es/sbin/cluster/utilities/clshowres -g 'host_ora'
察看所有hacmp配置情况:./usr/es/sbin/cluster/utilities/clshowres