IBM Hub/Switch Switch User Manual


 
Chapter 7 HPSS User Interface Configuration
446 September 2002 HPSS Installation Guide
Release 4.5, Revision 2
Here is a sample user_cmd.tcl:
#!/bin/ksh
set pre_start_dfs "/var/hpss/hdm/hdm1/pre_start_dfs"
set pre_start_dfs_fail_on_error $TRUE
set pre_stop_dfs "/var/hpss/hdm/hdm1/pre_stop_dfs"
set post_stop_dfs "/var/hpss/hdm/hdm1/post_stop_dfs"
The pre_start_dfs Korn shell script will break before trying to start DFS and export DFS files. The
script ensures that the HDMs are all running. If there is any problem doing that DFS will not be
started, giving the system administrator a chance to fix the problem.
If this script needs to be modified, it is important to make sure that incidental messages that would
normally be written to stderr get rerouted to stdout or /dev/null. Otherwise the TCL procedures
that call pre_start_dfs will assume the script has had an error, even if the script eventually calls exit
0. It is also important to redirect all output from the hpss_hdm command; otherwise TCL will wait
for the HDM to stop before going ahead with the startup, with the result that DFS will never start.
In this script, be sure to set the delay parameter on cfgdmepi to 1. This parameter controls the
maximum delay time between client retries after an operation fails. In general, a delay parameter
of N causes a maximum delay interval of 4 raised to the Nth power. If N is zero, retries will be done
once a second which may cause the system to thrash. If N is omitted, the default value of 5 will be
used, which can result in delay times as long 1024 seconds (roughly 17 minutes).
7.6.3.2.1 DFS Configuration Scripts
The pre_start_dfs script is executed before DFS is started.
An example of the pre_start_dfs for AIX is as follows:
#!/bin/ksh
export HPSS_PATH_BIN=/opt/hpss/bin
echo " loading dfscore, dfssvr, and dcelfs"
/usr/sbin/cfgdfs -a /usr/lib/drivers/dfscore.ext
/usr/sbin/cfgdfs -a /usr/lib/drivers/dfssvr.ext
/usr/sbin/cfgdfs -a /usr/lib/drivers/dcelfs.ext
echo " configuring dmepi"
/usr/sbin/cfgdmepi -delay 1 -a /usr/lib/drivers/dmlfs.ext
if [ $? != 0 ]; then
exit 1
fi
# 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