{"id":761,"date":"2018-08-28T01:00:00","date_gmt":"2018-08-28T01:00:00","guid":{"rendered":"http:\/\/inswwdev.azurewebsites.net\/au\/insights\/uncategorized\/gluster-with-nfs-ganesha\/"},"modified":"2024-12-13T02:02:01","modified_gmt":"2024-12-13T02:02:01","slug":"gluster-with-nfs-ganesha","status":"publish","type":"post","link":"https:\/\/www.insentragroup.com\/us\/insights\/geek-speak\/modern-workplace\/gluster-with-nfs-ganesha\/","title":{"rendered":"Gluster with NFS-Ganesha"},"content":{"rendered":"<p style=\"text-align: justify;\"><span>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:<\/span><\/p>\n<p style=\"text-align: justify;\"><span>Repeat following steps on all the nodes:<\/span><\/p>\n<p style=\"text-align: justify;\"><strong>1. Enable repositories:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 908px; height: 89px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_1.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/5871e44f903e4adeaa5ebc5f50b7e914\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>2. Update the system:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 906px; height: 29px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_2.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/a4543902b45b42f8945f6d2ac45b278c\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>3. Disable firewalld (or keep it running but modify the ports)<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 895px; height: 68px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_3.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/4922921318c84dac91301190068ca143\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>4. Install Gluster Storage on all nodes of the cluster. In this example, we are building two nodes<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 900px; height: 36px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_4.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/24dee6704c654a7da48dc6fda68063b8\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>5. Ensure the glusterd service is running and is enabled<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 900px; height: 36px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_5.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/7e3cc655511e4b5db3c52014f0ae71a4\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>6. Create thinly provisioned volume which will be used as the Gluster Brick:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 895px; height: 102px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_6.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/d4edb1141f0e4d46994dd4a134eac5b8\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>7. Create xfs file system on the newly created logical volume:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 896px; height: 199px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_7.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/66921b1add3148f793722e6499a7401b\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>8. Create the mount point where the new volume will be created. Repeat the step on all nodes.<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 906px; height: 29px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_8.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/69c859a8bec84e49805eb51657713430\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>9. Mount the file system and add the entries to \/etc\/fstab<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 906px; height: 29px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_9.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/ecb21fc35bf54e9ebb2c7d77dadfa429\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>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<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 906px; height: 29px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_10.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/6f1ef40e4c3142938b8710f8cd9818fd\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>11. Create a gluster pool:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 903px; height: 233px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_11.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/3942edf18bf6472185d2ac36b4f1ea26\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>12. Create a simple gluster volume:<\/strong><\/p>\n<p><img decoding=\"async\" style=\"width: 901px; height: 384px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_12.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/5d8812b1e8574350b9bcb2dd39f2bfa0\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>13. Install Ganesha. Ensure that glusterd service and processes are stopped before installing glusterfs-ganesha<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 904px; height: 85px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_13.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/9c63a1862bfd4bebab8b155336c1976b\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>14. Enable Gluster shared storage. This volume will be used to hold shared ganesha configuration. Perform this step on one node only.<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 893px; height: 25px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_14.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/d1367eb34a994a3886e126944c3cf66e\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>15. Validate if the shared storage is mounted and visible on both nodes.<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 890px; height: 121px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_15.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/1a6937a0a5a043559134a4d6a9479c52\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>16. Create nfs-ganesha directory under the shared_storage:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 893px; height: 25px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_16.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/d956abaeaad34b34a9270d569abc695f\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>17. Copy Ganesha configuration files to the shared_storage:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 885px; height: 46px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_17.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/8c9c7e8d1b674d6898984ec53de48085\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>18. Navigate to the shared_storage and rename the ganesha-ha.conf.sample to ganesha-ha.conf<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 878px; height: 65px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_18.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/0f1ccf273b9743ddb188a17e3507d418\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>19. Enable the following services:<\/strong><\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" style=\"width: 877px; height: 107px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_19.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/f0364866c55a4ab99faffcad9c7bc323\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>20. Generate public key and copy to all the nodes:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 877px; height: 121px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_20.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/db3885cb12614548b5b75f23d9825cc6\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>21. Set the password for hacluster user. Perform this step on both nodes<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 882px; height: 30px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_21.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/950d3b25b9574f3a89bbf9a57e6b72cf\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>22. Authenticate both nodes for pacekeeper. Perform this step on one node only<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 879px; height: 102px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_22.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/0b3a2f2324de44fda3125a7def120bdf\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>23. If you are using SELinux, set the following booleans:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 865px; height: 45px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_23.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/8c0d1062af6549d99295d482dd40489b\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>24. Edit \/etc\/sysconfig\/nfs and ensure the following are set. Ensure it is done on both servers:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 865px; height: 64px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_24.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/84887b4964c14d87af87521d5dffa9bb\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>25. Restart nfs-config rpc-statd and nfslock services<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 853px; height: 29px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_25.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/89e0bfc77771473fae469cb846a2365b\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>26. Add the following snippet at the end of the ganesha.conf configuration file:<\/strong><\/p>\n<p style=\"text-align: justify;\">vim \/var\/run\/gluster\/shared_storage\/nfs-ganesha\/ganesha.conf<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" style=\"width: 858px; height: 422px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_26.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/cf6f442ce5d5430fb968b048622ec5bb\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>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.<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 855px; height: 277px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_27.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/c485f24396bc41c7ab33b5a91fa8b102\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>28. Ensure to disable NetworkManager and enable network.service on both nodes. This is required by the clustering software:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 851px; height: 80px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_28_1.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/56aeceaf276a44789ab0c152e830cd40\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>29. Restart and enable nfs-ganesha.service on both nodes<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 860px; height: 43px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_29.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/a32f8b44b49541ccadd1a731c8f317c2\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>30. Enable ganesha on gluster:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 853px; height: 116px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_30.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/0071969ad678404d9ff7ee6a99711a03\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>31. Verify the cluster.<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 851px; height: 596px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_31-1.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/95e5936515bf433dacf96838ba6051c3\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 849px; height: 163px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_31_2.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/ce1ae45dd460441c9297ebd7a1812697\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>32. Verify if the NFS share exists and can be accessed:<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 846px; height: 66px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_32.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/02b31cf8f55943e881a17d1dcedd5166\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>33. Use the VIP IP address to mount the NFS share<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 844px; height: 27px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_33.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/a2f8c584a355480a811f87d5ecf32158\" \/><\/strong><\/p>\n<p style=\"text-align: justify;\"><strong>34. If you require to change the configuration of the Export section in ganesha.conf, do the changes and restart the ganesha service<\/strong><\/p>\n<p style=\"text-align: justify;\"><strong><img decoding=\"async\" style=\"width: 844px; height: 27px;\" src=\"https:\/\/www.insentragroup.com\/wp-content\/uploads\/sites\/21\/2021\/02\/gluster-with-nfs-ganesha_img_34.jpg\" alt=\"\" data-udi=\"umb:\/\/media\/6ca0c6d3cc2d459189d8d06335bf8f5a\" \/><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&hellip; <a class=\"more-link\" href=\"https:\/\/www.insentragroup.com\/us\/insights\/geek-speak\/modern-workplace\/gluster-with-nfs-ganesha\/\">Continue reading <span class=\"screen-reader-text\">Gluster with NFS-Ganesha<\/span><\/a><\/p>\n","protected":false},"author":67,"featured_media":762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[19],"tags":[],"class_list":["post-761","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-modern-workplace","entry"],"_links":{"self":[{"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/posts\/761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/users\/67"}],"replies":[{"embeddable":true,"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":1,"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/posts\/761\/revisions"}],"predecessor-version":[{"id":23158,"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/posts\/761\/revisions\/23158"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/media\/762"}],"wp:attachment":[{"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/categories?post=761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.insentragroup.com\/us\/wp-json\/wp\/v2\/tags?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}