Under CentOS7 environment configuration RAID5 and RAID10

Under CentOS7 environment configuration RAID5

First, according to five disk requirements are needed, three do RAID, two do a backup, so we need to add on five disks

Operation shown in FIG.

Right-click the name to open the virtual machine settings

Click Add in the bottom left corner

Select the hard drive, click Next

Here direct selection of the recommended type of SCSI disks can be followed click Next

The next few steps you can default click Next, click Finish up

After installation is complete hardware column will show the newly added hard disk

Repeating the above operation, the addition of 4 disks.

After completion of the addition of five disks, the virtual machine to start the command line

After the virtual machine first open the terminal and enter the command line

[root@localhost ~]# mdadm -Cv /dev/md0 -n 3 - l 5 - x 2 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf

This command is used to create a RAID5, and name it "/ dev / md0"

-C representatives creation, -v show creation process, -a yes checking RAID name, -n is the number of hard disks used, -x backup disk, -l is defined RAID levels and write on the back to join the array hard disk name.

Next is the formatted use and hanging in the RAID array format formatted ext4

[root@localhost ~]# mkfs.ext4 /dev/md0

After formatting, you need to create a directory to mount

[root@localhost ~]# mkdir /RAID

To mount a file system

[root@localhost ~]# mount /dev/md0 /RAID

Mount View disk information

[root@localhost ~]# df -h

 Then you want to hang this disk array is also still take effect after the restart settings:

[root@localhost ~]# echo "/dev/md0 /RAID ext4 defaults 0 0">> /etc/fstab

The final step View / dev / md0 device information

The -D view details RAID arrays

[root@localhost ~]# mdadm -D /dev/md0

If you want to configure RAID10, only need to change the first sentence of the command line

[root@localhost ~]# mdadm -Cv /dev/md0 -n 4 - l 10 -a yes /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf

 The remaining operation as RAID5

 

Guess you like

Origin www.cnblogs.com/wxzjdq/p/11727856.html