Blog 14th August 2026 – Linux RAID 1 I’ve been working on a data backup solution just recently. Public access wasn’t required but RAID 1 redundancy was. Now would be a good time to see what Linux could do. Windows does offer a software RAID solution (branded as “Storage Spaces”) but I hadn’t realised how bad its reputation was. I spent a week planning (which included exploring Storage spaces) but lost count of the number of posts which boiled down to a desperate plea for help worded along the lines of:-
  • I have a RAID 1 system using Windows Storage space
  • A drive has died... ...no data is accessible and I can’t get any of the data back - please please help!!!
...and then after a number of genuine but ultimately fruitless suggestions
  • I’m giving up restoring the data. I just want to regain control of the good drive
Windows Storage Spaces Nightmare So, how difficult is it to setup a linux based RAID 1 system (using 2 RAID drives)? Let’s start with the following hardware assumptions:-
  • When it comes to Linux Mint you can start with a humble PC. Even 4GB of RAM and an ancient Intel Core 2 CPU would work. It’ll strain when pushed but it would work perfectly adequately. Add to that a 250GB SATA hard disk for the operating system and a pair of drives for the RAID 1 array - and don’t worry about the size... 1TB - 20TB it doesn’t really matter but keep in mind the final RAID drive size will only be as big as the smallest drive in the array. For these notes let’s assume two 4TB drives - both of which are empty of data.

    Make a note of the make and the serial number of each of your RAID drives - and label them before fitting them inside the PC chassis. Write the info down and keep it to one side. We’ll refer to that later.

  • Install Linux Mint right out of the box. Pick all the defaults but make sure you select the 250GB drive for the operating system. Feel free to install video playback codecs if you’d prefer - it won’t make any difference to what we’re doing. Once Linux mint is working - play around with it until you’re happy to start on the RAID configuration.
At that point, you’ll have a system with one 250GB dedicated boot drive - and although the system will have two extra SATA drives connected (for the RAID), Linux won’t have done anything more than assign device names to them. It won’t have partitioned, formatted nor will it have mounted either of them. We’ll need to know the devices names that Linux assigns to these drives (for example /dev/sda or /dev/sdb... /dev/sdx)- but it is worth emphasizing that you shouldn’t get hung up on whatever device names Linux chooses. Linux makes these device assignments on a first come first served basis and they will change across reboots, especially if you replace any of the drive hardware. So while we need to know them, we also need to be aware they can change. There are two ways we can get information about the disks in the system. Open the “Disks” application (click the linux mint start button, and select All Applications and then Disks). All your disks (mounted or not) will be visible on the left hand side. You can click each disk to see more information on the right side and you’ll find the Linux assigned device name listed at the bottom. A second way to do this is to open terminal and run the terminal command lsblk. The assigned device names will be shown under the name columm on the left while the drive sizes will be shown under the “Size” column along with the mount points. For the sake of this example - assume that Linux has assigned our three drive devices as follows:-
  • 250GB Boot drive is assigned as device /dev/sdc
  • The first 4TB RAID drive is assigned as /dev/sda
  • The second 4TB RAID drive is assigned as /dev/sdb
There are some useful tools we can add now including smartmontools that reads a block of smart data from a hard disk providing detailed drive info (including its serial number) and some indications of drive health. Smartmontools isn’t installed as standard on Mint - so open terminal and run the following command to install the tool set (enter your password when asked). Before you do this, don’t forget to run an update on the the Linux repository lists - just to make sure all packages on your system are up to date. To do this on Mint you can either use the updates icon on the lower right of the task bar, or you can run the command in terminal sudo apt update... and if there are any updates use sudo apt upgrade. Then install smartmontools using the following line in terminal (confirm your password if asked) sudo apt install smartmontools Knowing the device assignments (see above) you can then get info on each drive using the following command lines in terminal
  • sudo smartctl -i /dev/sdc     ...to view boot drive info
  • sudo smartctl -i /dev/sda     ...to view the first RAID drive info
  • sudo smartctl -i /dev/sdb     ...to view the second RAID drive info
Note the serial number for each drive. You can compare that with the serial number(s) you wrote down earlier. The important point here is if you ever have to change a drive, first find its Linux device assignment and use that to query the serial number. Finally, check the serial number matches the number written on the physical drive in order to guarantee that you change the correct drive. The next step is to use the RAID manager software in Linux to create and configure a RAID 1 array. To do that we use the “Multiple Disk and Device Manager” included in Linux mint called mdadm. (If you need to install it, use sudo apt install mdadm but on the latest mint it is installed as standard). From within terminal we’re going to define a new RAID array, assigning a device called /dev/md0 for the array, setting it as a RAID 1 type mirrored array using 2 drives - and we'll then provide the existing Linux device assignments for these two drives. Open terminal and enter the single command line below to do all of this:- sudo mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sda /dev/sdb mdadm will warn you that this may not be suitable as a boot drive and will ask if it should continue creating the array - say yes. Assuming all goes well mdadm will confirm that /dev/md0 has started and behind the scenes, mdadm will start mirroring the two drives - a process that will take considerable time (depending on the hard disk size). Regardless we can carry on configuring (is that a movie?) Now we need to create an ext4 Linux partition on the new RAID 1 drive device /dev/md0. We use a special flag here (-F) because the file system creation function needs to know that /dev/md0 is not a partition. It’s actually a whole block device and mkfs needs the flag to confirm that you want to format the entire device. In terminal use the command line:- sudo mkfs.ext4 -F /dev/md0 Allow time for this to fully complete. The next step is to create a Linux mount point so that the drive can be accessed within the Linux file system. Linux always has a root folder called /mnt that is generally reserved as a mount folder. We'll create a new folder in /mnt called md0 to act as our RAID mounting point. With this arrangement if you opened terminal and typed cd /mnt/md0 it would take you to the root of the RAID drive. Use the following two terminal lines to (a) create the mount folder and then (b) mount the RAID drive:- sudo mkdir -p /mnt/md0
sudo mount /dev/md0 /mnt/md0
If you now run df -h in terminal, you’ll be able to see the new drive as device /dev/md0 with mount point /mnt/md0. You'll spot that the drive space is lower than the drive size - that's because the ext4 file system reserves around 5% of the total hard drive space for it's own control. To all intents and purposes, the RAID drive is now running. Depending on the hard disk size it’ll take time for it to be fully mirrored by mdadm - and as an example a 10TB RAID 1 system takes around 15 hours to fully prepare. The next step is to tell Linux what to do with this new drive when it reboots. We have to make two configuration changes so that (a) Linux knows to mount the RAID drive at every boot and (b) Linux updates its own working device / driver cache - which on a working system is based in RAM. That cache will accurately reflect the system devices that were found during the previous boot and so won't know about the new RAID device. In order to tell Linux to mount the RAID drive, we need to add a single line of text to the mdadm configuration file called /etc/mdadm/mdadm.conf. This line tells Linux what device assignment to use and confirms the drive ID using a non ambiguous ID code for the array (known as a UUID). mdadm can be asked to create this line of configuration text using: sudo mdadm --detail --scan. We can also take the line created by mdadm and pipe it directly into the mdadm configuration file, appended at the end - all by using the following single line:- sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf With the mdadm configuration file updated - the next task is to update the Linux device / driver cache of management information - which is stored in RAM. As we've only just added the RAID array, the master Linux RAM information won't yet include this drive so use the following terminal line to force an update (and note this does take some time to complete): sudo update-initramfs -u At this point if you navigate to the drive (using cd /mnt/md0) you’ll find you can open the space, but you probably won’t be able to create any new files, given the permissions haven’t yet been set. You need to first take ownership of the drive and then set your user access permissions. There is a more detailed scenario I will blog later where two people need unrestricted access to the same drive but for now, this is a reasonable starting point giving full permissions to the owner. Assume your login username is: jacobb and use the following terminal commands to first set ownership and then permissions:- sudo chown -R jacobb:jacobb /mnt/md0
sudo chmod -R u+rwx /mnt/md0
If you wanted to create a shortcut on the Mint desktop - right click the desktop anywhere on an empty spot and select “Create a new launcher here”. In the name field you could use MY RAID, in the command field use xdg-open /mnt/md0. Leave both checkboxes unticked and click OK. The new launcher will ask if you want this added to the menu... click Yes. That’s it - you’ve now fully configured a Linux RAID 1 solution although the behind-the-scenes work for Linux has just begun. The software will now slowly work to properly mirror the two drives, while dealing with file read/write requests as they arrive. On a 10TB system that I assessed, it took around 15 hours to fully prepare both drives but the RAID system was perfectly usable during that time period. In later notes I’ll look at managing the array: finding problems, monitoring progress and show a worked example of a drive failure. I'll also look at file/folder sharing (between linux and Windows clients) and also the permissions scenario I mentioned above. Best of luck and enjoy the process if you do try this for yourself. I was so impressed with Linux - and that's coming from someone who at the start barely knew his way around the terminal !!! Comment | Back to Quick Links...