# drbd.conf example # # parameters you _need_ to change are the hostname, device, disk, # address and port in the "on {}" sections, as well as # the disk-size. # # you ought to know about the protocol, inittimeout, # skip-wait and load-only; and the fsckcmd. # # you probably want to set the sync-min/-max, and maybe -nice. # # Common Trouble: # increase the tl-size if you encounter "tl-size too small!!". # # increase timeout and maybe ping-int in net{}, if you see # problems with "connection lost/connection enabled" # (or change your setup to reduce network latency; make sure full # duplex behaves as such; check average roundtrip times while # network is saturated ...) # # global { # use this if you want to define more resources later # without reloading the module. # by default we load the module with exactly as many devices # as configured mentioned in this file. # minor_count=5 # this is for people who set up a drbd device via the # loopback network interface or between two VMs on the same # box, for testing/simulating/presentation # otherwise it could trigger a run_tasq_queue deadlock. # I'm not sure whether this deadlock can happen with two # nodes, but it seems at least extremly unlikely; and since # the io_hints boost performance, keep them enabled. # disable_io_hints # } # # this need not be drbd#, you may use phony resource names, # like "resource web" or "resource mail", too # resource drbd0 { # transfer protocol to use. # C: write IO is reported as completed, if we know it has # reached _both_ local and remote DISK. # * for most cases. # * the only protocol with true transactional semantics. # B: write IO is reported as completed, if it has reached # local DISK and remote buffer cache. # * should perform better than C, # but according to benchmarks, does not. # so use C instead for now. # 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 protocol = C # command to run by the datadisk script prior to mounting the # device. with journaling fs, you might want to replace this # with /bin/true ... #fsckcmd = fsck -p -y fsckcmd = /bin/true # if inittimeout is positive will _force_ Primary status if # connection could not be established within that time # (seconds). *this may compromise your data integrity* # # a negative value indicates that drbd should stay WFConnection # Secondary/Unknown and just continue the boot process, thus # leaving the decision to the cluster manager # # not given/0: wait until the partner node shows up, or # some operator intervenes; do not timeout. # inittimeout=60 # skip-wait is actually skip-wait-for-sync ... # we wait for connection regardless (but see inittimeout above) # skip-wait # load-only: load the configuration data to the module only. # if you have a reasonably intelligent cluster manager, # you may want to use this instead of a negative # inittimeout for an unattended setup. this will not slow # down the boot process even if the partner node is not # seen. # load-only # what should be done in case the cluster starts up in # degraded mode, but knows it has inconsistent data # the default is: do nothing here, but leave it to the # cluster manager/operator. # incon-degr-cmd=halt -f disk { # if the lower level device reports io-error, we panic! # (standby node takes over) # comment this out, if you want to survive this, e.g. you do testing # only, or you have other means to cope with that. do-panic # the device size in bytes, default unit is k (1 block == 1024 bytes) # should be the minimum of the sizes of the lower level devices of # the nodes. # (since we often use 4k as logical block size, # and I see "access beyond end of device" in some rare cases, when # someone tries to access the last logical block with full block # size, but it is some sectors shorter -- not drbd's fault, anyways) # it is probably best rounded _down_ to the next multiple of 4 disk-size = 12491804k } # you can reconfigure the sync rate at runtime using # drbdsetup on the primary. on testrechner1 { device = /dev/nb0 disk = /dev/2/hda1 address = 10.19.250.104 port = 7788 } on testrechner2 { device = /dev/nb0 disk = /dev/1/hda2 address = 10.19.250.52 port = 7788 } }