Call us on 01442 251-514 Twitterlinkedin.pngBlog

  Home Blog Recover a striped (RAID 0) array

Recover a striped (RAID 0) array

Document Actions
If you have to manually assemble a striped (RAID 0) array, here is how to do it under Linux using the Multiple Disk driver (md)

First determine what stripe size was used. The average default is 64k, but you will find that other popular stripe sizes are 32k or 128k. If the hardware is working well enough to tell you this, try this value first.  If you can access the hardware, or the hardware documentation, then this will give you the default stripe size for that piece of hardware, and almost always is what was used when the array was created.

Secondly, try and find what sequence the drives were in the array.  Building an array with the wrong drive in sequence renders it unusable (unreadable). A hint to determine the correct order is to check the partition tables on the drives. The first drive in the array will contain a valid partition table, the 2nd drive will not.

So, let's assume a 2 disk RAID 0 array with a 128k stripe (chunk) needs to be assembled for data recovery. Our 'build' command would be:

mdadm --build --level=0 --raid-devices=2 --auto=p --assume-clean \
--chunk=128 /dev/mdp0 /dev/sda /dev/sdb

The --auto=p option tells mdadm to create a partitionable array. --assume-clean is to tell mdadm not to fiddle with array rebuilding etc. Not really necessary with RAID 0, but it makes me feel safe telling mdadm not to 'sync' an array.

Now run fdisk, cfdisk or sfdisk and look at your partitions and mount them. If you got the stripe wrong, expect to see mount errors. Mounting read-only (-o ro) is a good idea - but if you're doing data recovery, you already know this. Right? If you're being really professional about it, you are working on a snapshot image of the original drives, and leaving the originals untouched.

Mount example:

mount /dev/mdp0p1 /mnt/tmp -t ntfs-3d -o ro

Author:

Ian Macintosh

Last modified Mar 01, 2012 02:01 PM

Remote Support

Click below to download our remote support client

Remote Now

Testimonials

"There is absolutely no way that I would ever recommend KCS to any of my competitors or business associates as to do so would give my competition the same advantages and forward thinking that I have enjoyed"

Sean Davern

Read More

Microsoft SBS Specialist

Customer Satisfaction

We are interested in finding out what our customers think of us, if you have recently dealt with our team please feel free to fill out our customer satisfaction form and we ask you to be as honest as you can! Please click on the link below.

Customer Satisfaction Survey