Skip to contentSkip to conversation

prefered way to update mdadm/mdadm.conf

DISCUSSION Timothy D. Lenz 4 participants 4 messages Apr 17, 2009 – Apr 18, 2009 MD RAID

lore
Share & tools
lore
#0 lore raw

There seems to be 2 ways to update mdadm.conf. One puts a little more info in and both create duplicate info that msut be removed. Which is the better way:

mdadm --examine --scan >> /etc/mdadm/mdadm.conf
mdadm --detail --scan >> /etc/mdadm/mdadm.conf

Also, is there a way to check if mdadm "damenised" at boot for sending email alerts? mdstat only list the arrays, not any kind of monitoring level.

#1 lore raw

I'm using mdadm --examine --scan >> /etc/mdadm/mdadm.conf because with --detail mdadm report also the metadata= which produces warning during the the boot ("warning: metadata=00.90 not recognize" or something like that).

#2 lore raw
In reply to Timothy D. Lenz
Quoted 5 lines · On Friday April 17, [email protected] wrote:

There seems to be 2 ways to update mdadm.conf. One puts a little more info in and both create duplicate info that msut be removed. Which is the better way:

mdadm --examine --scan >> /etc/mdadm/mdadm.conf
mdadm --detail --scan >> /etc/mdadm/mdadm.conf

The best way to create mdadm.conf is with an editor. Understand the syntax of the file, understand what you want mdadm to do to assemble/monitor arrays. And create a file that suits. The two commands are useful for pre-populating the file but should not be considered a 'final' answer.
They are useful in different contexts.

Quoted 4 lines

Also, is there a way to check if mdadm "damenised" at boot for sending email alerts? mdstat only list the arrays, not any kind of monitoring level.

"ps axgu | grep mdadm"

is a good way.

NeilBrown

#3 lore raw
In reply to Timothy D. Lenz
Quoted 5 lines · Timothy D. Lenz

There seems to be 2 ways to update mdadm.conf. One puts a little more info in and both create duplicate info that msut be removed. Which is the better way:

mdadm --examine --scan >> /etc/mdadm/mdadm.conf
mdadm --detail --scan >> /etc/mdadm/mdadm.conf

the former will check physical devices for md superblock, and read information from the found sb.
the latter will query active array for information

I use mdadm -Esc partition | grep ARRAY >> /etc/mdadm/mdadm.conf to inventory all array whether they are active or not.

I still would suggest checking the content of mdadm.conf after.

L.

Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \