HP-UX平台cluster CM命令介绍
2012-12-21 10:48
591 查看
MC / ServiceGuard ( Multi-Computer / ServiceGuard ) 是HP 推出专门用来保护关键业务应用免遭软、硬件故障影响的特殊软件。
使用MC/ServiceGuard,多个节点(系统)被组织成一个企业群集,为本地网(LAN) 上的客户机提供高可用性的服务。MC/ServiceGuard监视程序监视每一个节点状态,并且对出现的故障很快做出反应,使应用程序的停顿成为最小。MC系统切换发生在两种情况下:一种情况是由于系统的硬件出现故障或者应用程序故障,此时的切换是自动进行的;另一种情况是根据实际操作环境需要进行人为地切换。有两种办法来实现后一种切换。
方法1 使用cmhaltnode 命令来停止运行有程序包的节点。
# cmhaltnode -f nodename
这样,在停止该节点的同时,应用程序包会自动迁移到另外一个节点上。
方法2 使用cmhaltpkg 来起停应用程序包
1.用cmhaltpkg 命令来停止需要迁移的程序包
# cmhaltpkg pkgname
2.用cmrunpkg 来重新在别的节点上运行程序包
# cmrunpkg -n nodename pkgname
3.用cmmodpkg 修改切换属性
# cmmodpkg -e pkgname
一般来说,建议采用方法2
下面介绍几个系统管理员用得上的、有关MC的命令:
一、手动启动MC/SG
Start SG daemons and form a new cluster
#cmruncl [-f] [-v] [-n NN...]
[-f] Force cluster startup without warning message
[-v] Verbose output
[-n ] specific name(s) of node(s) to
二、单点启动后,加入另一个节点:
Start SG daemon on node(s) and join a cluster
# cmrunnode [-v] [NN...]
[-v] Verbose output
三、实现节点切换
切换分两种:本地切换( Local Switch ) 和切换( Switch )
当主节点出现网卡故障(MAC address or Hardware State Down)时,首先会进行本地切换,备份网卡开始工作;如果此时备份网卡也有故障,则系统会进行切换,备份节点接管工作。
可以手工模拟这些故障进行故障诊断或检测。
四、监测Cluster 运行状态
view information about the current SG cluster
# cmviewcl [-v] [-n NN]... [-p PN]... [-l {package|cluster|node}]
[-v] Verbose output
[-n ] View information only about the specific node_name(s).
[-p package_name... View information only about the specific
package_name(s).
[-l] pkg|clus|node Display only package, cluster or node specific
information.
五、停止Cluster 运行
halt SG cluster daemons
# cmhaltcl [-f] [-v]
[-f] Force the cluster to shutdown even if packages are currently running.
[-v] Verbose output
六、停止运行某个节点而Cluster 在其它节点继续运行
halt SG daemon on node(s) and leave the cluster
# cmhaltnode [-f] [-v] [NN...]
[-f] Force the node to halt even if there are packages running on it.
[-v] Verbose output
七、在Running Cluster 中运行某一个包
run a SG package
# cmrunpkg [-n NN] [-v] PN...
[-n ] Act on a specific node.
[-v] Verbose output
八、停止一个运行中的包
halt a SG package
# cmhaltpkg [-n NN] [-v] PN...
[-n ] Act on a specific node.
[-v] Verbose output
九、改变一个包的切换属性
enable or disable switching attributes for a SG package
# cmmodpkg [-v] [-n NN]... {-e|-d} PN...
[-v] Verbose output
[-n ] Modify attributes on specific node(s) - else globally mod.
-e enable
-d disable
PN - package(s) whose switching attributes are changed
注:CN = cluster_name NN = node_name PN = package_name
Explainations: ... = multiple occurences | = OR [descrīptor] = optional
相关文章推荐
- AIX、HP-UX、Linux、Solaris 常用命令及配置文件对照表
- HP-UX一些文件系统查询命令
- HP-UX命令大全
- 在hp-ux 安腾平台下,使用12.1.0.2的ASM Flex Architecture 时asmcmd命令会失败
- 关于HP-UX中出现无法使用历史命令的问题的解决方案
- 编译小结(1) GCC多平台安装(Linux,Aix,HP-UX,Solaris)及编译参数
- HP-UX命令学习2
- 查看HP-UX内核参数命令
- HP-UX常用命令
- 总结HP-UX常用命令
- HP-UX 安全相关命令
- HP-UX管理员常用命令
- HP-UX命令学习1
- HP-UX基础命令1
- 第一次使用HP-UX时用到的命令
- HP-UX常用命令
- AIX,HP-UX,LINUX,SOLARIS磁盘与卷管理常用命令精选
- HP-UX 常用命令
- HP-UX 常用命令
- HP-UX命令大全