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

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



Install new hard driver.

Create a partition
Fdisk /dev/hdx
Add to fstab
As /dev/hdx /mnt/hdx 
Format it
Mkfs /dev/hdx
Mount /dev/hdx
Stop mysql
Mv /var/lib/mysql /mnt/hdx
Link it over
Ln -s /var/lib/mysql /mnt/hdx/mysql
Start mysql

Means you can move other things into it if you run out of space again.

> -----Original Message-----
> From: Justin Hartman [mailto:jjhartman@gmail.com]
> Sent: 10 January 2007 19:32
> To: debian-user@lists.debian.org
> Subject: Adding a new HDD - how do I move /var/lib/mysql ?
> 
> 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
> Justin Hartman
> PGP Key ID: 102CC123
> 
> 
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org



Reply to: