Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using MySQL.

I have one volume with 1TB of space.

But now I need more space (let's say one more TB).

How can I use MySQL to store data on more than one volume ?

share|improve this question

migrated from stackoverflow.com Sep 26 '11 at 5:32

This question came from our site for professional and enthusiast programmers.

    
You might want to consider using RDS, which is a managed MySQL service provided by Amazon. –  SilentSteel Feb 12 at 12:28

3 Answers 3

I take it from the 1TB size mentioned that you're using EBS. Create two EBS Volumes and combine them with RAID0. In addition to giving you more space, this will also improve your performance.

share|improve this answer

If its a normal ec2 instance (rather than RDS) so you have command line access.

Can just use symlinks to map parts of the data folder elsewhere. Eg. Shut down MySQL server

cd /var/lib/MySQL
mv bigdata /mnt/new/bigdata
ln -s /mnt/new/bigdata

And start MySQL again. The bigdata database is now running from another partition.

Of course this is best suited to myisam tables. If innodb then going to need to mess with table spaces to get seperate files so can move some of them

share|improve this answer
    
How can i store the bigdata in the new volume if i only have 1 TB of space. I need 2 volumes and i need to access them both at the same time every time i make a query. moving them to the new volume and map it does not solve my space problem. –  Aw Suevi Sep 26 '11 at 17:19

Note that EBS volumes can currently be up to 1 TB in size. The largest EC2 instances offer local storage (ephemeral storage) up to 1,690 GB, but that storage is not persistent.

Best,

Simone

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.