IBM SG24-5131-00 Laptop User Manual


 
Cluster Customization 129
######## Add for NFS Lock Removal (start) ########
######## Add for NFS Lock Removal (finish) ########
###############################################################################
#
# Name: cl_deactivate_nfs
#
# Given a list of nfs-mounted filesystems, we try and unmount -f
# any that are currently mounted.
#
# Arguments: list of filesystems.
#
###############################################################################
PROGNAME="$0"
MOUNTED="false"
######## Add for NFS Lock Removal (start) ########
STOPPED="false"
######## Add for NFS Lock Removal (finish) ########
SLEEP="2"
if [ "$VERBOSE_LOGGING" = "high" ]
then
set -x
fi
set -u
if [ $# -ne 0 ]
then
FILELIST=‘for i in $*; do /bin/echo $i; done | /bin/sort -r‘
for fs in $FILELIST
do
# Is the filesystem mounted?
# -s says only return status, -x says exact match
# we use awk instead of cut because mount outputs
# lots of leading blanks that confuse cut
/etc/mount | awk ’{ print $2 }’ | fgrep -s -x "$fs"
if [ $? -eq 0 ]
then
# At least one filesystem is mounted
MOUNTED="true"
# This filesystem is mounted
######## Add for NFS Lock Removal (start) ########
# Determine the host which is making the filesystem
# available
# This will clear any outstanding locks against the
# failed node, not preserve their state, and is thus
# considered a forceful move.
host=‘/etc/mount|grep nfs|grep "$fs"|awk ’{ print $1 }’‘
if [ -n "$host" ]
then
if [ "$STOPPED" = "false" ]
then
stopsrc -s rpc.lockd
stopsrc -s rpc.statd
STOPPED="true"