Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Sometimes hdd might drop out of my RAID, but after I fix HW problem - I have to manually find out which is device name of dropped HDD and manually re-add it.

Is there a way to let mdadm scan all HDDs and auto-read ones which belong to array?

share|improve this question
1  
There's mdadm --assemble --scan, I believe it works with the correct setup in /etc/mdadm/mdadm.conf (see the RAID wiki). If that doesn't work, could you give some more details? –  j-g-faustus Jan 21 '11 at 20:16
    
Well, RAID is already assembled and working, it's just degraded - 1 drive dropped out of 5 (RAID-6). –  BarsMonster Jan 21 '11 at 22:11
    
So when you manually re-add (I assume that works?) you do something like mdadm /dev/mdX --add /dev/sdY1? And then the RAID starts the reconstruction process? –  j-g-faustus Jan 22 '11 at 9:54
    
Yes, manually it perfectly works, and as I have bitmap too, reconstruction is being done in seconds. –  BarsMonster Jan 22 '11 at 14:02
    
I may be wrong here, but if mdadm has marked the dropped drive as 'faulty' (so that mdadm does reconstruction/rebuild, not merely reassembly; the newly added drive will initially be listed as 'spare') I don't think there's an "auto-add" option available. I assume this is by design; if you actually have a bad drive you don't want the RAID to use that drive until you have replaced/fixed it. –  j-g-faustus Jan 22 '11 at 17:55

1 Answer 1

up vote 1 down vote accepted

No, there is no automated way to do this. There are mdadm monitors out there which parse the various events to enable you to create a custom application to manage the array according to your wishes. There are plenty of NAS appliances that use MD and developed a closed source daemon to manage md, to my knowledge, no open source equivalents exist.

share|improve this answer

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.