IBM Hub/Switch Switch User Manual


 
Chapter 7 HPSS User Interface Configuration
HPSS Installation Guide September 2002 447
Release 4.5, Revision 2
echo " could not start hdm$id, status = $status"
exit $status
fi
else
echo " hdm$id is already running"
fi
done
echo " all hdm servers are running"
exit 0
An example of the pre_start_dfs for Solaris is as follows:
#!/bin/ksh
# Start the servers (two of them in this example):
for id in 0 1; do
key=`expr 3788 + $id`
var=/var/hpss/hdm/hdm$id
$HPSS_PATH_BIN/hdm_admin -k $key -s $id -v $var ps >/dev/null 2>&1
if [ $? != 0 ]; then
echo " starting hdm$id"
rm -f $var/hdm.out
$HPSS_PATH_BIN/hpss_hdm $var/config.dat $id > $var/hdm.out 2>&1
status=$?
if [ $status != 0 ]; then
echo " could not start hdm$id, status = $status"
exit $status
fi
else
echo " hdm$id is already running"
fi
done
echo " all hdm servers are running"
exit 0
The pre_stop_dfs script is executed just before shutting down DFS. As part of the shutdown
procedure, AIX will try to unexport or "detach" all DFS aggregates. This ensures that they are left
in a consistent state and don't need to be salvaged before they can be used again. In order to detach
an aggregate, it is important that the HDMs be running first, so this script tends to that. The script
also ensures that no filesets are locally mounted, which would prevent the aggregates from being
detached. As with the other scripts, incidental messages to stderr should be rerouted to stdout.
Here is sample for pre_stop_dfs:
#!/bin/ksh
export HPSS_PATH_BIN=/opt/hpss/bin
for id in 0 1; do
key=`expr 3788 + $id`
var=/var/hpss/hdm/hdm$id
$HPSS_PATH_BIN/hdm_admin -k $key -s $id -v $var ps >/dev/null 2>&1
if [ $? != 0 ]; then
echo " starting hdm$id for cleanup"
$HPSS_PATH_BIN/hpss_hdm $var/config.dat $id > $var/hdm.out 2>&1
fi
echo " unmounting locally mounted filesets for hdm$id"