LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-27-2012, 06:56 PM   #1
niteshadw
Member
 
Registered: Sep 2002
Distribution: CentOS
Posts: 170

Rep: Reputation: 15
Specify NFS Mount Timeout


Hello,

I'm executing a script that mounts NFS using "mount -o nolock -t nfs" but if the remote server is not present or there is no network connection, the mount waits for about 5 minutes before it times out.

I was wondering if there is a way to specify the timeout value of the mount command, say if unable to mount NFS within 10 seconds, just stop? I tried using the "retry", "timeo" "soft" without any difference.

Thanks!
 
Old 11-28-2012, 12:48 AM   #2
bala.linuxtech
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: RHEL and Centos
Posts: 86

Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by niteshadw View Post
Hello,

I'm executing a script that mounts NFS using "mount -o nolock -t nfs" but if the remote server is not present or there is no network connection, the mount waits for about 5 minutes before it times out.

I was wondering if there is a way to specify the timeout value of the mount command, say if unable to mount NFS within 10 seconds, just stop? I tried using the "retry", "timeo" "soft" without any difference.

Thanks!

Hi

just follow this steps

Devicename : Mountpoint : Filesystem :rw,hard,intr,rsize=8192,wsize=8192,timeo=10 : 0 : 0

For example

example.com 192.168.1.0:/nfs nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=10 0 0

Regards
Bala
 
Old 11-28-2012, 11:28 AM   #3
niteshadw
Member
 
Registered: Sep 2002
Distribution: CentOS
Posts: 170

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bala.linuxtech View Post
Hi

just follow this steps

Devicename : Mountpoint : Filesystem :rw,hard,intr,rsize=8192,wsize=8192,timeo=10 : 0 : 0

For example

example.com 192.168.1.0:/nfs nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=10 0 0

Regards
Bala
Thank you very much for the reply. I was wondering if this is possible within the mount command? The code is executed in ramdisk during startup.

I attempted:

mount -o nolock,hard,timeo=10 -t nfs 192.168.1.0:/nfs /mnt/nfs

Thank you once again!
 
Old 11-28-2012, 11:00 PM   #4
bala.linuxtech
Member
 
Registered: Nov 2012
Location: Bangalore
Distribution: RHEL and Centos
Posts: 86

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by niteshadw View Post
Thank you very much for the reply. I was wondering if this is possible within the mount command? The code is executed in ramdisk during startup.

I attempted:

mount -o nolock,hard,timeo=10 -t nfs 192.168.1.0:/nfs /mnt/nfs

Thank you once again!

Always Welcome ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Apache timeout when soft nfs mount is not responding rubanek Linux - Server 1 10-25-2011 04:22 PM
mount.nfs: mount to NFS server 'jesse' failed: timed out, retrying keupie Linux - Networking 3 06-05-2009 07:03 PM
NFS mount mount.nfs: access denied by server while mounting knockout_artist Linux - Newbie 2 11-26-2008 02:36 PM
Reducing the timeout duration for NFS Mount paragkalra Linux - Networking 1 02-02-2008 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration