Recover a striped (RAID 0) array
Document Actions
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



Previous:
Kaseya Firewall Ports

