[DRBD-user] NFS, DRBD, HEARTBEAT, and CentOS.

James Masson james.masson at lmax.com
Wed Sep 29 11:07:17 CEST 2010

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


I built an Active/Standby DRBD/NFS/Heartbeat/Pacemaker system on Monday - works perfectly - RHEL5.4
rather than Centos 5.5, but that shouldn't make a difference.

Here's some snippets of essential config. Extra critique from list users or Linbit is always
welcome... Hopefully Andreas @ Linbit is reading.

<drbd>
	handlers {
		pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh;
/usr/lib/drbd/notify-emergency-reboot.sh; reboot -nf";
		pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh;
/usr/lib/drbd/notify-emergency-reboot.sh; reboot -nf";
		local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-reboot.sh; reboot
-nf";
		fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
		split-brain "/usr/lib/drbd/notify-split-brain.sh root";
		out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root";
		after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
</drbd>


<crm>

primitive drbd_nfs ocf:linbit:drbd \
        params drbd_resource="msm-nfs" \
        op monitor interval="15s"
primitive fs_nfs_drupal ocf:heartbeat:Filesystem \
        params device="/dev/drbd/by-res/msm-nfs" directory="/mnt/drbd/nfs_drupal" fstype="ext3" \
        op monitor interval="5s"

primitive ip_nfs ocf:heartbeat:IPaddr2 \
        params ip="x.x.x" nic="br62" iflabel="NFS_VIP
        op monitor interval="5s"
primitive nfsd ocf:heartbeat:nfsserver \
        params nfs_ip="x.x.x.x" nfs_init_script="/etc/init.d/nfs" nfs_shared_infodir="/var/lib/nfs"
nfs_notify_cmd="/sbin/rpc.statd"
        meta target-role="Started"

group group_nfs fs_nfs_drupal ip_nfs ip_mgt nfsd
ms ms_drbd_nfs drbd_nfs \
        meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
target-role="Started"

colocation nfs_on_drbd inf: _rsc_set_ group_nfs ms_drbd_nfs:Master
order nfs_after_drbd inf: _rsc_set_ ms_drbd_nfs:promote group_nfs

</crm>


</etc/sysconfig/nfs >
RPCNFSDARGS="-N 4"
RPCNFSDCOUNT=32
NFSD_MODULE="noload"
RPCMTAB="noload"
STATD_HOSTNAME="x.x.x.x"
</>


Read this page - http://www.linux-ha.org/HaNFS

You'll need the replicated /var/lib/nfs setup and the modification to the standard Redhat nfs init
script.

Don't forget to turn all the init scripts related to NFS services off.

regards

James M



On 28/09/10 20:56, Chuck Payne wrote:
> Guys,
> 
>  
> 
> My back is against the wall. For a month I been trying to get a HA NFS server built using DRBD,
> CentOS 5.5, and Heartbeat.
> 
>  
> 
> I have ran into countless issues with nfs and heartbeat to the point that am thinking that heartbeat
> shouldn’t be used with nfs, or there something  that I am missing.
> 
>  
> 
> I thought I had found an better way of doing  my HA NFS with exportfs (http://ben.timby.com/?p=109),
> but I am hitting error that showmount –e.
> 
>  
> 
> Sep 28 18:27:37 atlsvpnfs03 exportfs[2044]: ERROR: Export not reported by showmount -e --no-header
> 
> Sep 28 18:27:37 atlsvpnfs03 exportfs[2126]: ERROR: exportfs: /var/lib/nfs/etab:2: syntax error: bad
> option list
> 
> Sep 28 18:27:37 atlsvpnfs03 exportfs[2126]: ERROR: Failed to un-export file system
> 
>  
> 
> There has to be a good how to for DRBD, CentOS 5.5 and setting up an HA-NFS Server with the current
> Heartbeat/Pacemaker.
> 
>  
> 
>  
> 
> *Chuck Payne*
> 
> *NEO Linux System Engineer*
> 
> *chuck.payne at vocolacity.com*
> 
> *Direct > 404-537-1234*
> 
> *1375 Peachtree St NE, Suite 175, Atlanta, GA 30309*
> 
> signature_logo_w-tagSignatureInc500-starburst_2010
> 
>  
> 
>  
> 
> 
> 
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user

The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company.



More information about the drbd-user mailing list