Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I want to set up a server with Raid 1. The machine currently is running Ubuntu server and has a media drive that is shared with people in my house. I would like the media drive, all home folders and all my MYSQL databases on the raid array. I just bought 2 1.5 TB hard drives, and the plan was to reload the OS on these drives and set them up for raid 1. Both of my room-mates however tell me I should do this a different way. They say that I should keep the OS drive that I am currently using and just replace the media drive with the raid array.

My question is which set up is better? just replacing one drive with the raid array, or the whole system with the raid array. If I do the former, how will I ensure that my databases are on the array? Any suggestions or advice would be appreciated.

share|improve this question
up vote 1 down vote accepted

I would listen to your roommates. Set up the new drives in RAID 1, then create a mount point (/data, for example) to mount it. Copy your databases to the new partition, then adjust your my.cnf to point to the new datadir.

The main benefit of this setup is that you have your OS and your database/media on separate spindles so you don't have disk contention. This means better IO performance when your server is busy.

A nice side benefit is that you can swap the OS drive out for another disk when you are performing an upgrade. Should something go awry, just plug your old drive back in and you're back in business.

share|improve this answer
dude, sounds awesome. I am assuming that the my.conf will tell me where my databases currently are? – piratebill Oct 30 '10 at 23:15
Look for the "datadir" setting in my.cnf. It should be set to something like /var/lib/mysql. – Cakemox Oct 30 '10 at 23:36
perfect. thank you – piratebill Oct 30 '10 at 23:39
Have fun, and don't forget to make backups! – Cakemox Oct 31 '10 at 0:10

Your Answer


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.