0

I am trying to create a 4 drive raid 6 with mdadm in Ubuntu. The command I am using is

sudo mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde

the error I am receiving in return is

mdadm: An option must be given to set the mode before a second device (/dev/md0) is listed

I really couldn't find much that helped me when searching google, I found one thing that suggested it had something to do with the automated email. I thought that was unnecessary so I tried to skip. Is there a way I can go back now and set that up if that's causing problems?

1

Make sure that a RAID is not already running by issuing the following command:

cat /proc/mdstat

if you see something like this:

Personalities : [raid1]
md0 : active raid1 sdb1[1] sda1[0]
104320 blocks [2/2] [UU]

md1 : active raid1 sdb3[1] sda3[0]
19542976 blocks [2/2] [UU]

md2 : active raid1 sdb4[1] sda4[0]
223504192 blocks [2/2] [UU]

issue the following command to stop the RAID:

sudo mdadm --stop /dev/md0

you might have to remove the existing array:

sudo mdadm --remove /dev/md0

then try building the array again:

sudo mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sdb /dev/sdc /dev/sdd /dev/sde

Hope this helps.

| improve this answer | |
  • cat /proc/mdstat returns "Personalities: unused devices: <none>" is that what I should be seeing if it's not working? – Charles S Jun 13 '15 at 15:46
  • Well, it was my own foolish fault. I didn't realize I needed to format the drives prior to creating the raid. After doing so everything seemed to work out fine. I'm going to accept your answer as the information is correct. – Charles S Jun 13 '15 at 17:05
  • @CharlieS Glad you fixed it. Also glad you figured out you needed to format your drives. I'm going to take note of that for future as well. Have a great weekend! – Terrance Jun 13 '15 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.