Sponsored Content
Full Discussion: using stat() on an NFS mount
Top Forums Programming using stat() on an NFS mount Post 302255106 by Perderabo on Wednesday 5th of November 2008 10:37:14 PM
Old 11-05-2008
Why do you care? If you hang you should jump for joy. After all, that is the behavior you requested when you mount an NFS filesystem with both the hard and nointr options. If you want different behavior, maybe you should just select the options you actually want.

It is possible to check to get a fairly good idea that an NFS operation should succeed. But this introduces a race condition. You check and see that all is cool. Then the server crashes. Then you try your NFS operation and hang. This is why this approach will never work 100%.

If you really want to go this route, you can use an rpc call to contact the NFS server to inquire of it's health. Calling procedure 0 is a common way to do this. Procedure 0 always succeeds and just exits to prove that the server is alive. The rpcinfo can do this. You can either invoke that program or download the source code from opensolaris to see how to do it.

But I would just set the intr option.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mount nfs filesystem

I try to share a directory from a wortstation to a server. the share command was no problem. Solaris 8 on mars share -F nfs -o rw /dir/dir2 on the server mount mars:/dir/dir2 /mount_point RPC: Program not registered <--- What is the meaning of this ? Thanks for you help ! (2 Replies)
Discussion started by: joerg
2 Replies

2. UNIX for Dummies Questions & Answers

NFS mount problem

Hello, I'm trying to create an NFS mount on server1 to server2. From the man pages I think I'm doing it right: mount server2:/dev/vg60/lvol607 /net1 nfs mount: server1:/dev/vg60/lvol607: Permission denied Do I need to provide login credentials to server 2 somehow? What am I missing? ... (1 Reply)
Discussion started by: FredSmith
1 Replies

3. Filesystems, Disks and Memory

NFS mount

Hi All, Can any one help in Mounting remote filesystems with NFS? Thanks in advance. Regards, Suresh. (4 Replies)
Discussion started by: srvaka1
4 Replies

4. UNIX for Dummies Questions & Answers

mount -o llock -F nfs vs mount -F nfs

Hi, We encountered NFS issue (solaris) especially running on Oracle application. Problem such as forms hang when close button is click, concurrent job shows running status all time. Understand we need to use mount -o llock -F nfs instead of mount -F nfs to eliminate? this problem.. Can... (1 Reply)
Discussion started by: KhawHL
1 Replies

5. UNIX for Dummies Questions & Answers

NFS mount

I have a NAS server that needs to have the share mounted on a unix server. I am not that familiar with NFS mounts....any help on what I have to do on the UNIX box...thanks! (7 Replies)
Discussion started by: andrewd
7 Replies

6. Solaris

Query regarding NFS Mount...

hi All, This is the first time that i would be doing a NFS mount. Its solaris 10 machine on which i would be doing this. Can any of you gurus help me with the steps that should be taken. (3 Replies)
Discussion started by: sankasu
3 Replies

7. OS X (Apple)

NFS Mount

Hello! Im trying to mount an nfs share. But got a bit of a problem. The problem im having is that i try to mount The problem is that the my.server.com/pub/home is owned by root. I know i can make a mount point my.server.com://pub/home/username - > /pub/home But that means i have to do... (1 Reply)
Discussion started by: dozy
1 Replies

8. IP Networking

Can't see home folder on one NFS mount but can in another mount on another share

Hello, I have a few Ubuntu 9.10 laptops I'm trying to learn NFS sharing with. I am just experimenting on this right now, so no harsh words about the security of what I'm playing with, please ;) Below are the configs /etc/exports on host /home/woodnt/Homeschool... (2 Replies)
Discussion started by: Narnie
2 Replies

9. UNIX for Dummies Questions & Answers

Mount NFS

Hi I have 2 servers, one is running on SunOS SPARC and the other is running on GNU Linux. Since my Linux is very poor I am not sure on how to mount a NFS from SunOS to Gnu Linux. Please help! FS at Host Server: root@rocux4 # ls -ld /data/PCFILES/GTPROD/DWHFILES.NEW drwxrwxrwx 4 nobody ... (6 Replies)
Discussion started by: hedkandi
6 Replies

10. Shell Programming and Scripting

Mount NFS Share On NFS Client via bash script.

I need a help of good people with effective bash script to mount nfs shared, By the way I did the searches, since i haven't found that someone wrote a script like this in the past, I'm sure it will serve more people. The scenario as follow: An NFS Client with Daily CRON , running bash script... (4 Replies)
Discussion started by: Brian.t
4 Replies
rpc.nfsd(8)						      System Manager's Manual						       rpc.nfsd(8)

NAME
rpc.nfsd - NFS server process SYNOPSIS
/usr/sbin/rpc.nfsd [-p port] nproc DESCRIPTION
The rpc.nfsd program implements the user level part of the NFS service. The main functionality is handled by the nfsd.o kernel module; the user space program merely starts the specified number of kernel threads. The rpc.mountd server provides an ancially service needed to satisfy mount requests by NFS clients. OPTIONS
-p port specify a diferent port to listen on for NFS requests. By default, rpc.nfsd will listen on port 2049. nproc specify the number of NFS server threads. By default, just one thread is started. However, for optimum performance several threads should be used. The actual figure depends on the number of and the work load created by the NFS clients, but a useful starting point is 8 threads. Effects of modifying that number can be checked using the nfsstat(8) program. SEE ALSO
rpc.mountd(8), exportfs(8), rpc.rquotad(8), nfsstat(8). AUTHOR
Olaf Kirch, Bill Hawes, H. J. Lu, G. Allan Morris III, and a host of others. 31 May 1999 rpc.nfsd(8)
All times are GMT -4. The time now is 09:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy