Select Page

Setting up and dealing with software RAIDs in Linux can be a pain – especially if you have drives over the old 2TB limit. After many setups over the years, here is the best way on Ubuntu systems (or any system that uses MDADM).

If you drives are over 2TB in size start at step 1, otherwise skip to step X. In this example,. I have the OS installed to /dev/sda1 , the RAID1 I want to set up include 4TB drives on /dev/sdb and /dev/sdc:

1. Verify the drives are labeled what you thought: fdisk -l /dev/sdb  AND fdisk -l /dev/sdc

2. To create a partition start GNU parted: 

  • parted /dev/sdb
  • (parted) mklabel gpt
  • Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?Yes/No? yes
    (parted)
  • (parted) unit TB
  • (parted) mkpart primary 0.00TB 4.00TB
  • (parted) print
  • (parted) quit

3. Repeat steps for each drive that will be in the array. In this case just SDB and SDC.

4. Once the large partitions are in place, format the drives with: mkfs.ext3 /dev/sdb1 AND mkfs.ext3 /dev/sdc1

5. Now that all the partitions are set up, and those partitions have been formatted, it is time to set up the array using MDADM.

6. Install MDADM: apt-get install mdadm

7. Install MDADM web admin (makes everything easy):

  • On Ubuntu, create the following file: /etc/apt/sources.list.d/webmin.list and add the following lines to it:
  • # Repository for Webmin
  • deb http://download.webmin.com/download/repository sarge contrib
  • apt-key adv –keyserver keyserver.ubuntu.com –recv-keys D97A3AE911F63C51
  • apt-get update
  • apt-get install webmin

8. Use your browser to access your webmin panel at the following url: https://localhost:10000

9.To administer the Software RAID using webmin login as a sudo-er, go to the page Hardware > Linux RAID, select create RAID and the type you wish with the specific drives you want to use. 

10. To watch the progress of your RAID syncing: watch -n3 cat /proc/mdstat

11. Mount the volume – edit FSTAB – ENJOY!