projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
031ae59
)
process each instance only once
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 29 Jan 2018 15:06:25 +0000
(16:06 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 29 Jan 2018 15:06:25 +0000
(16:06 +0100)
Useful for instances with more than one disk
gnt-drbd-secondary-rebuild.sh
patch
|
blob
|
history
diff --git
a/gnt-drbd-secondary-rebuild.sh
b/gnt-drbd-secondary-rebuild.sh
index
57c9fd9
..
0b22e63
100755
(executable)
--- a/
gnt-drbd-secondary-rebuild.sh
+++ b/
gnt-drbd-secondary-rebuild.sh
@@
-3,7
+3,7
@@
test -z "$1" && echo "Usage: $0 node" && exit 1
node=$1
-gnt-node list-drbd --no-headers $node | grep secondary | awk '{ print $3 }' | while read instance ; do
+gnt-node list-drbd --no-headers $node | grep secondary | awk '{ print $3 }' |
sort -u |
while read instance ; do
echo "## $instance";
gnt-instance stop $instance
gnt-instance modify -t plain $instance