[DRBD-user] DRBD with raw devices in SLES 8

crsurf crsurf at terra.com.br
Thu Jul 29 23:08:43 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.


Hello all

I'm trying to use drbd with rawdevices to replicate data from Sybase
that writes on raw devices. I'm using SLES 8.
The problem is sometimes the data was replicated and sometime not.
When I look to /proc/drbd after inserting 10000 records at sybase the
file /proc/drbd show me this:

0: cs:Unconfigured st:Secondary/Unknown ns:0 nr:0 dw:0 dr:0 pe:0 ua:0
1: cs:WFConnection st:Primary/Secondary ns:0 nr:0 dw:0 dr:0 pe:0 ua:0
2: cs:WFConnection st:Primary/Secondary ns:0 nr:0 dw:0 dr:0 pe:0 ua:0
3: cs:WFConnection st:Primary/Secondary ns:0 nr:0 dw:0 dr:0 pe:0 ua:0

I have 3 raw partitions on primary machine /dev/had5, hda6 and hda7,
my raw1 device points to /dev/nb1, raw2 to /dev/nb2 and raw3 to /dev/nb3.
raw3 is the partition for data of database in my tests.

In other experiences with drbd in Conectiva, when I look at /proc/drbd
the fields ns, nr, dw, dr are allways updating, but in SLES this only
updated when a syncall occur at startup of secondary node, and after
this /proc/drbd is not more updated.

This is my config files (these files are the same in both machines):

#################
# /etc/raw
#
# sample configuration to bind raw devices
# to block devices
#
# The format of this file is:
# raw<N>:<blockdev>
#
# example:
# ---------
# raw1:hdb1
#
# this means: bind /dev/raw/raw1 to /dev/hdb1
#
# ...
raw1:nb1
raw2:nb2
raw3:nb3


####################
#####  ha.cf   #####
####################
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility     local0
keepalive 2
deadtime 30
nice_failback on
bcast   eth0            # Linux
watchdog /dev/watchdog
node    angra
node    ilhabela


######################
### haresources   ####
######################
angra 192.168.1.126 datadisk::drbd0 datadisk::drbd1 datadisk::drbd2 sybase


######################
##### drbd.conf ######
######################
       resource drbd0 {
         protocol=C
         fsckcmd=/bin/true
         #skip-wait
         #load-only
         inittimeout=30

         disk {
           do-panic
           disk-size = 32098k
         }

         net {
           sync-rate   = 1M
           sync-min    = 500k
           sync-max    = 2M    # maximal average syncer bandwidth
           tl-size     = 5000  # transfer log size, ensures strict
write ordering
           timeout     = 60    # 0.1 seconds
           connect-int = 10    # seconds
           ping-int    = 10    # seconds
         }

         on angra {
           device=/dev/nb1
           disk=/dev/hda5
           address=192.168.1.52
           port=7789
         }

         on ilhabela {
           device=/dev/nb1
           disk=/dev/hda8
           address=192.168.1.57
           port=7789
         }
       }

       resource drbd1 {
         protocol=C
         fsckcmd=/bin/true
         #skip-wait
         #load-only
         inittimeout=30

         disk {
           do-panic
           disk-size = 160618k
         }

         net {
           sync-rate   = 1M
           sync-min    = 500k
           sync-max    = 2M    # maximal average syncer bandwidth
           tl-size     = 5000  # transfer log size, ensures strict
write ordering
           timeout     = 60    # 0.1 seconds
           connect-int = 10    # seconds
           ping-int    = 10    # seconds
         }

         on angra {
           device=/dev/nb2
           disk=/dev/hda6
           address=192.168.1.52
           port=7790
         }

         on ilhabela {
           device=/dev/nb2
           disk=/dev/hda9
           address=192.168.1.57
           port=7790
         }
       }

       resource drbd2 {
         protocol=C
         fsckcmd=/bin/true
         #skip-wait
         #load-only
         inittimeout=30

         disk {
           do-panic
           disk-size = 208813k
         }

         net {
           sync-rate   = 1M
           sync-min    = 500k
           sync-max    = 2M    # maximal average syncer bandwidth
           tl-size     = 5000  # transfer log size, ensures strict
write ordering
           timeout     = 60    # 0.1 seconds
           connect-int = 10    # seconds
           ping-int    = 10    # seconds
         }

         on angra {
           device=/dev/nb3
           disk=/dev/hda7
           address=192.168.1.52
           port=7791
         }

         on ilhabela {
           device=/dev/nb3
           disk=/dev/hda10
           address=192.168.1.57
           port=7791
         }
       }


Can anybody help-me?

Cristiano Costa




More information about the drbd-user mailing list