https://bugzilla.novell.com/show_bug.cgi?id=689622
https://bugzilla.novell.com/show_bug.cgi?id=689622#c0
Summary: Improvement: Add more configuration options to
nfsserver init script & YaST
Classification: openSUSE
Product: openSUSE 11.4
Version: Factory
Platform: Other
OS/Version: openSUSE 11.4
Status: NEW
Severity: Normal
Priority: P5 - None
Component: YaST2
AssignedTo: bnc-team-screening@forge.provo.novell.com
ReportedBy: joschibrauchle@gmx.de
QAContact: jsrain@novell.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4
Situation:
We are running a high-availability NFS server with Kerberos support in a two
node cluster. The two nodes use a shared hostname to provide the NFS service to
the clients.
Problem:
In order to run NFS with Kerberos support on a shared hostname (which is not
the ACTUAL hostname of any machine), the init script of the NFS server
(/etc/init.d/nfsserver) of the NFS client (/etc/init.d/nfs) need to be patched.
In case there would be any update to the NFS server or client, these changes
will be overwritten.
Solution:
Add configuration options to /etc/sysconfig/nfs that will be passed on to the
NFS server and client init scripts.
More details:
I adding the following options in /etc/init.d/nfsserver:
---------
1) Make the location of the rpc_pipefs directory configurable (because we link
/var/lib/nfs to a DRBD device, thus the standard path /var/lib/nfs/rpc_pipefs
is not available on the DRBD slave, which causes the nfs client to malfunction)
2) Add shared hostname as an option to SVCGSSD
3) Add shared hostname as an option to NFSD
---------
--- nfsserver 2011-04-25 17:36:21.000000000 +0200
+++ nfsserver.patched 2011-04-25 17:35:43.000000000 +0200
@@ -50,6 +50,12 @@
# with force-reload (in case signalling is not supported) are
# considered a success.
+# HA patches:
+RPC_PIPEFS_DIR=/var/lib/rpc_pipefs
+SVCGSSD_OPTIONS="-n"
+NFSD_OPTIONS="-H "
+
SVCGSSD_BIN=/usr/sbin/rpc.svcgssd
IDMAPD_BIN=/usr/sbin/rpc.idmapd
NFSD_BIN=/usr/sbin/rpc.nfsd
@@ -116,19 +122,19 @@
mount_rpc_pipefs() {
# See if the file system is there yet
- case `stat -c "%t" -f /var/lib/nfs/rpc_pipefs` in
+ case `stat -c "%t" -f $RPC_PIPEFS_DIR` in
*67596969*)
return 0;;
esac
- mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ mount -t rpc_pipefs rpc_pipefs $RPC_PIPEFS_DIR
}
umount_rpc_pipefs() {
- case `stat -c "%t" -f /var/lib/nfs/rpc_pipefs` in
+ case `stat -c "%t" -f $RPC_PIPEFS_DIR` in
*67596969*)
- umount /var/lib/nfs/rpc_pipefs;;
+ umount $RPC_PIPEFS_DIR;;
esac
}
@@ -138,7 +144,7 @@
done
mount_rpc_pipefs
- startproc $SVCGSSD_BIN
+ startproc $SVCGSSD_BIN $SVCGSSD_OPTIONS
return $?
}
@@ -226,7 +232,7 @@
fi
# rpc.nfsd
echo -n " nfsd"
- $NFSD_BIN $PARAMS $VERSION_PARAMS || {
+ $NFSD_BIN $NFSD_OPTIONS $PARAMS $VERSION_PARAMS || {
rc_status -v
rc_exit
}
--------
I would like to variables $RPC_PIPEFS_DIR, $SVCGSSD_OPTIONS and $NFSD_OPTIONS
to be added to /etc/sysconfig/nfs such that their values are kept even with an
update of the nfskernel server.
For statd and sm_notify there exist the corresponding options variables
$STATD_OPTIONS and $SM_NOTIFY_OPTIONS already, which are configurable via YaST!
The addition of the $RPC_PIPEFS_DIR variable also is included in the init
script of the nfs client:
--------
--- nfs 2011-04-25 17:43:08.000000000 +0200
+++ nfs.patched 2011-04-25 17:42:52.000000000 +0200
@@ -24,6 +24,9 @@
. /etc/rc.status
. /etc/sysconfig/nfs
+# HA patches:
+RPC_PIPEFS_DIR=/var/lib/rpc_pipefs
+
IDMAPD_BIN=/usr/sbin/rpc.idmapd
GSSD_BIN=/usr/sbin/rpc.gssd
STATD_BIN=/usr/sbin/rpc.statd
@@ -115,18 +118,18 @@
mount_rpc_pipefs() {
# See if the file system is there yet
- case `stat -c "%t" -f /var/lib/nfs/rpc_pipefs` in
+ case `stat -c "%t" -f $RPC_PIPEFS_DIR` in
*67596969*)
return 0;;
esac
- mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
+ mount -t rpc_pipefs rpc_pipefs $RPC_PIPEFS_DIR
}
umount_rpc_pipefs() {
# See if the file system is there
- case `stat -c "%t" -f /var/lib/nfs/rpc_pipefs` in
+ case `stat -c "%t" -f $RPC_PIPEFS_DIR` in
*67596969*)
- umount /var/lib/nfs/rpc_pipefs
+ umount $RPC_PIPEFS_DIR
esac
}
--------
Also, porting these changes to SLES11SP1 (or SP2) would be great, as we are
actually using an HA-NFS server with SLES11.1.
Reproducible: Always
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.