Blog

Repairing AppleRAID

Turns out AppleRAID is a lot like disksuite (except appleraid seems to drop disks out for no reason a lot of the time, and there’s no UI to tell you that happened).

Turns out you can ‘removefromraid’ one half of a mirror and the detached disk’s appleraid partition gets turned into HFS+ and mounted by the OS (great).

Problems happen when you removefromraid the remaining disk, mac os doesn’t manage to repartition properly (probably because I hadn’t unmounted the raid device).

imac:/Users/chrisl/ 1$ diskutil removefromraid 796AC197-9255-4747-AF1C-A62F05BA3451 B1EC6D40-F0BE-49EE-AAA5-945983DF5A65
Changing filesystem size on disk 'disk2s2'...
Attempting to change filesystem size from 499763871744 to 499763888128 bytes
The disk has been removed from the RAID

You end up with the partition having its ID left as ‘Apple_RAID_Offline’ and it’s not mountable and first aid refuses to try and fix it:

imac:/Users/chrisl/ 67$ gpt show disk8
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 976101344 2 GPT part - 52414944-5F4F-11AA-AA11-00306543ECAC
976510984 262144 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
976773128 7
976773135 32 Sec GPT table
976773167 1 Sec GPT header

everything’s in index 2 – 52414944-5F4F-11AA-AA11-00306543ECAC. http://developer.apple.com/technotes/tn2006/tn2166.html tells me that’s Apple_RAID_Offline and that 48465300-0000-11AA-AA11-00306543ECAC is ‘Apple_HFS’.

Turns out you can delete and re-add the partition though since we still have the start and size:

imac:/Users/chrisl/ 3$ gpt remove -i 2 disk8
disk8s2 removed
imac:/Users/chrisl/ 102$ gpt add -b 409640 -s 976101344 -t 48465300-0000-11AA-AA11-00306543ECAC disk8
disk8s2 added

and the OS will immediately mount the partition. This is handy if you formatted the drive you detached first without checking the other drive is okay to be used.

18 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment replies are not available offline

I have a Promise Pegasus R6, and had one drive show as damaged, after reformating it and installing it, the partition does not mount, would this work?
I can see and can recover data using Data Rescue, but i dont have enough drives (40tb) to recover this.

On the Promise raid utility it shows everything is OK, it just wont mount

Disk utility cannot repair it either

Help please

on March 22, 2018 at 9:58 am Reply |

Thank you, I can now sleep again.

on September 26, 2015 at 9:45 pm Reply |

Thank you.

We had a mac mini server with 2 disk in RAID 1. One of the disk died (completely). So I tried to add a new disk into the raid but it failed…
Then I realize the disk still working was also failing (it had 3 bad sectors, timeout on read).
We had backup for most files but not for the server configuration (openLDAP, etc…).
So did extract both disk from the map mini and replaced them with new ones. I then did a byte-to byte copy of the failing disk to a fully working disk with ddrescue. ddrescue did manage to rescue the 3 bad sectors.
Somehow the Disk Utility decided to mark the failing disk as failed (and Apple_RAID_Offline). All the data is there but you cannot mount it. Frustrating.
So i did use your technique to convert the Apple_RAID_Offline to Apple_HFS and bingo it worked !!!
I was able to make mount the drive and restore the volume to the MacMini (tip : mount the mac mini as target and use a machine to restore the volume/partition).

Awsome…

Bruno

on August 8, 2015 at 2:55 pm Reply |

Thank you. this worked out awesome.

on June 28, 2015 at 4:25 am Reply |

🙂 <- says it all. I had a feeling I could solve the issue with redefining the partitions, just needed someone who knew what they were doing to spell it out for me 🙂 Cheers!

on January 14, 2015 at 12:55 am Reply |

This saved my data. Thanks so much!

on December 27, 2014 at 5:38 am Reply |

You absolute bloody genius!!!

Thanks You!

on December 25, 2014 at 9:19 pm Reply |

Saved my butt today. Thank you, sir.

on August 11, 2014 at 6:32 pm Reply |

Hello can I do the same or something similar for drives that failed to mount after I took them out of a LaCie 2big quadra set as mirror raid ?
when I put them back inside the computer asks that I format them …
Data rescue can see the data but when I run it is generate more files and content that I had and it is not usable as such…
These are 3 important final cut project…
Thank you for your help …
Anyone
Marc

on June 19, 2014 at 12:30 pm Reply |

Sorry Marc I don’t know anything about how LaCie’s RAID works. I recommend you call them directly.

on June 19, 2014 at 3:54 pm Reply |

Thank you. Thank You.

on December 7, 2013 at 5:22 pm Reply |

You saved me, again. I did the same mistake twice 6 months apart.

Great!

on November 3, 2013 at 2:40 pm Reply |

Please add my grateful thanks for this tip. It also bailed me out of the poo. You are a legend !.

on October 21, 2013 at 8:25 am Reply |

Thank you so very much!!!
You have saved me lot of work and recovered 600GB of data!!!!

on June 10, 2013 at 6:11 pm Reply |

Saved my bacon today. Thanks!

on January 28, 2013 at 1:05 am Reply |

You have NO idea how grateful I am for this info.

on January 4, 2013 at 10:46 pm Reply |

Greatly appreciated!

on April 15, 2012 at 11:43 am Reply |

I could give you a hug right now for posting this. Seriously.

Daniel

on August 26, 2011 at 2:13 am Reply |