[Linux-HA] Sequence of service & resource transfer

Alan Robertson alanr at unix.sh
Fri Sep 1 10:36:59 MDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lewis Shobbrook wrote:
> Hi All,
> 
> I have a question concerning the transfer of services & resources.
> When I perform a heartbeat service restart, I note that the order that the 
> services & resources are listed in the hareresources file, translates to the 
> order that they stop and are restarted on the takeover node.  
> The problem is that I'd like to use squid and mysql on a drbd volume and use 
> drbdlinks to update the relevant db & cache directories.  The issue for me is 
> that the order in which the services stop need to be different from the order 
> they start during a resource takeover.
> I understand that in the event or genuine failure that corruptions may ocurr 
> on the primary node and prevent the services restarting successfully on the 
> takeover node; the services are not mission critical I'm sure I can cope with 
> it if it occurs.
> 
> E.g. I 'd  like mysql and squid to terminate before drbdlinks attempts to 
> modify the directory structure in the node allowing the resource takeover, 
> but I'd like drbdlinks to modify the directory structure before the mysql & 
> squid services start in the node assuming the resources.
> 
> Can anyone direct me as to how I might best achieve this, or if it is 
> currently possible?

I do this exact thing all the time on my machines.  So, I'm not sure I
understand what the problem is...

Here's a proposed ordering (like what I do)
	drbd
	drbdlinks
	squid and/or mysql

Then whenever services start it does the following things in this order:
	start drbd
	start drbdlinks
	start squid and/or mysql

Whenever services stop, it does the following things in this order:

	stop squid and/or mysql
	stop drbdlinks
	stop drbd

Whenever it migrates a resource it does this in this order:
	On the original machine:
	stop squid and/or mysql
	stop drbdlinks
	stop drbd
	On the new machine:
	start drbd
	start drbdlinks
	start squid and/or mysql

The only way this could cause problems would be for squid or mysql not
not actually be stopped when the init script returns from its stop
action.  If this happens, this is a bug in the init script.

- --
    Alan Robertson <alanr at unix.sh>

"Openness is the foundation and preservative of friendship...  Let me
claim from you at all times your undisguised opinions." - William
Wilberforce
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFE+GGrNkLhYXF6ZA4RAmbrAJ9ZD+LvW+Ac/2gIEABKNAvkgGQhgwCfdzrq
kslluibGjSNUy5aaLb3CpGk=
=ZyqR
-----END PGP SIGNATURE-----


More information about the Linux-HA mailing list