[DRBD-user] Very newbie question

Gary Baker Gab at walkertool.com
Mon May 24 13:54:51 CEST 2004

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


I look forward to a response to my question from the list. Also, based
on an aswer to another question, since gentoo uses devfs, should I be
specifying /dev/nbd/0 instead of /dev/nb0 in my drbd.conf file? Thank
you.


Gary wrote:
I have been studying the documentation and searching the lists, but I
can't seen to find an answer to my particular issue. 

My situation is this:
I have 2 identical Gentoo boxes running "vanilla" 2.4 kernels. They
are
older boxes that we given to me for Linux testing (PII 400Mhz, 4G IDE
HD) One is a production server serving up Samba shares and Apache. I
intend the other box to be a mirror-failover. In the meantime I
secured
another older box (PII 300Mhz, 4G SCSI HD) to use in order to test
clustering without jeopardizing my production box.

I have done an rsync of the production server (called DS) to it's
backup (called DS2). I have also rsync'ed that to the cluster
experiment
box (called DS3). DS2 and DS3 are connected to the main net through
eth0
(10/100Mbit) and a crossover cable on eth1 (10/100Mbit). I have
installed heartbeat on DS2 and DS3 and tested the failover and it
works.
I have installed DRBD on DS2 and DS3
DS2 = hda3 is root partition (reiserfs), which I want mirrored to DS3
DS3 = sda3 is root partition (reiserfs), which will be the mirror of
DS2
I believe the configuration is correct:

listing drbd.conf:
resource drbd0 {
  protocol = C
  fsckcmd = /bin/true

  disk {
    do-panic
    disk-size = 3662700
  }

  net {
    sndbuf-size = 1M
    sync-min    = 500k
    sync-max    = 100M  
    tl-size     = 5000  
    timeout     = 60   
    connect-int = 10  
    ping-int    = 10   
    ko-count    = 4  
  }

  on ds2 {
    device = /dev/nb0
    disk = /dev/hda3
    address = 10.0.0.1
    port = 7788
  }

  on ds3 {
    device = /dev/nb0
    disk = /dev/sda3
    address = 10.0.0.2
    port = 7788
  }
}

I am now ready to test my cluster, but I am not fully understanding
how
DRBD works with existing file systems. What must I do to create the
mirror/failover between the two? Should I be trying to mirroring my
entire root partition? Do I mirror only part? I am worried that I will
have problems since DS3
is SCSI and DS2 is IDE. Even though these are "test" boxes, I want to
get it right the first time if possible.

Thanks.






More information about the drbd-user mailing list