Create RAID on Amazon EC2 EBS volumes
If you use Amazon AWS cloud services you definitively want to utilize software raid for IO intensive stuff such as database data directories and the like.
Here's how you create it:
- Create some EBS volumes within management console or
sudo mdadm --create -f /dev/md0 --chunk=256 --level 10 --raid-devices 4 /dev/sdf /dev/sdg /dev/sdh /dev/sdi
- Create a fs on
/dev/md0
using mkfs*-tools - As soon as this is running, you should do that:
sudo mdadm --detail --scan >> /etc/mdadm/mdadm.conf
Make sure the last line in /etc/mdadm/mdadm.conf
looks like that
ARRAY /dev/md0 level=raid0 num-devices=4 metadata=00.90 UUID=1234567893:abcdef:123