[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    [Linux-ha-dev] Configuring STONITH in heartbeat:  Was Re: stonith...
From:       Alan Robertson <alanr () unix ! sh>
Date:       2002-08-15 16:43:53
[Download RAW message or body]

Bill Dossett wrote:
> Hi,
> 
> I'm running a heartbeat cluster for a high availablity
> file server, so far, it's going great, but I haven't
> configured STONITH yet and from what I read I think
> I guess I should... however while the docs for getting
> heartbeat up and running and there are lots of examples
> and docs, I haven't found much on STONITH yet ...
> at least that I understand..   I am running on a Dell
> poweredge/powervault cluster with RH 7.3 ...
> There are some lines in the ha.cf, but so far I don't
> quite understand them...  my understanding is that
> STONITH can guarantee that both nodes
> won't mount the shared RAID at the same time...
> Sorry if I have missed a vital document or example,
> but I have looked and so far i'm stonewalled by STONITH
> :-)  any pointers to examples or whatever would be appreciated.

Hi Bill,

You *do* want some kind of a STONITH device for a shared RAID file server.

The documentation on STONITH could be better.  We probably ought to have a 
whole section on configuring STONITH devices in the documents telling all 
the details for each type of STONITH device, but we don't.  The help message 
  for the stonith command ought to be more helpful, but it isn't.  Sorry :-(


There's somewhat of a reason for this, but that doesn't help you any.

There is a man page for the stonith command, but that's not helpful in an 
obvious way.

First let me start by explaining a little about STONITH...

STONITH uses a plugin system which allows it to support many kinds of reset 
devices.  Each of these reset devices needs to be configured differently. 
Each of these are done by different plugins was written by different people, 
and they don't configure in a completely consistent manner.  This means it's 
not easy to describe how to configure a STONITH device (because there are so 
many options).

Now, about how you configure STONITH in heartbeat.

There are two ways:
You can use a separate file, or you can configure it inline in heartbeat.

To use a separate file, you use the stonith directive:
	stonith device-type configuration-file-name

To configure it inline in the heartbeat config file you can say:
	stonith_host hostname-or-* device-type stonith-parameters

This is the easy part...

How do you know which way you want to configure it?

It's really up to you.  The advantage to the stonith_host option is that you 
don't have to have a separate file to maintain (possibly different on each 
machine).  The disadvantage is that sometimes the configuration information 
is security sensitive and you might forget to (or not want to) make the 
/etc/ha.d/ha.cf file read-only.

You can have several stonith_host directives in the ha.cf file, but you can 
only have one stonith option in the config file.  If you put several 
stonith_host options in the config file, each should have a different host 
listed.

How do you know what to put for device type?

You put the type that corresponds to what kind of STONITH device you've 
selected.

But how do you know what types are available,and how they're spelled? 
According to the man page for the standalone stonith command, you do this:

	/usr/sbin/stonith -L

In my CVS tree, this gives this result:
	apcmastersnmp
	wti_nps
	nw_rpc100s
	meatware
	apcsmart
	ssh
	rps10
	null
	apcmaster
	baytech

Two of these aren't real STONITH devices (null and ssh), you can ignore them.

If you don't know what the rest of these devices are, then you read the 
sources in the stonith directory by the same names, and you figure out which 
device you really have.  This is also of some help if you want to figure out 
which device you want to purchase.

Now, you know what device you have (or are going to buy)...

So, how do you configure them?

If you're going to use the "stonith" directive, you need to create a 
configuration file with the right information in it.  You can use this 
command to find out how to configure that file...

	/usr/sbin/stonith -t your-device-type -F /dev/null \
		 foobar

It will then spit out something like this:
	
	stonith: Invalid config file for baytech device.
	stonith: Config file syntax: IP-address login password
	The IP-address and login are white-space delimited.  All three items 	must be 
on one line.  Blank lines and lines beginning with # are
	ignored

This is a help message for what to put in your configuration file.

If you want to see how to configure the stonith_host parameters, you need to 
use this command line instead:

	/usr/sbin/stonith -t your-device-type -p"XXX" foobar

It will then issue a message something like this:
	stonith: Invalid config info for baytech device
	stonith: Config info syntax: IP-address login password
	The IP-address and login are white-space delimited.

And this is a help message for what to put on your stonith_host line after 
the device type.

So, this is how you figure this out.

Sorry it's so hard :-(.

If someone wants to provide a patch to dump out all the config information 
from all the device types in the usage message for the stonith command, that 
would be a great idea!  Then it would just be a matter of running
	stonith -?

and you would get all the details for every supported device type.  This 
patch wouldn't be that hard to write.  It'd be a great way to get your feet 
wet if someone reading this email wants to help out ;-)

	-- Alan Robertson
	   alanr@unix.sh

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic