Operating System - HP-UX
1820473 Members
3251 Online
109624 Solutions
New Discussion юеВ

Re: HPUX 11.00: fuser Command

 
LG Porter
Frequent Advisor

HPUX 11.00: fuser Command

I have several L2000 class systems rnning MCSG 11.12. When performing a cmhaltpkg on the package, several of the file systems experience problem umounting thus the "fuser -ku" command has to be executed manually to identify the process and kill. After closely review the package log file, I observed that MCSG attempts to perform a fuser on the file systems. Does MCSG automatically perform a "fuser" on a mount that it has trouble umounting? Should the package control script be modified to include the "fuser -ku" command?
4 REPLIES 4
Chris Wilshaw
Honored Contributor

Re: HPUX 11.00: fuser Command

It does carry out the fuser -ku automatically, based on the value of the FS_MOUNT_RETRY_COUNT variable within the control script.

From the default package control script;

# FILESYSTEM MOUNT RETRY COUNT.
# Specify the number of mount retrys for each filesystem.
# The default is 0. During startup, if a mount point is busy
# and FS_MOUNT_RETRY_COUNT is 0, package startup will fail and
# the script will exit with 1. If a mount point is busy and
# FS_MOUNT_RETRY_COUNT is greater than 0, the script will attempt
# to kill the user responsible for the busy mount point
# and then mount the file system. It will attempt to kill user and
# retry mount, for the number of times specified in FS_MOUNT_RETRY_COUNT.
# If the mount still fails after this number of attempts, the script
# will exit with 1.
# NOTE: If the FS_MOUNT_RETRY_COUNT > 0, the script will execute
# "fuser -ku" to freeup busy mount point.
FS_MOUNT_RETRY_COUNT=0


AND



print "\tWARNING: Running fuser on ${mount_pt} to remove anyone using the busy
mount point directly."
UM_COUNT=0
RET=1

# The control script exits, if the mount failed after
# retrying FS_MOUNT_RETRY_COUNT times.

while (( $UM_COUNT < $FS_MOUNT_RETRY_COUNT && $RET != 0 ))
do
(( UM_COUNT = $UM_COUNT + 1 ))
fuser -ku ${mount_pt}
if (($UM_COUNT == $FS_MOUNT_RETRY_COUNT))
then
mount ${fs_mount_opt} ${vol_to_mount} ${mount_pt}
test_return 17
else
mount ${fs_mount_opt} ${vol_to_mount} ${mount_pt}
(( RET = $? ))
sleep 1
fi
done
}
melvyn burnard
Honored Contributor

Re: HPUX 11.00: fuser Command

well have you looked in your package scripts to see what it does? mine havet he fuser -ku in em.
was this cluste rinstalled with 11.12, or updated from an earlier version?
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
jagdeesh
Frequent Advisor

Re: HPUX 11.00: fuser Command

Hi Porter,

Do you have any customer defined start functions specified in your package control script? If so, please check weather the same is getting halted while the package coming down. If your customer defined stop funciton not performing halt properly, it may fail to umount.

...Jags
Sanjay_6
Honored Contributor

Re: HPUX 11.00: fuser Command

Hi,

the cmhaltpkg command script has fuser in it.

cmhaltpkg is a compiled executable.

# cd /usr/sbin
# file cmhaltpkg
cmhaltpkg: PA-RISC1.1 shared executable dynamically linked -not stripped

# strings cmhaltpkg |grep fuser

# "fuser -ku" to freeup busy mount point.
print "\tWARNING: Running fuser on ${mount_pt} to remove anyone using the busy
mount point directly."
fuser -ku ${mount_pt}
#run fuser to kill the user, on the mount point.
#run fuser to kill the user, on the mount point.
print "\tWARNING: Running fuser to remove anyone using the
file system directly."
fuser -ku $I

This means you do not need another fuser command in your script.

Hope this helps.

Regds