Create new partition in unallocated space with diskutil
(Before proceeding, please make sure the disk in question is still disk2, you have backups of your data, etc. - that said, the changes here are not particularly dangerous. Read through the whole instructions before doing anything to make sure you understand all the steps.)
OK, your partition tables look fine (a valid GPT and a correct protective MBR), so I don't know why Disk Utility is failing you in this instance, but you should be able to create a partition in the empty space using the gpt
command-line utility. Your GPT looks like this:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 195575768
195985408 389353696 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
585339104 1531680 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
586870784 976562504 4 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
1563433288 262144 5 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
1563695432 1366319552 6 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
2930014984 262144 7 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
2930277128 7
2930277135 32 Sec GPT table
2930277167 1 Sec GPT header
The free space is indicated by this line (the numbers are 512-byte sectors, so just under 100GB free space:
409640 195575768
Apple requires 128MiB (262144 sectors) free space following a partition, so the new partition can be 195575768-262144=195313624 sectors. Unmount all the volumes on the disk using:
diskutil unmountDisk disk2
Then, this command will create an HFS+ partition in the free space:
sudo gpt add -b 409640 -s 195313624 -t hfs disk2
That only creates the partition, not the file system. To check that it went well, you should now see a disk2s8
if you run diskutil list disk2
. If this is indeed the case, you can format the partition like so:
sudo newfs_hfs -v "Volume Name" -J /dev/rdisk2s8
If disk2s8 hasn't appeared, you'll need to reboot before formatting. Instead of running newfs_hfs
you should also be able to erase the partition in Disk Utility.
The gpt utility doesn't re-order the partition numbers but this shouldn't be a problem in practice. If you make any further changes with disk utility, that will probably fix the ordering anyway.