Loading...
Loading...
When using the HPE HA NFS Toolkit with HPE Serviceguard for Linux to achieve high availability for NFS exports, it is necessary to set the NFS Grace Time on the NFS server nodes to allow time for kernel NFS locks to release in the event of a package failover. Setting this value causes the NFS package halt to wait the configured number of seconds before proceeding with the unmount of the filesystems containing the NFS exported directories and the volume group deactivation of the package volume groups.Not setting this value will cause the package to immediately attempt to unmount the filesystems and deactivate volume groups upon package stop and this may result in filesystem and volume group "busy" type errors during the unmount and deactivate operations that can eventually result in package halt failure and the package may be disallowed to start on adoptive nodes.The example below shows a value of 30 seconds; however, that value was chosen at random for demonstration purposes only. The actual value used for any installation will be dependent on factors including the activity of the system and the tolerance to wait for package halt. Typical values range from 15 to 45 seconds; however, testing may be required for any particular cluster with a value chosen based on business recovery needs and outage durations allowed for the particular environment.
Any HPE Serviceguard for Linux cluster running the HA NFS Toolkit version 12.50.00 or later on Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, SUSE Linux Enterprise Server 12, or SUSE Linux Enterprise Server 15.
The procedure to implement the NFS grace time varies from one Linux distribution to another as well as from one major release to another within a given distribution. This document will attempt to cover the most common variations for Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, SUSE Linux Enterprise Server 12, and SUSE Linux Enterprise Server 15.HPE will continue to update this advisory; however, the implementation is subject to change, therefore, if the information provided does not work, refer to the Linux distribution documentation for a more up-to-date discussion of the settings.In all cases, the current value of the setting can be retrieved by running the following command as root. The value returned is in seconds.# sysctl fs.nfs.nlm_grace_periodfs.nfs.nlm_grace_period = 30#Note: The value will be undefined until NFS is either started by a Serviceguard package or NFS daemons are started manually outside of Serviceguard. All Serviceguard HA NFS packages must be halted to set or change the timeout. The timeout must be set separately on each node of the cluster where a HA NFS package may run but should be the same value across all nodes of the cluster.====Red Hat Enterprise Linux 7.xEdit the /etc/sysconfig/nfs file and set the following two parameters to the value that is best for the specific server environment:NFSD_V4_GRACE=30NFSD_V4_LEASE=30====Red Hat Enterprise Linux 8.x and Red Hat Enterprise Linux 9.xEdit the /etc/nfs.conf file and set the following two parameters to the value that is best for the specific server environment:grace-time=30lease-time=30====SUSE Linux Enterprise Server 12.xEdit the /etc/sysconfig/nfs file and set the single parameter to the value that is best for the specific server environment:NFSV4LEASETIME="30"====SUSE Linux Enterprise Server 15.x (requires editing two files)Edit the /etc/sysconfig/nfs file and set the single parameter to the value that is best for the specific server environment:NFSV4LEASETIME="30"Edit the /etc/nfs.conf file and uncomment and change the value of "grace-time" to pull from the NFSV4LEASETIME parameter set in /etc/sysconfig/nfs:# grace-time=90grace-time=$NFSV4LEASETIMElease-time=$NFSV4LEASETIMEAfter making this change, either reboot the system or restart the nfs-mountd.service.====IMPORTANT: In all cases, HA NFS packages must be down and the value will not be set until the NFS daemons are either started by the Serviceguard HA NFS package or started manually by systemd commands outside of Serviceguard cluster control.Once set, verify that the setting is in effect by halting the HA NFS package and checking the package log to look for an entry similar to the following:Nov 1 11:12:27 root@sles15324 master_control_script.sh[3712]: ######Halting package nfs ######...Nov 1 11:12:27 - Node "sles15324": Package halt sleeping for NLM graceperiod time to ensure all the locks are releasedNov 1 11:12:57 root@sles15324 filesystem.sh[3854]: Unmounting filesystemon /nfs_export...Nov 1 11:13:14 root@sles15324 master_control_script.sh[3712]: ######Package halt completed for nfs ######Note: The 30-second gap between the "sleeping for NLM grace period" and the following "Unmounting filesystem" line, should match the value set in the operating system config files.Document VersionRelease DateDetails3May 8, 2024Added Red Hat Enterprise Linux 9 as affected.2January 12, 2023Added HA NFS Toolkit version 12.50.00 (or later) to scope.1November 17, 2022Original Document Release.
Operating Systems Affected:Red Hat Enterprise Linux 7 Server, Red Hat Enterprise Linux 8 Server, Red Hat Enterprise Linux 9, SUSE Linux Enterprise Server 12, SUSE Linux Enterprise Server 15
Click on a version to see all relevant bugs
Hewlett Packard Enterprise Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.