Re: [Gluster-devel] How to find total number of gluster mounts?
On Wed, Jun 03, 2015 at 11:37:58AM +0530, Raghavendra Talur wrote: On Wednesday 03 June 2015 09:13 AM, Pranith Kumar Karampuri wrote: On 06/01/2015 11:07 AM, Bipin Kunal wrote: Hi All, Is there a way to find total number of gluster mounts? If not, what would be the complexity for this RFE? As far as I understand finding the number of fuse mount should be possible but seems unfeasible for nfs and samba mounts. True. Bricks have connections from each of the clients. Each of fuse/nfs/glustershd/quotad/glfsapi-based-clients(samba/glfsheal) would have separate client-context set on the bricks. So We can get this information. But like you said I am not sure how it can be done in nfs server/samba. Adding more people. Depends on why you would want to know about the clients: 1. For most of the use cases, admin might just need to know how many Samba/NFS servers are currently using the given volume(Say just to perform umount everywhere). In this case, each Samba/NFS server is just like a FUSE mount and we can use the same technique that we would use for the above case that Pranith has mentioned. 2. If the requirement is to identify all the machines which are accessing a volume, (probable use case:- you may want a end-user to close a file etc) above method won't be sufficient. To get details of SMB clients, you would have to run 'smbstatus' command on all SMB server nodes and it would output details of connected SMB clients in this format. PID Username Group MachineProtocol Version Service pid machine Connected at Gluster/NFS supports the 'showmount' command (over the MOUNT RPC protocol). It can be used to list all the NFS-clients that have a volume/subdir mounted. This list should not be 100% trusted though. NFSv3 uses the MOUNT RPC protocol to get the file-handle for the mountpoint. After that, the NFSv3 protocol can use the export until it wants to. When the NFS-client unmounts the export, it sends the UMNT procedure to the NFS-server what causes the NFS-client/export combination to be removed from the client-list (showmount output). A client that does not send a UMNT, will not be removed from the list of active clients. This can happen when a client does a umount during network issues, or a client spontaneously reboots (or kernel panic or ..). Very similar are clients that mount the exact same export/subdir in multiple mountpoints. The NFS-server can not differentiate between a client that did not set a UMNT, or a client that mounts the same export/subdir more than once. These clients will only be listed once. HTH, Niels ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel
Re: [Gluster-devel] How to find total number of gluster mounts?
Thanks Pranith and Raghavendra for your valuable inputs. As you mentioned the use-cases, both the use-case completely fits to my requirement. I will raise a RFE for the same. Thanks, Bipin Kunal - Original Message - From: Raghavendra Talur rta...@redhat.com To: Bipin Kunal bku...@redhat.com Cc: gluster-devel@gluster.org, Niels de Vos nde...@redhat.com, Soumya Koduri skod...@redhat.com, Poornima Gurusiddaiah pguru...@redhat.com, Pranith Kumar Karampuri pkara...@redhat.com Sent: Wednesday, June 3, 2015 11:37:58 AM Subject: Re: [Gluster-devel] How to find total number of gluster mounts? On Wednesday 03 June 2015 09:13 AM, Pranith Kumar Karampuri wrote: On 06/01/2015 11:07 AM, Bipin Kunal wrote: Hi All, Is there a way to find total number of gluster mounts? If not, what would be the complexity for this RFE? As far as I understand finding the number of fuse mount should be possible but seems unfeasible for nfs and samba mounts. True. Bricks have connections from each of the clients. Each of fuse/nfs/glustershd/quotad/glfsapi-based-clients(samba/glfsheal) would have separate client-context set on the bricks. So We can get this information. But like you said I am not sure how it can be done in nfs server/samba. Adding more people. Depends on why you would want to know about the clients: 1. For most of the use cases, admin might just need to know how many Samba/NFS servers are currently using the given volume(Say just to perform umount everywhere). In this case, each Samba/NFS server is just like a FUSE mount and we can use the same technique that we would use for the above case that Pranith has mentioned. 2. If the requirement is to identify all the machines which are accessing a volume, (probable use case:- you may want a end-user to close a file etc) above method won't be sufficient. To get details of SMB clients, you would have to run 'smbstatus' command on all SMB server nodes and it would output details of connected SMB clients in this format. PID Username Group MachineProtocol Version Service pid machine Connected at Thanks, Raghavendra Talur Pranith Please let me know your precious thoughts on this. Thanks, Bipin Kunal ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel
Re: [Gluster-devel] How to find total number of gluster mounts?
On 06/01/2015 11:07 AM, Bipin Kunal wrote: Hi All, Is there a way to find total number of gluster mounts? If not, what would be the complexity for this RFE? As far as I understand finding the number of fuse mount should be possible but seems unfeasible for nfs and samba mounts. True. Bricks have connections from each of the clients. Each of fuse/nfs/glustershd/quotad/glfsapi-based-clients(samba/glfsheal) would have separate client-context set on the bricks. So We can get this information. But like you said I am not sure how it can be done in nfs server/samba. Adding more people. Pranith Please let me know your precious thoughts on this. Thanks, Bipin Kunal ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel ___ Gluster-devel mailing list Gluster-devel@gluster.org http://www.gluster.org/mailman/listinfo/gluster-devel