Creating more /dev/md[0-9]+ entries

While upgrading my desktop this weekend to Fedora Core 6, I received the following error while attempting to start one of my md arrays:

$ /sbin/mdadm -A /dev/md3 /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
mdadm: error opening /dev/md3: No such file or directory

To fix the issue, I had to cd into /dev and add some additional md entries with the MAKEDEV executable:

$ cd /dev && ./MAKEDEV md

Once I ran MAKDEV, mdadm was able to start up the array:

$ /sbin/mdadm -A /dev/md3 /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
mdadm: /dev/md3 has been started with 6 drives.

Instead of going through the hassle of running MAKDEV, it looks like you can also use the mdadm “-a” option:

-a, --auto{=no,yes,md,mdp,part,p}{NN}
Instruct mdadm to create the device file if needed, possibly allocating
an unused minor
number. "md" causes a non-partitionable array to be used. "mdp", "part"
or "p" causes
a partitionable array (2.6 and later) to be used. "yes" requires the
named md device
to have a ’standard’ format, and the type and minor number will be
determined from
this. See DEVICE NAMES below.
This article was posted by Matty on 2007-02-11 15:13:00 -0400 -0400