diff options
Diffstat (limited to 'scripts/clvmd_init_red_hat.in')
-rw-r--r-- | scripts/clvmd_init_red_hat.in | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/clvmd_init_red_hat.in b/scripts/clvmd_init_red_hat.in index ca3a9e41..2a4c1878 100644 --- a/scripts/clvmd_init_red_hat.in +++ b/scripts/clvmd_init_red_hat.in @@ -146,7 +146,17 @@ restart() { # another start. Even if start is protected by rh_status_q, # that would avoid spawning another daemon, it would try to # reactivate the VGs. - stop && start + + # Try to get clvmd to restart itself. This will preserve + # exclusive LV locks + action "Restarting $DAEMON: " $DAEMON -S || return $? + + # If that fails then do a normal stop & restart + if [ $? != 0 ]; then + stop && start + else + touch $LOCK_FILE + fi } # See how we were called. |