I need to install a software raid-0 array on a Ubuntu 12.04 server with mdadm through commandline (SSH).

The drive setup is as follows:

  • SDA = OS SSD
  • SDB = HDD for raid 0
  • SDC = HDD for raid 0
  • 2
    Please be aware that RAID0 is a very bad idea on a server in general. What have you tried? Is this a new installation or an existing one? What installation medium are you using? (for 12.04 you'll need the alternate installer I believe) On an existing setup, you can just create an array using mdadm.
    – gertvdijk
    Dec 19 '12 at 15:58
  • it was a bitcoin poolserver back then i was on a budget and somehow needed to get io up as the db was lagging when parsing data
    – user115639
    Aug 30 '16 at 2:03

You can setup RAID 0 array from this tutorial how ever the chunk size while telling mdadm is not provided in the tutorial and will use from the default setting from your config file but you can do it yourself just by adding --chunk=128 on the command


Why you don't use LVM (Logical Volume Management) to do this :

1-Create a physical volume on the first hard drive, and another physical volume on the second hard drive.

2-Create a new volume group, assigning both physical volumes to it.

3-Create a new logical volume in that volume group.

  • I don't think LVM is for servers... well that type of LVM.
    – Star OS
    Nov 23 '15 at 17:49
  • LVM and raid are two different beast - you can apply lvm on top of raid
    – user115639
    Aug 27 '16 at 19:05

Basically, you need the mdadm tools and I'll just assume you have them installed. My best guess would be:

mdadm --create /dev/md0 -n -l0 /dev/sdb /dev/sdc

This should create a block device /dev/md0, which you can use as you please. Typically, I put LVM on top, but you do whatever you want. I couldn't actually test this right now.

Normally, I create partitions with the RAID partition type (Partition ID=FD, "Linux raid autodetect"), which I then raid... But it might work on the bare disks.

Since I like to verify, I googled around and found http://www.tecmint.com/create-raid0-in-linux/, which is pretty much all you need to know to get it up and running.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy