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

I have the same problem as in Can I "atomically" swap a raid5 drive in Linux software raid? i.e. a Linux software raid with 3 RAID5 disks where one disk is showing smart errors but isn't marked faulty by MD yet. I want to replace the disk with minimal risk of data loss, online.

Is there an alternative to mdadm /dev/md0 -a /dev/sdd1 -f /dev/sdc1 (assuming sdc is failing and sdd is the new disk)?

AFAIK this will cause the disk sdc to be disregarded in case of a block failure on sda or sdb while rebuilding the array on sdd so that such an error would cause data loss. Perhaps MD learned something new in the last 4 years?

share|improve this question
    
Are you asking if you can "pre sync" the contents of sdc to sdd before you degrade the array? The issue that you're describing (a URE) is a shortcoming of parity RAID, not md specifically. –  MDMarra Oct 21 '13 at 22:47
1  
Would you have enough spare disk slots to consider a reshape to RAID6 instead? –  Andrew Oct 21 '13 at 22:50
    
Using RAID5 is a bad idea these days. What you probably could do is convert from a RAID5 to a RAID6. Then replace the failed. –  Zoredache Oct 21 '13 at 22:50
1  
While I do agree with Zoredache and Andrew about RAID 5 in general, the odds of a URE in a three disk array is very small. And when going from 3 disks to 4, RAID 10 is preferable as you'll have the same space but better performance. Of course, if you grow beyond 4 disks, RAID 10 gives less usable space than a RAID 6. Although, I'm not sure about md's ability to reshapre from RAID 5 or 6 to 10. HP and Dell hardware controllers can do it, though. –  MDMarra Oct 21 '13 at 22:53
2  
If you have a backup, might as well pop out the failing drive and replace it with a spare, cross your fingers, perform the needed rituals to please the RAID gods, and let the rebuild occur. –  Nathan C Oct 22 '13 at 1:26

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.