我无法在 Ubuntu 16.04 上使用 mdadm 创建 RAID50。每次我重新启动服务器时,RAID0就会消失。
以下是我们创建 RAID50 的方法:
创建两个 RAID5(每个 8 个磁盘):
#Create RAID5 (md1)
mdadm --create /dev/md1 -v --raid-devices=8 --level=5 /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1 /dev/nvme4n1 /dev/nvme5n1 /dev/nvme6n1 /dev/nvme7n1
#Create RAID5 (md2)
mdadm --create /dev/md2 -v --raid-devices=8 --level=5 /dev/nvme8n1 /dev/nvme9n1 /dev/nvme10n1 /dev/nvme11n1 /dev/nvme12n1 /dev/nvme13n1 /dev/nvme14n1 /dev/nvme15n1
我们等待磁盘重建后再创建 RAID0。
到目前为止,一切都按预期进行。
$ cat /proc/mdstat
md2 : active raid5 nvme10n1[5] nvme15n1[3] nvme12n1[6] nvme8n1[2] nvme11n1[1] nvme14n1[8] nvme5n1[0] nvme2n1[4]
21878398976 blocks super 1.2 level 5, 512k chunk, algorithm 2 [8/8] [UUUUUUUU]
bitmap: 0/24 pages [0KB], 65536KB chunk
md1 : active raid5 nvme13n1[8] nvme9n1[6] nvme7n1[2] nvme6n1[3] nvme4n1[4] nvme3n1[5] nvme1n1[1] nvme0n1[0]
21878398976 blocks super 1.2 level 5, 512k chunk, algorithm 2 [8/8] [UUUUUUUU]
bitmap: 0/24 pages [0KB], 65536KB chunk
md126 : active raid1 sda[1] sdb[0]
890796032 blocks super external:/md127/0 [2/2] [UU]
md127 : inactive sdb[1](S) sda[0](S)
6306 blocks super external:imsm
unused devices: <none>
一旦 RAID5 完全重建,我们就开始创建 RAID0。
#Create RAID0 (md0)
sudo mdadm --create /dev/md0 -v --raid-devices=2 --level=0 /dev/md1 /dev/md2
如果我们检查一下,它看起来还是可以的:
$ cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid0 md2[1] md1[0]
43756535808 blocks super 1.2 512k chunks
md2 : active raid5 nvme10n1[5] nvme15n1[3] nvme12n1[6] nvme8n1[2] nvme11n1[1] nvme14n1[8] nvme5n1[0] nvme2n1[4]
21878398976 blocks super 1.2 level 5, 512k chunk, algorithm 2 [8/8] [UUUUUUUU]
bitmap: 1/24 pages [4KB], 65536KB chunk
md1 : active raid5 nvme13n1[8] nvme9n1[6] nvme7n1[2] nvme6n1[3] nvme4n1[4] nvme3n1[5] nvme1n1[1] nvme0n1[0]
21878398976 blocks super 1.2 level 5, 512k chunk, algorithm 2 [8/8] [UUUUUUUU]
bitmap: 1/24 pages [4KB], 65536KB chunk
md126 : active raid1 sda[1] sdb[0]
890796032 blocks super external:/md127/0 [2/2] [UU]
md127 : inactive sdb[1](S) sda[0](S)
6306 blocks super external:imsm
unused devices: <none>
一旦我重新启动,RAID0 (md0) 就消失了。
md2 : active raid5 nvme10n1[5] nvme15n1[3] nvme12n1[6] nvme8n1[2] nvme11n1[1] nvme14n1[8] nvme5n1[0] nvme2n1[4]
21878398976 blocks super 1.2 level 5, 512k chunk, algorithm 2 [8/8] [UUUUUUUU]
bitmap: 0/24 pages [0KB], 65536KB chunk
md1 : active raid5 nvme13n1[8] nvme9n1[6] nvme7n1[2] nvme6n1[3] nvme4n1[4] nvme3n1[5] nvme1n1[1] nvme0n1[0]
21878398976 blocks super 1.2 level 5, 512k chunk, algorithm 2 [8/8] [UUUUUUUU]
bitmap: 0/24 pages [0KB], 65536KB chunk
md126 : active raid1 sda[1] sdb[0]
890796032 blocks super external:/md127/0 [2/2] [UU]
md127 : inactive sdb[1](S) sda[0](S)
6306 blocks super external:imsm
知道我做错了什么吗?