[ewg] [RFC] ofa_kernel.spec: add rpc.statd to nfsserver scripts for SLES10

Jon Mason jon at opengridcomputing.com
Mon Nov 16 15:25:11 PST 2009


If no one has any objection to this, I'd like to push it into OFED 1.5

Thanks,
Jon

On Thu, Nov 12, 2009 at 06:20:10PM -0600, Jon Mason wrote:
> I created this patch to handle a re-occurring issue with NFSRDMA on
> SLES10.  Due to the NFS implementation native to SLES10 handling NFS
> locking inside the kernel, there are no user space locking daemons
> running.  However, newer NFS code requires locking in user space.  This
> is not an issue for all other distros, as they already have the
> necessary user space daemons and scripts in-place to start them.  I have
> added the user space locking daemons to rnfs-utils for SLES10, but they
> need to be started by hand (in addition to starting the NFS service
> script).  I have documented this requirement in the OFED docs, but there
> seem to be a number of bugs being opened with the cause being a lack of
> running the user space daemon.
> 
> I believe the only way to solve this situation is to add the locking
> daemons to the NFS server scripts for SLES10, thus giving SLES10 the
> behavior that the users are expecting.  I created a patch to
> ofa_kernel.spec to add the locking daemons if NFS is being installed via
> OFED and removed on uninstallation.  I have verified that this handles
> the situation on my systems, but I want to get feedback on the
> implementation before I request it be pulled in OFED.
> 
> Thoughts?
> 
> Thanks,
> Jon
> 
> commit 0bfcc2d69e01a212f1835a4db54c20500c52ebce
> Author: Jon Mason <jon at opengridcomputing.com>
> Date:   Thu Nov 12 11:00:14 2009 -0600
> 
>     Add logic to apply rnfs_sles10.patch when installing OFED NFS on SLES10.
>     This will add start/stop of rpc.statd to nfsserver init.d script.
>     
>     This fixes bug 1810
>     
>     Signed-off-by: Jon Mason <jon at opengridcomputing.com>
> 
> diff --git a/ofed_scripts/ofa_kernel.spec b/ofed_scripts/ofa_kernel.spec
> index db3723c..582371b 100755
> --- a/ofed_scripts/ofa_kernel.spec
> +++ b/ofed_scripts/ofa_kernel.spec
> @@ -319,7 +319,12 @@ sed -i -e 's/KERNEL==/KERNEL=/g'  $RPM_BUILD_ROOT/etc/udev/rules.d/90-ib.rules
>  ;;
>  esac
>  %endif
> -	
> +
> +%if %{build_nfsrdma}
> +	#determine if it is SLES10, if so need to add rpc.statd to the nfsserver script
> +	test `uname -r | cut -d "-" -f 1` = "2.6.16.60" && patch -p0 < $RPM_BUILD_DIR/%{_name}-%{_version}/ofed_scripts/rnfs_sles10.patch
> +%endif
> +
>  %clean
>  #Remove installed driver after rpm build finished
>  rm -rf $RPM_BUILD_ROOT
> @@ -688,6 +693,11 @@ fi
>  
>  fi
>  
> +%if %{build_nfsrdma}
> +	#determine if it is SLES10, if so need to add rpc.statd to the nfsserver script
> +	test `uname -r | cut -d "-" -f 1` = "2.6.16.60" && sed -i -e '/rpc.statd/{N;d;}' /etc/init.d/nfsserver
> +%endif
> +
>  %postun -n kernel-ib-devel
>  
>  ###
> diff --git a/ofed_scripts/rnfs_sles10.patch b/ofed_scripts/rnfs_sles10.patch
> new file mode 100644
> index 0000000..6476331
> --- /dev/null
> +++ b/ofed_scripts/rnfs_sles10.patch
> @@ -0,0 +1,20 @@
> +--- /etc/init.d/nfsserver.orig	2009-11-12 10:45:37.000000000 -0600
> ++++ /etc/init.d/nfsserver	2009-11-12 11:02:27.000000000 -0600
> +@@ -107,6 +107,8 @@ case "$1" in
> +        echo "+2 +3 -4" > /proc/fs/nfsd/versions
> +       fi
> +       nfs4_bind_mounts
> ++      /sbin/rpc.statd
> ++      rc_status
> +       /usr/sbin/exportfs -r 
> +       rc_status
> +       /usr/sbin/rpc.nfsd $PARAMS
> +@@ -136,6 +138,8 @@ case "$1" in
> + 	umount /proc/fs/nfsd
> + 	rc_status
> +       fi
> ++      killall /sbin/rpc.statd
> ++      rc_status
> +       nfs4_unbind_mounts
> +       rc_status -v
> +       ;;
> _______________________________________________
> ewg mailing list
> ewg at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg



More information about the ewg mailing list