Mailing List Archive

Configuration issue with DRBD + datadisk (II)
Hi again !

I have been thinking about the resyncronization of both servers after
failuers in the following scenario:

Initial stage (both serves are started at once):

pollux : primary /dev/nb0 = /home
castor: secondary /dev/nb0 not mounted

Second stage (pollux server is powered down):

pollux : powered down
castor : primary /dev/nb0 = /home

Third stage (pollux server is powered up):

pollux : primary /dev/nb0 = /home (but the contents are the existing at
initial stage, not the modified at second stage)
castor: secondary /dev/nb0 not mounted

I think that a good approach for solving this situation is detecting if
there are any primary node at pollux startup, and, if a primary node
exists, syncronize the contents before becoming primary node. I don't know
if heartbeat will accept this (I suppose heartbeat will set the other
machine as secondary), so I suppose that the heartbeat service must be
stoped in the primary machine (pollux) during the syncronization.

What do you think about this ?

Best regards,

Antonio Navarro Navarro
BemarNet Management
http://www.bemarnet.es
hostmaster@example.com
Tlf. +34-96-1656644
Fax. +34-96-1656514
Re: Configuration issue with DRBD + datadisk (II) [ In reply to ]
This problem is solved by running the /etc/rc.d/init.d/drbd
script before running /etc/rc.d/init.d/heartbeat at system startup.

Since the drbd script will use drbdsetup /dev/nbX WAIT to wait
until resynchronisation is finished.

PLEASE NOTE:
This is not working flawless in the current release!
Insert a "sleep 3" before the drbdsetup xxx WAIT command,
or use more recent source from the CVS.
( I am recomending the first of the two solutions :)

-Philipp

>Hi again !
>
>I have been thinking about the resyncronization of both servers after
>failuers in the following scenario:
>
>Initial stage (both serves are started at once):
>
>pollux : primary /dev/nb0 = /home
>castor: secondary /dev/nb0 not mounted
>
>Second stage (pollux server is powered down):
>
>pollux : powered down
>castor : primary /dev/nb0 = /home
>
>Third stage (pollux server is powered up):
>
>pollux : primary /dev/nb0 = /home (but the contents are the existing at
>initial stage, not the modified at second stage)
>castor: secondary /dev/nb0 not mounted
>
>I think that a good approach for solving this situation is detecting if
>there are any primary node at pollux startup, and, if a primary node
>exists, syncronize the contents before becoming primary node. I don't know
>if heartbeat will accept this (I suppose heartbeat will set the other
>machine as secondary), so I suppose that the heartbeat service must be
>stoped in the primary machine (pollux) during the syncronization.
>
>What do you think about this ?
>
>Best regards,
>
>Antonio Navarro Navarro
>BemarNet Management
>http://www.bemarnet.es
>hostmaster@example.com
>Tlf. +34-96-1656644
>Fax. +34-96-1656514
>_______________________________________________
>DRBD-devel mailing list
>DRBD-devel@example.com
>http://lists.sourceforge.net/mailman/listinfo/drbd-devel
--
Want to try something new? Are you a Linux hacker?
Volunteer in testing mergemem!
(Get it from http://das.ist.org/mergemem)
-----
Philipp Reisner PGP: http://der.ist.org/~kde/pgp.asc
Re: Configuration issue with DRBD + datadisk (II) [ In reply to ]
Philipp Reisner wrote:

> This problem is solved by running the /etc/rc.d/init.d/drbd
> script before running /etc/rc.d/init.d/heartbeat at system startup.
>
> Since the drbd script will use drbdsetup /dev/nbX WAIT to wait
> until resynchronisation is finished.
>
> PLEASE NOTE:
> This is not working flawless in the current release!
> Insert a "sleep 3" before the drbdsetup xxx WAIT command,
> or use more recent source from the CVS.
> ( I am recomending the first of the two solutions :)

I don't know how I must take that ;*)
I won't advice anyone to use the CVS script now as they are under heavy
rewrite.
(and drbd.c don't even compile on my Mandrake 7.0 )

It seems that 3 is a little bit short (so reported a failure with this one)
the current value in CVS in 30 which is too big if so fell like profiling and
return a "good" value
I will be happy

Here is a report of my compilation error :

gcc -c -D__KERNEL__ -DMODULE -O2 -Wall -m486 -DCPU=586 -malign-loops=2
-malign-jumps=2 -malign-functions=2 -fomit-frame-pointer
-I/usr/src/linux/include -D__S
MP__ -DMOD_VERSION=58 -DEXPORT_SYMTAB drbd.c
In file included from /usr/src/linux/include/linux/smp.h:11,
from /usr/src/linux/include/linux/sched.h:20,
from /usr/src/linux/include/asm/uaccess.h:8,
from drbd.c:54:
/usr/src/linux/include/asm/smp.h: In function `hard_smp_processor_id':
/usr/src/linux/include/asm/smp.h:209: warning: implicit declaration of
function `GET_APIC_ID'
/usr/src/linux/include/asm/smp.h:209: `APIC_BASE' undeclared (first use in
this function)
/usr/src/linux/include/asm/smp.h:209: (Each undeclared identifier is reported
only once
/usr/src/linux/include/asm/smp.h:209: for each function it appears in.)
/usr/src/linux/include/asm/smp.h:209: `APIC_ID' undeclared (first use in this
function)
drbd.c: At top level:
/usr/src/linux/include/linux/blk.h:451: warning: `do_nbd_request' declared
`static' but never defined
make: *** [drbd.o] Error 1