Mailing List Archive

Datadisk Query
Hello everyone,

I am willing to change the way datadisk is working but before doing
anything I would like to have a feedback from all its current user.

From the moment the slave/master role is set up on the drbd
configuration file and is static. I would like to move the information
about state of the node in a separate configuration file.
The current DRDB file would be change. The configuration then have a
syntax looking like :
NODE1_"OPTION NAME"=OPTION VALUE
NODE2_"OPTION NAME"=OPTION VALUE
...
NNODEX_"OPTION NAME"=OPTION VALUE
A file called /etc/sysconfig/drdb/state would contain the word Slave or
Master.
This will determine the datadisk init behaviouring.

a new datadisk option called mode will then allow you to change the
stored mode.
ie : datadisk mode slave will force drbd to start up as slave after a
reboot.

The slave and master option will ne modified as well to write to the
status file before making any call to drdbsetup.

The main avantage of this change would be that after a takeover of a
service bringing back a computer will always bring it back in the good
mode.

If your slave and master are not using a heartbeat, you will be able to
keep the current master as it and the previously faulty computer will
always come back as slave.

This will allow the configuration to access more than to slave node ..
Philipp, I am sure you will do it ;*)

Any feedback will be appreciated
Thank you

Thomas
Re: Datadisk Query [ In reply to ]
Am Son, 24 Sep 2000 schrieb Thomas Mangin:
>Hello everyone,
>
>I am willing to change the way datadisk is working but before doing
>anything I would like to have a feedback from all its current user.
>
From the moment the slave/master role is set up on the drbd
>configuration file and is static. I would like to move the information
>about state of the node in a separate configuration file.
>The current DRDB file would be change. The configuration then have a

Thomas, this is not true. The roles are assigned by heartbeat, but I
must admit I am not happy with the names "MASTER" and "SLAVE" either.

If heartbeat is only running on one node (no matter if it's on MASTER
or on SLAVE) it will call "datadisk start" on that node.

Probabely you are refering to the fact, that if both nodes are running
heartbeat will migrate the service to it's home node. Thus if a
just repaired ''MASTER'' is coming up heartbeat will bring to service
back from the ''SLAVE'' to the ''MASTER''.

If you do not like this "automatic migrate service home feature"
(or automatic failback) there is the heartbeat option nice_failback
that will dissable this behaviour.
(This feature is only available in the latest heartbeat release, I think.
maybe Luis can write a comment about it)

>syntax looking like :
>NODE1_"OPTION NAME"=OPTION VALUE
>NODE2_"OPTION NAME"=OPTION VALUE
>...
>NNODEX_"OPTION NAME"=OPTION VALUE
>A file called /etc/sysconfig/drdb/state would contain the word Slave or
>Master.
>This will determine the datadisk init behaviouring.
>
>a new datadisk option called mode will then allow you to change the
>stored mode.
>ie : datadisk mode slave will force drbd to start up as slave after a
>reboot.
>
>The slave and master option will ne modified as well to write to the
>status file before making any call to drdbsetup.
>
>The main avantage of this change would be that after a takeover of a
>service bringing back a computer will always bring it back in the good
>mode.
>
>If your slave and master are not using a heartbeat, you will be able to
>keep the current master as it and the previously faulty computer will
>always come back as slave.
>
>This will allow the configuration to access more than to slave node ..
>Philipp, I am sure you will do it ;*)
>
>Any feedback will be appreciated
>Thank you

Ahhh, now I do understand. You want to use DRBD without heartbeat.

Ok my comments:
1) What's about having the state file in an node independend format too,
just as the config file. E.g:
NODE1=ACTIVE
NODE2=STANDBY or
NODE1=STANDBY
NODE2=ACTIVE

2) What's about making two different tools out of datadisk ?
/etc/init.d/drbd [start|stop] ... used at system startup
/etc/ha.d/resources.d/datadisk [start|stop] ... used by heartbeat
/usr/bin/drbdc [init|master|slave...mode] ... used by sysadm

3) I am happy with renaming "MASTER" and "SLAVE" into "NODE1" and "NODE2",
but I would appreciate more comments about this.

-Philipp
Re: Datadisk Query [ In reply to ]
[...]

> Ahhh, now I do understand. You want to use DRBD without heartbeat.

No, I AM USING DRDB without heartbeat !! And it works fine !!
as when you run several service like with a mail server you don't
want to takeover only as pop timeout ;*)
(And when I looked drbd integration with heartbeat was still somehow
problematic.)

> Ok my comments:
> 1) What's about having the state file in an node independend format too,
> just as the config file. E.g:
> NODE1=ACTIVE
> NODE2=STANDBY or
> NODE1=STANDBY
> NODE2=ACTIVE

If we only have two node this is fine, with three it is problematic as the
third one can't know/detect who is the new ACTIVE node after a swap between
the two other nodes.

I would still prefer to have a file only containing the 'init' statut of the
node. As it is only used a boot time to bring ONE node as Master.

> 2) What's about making two different tools out of datadisk ?

Good point. It make sense to split the file. I will do it !

> /etc/init.d/drbd [start|stop] ... used at system startup
start will be a call to drbdc init
stop will be a call to drdbc slave

> /etc/ha.d/resources.d/datadisk [start|stop] ... used by heartbeat
start will be a call to drbdc master
stop will be a call to drdbc slave

> /usr/bin/drbdc [init|master|slave...mode] ... used by sysadm
will be the old datadisk

I hope that renaming datadisk drdbc won't confuse users to much. ;*)

> 3) I am happy with renaming "MASTER" and "SLAVE" into "NODE1" and "NODE2",
> but I would appreciate more comments about this.

If we are "virtualizing" the master node, this don't make any sense anymore
to keep MASTER and SLAVE, it is only going to confuse new users.

Thomas
--
Thomas Mangin (mailto:thomas.mangin@example.com)
System Administrator (mailto:systems@example.com)
Legend Internet Ltd. (http://www.legend.co.uk:/)
--
The urgent is done, the impossible is on the way, for miracles expect a
small delay
Re: Datadisk Query [ In reply to ]
Hello!

On Mon, 25 Sep 2000, Philipp Reisner wrote:

> Am Son, 24 Sep 2000 schrieb Thomas Mangin:
[ ... snip ... ]
> Thomas, this is not true. The roles are assigned by heartbeat, but I
> must admit I am not happy with the names "MASTER" and "SLAVE" either.

I think Alan Robertson is not happy with these names also... the
same from me, Fábio and you, as I can see.
In the very beginning of datadisk it sounded good and we did it
this way. Actually Alan plans to move - or start moving - heartbeat to
the N-nodes world and the words Master and Slave don't make sense there.

> >syntax looking like :
> >NODE1_"OPTION NAME"=OPTION VALUE
> >NODE2_"OPTION NAME"=OPTION VALUE
> >...
> >NNODEX_"OPTION NAME"=OPTION VALUE
> >A file called /etc/sysconfig/drdb/state would contain the word Slave or
> >Master.
> >This will determine the datadisk init behaviouring.

If you need a fixed init behaviour, you can still be using the
information gathered from /etc/sysconfic/drbd/drbdX... you can set it
there, the init behaviour (even as a new option) and use the .../state
file to save the state changes. It sounds more polite putting this
file in /var/run/drbd/drbdX_state or so. Don't forget you can have a
different status for each drbd device you're running on your computer.

...
> >service bringing back a computer will always bring it back in the good
> >mode.
> >
> >If your slave and master are not using a heartbeat, you will be able to
> >keep the current master as it and the previously faulty computer will
> >always come back as slave.

It sounds good.
But I think it's good using DRBD along with a service manager or a
tool like hearbeat that tries to soft the transition
(failover/failback) process. We're working on a service manager for
heartbeat that will manage this problems in a better fashion.

> 3) I am happy with renaming "MASTER" and "SLAVE" into "NODE1" and "NODE2",
> but I would appreciate more comments about this.

Be happy, do that! :)

Hugs!

Luis

[ Luis Claudio R. Goncalves lclaudio@example.com ]
[. MSc coming soon -- Conectiva HA Team -- Gospel User -- Linuxer -- :) ]
[. Fault Tolerance - Real-Time - Distributed Systems - IECLB - IS 40:31 ]
[. LateNite Programmer -- Jesus Is The Solid Rock On Which I Stand -- ]
Re: Datadisk Query [ In reply to ]
Since we're on the topic of changing datadisk, could you change it so
that 'status' gives an appropriate message, such that heartbeat can
manage it?

The ResourceManager script in heartbeat wants to get a response that
contains the word '[Rr]unning' if the service is available.

As a matter of fact, the state) case could be renamed to status) and the
output could be changed from this:

<snip>
if [ $? -eq 1 ]; then
succed "Primary"
else
succed "Secondary"

<snip>


to this:

<snip>
if [ $? -eq 1 ]; then
echo "datadisk is running"
else
echo "datadisk is stopped"
<snip>

(Yeah, I know it isn't a patch, but the change is so easy...)

Cheers,
Dan


--
Dan Yocum, Sr. Linux Consultant
Linuxcare, Inc.
630.697.8066 tel
yocum@example.com, http://www.linuxcare.com

Linuxcare. Support for the revolution.