Expanding RAID & Partitions on Mac
Once my raid array had finished upsizing from 5.5GB to 9.1GB, I had to resize the partition in order to actually use the space. OS X’s Disk Utility gives the oh so friendly error
(Partition failed with the error: MediaKit reports partition (map) too small. ) Not particularly helpful, is it. All my googling has never found an answer, so I thought I’d post my solution here.
- Open up a terminal
- run ‘df’
- Note the mount point for the drive you’re trying to expand. Mine was “/dev/disk4s1″. We’re only interested in the disk, not the slice, so I’m going to use “/dev/disk4″.
- In Disk Utility, unmount the current partition on the disk.
- run “sudo gpt show /dev/disk4″. If this fails, you probably didn’t unmount the partition first.

- The line with the largest size is the partition we care about.
- In Disk Utility, unmount the partition again.
- run “sudo gpt destroy /dev/disk4″
- run “sudo gpt create -f /dev/disk4″
- run “sudo gpt add -b 409640 -s 11719262168 /dev/disk4″. Notice those numbers came from the start and length of the partition we want to save.

- Reboot.
- Now use Disk Utility to resize the partition. If you didn’t reboot, Disk Utility will probably give an error, but it might still work. Reboot now anyways.
Basically what’s going on here is that the GPT table is built only big enough for the drive it’s on. That’s a logical assumption - hard drives don’t magically get larger - unless they’re RAID arrays. We’re just removing the GPT partition information, and replacing it. Should things go crazy, as long as you’ve got the start and size information for the partition you care about, you should be good. No guarantees obviously, but I’ve done this three times and no data loss yet.
June 1st, 2009 at 20:20
Life as I know it is a whole lot better now!
These instructions posted by Scott are excellent! I highly recommend it over anything else to quickly fix the problem as described.
I searched the web and couldn’t find much until I saw his post in Google. First glance it seemed complicated but then I just followed his steps one by one and it was actually very easy!
Scott - Thanks for putting this up.
You made my day a lot better!
Todd
July 4th, 2009 at 13:49
Hi Scott -
As mentioned in my first comment, I had no problem on one RAID 5 system. However, today in trying your instructions with a RAID 6 volume it doesn’t come back with any GPT information. So, I can’t destroy anything.
Another words… when doing step 3 above this is what is reported…
start size index contents
0 19531243520
That’s it. No PRI GPT info…
Disk Warrior shows no errors on the drive. Disk First Aid verifies it fine as well. It was expanded from 6TB to 10TB. It’s an Areca 1680 card.
Have any ideas what I can do?
Thanks,
Todd
July 4th, 2009 at 14:08
I think I just discovered my problem. It’s a guess as I don’t know enough about it. Looks like it is formatted for Apple Partition Map instead of GUD. If that’s the reason, guess I’ll have to erase, format at GUD and copy back from the mirror.
Todd
July 7th, 2009 at 11:35
I can’t thank you enough for this. I use a PromiseRAID with an xserve. I bought the half-loaded version with around 4TB in it. Once I migrated in new drives, the PromiseRAID saw the added drives. However, I had to fully eject, unplug, wait 60 seconds, and then plug back in and mount for the OS to see that the RAID was bigger. This did not, however, fix the problem that you have fixed here. I was still unable to expand the partition via CL or the disk utility UI.
I have an Apple Tech rep who could not tell me what the problem is. In fact kept telling me that the Apple documentation and diskutil function should work. I was extremely frustrated because the Promise system was officially supported by Apple and was the biggest reason I did not go with a cheaper system.
I will be forwarding this fix to my rep with the hopes something like this will be included in a future Mac OS Server update. Hopefully you get some credit considering you are the only person on the entire inter-tubes with a fix…
Once again, thank you.
Nick.
August 13th, 2009 at 10:14
Diskutil is still modifying the partition map as I write this… but I just have to say “thanks.” This is terribly useful and should be posted all over the net as a useful and easy way to migrate up a raid 5 system.
@todd - a day late and a dollar short, but I got the same response from show gpt Todd when I added the disk slice. /dev/disk7s4. The ’s4″ part made it go wonky and return the whole volume info with no gpt info. Then I re read the instructions and did a rectal cranial inversion and got it working. Well, theoretically… diskutil is still thinking as I write this. IT did, however save me from having to move 3 TB around my system.
Thanks Scott. Well done.
-James
September 12th, 2009 at 14:53
Thanks for this! I was having problema resizing
partitions after removing a Linux install.
I don’t have RAID but this worked just fine.
September 20th, 2009 at 22:37
Scott, Thanks so much for this!
I took a bit of a calculated risk building a DIY RAID, and thanks to your post I have no worries about any aspect of the array now.
I am running a RocketRaid 3540, I expanded to 7.5TB but was unable to find anywhere or anyone who had successfully expanded using this card under MAC OS X. even Highpoint said it was unsupported under OS X… so after the 4 days it took to expand the drive i am very grateful to find your post!
Thanks again!
Jon
October 16th, 2009 at 11:08
This worked without a problem. Thanks so much for the info.
November 2nd, 2009 at 20:28
Thank you so much.
We were bashing our head after adding tonnes of disc to our iSCSI array and this brilliant.
Thanks again. Worked a Treat.
de VK3IVY aka Ivy =)