Bug 1402428

Summary: [NFS-Ganesha]showmount is not listing exported volume if protocols version is set to 4 in volume export file.
Product: Red Hat Gluster Storage Reporter: Arthy Loganathan <aloganat>
Component: DocumentationAssignee: Anjana Suparna Sriram <asriram>
Status: CLOSED NOTABUG QA Contact: Rahul Hinduja <rhinduja>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.2CC: asriram, dang, ffilz, jthottan, kkeithle, mbenjamin, rhs-bugs, sankarshan, skoduri, storage-doc, storage-qa-internal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-03 14:26:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Arthy Loganathan 2016-12-07 14:33:04 UTC
Document URL: 
https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3.1/html/Administration_Guide/sect-NFS.html#sect-NFS_Ganesha

Section Number and Name: 
7.2.4.4.3. Exporting and Unexporting Volumes through NFS-Ganesha
Subsection:
--> Verifying the Status --> Check if the volume is exported. 

Describe the issue: 
showmount is not listing exported volume if protocols version is set only to 4 in volume export file.

Suggestions for improvement: 
It would be good if we have a note saying, showmount will not list the exported volume if the user has set the protocol version to (Protocols = "4" ;) in volume export file.

In that case to list the exported volume, the following command should be used.

dbus-send --type=method_call --print-reply --system  --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr  org.ganesha.nfsd.exportmgr.ShowExports

Additional information: 

root@dhcp46-42 ~]# cat /run/gluster/shared_storage/nfs-ganesha/exports/export.vol2.conf 
# WARNING : Using Gluster CLI will overwrite manual
# changes made to this file. To avoid it, edit the
# file and run ganesha-ha.sh --refresh-config.
EXPORT{
      Export_Id = 2;
      Path = "/vol2";
      FSAL {
           name = GLUSTER;
           hostname="localhost";
          volume="vol2";
           }
      Access_type = RW;
      Disable_ACL = true;
      Squash="No_root_squash";
      Pseudo="/vol2";
      Protocols = "4" ;
      Transports = "UDP","TCP";
      SecType = "sys";
     }
[root@dhcp46-42 ~]# showmount -e localhost
Export list for localhost:
[root@dhcp46-42 ~]# dbus-send --type=method_call --print-reply --system  --dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr  org.ganesha.nfsd.exportmgr.ShowExports
method return sender=:1.236 -> dest=:1.252 reply_serial=2
   struct {
      uint64 1481120920
      uint64 151203001
   }
   array [
      struct {
         uint16 0
         string "/"
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         struct {
            uint64 1481105915
            uint64 307991952
         }
      }
      struct {
         uint16 2
         string "/vol2"
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         boolean false
         struct {
            uint64 1481105915
            uint64 307991952
         }
      }
   ]
[root@dhcp46-42 ~]#

Comment 2 Daniel Gryniewicz 2016-12-07 14:59:55 UTC
showmount only works with nfsv3, as the mount protocol isn't part of nfsv4.  NFSv4, instead, uses a pseudo root, so viewing the exports is done with a readdir on the pseudoroot.

If Ganesha is configured to have an export as only v3 or as both v3 and v4, it will show up in showmount;  Otherwise, if it's configured as only v4, it will not show up.

Comment 3 Frank Filz 2016-12-07 19:19:56 UTC
Yep, what Daniel said...

Comment 7 Frank Filz 2018-08-03 14:27:32 UTC
Should have commented with that...

Since the export is NFSv4 only, it can not be expected to show up in the NFS v3 SHOWMOUNT.