fi
}
+##################################################
+# failover support
+
+nfs_startipreallocate()
+{
+ # Put the lock manager into grace
+ #
+ # We must let some time pass between stopping and restarting
+ # the lock manager. Otherwise there is a window where the
+ # lock manager will respond "strangely" immediately after
+ # restarting it, which causes clients to fail to reclaim their
+ # locks.
+ nfs_callout_init
+ service_stop "nlockmgr" >/dev/null 2>&1
+ sleep 2
+ service_start "nlockmgr" >/dev/null 2>&1
+}
+
##################################################
# monitor-post support
start)
service_start "$2"
;;
+startipreallocate)
+ nfs_startipreallocate
+ ;;
monitor-list-shares)
nfs_monitor_list_shares
;;
register)
nfs_register
;;
-monitor-pre | releaseip | takeip | startipreallocate)
+monitor-pre | releaseip | takeip)
# Not required/implemented
:
;;
dir=$(find_statd_sm_dir)
rm -f "${dir}/"* "${dir}.bak/"*
- # We must also let some time pass between stopping and
- # restarting the lock manager. Otherwise there is a window
- # where the lock manager will respond "strangely" immediately
- # after restarting it, which causes clients to fail to reclaim
- # their locks.
- nfs_callout_init
- "$CTDB_NFS_CALLOUT" "stop" "nlockmgr" >/dev/null 2>&1
- sleep 2
- "$CTDB_NFS_CALLOUT" "start" "nlockmgr" >/dev/null 2>&1
-
statd_state="${statd_callout_state_dir}/.statd_state"
list_records >"$statd_state"