Create Software raid on Centos 7 Print

  • 1

1.Need to install mdadm manager utility first to examine disk and configure.
#yum install mdadm

2.check drives if there is any exiciting configuration.
#mdadm -E /dev/sdc  ("sdc" here will be your device driver.)
#mdadm -E /dev/sdd

3.Now we are going to create two partition 1 on sdc and 2 on sdd for raid 1.

#fdisk /dev/sdc

Follow the below instruction:

Press ‘n’ for creating a new partition.
Press ‘P’ to choose primary partition.
Press ‘1’ to select the partition number as 1.
Use the default starting sector and ending sector by just pressing 2 times Enter key. This will use the entire drive for this partition.
Press ‘t’ to change the partition type.
Press ‘fd’ to choose Linux Raid Auto.
Press ‘p’ to print the partition table.
Press ‘w’ to write changes to disk.

same process you have to follow on sdd after this type below command to initialize the partition
#partprobe /dev/sdc
#partprobe /dev/sdd

4.Now we are going to create raid 1 partition name as md1
mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1

5.You can check status of the device using below command
#mdadm --details /dev/md1

md1 partition is your raid 1 partition and you format this as you wish.

Was this answer helpful?

« Back