mc常用操作命令及参数
具体内容:
1、手动启动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)
2、单点启动后,加入另一个节点:
Start SG daemon on node(s) and join a cluster
# cmrunnode [-v] [NN...]
[-v] Verbose output
3、实现节点切换
切换分两种:本地切换 ( Local Switch ) 和 切换 ( Switch )
当主节点出现网卡故障(MAC address or Hardware State Down)时,首先会进行
本地切换,备份网卡开始工作;如果此时备份网卡也有故障,则系统会进行切换,
备份节点接管工作。
4、监测 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.
5、停止 Cluster 运行
halt SG cluster daemons
# cmhaltcl [-f] [-v]
[-f] Force the cluster to shutdown even if packages are currently
running.
[-v] Verbose output
6、停止运行某个节点而 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
7、在 Running Cluster 中运行某一个包
run a SG package
# cmrunpkg [-n NN] [-v] PN...
[-n ] Act on a specific node.
[-v] Verbose output
8、停止一个运行中的包
halt a SG package
# cmhaltpkg [-n NN] [-v] PN...
[-n ] Act on a specific node.
[-v] Verbose output
9、改变一个包的切换属性
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