DescriptionArthy 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 2Daniel 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.