File: drbd%40.service

package info (click to toggle)
drbd-utils 9.22.0-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,768 kB
  • sloc: ansic: 48,975; xml: 11,553; cpp: 9,843; sh: 4,568; makefile: 1,029; perl: 353; ruby: 43
file content (42 lines) | stat: -rw-r--r-- 1,432 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[Unit]
Description= (Re)configure DRBD resource %I

PartOf=drbd@%i.target

# We really want the network to be online.
# You may need to do one of
# systemctl enable NetworkManager-wait-online.service
# systemctl enable systemd-networkd-wait-online.service
Wants=network-online.target sshd.service
After=network-online.target nss-lookup.target sshd.service
# If drbd-proxy is used, we want it to be running already.
After=drbdproxy.service

# This is not intended to be combined with pacemaker,
# but if combined, it should be ordered before pacemaker.
Before=pacemaker.service

#
# in an instantiation of this service,
# you may want to add "BindsTo=/dev/vg/lv" and "After=" for all backing devices
#
# if this is on top of LVM,
# you may want to: systemctl enable drbd-lvchange@%i.service
#
# if you mean to immediately use this device (auto-promote, or
# mount via fstab x-systemd.requires=drbd@$resname.target),
# you may want to: systemctl enable drbd-wait-promotable@%i.service
# 

[Service]
SyslogIdentifier=drbd-%I
Type=oneshot
RemainAfterExit=yes

# depends... do we want this as ExecCondition or as ExecStart
# failed start is "failed", failed condition is just "not startable yet"
ExecStart=/lib/drbd/scripts/drbd-service-shim.sh adjust %I
ExecReload=/lib/drbd/scripts/drbd-service-shim.sh adjust %I

# can only succeed, if you first stop all depending services
ExecStopPost=/lib/drbd/scripts/drbd-service-shim.sh down %I