I cloned a Time Machine backup from a 1TB SSD to a 2TB SSD, using a SSD Docking Station (This product to be exact. It probably behaves similarly to Clonezilla). This resulted in the 2TB SSD having one APFS partition with 1TB and unused space of 1TB. I want to re-partition the APFS partition so that it uses the entire 2TB available on the new SSD.
I tried editing the GUID partition table (GPT) using gpt remove as described in this thread, but the command fails to because of an operation not permitted error. I was hoping to run diskutil apfs resizeContainer after this to claim the unused space.
Would someone offer any insights on this matter? I'd be grateful!
Command for removing GPT index (Ran on both normal and recovery boot)
➜ ~ sudo gpt -f remove -i 2 /dev/disk4
gpt remove: operation not permitted: remove
Command for resizing APFS Container
➜ ~ diskutil apfs resizeContainer disk4s2 0
Started APFS operation
Error: -69743: The new size must be different than the existing size
Disk Information (Notice the (free space) 1.0 TB)
➜ ~ diskutil list external
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk4
1: EFI EFI 209.7 MB disk4s1
2: Apple_APFS Container disk5 1000.0 GB disk4s2
(free space) 1.0 TB -
/dev/disk5 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +1000.0 GB disk5
Physical Store disk4s2
1: APFS Volume TimeMachine 937.7 GB disk5s2
➜ ~ diskutil apfs list
...
+-- Container disk5 AFEF2475-D211-4D77-978C-928F6D3A260D
APFS Container Reference: disk5
Size (Capacity Ceiling): 999995129856 B (1000.0 GB)
Capacity In Use By Volumes: 937923084288 B (937.9 GB) (93.8% used)
Capacity Not Allocated: 62072045568 B (62.1 GB) (6.2% free)
|
+-< Physical Store disk4s2 11DDF4B6-A80A-4E33-A986-98FFD4FF9905
| -----------------------------------------------------------
| APFS Physical Store Disk: disk4s2
| Size: 999995129856 B (1000.0 GB)
|
+-> Volume disk5s2 20030003-E683-424F-9C17-173CBF4A58EC
---------------------------------------------------
APFS Volume Disk (Role): disk5s2 (Backup)
Name: TimeMachine (Case-sensitive)
Mount Point: /Volumes/TimeMachine
Capacity Consumed: 937715933184 B (937.7 GB)
Sealed: No
FileVault: No
GUID Partition Table on new SSD (free space starts from Sector 1953525128)
➜ ~ sudo gpt show /dev/disk4
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 1953115488 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
1953525128 1953504007
3907029135 32 Sec GPT table
3907029167 1 Sec GPT header
I use Macbook Pro (Apple Silicon) with macOS Somona, as listed below:
➜ ~ sw_vers
ProductName: macOS
ProductVersion: 14.6.1
BuildVersion: 23G93