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 - and unwilling as I was to trust Windows to control a data archive, I wondered what Linux could do. It is worth mentioning up front that although I've played with Linux before, I've never built a Linux system with a specific purpose in mind (arguably one of the better ways to learn how an operating system works). Windows does offer a software RAID solution (branded as “Storage Spaces”) but I really hadn’t grasped just how bad its reputation was. I spent a week planning the system and looked carefully at Windows Storage Spaces mainly because a potential candidate PC I had in mind was already running Windows 10, albeit dog slowly. But on exploring the windows RAID control offering I actually lost count of the number of posts that went something like this:-
  • I have a RAID 1 system using Windows Storage space and 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 would it be to dump Windows and setup a linux based RAID 1 system (using 2 RAID drives)? As I mentioned, I already had an older candidate PC in mind for this project. Originally purchased around 2006 to run Windows XP it had 4GB of RAM with a 64 bit Intel Core 2 CPU and at that time had run 32 bit XP really well. Alas, given the modern bloat that accompanies Windows... each new release had become less and less usable. Recently I had very optimistically installed Visual Studio on it (to try to do some processor development on a Teensy 4.1 board), but even loading Visual Studio was a 15 minute marathon and boot was generally best started before making a cuppa. Linux is a quite different ball game given it can do far more with much less and so gives these older machines a new lease of life. After tests - this machine did struggle when pushed heavily but it was surprisingly usable given it kept up well with LAN traffic.
  • So if you have an older machine that won't run bloaty Windows, fire it up. Add to that something like a 100 or 250GB SATA hard disk for the operating system and a pair of drives for the RAID 1 array - and don’t worry overly about the size... 1TB - 20TB it doesn’t really matter but keep in mind the final RAID drive size will only be as large as the smallest drive in your array. For these notes let’s assume you're using two 4TB drives - both of which are empty of any 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 as we’ll refer to that later.

  • Install Linux Mint right out of the box. Use 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 column 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 but before we do that there is a Linux housekeeping chore we need to take care of first - namely to update the system repository and package information database. Generally it's a good rule of thumb to do this every time you start working on Linux. You can either open the update icon on the bottom right of the desktop (see icon circled in red) or you can open up a terminal and run sudo apt update and if that confirms that there are updates, then run sudo apt upgrade.
Linux Update Icon
smartmontools Hard Drive Data Dump
A useful tool to have installed is smartmontools - capable of reading a block of smart data directly from a hard disk including detailed drive information such as make, model, serial number, spin speed, sector size, firmware version and even the SATA bus speed. 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).
sudo apt install smartmontools Knowing the Linux drive device assignments (see our list above) we can use smartmontools to reveal information for 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
If you've bought the drive second hand, use sudo smartctl --all /dev/sd? to reveal all diagnostic information about that drive - but do keep in mind that even an old drive can still be a useful drive. 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 is given the switch to confirm that you do 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, which 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 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. If you do try this for yourself, the very best of luck and enjoy the process. I have to say I was really 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...