I'm experimenting with creating a software RAID 0 device from 4 EBS volumes on Ubuntu 9.10 running at Amazon AWS following this guide:


The device appears (and according to SysBench is 3.5x faster than a regular attached EBS volume).

Problem is, when I reboot the instance, all files on the RAID device are gone. The device is available and mounted where expected, but contains no files. I am able to write new files to it, which survive until the next reboot.


Here's the script I use to setup the RAID. It writes to /etc/fstab and /etc/mdadm.conf

# Create RAID 

devices="/dev/sdj /dev/sdk /dev/sdl /dev/sdm"
volumeids="vol-11111111 vol-22222222 vol-33333333 vol-44444444"

yes | sudo mdadm          \
  --create /dev/md0       \
  --level 0               \
  --metadata=1.1          \
  --raid-devices $volumes \

echo DEVICE $devices | sudo tee /etc/mdadm.conf 
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm.conf
sudo mkfs.xfs /dev/md0

echo "/dev/md0 $mountpoint xfs noatime 0 0" | sudo tee -a /etc/fstab
sudo mkdir $mountpoint
sudo mount $mountpoint


# /etc/fstab: static file system information.
# <file system>                                 <mount point>   <type>  <options>       <dump>  <pass>
proc                                            /proc           proc    defaults        0       0
/dev/sda1                                       /               ext3    defaults        0       0
/dev/sdb                                        /mnt            ext3    defaults        0       0
/dev/md0 /mnt/raid xfs noatime 0 0


DEVICE /dev/sdj /dev/sdk /dev/sdl /dev/sdm
ARRAY /dev/md0 level=raid0 num-devices=4 metadata=01.01 name=ip-10-194-5-235:0 UUID=67392a94:553fddec:4bc8e5c7:8d25c3ca
  • Please post the files you use to enable the raid 0 on boot. I suspect any foul play might be there.
    – jneves
    May 14, 2010 at 20:52
  • @jneves: Updated with relevant files.
    – Eric J.
    May 14, 2010 at 21:25

3 Answers 3


It seems that extra white space after the device name in mdadm caused the issue. Editing away extra white space and repeating the procedure resolved the problem.


Add rw you fstab line. Like this, /dev/md0 /mnt xfs rw,noatime 0 0


I know this question is really old but I want to help those who will stumble on this just like I did. I was facing the exact same problem and ended up doing 4 things to make my RAID0 survive reboots(Ubuntu 12.04).

1) Entry in the /etc/fstab file: /dev/md0 /mnt/md0 auto defaults,nobootwait,comment=cloudconfig 0 2

2) echo 'DEVICE /dev/sdb /dev/sdc' > /etc/mdadm/mdadm.conf,

3) mdadm --detail --scan >> /etc/mdadm.conf

4) sudo update-initramfs -u

With this I was able to handle several reboots of my machine and RAID0 came up every time. Hope this helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .