Author Topic: NFS mount takes 5 minutes  (Read 2197 times)

wario

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://
NFS mount takes 5 minutes
« on: June 29, 2004, 11:11:24 am »
when i mount an nfs share like this:

Code: [Select]
$ mount /mnt/foo
it returns successfully after exactly 5 minutes consistently. I suspect this corresponds to a timeout or two

/etc/fstab defines:

Code: [Select]
foo:/home      /mnt/foo     nfs     defaults,nosuid,noauto
i believe the problem is client related because two nfs servers (linux, bsd) both take 5 minutes to mount on the z but cross-mount instantly.

server logs indicate only client de/authentication, nothing unexpected.

is there client logging that i am unaware of?

other ideas?

thanks.

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
NFS mount takes 5 minutes
« Reply #1 on: June 29, 2004, 11:21:26 am »
supply -nolock or install portmapper.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

wario

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • http://
NFS mount takes 5 minutes
« Reply #2 on: June 30, 2004, 06:27:54 am »
thanks Mickey.

adding "nolock" to the mount options in fstab does the trick.

ScottYelich

  • Hero Member
  • *****
  • Posts: 992
    • View Profile
    • http://www.zaurususergroup.com/modules.php?opmodload&namephpWiki&filei
NFS mount takes 5 minutes
« Reply #3 on: June 30, 2004, 10:46:27 am »
is that all it is!  damn... I've been living with this forever...
but even after a mount -- an ls takes forever.

check:  http://zaurus.spy.org/screenshots/scottyelich/pdaXrom/jpg/

the "df" images... I normally would mount -o soft -t nfs blah &
and then wait... wait... and wait... :-/

so, now... -o soft,nolock ..  thanks!

Scott

himchen

  • Newbie
  • *
  • Posts: 10
    • View Profile
    • http://
NFS mount takes 5 minutes
« Reply #4 on: June 30, 2004, 12:57:48 pm »
I'm mounting from a NetBSD host and had to add nfsvers=2 to my mounts in order to
get throuput to more than about 50 KB/sec:

server:/zaurus  /mnt           nfs     noauto,hard,intr,nolock,async,nfsvers=2 0 0

Himchen

ikm

  • Full Member
  • ***
  • Posts: 172
    • View Profile
    • http://
NFS mount takes 5 minutes
« Reply #5 on: July 05, 2004, 08:06:52 pm »
Quote
the "df" images... I normally would mount -o soft -t nfs blah &
and then wait... wait... and wait... :-/

so, now... -o soft,nolock ..  thanks!

Scott
-o soft ?

It's far better to use -o hard,intr.

From the man page for the mount command:

       hard   The program accessing a file on a NFS mounted  file
              system  will hang when the server crashes. The pro╜
              cess cannot be interrupted  or  killed  unless  you
              also  specify  intr.   When  the NFS server is back
              online the program will continue  undisturbed  from
              where it was. This is probably what you want.

       soft   This  option  allows  the kernel to time out if the
              nfs server is not responding  for  some  time.  The
              time can be specified with timeo=time.  This option
              might  be  useful  if  your  nfs  server  sometimes
              doesn't respond or will be rebooted while some pro╜
              cess tries to get a file from the server.   Usually
              it just causes lots of trouble.