收藏 分销(赏)

HACMP日常操作基础手册.doc

上传人:a199****6536 文档编号:3024864 上传时间:2024-06-13 格式:DOC 页数:14 大小:80.54KB
下载 相关 举报
HACMP日常操作基础手册.doc_第1页
第1页 / 共14页
HACMP日常操作基础手册.doc_第2页
第2页 / 共14页
HACMP日常操作基础手册.doc_第3页
第3页 / 共14页
HACMP日常操作基础手册.doc_第4页
第4页 / 共14页
HACMP日常操作基础手册.doc_第5页
第5页 / 共14页
点击查看更多>>
资源描述

1、HACMP操作手册强制方法停掉 HACMP: HACMP 停止分为 3 种,graceful(正常),takeover(手工切换),force(强制)。 下面维护工作,很多时候需要强制停掉 HACMP 来进行,此时资源组不会释放,这么做好处是,因为 IP 地址、文件系统等等没有任何影响,只是停掉 HACMP 本身,所以应用服务能够继续提供,实现了在线检验和变更 HACMP 目标。host1root/smitty clstop Stop Cluster ServicesType or select values in entry fields.Press Enter AFTER making a

2、ll desired changes.* Stop now, on system restart or both now Stop Cluster Services on these nodes host1 BROADCAST cluster shutdown? true* Select an Action on Resource Groups Unmanage Resource Groups 通常全部节点全部要进行这么操作。强制停掉后 HACMP 开启 : 在修改 HACMP 配置后,大多数情况下需要重新申请资源开启,这么才能使 HACMP 配置重新生效。host1root/smitty c

3、lstart Start Cluster ServicesType or select values in entry fields.Press Enter AFTER making all desired changes. Entry Fields* Start now, on system restart or both now Start Cluster Services on these nodes bgbcb04 BROADCAST message at startup? true Startup Cluster Information Daemon? false Reacquire

4、 resources after forced down ? true 日常检验及处理 为了愈加好地维护 HACMP,平时检验和处理是必不可少。下面提供检验和处理方法除非尤其说明,均是不用停机,而只需停止应用即可进行,不影响用户使用。不过具体实施前需要仔细检验状态,再给予实施。clverify 检验 这个检验能够对包含 LVM 绝大多数 HACMP 配置同时状态,是 HACMP 检验是否同时关键方法。smitty clverify - Verify HACMP Configuration Verify ClusterType or select values in entry fields.P

5、ress Enter AFTER making all desired changes. Entry FieldsBase HACMP Verification Methods both(Cluster topology, resources, both, none)Custom Defined Verification Methods Error Count Log File to store output Verify changes only? NoLogging Standard回车即可 经过检验,结果应是 OK。假如发觉不一致,需要区分对待。对于非 LVM 报错,大多数情况下不用停止

6、应用,能够用以下步骤处理:1. 先利用强制方法停止 HACMP 服务。 一样停止 host2 HACMP 服务。1. 只检验出问题进行修正和同时 : smitty hacmp - Extended Configuration- Extended Verification and Synchronization 这时因为已停止 HACMP 服务,能够包含”自动修正和强制同时 “。对于 LVM 报错,通常是因为未使用 HACMP C-SPOC 功效,单边修改文件系统、lv、VG 造成,会造成 VG timestamp 不一致。这种情况即使手工在另一边修正(通常因为应用在使用,也不能这么做),怎样选

7、择自动修正同时,也仍然会报 failed。此时只能停掉应用,经过整理 VG 来处理。cldump 检验: cldump 监测为将目前 HACMP 状态快照,确定显示为 UP,STABLE。host1root/usr/sbin/cluster/utilities/cldump_Cluster Name: test_clusterCluster State: UPCluster Substate: STABLE_Node Name: host1 State: UP Network Name: net_ether_01 State: UP Address: 10.2.100.1 Label: hos

8、t1_l1_svc1 State: UP Address: 10.2.101.1 Label: host1_l1_svc2 State: UP Address: 10.2.1.1 Label: host1_l1_boot1 State: UP Address: 10.2.11.1 Label: host1_l1_boot2 State: UP Network Name: net_ether_02 State: UP Address: 10.2.200.1 Label: host1_l2_svc State: UP Address: 10.2.2.1 Label: host1_l2_boot1

9、State: UP Address: 10.2.12.1 Label: host1_l2_boot2 State: UPNode Name: host2 State: UP Network Name: net_ether_01 State: UP Address: 10.2.100.2 Label: host2_l1_svc1 State: UP Address: 10.2.101.2 Label: host2_l1_svc2 State: UP Address: 10.2.1.2 Label: host2_l1_boot1 State: UP Address: 10.2.11.2 Label

10、: host2_l1_boot2 State: UP Network Name: net_ether_02 State: UP Address: 10.2.200.2 Label: host2_l2_svc State: UP Address: 10.2.2.2 Label: host2_l2_boot1 State: UP Address: 10.2.12.2 Label: host2_l2_boot2 State: UPCluster Name: test_cluster Resource Group Name: host1_RGStartup Policy: Online On Home

11、 Node OnlyFallover Policy: Fallover To Next Priority Node In The ListFallback Policy: Fallback To Higher Priority Node In The ListSite Policy: ignoreNode State - - host1 ONLINE host2 OFFLINE Resource Group Name: host2_RGStartup Policy: Online On Home Node OnlyFallover Policy: Fallover To Next Priori

12、ty Node In The ListFallback Policy: Fallback To Higher Priority Node In The ListSite Policy: ignoreNode State - - host2 ONLINE host1 OFFLINE clstat 检验 clstat 能够实时监控 HACMP 状态,立即确定显示为 UP,STABLEhost1root/usr/sbin/cluster/clstat注:假如没有反应,运行 clinfo/etc/hosts 环境检验 正常情况下,2 台互备 /etc/hosts 应该是一致,当然假如是主备机方法,可能

13、备机会多些 IP 地址和主机名。经过对比 2 个文件不一样,能够确定是否存在问题。host1root/rsh host2:/etc/hosts /tmp/host2_hostshost1root/diff /etc/hosts /tmp/host2_hosts 脚本检验 需要注意以下事项:i. 应用变更需要立即修正脚本,两边脚本需要立即同时,并立即申请时间测试。 ii. 上一点需要维护人员充足和应用人员沟通,运行环境任何变更必需经过维护人员实施。 iii. 维护人员启停应用要养成使用这些脚本启停习惯,尽可能避免手工启停。 iv.host1root/home/scriptsrsh host2 c

14、d /home/scripts;ls -l host1 host2 comm /tmp/host2_scriptshost1root/home/scripts ls -l host1 host2 comm /tmp/host1_scriptshost1root/diff /tmp/host1_scripts /tmp/host2_scripts 用户检验 正常情况下,2 台互备 HA 使用到用户情况应该是一致,当然假如是主备机方法,可能备机会多些用户。经过对比 2 节点不一样,能够确定是否存在问题。host1root/rsh host2 lsuser -f orarun,orarunc,tux

15、run,bsx1, xcom /tmp/host2_usershost1root/ lsuser -f orarun,orarunc,tuxrun,bsx1, xcom /tmp/host1_users /tmp/host1_usershost1root/diff /tmp/host1_user /tmp/host2_user 注:两边肯定有些不一样,如上次登录时间等等,只要关键部分相同就能够了。还有两边 .profile 对比,用户环境对比。host1root/rsh host2 su - orarun -c set /tmp/bhost1root/ su - orarun -c set /

16、tmp/ahost1root/diff /tmp/a /tmp/b tty 心跳检验 因为心跳在 HACMP 开启后一直由 HACMP 在使用,所以需要强制停掉 HACMP 进行检验。 察看 tty 速率 确定速率不超出 9600host1root/stty -a cat /etc/hosts /dev/tty0host1 上显示speed 9600 baud; 0 rows; 0 columns; eucw 1:1:0:0, scrw 1:1:0:0: 检验连接和配置 host1root/host1: cat /etc/hosts/dev/tty0host2root/host2:cat/de

17、v/null 2/dev/null # HACMP for AIX Logfile rotation即实际上天天零点,系统会自动实施 HACMP 检验,假如发觉问题,会在 errpt 看到。除了 HACMP 检验会报错,其它运行过程中也有可能报错,大全部是因为心跳连接问题或负载过高造成 HACMP 进程无法处理,需要引发注意,具体分析处理。变更及实现 因为维护过程出现情况远比集成实施阶段要复杂,即使红皮书也不能覆盖全部情况。这里只就大家常见情况加以说明,对于更为复杂或更为少见情况,还是请大家翻阅红皮书,实在不行计划停机重新配置可能也是一个快速处理问题笨方法。这里变更标准上是不期望停机,但实际上

18、 HACMP 变更,即使说部分支持 DARE(dynamic reconfiguration),绝大部分操作支持 Force stop 完成, 我们还是期望有条件话停机完成。对于 DARE,我不是很赞成使用,因为使用不妥会造成集群不可控,危险性更大。我通常喜爱使用先强制停止 HACMP,再进行以下操作 , 结束同时确定后再 start HACMP。卷组变更 - 增加磁盘到使用 VG 里 : 注意,pvid 一定要先认出来,不然盘会没有或不正常。1. 集群各个节点机器运行 cfgmgr,设置 pvid host1root/cfgmgr host1root/lspv.hdisk2 00c1eedf

19、6ddb9f5e host1vg hdisk3 00c1eedffa577b0e host2vg hdisk4 none none host1root/chdev -l hdisk2 -a pv=yes host1root/lspv.hdisk4 00c1eedffc677bfe none 在 host2 上也要做一样操作。 1. 运行 C-SPOC 增加盘到 host2vg: smitty hacmp-System Management (C-SPOC)- HACMP Logical Volume Management -Shared Volume Groups- Set Character

20、istics of a Shared Volume Group -Add a Volume to a Shared Volume Group 选择节点 VG 和磁盘增加即可 Resouce Group Name host2_RGVOLUME GROUP name hostvgReference node host2VOLUME names hdisk4完成后两边全部可看到hdisk3 00c1eedffa577b0e host2vg hdisk4 00c1eedffc677bfe host2vglv 变更 lv 变更不多,能够变更部分以下: smitty hacmp-System Manage

21、ment (C-SPOC)- HACMP Logical Volume Management -Show Characteristics of a Shared Logical Volume- Shared Logical Volumes -Change a Shared Logical Volume 选择 lv * Resource Group Name host2_RG MAXIMUM NUMBER of PHYSICAL VOLUMES 8 /ora10runcMAXIMUM NUMBER of LOGICAL PARTITIONS 512裸设备增加空间: smitty hacmp-Sy

22、stem Management (C-SPOC)- HACMP Logical Volume Management - Shared Logical Volumes-Set Characteristics of a Shared Logical Volume - Increase the Size of a Shared Logical Volume Entry Fields Resource Group Name rac2_RG LOGICAL VOLUME name XWFTPlv Reference node rac2* Number of ADDITIONAL logical part

23、itions 100 PHYSICAL VOLUME names hdisk3 POSITION on physical volume outer_middle RANGE of physical volumes minimum MAXIMUM NUMBER of PHYSICAL VOLUMES to use for allocation Allocate each logical partition copy superstrict on a SEPARATE physical volume? File containing ALLOCATION MAP 文件系统变更 smitty hac

24、mp-System Management (C-SPOC)- HACMP Logical Volume Management -Shared File Systems-Enhanced Journaled File Systems -Change / Show Characteristics of a Shared Enhanced Journaled File System Resource Group Name bg595b02_RG File system name /cube NEW mount point /cube SIZE of file system 6291456 Mount

25、 GROUP PERMISSIONS read/write Mount OPTIONS Start Disk Accounting? no Block Size (bytes) 4096 Inline Log? no Inline Log size (MBytes) 0服务 IP 地址变更 增加服务 IP 地址 1. 修改 /etc/hosts, 增加以下行 10.66.201.1 host1_l2_svc210.66.201.2 host2_l2_svc2HACMP 新增服务 IPsmitty hacmp- Extended Configuration- HACMP Extended Res

26、ources Configuration - Configure HACMP Service IP Labels/Addresses - Add a Service IP Label/Address- Configurable on Multiple Nodes 选择网络 Add a Service IP Label/Address configurable on Multiple Nodes (extended)Type or select values in entry fields.Press Enter AFTER making all desired changes.* IP Lab

27、el/Address host1_svc2 * Network Name net_ether_01 Alternate HW Address to accompany IP Label/Address 一样增加 host2_svc21. 修正资源组 smitty hacmp-Extended Configuration-Extended Resource Configuration -HACMP Extended Resource Group Configuration -Change/Show Resources and Attributes for a Resource Group -Ch

28、ange/Show All Resources and Attributes for a Resource Group Type or select values in entry fields. Press Enter AFTER making all desired changes. Entry Fields Resource Group Name eai1d0_RG Participating Nodes (Default Node Priority) bgbcb11 bgbcb04 Startup Policy Online On Home Node Only Fallover Pol

29、icy Fallover To Next Priority Node In The List Fallback Policy Fallback To Higher Priority Node In The List Fallback Timer Policy (empty is immediate) Service IP Labels/Addresses host1_svc host1_svc21. HACMP 同时 需要同时,参见第 2 部分“检验和同时 HACMP 配置”一节。1. HACMP 开启 注意修改开启参数使得开启时重新申请资源,触发新增服务 IP 生效。这时 netstat -

30、in,能够看到地址生效了。修改服务 IP 地址 假如要修改应用服务使用 IP 地址,自然是需要停止应用来进行。比如要将原地址 10.2.200.x 改为 10.2.201.x,路由改为 10.2.201.254 步骤以下:1. 正常停止 HACMP smitty clstop -graceful 1. 全部节点修改 /etc/hosts 将服务地址修改为需要地址 10.2.201.1 host1_l2_svc host1 10.2.201.2 host2_l2_svc host2 1. 修改开启脚本路由部分(假如需要) GATEWAY=10.2.201.254 1. 在一个节点修改 HACMP

31、 配置 smitty hacmp-Extended Configuration- HACMP Extended Resources Configuration -Configure HACMP Service IP Labels/Addresses -Change/Show a Service IP Label/Address 选择 host1_l2_svc 不做修改 ,直接回车即可,一样修改 host2 璤 l2_svc。smitty hacmp-Extended Configuration-Extended Resource Configuration -HACMP Extended Re

32、source Group Configuration -Change/Show Resources and Attributes for a Resource Group -Change/Show All Resources and Attributes for a Resource Group 选择 host1_RG 不做修改 ,直接回车即可,一样修改 host2 璤 RG1. 同时 HACMP。 1. 重新开启 HACMP 并确定。 注意修改开启参数使得开启时重新申请资源,触发新服务 IP 地址生效。注意: 假如修改不是应用服务要用地址,或修改期间对该地址服务能够暂停,则能够将步骤 1 改

33、为强制停止,增加第 7 步。整个过程能够不停应用服务。 7. 去除原有服务 IP 地址 netstat -in 找到该服务 IP 地址所在网卡 en2。然后实施:ifconfig en2 alias delete 10.2.200.1 boot 地址变更 1. smitty tcpip 修改网卡地址 2. 修改 /etc/hosts boot 地址 3. 修改 HACMP 配置 smitty hacmp -Extended Configuration- Extended Topology Configuration - Extended Topology Configuration Chang

34、e/Show a Communication Interface Node Name bgbcb04 Network Interface en1 IP Label/Address bgbcb04_boot1 Network Type ether* Network Name net_ether_01 不做修改 ,直接回车即可,一样修改其它 boot 地址。1. 同时 HACMP 2. 重新开启 HACMP 确定 注意:修改开启参数使得开启时重新申请资源,触发新 boot IP 地址生效,不然 clstat 看到 boot 地址将是 down。 用户变更 修改用户口令 因为安全策略原因,系统可能需

35、要更改口令,利用 HACMP 会方便不少,也避免切换过去后因时隔太久,想不起口令需要强制修改烦恼。唯一设计不合理是,必需 root 才能使用这个功效。smitty hacmp -Extended Configuration- Security and Users Configuration - Passwords in an HACMP cluster - Change a Users Password in the Cluster Selection nodes by resource group host2_RG * No selection means all nodes! * User

36、 NAME orarunUser must change password on first login? false 此时需要你输入新口令更改: COMMAND STATUSCommand: running stdout: no stderr: noBefore command completion, additional instructions may appear below.oraruns New password: Enter the new password again:OK 即成功修改用户属性 以下步骤可变更用户属性,值得注意是,即使能够直接修改用户 UID,但实际上和在单独操

37、作系统一样, 不会自动修改该用户原有文件和目录属性,必需事后自己修改 ,所以提议 UID 在计划阶段就早做合理计划。smitty hacmp -Extended Configuration- Security and Users Configuration -Users in an HACMP cluster - Change / Show Characteristics of a User in the Cluster 选择资源组和用户 除开头 1 行,其它使用均等同于独立操作系统。 Change User Attributes on the Cluster Resource group eai1d0_RG* User NAME test User ID 301 ADMINISTRATIVE USER? false.

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服