Skip to content
Snippets Groups Projects
Commit 42c24afe authored by Dennis Ahrens's avatar Dennis Ahrens
Browse files

gluster: only check your own brick

parent 331075ed
No related branches found
No related tags found
No related merge requests found
......@@ -24,12 +24,18 @@
#
# We currently only utilize the Online: Y information.
hostname=$(hostname)
# iterate over all available volumns
for volume in $(gluster volume list)
do
# find all bricks for this volume
for brick in $(gluster volume info $volume | grep -E '^Brick[0-9]: ' | sed -e 's/Brick[0-9]: //g')
do
# skip if this is not your own brick!
if [[ "$brick" != *"$hostname"* ]]; then
continue
fi
# grab the full status of this brick
brick_status=$(gluster volume status $volume $brick detail)
online=$(echo "$brick_status" | grep -E '^Online' | cut -d ':' -f2 | tr -d '[:space:]')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment