Galera Cluster Mariadb Slave replication from cluster, graceful restart and gcache

Discussion in 'Server Operation' started by jack chuong, Nov 8, 2019.

  1. jack chuong

    jack chuong New Member

    Hi all,
    My environment : Galera Cluster Mariadb with 3 nodes (MariaDB-server-10.1.38 , Centos 7) , production databases .
    I attempt to do "MariaDB Replication between MariaDB Galera Cluster and MariaDB Server" , make another server to become slave of this cluster , I read following instructions :

    What I concern : I have to apply new configuration (wsrep_gtid_mode, wsrep_gtid_domain_id, server-id, log_slave_updates, log-bin, log-bin-index, gtid_domain_id) into all cluster nodes and restart cluster gracefully.
    How to do it ?
    1. Rolling restart all nodes in cluster (one by one)
    2. Shutdown and start all nodes in cluster one at a time (in order , shutdown n3 , n2 , n1 then start n1 with galera_new_cluster , then start n2 , n3)

    If I have to do "2" , how to avoid SST when start n2 and n3 ? I know I should shutdown 3 nodes very quickly and the interval between them is short but just in case.
    I read about gcache.size , gcache.page_size , gcache.keep_pages_size at but I'm still confused about them.
    My current (3 nodes) wsrep_provider_options : gcache.keep_pages_size = 0; gcache.page_size = 128M; gcache.recover = no; gcache.size = 128M
    Should I change them to : gcache.keep_pages_size = 5G; gcache.page_size = 5G; gcache.recover = yes; gcache.size = 5G ?
    I want to change gcache option so it is easier for me to add new node into cluster in future. Can I change gcache option in configuration file then do rolling restart all nodes in cluster ?
    Please give me some advices , thank you very much.

Share This Page