1b411b363SPhilipp Reisner# 2b411b363SPhilipp Reisner# DRBD device driver configuration 3b411b363SPhilipp Reisner# 4b411b363SPhilipp Reisner 5*d2ec180cSLars Ellenbergcomment "DRBD disabled because PROC_FS or INET not selected" 6*d2ec180cSLars Ellenberg depends on PROC_FS='n' || INET='n' 7b411b363SPhilipp Reisner 8b411b363SPhilipp Reisnerconfig BLK_DEV_DRBD 9b411b363SPhilipp Reisner tristate "DRBD Distributed Replicated Block Device support" 10*d2ec180cSLars Ellenberg depends on PROC_FS && INET 11b411b363SPhilipp Reisner select LRU_CACHE 12*d2ec180cSLars Ellenberg select LIBCRC32C 13b411b363SPhilipp Reisner default n 14b411b363SPhilipp Reisner help 15b411b363SPhilipp Reisner 16b411b363SPhilipp Reisner NOTE: In order to authenticate connections you have to select 17b411b363SPhilipp Reisner CRYPTO_HMAC and a hash function as well. 18b411b363SPhilipp Reisner 19b411b363SPhilipp Reisner DRBD is a shared-nothing, synchronously replicated block device. It 20b411b363SPhilipp Reisner is designed to serve as a building block for high availability 21b411b363SPhilipp Reisner clusters and in this context, is a "drop-in" replacement for shared 22b411b363SPhilipp Reisner storage. Simplistically, you could see it as a network RAID 1. 23b411b363SPhilipp Reisner 24b411b363SPhilipp Reisner Each minor device has a role, which can be 'primary' or 'secondary'. 25b411b363SPhilipp Reisner On the node with the primary device the application is supposed to 26b411b363SPhilipp Reisner run and to access the device (/dev/drbdX). Every write is sent to 27b411b363SPhilipp Reisner the local 'lower level block device' and, across the network, to the 28b411b363SPhilipp Reisner node with the device in 'secondary' state. The secondary device 29b411b363SPhilipp Reisner simply writes the data to its lower level block device. 30b411b363SPhilipp Reisner 31b411b363SPhilipp Reisner DRBD can also be used in dual-Primary mode (device writable on both 32b411b363SPhilipp Reisner nodes), which means it can exhibit shared disk semantics in a 33b411b363SPhilipp Reisner shared-nothing cluster. Needless to say, on top of dual-Primary 34b411b363SPhilipp Reisner DRBD utilizing a cluster file system is necessary to maintain for 35b411b363SPhilipp Reisner cache coherency. 36b411b363SPhilipp Reisner 37b411b363SPhilipp Reisner For automatic failover you need a cluster manager (e.g. heartbeat). 38b411b363SPhilipp Reisner See also: http://www.drbd.org/, http://www.linux-ha.org 39b411b363SPhilipp Reisner 40b411b363SPhilipp Reisner If unsure, say N. 41b411b363SPhilipp Reisner 42b411b363SPhilipp Reisnerconfig DRBD_FAULT_INJECTION 43b411b363SPhilipp Reisner bool "DRBD fault injection" 44b411b363SPhilipp Reisner depends on BLK_DEV_DRBD 45b411b363SPhilipp Reisner help 46b411b363SPhilipp Reisner 47b411b363SPhilipp Reisner Say Y here if you want to simulate IO errors, in order to test DRBD's 48b411b363SPhilipp Reisner behavior. 49b411b363SPhilipp Reisner 50b411b363SPhilipp Reisner The actual simulation of IO errors is done by writing 3 values to 51b411b363SPhilipp Reisner /sys/module/drbd/parameters/ 52b411b363SPhilipp Reisner 53b411b363SPhilipp Reisner enable_faults: bitmask of... 54b411b363SPhilipp Reisner 1 meta data write 55b411b363SPhilipp Reisner 2 read 56b411b363SPhilipp Reisner 4 resync data write 57b411b363SPhilipp Reisner 8 read 58b411b363SPhilipp Reisner 16 data write 59b411b363SPhilipp Reisner 32 data read 60b411b363SPhilipp Reisner 64 read ahead 61b411b363SPhilipp Reisner 128 kmalloc of bitmap 62*d2ec180cSLars Ellenberg 256 allocation of peer_requests 63*d2ec180cSLars Ellenberg 512 insert data corruption on receiving side 64b411b363SPhilipp Reisner 65b411b363SPhilipp Reisner fault_devs: bitmask of minor numbers 66b411b363SPhilipp Reisner fault_rate: frequency in percent 67b411b363SPhilipp Reisner 68b411b363SPhilipp Reisner Example: Simulate data write errors on /dev/drbd0 with a probability of 5%. 69b411b363SPhilipp Reisner echo 16 > /sys/module/drbd/parameters/enable_faults 70b411b363SPhilipp Reisner echo 1 > /sys/module/drbd/parameters/fault_devs 71b411b363SPhilipp Reisner echo 5 > /sys/module/drbd/parameters/fault_rate 72b411b363SPhilipp Reisner 73b411b363SPhilipp Reisner If unsure, say N. 74