samir82show

Linux Cluster configuration script

Jun 28th, 2014
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. #to create the cluster main configuration file
  4. echo -n "enter the first node name:"
  5. read Nodename1
  6. echo -n "enter the second node name:"
  7. read Nodename2
  8. echo -n "enter ricci password:"
  9. read RicciPass
  10. echo -n "enter the cluster name:"
  11. read Clustername
  12. echo -n "enter the quorum device name:"
  13. read QuorumDevice
  14. echo
  15. echo
  16.  
  17. mkqdisk -c $QuorumDevice -l Qlabel
  18.  
  19. service ricci restart
  20.  
  21. ccs -h $Nodename -p $Riccipass
  22.  
  23. echo "creating cluster configurarion file.."
  24. ccs -h $Nodename --createcluster $Clustername
  25.  
  26. ccs -h centos1_pub --setquorumd device=$QuorumDevice votes=1
  27.  
  28. echo "setting the fencing configuratio.."
  29. ccs -h $Nodename1 --setfencedaemon post_fail_delay=5 post_join_delay=10
  30.  
  31. ccs -h $Nodename1 --setlogging debug=on
  32.  
  33.  
  34. ccs -h $Nodename1 --addnode centos1_pub.home.com --votes=1 --nodeid=1
  35. ccs -h $Nodename1 --addnode centos2_pub.home.com --votes=1 --nodeid=2
  36.  
  37. ccs -h $Nodename1 --addservice erp_service
  38. ccs -h $Nodename1 --addsubservice erp_service fs name=erp_fs device=/dev/myvg1/vol1 mountpoint=/test1 fstype=ext4
  39.  
  40. ccs -h $Nodename1 -p $RicciPass --sync --activate
  41.  
  42. ccs -h $Nodename1 --stopall
  43. ccs -h $Nodename1 --startall
Advertisement
Add Comment
Please, Sign In to add comment