I had to "de-RAID-0" a raw array from a 2-disk enclosure today. This is the script I used to build a 2TB disk image file from 2x1TB drives with 1K (1024b) stripes. Modify as needed. If you have more than 2 RAID-0 disks, you'll need to duplicate and modify the line that advances output by 1 block for each added disk; the extra counter is included on that line already.
Formatted (can use ksh instead of Bash if preferred):
#!/bin/bash
A=0; C=0; S=0; ERR=0
STRIPE=1024 # Stripe size in bytes (not KiB)
FN=raid_recovery.bin # Output file name
while [ $ERR -eq 0 ]
do
# Copy from first device
dd if=/dev/sdc of=$FN bs=$STRIPE seek=$C skip=$A count=1 conv=notrunc 2>/dev/null || ERR=1
# Advance output by 1 block; copy from second device
# For 3+ disks, copy-paste this line for every added disk and modify 'if=' for each
[ $ERR -eq 0 ] && C=$((C + 1)) && dd if=/dev/sdk of=$FN bs=$STRIPE seek=$C skip=$A count=1 conv=notrunc 2>/dev/null || ERR=1
# Update source, dest, and status delay counters
A=$((A + 1)); C=$((C + 1)); S=$((S + 1))
# Display current output position periodically
[ $S -ge 256 ] && S=0 && echo -n $'\r'"$C blocks done"
done
One-liner version:
A=0; C=0; S=0; ERR=0; STRIPE=1024; FN=raid_recovery.bin; while [ $ERR -eq 0 ]; do dd if=/dev/sdc of=$FN bs=$STRIPE seek=$C s
kip=$A count=1 conv=notrunc 2>/dev/null || ERR=1; [ $ERR -eq 0 ] && C=$((C + 1)) && dd if=/dev/sdk of=$FN bs=$STRIPE seek=$C skip=$A count=1 conv=notr
unc 2>/dev/null || ERR=1; A=$((A + 1)); C=$((C + 1)); S=$((S + 1)); [ $S -ge 256 ] && S=0 && echo -n $'\r'"$C blocks done"; done