1

I have installed MariaDB Galera Cluster on ubuntu 14 and it is working fine.

See the tutorial

I have 3 nodes (each 500GB HDD capacity) mariadb cluster and all replications are working perfect.

My questions are :

When I run out of disk space after few years, What is the exact way to increase the capacity of the database?

Is it possible to add extra nodes and increase the database HDD capacity? I heard about MaxScale, but I can't figure it out to work on

Can anyone explain this according to above configuration.

This is a MaxScale Simple Sharding with Two Servers

Mohd Abdul Mujib
  • 13,071
  • 8
  • 64
  • 88
Supun Silva
  • 580
  • 5
  • 21

1 Answers1

1

Assuming the 500GB is the problem...

Plan A:

  1. Take a node out of rotation.
  2. Upgrade the disk drive(s) to bigger ones.
  3. Put the node back in rotation. SST will occur, and that one node will now have more space.
  4. Repeat for each other node.

Plan B:

  1. Get a new machine with a bigger drive(s).
  2. Add it to the Cluster. The new machine will do an SST.
  3. Repeat with more new machines.
  4. Permanently remove the old machines.

Plan B will probably also add more cores, etc. (But you did not mention the need for such.)

Both of these methods have no more downtime than loss of a single server (3 times), which you already know about and can easily handle.

If you want to Shard the data, that would involve multiple clusters. Sharding is not warranted unless the write capacity of the Cluster is about to be exceeded. And Sharding is not a trivial task.

Another way to 'expand' disks... With a RAID controller (better than RAID software), you can improve the performance of the disk subsystem via "striping". Usually people go with RAID-5 or RAID-10 to get parity to allow for seamless recovery from a dead drive. However, Galera effectively handles dead drives by letting you repair any part of a server without losing the system. So RAID-0 is arguably more cost-effective.

Some operating systems also let you logically treat multiple drives as a single big filesystem. This does not give you the performance boost of striping, but it does let you (I think) add a drive without having to reinstall the OS, software, and data.

A RAID controller with Battery Backed Write Cache has the extra advantage of making writes "instantaneous" even without risking loss due to power failure.

Rick James
  • 135,179
  • 13
  • 127
  • 222
  • Its great. Thank you. By the way I would like to know is there anyway that, we can configure Galera Cluster to behave like Raid-5 concept (each node similar to a HDD in RAID)? – Supun Silva Dec 10 '15 at 08:44
  • No. Each node in a Galera Cluster has a complete copy of the data. Spider and Clustrix provide ways of sharding. Neither of them do the "parity" part of RAID. Instead, they assume each shard is robust and won't die. – Rick James Dec 10 '15 at 23:16
  • Can I use hadoop instead of Galera Cluster? – Supun Silva Dec 11 '15 at 11:16
  • Hadoop is a _totally_ different animal. You would have to rewrite all your database access. – Rick James Dec 11 '15 at 19:31
  • @RickJames Hi, in this context, what does `Take a node out of rotation` mean ? Stop the `mariadb` service ? – SebMa Apr 24 '23 at 17:13