Skip to content

Instantly share code, notes, and snippets.

@thexa4
Created October 23, 2017 08:01
Show Gist options
  • Save thexa4/400554dc404db8a742b218647f195939 to your computer and use it in GitHub Desktop.
Save thexa4/400554dc404db8a742b218647f195939 to your computer and use it in GitHub Desktop.
Rebalance ceph
while true; do
sleep 5m;
if ceph -s | grep -q 'are blocked'; then
echo 'skip, blocked'
continue
fi
if ceph -s | grep -q 'osd down'; then
echo 'skip, osd down'
continue
fi
date
ceph osd reweight-by-utilization 120 0.01 1
echo
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment