Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to resize my existing Mac OS Extended partition on my Macbook to install Windows 7 (using steps similar to these), but when ever I go to apply the changes, I get this error:

alt

Partition failed

Partition failed with the error:
The partition cannot be resized. Try reducing the amount of change in the size of the partition.

The total capacity of the hard drive in question is 260GB, with the entirety being taken up by the OS X boot partition. There is I am aiming to shrink that partition down to 60GB.

How can I fix this problem? I have been reducing the amount of change by 10GB each attempt, but it still is not working. I assume the problem is that there is not a large amount of continuous space on the device. Is there some way to can do a manual defrag that would rectify this problem?

share|improve this question
    
HFS partition resizing is too dangerous an operation to risk trying without a complete backup, and if you're going to make a complete backup anyway, you might as well just reformat, repartition and restore. It will be much easier. Parallels Desktop and VMWare Fusion are successful products because they eliminate the need for any of this nonsense. –  Hasaan Chop Nov 20 '09 at 0:50
    
Awesome, that was my question for today. @Hasaan Chop, also VirtualBox, which rocks and is free. –  Yar Apr 26 '10 at 10:26

5 Answers 5

up vote 11 down vote accepted

I had this exact same issue, OS X couldn't move the files to allow the partition to be resized. I went and got Coriolis iDefrag, it created a boot DVD with iDefrag on it that allowed it to do the job perfectly.

It's worth noting that for normal use of a Mac you never need to defrag, since files are defragged on-the-fly, but in this case we're wanting to defrag the free space, including some files that are 'locked'.

As always it's a good idea to backup your data first.

I was able to partition as much as I liked for Boot Camp once iDefrag was done (before it wouldn't even let me do 5Gb, afterwards I did a 100Gb partition).

share|improve this answer
1  
I decided to give iDefrag a go and, 3.5 hours later, I was able to resize the partitions using Disk Utility. I created a bootable DVD and used the 'Compact' method. –  David Pearce Nov 20 '09 at 11:27
    
This is great but it doesn't actually answer the question - it's just a workaround. –  John Ripley Jul 27 '11 at 23:34

In some cases a problem like this can be caused by bad system-volume information. Try using a utility like Disk Warrior to make sure your HFS+ volume has all of its values set correctly. Short of that, you could try using the Disk Utility from your OS X install disk instead of trying to resize the partition while booted from it.

share|improve this answer

Super question necromancy since I couldn't find the answer to this anywhere.

When resizing your HFS+ partition fails, there should be a log entry similar to: hfs_reclaimspace: Error reclaiming datafork blocks of fileid=<inode> created in the "All Messages" section of Console.app. find -x / -inum <inode> will tell you which file prevented the resize.

Knowing what file caused the problem allows you to delete that file or move it to another disk and move it back or something, allowing you to complete your resize without reformatting or purchasing a defragmentation program.

I had to do this twice(only two problem files) before my resize completed. I've only tested this with the diskutil command for resizing, but it should be the same with Disk Utility.app because the message comes from the kernel.

share|improve this answer
    
This works - for some reason I can't identify, some larger git repository .pack files had this error message. After archiving these files away, it shrinks successfully. –  John Ripley Jul 27 '11 at 23:58
    
I also had to remove 5 different git .pack files as well as, /usr/sbin/named, which I moved to a USB drive and back again. –  Xavier Shay May 27 '12 at 16:11

this is a simple to deal with the partition failed error

  1. You need to reboot your mac into single user mode. In order to do this, you need to hold press -S

  2. You then need to run fsck - which checks your drive. Run `/sbin/fsck -fv' the f is for force and the v for verbose.

  3. reboot the system to get out of single user mode - with exit or reboot

  4. verify the disk from disk utility, then partition the disk again

source

share|improve this answer
3  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Indrek Nov 21 '12 at 21:51

I have the same issue. Here is how I resolved it (without buying iDefrag).

  1. Try repairing the disk:

    a. boot into the recovery disk (hold Alt key after restart) and get into Disk utility

    b. try repair disk, it might fail because of some mismatched counts (it'd ask you to reformat your disk). c. before you follow that advice, try repair the disk again (I did this after another restart). The 2nd time, it worked!!

  2. Then I tried resizing the partition from the recovery disk, it would failed at "unmounting the disk" or something. Reboot into your main disk (where your os is).

  3. Resize the partition again, this time it worked for me.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.