Mysql – shrink ibdata1 in Galera Cluster

galeraibdatamaintenancemariadbMySQL

I'm having a Galera cluster (3 nodes, but currently using only one), MariaDB 10.0 Galera.

However, my ibdata1 is growing HUGE (although using inno_file_per_table=1).

Now i want to "shrink" it by using mysqldump (see here) but this is a really time consuming task for my load (around 12-15 hours, tried it with an equal server)
The database size we are talking about is around 150G (and ibdata1 grew to 163G over years due to unclever decisions). Now my main goal is to reduce downtime, say: Only the time it takes to create the dump.

My idea was to use mysqldump as SST method, but: How long is the cluster blocked? Only the time it takes to create the mysqldump or the time it takes to create + recover on the joiner?

Do you have another idea to do this with a small downtime?

Best Answer

I don't think you have many options here. If you want to maintain high availability I'd say shutdown on node and configure it as a replication slave of one of the cluster nodes. Rebuild it from a mysqldump of the cluster node. Once slave catches up, restart it as wsrep node 1 of a new cluster and then promote it as master. Shutdown the other two nodes of the old cluster and empty datadir, and let each join one at a time to the new cluster. Others may have a better suggestion though.