1

When I boot my ubuntu 10.04 server It only partially detects the drives as an inactive raid array with a funny name "md_d1". I have to stop and remove this 'device' every time and then add the new drives like this:

arthur@macro:~/Desktop$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md_d1 : inactive sdd[3](S)
      732574448 blocks super 1.2

unused devices: <none>
arthur@macro:~/Desktop$ sudo mdadm --stop /dev/md_d1
mdadm: stopped /dev/md_d1
arthur@macro:~/Desktop$ sudo mdadm --remove /dev/md_d1
arthur@macro:~/Desktop$ sudo mdadm --incremental /dev/sdd
mdadm: /dev/sdd attached to /dev/md/d1, not enough to start (1).
arthur@macro:~/Desktop$ sudo mdadm --incremental /dev/sdb
mdadm: /dev/sdb attached to /dev/md/d1, not enough to start safely.
arthur@macro:~/Desktop$ sudo mdadm --incremental /dev/sdc
mdadm: /dev/sdc attached to /dev/md/d1, which has been started.

Im currious where this name comes from and how RAID arrays are detected at boot. Why is this happening (and it would be nice to fix it)

1 Answer 1

1

Usually the init scripts read /etc/mdadm/mdadm.conf for ARRAY definitions; failing that they do something "sensible" like scanning all disks/partitions for superblocks. The man page for mdadm suggests:

echo ’DEVICE /dev/hd[a-z] /dev/sd*[a-z]’ > mdadm.conf
mdadm --examine --scan --config=mdadm.conf >> mdadm.conf

This will find arrays which could be assembled from existing IDE and SCSI whole drives (not partitions), and store the information in the format of a config file. This file is very likely to contain unwanted detail, particularly the devices= entries. It should be reviewed and edited before being used as an actual config file.

as a starting point for a decent config. The manpage for mdadm.conf gives some examples:

DEVICE /dev/sd[bcdjkl]1
DEVICE /dev/hda1 /dev/hdb1

# /dev/md0 is known by its UID.
ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
# /dev/md1 contains all devices with a minor number of
#   1 in the superblock.
ARRAY /dev/md1 superminor=1
# /dev/md2 is made from precisely these two devices
ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1

The names you're seeing are the defaults:

The standard names for non-partitioned arrays (the only sort of md array available in 2.4 and earlier) are either of

          /dev/mdNN
          /dev/md/NN

where NN is a number. The standard names for partitionable arrays (as available from 2.6 onwards) are either of

          /dev/md/dNN
          /dev/md_dNN
1
  • I'm not qualified to comment or grade this answer but it would be helpful if someone would clarify as it seems spot on to me.
    – Helvick
    Jul 2, 2010 at 0:09

You must log in to answer this question.

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