Skip to content

Instantly share code, notes, and snippets.

@canhnt
Last active October 25, 2018 20:55
Show Gist options
  • Save canhnt/6786caa8f189ffd9c24d48758d143746 to your computer and use it in GitHub Desktop.
Save canhnt/6786caa8f189ffd9c24d48758d143746 to your computer and use it in GitHub Desktop.
Gluster management

Check free storage in gluster nodes

for i in $(seq 1 9); do node="829k8xlstorage$i.company.org"; echo "$node checking:"; ssh $node 'df -h'; done 2>/dev/null | grep -E '829k8xlstorage|centos-root'

If any node free is lower than 18%, delete logs:

rm -f /var/log/glusterfs/gluster*
rm -f /var/log/glusterfs/bricks/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment