find instances with slaves stuck in WFConnection
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Aug 2019 08:16:49 +0000 (10:16 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 27 Aug 2019 08:16:49 +0000 (10:16 +0200)
drbd-find-stuck-slaves.sh [new file with mode: 0755]

diff --git a/drbd-find-stuck-slaves.sh b/drbd-find-stuck-slaves.sh
new file mode 100755 (executable)
index 0000000..1b9fd80
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cat /proc/drbd | grep cs:WFConnection | cut -d: -f1 | tr -d ' ' | sed 's/^/drbd/' > /dev/shm/drbd.WFConnection
+ls -l /var/run/ganeti/instance-disks/ | grep -f /dev/shm/drbd.WFConnection