Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)

share|improve this question

1 Answer 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
share|improve this answer
    
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 '10 at 0:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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