Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm now practicing some labs for RHCE exam, in the "NFS" section, I find something strange when check the exporting shares by "showmount -a". Here's the output:
(nfs server ip: 192.168.123.8)
Code:
[root@Test ~]# showmount -a
All mount points on Test:
*:/build
192.168.123.149:*
192.168.123.18:*
192.168.123.56:*
192.168.123.58:*
192.168.123.61:*
192.168.123.62:*
192.168.123.63:*
192.168.123.64:*
192.168.123.67:*
192.168.123.68:*
As "man showmount" says, showmount queries the mount daemon on a remote host for information about the state of the NFS server on that machine. "-a or --all": List both the client hostname and mounted directory in host:dir format.
While 192.168.123.68 did not mount any share from 192.168.123.8, yet the entry "192.168.123.68:*" is still listed by "showmount -a". Hmmm, does nfs deamon need time to update for its database? I try to "showmount -a" in 10 minutes, the result is same as prior.
Then, I log in 192.168.123.68 and really mount 192.168.123.8:/build. go back to "192.168.123.8", and check "showmount -a", nothing changes.
How does showmount work in the background, which database it querys?
As also stated in "man showmount":
"the accuracy and completeness of the information may depend on the NFS server implementation."
So please list the NFS server you're using (version number, etc), as this may be relevant.
Also, you may want to check out /var/lib/nfs/rmtab. It can contain stale entries, which may explain what you're seeing. However, I doubt that showmount just prints the contents of that plain text file (more likely, it'll use some form of internal database of the NFS server).
it makes sure that all entries in /etc/exports are properly reflected
in .../etab. Any extra entries in etab are left alone. Once the
correct content of etab has been determined, rmtab is examine to
create a list of specific-host entries for any new entries in etab.
This host-specific entries are given to the kernel.
Exporting to IP networks, DNS and NIS domains does not enable clients from these groups to access NFS immediately; rather, these sorts of exports are hints to mountd(8) to grant any mount requests from these clients. This is usually not a big problem, because any existing mounts are preserved in rmtab across reboots. When unexporting a network or domain entry, any current exports to members of this group will be checked against the remaining valid exports and if they themselves are nolonger valid they will be removed.
I wonder the first two character of "rmtab" perhaps is short of "remain", as the googled result, I think the entries in "/var/lib/nfs/rmtab" are only hints, not really current mounting statistics.
So, how could I get the accuracy info?
Regards,
Phillip
Last edited by PhillipHuang; 01-02-2007 at 08:05 PM.
As suggested on the first link you post, /proc/fs/nfs/exports (or /var/lib/nfs/xtab if /proc isn't mounted) contains the current mounts, as known to the kernel.
rmtab indeed seems a way to keep this information around after rebooting and may contain some stale entries (ie left-overs from previous sessions).
So, yes, "rm" could stand for "remain", "remember", or something like that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.