Now you can begin to set up the RAID 1 array with the two partitions in hand. You can use the mdadm command to create any RAID array.
Syntax: mdadm [options] Options: -a, xx Adds a disk into a current array -C, —create Creates a new RAID array -D, —detail Prints the details of an array -G, —grow Changes the size or shape of an active array -f, xx Fails a disk in the array -l, —level Specifies level (type) of RAID array to create -n, —raid-devices Specifies the devices in the RAID array -q, —quiet Species not to show output -S, —stop Stops an array -v, —verbose Provides verbose output
Now Let’s create Linux RAID 1 device.
[root@rhel1 ~]# mdadm -Cv /dev/md0 --level=1 -n2 /dev/sdc1 /dev/sdd1 mdadm: Note: this array has metadata at the start and may not be suitable as a boot device. If you plan to store '/boot' on this device please ensure that your boot-loader understands md/v1.x metadata, or use --metadata=0.90 mdadm: size set to 1044181K Continue creating array? y mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md0 started. [root@rhel1 ~]#
View the status of newly created Linux RAID 1 using below command.
[root@rhel1 ~]# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdd1[1] sdc1[0] 1044181 blocks super 1.2 [2/2] [UU] unused devices: <none> [root@rhel1 ~]# cat /proc/mdstat Personalities : [raid1] md0 : active raid1 sdd1[1] sdc1[0] 1044181 blocks super 1.2 [2/2] [UU] unused devices: <none>
Leave a Reply