Operating System - HP-UX
1826428 Members
3889 Online
109692 Solutions
New Discussion

Speeding up logging in to an NFS-mounted filesystem with [k]sh.

 
SOLVED
Go to solution
Hiro Asari
Occasional Contributor

Speeding up logging in to an NFS-mounted filesystem with [k]sh.

I have an HP 9000 box with 11i (Dec. 01, I think).

When a user logs in to the box with POSIX shell (or ksh, for that matter), the shell hangs after executing the last line in the init files (either in a copy of /etc/skel/.profile or $ENV defined in ~/.profile). Eventually the user has to ^C to get to the prompt.

The problem does not manifest itself if either: a) the user's login shell is csh, or b) the user's home directory is locally mounted.

The NFS server is a Solaris 9 box if that makes any difference.

Any input appreciated.
4 REPLIES 4
Massimo Bianchi
Honored Contributor

Re: Speeding up logging in to an NFS-mounted filesystem with [k]sh.

Hi,
is there anything in the PATH variable of the ksh - users ?

when files are source each path in the $PATH is tested, and if some is not reachable this might be cause problem or hangs, if they nfs-mounted.

HTH,
Massimo
S.K. Chan
Honored Contributor

Re: Speeding up logging in to an NFS-mounted filesystem with [k]sh.

I've seen these symptoms on an NFS mounted home dir. In my case both client and server are HP boxes. What you got is probably NFS file locking problem and this can cleared up by refreshing the rpc.lockd and rpc.statd. This is what you should do (first do this on the client side and then on the server side). I'm not sure if Solaris rpc mechanism would place their files in the same location as in HPUX but fundamentally they should be the same.
a) Kill rpc.lockd and rpc.statd
# ps -ef|grep rpc.lockd
# kill
==> repeat for rpc.statd
b) Delete all files in /var/statmon
# rm -R /var/statmon/sm.bak
# rm -R /var/statmon/state.bak
# mv /var/statmon/sm /var/statmon/sm.bak
# mv /var/statmon/state /var/statmon/state.bak
c) Restart rpc.statd and rpc.lockd
# /usr/sbin/rpc.statd
# /usr/sbin/rpc.lockd
The NFS locks should then be reclaimed.
Pete Randall
Outstanding Contributor
Solution

Re: Speeding up logging in to an NFS-mounted filesystem with [k]sh.

We had a similar problem quite some time ago. Turns out it was trying to open an NFS mounted shell history file. Try putting this in /etc/profile:

HISTFILE=/tmp/.sh_history.$(whoami)
export HISTFILE


Pete

Pete
Hiro Asari
Occasional Contributor

Re: Speeding up logging in to an NFS-mounted filesystem with [k]sh.

Thanks for all the suggestions. Pete's suggestion solved the problem completely.