Broken RAID0 Partition Map (Mac OS X)

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read
Posts: 3
Joined: 13 Jul 2014, 00:26

Broken RAID0 Partition Map (Mac OS X)

#1 Post by macevanscb »

I have two dual drive RAID0 boxes connected to my theater system, which is an Apple Mac Mini.
They got knocked out somehow by a storm a few weeks back.
It appears that the RAID cases are bad and the drives pretty much ok.
One pair of disks mounts just fine in another known good RAID case.
But the second pair of disks has a partition problem.
I bought a new RAID case and a pair of 2TB drives to recover to and I did some looking around with GPT and pdisk.
All my movie files and folders on the bad disks are intact along with the folder structure.
But the partition map has been wiped so it won't mount.
I compared the new 4TB RAID with the broken 4TB RAID and found everything between them are identical-same disk geometry and everything. Amazing!
So.... I need some way of getting a correct partition map onto the broken RAID pair.
I tried to re-init the partition map with pdisk, but it won't allow me to create a 4TB partition, only a 2TB partition.
On the simple side, I would like to find a way to simply copy the first 34 blocks from /dev/rdisk1 to /dev/rdisk2.
Can anyone tell me how to do that??
If not, is there some other way to duplicate the partition header and partition table on rdisk1 to rdisk2??

User avatar
Posts: 456
Joined: 25 Mar 2012, 10:21
Location: Strasbourg, France.

Re: Broken RAID0 Partition Map (Mac OS X)

#2 Post by remy »

you may copy a range of sector using dd or ddrescue, but be really careful not to do mistakes…

with dd :
dd if=inputdevice of=outputdevice bs=512 count=numberofsectorstocopy

with ddrescue
ddrescue inputdevice outputdevice -s "numberofsectortocopy"s -f

be careful with ddrescue that you must put a "s" after the number to specify unit (ex 34s for 34 sectors)