1

I'm trying to create RAID 5 according to this tutorial. But, when I run mdadm -C /dev/md0 -l=5 -n=4 /dev/sd[b-e]1, I get this error:

mdadm: invalid raid level: =5

Here's the output of 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)

Here's the output of 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.

Here's the output of 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 is the system space, I want to use others to store data.

1 Answer 1

2

Your command is incorrect, it should be this:

$ mdadm -C /dev/md0 -l 5 -n 4 /dev/sd[b-e]1

If you want to use the = signs you use these switches instead like this:

$ mdadm -C /dev/md0 --level=5 --raid-devices=4 /dev/sd[b-e]1

Per man page:

   -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.
1
  • @XinZhang - fixed.
    – slm
    Commented Sep 7, 2018 at 1:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .