<P>
Hello Philipp,<BR>
<BR>
Thanks for the inputs you provided. I have made a good progress<BR>
on the patch you suggested me to develop. Before I submit the code,<BR>
i want to make sure your requirements are matched.<BR>
<BR>
So far i have developed<BR>
* Before only two 'on' sections per resource were allowed. This<BR>
information was available in res->me and res->peer. <BR>
Now, allowing multiple 'on' sections. As of now, no limit is <BR>
provided. If you are looking for some limit for no. of peer<BR>
host, then please let me know. <BR>
<BR>
* Added a new option in drbdadm command i.e. --peer-host. <BR>
# drbdadm<BR>
<BR>
OPTIONS:<BR>
{--dry-run|-d}<BR>
{--verbose|-v}<BR>
...<BR>
{--sh-varname|-n} val<BR>
{--peer-host|-h} val ===> new option added<BR>
<BR>
Syntax will be:<BR>
drbdadm -h <peer-name> connect <resource><BR>
Let me know if you want to change the option name.<BR>
<BR>
* For selecting the peer host, i have used the following logic<BR>
<BR>
If '-h <peer-name>' option is specified, then searching the <BR>
<peer-name> under <resource> in the config file. If found,<BR>
then this <peer-name> is used as peer host. Otherwise, an<BR>
error is displayed and drbdadm program exits.<BR>
<BR>
If '-h <peer-name>' option is not specified, then peer name will<BR>
be taken from the second 'on' section's name of that <resource>. <BR>
In this case, only two 'on' sections will be there. During DRBD <BR>
service start, as of now drbdadm is not called with new option <BR>
i.e. -h <peer-name>.<BR>
<BR>
In that case we need to change the drbd script or use default <BR>
<peer-name> for drbdadm command. In my case i am using second 'on'<BR>
section's name as default <peer-name> for drbdadm command.<BR>
<BR>
In both the cases(with/without -h option), it is made sure that <BR>
peer host name is not same as local host. Otherwise, an error is <BR>
displayed and drbdadm program exits. <BR>
<BR>
<BR>
Please let me know if i am going in the right direction. Also,<BR>
i will make sure that the signed License Agreement is sent to you<BR>
before i submit my code.<BR>
<BR>
<BR>
Thanks,<BR>
Azeez<BR>
<BR>
On Tue, 22 Apr 2008 Philipp Reisner wrote :<BR>
> > I need some clarification on the activities you suggested me to<BR>
> > develop.<BR>
> ><BR>
> > > 3 Change drbdadm so that it allows multiple "on" sections per<BR>
> > > resource. -- One has to specify the peer he means on the<BR>
> > > commandline when use drbdadm connect.<BR>
> > > [for DRBD-8.2]<BR>
> ><BR>
> > Here you are looking for 1 to n node replication? When we use<BR>
> > drbdadm connect command, it uses this command internally<BR>
> ><BR>
> > drbdsetup /dev/drbd0 net 10.1.40.33:1234 10.1.40.41:1234 C --set-defaults<BR>
> > --create-device<BR>
> ><BR>
> > Do i need to modify drbdsetup command to support multiple nodes?<BR>
> > Please correct me if i am wrong.<BR>
> ><BR>
><BR>
>Hi Azeez,<BR>
><BR>
>What I suggest is that the DRBD-driver and drbdsetup should stay as<BR>
>they are. I suggest that you modify drbdadm so that one can specify<BR>
>multiple on sections in a resource section.<BR>
><BR>
>As the driver and drbdsetup are two nodes only, one will then have<BR>
>to select a peer node when calling drbdadm connect. So the command<BR>
>line syntax of drbdadm will have to change as well. Maybe<BR>
><BR>
>drbdadm --to foo-node connect r0<BR>
><BR>
>Phil<BR>
>--<BR>
>: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :<BR>
>: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :<BR>
>: Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :<BR>
</P>
<br><br>
<Table border=0 Width=644 Height=57 cellspacing=0 cellpadding=0 style='font-family:Verdana;font-size:11px;line-height:15px;'><TR><td><img src ='http://imadworks.rediff.com/cgi-bin/AdWorks/adimage.cgi/2087310_2079844/creative_2087453.jpg' alt='JS RED' border=0></td></TR></Table>