[DRBD-user] DRBD + Heartbeat - Doubt after fail !

Lars Ellenberg Lars.Ellenberg at linbit.com
Tue Aug 31 19:24:36 CEST 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


/ 2004-08-31 13:07:56 -0400
\ contact at gcm-solutions.com:
> Quoting Lars Ellenberg <Lars.Ellenberg at linbit.com>:
> 
> > / 2004-08-31 12:00:04 -0400
> > \ contact at gcm-solutions.com:
> > > Hello friends .
> > >
> > > I fot my HA cluster setuped and now im starting test this out.
> > >
> > > My haresources files looks like that :
> > >
> > > ha01 192.168.1.100 drbddisk Filesystem::/dev/drbd1::/www::/ext3 apache
> >
> > does this help?
> > ha01 192.168.1.100 drbddisk::all Filesystem::/dev/drbd1::/www::/ext3 apache
> >                              ^^^
> > (or the exact resource name. maybe r0 or whatever you called it)
> >
> > and, YOU NEED TO START DRBD!
> > i.e. "/etc/init.d/drbd start" should appear somewhere in your init
> > process and must be called before hartbeat is started.
> > (chkconfig drbd, and add it to the appropriate runlevels...)
> > this loads and configures the drbd driver.
> > if you don't load and configure the "drbd driver",
> > you obviously can not use it from heartbeat/drbddisk.
> >
> >
> > 	Lars Ellenberg
> >
> > --
> 
> Hello Lars.
> 
> I think i was not clear with my question !
> 
> DRBD is already on my init process ! It loads before heartbeat !  The
> 2 nodes are ok with DRBD when i turn then on !! They syncronize ok !
> no problem with the init of them !
> My problem was ...on one of my tests ... I type reboot on server 1
> primary !  Then ... server 2 get the proccess ... and become the
> primary on DRBD !  But ... they become STANDALONE in the DRBD status
> (cat /proc/drbd). Its ok because Server 1 is down !
> So ... when i reboot Server 1 ... it loads the drbd on init again but dont join
> this DRBD array that is PRIMARY on Server 2 !
> 
> So then ... Server 2 stays as :
> Standalone Prymary / Unknow
>
> and Server 1 stays :
> WFconnection Secondary / Unknow
> 
> From what i think ... Server 1 should back on the DRBD cluster as
> Secondary as soon as it init again, right ?
> but Server 2 stay as Standalone and dont let Server 1 back on the
> array after the reboot.
> 
> What can i do ? Is there anything ?

have a look into syslog and heartbeat log files,
and find the reason *why* it goes standalone;
it will tell you.

my first guess is, that on reboot, you first stop the network, and then
stop heartbeat and/or drbd. this is *wrong*.

on reboot:
 * first stop heartbeat (which will release the drbd resource).
   (drbd should now be "Secondary/Primary" on the rebooting node.)
 * then stop drbd (which will unconfigure the drbd device).
   (drbd should now be "Unconfigured" on the rebooting node.)
 * only _then_ stop the network (since you no longer need it).

otherwise, drbd generation counts will look as if there had been a
split-brain situation (actually, there *has* been a split-brain
situation as far as drbd is concerned).
and drbd then refuses to connect, since it cannot automagically resolve
this conflict.

so get the order of actions on reboot right, and be happy.

	Lars Ellenberg



More information about the drbd-user mailing list