Both nfs and nfslock scripts can fail under redhat in very rare situations.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 28 Oct 2010 02:43:57 +0000 (13:43 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 28 Oct 2010 02:45:40 +0000 (13:45 +1100)
Ctdb can also be configured to ignore checking for knfsd and if it is alive.
In that situation, no attempt will be made to restart nfs, and sicne nfs is not running,  lockd can not be restarted either.

To workaround this, everytime we try to restart the lockmanager, also try to restart nfsd

config/events.d/60.nfs

index ed96ab87e74fbf4684173efcf5ccaf30165e9a5d..57c81d3520e4f913e7039ba793e587d364357013 100755 (executable)
@@ -82,6 +82,7 @@ case "$1" in
        (ctdb_check_rpc "lockd" 100021 1)
        [ $? = "0" ] || {
                echo "Trying to restart lock manager service"
+               startstop_nfs restart
                startstop_nfslock restart
                exit 1
        }