File: drbd-lvchange%40.service

package info (click to toggle)
drbd-utils 9.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,760 kB
  • sloc: ansic: 48,975; xml: 11,553; cpp: 9,842; sh: 4,575; makefile: 1,031; perl: 353; ruby: 43
file content (14 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Unit]
Description= Backing LVM LVs for DRBD %I
PartOf=drbd@%i.target
Before=drbd@%i.service

[Service]
SyslogIdentifier=drbd-%I
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sh -c 'r="$1"; for d in $(drbdadm sh-ll-dev "$r") ; do test -b $d || [[ $d != /dev/*/* ]] && continue; lvchange -ay $d ; done' -- %I
ExecStopPost=-/bin/sh -c 'r="$1"; for d in $(drbdadm sh-ll-dev "$r") ; do test ! -b $d || [[ $d != /dev/*/* ]] && continue; lvchange -an $d ; done' -- %I

[Install]
RequiredBy=drbd@%i.service