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
SHOWMOUNT(8)						    BSD System Manager's Manual 					      SHOWMOUNT(8)

NAME
showmount -- show remote nfs mounts on host SYNOPSIS
showmount [-a | -d] [-e] [-1] [-3] [host] DESCRIPTION
The showmount utility shows status information about the NFS server on host. By default it prints the names of all hosts that have NFS file systems mounted on the host. See NFS: Network File System Protocol Specification, RFC 1094, Appendix A, and NFS: Network File System Version 3 Protocol Specification, Appendix I, for a detailed description of the protocol. The following options are available: -a List all mount points in the form: host:dirpath. -d List directory paths of mount points instead of hosts. -e Show the host's exports list. -1 Use mount protocol Version 1, compatible with legacy servers. -3 Ignored for backwards compatibility. SEE ALSO
mount(8), mount_nfs(8), mountd(8) HISTORY
The showmount utility first appeared in 4.4BSD. BUGS
The mount daemon running on the server only has an idea of the actual mounts, since the NFS server is stateless. The showmount utility will only display the information as accurately as the mount daemon reports it. BSD
August 16, 2014 BSD
All times are GMT -4. The time now is 01:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy