Page 1 of 1

Broken RAID0 Partition Map (Mac OS X)

Posted: 13 Jul 2014, 00:40
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??

Re: Broken RAID0 Partition Map (Mac OS X)

Posted: 14 Jul 2014, 16:36
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)