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.
- 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.