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.

So our virtual machine has broken (it's actually a Linux machine in Azure) on which we were running a RAID10 array of 4 disks. It's an ubuntu box. From what I can tell the four data disks are fine, it's just the VM that is screwed.

Now, I could detach the disks from this machine and create a new linux instance, and then attach the disks to that new instance. Question is, how do I get mdadm to setup a RAID10 array using the data on those disks (I don't want it erased as a new drive).

Also, does it matter in what order I attach the disks or will mdadm figure out which disk is which in the array?

share|improve this question
    
Doesn't Azure already offer redundant storage? This arrangement seems, well, redundant. –  Michael Hampton Aug 19 '12 at 7:29
    
Kinda. It is there for redundancy, but we've heard of lots of reports of Amazon's EBS disks (and hence probably Azure's too) still going bad. –  Stuart Aug 19 '12 at 8:26
    
You haven't heard "lots" of reports of Amazon EBS going bad. If you have, then nearly all of them were probably made up out of whole cloth. And anyway, that's what backups are for. You do have a backup strategy, don't you? –  Michael Hampton Aug 19 '12 at 18:05
    
Yes, but it's out of date. The RAID was the main backup strategy against disk failure, we didn't expect the whole vm to die. Shall we focus on trying to answer the question now? –  Stuart Aug 20 '12 at 5:31
    
RAID is not backup. –  Michael Hampton Aug 20 '12 at 5:46

1 Answer 1

I would start by seeing what mdadm thinks is going on.

http://linux.die.net/man/8/mdadm -D, --detail Print details of one or more md devices.

should print a lot of information as I recall telling about the state of each raid device.

I believe $sudo mdadm --query --detail should do the trick there.

Danger Zone Below Here

Note: Any action below may have significant consequences. If the other disks have different checksums, then entire raid will have to undergo a rebuild which may take hours and have performance impacts. The best case is there is that there has been no writes since the event and re-adding will take a few seconds. The worst case is the raid will have to reconverge.

If it says the array is degraded, then you can $ sudo mdadm --manage --add /dev/sd??

If it says the raid is offline, then you need to call a data recovery expert.

share|improve this answer
    
Thanks. I can't get to the existing machine so I can't query the status of the drives. I'll be starting a completely new machine, then attaching array disk from the old machine. –  Stuart Aug 19 '12 at 7:28

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.