Advertisement
marji

Active/Pasive HA NFS

Jun 26th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.63 KB | None | 0 0
  1. === cluster config ===
  2.  
  3. primitive p_exportfs_citools ocf:heartbeat:exportfs \
  4.     params fsid="1" directory="/srv/nfs/shared_ci_tools" options="rw,mountpoint,no_root_squash" clientspec="10.0.8.0/21" wait_for_leasetime_on_stop="true" unlock_on_stop="true" \
  5.     op monitor interval="30s" \
  6.     op start interval="0" timeout="40s" \
  7.     op stop interval="0" timeout="95s"
  8.  
  9. primitive p_fs_citools ocf:heartbeat:Filesystem \
  10.     params device="/dev/vgnas01/lvcitools" directory="/srv/nfs/shared_ci_tools" fstype="ext4" options="data=ordered" \
  11.     op monitor interval="10s" timeout="40s" \
  12.     op start interval="0" timeout="60s" \
  13.     op stop interval="0" timeout="60s"
  14.  
  15. primitive p_ip01 ocf:heartbeat:IPaddr2 \
  16.     params ip="10.0.10.103" \
  17.     op monitor interval="30s"
  18.  
  19. primitive p_lsb_nfsserver lsb:nfs \
  20.     op monitor interval="30s"
  21.  
  22. primitive p_lvm01 ocf:heartbeat:LVM \
  23.     params volgrpname="vgnas01"
  24.  
  25. primitive p_shoot_irvine stonith:fence_ipmilan \
  26.     params ipaddr="10.0.9.2" login="fence" passwd="pass" action="reboot" lanplus="true" power_wait="4" pcmk_host_list="irvine" \
  27.     meta target-role="Started"
  28.  
  29. primitive p_shoot_mitchell stonith:fence_ipmilan \
  30.     params ipaddr="10.0.9.3" login="fence" passwd="pass" action="reboot" lanplus="true" power_wait="4" pcmk_host_list="mitchell" \
  31.     meta target-role="Started"
  32.  
  33. primitive p_shoot_robson stonith:fence_ipmilan \
  34.     params ipaddr="10.0.9.4" login="fence" passwd="pass" action="reboot" lanplus="true" power_wait="4" pcmk_host_list="robson" \
  35.     meta target-role="Started"
  36.  
  37. group g_nas01 p_lvm01 p_fs_citools p_exportfs_citools p_ip01 \
  38.     meta resource-stickiness="101"
  39.  
  40. clone cl_lsb_nfsserver p_lsb_nfsserver \
  41.     params clone-max="2"
  42.  
  43. location l_cl_lsb_nfsserver cl_lsb_nfsserver -inf: robson
  44. location l_g_nas01 g_nas01 100: irvine
  45. location l_g_nas01_nfs g_nas01 -inf: robson
  46. location l_shoot_irvine p_shoot_irvine -inf: irvine
  47. location l_shoot_mitchell p_shoot_mitchell -inf: mitchell
  48. location l_shoot_robson p_shoot_robson -inf: robson
  49. property $id="cib-bootstrap-options" \
  50.     dc-version="1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558" \
  51.     cluster-infrastructure="openais" \
  52.     expected-quorum-votes="3" \
  53.     stonith-enabled="true" \
  54.     no-quorum-policy="stop" \
  55.     last-lrm-refresh="1340064031"
  56. rsc_defaults $id="rsc-options" \
  57.     resource-stickiness="50"
  58.  
  59.  
  60. === NFSv4 pseudofilesystem in /etc/exportfs instead of using exportfs RA ==
  61.  
  62. [ on both irvine and mitchell ]# cat /etc/exports
  63. /srv/nfs    10.0.10.0/24(ro,fsid=0)  10.0.12.0/24(ro,fsid=0)
  64.  
  65.  
  66.  
  67.  
  68. === show resource ===
  69.  
  70. [root@irvine ~]# crm resource show
  71.  p_shoot_irvine (stonith:fence_ipmilan) Started
  72.  p_shoot_mitchell   (stonith:fence_ipmilan) Started
  73.  p_shoot_robson (stonith:fence_ipmilan) Started
  74.  Resource Group: g_nas01
  75.      p_lvm01    (ocf::heartbeat:LVM) Started
  76.      p_fs_citools   (ocf::heartbeat:Filesystem) Started
  77.      p_exportfs_citools_ae1 (ocf::heartbeat:exportfs) Started
  78.      p_ip_nas01 (ocf::heartbeat:IPaddr2) Started
  79.  Clone Set: cl_lsb_nfsserver [p_lsb_nfsserver]
  80.      Started: [ mitchell irvine ]
  81.  
  82.  
  83.  
  84.  
  85. === used software ===
  86.  
  87. [root@irvine ~]# facter | egrep 'lsbdistid|lsbdistrelease'
  88. lsbdistid => CentOS
  89. lsbdistrelease => 6.2
  90.  
  91. [root@irvine ~]# rpm -qa | egrep 'pacemaker|corosync|agents'
  92.  
  93. corosync-1.4.1-4.el6_2.2.x86_64
  94. pacemaker-cli-1.1.6-3.el6.x86_64
  95. pacemaker-libs-1.1.6-3.el6.x86_64
  96. corosynclib-1.4.1-4.el6_2.2.x86_64
  97. pacemaker-cluster-libs-1.1.6-3.el6.x86_64
  98. pacemaker-1.1.6-3.el6.x86_64
  99. fence-agents-3.1.5-10.el6_2.2.x86_64
  100.  
  101. resource-agents-3.9.2-7.el6.x86_64
  102.    /usr/lib/ocf/resource.d/heartbeat/exportfs updated by hand from
  103.      https://github.com/ClusterLabs/resource-agents/commits/master/heartbeat/exportfs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement