fi
do_nodes $clients "
-running=\\\$(mount | grep -c $mnt' ');
-rc=0;
-if [ \\\$running -eq 0 ] ; then
- mkdir -p $mnt;
- $MOUNT_CMD $flags $opts $device $mnt;
- rc=\\\$?;
-fi;
-exit \\\$rc" || return ${PIPESTATUS[0]}
+ running=\\\$(mount | grep -c $mnt' ');
+ rc=0;
+ if [ \\\$running -eq 0 ] ; then
+ mkdir -p $mnt;
+ $MOUNT_CMD $flags $opts $device $mnt;
+ rc=\\\$?;
+ else
+ lustre_mnt_count=\\\$(mount | grep $mnt' ' | \
+ grep 'type lustre' | wc -l);
+ if [ \\\$running -ne \\\$lustre_mnt_count ] ; then
+ echo zconf_mount_clients FAILED: \
+ mount count \\\$running, not matching \
+ with mount count of 'type lustre' \
+ \\\$lustre_mnt_count;
+ rc=1;
+ fi;
+ fi;
+ exit \\\$rc" || return ${PIPESTATUS[0]}
echo "Started clients $clients: "
do_nodes $clients "mount | grep $mnt' '"
wait_update $HOSTNAME "eval $cmd" $OSTCOUNT ||
error "wait_update OSTs up on client failed"
- cmd="$LCTL get_param -n lod.$FSNAME-MDT*-*.target_obd | sort -u |
- awk 'BEGIN {c = 0} /ACTIVE/{c += 1} END {printf \\\"%d\\\", c}'"
+ cmd="$LCTL get_param osp.$FSNAME-OST*-MDT0000.prealloc_last_id |
+ awk '/=[1-9][0-9]/ { c += 1 } END { printf \\\"%d\\\", c }'"
wait_update_facet $SINGLEMDS "eval $cmd" $OSTCOUNT ||
- error "wait_update OSTs up on MDT failed"
+ error "wait_update OSTs up on MDT0000 failed"
}
wait_destroy_complete () {
}
h2nettype() {
- if [[ -v NETTYPE ]]; then
+ if [[ -n "$NETTYPE" ]]; then
h2name_or_ip "$1" "$NETTYPE"
else
h2name_or_ip "$1" "$2"
# Wrapper function to print the deprecation warning
h2tcp() {
echo "h2tcp: deprecated, use h2nettype instead" 1>&2
- if [[ -v NETTYPE ]]; then
+ if [[ -n "$NETTYPE" ]]; then
h2nettype "$@"
else
h2nettype "$1" "tcp"
# Wrapper function to print the deprecation warning
h2o2ib() {
echo "h2o2ib: deprecated, use h2nettype instead" 1>&2
- if [[ -v NETTYPE ]]; then
+ if [[ -n "$NETTYPE" ]]; then
h2nettype "$@"
else
h2nettype "$1" "o2ib"
}
min_ost_size () {
- $LCTL get_param -n osc.*.kbytesavail | sort -n | head -n1
+ $LFS df | grep OST | awk '{print $4}' | sort -un | head -1
}
#