From f71499b3b67f93b682783d9a4f868d8db2c1f076 Mon Sep 17 00:00:00 2001 From: pschwan Date: Fri, 20 Dec 2002 18:34:40 +0000 Subject: [PATCH] A sample upcall script that uses ping to automatically reconnect to an OST in peril --- lustre/utils/automatic-reconnect-sample | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 lustre/utils/automatic-reconnect-sample diff --git a/lustre/utils/automatic-reconnect-sample b/lustre/utils/automatic-reconnect-sample new file mode 100755 index 0000000..bf9ecc4 --- /dev/null +++ b/lustre/utils/automatic-reconnect-sample @@ -0,0 +1,34 @@ +#!/bin/sh + +if [ -z "$1" ]; then + echo "No UUID given to Lustre upcall!" | wall + exit 1 +fi + +# FIXME: OSTHOST can't be hard-coded! +OST=$1 +OSTHOST=dev7 +LUSTRE=/home/pschwan/lustre/lustre + +while ( ! ping -c 1 -w 3 $OSTHOST ) ; do + sleep 2 +done; + +echo -n "OST $OSTHOST UUID $OST responding to pings : " +date + +$LUSTRE/utils/lctl <