RAID stands for “Redundant Array of Independent Disks”.
The RAID levels
Raid 0: stripe mode,no redundancy in this level,not safe for storage. Raid 1: mirror mode,having redundancy and good at backup. Raid 1+0:it is the combination of RAID-1 and RAID-0. Raid 5: at least 3 disks, can stand max 1 disk broken Raid 6:at least 4 disks, can stand max 2 disks broken
[root@client mnt]# umount /dev/md0 [root@client ~]# mdadm --manage /dev/md0 --fail /dev/sdb2 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: set /dev/sdb2 faulty in /dev/md0 [root@client ~]# mdadm --manage /dev/md0 --fail /dev/sdb3 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: set /dev/sdb3 faulty in /dev/md0 [root@client ~]# mdadm --manage /dev/md0 --fail /dev/sdb4 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: set /dev/sdb4 faulty in /dev/md0 [root@client ~]# mdadm --detail /dev/md0 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. /dev/md0: Version : 1.2 Creation Time : Wed Jul 17 11:37:14 2019 Raid Level : raid5 Array Size : 2095104 (2046.00 MiB 2145.39 MB) Used Dev Size : 1047552 (1023.00 MiB 1072.69 MB) Raid Devices : 3 Total Devices : 3 Persistence : Superblock is persistent
Update Time : Wed Jul 17 12:53:53 2019 State : clean, FAILED Active Devices : 0 Failed Devices : 3 Spare Devices : 0
Layout : left-symmetric Chunk Size : 64K
Number Major Minor RaidDevice State - 0 0 0 removed - 0 0 1 removed - 0 0 2 removed
0 8 18 - faulty /dev/sdb2 1 8 19 - faulty /dev/sdb3 3 8 20 - faulty /dev/sdb4 [root@client ~]# mdadm --manage /dev/md0 --remove /dev/sdb2 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: hot removed /dev/sdb2 from /dev/md0 [root@client ~]# mdadm --manage /dev/md0 --remove /dev/sdb3 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: hot removed /dev/sdb3 from /dev/md0 [root@client ~]# mdadm --manage /dev/md0 --remove /dev/sdb4 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: hot removed /dev/sdb4 from /dev/md0 [root@client ~]# mdadm --detail /dev/md0 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. /dev/md0: Version : 1.2 Creation Time : Wed Jul 17 11:37:14 2019 Raid Level : raid5 Array Size : 2095104 (2046.00 MiB 2145.39 MB) Used Dev Size : 1047552 (1023.00 MiB 1072.69 MB) Raid Devices : 3 Total Devices : 0 Persistence : Superblock is persistent
Update Time : Wed Jul 17 12:55:39 2019 State : clean, FAILED Active Devices : 0 Failed Devices : 0 Spare Devices : 0
Layout : left-symmetric Chunk Size : 64K
Number Major Minor RaidDevice State - 0 0 0 removed - 0 0 1 removed - 0 0 2 removed [root@client ~]# mdadm --stop /dev/md0 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: stopped /dev/md0 [root@client ~]# mdadm --detail /dev/md0 mdadm: only give one device per ARRAY line: /dev/md0 and UUID mdadm: only give one device per ARRAY line: /dev/md0 and : mdadm: only give one device per ARRAY line: /dev/md0 and add4f325:d589a29e:1f234b1b:309885ff mdadm: ARRAY line /dev/md0 has no identity information. mdadm: cannot open /dev/md0: No such file or directory [root@client ~]# cat /proc/mdstat Personalities : [raid6] [raid5] [raid4] unused devices: <none> [root@client ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 0 29.9G 0 disk ├─sdb1 8:17 0 2G 0 part │ ├─thin_vg-thinpool_tmeta 253:4 0 4M 0 lvm │ │ └─thin_vg-thinpool-tpool 253:6 0 1G 0 lvm │ │ ├─thin_vg-thinpool 253:7 0 1G 0 lvm │ │ └─thin_vg-annathin1 253:8 0 10G 0 lvm │ └─thin_vg-thinpool_tdata 253:5 0 1G 0 lvm │ └─thin_vg-thinpool-tpool 253:6 0 1G 0 lvm │ ├─thin_vg-thinpool 253:7 0 1G 0 lvm │ └─thin_vg-annathin1 253:8 0 10G 0 lvm ├─sdb2 8:18 0 1G 0 part ├─sdb3 8:19 0 1G 0 part └─sdb4 8:20 0 1G 0 part sdc 8:32 0 40G 0 disk sr0 11:0 1 1024M 0 rom [root@client ~]# vim /etc/mdadm.conf #ARRAY /dev/md0 UUID : add4f325:d589a29e:1f234b1b:309885ff [root@client ~]# vim /etc/fstab #UUID="acf71d8f-8027-49fc-b3dd-fe6d89f3491f" /mnt/raid_md0 xfs defaults 0 0