Contribute
Register

Increase APFS drive size?

Status
Not open for further replies.
Joined
Sep 14, 2018
Messages
5
Motherboard
HP Elitedesk
CPU
i7
Graphics
on-board
My 250GB drive filled, so I cloned to a 500GB drive. However I can't seem to find how to use more than 250GB of the new drive. Here's my diskutil list, I believe Apple_APFS Container disk3, is the one I need to increase. I am currently booted off the 250GB drive, but can boot off either.

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *250.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_APFS Container disk2 249.8 GB disk0s2


/dev/disk1 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk1

1: EFI EFI 209.7 MB disk1s1

2: Apple_APFS Container disk3 249.8 GB disk1s2


/dev/disk2 (synthesized):

#: TYPE NAME SIZE IDENTIFIER

0: APFS Container Scheme - +249.8 GB disk2

Physical Store disk0s2

1: APFS Volume MACOS 222.3 GB disk2s1

2: APFS Volume Preboot 20.7 MB disk2s2

3: APFS Volume Recovery 509.8 MB disk2s3

4: APFS Volume VM 20.5 KB disk2s4


/dev/disk3 (synthesized):

#: TYPE NAME SIZE IDENTIFIER

0: APFS Container Scheme - +249.8 GB disk3

Physical Store disk1s2

1: APFS Volume MACOS 220.2 GB disk3s1

2: APFS Volume Preboot 20.7 MB disk3s2

3: APFS Volume Recovery 509.8 MB disk3s3

4: APFS Volume VM 20.5 KB disk3s4



I also ran this
diutil resize -limits /dev/disk1
min cur max
976773168 976773168 976773168

hdiutil resize -limits /dev/disk3
min cur max
487987488 487987488 487987488
 
I also ran this
diutil resize -limits /dev/disk1
min cur max
976773168 976773168 976773168

hdiutil resize -limits /dev/disk3
min cur max
487987488 487987488 487987488
Resizing the container partition, see

Code:
diskutil apfs resizeContainer

e.g. with the device names in your list output, the command to grow-to-fit (size=0) is

Code:
diskutil apfs resizeContainer disk1s2 0
 
Resizing the container partition, see

Code:
diskutil apfs resizeContainer

e.g. with the device names in your list output, the command to grow-to-fit (size=0) is

Code:
diskutil apfs resizeContainer disk1s2 0

I tried that command and I get this:
sudo diskutil apfs resizeContainer disk0s2 0
Started APFS operation
Error: -69743: The new size must be different than the existing size

Currently booted off the 500GB only:
/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_APFS Container disk1 249.8 GB disk0s2


/dev/disk1 (synthesized):

#: TYPE NAME SIZE IDENTIFIER

0: APFS Container Scheme - +249.8 GB disk1

Physical Store disk0s2

1: APFS Volume MACOS 220.7 GB disk1s1

2: APFS Volume Preboot 20.7 MB disk1s2

3: APFS Volume Recovery 509.8 MB disk1s3

4: APFS Volume VM 20.5 KB disk1s4
 
Disk Utility says no errors.
How did you clone the disk? It is possible the GPT header needs fixing if it was cloned from the smaller disk.
Code:
sudo gpt show disk0
An indication might be if the start + size of the last partition (allowing for alignment space) = the start of the 'sec GPT table'.

Some links that might help:

https://www.rodsbooks.com/gdisk/repairing.html
Rod Smith said:
Misplaced data—If you use a hardware RAID array and add a disk to it, the backup data structures will no longer be at the end of the disk. Likewise if you back up your GPT data to a disk file and then restore that backup to a larger disk.

https://www.cgsecurity.org/wiki/TestDisk
 
Ok, I fixed this exact problem. I cloned my SSD (128GB) with clonezilla bit-by-bit to a new NVME 1TB disk.

I also received the same error as above:
"Error: -69743: The new size must be different than the existing size"

Vulgo pointed me in the right direction, but the mentioned tools require a lot of deep partition table understanding. I booted into Ubuntu, started gparted and it immediately suggested that the nvme disk needs to have the partition table fixed to expand the available size. I told gparted to fix it and quit the program.

Rebooted into OSX, ran the resizeContainer command and within a few seconds I had a 1TB OSX volume.
 
I booted into Ubuntu, started gparted and it immediately suggested that the nvme disk needs to have the partition table fixed to expand the available size. I told gparted to fix it and quit the program.

Rebooted into OSX, ran the resizeContainer command and within a few seconds I had a 1TB OSX volume.

Just want to say thanks, works like a champ.
 
Status
Not open for further replies.
Back
Top