local rc=0
for mnt in $mnts ; do
- do_nodes $nodes "set -x; running=\\\$(grep -c $mnt' ' /proc/mounts);
+ do_nodes $nodes "running=\\\$(grep -c $mnt' ' /proc/mounts);
mpts=\\\$(mount | grep -w -c $mnt);
if [ \\\$running -ne \\\$mpts ]; then
echo \\\$(hostname) env are INSANE!;
echo "Starting client $clients: $OPTIONS $device $mnt"
- do_nodes $clients "set -x;
+ do_nodes $clients "
running=\\\$(mount | grep -c $mnt' ');
rc=0;
if [ \\\$running -eq 0 ] ; then
[ "$3" ] && force=-f
echo "Stopping clients: $clients $mnt (opts:$force)"
- do_nodes $clients "set -x; running=\\\$(grep -c $mnt' ' /proc/mounts);
+ do_nodes $clients "running=\\\$(grep -c $mnt' ' /proc/mounts);
if [ \\\$running -ne 0 ] ; then
echo Stopping client \\\$(hostname) client $mnt opts:$force;
lsof -t $mnt || need_kill=no;
shift
local progs=$@
- do_nodes $clients "set -x ; PATH=:$PATH; status=true;
+ do_nodes $clients "PATH=:$PATH; status=true;
for prog in $progs; do
if ! [ \\\"\\\$(which \\\$prog)\\\" -o \\\"\\\${!prog}\\\" ]; then
echo \\\$prog missing on \\\$(hostname);
}
cleanupall() {
+ nfs_client_mode && return
+
stopall $*
unload_modules
cleanup_gss
}
setupall() {
+ nfs_client_mode && return
+
sanity_mount_check ||
error "environments are insane!"
fi
}
+nfs_client_mode () {
+ if [ "$NFSCLIENT" ]; then
+ echo "NFSCLIENT mode: setup, cleanup, check config skipped"
+ local clients=$CLIENTS
+ [ -z $clients ] && clients=$(hostname)
+
+ # FIXME: remove hostname when 19215 fixed
+ do_nodes $clients "echo \\\$(hostname); grep ' '$MOUNT' ' /proc/mounts"
+ declare -a nfsexport=(`grep ' '$MOUNT' ' /proc/mounts | awk '{print $1}' | awk -F: '{print $1 " " $2}'`)
+ do_nodes ${nfsexport[0]} "echo \\\$(hostname); df -T ${nfsexport[1]}"
+ return
+ fi
+ return 1
+}
+
check_config () {
+ nfs_client_mode && return
+
local mntpt=$1
local mounted=$(mount | grep " $mntpt ")
}
check_and_setup_lustre() {
+ nfs_client_mode && return
+
local MOUNTED=$(mounted_lustre_filesystems)
if [ -z "$MOUNTED" ] || ! $(echo $MOUNTED | grep -w -q $MOUNT); then
[ "$REFORMAT" ] && formatall
check_config $MOUNT
init_facets_vars
init_param_vars
+
+ do_nodes $(comma_list $(nodes_list)) "lctl set_param debug=\\\"$PTLDEBUG\\\";
+ lctl set_param subsystem_debug=\\\"${SUBSYSTEM# }\\\";
+ lctl set_param debug_mb=${DEBUG_SIZE};
+ sync"
fi
if [ "$ONLY" == "setup" ]; then
exit 0
stripe_size=`awk '$1 ~ /size/ {print $2}' $tmp_file`
stripe_count=`awk '$1 ~ /count/ {print $2}' $tmp_file`
- stripe_index=`awk '/obdidx/ {start = 1; getline; print $1; exit}' $tmp_file`
+ stripe_index=`awk '$1 ~ /stripe_offset/ {print $2}' $tmp_file`
rm -f $tmp_file
}