We are running out of room in /var and we are looking at moving the MySQL DB files and log files to a different location. Would this pose an issue down the road with a Nagios Patch/Upgrade? We are making all changes in the /etc/my.cnf.
-Doron
Changing MySQL Default location?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Changing MySQL Default location?
Well you can certainly offload your database:
http://assets.nagios.com/downloads/nagi ... Server.pdf
You will have to change quite a few more files than just my.cnf because of ndo and web interface access.
http://assets.nagios.com/downloads/nagi ... Server.pdf
You will have to change quite a few more files than just my.cnf because of ndo and web interface access.
Re: Changing MySQL Default location?
I forgot you guys don't have ESP ><
We are looking at putting it in a different location/partition on the same server.
We are looking at putting it in a different location/partition on the same server.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Changing MySQL Default location?
Ah esp, that would be nice! 
Probably the easiest way would be to copy the existing files in/var/lib/mysql to tmp or somewhere else, mount the new partition under /var/lib/mysql and copy the existing files onto the new partition. This way you would not need to alter the mysql configs at all and could change drives at a later date again if needed.
edit: Don't forget to stop nagios, ndo2db, and mysql before making the move.
Probably the easiest way would be to copy the existing files in/var/lib/mysql to tmp or somewhere else, mount the new partition under /var/lib/mysql and copy the existing files onto the new partition. This way you would not need to alter the mysql configs at all and could change drives at a later date again if needed.
edit: Don't forget to stop nagios, ndo2db, and mysql before making the move.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Changing MySQL Default location?
If symlinks are an option, they will most definitely be the easiest way to move the actual location of the tables.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Changing MySQL Default location?
We do have more limited control of the server on the hardware side. We could ask them to add additional space to the /var, though my manager might shoot that down as we do have a lot space in a /u01 partition. I was thinking that just putting it in a different location would be the best idea, I thought about sym links, though I am trying to figure out the best way to do this.
-Doron
-Doron
Re: Changing MySQL Default location?
Do understand that moving the db to a network share may adversely affect your install if the network storage cannot keep up.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.