Failover-HA-Setup

Ulrich Spoerlein uspoerlein at gmail.com
Fri Jan 19 22:25:19 UTC 2007


Richard wrote:
> > There is no need to make any changes to the script. Put whatever other
> >  options you want for mysql in rc.conf, and set the _enable variable
> > to no. Then you can run /usr/local/etc/rc.d/mysql-server onestart and
> > it will start normally just one time.
> 
> Yes, and mysql will be started at bootup time on both nodes, wouldn't
> it? So one node would fail miserably since the lack of mounted
> diskspace...

No, he wrote to set mysql_enable=NO, ie, the usual startup procedure
will NOT start it.

This doesn't work with heartbeat, however. heartbeat always calls the
resource scripts with either 'start' or 'stop', you can't make it pass
'onestart'.

Only two options remain: modify existing mysql-server script (bad idea,
will be overwritten on update) or go through a proxy script which
"transforms" start|stop -> onestart|onestop

You could also alter the environment of heartbeat (it's really just a
bunch of poorly written shell scripts) and set mysql_enable=YES there,
but that'd be just as fragile as rewriting the existing mysql-server
script.

> But the "nostart"-solution sounds like working...

Till you update the port and forget about your local modification ...

Ulrich Spoerlein
-- 
A: Yes.
>Q: Are you sure?
> >A: Because it reverses the logical flow of conversation.
> >>Q: Why is top posting frowned upon?


More information about the freebsd-stable mailing list