1DRBD@.TARGET(7) DRBD Manual DRBD@.TARGET(7)
2
3
4
6 drbd@.target - System target unit indicating a configured (optionally:
7 promotable) DRBD resource
8
10 drbd@.target
11
12
14 Usually you do not want to "hardcode" an unconditional promotion
15 attempt of DRBD resources, because you usually cannot know a-priory
16 whether this instance of DRBD will have access to good data (yet).
17
18 Typical setups are using a cluster manager like pacemaker or the less
19 feature rich but also less complex drbd-reactor to coordinate promotion
20 attempts and service starts.
21
22 But in situation where you "know" that you always want this node to
23 promote and use DRBD and the peer(s) are never going to take over, but
24 only used for "DR" purposes, then this target unit may be useful.
25
26 It is intended to be used as dependency of any mount or other use of
27 the specific DRBD resource. The implicit dependency on
28 drbd@RESNAME.service will configure DRBD, an optional
29 drbd-lvchange@RESNAME.service can be used to attempt to activate the
30 backend logical volumes first. The optional (but in this scenario
31 necessary) drbd-wait-promotable@RESNAME.service is then used to wait
32 for DRBD to connect to its peers and establish access to good data.
33
34
36 Assuming you have a DRBD resource named webdata, its backing devices
37 being LVM logical volumes, with an xfs on one volume showing up as
38 /dev/drbd0, this should make your boot sequence successfully mount that
39 drbd to /mnt/point (unless DRBD really finds no access to good data in
40 time, or some peer is already primary):
41
42
43 systemctl enable drbd-lvchange@webdata.service
44 systemctl enable drbd-wait-promotable@webdata.service
45 echo "/dev/drbdX /mnt/point xfs defaults,nofail,x-systemd.requires=drbd@webdata.target 0 0" >> /etc/fstab
46
47
48
50 drbd-reactor(1), drbd-reactor.promoter(5)
51
52
54 LINBIT HA Solutions GmbH https://linbit.com
55
56
57
58drbd-utils 2022-07-10 DRBD@.TARGET(7)