This file is indexed.

/etc/ha.d/resource.d/drbdupper is in drbd-utils 8.9.10-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
#
# This script is inteded to be used as resource script by heartbeat
#
# Dec 2005 by Philipp Reisner.
#
# In heartbeat's haresources you should have:
# IPAddr::XXX drbdupper::resource Filesystem::XXX
# in other words, you have to allocate the service IP before you
# try to activate the upper DRBD resource.
###

DEFAULTFILE="/etc/default/drbd"
DRBDADM="/sbin/drbdadm"

if [ -f $DEFAULTFILE ]; then
  . $DEFAULTFILE
fi

if [ "$#" -eq 2 ]; then
  RES="$1"
  CMD="$2"
else
  echo "A resource name is required."
  exit 10
fi

if [ "$RES" = "all" ]; then
  echo "A resource name is required."
  exit 10
fi

case "$CMD" in
    start)
	set -e # exit if one of these fails
	$DRBDADM primary `$DRBDADM -S sh-lr-of $RES`
	$DRBDADM -S check-resize $RES || true # may fail
	$DRBDADM -S adjust $RES
	$DRBDADM -S wait-connect $RES || true # may fail
	$DRBDADM -S primary $RES
	;;
    stop)
	$DRBDADM -S down $RES
	$DRBDADM secondary `$DRBDADM -S sh-lr-of $RES`
	;;
    status)
	if $DRBDADM -S role $RES | grep -q "Primary/"; then
		echo "running"
	else
		echo "stopped"
	fi
	;;
    *)
	echo "Usage: drbdupper {resource} {start|stop|status}"
	exit 1
	;;
esac

exit 0