Hi Peter, Yes, the timeouts are generalised for very large systems under heavy load, you can safely shorten them as you see fit.
My MySQL configuration is:
primitive mysqld_mysql0 ocf:heartbeat:mysql \
params binary="/usr/bin/mysqld_safe" config="/mnt/data/mysql/my.cnf"
datadir="/mnt/data/mysql" user="mysql" group="mysql" log="/var/log/mysqld.log"
pid="/var/run/mysql/mysql.pid" socket="/var/lib/mysql/mysql.sock"
test_user="heartbeat" \
op start interval="0" timeout="120" \
op stop interval="0" timeout="120" \
op monitor interval="10" timeout="30" depth="0"
this is RHEL 5.5 based for HA only - similar to yours but without the STONITH
requirement as my system is on DRBD (also controlled by the cluster but not
shown).
I have deliberately moved the MySQL location (to /mnt/data/mysql) and
configuration (to /mnt/data/mysql/my.cnf) so as to be nowhere near
the usual /etc/my.cnf and /var/lib/mysql. This prevents administrators doing
silly things like starting mysql on the slave.
Depending upon how far you get I would end up letting the cluster control the
mounting of the NFS directories as well. That way
an NFS failure will trigger an automatic switch to the other node - but that
would need testing.
Best Regards,
Brett
-----Original Message-----
From: Peter Sylvester [mailto:[email protected]]
Sent: Fri 13/08/2010 16:23
To: General Linux-HA mailing list
Subject: Re: [Linux-HA] Starting over with Pacemaker / hoping to make somedocs
I have successfully gotten the ocf:heartbeat:mysql resource to work. Though
please see the text below. I am getting a couple of warnings, but I'm not
seeing any params that I can use to change these settings so that the time
outs are larger than what is advised.
Any tips?
crm(live)configure# primitive mysql ocf:heartbeat:mysql op monitor
interval=3s
WARNING: mysql: default timeout 20s for start is smaller than the advised
120
WARNING: mysql: default timeout 20s for monitor_0 is smaller than the
advised 30
WARNING: mysql: default timeout 20s for stop is smaller than the advised 120
crm(live)configure#
- Peter
On Fri, Aug 13, 2010 at 10:10 AM, Peter Sylvester <
[email protected]> wrote:
> I have tried using ocf:heartbeat:mysql and have not had much success with
> it, though I might try this again this morning since MySQL has changed since
> the last time I attempted using it. Any tips for getting this up and
> running would be greatly appreciated.
>
> In the production env the two systems will be accessing their data
> via NFS. There is a single NFS file server that the systems will connect to
> and locally it will appear as /var/lib/mysql. I know that this is not the
> most preferable situation per what I have read about this, but it's not
> something I have flexibility on and it's why STONITH is so crucial in this
> env.
>
> - Peter
>
> On Fri, Aug 13, 2010 at 3:47 AM, Brett Delle Grazie <
> [email protected]> wrote:
>
>> On Thu, 2010-08-12 at 17:30 -0400, Peter Sylvester wrote:
>> > I believe I figued out what the problem was. When I unisntalled the
>> version
>> > of mysql that I got from yum and installed the enterprise verion (one of
>> the
>> > differences being that one uses /etc/init.d/mysqld and the other uses
>> > /etc/init.d/mysql) and it suddenly works, which leads me to believe that
>> the
>> > mysqld init script is not LSB compliant where the mysql one is.
>> >
>>
>> Try using the ocf:heartbeat:mysql resource agent instead and not relying
>> upon the LSB agent. That way a small query can be executed as part of
>> your monitor operation and you no longer have to worry about LSB
>> compliance.
>>
>> Secondly are you using MySQL replication or file system level copying
>> using DRBD or SAN?
>>
>> > The next thing to figure out is stonith, but I have to wait until I have
>> the
>> > resources available to get started with that. Thank you all for your
>> > support thus far!
>> >
>> > On Thu, Aug 12, 2010 at 4:35 PM, Peter Sylvester <
>> > [email protected]> wrote:
>> >
>> > > Ok, so I've got pacemaker and heartbeat going, I have mysql
>> installerd,
>> > > pacemaker is set to have a VIP and mysql. I can fail back and forth
>> between
>> > > the two servers with no problems. The two resources are configured to
>> work
>> > > together to make sure they don't end up on seperate boxes. In short,
>> a lot
>> > > of improvement has been made today and it looks like I might actually
>> meet
>> > > my deadline for tomorrow EOB :)
>> > >
>> > > However there is still one problems. If I stop mysql via
>> > > /etc/init.d/mysqld stop, crm notices it takes down the VIP, but
>> doesn't
>> > > attempt to start it on the node that it was on or on the other node.
>> So if
>> > > /etc/init.d/mysqld stop is executed, the whole thing goes down until
>> you
>> > > restart heartbeat on both servers.
>> > >
>> > > Below is my config file. Any suggestions?
>> > >
>> > > [r...@cluster1 ~]# crm configure show
>> > > node $id="2af8b641-c9c1-46a7-97ee-a3aeaa8a62f6" cluster1.localdomain
>> > > node $id="70fb0ef4-41b3-429d-85c5-d95c93ebc721" cluster2.localdomain
>> > > primitive ClusterIP ocf:heartbeat:IPaddr2 \
>> > > params ip="192.168.1.206" cidr_netmask="255.255.255.0"
>> nic="eth0" \
>> > > op monitor interval="3s"
>> > > primitive mysqld lsb:mysqld \
>> > > op monitor interval="10s" \
>> > > meta target-role="Started"
>> > > colocation mysqlandip inf: ClusterIP mysqld
>> > >
>> > > property $id="cib-bootstrap-options" \
>> > > dc-version="1.0.9-89bd754939df5150de7cd76835f98fe90851b677" \
>> > > cluster-infrastructure="Heartbeat" \
>> > > stonith-enabled="false"
>> > > rsc_defaults $id="rsc-options" \
>> > > resource-stickiness="100"
>> > >
>> > > - Peter
>> > >
>> > >
>> > >
>> > > On Thu, Aug 12, 2010 at 4:09 PM, Dejan Muhamedagic <
>> [email protected]>wrote:
>> > >
>> > >> Hi,
>> > >>
>> > >> On Thu, Aug 12, 2010 at 03:18:51PM -0400, Peter Sylvester wrote:
>> > >> > I had checked that pdf before but didn't think to check it again
>> now
>> > >> that
>> > >> > CRM is actually working. This helped me get a VIP up and running
>> > >> between my
>> > >> > 2 nodes. Now I need to get MySQL going. One would presume by
>> looking
>> > >> at
>> > >> > this command to add httpd as a resource...
>> > >> >
>> > >> > crm configure primitive WebSite ocf:heartbeat:apache params
>> > >> configfile=/etc/
>> > >> > httpd/conf/httpd.conf op monitor interval=1min
>> > >> >
>> > >> > ... that you could use something similar to this to add MySQL as
>> > >> > ocf/heartbeat has an option for mysql. I figure once I know what
>> > >> specific
>> > >> > parameters that option looks for, I should be able to get it in
>> there
>> > >> will
>> > >> > little difficulty, still trying to figure out how to find out what
>> > >> > parameters it's looking for.
>> > >>
>> > >> Try:
>> > >>
>> > >> crm ra info mysql
>> > >>
>> > >> Thanks,
>> > >>
>> > >> Dejan
>> > >>
>> > >> > - Peter
>> > >> >
>> > >> > On Thu, Aug 12, 2010 at 1:44 PM, Tony Hunter <[email protected]>
>> wrote:
>> > >> >
>> > >> > > On Thu, Aug 12, 2010 at 01:19:23PM -0400, Peter Sylvester wrote:
>> > >> > > > All,
>> > >> > > >
>> > >> > > > I've had a litel success this morning. I have 2 servers that
>> are
>> > >> now
>> > >> > > > recognized as nodes by crm_mon, which is the furthest I've
>> gotten in
>> > >> > > several
>> > >> > > > days. My next task is to get them to use a VIP, and to get
>> them to
>> > >> > > monitor
>> > >> > > > eachother and MySQL.
>> > >> > > >
>> > >> > > > I'm currently reading through the pacemaker explained docs seen
>> > >> here...
>> > >> > > >
>> > >> > > > *
>> > >> > > >
>> > >> > >
>> > >>
>> http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/index.html
>> > >> > > > *<
>> > >> > >
>> > >>
>> http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-node-attributes.html
>> > >> > > >
>> > >> > > >
>> > >> > > > But does anyone know of any other docs that explain how to get
>> these
>> > >> two
>> > >> > > > things configured? I would assume that this would be fairly
>> easy,
>> > >> but at
>> > >> > > > this point I REALLY don't wanna screw up now that I'm this far.
>> > >> > >
>> > >> > > Have you seen this?
>> > >> > >
>> > >> > >
>> > >>
>> http://www.clusterlabs.org/doc/en-US/Pacemaker/1.1/pdf/Clusters_from_Scratch/Clusters_from_Scratch.pdf
>> > >> > >
>> > >> > > > - Peter
>> > >> > > >
>> > >> > > > On Thu, Aug 12, 2010 at 1:02 PM, Dejan Muhamedagic <
>> > >> [email protected]
>> > >> > > >wrote:
>> > >> > > >
>> > >> > > > > Hi,
>> > >> > > > >
>> > >> > > > > On Thu, Aug 12, 2010 at 10:38:40AM -0400, Peter Sylvester
>> wrote:
>> > >> > > > > > Hey there guys. Today I'm going to start over with a
>> couple of
>> > >> fresh
>> > >> > > VMs
>> > >> > > > > > and try to get pacemaker going with heartbeat. I haven
>> until
>> > >> the end
>> > >> > > of
>> > >> > > > > the
>> > >> > > > > > day tomorrow to get this up and running before my client
>> says
>> > >> we'll
>> > >> > > just
>> > >> > > > > go
>> > >> > > > > > back to using heartbeat. As a note I should state that I
>> am a
>> > >> MySQL
>> > >> > > DBA
>> > >> > > > > so
>> > >> > > > > > I do have some familiarity with Linux but I would not
>> consider
>> > >> myself
>> > >> > > to
>> > >> > > > > be
>> > >> > > > > > an uber linux admin. It's my hope that, if I am able to
>> get ths
>> > >> up
>> > >> > > and
>> > >> > > > > > running, I can make some documetation regarding getting
>> this
>> > >> setup
>> > >> > > and
>> > >> > > > > > perhaps it can be submitted to the linux-HA wiki. As the
>> > >> biggest
>> > >> > > > > complaint
>> > >> > > > > > appears to be the lack of clear documentation for
>> > >> implementation, so
>> > >> > > > > let's
>> > >> > > > > > try and fix that problem.
>> > >> > > > > >
>> > >> > > > > > The VMs that I'll be creating today will be Cent OS 5, they
>> will
>> > >> each
>> > >> > > be
>> > >> > > > > > running MySQL, they will act as an active/passive cluster,
>> and
>> > >> will
>> > >> > > have
>> > >> > > > > one
>> > >> > > > > > VIP that will fail over between the two servers.
>> > >> > > > > >
>> > >> > > > > > Last time I tried to get this up and running it was
>> suggested
>> > >> that I
>> > >> > > was
>> > >> > > > > > using versions of pacemaker and heartbeat that were
>> incompatible
>> > >> with
>> > >> > > one
>> > >> > > > > > another. So I checked this site....
>> > >> > > > > >
>> > >> > > > > > http://www.clusterlabs.org/wiki/Install
>> > >> > > > > >
>> > >> > > > > > I am going to attempt to get heartbeat 3.0.3 installed on
>> the
>> > >> systems
>> > >> > > and
>> > >> > > > > > then install pacemaker. So here's the current plan.
>> > >> > > > > >
>> > >> > > > > > 1) Install OS (during installation no additional packages
>> will
>> > >> be
>> > >> > > > > installed)
>> > >> > > > > > 2) Get ssh keys setup
>> > >> > > > > > 3) Install MySQL
>> > >> > > > > > -snapshot vms-
>> > >> > > > > > 4) Install heartbeat 3.0.3
>> > >> > > > > > 5) Install pacemaker
>> > >> > > > >
>> > >> > > > > Use pacemaker 1.0.9.1 and cluster-glue 1.0.6.
>> > >> > > > >
>> > >> > > > > > 6) See if I can get into the crm prompt and actually
>> execute
>> > >> > > commands.
>> > >> > > > > This
>> > >> > > > > > is something that I have not been able to accomplish
>> before, so
>> > >> my
>> > >> > > hopes
>> > >> > > > > is
>> > >> > > > > > to at least get this far.
>> > >> > > > >
>> > >> > > > > Good luck.
>> > >> > > > >
>> > >> > > > > Thanks,
>> > >> > > > >
>> > >> > > > > Dejan
>> > >> > > > >
>> > >> > > > > >
>> > >> > > > > > - Peter
>> > >> > > > > > _______________________________________________
>> > >> > > > > > Linux-HA mailing list
>> > >> > > > > > [email protected]
>> > >> > > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> > >> > > > > > See also: http://linux-ha.org/ReportingProblems
>> > >> > > > > _______________________________________________
>> > >> > > > > Linux-HA mailing list
>> > >> > > > > [email protected]
>> > >> > > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> > >> > > > > See also: http://linux-ha.org/ReportingProblems
>> > >> > > > >
>> > >> > > > _______________________________________________
>> > >> > > > Linux-HA mailing list
>> > >> > > > [email protected]
>> > >> > > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> > >> > > > See also: http://linux-ha.org/ReportingProblems
>> > >> > >
>> > >> > > --
>> > >> > > regards,
>> > >> > > -tony
>> > >> > > _______________________________________________
>> > >> > > Linux-HA mailing list
>> > >> > > [email protected]
>> > >> > > http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> > >> > > See also: http://linux-ha.org/ReportingProblems
>> > >> > >
>> > >> > _______________________________________________
>> > >> > Linux-HA mailing list
>> > >> > [email protected]
>> > >> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> > >> > See also: http://linux-ha.org/ReportingProblems
>> > >> _______________________________________________
>> > >> Linux-HA mailing list
>> > >> [email protected]
>> > >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> > >> See also: http://linux-ha.org/ReportingProblems
>> > >>
>> > >
>> > >
>> >
>>
>> --
>> Best Regards,
>>
>> Brett Delle Grazie
>>
>> ______________________________________________________________________
>> This email has been scanned by the MessageLabs Email Security System.
>> For more information please visit http://www.messagelabs.com/email
>> ______________________________________________________________________
>> _______________________________________________
>> Linux-HA mailing list
>> [email protected]
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
>
>
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________<<winmail.dat>>
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
