Question
GlusterFS Geo-Replication
USEFUL INFO:
I have three nodes: nginx01-03 (all running Ubuntu 14.04). The nodes nginx01/02 currently reside in NYC3 and have GlusterFS (v3.6.5) replication working between them without issue via the private network. I have modified the /etc/hosts
file of all three nodes to point to the respective parties IP address that’s necessary (in this case: 01 and 02 see the private IP of each other and the public IP of 03 whereas 03 sees the public IP of 01 and 02). They’ve been given the shortname of nginx01-03 respectively.
ISSUE:
I was able to establish replication between two nodes in the same DC (NYC3) over the private network without issue; however I’m trying to utilize the geo-replication feature of GlusterFS with my NYC3 node(s) and a LON node.
I’ve attempted to use instructions found here: http://www.jamescoyle.net/how-to/1037-synchronise-a-glusterfs-volume-to-a-remote-site-using-geo-replication
However there are numerous issues that I’ve encountered:
the
secret.pem
file did not allow for password-less SSH. I had to modify the~/.ssh/config
file on the master node to specifically point to that file by using theIdentityFile
option.the command to initiate the volume on the master node to the slave node failed:
root@nginx01:~# gluster volume geo-replication primaryvol nginx03:/gluster/ start
Staging failed on localhost. Please check the log file for more details.
geo-replication command failed
I have no idea where the “log file” in question is; however I utilized the --log-file=
option to specify one. It proved less than helpful as the only information I received was the following two lines:
root@nginx01:~# tail /var/log/gluster_error
[2015-09-06 12:51:34.949782] I [socket.c:2353:socket_event_handler] 0-transport: disconnecting now
[2015-09-06 12:51:35.205223] I [input.c:36:cli_batch] 0-: Exiting with: -1
Anyone have success setting this up or using geo-replication in general? Any additional information you need just let me know and I’ll gladly provide!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Hello. I succeed to setup geo-replication like you want on Ubuntu.
Let say, you have one LAN volume nginx01-02 with name ‘lan-volume’ - this is Master volume.
Slave volume is nginx3 with name 'geo-volume’.
Now your settings should match next conditions:
Condition 1.
Total size of Master(lan-volume) is less then Slave(geo-volume).
Condition 2.
Make passwordless ssh for root. Generate authorized and private key:
Now sync folder to all nodes.
Now connect to each of them to add to known hosts and check connection.
Condition 3.
Geo-replication is using 'gsyncd’ and it should be located in /usr/libexec/glusterfs/. On Ubuntu this pass doesn’t exist. So you need to create it and make symbolic link to existing one all three nodes
Now you just need to login to Master, setup geo-volume and start geo-replication as in instruction you give link to.