showmount -e nfs_server_hostname does not show all the available mounts for a client, but why?

7,205

Solution 1

The showmount command makes specific use of certain facets of the NFSv3 protocol to query the server and return a list of available shares. There are two ways to run showmount:

showmount -a - from the man page for showmount:

-a or --all List both the client hostname or IP address and mounted directory in host:dir format. This info should not be considered reliable. See the notes on rmtab in rpc.mountd(8).

In this case showmount is querying rpc.mountd on the server, which may or may not return a reliable list of mount points. The issue mentioned with rpc.mountd is that it is possible for stale entries to be left in the rmtab file, meaning it may not be an accurate list of mount points.

showmount -e - whilst the documentation for showmount suggests this to be the more reliable way to query the server, it makes specific use of this part of the NFSv3 protocol:

https://www.rfc-editor.org/rfc/rfc1813#section-5.2.5

This is part of the NFSv3 protocol, but does not exist in NFSv4. Many servers will configure NFS shares to be simultaneously available through NFSv3 and NFSv4, hence they show up using the showmount facility. However if a share is configured to be purely NFSv4 then showmount will not be able to get a list as the protocol doesn't provide a method to support this.

Even if the share is not pure NFSv4, the remote server must know to return the export in one (or both) of the two aforementioned ways for showmount to return it. This however would not prevent it from being mounted as you have experienced.

Solution 2

Some storage vendors / products will not respond to showmount -e by default, if at all.

NetApp C-Mode does not respond by default and I'd guest DataDomain may not either. The vendor's reason for not responding is commonly security.

Share:
7,205

Related videos on Youtube

Hrish
Author by

Hrish

It's my passion and job... So I have to work on all flavors of Linux. I am launching my own company very soon in the IT sector. Thank you all for giving support and to start such a good platform for all Linux users. Ubuntu rocks... :) Please feel free to contact me in case of any query on [email protected]

Updated on September 18, 2022

Comments

  • Hrish
    Hrish almost 2 years

    NFS_Server is a DataDomain Client is RHEL 7.3

    I run a below command to show available NFS shared for my client system from NFS_server, however, I do not see all the share available to mount.

    # showmount -e nfs_server_hostname
    /test myclientsIP
    
    # showmount -e nfs_server_IP
    /test myclientsIP
    

    In my case, I wanted a particular mount which was not showing in the results of above command.

    still as DataDomain (which is a NFS_Server, in our case here) person told me to mount a particular share even if you don't see it in the output of showmount command above.

    and for my surprise it got mounted, hence I ran above command again and still it was not showing in the list. but when I checked output of below command it was surprising for me.

    # df -h
    .
    .
    .
    NFS_Server_IP:/test_Rep /mnt
    

    I want to know the reason why it's happening and is there any other command to list such mount points which are hidden otherwise?

    Thanks in advance and apologies for poor English & if this is not the right site for such a question.

    • tukan
      tukan over 6 years
      What kind of DC (domain controller) do you have? How are you connected to the domain?
    • Hrish
      Hrish over 6 years
      @tukan Hey we do not have a Domain Controller in this environment. I'm talking about DD (DataDomain) which is an EMC file storage from which these NFS mounts are exported & I do not have access to DD.
    • tukan
      tukan over 6 years
      I understood that you are talking about EMC DD but I did not have complete overview of your setup that is why I was asking. How do you then authorize agains the DD server?