
newbury at mandamus
Jan 24, 2011, 7:01 AM
Post #6 of 7
(923 views)
Permalink
|
|
Re: Moving my mysql database to another drive
[In reply to]
|
|
On 01/23/2011 01:12 AM, Michael Rice wrote: > I am having some problems that may be related to disk performance. > (See http://www.mythtv.org/pipermail/mythtv-dev/2011-January/070387.html). > I have an extra drive and I am thinking about moving the database to it > to see if it helps the situation. > > If anyone has pointers/gotchas on doing this (especially on Fedora) > I'd appreciate hearing about them. Is there any particular way I > should format the drive to help performance? There is a section in the myth documentation which sets out the steps required to move the database. That section looks more at moving from one machine to another. In your case, you are only moving the files from one mount point to another. I have run myth on fedora for a number of years with the files on a different partition than the mysql server thinks they are, by making the usual file tree site a soft link to the new spot, ie: service mysqld stop * mkdir /home/mysql # or wherever... rsync -avu /var/lib/mysql/* /home/mysql # make the copy chown -R mysql:mysql /home/mysql # compel ownership rm -rf /var/lib/mysql # remove old spot ln -s /home/mysql /var/lib/mysql # trick the mysql server service mysqld start The mysql server continues to think that things are at /var/lib/mysql while the OS slips in a substitution. In your case, you will want to create a mount point for the new file tree, on a different drive, first. You might want to consider moving your entire /home tree to that drive anyway, so as to keep it entirely separate from the rest of the OS. (Makes re-installs much easier!) As to formatting, you want a filesystem optimized for dealing with many small files (as distinct to one with a few large files). I do not think that there are disadvantages to just using ext4. Under the circumstances, I am not sure that having journalling can actually help much, but I understand that it has no speed disadvantages, so I would go with that. HTH R. Geoffrey Newbury _______________________________________________ mythtv-users mailing list mythtv-users [at] mythtv http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
|