How to Use Elastifile Unmanaged Load Balancer in GCP

Introduction

Elastifile uses its own implementation of load balancer in GCP in order to support both TCP and UDP traffic.

The Elastifile load balancer is based on GCP routes, where each Elastifile storage node in the system has its own route entry.

All the route entries are shared the same virtual floating IP in order to access the NFS storage.


Configuration

1. Unmanaged Load Balancer Creation-

The easiest way of configuring the Elastifile unmanaged load balancer is using the Terraform automation for installing Elastifile.

In the terraform.trvars file, you should specify the following (any IP can be selected):

# Load Balance mode - "none" "dns" "elastifile" "google"
LB_TYPE = "none"

#LB_VIP = "10.128.11.99"
LB_VIP = "10.128.10.99"


In order to validate the configuration, you can login to the Elastifile management server by SSH, and run the following command:

$ gcloud compute --project "support-team-b" ssh --zone "europe-west4-a" "un-lb"
snirz@un-lb ~$ sudo su -
root@un-lb ~# . elfs_admin
[root@un-lb ~(elfs_admin)]# elfs-cli cloud_provider list
id  project         image                        image_project            zone            region        load_balancer_name  load_balancer_dns_name  load_balancer_use  load_balancer_vip  availability_zone_use  cloud_configuration_id  load_balancer_available_vips                                                                                                                                                                                                                                                           min_cpu_platform
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1   support-team-b  vhead-3-1-0-13-f556d3add66a  elastifle-public-196717  europe-west4-a  europe-west4                                              false              10.128.10.99       false                  4                       ["10.255.255.1/32", "10.254.255.1/32", "10.253.255.1/32", "10.251.255.1/32", "10.249.255.1/32", "10.247.255.1/32", "10.246.255.1/32", "10.237.255.1/32", "10.229.255.1/32", "10.210.255.1/32", "10.209.255.1/32", "172.22.0.1/32", "172.23.0.1/32", "172.24.0.1/32", "172.25.0.1/32"]  undefined

Make sure the the 'load_balancer_use' is set to 'false', and the 'load_balancer_vip' is per the IP you specified in the vars file.


At this stage, the configured IP is still not functional

[root@client ~]# showmount -e 10.128.10.99
clnt_create: RPC: Port mapper failure - Timed out
[root@client ~]#


2. Route Entries Creation- 

In order to activate it, the route entries should be created.

Note- In case you are deploying in a Shared VPC- service project, the route entries should be created in the host project! 

 Note what are the Elastifile storage nodes internal IPs

Create a route entry per each the Elastifile storage node (repeat this example as needed)

Highly recommended in the route entry name to use the following syntax: 'elfs-<ems_name>-<elfs_instance-hash>'



3. Process Validation-

Once you completed step 2, you should route entries as the number of Elastifile storage node

Now, the VIP should be functional as well

[root@client ~]# showmount -e 10.128.10.99
Export list for 10.128.10.99:
/snir_dc/root *



In case of adding an Elastifile storage node, you should create an additional route entry which will represent the new node

In case of removing an Elastifile storage node, you should delete the route entry which represents the removed node

S
Snir is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.