Make OS X see expanded space in RAID setup

Nov 18, '09 07:30:01AM

Contributed by: Anonymous

I expanded my RAID from 9TB to 13TB, and after it had finished, I noticed I had to resize the partition in order to use the new space. When I used Disk Utility, I got an error saying "Partition failed with the error: MediaKit reports partition (map) too small." After googling, I found the solution on the "life as i know it" blog, and thought I'd share the basics of the solution.

From the blog post, here's the essence of the problem and the solution:

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.
Read on for a summary of the fixes involved, and see the blog post for more details...

Here are the basic steps involved in expanding a RAID setup:

  1. Open Terminal and run df. Note the mount point for the drive you’re trying to expand, something like /dev/disk3s1. The disk3 is the relevant bit.
  2. In Disk Utility, unmount the current partition on the disk to be expanded.
  3. In Terminal, run sudo gpt show /dev/disk3, where disk3 is the value from the first step. In the output, copy the values for start and size from the line with the largest size value.
  4. In Disk Utility, unmount the partition again.
  5. In Terminal, run these commands:
    $ sudo gpt destroy /dev/disk3
    $ sudo gpt create -f /dev/disk3
    $ sudo gpt add -b nnstart -s nnsize /dev/disk3
    Replace nnstart and nnsize with the values from step three.
  6. Reboot your Mac, then use Disk Utility to resize the partition.
[robg adds: I can't test this one, lacking a RAID setup. Note that I rewrote most this hint to provide a summary of the blog post; the original submission was simply a copy of the blog entry, which I couldn't use as is without permission from the blog owner.]

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20091107142432801