All of lore.kernel.org
 help / color / mirror / Atom feed
* NFS and fuser
@ 2006-05-28 23:13 Craig Small
  2006-05-28 23:43 ` Neil Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Craig Small @ 2006-05-28 23:13 UTC (permalink / raw)
  To: nfs

Hello,
  I am the current maintainer of the psmisc package, which includes a
program called fuser.  fuser lets someone work out which process has
opened a "file", using a wide meaning for the word file. I currently
have a NFS-related bug which I'm hoping the list can help me with.

The problem is if knfsd exports a directory out, it does not show
up in its /proc/<pid>/fd/ directory.  I am looking for a nice clean way
of determining what directories knfsd has exported. It appears for
example that /proc/fs/nfs/exports does not appear in all versions of
Linux.

Another way would be to read /var/lib/nfs/xtab, but I do not know if
this file location is always going to be there.
My main concern is whatever assumptions I make (eg file X is always
located at Y) are reasonable ones.

I'm not on the NFS list so if you could CC me directly that would be
great.

 - Craig
-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
csmall at : enc.com.au                      ieee.org           debian.org


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFS and fuser
  2006-05-28 23:13 NFS and fuser Craig Small
@ 2006-05-28 23:43 ` Neil Brown
  2006-05-28 23:54   ` Craig Small
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Brown @ 2006-05-28 23:43 UTC (permalink / raw)
  To: Craig Small; +Cc: nfs

On Monday May 29, csmall@enc.com.au wrote:
> Hello,
>   I am the current maintainer of the psmisc package, which includes a
> program called fuser.  fuser lets someone work out which process has
> opened a "file", using a wide meaning for the word file. I currently
> have a NFS-related bug which I'm hoping the list can help me with.
> 
> The problem is if knfsd exports a directory out, it does not show
> up in its /proc/<pid>/fd/ directory.  I am looking for a nice clean way
> of determining what directories knfsd has exported. It appears for
> example that /proc/fs/nfs/exports does not appear in all versions of
> Linux.

/proc/fs/nfs/exports should appear in all versions of Linux that
server nfs.  That would be the best thing to use.

Why leads you to believe that it does not appear in all versions of
Linux?

NeilBrown


> 
> Another way would be to read /var/lib/nfs/xtab, but I do not know if
> this file location is always going to be there.
> My main concern is whatever assumptions I make (eg file X is always
> located at Y) are reasonable ones.
> 
> I'm not on the NFS list so if you could CC me directly that would be
> great.
> 
>  - Craig
> -- 
> Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
> Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
> csmall at : enc.com.au                      ieee.org           debian.org
> 
> 
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> _______________________________________________
> NFS maillist  -  NFS@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFS and fuser
  2006-05-28 23:43 ` Neil Brown
@ 2006-05-28 23:54   ` Craig Small
  2006-05-29  0:16     ` Neil Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Craig Small @ 2006-05-28 23:54 UTC (permalink / raw)
  To: Neil Brown; +Cc: nfs

On Mon, May 29, 2006 at 09:43:38AM +1000, Neil Brown wrote:
> On Monday May 29, csmall@enc.com.au wrote:
> > Hello,
> >   I am the current maintainer of the psmisc package, which includes a
> > program called fuser.  fuser lets someone work out which process has
> > opened a "file", using a wide meaning for the word file. I currently
> > have a NFS-related bug which I'm hoping the list can help me with.
> > 
> > The problem is if knfsd exports a directory out, it does not show
> > up in its /proc/<pid>/fd/ directory.  I am looking for a nice clean way
> > of determining what directories knfsd has exported. It appears for
> > example that /proc/fs/nfs/exports does not appear in all versions of
> > Linux.
> 
> /proc/fs/nfs/exports should appear in all versions of Linux that
> server nfs.  That would be the best thing to use.
> 
> Why leads you to believe that it does not appear in all versions of
> Linux?
At least some people don't have that file.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=356655

On the one nfs server I can see (Debian 2.6.8) it has that file.
It may be the way to go, if the file is not there all that happens is
that you go back to current behaviour, which is fuser doesn't "see"
the exports.

 - Craig

-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
csmall at : enc.com.au                      ieee.org           debian.org


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFS and fuser
  2006-05-28 23:54   ` Craig Small
@ 2006-05-29  0:16     ` Neil Brown
  2006-05-29  1:39       ` Craig Small
  2006-05-29 11:47       ` Yi.Xiong
  0 siblings, 2 replies; 7+ messages in thread
From: Neil Brown @ 2006-05-29  0:16 UTC (permalink / raw)
  To: Craig Small; +Cc: nfs

On Monday May 29, csmall@enc.com.au wrote:
> > 
> > Why leads you to believe that it does not appear in all versions of
> > Linux?
> At least some people don't have that file.
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=356655
> 
> On the one nfs server I can see (Debian 2.6.8) it has that file.
> It may be the way to go, if the file is not there all that happens is
> that you go back to current behaviour, which is fuser doesn't "see"
> the exports.

Any Linux system that is exporting files using the in-kernel NFS
server and that has /proc mounted will DEFINITELY have 
  /proc/fs/nfs/exports
If John is not seeing this on his 2.6.11 system then I can only assume
that the 'nfsd' module isn't loaded.  Maybe he is using the userspace
nfs server, or not using NFS at all.


Using the equivalent of "showmount -e" would not be correct as that
just report what directories the nfs server is willing to export.
On 2.6 kernels the recommend configuration results in the kernel not
knowing about exported filesystems unless they are actually being
currently used (though with a fairly generous timeout).
Presumably 'fuser' should only report files/directories that are
actually 'open' inside the kernel.  Thus 'showmount -e' is 
not appropriate.

I stand by my asserting that examining /proc/fs/nfs/exports is the
best thing to do.

NeilBrown


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFS and fuser
  2006-05-29  0:16     ` Neil Brown
@ 2006-05-29  1:39       ` Craig Small
  2006-05-29 11:47       ` Yi.Xiong
  1 sibling, 0 replies; 7+ messages in thread
From: Craig Small @ 2006-05-29  1:39 UTC (permalink / raw)
  To: nfs

On Mon, May 29, 2006 at 10:16:03AM +1000, Neil Brown wrote:
> Presumably 'fuser' should only report files/directories that are
> actually 'open' inside the kernel.  Thus 'showmount -e' is 
> not appropriate.
Yes, that's right.  The typical use for it is when you are trying to
unmount a drive and it is in use, you want to know what is using it.
You don't really care what might use it, or at least if you do it is 
not fuser's job to tell you.

> I stand by my asserting that examining /proc/fs/nfs/exports is the
> best thing to do.
That's good enough for me! Thanks for your time.

 - Craig

-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE         Debian developer
csmall at : enc.com.au                      ieee.org           debian.org


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFS and fuser
  2006-05-29  0:16     ` Neil Brown
  2006-05-29  1:39       ` Craig Small
@ 2006-05-29 11:47       ` Yi.Xiong
  2006-05-29 12:10         ` Neil Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Yi.Xiong @ 2006-05-29 11:47 UTC (permalink / raw)
  To: nfs

Hi, ALL
Who can tell me how to cancel the subscribtion of nfs mail list!
best regards and thanks


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: NFS and fuser
  2006-05-29 11:47       ` Yi.Xiong
@ 2006-05-29 12:10         ` Neil Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Brown @ 2006-05-29 12:10 UTC (permalink / raw)
  To: Yi.Xiong; +Cc: nfs

On Monday May 29, xiongyicn@hotmail.com wrote:
> Hi, ALL
> Who can tell me how to cancel the subscribtion of nfs mail list!
> best regards and thanks

There is a url at the bottom of every mail item which takes you to a
web page where you can manage your subscription.

However I have unsubscribed you so you needn't bother.

NeilBrown

> 
> 
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> _______________________________________________
> NFS maillist  -  NFS@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nfs


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-05-29 12:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-28 23:13 NFS and fuser Craig Small
2006-05-28 23:43 ` Neil Brown
2006-05-28 23:54   ` Craig Small
2006-05-29  0:16     ` Neil Brown
2006-05-29  1:39       ` Craig Small
2006-05-29 11:47       ` Yi.Xiong
2006-05-29 12:10         ` Neil Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.