Expanding RAID & Partitions on Mac
IMPORTANT NOTE:The following procedures are ONLY for people with RAID cards who have upsized their raid array. If you have a MacBook or MacBook Pro, this is not for you! If you want to move from a smaller single drive to a larger single drive, try CarbonCopyCloner or SuperDuper .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.
- First thing - if you have the ability to, backup your data. Or at least back up your most critical data.
- If you have DiskWarrior, run it. You definitely want to take care of any potential problems before you go mucking around with your drive. If you don’t have DiskWarrior, at least run fsck or Disk Utility repair. DiskWarrior is only $99.95 and I know it’s saved my data a few times. (Side note: I personally do not trust DiskWarrior’s overlapping file repair mechanism. I have no way of proving it, but I believe that DiskWarrior fubar’d my overflow extents (the mechanism hfs uses to keep track of file fragments for files with over 8 fragments). As long as you keep 10%ish free on your volume, overlapping files should not ever be an issue. Don’t let this stop you from running DiskWarrior. I know of no other tool that works as well, and they’ll do whatever they can to help you out if DiskWarrior is stumped by problems with your disk).
- 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.
- Make sure you have rebooted! If you don’t reboot, I can almost guarantee that bad bad things will happen.
- Now use Disk Utility to resize the partition.. Reboot now.
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 =)
January 11th, 2010 at 03:09
Hi Scott
Just wanted to thank you for this little nugget. Had an iSCSI disk on a linux logical volume that resized ok but I got the horrible “MediaKit reports partition (map) too small.” error. This was a nice easy fix and really should be ranked over the multitude of redo partition solutions on google.
So thanks ALOT
January 27th, 2010 at 01:31
I just did it on a AXUS RAID 6 on Mac OS X Server 10.5.8 and this works!
Thanks Thanks Thanks for this !
regards
March 5th, 2010 at 15:21
This solution rocks! I was able to extend our iSCSI volume, finally. I’ve printed it to PDF and added it to our internal Kbase at my work. Thank you.
June 13th, 2010 at 19:01
I too must thank you for this invaluable advise. Neither Apple or the raid card manufacturer could help me without erasing my existing 2 TB RAID5. That was a non-starter. Thanks again.
June 16th, 2010 at 16:22
I migrated RAID10 to RAID6 on a Promise Storage Array and read manual page of diskutil to confirm the HFS+ Volume could be resized to include “free space” before starting the job. Yet I got stuck at claiming the newly created disk space. Thanks to this post. It really works!
August 3rd, 2010 at 19:26
This just saved me a lot. Thanks!
October 5th, 2010 at 17:55
Just wanted to say thanks for sharing this info with the world. Just fixed my problem.
October 6th, 2010 at 22:05
Thank you so much. Spent a few hours googling before finding this. I have an iSCSI target on ubuntu (using LVM2 and RAID) which I *reduced* from 3TB to 1.6TB and diskutil was able to shrink the volume just fine. Then when I enlarged it to 6TB later, diskutil resizeVolume was failing with the partition map too small 9939 error. I tried running it with limits and it showed 3TB. I guessed what was happening but didn’t know how to fix it until finding your post. Thanks very much!
January 31st, 2011 at 19:59
Thank you a lot, this solved my problem with increasing the disk size for my Virtualbox OS X installation.
February 23rd, 2011 at 09:35
Brilliant hint!
I dont’ have a RAID running, but had a diskimage that I wanted to expand.
After resizing the diskimage, I was not able to resize the volume on the diskimage, with the same ‘partition (map) too small’ error.
I fixed this using your hint, so thanks!
One note: because the diskimage had two partitions, one EFI partition and one HFS+ partition, I had to re-add the EFI partition with the extra option -t, specifying the partition type (apparently, Apple_HFS is the default type, so for ‘normal’ partitions this is not needed)
For the EFI partition I had to use:
sudo gpt add -b [value] -s [value] -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk[value].
Here, C12A7328-F81F-11D2-BA4B-00A0C93EC93B is the GUID for an EFI partition.
(whereas 48465300-0000-11AA-AA11-00306543ECAC is the GUID for a ‘normal’ Apple_HFS partition)
Once again, thanks a lot!
March 27th, 2011 at 00:40
I just want to say thank you for this post, it was a real life-saver when expanding the array in one of our graphic designers’ Mac pros!!
June 15th, 2011 at 10:53
OMG - it works!! Thank you!
I’m still a bit jittery though, you know how it goes when you do stuff to your computer that you don’t have the pay grade for!
BTW, i’m running a RAID 6 array, so to the previous poster - it does work.
Thanks again!