diff --git a/nfs-utils.changes b/nfs-utils.changes index f735f73..249bc5b 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Jun 2 06:48:03 UTC 2011 - nfbrown@novell.com + +- nfsserver.init, sysconfig.nfs: add NFSV4LEASETIME + parameter to allow lease time to be set. + bnc#681510 + +------------------------------------------------------------------- +Tue May 31 11:43:41 UTC 2011 - lnussel@suse.de + +- use /var/run/nfs instead of /var/lock/subsys + ------------------------------------------------------------------- Tue May 31 01:41:58 UTC 2011 - nfbrown@novell.com diff --git a/nfs-utils.spec b/nfs-utils.spec index 3b59b17..73d619a 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -205,6 +205,15 @@ useradd -r -c 'NFS statd daemon' \ %post -n nfs-client chown statd:nogroup /var/lib/nfs chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || : +### migrate from /var/lock/subsys +[ -d /var/run/nfs ] || mkdir /var/run/nfs +if [ -f /var/lock/subsys/nfs-rpc.idmapd ]; then + mv /var/lock/subsys/nfs-rpc.idmapd /var/run/nfs +fi +if [ -f /var/lock/subsys/nfsserver-rpc.idmapd ]; then + mv /var/lock/subsys/nfsserver-rpc.idmapd /var/run/nfs +fi +### [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup %{fillup_and_insserv -n nfs nfs} # @@ -225,6 +234,15 @@ chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || : %stop_on_removal nfsserver %post -n nfs-kernel-server +### migrate from /var/lock/subsys +[ -d /var/run/nfs ] || mkdir /var/run/nfs +if [ -f /var/lock/subsys/nfs-rpc.idmapd ]; then + mv /var/lock/subsys/nfs-rpc.idmapd /var/run/nfs +fi +if [ -f /var/lock/subsys/nfsserver-rpc.idmapd ]; then + mv /var/lock/subsys/nfsserver-rpc.idmapd /var/run/nfs +fi +### %{fillup_and_insserv nfsserver} %postun -n nfs-kernel-server diff --git a/nfs.init b/nfs.init index e52d178..8624062 100644 --- a/nfs.init +++ b/nfs.init @@ -24,12 +24,13 @@ . /etc/rc.status . /etc/sysconfig/nfs +# XXX: there should be separate init scripts for these really IDMAPD_BIN=/usr/sbin/rpc.idmapd GSSD_BIN=/usr/sbin/rpc.gssd STATD_BIN=/usr/sbin/rpc.statd -IDMAPD_CLIENT_STATE=/var/lock/subsys/nfs-rpc.idmapd -IDMAPD_SERVER_STATE=/var/lock/subsys/nfsserver-rpc.idmapd +IDMAPD_CLIENT_STATE=/var/run/nfs/nfs-rpc.idmapd +IDMAPD_SERVER_STATE=/var/run/nfs/nfsserver-rpc.idmapd NEED_IDMAPD=no NEED_GSSD=no @@ -213,7 +214,8 @@ case "$1-$nfs" in rc_status -v rc_exit } - echo $IDMAPD_BIN > $IDMAPD_CLIENT_STATE + [ -d /var/run/nfs ] || mkdir /var/run/nfs + echo $IDMAPD_BIN > $IDMAPD_CLIENT_STATE fi rc_status -v diff --git a/nfsserver.init b/nfsserver.init index e037df6..6f626a8 100644 --- a/nfsserver.init +++ b/nfsserver.init @@ -50,12 +50,13 @@ rc_reset # with force-reload (in case signalling is not supported) are # considered a success. +# XXX: there should be separate init scripts for these really SVCGSSD_BIN=/usr/sbin/rpc.svcgssd IDMAPD_BIN=/usr/sbin/rpc.idmapd NFSD_BIN=/usr/sbin/rpc.nfsd -IDMAPD_CLIENT_STATE=/var/lock/subsys/nfs-rpc.idmapd -IDMAPD_SERVER_STATE=/var/lock/subsys/nfsserver-rpc.idmapd +IDMAPD_CLIENT_STATE=/var/run/nfs/nfs-rpc.idmapd +IDMAPD_SERVER_STATE=/var/run/nfs/nfsserver-rpc.idmapd NEED_SVCGSSD=no NEED_IDMPAPD=no @@ -187,6 +188,10 @@ case "$1" in if [ " `cat /proc/fs/nfsd/threads`" = " 0" ]; then echo $VERSION_LIST > /proc/fs/nfsd/versions fi + if [ -n "$NFSV4LEASETIME" -a -f /proc/fs/nfsd/nfsv4leasetime ]; then + echo "$NFSV4LEASETIME" > /proc/fs/nfsd/nfsv4leasetime + fi + nfs4_bind_mounts # svcgssd; idmapd if [ "$NEED_SVCGSSD" = yes ]; then @@ -202,6 +207,7 @@ case "$1" in rc_status -v rc_exit } + [ -d /var/run/nfs ] || mkdir /var/run/nfs echo $IDMAPD_BIN > $IDMAPD_SERVER_STATE fi # exportfs diff --git a/sysconfig.nfs b/sysconfig.nfs index a744624..a819ae0 100644 --- a/sysconfig.nfs +++ b/sysconfig.nfs @@ -86,3 +86,17 @@ NFS_START_SERVICES="yes" # STATD_OPTIONS="" +## Path: Network/File systems/NFS server +## Description: Lease time for NFSv4 leases +## Type: integer +## Default: "" +# +# Set the lease time for the NFSv4 server. This allows new locks +# to be taken sooner after a server restart, so it is useful for +# servers which need to recover quickly after a failure, particularly +# in fail-over configurations. Reducing the lease time can be a +# problem is some clients connect over high latency networks. +# The default is 90 seconds. A number like 15 might be appropriate +# in a fail-over configuration with all clients on well connected +# low latency links. +NFSV4LEASETIME=""