LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Specify NFS Mount Timeout (http://www.linuxquestions.org/questions/linux-server-73/specify-nfs-mount-timeout-4175438990/)

niteshadw 11-27-2012 07:56 PM

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!

bala.linuxtech 11-28-2012 01:48 AM

Quote:

Originally Posted by niteshadw (Post 4838360)
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

niteshadw 11-28-2012 12:28 PM

Quote:

Originally Posted by bala.linuxtech (Post 4838525)
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!

bala.linuxtech 11-29-2012 12:00 AM

Quote:

Originally Posted by niteshadw (Post 4838897)
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 ...


All times are GMT -5. The time now is 11:34 PM.