RAID Recovery™
Recovers all types of corrupted RAID arrays
Recovers all types of corrupted RAID arrays
Last updated: Dec 17, 2024

How to set up RAID 1

Different RAID arrays exist for various purposes; each RAID array has specific data storage procedures that could be beneficial for certain needs. RAID 1 is one of the RAID arrays that offers high resilience with decent enough write speeds. You require a minimum of two disks to set up a software or hardware RAID 1. This article explains what RAID 1 is all about and why it’s a popular RAID type among data experts.

What Is a RAID Setup

RAID (Redundant Array of Independent Disks) is a storage configuration method that employs different techniques for data storage. There are different types of RAID storage setups, generally referred to as “Arrays.” A Raid Array is a type of RAID storage configuration that employs specific techniques for data storage; popular ones are RAID 0, RAID 1, RAID 5, RAID 6, and RAID 01/10.

Generally, each RAID array employs one technique such as mirroring, striping, or parity, or combines any two of these techniques. The essence of RAID setups is to create large storage by combining multiple storage hard drives (SSD or HDD). The numerical values are used to identify the RAID array or level, the numbers hold no other significance.

Tip: learn how to setup RAID 0!

Switching to a RAID level from a single-drive storage can provide good protection against data loss. This is because some RAID levels offer high redundancy and resilience; the storage will still be fully functional even when one hard drive fails. But then, no RAID level can be used as a full substitute for traditional data backups.

Overview of RAID 1

RAID 1 is a type of RAID level notable for its “mirroring” technique. This RAID level requires at least two disks to set up. Mirroring in RAID 1 means that all connected disks in the array have the same exact copy of a data saved in them. RAID 1 does not support parity distribution or data stripping; a classic RAID 1 mirrored pair contains two disks.

Since the same data is mirrored across all drives in the array, the total storage space you’ll have on RAID 1 is equal to the total available space on the smallest disk in the array. If you used disks of the same storage capacity, then you have the capacity of one of the disks as your total storage capacity.

Ready to get your data back?

Need to repair software or hardware RAID? To start recovering your data, documents, databases, images, videos, and other files from your RAID 1, press the FREE DOWNLOAD button to get the latest version of DiskInternals RAID Recovery® and begin the step-by-step recovery process. You can preview all recovered files absolutely for free. To check the current prices, please press the Get Prices button. If you need any assistance, please feel free to contact Technical Support. The team is here to help you get your data back!

RAID 1 is no different from single-drive storage setups, but, it offers data resilience. No matter how many failed disks you have in the array, for as long as there’s still one good drive in the array, the system will still be functioning and you can access all your data. People who set up this RAID level do so for data reliability and improved read performance.

Read requests in RAID 1 can be handled by any disk in the array. However, if you use disks with different speeds, the overall write performance you’ll get is equal to the speed of the slowest disk. But in all, you’re getting improved performance than you’ll get from single-drive storage setups.

System Requirements for RAID 1

To set up RAID 1 on your computer, the system must meet specific requirements. RAID 1 can run on Windows or Linux OS.

Windows OS:

  • Windows OS 7 to 11 or Windows Server 03 – 09.
  • Your PC must support Intel Rapid Storage Technology
  • Minimum of two hard drives (preferably hard drives of the same capacity and performance rating).
  • Hardware RAID controller or RAID management software (for software RAID)
  • Ensure your system has sufficient processing power and memory (16GB RAM is decent)

Linux OS:

  • Linux distro capable of running a RAID server
  • RAID management software
  • At least two hard drives of the same capacity and performance
  • RAID drivers to help the OS detect your hardware RAID controller

Upgrade Your Data Resiliency with RAID 1

RAID 1 is the most preferred storage technique in cases where the data being saved is from transactional applications, custom operating systems, or email servers. Nevertheless, generally, RAID 1 is used in places where high data redundancy is needed.

With RAID 1, you won’t need to worry about hard drive failure; the RAID keeps working until the last hard drive in the array fails, so there’s enough time to recover data from RAID drive and rebuild the array without losing any important files.

How to Set Up Software RAID 1 on Windows and Linux

Here’s a step-by-step guide on how to set up RAID 1 configuration on a Windows or Linux OS computer.

1. Format Hard Drive

First things first, you have to decide on how many hard drives you wish to use for the setup. Bear in mind that the total capacity a RAID 1 would offer is directly proportional to the total capacity of the smallest hard drive you use. So, it is best to use hard drives of the same storage capacity.

You need a minimum of two drives, but you can use up to six (6) or more drives. While choosing hard drives of the same storage capacity, also pay attention to the interfaces of the drives. If you use a SATA 6Gb/s drive and a SATA 3Gb/s, the RAID will perform at a speed of 3Gb/s. To be on the safe side, use the same-specked hard drives.

With the hard drive decisions made, then you can proceed. Apparently, you will have to format the hard drives, so if you have any data saved on them previously, you should back it up before proceeding.

2. Install mdadm

Depending on your Linux distro, you can install the mdadm utility from the package manager: “sudo apt-get install mdadm”. Or, you can use the “sudo yum install mdadm” command to install with YUM on CentOS or any other Red Hat-based distributions. The mdadm utility makes it easy to create RAID 1 on Linux using a simple command, mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1

3. Create RAID 1 Logical Drive

For Windows OS users who want to run software RAID 1, you need to find out what Windows calls RAID. In newer Windows editions, RAIDs are referred to as “Storage Spaces,” and you can find this setting from the control panel. But to make it easier, hit the Search bar on your taskbar and search for Storage Spaces.

  • When the utility pops up, click on Create a New Pool and Storage Space, and grant admin access if prompted.
  • Select the hard drives you want to use in creating the RAID 1 and click on “Create Pool.”
  • Name your pool and assign a drive letter. Also, set the file system for your RAID to NTFS.
  • In the Resilience Type, click the drop-down and select “Two-way Mirror.”
  • Confirm if you’d like to make any further changes to the settings shown to you, then click on “Create Pool” when you’re done.

Explain the steps to create a RAID 1 logical drive, detailing the process for both Windows Disk Management and the mdadm command on Linux. For Linux OS users, the command to create a RAID 1 array is mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1. This command will create RAID 1 with the two selected disks.

4. Create a File System on the RAID 1 Logical Drive

When you set up RAID 1 on a Linux distro, you need to create and assign a filesystem to the RAID array. The procedure to create and mount a new filesystem for your RAID 1 on Linux is clearly outlined below.

  • Create a filesystem (ext4) for your RAID: $ sudo mkfs.ext4 -F /dev/md0
  • Create a mount point for the new filesystem: $ sudo mkdir -p /mnt/md0
  • Now, mount the filesystem using this command: $ sudo mount /dev/md0 /mnt/md0
  • Confirm if the new space you created is available: $ df -h -x devtmpfs -x tmpfs

This will confirm and show if the new filesystem is mounted and accessible, and then you’re good to go.

Additionally, to save the array layout so that it automatically reassembles on boot, follow the steps below:

  • Scan the array and add this file: sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
  • Update the initial RAM file system: sudo update-initramfs –u
  • Place the filesystem mount options to the /etc/fstab file: echo '/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab

Once this is done, your RAID 1 will automatically assemble and mount at each boot. You won’t have to manually reassemble the layout.

5. Test RAID 1

Done with the setup? You will need to test your RAID 1 to ensure that you got everything correctly. To do that, you need to create a text file in /mnt/raid1

  • $ /mnt/raid1
  • sudo nano raid1.txt

Give the file a name to always remember it, then save and close. Now, disconnect one of the RAID drives and check the status of your RAID 1.

  • sudo mdadm --examine /dev/sda1 /dev/sdb1

The output should show that one of the RAID drives is offline – that shows you did the setup pretty well. To get details of the offline drive, use this command:

  • sudo mdadm --detail /dev/md0
Note: use free RAID recovery software if necessary

How to Remove the RAID

If for any reason, you wish to stop using RAID storage and make a switch to conventional single-drive setups, that’s very much possible, whether your RAID 1 was set up on Windows or Linux.

On Linux

Run this command to switch back to the conventional storage pattern:

  • sudo mdadm --remove /dev/md0

Remember to edit the mdadm.conf file and clear the RAID definition you saved earlier.

Don’t forget to the edit /etc/fstab file too, to disable the auto-mount feature you activated.

On Windows:

If you created your RAID 1 using that Windows Storage Spaces utility, you can delete the “Pool” and that means removing the RAID.

  • Access Windows Storage Spaces
  • Click on the “Delete” button next to the pool you want to remove.
  • Confirm the action, and that’s it.

However, before removing your RAID 1, ensure you have done a backup of all files and data previously saved on the RAID. This can be achieved using professional data backup software that works on the Windows OS version you have on your PC.

If after the dismantling of your RAID 1 array you discover that you have missing files and data, you can recover them from your backup, or use DiskInternals RAID Recovery software. DiskInternals RAID Recovery can recover lost data from any RAID array and it supports all known Windows and Linux file systems.

Can I Create a RAID 1 Array With a Drive that Already has Data?

The simple answer is no. But, you can format the drive to remove all data saved on it, and then proceed to add it to your RAID array. One of the steps to creating a RAID level is to format the drive(s), which erases every data on the drive(s). If you insert a drive with data into your RAID array to replace a failing drive, you stand a chance of losing all the data on that drive.

So, to be on the safe side, run a full backup to clone all the files and data you have on the said drive, then format the drive and use it for RAID 1. Anytime you decide to stop using the drive for your RAID, you can disconnect it and restore its previous files from the backup you made earlier. Anything else aside from this procedure will make you lose your files on the said drive.

Tip: how to recover RAID data

FAQ

  • What is RAID 1?

    RAID 1, also known as disk mirroring, involves copying the same data onto two or more disks. This setup provides redundancy, ensuring data safety by keeping a mirror copy in case one disk fails.

  • How to set up RAID 1 in Windows 10?

    To set up RAID 1 in Windows 10, use the Disk Management tool:

    • Backup important data.
    • Open Disk Management by right-clicking the Start button and choosing "Disk Management."
    • Right-click the disk you want to mirror and select "Add Mirror."
    • Choose the disk to mirror the data to and confirm.
    • The system will then create the RAID 1 setup, mirroring the data across the disks.

Related articles

FREE DOWNLOADVer 6.22, WinBUY NOWFrom $249

Please rate this article.
51 reviews