hb_takeover.in
来自「在LINUX下实现HA的源代码」· IN 代码 · 共 54 行
IN
54 行
#!/bin/bash # This script sets the node (where it was called) to *active*# It forces the other node to release all the held resources and lets# this node do a takeover.# This script will only work for a two machine setup...# More than that and you need to vote, or something...HA_DIR=@sysconfdir@/ha.d. ${HA_DIR}/shellfuncsusage() { echo "usage:" echo "$0 [all|foreign|local|failback]" >&2 exit 1}if [ $# -ge 2 ]then echo "$0: too many arguments" usage exit 1fiif [ $# -ge 1 ]then resources=$1else resources=allfiif [ $resources = "--help" ]; then usagefiif [ $resources != "all" ] && [ $resources != "foreign" ] && [ $resources != "local" ] && [ $resources != "failback" ]; then echo "$0: wrong resources ($resources)." usage exit 1fiha_clustermsg <<-!MSG t=hb_takeover rsc_hold=$resources!MSG
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?