OSX Partition failed with the error: The chosen size is not valid for the chosen file system

8,861

The GUID Partition Table (GPT), which your disk uses, stores two copies of its partition table, one at the start of the disk and one at its end. When you did a "bit for bit" copy of your disk to a bigger one, the backup partition table ended up in the middle of the disk. It's impossible to place partitions after the backup partition table.

I'm not entirely sure what OS X's Disk Utility does in situations like this. If it's not smart enough to recognize that the backup partition table needs to be moved (and your symptoms suggest it's dumb on this score), you'll need to do so with other tools. My own GPT fdisk (gdisk) can do this:

  1. Launch gdisk on the disk, as in sudo gdisk /dev/disk0
  2. Type p to view your partition table. This is mainly a sanity check to be sure you're working on the right disk and that gdisk has interpreted the partition table correctly.
  3. Type x to enter the experts' menu.
  4. Type e to move the backup data structures to the end of the disk.
  5. Out of an overabundance of caution, type p to view the partition table again and be sure you've not accidentally told gdisk to delete all your partitions or something.
  6. If everything looks OK, type w to save your changes to disk. You'll be asked to confirm this change.
  7. To be on the safe side, reboot. This ensures that OS X uses the new partition table.

After you've done this, you should be able to use Disk Utility to create a new partition. (You could also create a new partition in gdisk, but it won't create the filesystem, so you'd then need to use newfs or Disk Utility to finish the job, so you might as well do it in Disk Utility.)

I'm sure there are other tools that can move the backup partition table, too. In Linux, parted and GParted will do so basically automatically. I'm less familiar with the OS X tools; chances are something else will work, but gdisk is the only one I'm certain will do it.

Share:
8,861

Related videos on Youtube

njorlsaga
Author by

njorlsaga

Updated on September 18, 2022

Comments

  • njorlsaga
    njorlsaga over 1 year

    So I had a failing 1TB drive in my macbook pro, I managed to copy it bit for bit to a new 2TB drive. The new 2TB clone now works fine.

    I have 2 partitions on the new drive, OSX yosemite and windows 7 running on bootcamp. Those 2 partitions are 599GB and 399GB respectively. So I have 1TB of free space on the new drive.

    Now without going through the pain of trying to do what I'd ideally like: expand both of these partitions to fill the free space and have to make sure the MBR and GBT are in sync, I figured I'd just create a 3rd partition for OSX to use and just store large files on it.

    When I run disk utility and select the free space which is below both the OSX and Bootcamp partitions I can click the little + symbol and select Mac OS Extended (journaled) then apply.

    Then I get the famous error:

    Partition failed with the error: The chosen size is not valid for the chosen file system.

    Any ideas how to create a 3rd partition here?

    to give you an idea of my setup below is the output from diskutil list in Terminal:

    /dev/disk0
    #:                       TYPE NAME                    SIZE         IDENTIFIER
    0:      GUID_partition_scheme                        *2.0 TB     disk0
    1:                        EFI EFI                     209.7 MB   disk0s1
    2:                  Apple_HFS OS X                    599.5 GB   disk0s2
    3:       Microsoft Basic Data BOOTCAMP                399.9 GB   disk0s3
    
  • njorlsaga
    njorlsaga almost 9 years
    thanks I will give that a try, do you think there's any risk of mucking up the bootcamp partition by shifting the backup partition table to the end of the new disk with gdisk?
  • Rod Smith
    Rod Smith almost 9 years
    The procedure I've described should not trash your Boot Camp setup; however, any low-level disk change poses some risk. (This is true of any tool that might fix your problem, too.)
  • njorlsaga
    njorlsaga almost 9 years
    thanks very much, after using gdisk I was able to add the third partition. I could not resize the existing partition, but I'm guessing that was because the mac partition preceded the bootcamp one.
  • Sledge Hammer
    Sledge Hammer about 8 years
    @Rod Smith Thank you, that really helped me after I got myself in the same situation as njorlsaga