Skip to contentSkip to conversation

--no-degraded in mdadm.conf? / disable auto assembly

DISCUSSION Dexter Filmore 2 participants 3 messages Apr 29, 2008 MD RAID

lore
Share & tools
lore
#0 lore raw

How do I prevent mdadm from assembling any array at all without uninstalling the package? I commented out all lines, still it seems it scanned and assembled what it found.
(Possibly a debian thing, will look into this)

Next thing: I don't want mdadm to assemble arrays if not all disks are present. Can I pass no-degraded to mdadm.conf?

Is there a dry-run-option that says what would happen if I assembled now?

Dex

Signature · 8 lines
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--(+)@ s-:+ a- C++++ UL++ P+>++ L+++>++++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@ 
b++(+++) DI+++ D- G++ e* h>++ r* y?
------END GEEK CODE BLOCK------

http://www.vorratsdatenspeicherung.de
#1 lore raw
Quoted 4 lines · Dexter Filmore

How do I prevent mdadm from assembling any array at all without uninstalling the package? I commented out all lines, still it seems it scanned and assembled what it found.
(Possibly a debian thing, will look into this)

AFAIK there are 3 places where an array is assembled 'automatically'

1. kernel auto-detect of 0xfd partitions - not mdadm, not currently preventable AFAIK.
2. initrd mdadm script
3. init.d mdadm script

I'm not sure how udev figures into this... ISTR that some distros had udev script issues when udev detected and assembled an array when it had found 'enough' components and then triggered a resync when the final component popped up.

Quoted 2 lines

Next thing: I don't want mdadm to assemble arrays if not all disks are present. Can I pass no-degraded to mdadm.conf?

Yes. man madadm:
--no-degraded
This is the reverse of --run in that it inhibits the started if
array unless all expected drives are present. This
is only needed with --scan and can be used if you physical
connections to devices are not as reliable as you would
like.

Of course it may be in a newer version :)
Where's the git page for mdadm then?

Quoted 1 line

Is there a dry-run-option that says what would happen if I assembled now?

Not AFAIK - plus, I think this would be an md function wouldn't it? Doesn't mdadm just ask the kernel md module to assemble the components without checking event counts etc.

David

#2 lore raw
Quoted 2 lines · David Greaves

1. kernel auto-detect of 0xfd partitions - not mdadm, not currently preventable AFAIK.

oops : kernel option "raid=noautodetect"