resource r0 { # transfer protocol to use. # C: write IO is reported as completed, if we know it has # reached _both_ local and remote DISK. # * for critical transactional data. # B: write IO is reported as completed, if it has reached # local DISK and remote buffer cache. # * for most cases. # A: write IO is reported as completed, if it has reached # local DISK and local tcp send buffer. (see also sndbuf-size) # * for high latency networks # #********** # uhm, benchmarks have shown that C is actually better than B. # this note shall disappear, when we are convinced that B is # the right choice "for most cases". # Until then, always use C unless you have a reason not to. # --lge #********** # protocol C; # what should be done in case the cluster starts up in # degraded mode, but knows it has inconsistent data. incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f"; startup { # Wait for connection timeout. # The init script blocks the boot process until the resources # are connected. This is so when the cluster manager starts later, # it does not see a resource with internal split-brain. # In case you want to limit the wait time, do it here. # Default is 0, which means unlimited. Unit is seconds. # # wfc-timeout 180; # Wait for connection timeout if this node was a degraded cluster. # In case a degraded cluster (= cluster with only one node left) # is rebooted, this timeout value is used. # degr-wfc-timeout 5; # 5 seconds. } disk { # if the lower level device reports io-error you have the choice of # "pass_on" -> Report the io-error to the upper layers. # Primary -> report it to the mounted file system. # Secondary -> ignore it. # "panic" -> The node leaves the cluster by doing a kernel panic. # "detach" -> The node drops its backing storage device, and # continues in disk less mode. # on-io-error pass_on; # In case you only want to use a fraction of the available space # you might use the "size" option here. # # size 10G; } net { # this is the size of the tcp socket send buffer # increase it _carefully_ if you want to use protocol A over a # high latency network with reasonable write throughput. # defaults to 2*65535; you might try even 1M, but if your kernel or # network driver chokes on that, you have been warned. # sndbuf-size 512k; timeout 50; # 6 seconds (unit = 0.1 seconds) connect-int 10; # 10 seconds (unit = 1 second) ping-int 10; # 10 seconds (unit = 1 second) # Maximal number of requests (4K) to be allocated by DRBD. # The minimum is hardcoded to 32 (=128 kByte). # For high performance installations it might help if you # increase that number. These buffers are used to hold # datablocks while they are written to disk. # # max-buffers 2048; # The highest number of data blocks between two write barriers. # If you set this < 10 you might decrease your performance. # max-epoch-size 2048; # if some block send times out this many times, the peer is # considered dead, even if it still answers ping requests. # ko-count 4; # if the connection to the peer is lost you have the choice of # "reconnect" -> Try to reconnect (AKA WFConnection state) # "stand_alone" -> Do not reconnect (AKA StandAlone state) # "freeze_io" -> Try to reconnect but freeze all IO until # the connection is established again. on-disconnect reconnect; } syncer { # Limit the bandwith used by the resynchronisation process. # default unit is kByte/sec; optional suffixes K,M,G are allowed. # # Even though this is a network setting, the units are based # on _byte_ (octet for our french friends) not bit. # We are storage guys. # # Note that on 100Mbit ethernet, you cannot expect more than # 12.5 MByte total transfer rate. # Consider using GigaBit Ethernet. # rate 10M; # All devices in one group are resynchronized parallel. # Resychronisation of groups is serialized in ascending order. # Put DRBD resources which are on different physical disks in one group. # Put DRBD resources on one physical disk in different groups. # group 1; # Configures the size of the active set. Each extent is 4M, # 257 Extents ~> 1GB active set size. In case your syncer # runs @ 10MB/sec, all resync after a primary's crash will last # 1GB / ( 10MB/sec ) ~ 102 seconds ~ One Minute and 42 Seconds. # BTW, the hash algorithm works best if the number of al-extents # is prime. (To test the worst case performace use a power of 2) al-extents 257; } on clust0 { device /dev/drbd0; disk /dev/i2o/hda4; address 10.0.0.10:7788; meta-disk internal; # meta-disk is either 'internal' or '/dev/ice/name [idx]' # # You can use a single block device to store meta-data # of multiple DRBD's. # E.g. use meta-disk /dev/hde6[0]; and meta-disk /dev/hde6[1]; # for two different resources. In this case the meta-disk # would need to be at least 256 MB in size. # # 'internal' means, that the last 128 MB of the lower device # are used to store the meta-data. # You must not give an index with 'internal'. } on clust1 { device /dev/drbd0; disk /dev/i2o/hda4; address 10.0.0.15:7788; meta-disk internal; } }