-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable to change default datadir in my.cnf #27
Comments
@achandel Thanks for this. I have implemented this and you should be good to go now. |
@mrlesmithjr Thanks for this |
@achandel No problem at all. |
This Ansible Role is well written. I am going to use it to deploy a large Galera MariaDB cluster in multi Data center scenario with multiple gmcast.segment. Will keep you posted on any improvements required. Great work! |
@achandel Thanks for the great feedback. Definitely let me know how everything works out for your deployment. And definitely let me know if you find anything that can be improved. |
The role does not work when an data directory different from /var/lib/mysql is specified e.g. mariadb/data. This is an issue when a fresh install of the mariadb is done. This is not required if you are making changed to an existing installation, in this case you just need to make changes in my.cnf SOLUTIONOnce the installation is complete you need to copy the contents of /var/lib/mysql to your data directory. I worked around by adding these two tasks in setup_cluster.yml just after the task setup_cluster | killing lingering mysql processes:
|
@eRadical Thoughts on this? |
I think this will be covered w/ the changes that I'll soon (hopefully very soon) send as per discussion in #29 While @achandel has a workable solution I'm not quite fond of |
Thanks for the input @eRadical. I tend to agree on the |
I came across this issue today and got another solution without altering the role. Before executing the role I create a symlink to my real destination (mounted disk). |
Isn't it more simple to have a few tasks at start to ensure that datadir exists and it is owned by mysql user? apt can use add mariadb configuration files, without galera confs later when configuration files are currently put, only the galera ones are needed. |
Can confirm it's breaking a fresh install to non-standard folder |
If you want to use a different data directory e.g. in case of using an EBS volume to store data. The /templates/etc/mysql/my.cnf.j2 should use a variable for datadir.
The text was updated successfully, but these errors were encountered: