From 2913cc93a9a172caf9e0d6675cfa4de4cc957b13 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 14 Oct 2010 08:12:41 +1100 Subject: [PATCH] try to restart NFS LOCKD if it failed to start --- config/events.d/60.nfs | 7 ++++++- config/functions | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs index cd5219aa..ed96ab87 100755 --- a/config/events.d/60.nfs +++ b/config/events.d/60.nfs @@ -79,7 +79,12 @@ case "$1" in } || exit $? # check that lockd responds to rpc requests - ctdb_check_rpc "lockd" 100021 1 + (ctdb_check_rpc "lockd" 100021 1) + [ $? = "0" ] || { + echo "Trying to restart lock manager service" + startstop_nfslock restart + exit 1 + } # mount needs special handling since it is sometimes not started # correctly on RHEL5 diff --git a/config/functions b/config/functions index 9771905e..9659d48d 100755 --- a/config/functions +++ b/config/functions @@ -417,6 +417,10 @@ startstop_nfslock() { stop) service nfsserver stop > /dev/null 2>&1 ;; + restart) + service nfsserver stop + service nfsserver start + ;; esac ;; rhel) @@ -427,6 +431,10 @@ startstop_nfslock() { stop) service nfslock stop > /dev/null 2>&1 ;; + restart) + service nfslock stop + service nfslock start + ;; esac ;; *) -- 2.34.1