[Drbd-dev] Re: DRBD contribution

Azeez Ahamed azeez.ahamed at rediffmail.com
Tue Apr 29 13:19:46 CEST 2008


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 :
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linbit.com/pipermail/drbd-dev/attachments/20080429/d38b8e0e/attachment.html


More information about the drbd-dev mailing list