Setting up RAID 0 on CentOS remote server

hdnut

Gawd
Joined
Jun 10, 2008
Messages
829
I am currently trying to set up a Raid 0 array on my remote server via Putty. It is running CentOS 5 and has 2 x 500 GB hard drives. Where can I go to get a good step by step guide on how to this properly?

Since it's a remote server, I only have access to this server by the means of Putty, winscp, and VNC. My Linux literacy is at novice - intermediate level so a good comprehensive guide is a plus. Thanks in advance guys.

*Edit

My intent is to set up software raid 0 on the server. I know this is no where near the performance of hardware raid, but this is the only option I have at the moment.
 
Last edited:
I'm pretty sure your boot partiton cannot be on a raid0 array, so if these are the only teo drives in the server I wouldnt recommend proceeding without reading some info on mdadm.
 
I'm pretty sure your boot partiton cannot be on a raid0 array, so if these are the only teo drives in the server I wouldnt recommend proceeding without reading some info on mdadm.

I've come across information that states it can be done, just haven't come across any comprehensive guides that shows how. Since it's software raid, it'll be using partitions, not the entire drives, so as long as the boot partition is set up on a separate partition, I think it'll be ok.

For now, I'm using the drives individually until I have full understanding on how to set this up properly. Still researching...
 
Since you've got two disks, I would do the following:

disk1 = /dev/sda
disk2 = /dev/sdb

Make three identical partitions on each drive. I like to do Swap, /boot, and /. You can obviously change this to your liking.

Swap
Code:
mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1

/boot
Code:
mdadm --create /dev/md1 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb2

/
Code:
mdadm --create /dev/md2 --level=0 --raid-devices=2 /dev/sda3 /dev/sdb3

Now you just format them using mkfs.ext* /dev/md* and set your mount points in /etc/fstab.
 
Back
Top