[DRBD-user] Create partitions from DRBD

Faria digolinopage at yahoo.com.br
Tue Jul 29 20:31:32 CEST 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello People,

About my problems with drdb, I'll tell how is my network.
I want use DRBD from replication the one (or more) partitions from second machine.

I create one network with 3 machines, two servers (clusters) and one client (notebook).

Then firewall is not a trouble.

Each machine have two network card.

ubuntu-cluster1
eth0 : 192.168.1.1
eth1 : 10.0.0.1

ubuntu-cluster2
eth0 : 192.168.1.2
eth1 : 10.0.0.2

My drbd.conf is :

global {
  usage-count yes;
}
common {
  protocol C;
}
resource r0 {
  on ubuntu-cluster1 {
    device    /dev/drbd0;
    disk      /dev/sda7;
    address   10.0.0.1:7789;
    meta-disk internal;
  }
  on ubuntu-cluster2 {
    device    /dev/drbd0;
    disk      /dev/sda7;
    address   10.0.0.2:7789;
    meta-disk internal;
  }
}

My partitions in two hard disk :
root at ubuntu-cluster1:~# fdisk -l

Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           6       48163+  83  Linux
/dev/sda2               7       30394   244091610    5  Extended
/dev/sda5               7         492     3903763+  82  Linux swap / Solaris
/dev/sda6             493        5355    39062016   83  Linux
/dev/sda7            5356        5379      192748+  83  Linux
/dev/sda8            5380       30394   200932956   83  Linux


root at ubuntu-cluster2:~# fdisk -l
Disk /dev/sda: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           6       48163+  83  Linux
/dev/sda2               7       30394   244091610    5  Extended
/dev/sda5               7         492     3903763+  82  Linux swap / Solaris
/dev/sda6             493        5355    39062016   83  Linux
/dev/sda7            5356        5379      192748+  83  Linux
/dev/sda8            5380       30394   200932956   83  Linux

I think that partition is not problem. 

I've been installed drbd 8.2.6, but 
the old resource is there.

See my commands :

root at ubuntu-cluster2:~# drbdadm create-md r0
Device '/dev/drbd0' is configured!
Command 'drbdmeta /dev/drbd0 v08 /dev/sda7 internal create-md' terminated with exit code 20
drbdadm aborting
root at ubuntu-cluster2:~# drbdadm attach r0
/dev/drbd0: Failure: (124) Device is attached to a disk (use detach first)
Command 'drbdsetup /dev/drbd0 disk /dev/sda7 /dev/sda7 internal --set-defaults --create-device' terminated with exit code 10
root at ubuntu-cluster2:~# drbdadm connect r0
/dev/drbd0: Failure: (125) Device has a net-config (use disconnect first)
Command 'drbdsetup /dev/drbd0 net 10.0.0.2:7789 10.0.0.1:7789 C --set-defaults --create-device' terminated with exit code 1

Do I recreate the resource ?
How Do I make this ?

When i started the script /etc/init.d/drbd, still come this message :

root at ubuntu-cluster1:~# /etc/init.d/drbd start
Starting DRBD resources:    [ ].
..........
***************************************************************
 DRBD's startup script waits for the peer node(s) to appear.
 - In case this node was already a degraded cluster before the
   reboot the timeout is 0 seconds. [degr-wfc-timeout]
 - If the peer was available before the reboot the timeout will
   expire after 0 seconds. [wfc-timeout]
   (These values are for resource 'r0'; 0 sec -> wait forever)
 To abort waiting enter 'yes' [  76 ]

This task is very hard :)

Best regards,

Faria









--- Em ter, 29/7/08, Lars Ellenberg <lars.ellenberg at linbit.com> escreveu:

> De: Lars Ellenberg <lars.ellenberg at linbit.com>
> Assunto: Re: [DRBD-user] Create partitions from DRBD
> Para: drbd-user at lists.linbit.com
> Data: Terça-feira, 29 de Julho de 2008, 13:35
> On Tue, Jul 29, 2008 at 03:25:04PM +0000, ZiLioN ZilLioN
> wrote:
> > 
> > 
> > > Date: Tue, 29 Jul 2008 07:59:26 -0700
> > > From: digolinopage at yahoo.com.br
> > > Subject: Re: [DRBD-user] Create partitions from
> DRBD
> > > To: drbd-user at lists.linbit.com
> > >
> > > Hello Lars,
> > >
> > > I readed all chapter five in the DRBD site.
> > > All steps are successful, then i saw the result
> of /proc/drbd in both
> > machines:
> > >
> > > root at ubuntu-cluster1:~# cat /proc/drbd
> > > version: 8.0.5 (api:86/proto:86)
> > > SVN Revision: 3011 build by root at ubuntu-cluster1,
> 2008-07-25 14:46:01
> > > 0: cs:WFConnection st:Primary/Unknown
> ds:UpToDate/DUnknown C r---
> > > ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
> > > resync: used:0/31 hits:0 misses:0 starving:0
> dirty:0 changed:0
> > > act_log: used:0/257 hits:0 misses:0 starving:0
> dirty:0 changed:0
> > >
> > >
> > > root at ubuntu-cluster2:~# cat /proc/drbd
> > > version: 8.0.5 (api:86/proto:86)
> 
> DO NOT USE OUTDATED VERSIONS.
> 
> please.
> do not use outdated versions.
> 
> we are at 8.0.12, release candidate for 8.0.13 is out
> already.
> or, if you prefer, 8.2.6, and 8.2.7 comming soon.
> 
> there are a number of known bugs in that 8.0.5 version.
> 
> > > SVN Revision: 3011 build by root at ubuntu-cluster2,
> 2008-07-28 10:28:49
> > > 0: cs:WFConnection st:Secondary/Unknown
> ds:Inconsistent/DUnknown C r---
> > > ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
> > > resync: used:0/31 hits:0 misses:0 starving:0
> dirty:0 changed:0
> > > act_log: used:0/257 hits:0 misses:0 starving:0
> dirty:0 changed:0
> > >
> > > I believe this allright. Then I added the drbd in
> /etc/modules, and reboot
> > the machine. After reboot I'll see the result of
> the command cat /proc/drdb.
> > >
> > 
> > This is not correct:
> > 
> >     st:Primary/Unknown and st:Secondary/Unknown
> > 
> > The correct is:
> > 
> >     st:Secondary/Secondary in both nodes.
> 
> the important part is the connection state, cs.
> it should be
> 	cs:Connected
> not WFConnection (waiting for connection).
> 
> > The partition is probably the problem.
> 
> no.
> 
> he probably just forgot to allow the drbd ports though his
> firewall.
> 
> 
> -- 
> : Lars Ellenberg                          
> http://www.linbit.com :
> : DRBD/HA support and consulting             sales at
> linbit.com :
> : LINBIT Information Technologies GmbH      Tel
> +43-1-8178292-0  :
> : Vivenotgasse 48, A-1120 Vienna/Europe     Fax
> +43-1-8178292-82 :
> __
> please don't Cc me, but send to list -- I'm
> subscribed
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user


      Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses



More information about the drbd-user mailing list