A maneira mais fácil depois de analisar as respostas e pesquisar no google o problema foi fazer um cluster do mariaDB com o rsync
Ubuntu 16.04.03 usando as etapas de configuração do MariaDB 10.2.8:
sudo apt-get install curl
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
sudo apt-get update
sudo apt-get install mariadb-server
sudo apt-get install rsync
sudo systemctl start rsync.service
sudo systemctl enable rsync.service
systemctl list-unit-files |grep rsync
no primeiro nó edite /etc/mysql/conf.d/galera.cnf
[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
# Galera Cluster Configuration
wsrep_cluster_name="[Cluster name]"
wsrep_cluster_address="gcomm://[node1 ip],[node2 ip]"
# Galera Synchronization Configuration
wsrep_sst_method=rsync
# Galera Node Configuration
wsrep_node_address="[node1 ip]"
wsrep_node_name="[node1 name]"
Pare o MariaDB e inicie o primeiro nó no cluster
systemctl stop mysql.service
galera_new_cluster
systemctl status mysql.service
mysql -u root -p -e "show status like 'wsrep_cluster_size'"
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 1 |
+--------------------+-------+
no segundo nó edite /etc/mysql/conf.d/galera.cnf
[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
# Galera Cluster Configuration
wsrep_cluster_name="[Cluster name]"
wsrep_cluster_address="gcomm://[node1 ip],[node2 ip]"
# Galera Synchronization Configuration
wsrep_sst_method=rsync
# Galera Node Configuration
wsrep_node_address="[node2 ip]"
wsrep_node_name="[node2 name]"
Pare o MariaDB e inicie o segundo nó no cluster
systemctl stop mysql.service
systemctl start mysql.service
systemctl status mysql.service
mysql -u root -p -e "show status like 'wsrep_cluster_size'"
+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| wsrep_cluster_size | 2 |
+--------------------+-------+
Para adicionar mais nós ao cluster, basta editar /etc/mysql/conf.d/galera.cnf assim:
....
wsrep_cluster_address="gcomm://[node1 ip],[node2 ip],[node3 ip],[node4 ip],[node5 ip]"
....