1) OS version information
2) View the current disk and disk partition
3) Consider making two 1T disks sdb and sdc into a raid1; you need to delete the original partitions of /dev/sdb and /dev/sdc, and create new partitions.
Delete the original partition of /dev/sdb:
create a new raid partition and save the new partition table:
4) Use the same method to repartition /dev/sdc, the final partition table is as shown below:
5) Start to create RAID1
# mdadm -C /dev/md1 -ayes -l1 -n2 /dev/sd[b,c]1
The execution information is as follows:
6) View raid1 status & new partition table
7) Modify the configuration file /etc/mdadm.conf
# echo DEVICE /dev/sd{b,c}1 >> /etc/mdadm.conf # mdadm -Ds >> /etc/mdadm.conf
The modification results are as follows:
8) Format raid
9) Establish a mount point and mount it
10) Modify the configuration file /etc/fstab to achieve automatic mounting at boot
11) Then reboot to test whether the boot is automatically mounted, and the raid1 is created.