Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I had a RAID 5 (Linux software RAID) server which recently decided not to boot anymore. It seems to be a motherboard problem possibly due to not being protected by a UPS during a power failure. It managed to extend its slow death to the point of taking up plenty of my time without much reward but I know that the drives are fine.

Is it possible to rebuild the RAID array even though the drives will have different numbers by plugging it into a machine over USB adapters?

Is it possible any damage can be done to the array in the process by attempting to rebuild the array with the wrong drive numbers?

I don't want to do a mdadm assemble --force unless I know it's safe. Is there something I can do to investigate if it will be safe to force the assembly?

share|improve this question
    
A related question regarding what appears to be a more challenging situation: unix.stackexchange.com/questions/8861/… –  barrymac Nov 1 '11 at 1:20
add comment

1 Answer

up vote 1 down vote accepted

The short answer is: yes, it is possible.

Linux software RAID writes some meta information on the devices such that you can easily plug them into another system (using another controller and so on) and use them there. Before doing any assembling, you can query the devices (status, look what Linux think what part of what RAID this device was etc.).

When you are using USB adapters be aware that you can't query SMART information over it (or use other more sophisticated ATA commands).

To be safe you should have a backup available. If you don't have a recent one you can copy the devices of your RAID5 via dd before issuing any mdadm commands.

share|improve this answer
    
You mean that mdadm actual writes to firmware, as in there is information outside of the partition that it may need? Excellent idea to simply DD the images first. Would it be possible to use them as loopback devices and assemble the RAID from them? They are 750Gb each drive though! The answer always seems to end up being "buy more storage" somehow !! :-P –  barrymac Nov 1 '11 at 16:37
    
@barrymac On the contrary, mdadm does not require any information outside what's stored inside the partition, not even the name or location of the partition. I believe that you can make some or all of the md components loop devices. –  Gilles Nov 1 '11 at 19:50
    
@Giles excellent thanks, that gives me the hope I need to carry on! I should be able to test things out, recover data just in case and perhaps even re-add a replacement drive to the array using the loopback devices –  barrymac Nov 2 '11 at 0:23
    
Are RAID 5 and RAID 6 both where there are two parity bits? Or does only one of them have two parity bits? –  Kaitlyn Mcmordie Nov 2 '11 at 1:46
add comment

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.