I have deleted the first partition on my external HD such that it now has 100GB of free space at the beginning of the partition. I'd like to reclaim that space, but Disk Utility doesn't let me create a new partition there (it just does nothing when I click 'Apply'). Is there a way to accomplish this with diskutil
? I’ve only found ways to change (or erase, or split etc.) existing partitions by e.g. entering disk2s2 as device ID, but the free space has no such device ID.
Outputs:
$ diskutil list disk2
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.5 TB disk2
1: EFI 209.7 MB disk2s1
2: Apple_HFS Shared 199.3 GB disk2s2
3: Apple_Boot Recovery HD 784.2 MB disk2s3
4: Apple_CoreStorage 500.0 GB disk2s4
5: Apple_Boot Boot OS X 134.2 MB disk2s5
6: Apple_CoreStorage 699.6 GB disk2s6
7: Apple_Boot Boot OS X 134.2 MB disk2s7
$ sudo gpt -r show disk2
Password:
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
$ sudo fdisk /dev/disk2
Disk: /dev/disk2 geometry: -5415437/4/63 [-1364690128 sectors]
Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
1: EE 1023 254 63 - 1023 254 63 [ 1 - -1364690129] <Unknown ID>
2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
3: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
4: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
$ sudo pdisk --list /dev/disk2
pdisk: No valid block 1 on '/dev/disk2'
diskutil list disk2
,sudo gpt -r show disk2
,sudo fdisk /dev/disk2
andsudo pdisk --list /dev/disk2
? It's not clear why Disk Utility isn't working, maybe there's a problem with (one of) the partition table(s). Also, have you tried running a "repair" on both the whole hard disk and the partition on it?