osx - Enlarging disk partition on Mac OS X

07
2014-07
  • jakobk

    I have deleted the primary partition from my computer, and installed Mac OS Lion on a second. Now I want to enlarge the "Lion" partition, to make it fill the whole drive. I've been struggling to figure out how, can anyone help?

    This is how the partition looks:

    <free space>  (351 gb)   (not formatted)
    <lion>        (147 gb)
    
  • Answers
  • Spiff

    Lion's Disk Utility can resize partitions, but only by adjusting the "end" of the partition, not the "beginning". You can do what you need using Disk Utility, but it would be a multi-step process:

    1. Create a new partition in the 351GB of free space at the head of your drive.
    2. Use Disk Utility to do a "restore" from the existing partition to the new partition.
    3. Reboot from the new partition and make sure it works and has all your files.
    4. Now delete your old 147GB partition, and stretch the end of your 351GB partition to fill that space.
  • boretom

    Another application to do that is iPartition. It's in the same price range as Drive Genius. I've been using if for a few years now and never had any problems with it.

    As lupincho wrote create a backup before you preform any operations on partitions.

  • Bert F

    Drive Genius presumably is able to resize partitions, but is somehow pricy. I haven't used it, and as with all such pieces of software -- make sure that you have backed up all you data before utilizing it.

    This said, if you have an extra external drive you could backup the second partition to an image or partition on the external drive using SuperDuper! or Carbon Copy Cloner; then repartition the original drive and restore the system from the image that you've created at the first step. If you have Time Machine backup, you could use that to restore, although I think it is slower.

    Again -- whatever you do, make sure that you have a backup of all data.


  • Related Question

    osx - Mac OS X 10.4: Non-destructively enlarge HFS+ partition
  • elcelista

    I have a MacBook running OS X 10.4.11. Some time ago I shrank my main hard disk partition in order to dual-boot with Linux, but now I am running out of space on the Macintosh partition, and I would like to remove the Linux partition and restore the Macintosh partition to its original size. I have been able to remove the Linux partition, but I cannot seem to merge the free space back into the Macintosh partition. Originally I used GParted to shrink the partition, but I cannot use GParted to restore the partition because GParted is unable to enlarge HFS+ partitions.

    Does anyone know how I can restore my HFS+ partition to its original size without losing my data or spending money on a commercial product?

    If I attempt to use diskutil to resize the partition (while booted from the OS X installation DVD), I get the following:

    # diskutil resizeVolume disk0s2 119690149888B
    Started resizing on disk disk0s2 Macintosh HD
    Verifying
    Resizing encountered error No space left on device (28) on disk

    The 119690149888 bytes value was listed as the maximum size in the output of the command diskutil resizeVolume disk0s2 limits.

    I found other instructions for what I want to do at http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp#Restoring_your_Mac_to_its_original_state, but this requires Boot Camp, which is no longer available for OS X 10.4.

    (This is almost the same problem as question 50317 "Resize HFS Partition", but on Mac OS X 10.4 the Disk Utility application cannot resize partitions non-destructively. When I attempt to re-partition it warns that all data will be lost.)


  • Related Answers
  • Chris Johnsen

    Can GParted rewrite the partition map (delete the linux partition and then resize the remaining HFS+ partition) without trying to enlarge the HFS+ filesystem? If so you might then be able to use diskutil to enlarge the HFS+ filesystem to fit the bounds of the newly grown partition.

    Before trying this (or even using any of the commercial software), you should make sure you have a full backup (that way you can just destructively redo the partition with Disk Utility and restore from your backup—plus get a ‘free’ defrag for your troubles).