- 论坛徽章:
- 0
|
Operation example:
[root@mysql agent-itself]# fence_vmware_ng -o off -a 192.168.20.3 -l zhangquan -p vmware -n 'MySQL' -v
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOn:connected
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation off --vmname 'MySQL'
#fence_vmware_ng -o reboot -a 192.168.20.3 -l zhangquan -p vmware -n 'MySQL' -v
ref:
http://sources.redhat.com/cluster/wiki/VMware_FencingConfig
Pre-req
VI Perl API or/and VIX API installed on every node in cluster. This is big difference against older agent, where you don't need install anything, but new agent has little less painful configuration (and many bonuses)
google search keyword: VI Perl API
download addr:
http://www.vmware.com/support/developer/viperltoolkit/
procedure:
1 install VMware-vSphere-SDK-for-Perl
[root@apache ~]# tar -xvf VMware-vSphere-SDK-for-Perl-4.0.0-161974.i386.tar.gz
[root@apache ~]# cd vmware-vsphere-cli-distrib/
[root@apache vmware-vsphere-cli-distrib]# ./vmware-install.pl
2 install fence_vmware_ng
[root@apache ~]# tar -xvf vmware-ng.tar.gz
[root@apache ~]# tree vmware-ng
vmware-ng
|-- agent-itself
| |-- sbin
| | |-- fence_vmware_ng
| | `-- fence_vmware_ng_helper
| `-- usr
| `-- share
| `-- man
| `-- man8
| `-- fence_vmware_ng.8
`-- library-forRHEL52
`-- usr
`-- lib
`-- fence
|-- fencing.py
`-- telnet_ssl
10 directories, 5 files
[root@apache ~]# cp vmware-ng/agent-itself/sbin/ / -rv
`vmware-ng/agent-itself/sbin/fence_vmware_ng' -> `/sbin/fence_vmware_ng'
`vmware-ng/agent-itself/sbin/fence_vmware_ng_helper' -> `/sbin/fence_vmware_ng_helper'
[root@apache ~]# cp vmware-ng/agent-itself/usr/ / -rv
`vmware-ng/agent-itself/usr/share/man/man8/fence_vmware_ng.8' -> `/usr/share/man/man8/fence_vmware_ng.8'
test whether man for fence_vmware_ng.8 was installed
[root@apache ~]# man fence_vmware_ng
[root@apache ~]# cp vmware-ng/library-forRHEL52/usr/ / -rv
cp: overwrite `/usr/lib/fence/fencing.py'? y
`vmware-ng/library-forRHEL52/usr/lib/fence/fencing.py' -> `/usr/lib/fence/fencing.py'
cp: overwrite `/usr/lib/fence/telnet_ssl'? y
`vmware-ng/library-forRHEL52/usr/lib/fence/telnet_ssl' -> `/usr/lib/fence/telnet_ssl'
[root@apache ~]#
TEST procedure on host Apache:
[root@apache ~]# fence_vmware_ng -o reboot -a 192.168.20.3 -l zhangquan -p vmware -n 'MySQL' -v
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOn:connected
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation off --vmname 'MySQL'
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOff:connected
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation on --vmname 'MySQL'
fence_vmware_ng_helper --server '192.168.20.3' --username 'zhangquan' --password 'vmware' --operation status --vmname 'MySQL'
MySQL:[sandisk-700GB-IX1000] MySQL/MySQL.vmx:poweredOn:connected
Success: Rebooted
[root@apache ~]#
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/106124/showart_2117295.html |
|