"showmount -a" does not list NFS-clients who have a Red Hat Storage volume mounted
Environment
- Red Hat Storage Server 2.0
Issue
Directly after mounting a volume over NFS, showmount -a shows the NFS-clients. However, after
- a fail-over of the IP, or
- doing a
service glusterd restart
the showmount -a command does not list the NFS-client anymore.
Resolution
Errata RHEA-2014:0208-1 (glusterfs-3.4.0.59rhs-1 and newer) has been released. This version introduces /var/lib/glusterfs/nfs/rmtab to contain a list of NFS-clients which have a volume mounted. When a storage server reboots, the contents of the file is preserved and the storage server still returns a list of NFS-clients that used this specific storage server to mount an export.
The volume option nfs.mount-rmtab can be set to an alternative filename. When the file is located on shared storage, multiple gNFS servers can use the same file to present a single NFS-server.
This cache is read when an NFS-client calls 'showmount' and updated when an NFS-client calls MNT or UMNT from the MOUNT protocol.
Usage:
- create a volume for storing the shared rmtab file
- mount the volume on all storage servers
- make sure that the volume is mounted at boot (add to
/etc/fstab) -
place the rmtab file on the volume:
# gluster volume set <VOLUME> nfs.mount-rmtab <MOUNTPOINT>/<FILENAME> -
any subsequent mount requests will add an entry to this file
showmount -arequests will return the NFS-clients using the cluster
Root Cause
The state of the mounts used by NFS-clients are gathered by the MOUNT protocol. On normal RHEL NFS this is done by rpc.mountd, but on Red Hat Storage this is included in the GlusterFS-NFS-server. Making it possible to list all NFS-clients that have the volume mounted, would require all the Storage Servers to be aware of the NFS-clients. The current implementation of the MOUNT service in the Gluster sources (xlators/nfs/server/src/mount3.c) does not contain support for storing information about NFS-clients persistently.
When IP-failover is used, the actual servers used for the NFS communication can differ from the initial communication over the MOUNT protocol. showmount would list the NFS-clients that used a particular NFS-server for mounting, but when a fail-over took place, the NFS-client may use a different server. So, in order to keep track of all the NFS-clients, a single list with all NFS-clients needs to be kept.
This feature request has been files as Bug 904065 for the upstream request (community GlusterFS), and internal bug 904074 for Red Hat Storage.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
