raid10重启
raid10重启
1、得创建raid的配置文件
[root@WALKER ~]# echo DEVICE /dev/sd[b-e] > /etc/mdadm.conf
[root@WALKER ~]# cat /etc/mdadm.conf
DEVICE /dev/sdb /dev/sdc /dev/sdd /dev/sde
[root@WALKER ~]#
2、扫描磁盘阵列信息,追加到这个文件中
[root@WALKER ~]# mdadm -Ds >> /etc/mdadm.conf
[root@WALKER ~]# cat /etc/mdadm.conf
DEVICE /dev/sdb /dev/sdc /dev/sdd /dev/sde
ARRAY /dev/md/0 metadata=1.2 name=WALKER:0 UUID=ad8c4653:8db8584c:b8b003a9:a00c5565
[root@WALKER ~]#
3、取消raid10挂载
[root@WALKER ~]# umount /mdadm/
4、可以停止raid10了
[root@WALKER ~]# mdadm -S /dev/md0
mdadm: stopped /dev/md0
[root@WALKER ~]#
5、检查一下磁盘阵列组的信息
看不到设备文件,就是正常状态了!
[root@WALKER ~]# mdadm -D /dev/md0
mdadm: cannot open /dev/md0: No such file or directory
[root@WALKER ~]#
[root@WALKER ~]# ls /dev/md*
ls: 无法访问/dev/md*: 没有那个文件或目录
[root@WALKER ~]#
6,在存在配置文件的情况下,可以正常的启动raid10了
[root@WALKER ~]# mdadm -A /dev/md0
mdadm: /dev/md0 has been started with 4 drives.
[root@WALKER ~]#
7、此时,可以正常查看raid10信息了
[root@WALKER ~]# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Sun May 22 10:58:44 2022
Raid Level : raid10
Array Size : 20936704 (19.97 GiB 21.44 GB)
Used Dev Size : 10468352 (9.98 GiB 10.72 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent
Update Time : Sun May 22 12:59:25 2022
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : near=2
Chunk Size : 512K
Consistency Policy : resync
Name : WALKER:0 (local to host WALKER)
UUID : ad8c4653:8db8584c:b8b003a9:a00c5565
Events : 58
Number Major Minor RaidDevice State
0 8 16 0 active sync set-A /dev/sdb
1 8 32 1 active sync set-B /dev/sdc
4 8 48 2 active sync set-A /dev/sdd
3 8 64 3 active sync set-B /dev/sde
[root@WALKER ~]#
[root@WALKER ~]# mount -l |grep md0
/dev/md0 on /mdadm type xfs (rw,relatime,seclabel,attr2,inode64,sunit=1024,swidth=2048,noquota)
[root@WALKER ~]# ls /mdadm/
test1.txt test2.txt test3.txt test4.txt test.txt
[root@WALKER ~]#