Page 1 of 1

Storing MySQL data, indexes, and logs on LVM

Posted: Mon Feb 04, 2008 9:05 pm
by mechamecha
Hey All,
I have a urgent MySQL question. I've posted on the MySQL forum but have yet to get a response.

I have two hard drives on a dedicated host. The first hard drive has my lamp(apache, mysql, php) install and the second hard drive is empty. I would like to install LVM on the second hard drive and user it to store all the mysql data, indexes, and logs. This way, I can use zmanda recovery manager to take lvm snapshots of this drive to backup my db.

I want to know how I am suppose to get the mysql data onto this second harddive. Is it as simple as editing the my.cnf and changing the location of the datadir? Or do I have to reinstall mysql directly onto the second harddrive?

Thanks!

Re: Storing MySQL data, indexes, and logs on LVM

Posted: Mon Feb 04, 2008 9:18 pm
by Christopher
mechamecha wrote:I want to know how I am suppose to get the mysql data onto this second harddive. Is it as simple as editing the my.cnf and changing the location of the datadir? Or do I have to reinstall mysql directly onto the second harddrive?
I should be as easy as stopping MySQL, copying the data dir to the second drive, editing my.cnf with the path to the data dir on second drive, and restarting MySQL.