Linux
mdadm,無效的 RAID 級別?
我正在嘗試根據本教程創建 RAID 5 。但是,當我執行時
mdadm -C /dev/md0 -l=5 -n=4 /dev/sd[b-e]1
,我收到此錯誤:mdadm: invalid raid level: =5
這是輸出
mdadm -E /dev/sd[b-e]
:/dev/sdb: MBR Magic : aa55 Partition[0] : 4294965247 sectors at 2048 (type fd) /dev/sdc: MBR Magic : aa55 Partition[0] : 4294965247 sectors at 2048 (type fd) /dev/sdd: MBR Magic : aa55 Partition[0] : 4294965247 sectors at 2048 (type fd) /dev/sde: MBR Magic : aa55 Partition[0] : 4294965247 sectors at 2048 (type fd)
這是輸出
mdadm --examine /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
:mdadm: No md superblock detected on /dev/sdb1. mdadm: No md superblock detected on /dev/sdc1. mdadm: No md superblock detected on /dev/sdd1. mdadm: No md superblock detected on /dev/sde1.
這是輸出
fdisk -l | grep sd
:Disk /dev/sda: 300.0 GB, 300000000000 bytes /dev/sda1 * 2048 626687 312320 83 Linux /dev/sda2 626688 34187263 16780288 82 Linux swap / Solaris /dev/sda3 34187264 139059199 52435968 83 Linux /dev/sda4 139059200 585936895 223438848 83 Linux Disk /dev/sdc: 8001.6 GB, 8001563222016 bytes /dev/sdc1 2048 4294967294 2147482623+ fd Linux raid autodetect Disk /dev/sdb: 8001.6 GB, 8001563222016 bytes /dev/sdb1 2048 4294967294 2147482623+ fd Linux raid autodetect Disk /dev/sdd: 24003.1 GB, 24003062267904 bytes /dev/sdd1 2048 4294967294 2147482623+ fd Linux raid autodetect Disk /dev/sde: 8001.6 GB, 8001563222016 bytes /dev/sde1 2048 4294967294 2147482623+ fd Linux raid autodetect
sda
是系統空間,我想用別人來儲存數據。
您的命令不正確,應該是這樣的:
$ mdadm -C /dev/md0 -l 5 -n 4 /dev/sd[b-e]1
如果您想使用這些
=
標誌,請使用這些開關,如下所示:$ mdadm -C /dev/md0 --level=5 --raid-devices=4 /dev/sd[b-e]1
每個手冊頁:
-l, --level= Set RAID level. When used with --create, options are: linear, raid0, 0, stripe, raid1, 1, mirror, raid4, 4, raid5, 5, raid6, 6, raid10, 10, multipath, mp, faulty, container. Obviously some of these are synonymous.