LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-01-2007, 08:43 PM   #1
PhillipHuang
Member
 
Registered: Aug 2006
Location: Shen Zhen
Distribution: Ubuntu 22.04
Posts: 199

Rep: Reputation: 33
"showmount -a" displays error information?


Hi, folks,

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?

Thanks in advance.
Phillip
 
Old 01-02-2007, 05:45 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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).
 
Old 01-02-2007, 08:04 PM   #3
PhillipHuang
Member
 
Registered: Aug 2006
Location: Shen Zhen
Distribution: Ubuntu 22.04
Posts: 199

Original Poster
Rep: Reputation: 33
OS is CentOS4.4(2.6.9), nfs-utils version is 1.0.6.
Here's only line in the "/etc/exports" for NFS configuration:
Code:
"/build"  *(rw,sync,no_root_squash)
And "/var/lib/nfs/rmtab":
Code:
192.168.123.18:*:0x0000000b
*:/build:0x00000131
192.168.123.58:*:0x0000003f
192.168.123.68:*:0x00000015
192.168.123.61:*:0x00000005
192.168.123.79:*:0x00000005
192.168.123.67:*:0x0000003d
192.168.123.78:*:0x00000008
192.168.123.64:*:0x00000001
192.168.123.56:*:0x00000002
192.168.123.149:*:0x00000001
192.168.123.94:*:0x0000000b
192.168.123.63:*:0x00000008
192.168.123.62:*:0x00000001
I googled the following link:
http://linuxmafia.com/faq/Network_Other/nfs-files.htmlin which, there's some explanation:
Quote:
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.
And refer to http://www.netadmintools.com/html/8exportfs.man.html :
Quote:
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.
 
Old 01-03-2007, 01:51 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
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.
 
Old 01-03-2007, 02:55 AM   #5
PhillipHuang
Member
 
Registered: Aug 2006
Location: Shen Zhen
Distribution: Ubuntu 22.04
Posts: 199

Original Poster
Rep: Reputation: 33
I see. Thank you, Timmeke.
 
Old 01-03-2007, 03:59 AM   #6
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
You're welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't login Solaris 10!error information:"no default project!" rawbean Solaris / OpenSolaris 4 02-10-2010 06:49 AM
error: Error for wireless request "Set Mode" (8B06) : invalid argument "roaming" penguin chick Linux - Wireless Networking 5 08-22-2008 01:16 PM
Gnome CD music player displays "disk error" msg. louieb Fedora 2 08-19-2006 08:55 PM
"no hardware acceleration", but GLXgears displays 650 FPS lowpingnoob Linux - Newbie 16 06-15-2005 12:32 AM
Box Won't Boot - just displays "ATI MACH64 BIOS P/N 113-49801-101" te3d Linux - Hardware 3 10-27-2003 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration