* [Drbd-dev] Re: DRBD contribution
@ 2008-04-29 11:19 Azeez Ahamed
2008-04-30 8:58 ` Philipp Reisner
0 siblings, 1 reply; 2+ messages in thread
From: Azeez Ahamed @ 2008-04-29 11:19 UTC (permalink / raw)
To: drbd-dev
[-- Attachment #1: Type: text/plain, Size: 3530 bytes --]
Hello Philipp,
Thanks for the inputs you provided. I have made a good progress
on the patch you suggested me to develop. Before I submit the code,
i want to make sure your requirements are matched.
So far i have developed
* Before only two 'on' sections per resource were allowed. This
information was available in res->me and res->peer.
Now, allowing multiple 'on' sections. As of now, no limit is
provided. If you are looking for some limit for no. of peer
host, then please let me know.
* Added a new option in drbdadm command i.e. --peer-host.
# drbdadm
OPTIONS:
{--dry-run|-d}
{--verbose|-v}
...
{--sh-varname|-n} val
{--peer-host|-h} val ===> new option added
Syntax will be:
drbdadm -h <peer-name> connect <resource>
Let me know if you want to change the option name.
* For selecting the peer host, i have used the following logic
If '-h <peer-name>' option is specified, then searching the
<peer-name> under <resource> in the config file. If found,
then this <peer-name> is used as peer host. Otherwise, an
error is displayed and drbdadm program exits.
If '-h <peer-name>' option is not specified, then peer name will
be taken from the second 'on' section's name of that <resource>.
In this case, only two 'on' sections will be there. During DRBD
service start, as of now drbdadm is not called with new option
i.e. -h <peer-name>.
In that case we need to change the drbd script or use default
<peer-name> for drbdadm command. In my case i am using second 'on'
section's name as default <peer-name> for drbdadm command.
In both the cases(with/without -h option), it is made sure that
peer host name is not same as local host. Otherwise, an error is
displayed and drbdadm program exits.
Please let me know if i am going in the right direction. Also,
i will make sure that the signed License Agreement is sent to you
before i submit my code.
Thanks,
Azeez
On Tue, 22 Apr 2008 Philipp Reisner wrote :
> > I need some clarification on the activities you suggested me to
> > develop.
> >
> > > 3 Change drbdadm so that it allows multiple "on" sections per
> > > resource. -- One has to specify the peer he means on the
> > > commandline when use drbdadm connect.
> > > [for DRBD-8.2]
> >
> > Here you are looking for 1 to n node replication? When we use
> > drbdadm connect command, it uses this command internally
> >
> > drbdsetup /dev/drbd0 net 10.1.40.33:1234 10.1.40.41:1234 C --set-defaults
> > --create-device
> >
> > Do i need to modify drbdsetup command to support multiple nodes?
> > Please correct me if i am wrong.
> >
>
>Hi Azeez,
>
>What I suggest is that the DRBD-driver and drbdsetup should stay as
>they are. I suggest that you modify drbdadm so that one can specify
>multiple on sections in a resource section.
>
>As the driver and drbdsetup are two nodes only, one will then have
>to select a peer node when calling drbdadm connect. So the command
>line syntax of drbdadm will have to change as well. Maybe
>
>drbdadm --to foo-node connect r0
>
>Phil
>--
>: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
>: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
>: Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :
[-- Attachment #2: Type: text/html, Size: 5033 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Drbd-dev] Re: DRBD contribution
2008-04-29 11:19 [Drbd-dev] Re: DRBD contribution Azeez Ahamed
@ 2008-04-30 8:58 ` Philipp Reisner
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Reisner @ 2008-04-30 8:58 UTC (permalink / raw)
To: drbd-dev; +Cc: Azeez Ahamed
Am Dienstag, 29. April 2008 13:19:46 schrieb Azeez Ahamed:
> Hello Philipp,
>
> Thanks for the inputs you provided. I have made a good progress
> on the patch you suggested me to develop. Before I submit the code,
> i want to make sure your requirements are matched.
>
> So far i have developed
> * Before only two 'on' sections per resource were allowed. This
> information was available in res->me and res->peer.
> Now, allowing multiple 'on' sections. As of now, no limit is
> provided. If you are looking for some limit for no. of peer
> host, then please let me know.
Right. There should be no limit. The intention was to replace
res->me and res->peer by a list. I guess this is what you have
done, right?
>
> * Added a new option in drbdadm command i.e. --peer-host.
> # drbdadm
>
> OPTIONS:
> {--dry-run|-d}
> {--verbose|-v}
> ...
> {--sh-varname|-n} val
> {--peer-host|-h} val ===> new option added
>
> Syntax will be:
> drbdadm -h <peer-name> connect <resource>
> Let me know if you want to change the option name.
>
This is reasonable.
> * For selecting the peer host, i have used the following logic
>
> If '-h <peer-name>' option is specified, then searching the
> <peer-name> under <resource> in the config file. If found,
> then this <peer-name> is used as peer host. Otherwise, an
> error is displayed and drbdadm program exits.
>
> If '-h <peer-name>' option is not specified, then peer name will
> be taken from the second 'on' section's name of that <resource>.
> In this case, only two 'on' sections will be there. During DRBD
> service start, as of now drbdadm is not called with new option
> i.e. -h <peer-name>.
>
In case there is no '-h <peer-name>' option on the command line _AND_
there are only two 'on' sections _AND_ on of the one sections matches
my own local host name, then the peer is the other 'on' section.
With that logic drbdadm stays completely compatible to the current
calling semantics, as long as there are only two 'on' sections.
> In that case we need to change the drbd script or use default
> <peer-name> for drbdadm command. In my case i am using second 'on'
> section's name as default <peer-name> for drbdadm command.
>
> In both the cases(with/without -h option), it is made sure that
> peer host name is not same as local host. Otherwise, an error is
> displayed and drbdadm program exits.
>
In order to specify a default peer, there should be an additional
keyword. E.g. "default". That keyword might only be specified in
two of the 'on' sections.
I do not think it is a good idea to make the default selection
dependend on the order of the sections in the config file, since
we advise our users to use the same config file on all nodes of
the cluster.
The real intention of this feature is to deligate the peer selection
to heartbeat's OCF drbd agent. -- But that will be the next step, after
we have all the functionality in drbdadm in place.
-Phil
--
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-30 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 11:19 [Drbd-dev] Re: DRBD contribution Azeez Ahamed
2008-04-30 8:58 ` Philipp Reisner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox