Why /bin/login hangs if an NFS server down

Dan Kegel dank at moc.jpl.nasa.gov
Mon Oct 8 07:30:00 AEST 1990


I posted the question:
> Whenever an NFS server on my network is down, logins seem to take forever
> even if the filesystem provided by the server has nothing to do with the
> user who is logging in.  Why?

The consensus is:
    login is checking quotas by running 'quota'.  This
    will try to access every filesystem, and will hang if some
    server is down.

The fixes mentioned are:
    1. Link quota to /bin/true, returns immediately with effective "quota ok".

    2. Give every user a .hushlogin file in their home directory. 
       If this file exists, login will not
        1. echo /etc/motd
	2. do a mail check
	3. do a quota check.

    3. Add the 'noquota' keyword to /etc/fstab for each NFS filesystem.

Thanks to those who responded:
    Steven Blair <synoptics.com!sblair>
    mlb.semi.harris.com!del (Don Lewis)
    mullian.ee.mu.OZ.AU!raob (richard oxbrow)
    Jim Reid <computer-science.strathclyde.ac.uk!jim>
    ulysses.att.com!ekrell
    fwi.uva.nl!nick (Nick Copeland)
    math.ksu.edu!tar (Tim Ramsey)

One other possibility was mentioned, but doesn't seem to be the problem here:
    When login forks and execs /bin/csh, csh does a getwd() to determine
    its current working directory. This involves getting the name and inode
    number of every file in the parent directory. Comparing the inode
    number for '.' (the current directory) with each name/inode number
    pair in the parent directory gives the filename of the current
    directory. This procedure is executed in successive parent directories
    (building the pathname as it goes along) until it hits '/' where the
    inode numbers  for '.' and '..' are the same.

- Dan Kegel (dank at moc.jpl.nasa.gov)



More information about the Comp.sys.sun mailing list