Example File System Configuration for MariaDB Xpand

Overview

This example assumes a server with the following disks:

  • /dev/sda : 1TB mechanical disk, (already mounted as / [i.e. root file system])

  • /dev/sdb : 1TB mechanical disk (not yet used)

  • /dev/sdc : 300GB SSD (not yet used)

  • /dev/sdd : 300GB SSD (not yet used)

We create a RAID-0 software volume on top of two SSD drives for the Xpand data and use mechanical disk for Xpand logs.

Create a software RAID-0 volume on the SSDs:

shell> sudo mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdc /dev/sdd

Create an ext4 filesystem on a RAID-0 volume and mount to /data:

shell> sudo mkfs.ext4 /dev/md0
shell> sudo mkdir -p /data
shell> sudo mount /dev/md0 /data

Create an ext4 filesystem on mechanical disk and mount to /data/clustrix/log:

shell> sudo mkfs.ext4 /dev/sdb
shell> sudo mkdir –p /data/clustrix/log
shell> sudo mount /dev/sdb /data/clustrix/log

Update /etc/fstab:

shell> sudo sh -c "echo '/dev/md0 /data ext4 defaults,noatime,nodiratime 0 2' >> /etc/fstab"
shell> sudo sh -c "echo '/dev/sdb /data/clustrix/log ext4 defaults,noatime,nodiratime 0 2' >> /etc/fstab"