In our earlier article, we have explained the types of RAID used in real life. RAID 1 consists of the use of n number redundant disks where each disk in the pool contains the same data at all times, hence we use the word “mirroring” to denote RAID 1.
RAID 1 is a popular data storage technology for the operation of server applications particularly for entry-level to mid-range servers. But what is the reason that makes the RAID 1 system more secure? Suppose there are two 256GB SSD hard disks and two 1TB spinning hard disks in a server. Combining two SSD hard disks on RAID 1 will give 256 GB space (not 256 x 2 = 512) and combining two spinning hard disks on RAID 1 will give 1 TB space (not 1TB x 2 = 2TB). Here is the output from SSH against lsblk
command, there are 4 discs – sda, sdb, sdc and sdd.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT ... ... sda 8:0 0 223.6G 0 disk ├─sda1 8:1 0 4G 0 part │ └─md1 9:1 0 4G 0 raid1 / ├─sda2 8:2 0 2G 0 part [SWAP] └─sda3 8:3 0 217.6G 0 part └─md3 9:3 0 217.6G 0 raid1 ├─ssd-usr 253:0 0 15G 0 lvm /usr ├─ssd-var 253:1 0 55G 0 lvm /var └─ssd-home 253:2 0 5G 0 lvm /home sdb 8:16 0 223.6G 0 disk ├─sdb1 8:17 0 4G 0 part │ └─md1 9:1 0 4G 0 raid1 / ├─sdb2 8:18 0 2G 0 part [SWAP] └─sdb3 8:19 0 217.6G 0 part └─md3 9:3 0 217.6G 0 raid1 ├─ssd-usr 253:0 0 15G 0 lvm /usr ├─ssd-var 253:1 0 55G 0 lvm /var └─ssd-home 253:2 0 5G 0 lvm /home sdc 8:32 0 931.5G 0 disk └─sdc1 8:33 0 931.5G 0 part └─md11 9:11 0 931.5G 0 raid1 └─hdd-data 253:3 0 4G 0 lvm /data sdd 8:48 0 931.5G 0 disk └─sdd1 8:49 0 931.5G 0 part └─md11 9:11 0 931.5G 0 raid1 └─hdd-data 253:3 0 4G 0 lvm /data |
There are many ways to configure a software RAID setup. One of the most used ways is through the mdadm
software package. It does not require a RAID controller. If I issue mdadm --examine /dev/sd[bc]1
command, I will receive this output:
---
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | /dev/sdb1: Magic : a92b4efc Version : 0.90.00 UUID : 8c059f3b:023da7ec:1f51fb89:78ee93fe Creation Time : Wed Mar 29 07:38:31 2023 Raid Level : raid1 Used Dev Size : 4194240 (4.00 GiB 4.29 GB) Array Size : 4194240 (4.00 GiB 4.29 GB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 1 Update Time : Mon May 8 15:00:06 2023 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Checksum : 986c908b - correct Events : 62 Number Major Minor RaidDevice State this 1 8 17 1 active sync /dev/sdb1 0 0 8 1 0 active sync /dev/sda1 1 1 8 17 1 active sync /dev/sdb1 /dev/sdc1: Magic : a92b4efc Version : 0.90.00 UUID : aedc1f1b:7fd0f72f:1f51fb89:78ee93fe Creation Time : Wed Mar 29 07:38:38 2023 Raid Level : raid1 Used Dev Size : 976761472 (931.51 GiB 1000.20 GB) Array Size : 976761472 (931.51 GiB 1000.20 GB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 11 Update Time : Mon May 8 01:06:52 2023 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Checksum : 72cdcf90 - correct Events : 68 Number Major Minor RaidDevice State this 0 8 33 0 active sync /dev/sdc1 0 0 8 33 0 active sync /dev/sdc1 1 1 8 49 1 active sync /dev/sdd1 |
The above information will deliver an idea of real-world usage.
Advantages of RAID 1
RAID 1 is simple. Each hard drive can be used in a separate server In case of failure of a single hard disc, the system can continue to operate without interruption and the hard disk can be replaced.
- Simple to configure
- Easy to use
- Optimized read performance
- Adds redundancy and fault tolerance
- No special paid software required
- No special hardware required
![Advantages and Disadvantages of RAID 1](https://thecustomizewindows.cachefly.net/wp-content/uploads/2023/05/Advantages-and-Disadvantages-of-RAID-1.png)
Disadvantages of RAID 1
The advantages of RAID 1 are reasons behind the disadvantages:
- Expense behind hard disc increases
- Can not be used for larger discs because disproportionately increases the cost
- Requires shutting down the server to replace failed drive (software RAID). Hardware controllers supports hot swapping.