mdadm,无效的 RAID 级别?

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就是系统空间,我想用别人来存储数据。

答案1

你的命令不正确,应该是这样:

$ 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.

相关内容