mdadm: option must be given to set the mode

A hard drive was thrown out of my raid 5 array and had to be readded.

The command gave the following error message:

mdadm: An option must be given to set the mode before a second device

Solution to get it working:

In my case the name of the raid device is md0 (which contains disk sdb, sdc and sdd. For the linux system i use sda).

Now i wanted to add the first partition of my sdb hard drive again to the raid array.

root@homeserver:/home/mathias# mdadm /dev/md0 -a /dev/sdb1
mdadm: re-added /dev/sdb1


And now the raid array is syncing again :)

root@homeserver:/home/mathias# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md0 : active raid5 sdb1[4] sdc1[3] sdd1[1]
 5860259840 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [_UU]
 [>....................] recovery = 0.8% (24866428/2930129920) finish=262.8min speed=184190K/sec
 bitmap: 11/22 pages [44KB], 65536KB chunk

unused devices: <none>

Further information: How to create a crypted raid5

2 Kommentare zu „mdadm: option must be given to set the mode“

  1. Hello Matti, in your command you wrote „../dev/md0..“ . I suppose the „md0“ is the name that you find out in md-checker command, isn’t it ? What is „sdb1“ (…/dev/sdb1…) ? Why didn’t put you sdb or sdb2 or sdb3 or else ? In my case, in „md_checker“ command I get RAID1 „Status: OFFLINE“ with one HD active (NAS_HOST 1 /dev/sda3 0 Active) and the other is „Missing“ (that normal because there is no 2nd HD) . Please HELP , thank you

    1. Do you think that I should physically put in the 2nd HD (empty) ? Of course I will do it but before I would like to have the RAID1 running (with only one HD) . Thank you

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Nach oben scrollen