Australia | Gluster with NFS-Ganesha

Sebastian Baszcyj - 28.08.201820180828

Gluster with NFS-Ganesha

Australia | Gluster with NFS-Ganesha

I recently tried to configure nfs-ganesha in a HA configuration on top of a Gluster volume. It seemed like the Red Hat Gluster Storage Administration Guide should have everything necessary. Unfortunately the steps are all over the place and I spent quite some time trying to figure out all the required steps. Given it took me so long, I decided to share the procedure in this blog:

Repeat following steps on all the nodes:

1. Enable repositories:

Australia | Gluster with NFS-Ganesha

2. Update the system:

Australia | Gluster with NFS-Ganesha

3. Disable firewalld (or keep it running but modify the ports)

Australia | Gluster with NFS-Ganesha

4. Install Gluster Storage on all nodes of the cluster. In this example, we are building two nodes

Australia | Gluster with NFS-Ganesha

5. Ensure the glusterd service is running and is enabled

Australia | Gluster with NFS-Ganesha

6. Create thinly provisioned volume which will be used as the Gluster Brick:

Australia | Gluster with NFS-Ganesha

7. Create xfs file system on the newly created logical volume:

Australia | Gluster with NFS-Ganesha

8. Create the mount point where the new volume will be created. Repeat the step on all nodes.

Australia | Gluster with NFS-Ganesha

9. Mount the file system and add the entries to /etc/fstab

Australia | Gluster with NFS-Ganesha

10. Create a directory in /gluster/brick01/brick. This step ensures that in case the file system is not mounted, the gluster will not write to the / file system

Australia | Gluster with NFS-Ganesha

11. Create a gluster pool:

Australia | Gluster with NFS-Ganesha

12. Create a simple gluster volume:

Australia | Gluster with NFS-Ganesha

13. Install Ganesha. Ensure that glusterd service and processes are stopped before installing glusterfs-ganesha

Australia | Gluster with NFS-Ganesha

14. Enable Gluster shared storage. This volume will be used to hold shared ganesha configuration. Perform this step on one node only.

Australia | Gluster with NFS-Ganesha

15. Validate if the shared storage is mounted and visible on both nodes.

Australia | Gluster with NFS-Ganesha

16. Create nfs-ganesha directory under the shared_storage:

Australia | Gluster with NFS-Ganesha

17. Copy Ganesha configuration files to the shared_storage:

Australia | Gluster with NFS-Ganesha

18. Navigate to the shared_storage and rename the ganesha-ha.conf.sample to ganesha-ha.conf

Australia | Gluster with NFS-Ganesha

19. Enable the following services:

Australia | Gluster with NFS-Ganesha

20. Generate public key and copy to all the nodes:

Australia | Gluster with NFS-Ganesha

21. Set the password for hacluster user. Perform this step on both nodes

Australia | Gluster with NFS-Ganesha

22. Authenticate both nodes for pacekeeper. Perform this step on one node only

Australia | Gluster with NFS-Ganesha

23. If you are using SELinux, set the following booleans:

Australia | Gluster with NFS-Ganesha

24. Edit /etc/sysconfig/nfs and ensure the following are set. Ensure it is done on both servers:

Australia | Gluster with NFS-Ganesha

25. Restart nfs-config rpc-statd and nfslock services

Australia | Gluster with NFS-Ganesha

26. Add the following snippet at the end of the ganesha.conf configuration file:

vim /var/run/gluster/shared_storage/nfs-ganesha/ganesha.conf

Australia | Gluster with NFS-Ganesha

27. Edit ganesha-ha.conf configuration file located in the same location. This file should have the following content. Notice that we are using shortnames. Notice also that the VIP configuration starts with VIP followed by the shortname: VIP_gluster01. Make also sure that the VIPs are in the same subnet as the IP addresses configured on the servers.

Australia | Gluster with NFS-Ganesha

28. Ensure to disable NetworkManager and enable network.service on both nodes. This is required by the clustering software:

Australia | Gluster with NFS-Ganesha

29. Restart and enable nfs-ganesha.service on both nodes

Australia | Gluster with NFS-Ganesha

30. Enable ganesha on gluster:

Australia | Gluster with NFS-Ganesha

31. Verify the cluster.

Australia | Gluster with NFS-Ganesha

Australia | Gluster with NFS-Ganesha

32. Verify if the NFS share exists and can be accessed:

Australia | Gluster with NFS-Ganesha

33. Use the VIP IP address to mount the NFS share

Australia | Gluster with NFS-Ganesha

34. If you require to change the configuration of the Export section in ganesha.conf, do the changes and restart the ganesha service

Australia | Gluster with NFS-Ganesha

THANK YOU FOR YOUR SUBMISSION!

Australia | Gluster with NFS-Ganesha

The form was submitted successfully.

Join the Insentra Community with the Insentragram Newsletter

Hungry for more?

If you’re waiting for a sign, this is it.

We’re a certified amazing place to work, with an incredible team and fascinating projects – and we’re ready for you to join us! Go through our simple application process. Once you’re done, we will be in touch shortly!

Who is Insentra?

Imagine a business which exists to help IT Partners & Vendors grow and thrive.

Insentra is a 100% channel business. This means we provide a range of Advisory, Professional and Managed IT services exclusively for and through our Partners.

Our #PartnerObsessed business model achieves powerful results for our Partners and their Clients with our crew’s deep expertise and specialised knowledge.

We love what we do and are driven by a relentless determination to deliver exceptional service excellence.

Australia | Gluster with NFS-Ganesha

Insentra ISO 27001:2013 Certification

SYDNEY, WEDNESDAY 20TH APRIL 2022 – We are proud to announce that Insentra has achieved the  ISO 27001 Certification.