Help - Search - Members - Calendar
Full Version: Moving MySQL to a second hard drive
The Planet Forums > System Administration > General Support Questions
SEAL31
I was wondering if anyone has any articles on how to do this? I googled it and couldnt find anything, forum search didnt come up with anything either.

Thanks loads
DomineauX
This is quite simple really:


Once you have your second drive formatted and mounted (for this example we'll use /drive2 as the mount point for the drive)

do this:


/etc/rc.d/init.d/mysql stop
mv /var/lib/mysql /drive2/
ln -s /drive2/mysql /var/lib/mysql
/etc/rc.d/init.d/mysql start

This is actually quite a good way to improve performance on a server with a large amount of MySQL activity.
theuruguayan
just take a look at the iowait value if you have LOTS of your mysql.

Perhaps you still need a second hd to handle the load.

carlos
SEAL31
That worked great, thanks. I moved it to the second HDD, and re-compiled my kernel with DMA and got a 40MB/s increase in HDD speed, so MySQL is much faster now. Thanks icon_smile.gif
DomineauX
Great, glad to hear it!
stressed
EDIT, please see this thread for my posts

http://forums.ev1servers.net/showthread.ph...&threadid=53513
stressed
EDIT, please see this thread for my posts

http://forums.ev1servers.net/showthread.ph...&threadid=53513
stressed
EDIT, please see this thread for my posts

http://forums.ev1servers.net/showthread.ph...&threadid=53513
stressed
EDIT, please see this thread for my posts

http://forums.ev1servers.net/showthread.ph...&threadid=53513
cristianmerz
Is it possible to put MySQL in a second drive with Ensim? I need down the use of the primary disk
eth00
QUOTE (cristianmerz)
Is it possible to put MySQL in a second drive with Ensim? I need down the use of the primary disk


I do not believe so without a lot of mess. Ensim actually runs the mysql from within the chrooted enviroment so running them on another drive would require linking/moving each one IF it is even possible which I am thinking not.

Ensim really makes it hard in general to use the second drive unless you dedicated an entire drive to a site or directory.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.