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