- [Show page]
- [Old revisions]
- [[unknown link type]]
- []
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:cluster [2015/12/07 16:13] vondra created |
linux:cluster [2015/12/07 16:16] (current) vondra |
||
---|---|---|---|
Line 52: | Line 52: | ||
</rm> | </rm> | ||
</cluster> | </cluster> | ||
+ | </code> | ||
+ | ====== start_cluster.sh ====== | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | report_err(){ | ||
+ | echo "$1" | ||
+ | } | ||
+ | |||
+ | echo "Starting cluster services..." | ||
+ | echo "Starting cman" | ||
+ | #cman_tool -wt10 join || report_err 'unable to join cluster' | ||
+ | service cman start || report_err 'unable to join cluster' | ||
+ | sleep 10 | ||
+ | |||
+ | echo "Starting clvm" | ||
+ | service clvm start || report_err 'unable to start clvm' | ||
+ | |||
+ | sleep 5 | ||
+ | |||
+ | echo "Starting gfs2" | ||
+ | service gfs2-cluster restart | ||
+ | service gfs2 start || report_err 'unable to start gfs2' | ||
+ | mount /dev/shared_vg/configurations /shared || report_err 'unable to mount /shared' | ||
+ | |||
+ | echo "Cluster succesfully started!" | ||
+ | </code> | ||
+ | ====== stop_cluster.sh ====== | ||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | report_err(){ | ||
+ | echo "$1" | ||
+ | } | ||
+ | |||
+ | |||
+ | echo "Stopping cluster..." | ||
+ | service rgmanager stop || report_err 'rgmanager stopping failed' | ||
+ | echo "rgmanager stopped!" | ||
+ | service gfs2 stop || report_err 'gfs2 stopping failed' | ||
+ | echo "gfs2 stopped!" | ||
+ | sleep 2 | ||
+ | service clvm stop || report_err 'clvm stopping failed' | ||
+ | echo "CLVM stopped!" | ||
+ | sleep 5 | ||
+ | killall fenced | ||
+ | |||
+ | cman_tool -wt10 leave remove || report_err 'leaving cluster failed' | ||
+ | service cman stop leave || report_err 'cman stopping failed' | ||
</code> | </code> | ||
linux/cluster.1449501235.txt.gz · Last modified: 2015/12/07 16:13 by vondra