Moving database or ignition files to another folder

My ignition installation is installed on a small 20G partition. This small partition is also where ignition created my database. I’d like to move the database (and maybe the ignition files also) to another folder that has a lot of free space. I’m not sure how to go about doing this, or how much risk is involved. My searches for information relating to how file storage is configured is coming up empty. Can anyone help?

Using Ignition 7.9.7

This isn’t really an Ignition question. More of a linux question. That said, I would:

  • Shut down the Ignition and MySQL services,
  • Locate the folder for mysqldata,
  • Rename that to something temporary, and create an empty folder in its place (the original name),
  • Mount your new, empty partition at that empty folder,
  • Move the contents of the renamed folder into the new folder, so it appears to be (and will function) just like it originally did,
  • Update /etc/fstab with the new arrangement,
  • Update the MySQL service to depend on the mount being in place,
  • Start both services again.

While I am not a MySQL user and therefore can’t be more specific about the locations and service settings, this general procedure is very safe. I do this for PostgreSQL tablespaces in most of my installs. The only potential problems would be filesystem compatibility – easily mitigated by using the same fs type and mount options as for /.

Thanks for the quick response pturmel.

I’m familiar with moving files around and mount points in Linux, so I understand the first steps. I will need to get more information on how to

“Update the MySQL service to depend on the mount being in place,”.

I’m not very experienced with this.

Depends on the distro and version. Relatively easy with systemd (see the service files docs).