Skip to content

Instantly share code, notes, and snippets.

@rsds143
Last active August 29, 2015 14:05
Show Gist options
  • Save rsds143/ba7956702e175092d221 to your computer and use it in GitHub Desktop.
Save rsds143/ba7956702e175092d221 to your computer and use it in GitHub Desktop.
clean up cassandra data direction on all nodes
#!/bin/bash
hosts = 10.1.10.200,10.1.10.201,10.1.10.202
dse_location = "/opt/dse-4.5.1"
for HOST in $hosts
do
ssh root@%HOST '$dse_location/bin/dse cassandra-stop'
ssh root@$HOST 'rm -fr /var/lib/cassandra'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment