您所在的位置: 首页>>读书频道>>操作系统>>Linux>>

9.2.5 Stonith Meatware“设备”

http://book.51cto.com  2008-07-20 15:17  黄永兵译  51CTO.com  我要评论(0)
  • 摘要:《Linux企业集群》一书讲解如何在一个计算机网络中用有限的资源部署计算机,以及安装自由软件让计算机象一台服务器那样一起运行。其中第九章描述Stonith和Ipfail,本文说的是Stonith Meatware“设备”。
  • 标签:Heartbeat  服务器  Stonith  Meatware  设备  ip地址  Linux  Linux企业集群

9.2.5 Stonith Meatware“设备”

在购买一个支持的Stonith设备前,你可以使用一个meatware“设备”和Stonith一起做实验,meatware设备对人类来说是一个异想天开的参考。当你使用meatware设备时,Heartbeat只不过增加了一条操作警告(代替使用软件命令复位通过串口或网线连接的硬件设备的电源),按照第7章中的实验下载并安装Heartbeat和Stonith RPM包,使用下面的命令为一个并不存在的主机chilly创建一个meatware设备:

#/usr/sbin/STONITH -t meatware -p "" chilly

这个命令告诉Stonith为主机chilly无参数(-p “”)创建一个meatware设备。

正常情况下,Stonith程序作为一个守护进程运行在后台,但我们出于测试的目的将其运行在前台,再次登陆到同一台机器(如果你在控制台,可以直接按CTRL+ALT+F2),使用下面的命令查看日志消息:

#tail /var/log/messages
STONITH: OPERATOR INTERVENTION REQUIRED to reset test.
STONITH: Run "meatclient -c test" AFTER power-cycling the machine

Stonith已经在/tmp目录创建了一个专门的文件,你可以使用下面的命令检验它:

#file /tmp/.meatware.chilly
/tmp/.meatware.chilly: fifo (named pipe)

因为我们不是真正有一台机器叫做chilly,我们仅仅假设Heartbeat程序告诉我们复位主机chilly的电源时我们执行了它的命令,如果这是一台真实的服务器,我应该走过去按一下电源开关将其关闭,然后回来,在按开关之前输入下面的命令清除Stonith事件:

#meatclient -c chilly

meatclient程序应该回答:

WARNING!
If server "chilly" has not been manually power-cycled or disconnected from all
shared resources and networks, data on shared disks may become corrupted and
migrated services might not work as expected.
Please verify that the name or address above corresponds to the server you
just rebooted.
PROCEED? [yN]

输入y后你应该看到:

Meatware_client: reset confirmed.

Stonith也应该报告在/var/log/messages文件中:

STONITH: server chilly Meatware-reset.
【责任编辑:董书 TEL:(010)68476606】

回书目   上一节   下一节
华硕IDC绿色节能服务器推荐
Windows Home Server 家用服务器专题
Linux——从菜鸟到高手
服务器维护与应用基础
服务器基础知识入门
 
 验证码: (点击刷新验证码)   匿名发表
  • Visual C++ 完全自学宝典

  • 作者:强锋科技,朱洪波
  • Visual C++ 6.0是微软公司为程序人员提供的Visual Studio 6.0工具套件中的重要组成部分。本书由浅入深地介绍使用Visual C++ 6.0..
Copyright©2005-2008 51CTO.COM 版权所有