1.查看当前RAID6状态
命令:
cat /proc/mdstat
[root@rhel77 /]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md6 : active raid6 sde[3] sdd[2] sdc[1] sdb[0]
41908224 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
unused devices: <none>
[root@rhel77 /]#
mdadm -D /dev/md6
[root@rhel77 /]# mdadm -D /dev/md6
/dev/md6:
Version : 1.2
Creation Time : Mon Apr 28 10:03:13 2025
Raid Level : raid6
Array Size : 41908224 (39.97 GiB 42.91 GB)
Used Dev Size : 20954112 (19.98 GiB 21.46 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent
Update Time : Mon Apr 28 10:05:35 2025
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : resync
Name : rhel77:6 (local to host rhel77)
UUID : 848020c5:dff6943c:c556d4bd:f18d53b8
Events : 17
Number Major Minor RaidDevice State
0 8 16 0 active sync /dev/sdb
1 8 32 1 active sync /dev/sdc
2 8 48 2 active sync /dev/sdd
3 8 64 3 active sync /dev/sde
[root@rhel77 /]#
cat /etc/mdadm.conf
[root@rhel77 /]# cat /etc/mdadm.conf
ARRAY /dev/md6 level=raid6 num-devices=4 metadata=1.2 name=rhel77:6 UUID=848020c5:dff6943c:c556d4bd:f18d53b8
devices=/dev/sdb,/dev/sdc,/dev/sdd,/dev/sde
[root@rhel77 /]#
备注:如果/etc/mdadm.conf文件中有多项,请确保全部正确,如果已进行了挂载配置,否则重启服务器会有问题(E.g:重启后,启动不了等......)
2.raid6挂载及查看
命令:
df -h
[root@rhel77 raid6]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 2.9G 0