Bug 860497 - rpc.mountd does not write to /var/lib/nfs/rmtab
rpc.mountd does not write to /var/lib/nfs/rmtab
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: nfs-utils (Show other bugs)
17
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Steve Dickson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-25 21:19 EDT by Dieter Stolte
Modified: 2012-09-26 10:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-26 10:55:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dieter Stolte 2012-09-25 21:19:44 EDT
Description of problem:
Although an exported dir is mounted /var/lib/nfs/rmtab is empty (zero bytes). Additionaly showmount does not show remotely mounted dirs.

Client:
[root@gandalf BUILD]# grep nas /etc/fstab
nas:/data /nas nfs   defaults,noauto,proto=tcp       0 0

[root@gandalf BUILD]# mount /nas

Server:
[root@nas nfs]# exportfs
/data           192.168.254.4

[root@nas nfs]# showmount -a
All mount points on nas:

[root@nas nfs]# ll /var/lib/nfs/rmtab 
-rw-r--r--. 1 root root 0 22. Jun 19:36 /var/lib/nfs/rmtab


Version-Release number of selected component (if applicable):
nfs-utils-1.2.6-3.fc17.x86_64

How reproducible:
always

Steps to Reproduce:
see description

  
Actual results:
empty rmtab


Expected results:
rmtab with actuals mounts


Additional info:
Comment 1 Jeff Layton 2012-09-26 05:59:28 EDT
Is gandalf mounting using NFSv4? If so, then this is expected behavior since there is no MNT request.
Comment 2 Dieter Stolte 2012-09-26 08:33:48 EDT
yes, the dir is mounted with nfsv4. Is this behaviour documented somewhere? The man page of mountd does not say that rmtab is not used with nfsv4. And how can I see which dirs are mounted on the server side? showmount does not work as expected.
Comment 3 J. Bruce Fields 2012-09-26 09:52:52 EDT
Even with v2/v3, rmtab (hence showmount) isn't completely reliable.  (And can't be: even if clients try to be good about sending mount/umount requests, the requests can get lost or duplicated.)

Agreed that it would be worth documenting this somewhere, I'm not sure where exactly.
Comment 4 Jeff Layton 2012-09-26 10:09:20 EDT
mountd(8) already has this:

       Note,  however,  that there is little to guarantee that the contents of
       /var/lib/nfs/rmtab are accurate.  A client may  continue  accessing  an
       export even after invoking UMNT.  If the client reboots without sending
       a  UMNT  request,   stale   entries   remain   for   that   client   in
       /var/lib/nfs/rmtab.

...I suppose it wouldn't hurt to update it with a blurb about NFSv4, but other than that I don't see that there's much we can do.
Comment 5 Dieter Stolte 2012-09-26 10:19:43 EDT
Yes, put it in each and every man page that deals with nfs. I googled a lot for the rmtab behaviour and it seems to be an unknown fact that nfsv4 does not use rmtab at all. Also document that it is impossible for the server side to keep track of its clients (which is really bad if you want to implement an automatic shutdown for a (idle) nas system).
Comment 6 J. Bruce Fields 2012-09-26 10:55:01 EDT
(In reply to comment #5)
> Also document that it is impossible for the server
> side to keep track of its clients (which is really bad if you want to
> implement an automatic shutdown for a (idle) nas system).

That might still be doable by some other mechanism--if you want to discuss how, a good start would be a post to linux-nfs@vger.kernel.org explaining what you want to do.

Documentation patches also welcomed (I'd suggest starting just with the mountd man page, in nfs-utils).

The original complaint seems to describe as-designed behavior, though; closing.

Note You need to log in before you can comment on or make changes to this bug.