[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding a new HDD - how do I move /var/lib/mysql ?



It's worth a bash! Thanks, I'll try this out in the next few days and
let you know if there were any modifications to your suggestion.

Regards
Justin

On 1/10/07, Kevin Mark <kevin.mark@verizon.net> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jan 10, 2007 at 09:31:31PM +0200, Justin Hartman wrote:
> I currently have a server with an 80GB hdd which is running out of
> space very quickly. I want to now add a 250GB hdd in addition to the
> 80GB one and move my mysql data to this new 250GB drive.
>
> I am running mysql-5.0.30 on Etch which was installed via apt-get so
> there has been no modifications made to mysql whatsoever. How do I now
> move my mysql server to store files on the new hard drive instead of
> the old one without having to mess around too much?
>
> Any help appreciated.
> --
> Regards
Hi Justin,
probably the simplest way is to just make a new /var on the new drive
and move all of it there.
- -add new HD to computer
- -partition HD
- -format HD
- -mount new HD as /mnt/newvar
- -stop all processes (like single user mode)
- -copy all of /var to /mnt/newvar
- -move /var to /oldvar (not sure this works)
- -create /var
- -edit fstab to add mount point to make new partition point to /var
- -reboot and hope it works
cheers,
Kev



Reply to: