Separating frappe/erpnext sites and mariadb data


Does anyone have guidance how to separate bench and mariadb to different volumes?

  • disk1 : OS (AlmaLinux 8)
  • disk2: bench (apps, sites, config, etc)
  • disk3: mariadb

Thank you


You can provide the path to the –installroot option in the Yum or DNF install command to the drive or directory you want for mariadb and other apps

So to confirm:

sudo dnf --installroot=/desk2/appdir --releasever=/ install <all other dependencies>

How about bench init?

sudo dnf --installroot=/desk3/dbdir --releasever=/ install mariadb mariadb-server

Then how to point the frappe/erpnext to the mariadb?
Is this considered remote db (need to set host in common_site_config.json) or not?

MariaDB data is located at /var/lib/mysql, Mount a disk at that location before installing mariadb. Google search resulted in linux - Remounting MySQL under a new mount point - Server Fault

edit: Setup MariaDB Server · frappe/frappe Wiki · GitHub

This link might be useful

Also you could look at the links on the above post by @revant_one, which is another way to do as well

So to summarize my setup:

A server with 3 disks/partition:

  • Partition 1: OS
  • Partition 2: Bench (moving /home to this partition)
  • Partition 3: Mariadb (moving /var/lib/mysql to this partition)