Mount_nfs question

Robert Watson rwatson at FreeBSD.org
Tue May 31 08:45:36 UTC 2011


On Mon, 30 May 2011, Mark Saad wrote:

>  So I am stumped on this one.  I want to know what the IP of each
> nfs server that is providing each nfs export. I am running 7.4-RELEASE
> When I run "mount -t nfs" I see something like this
>
> VIP-01:/export/source     on /mnt/src
> VIP-02:/export/target       on /mnt/target
> VIP-01:/export/logs         on /mnt/logs
> VIP-02:/export/package   on /mnt/pkg
>
> The issue is I use a load balanced nfs server , from isilon. So VIP-01 could 
> be any one of a group of IPs . I am trying to track down a network 
> congestion issue and I cant find a way to match the output of lsof , and 
> netstat to the output of mount -t nfs . Does anyone have any ideas how I 
> could track this down , is there a way to run mount and have it show the IP 
> and not the name of the source server ?

Unfortunately, there's not a good answer to this question.  nfsstat(1) should 
have a mode that can iterate down active mount points displaying statistics 
and connection information for each, but doesn't.  NFS sockets generally don't 
appear in sockstat(1) either.  However, they should appear in netstat(1), so 
you can at least identify the sockets open to various NFS server IP addresses 
(especially if they are TCP mounts).

Enhancing nfsstat(1) to display more detailed information would, I think, be a 
very useful task for someone to get up to (and perhaps should appear on our 
ideas list).  Something that would be nice to have, in support of this, is a 
way for file systems to provide extended status via a system call that queries 
mountpoints, both "portable" information that spans file systems, and file 
system-specific data.  Morally, similar to nmount(2) but for statistics rather 
than setting things.  The "easier" route is to add new sysctls that dump 
per-mountpoint state directly from NFS, but given how much other information 
we'd like to export, it would be great to have a more general mechanism.

(The more adventurous can, with a fairly high degree of safety, use kgdb on 
/dev/mem (read-only) to walk the NFS stack's mount tables, but that's not much 
fun.)

Robert


More information about the freebsd-hackers mailing list