1

The container scheme of my hard drive is the following

enter image description here

I have more or less 87 GB free, that are not contained in this list.

I have removed the container of size 87 GB with the command

sudo diskutil eraseVolume free none disk0s3

Now, If I use

sudo diskutil apfs resizeContainer disk0s2 0

I get the error

Started APFS operation
Error: -69519: The target disk is too small for this operation, or a gap is required 
in your partition map which is missing or too small, which is often
caused by an attempt to grow a partition beyond the beginning of 
another partition or beyond the end of partition map usable space

I think this is a problem of offset but I don't know how actually solve this problem. The command diskutil info disk0s2 | grep -e Offset -e "Disk Size" returns

Partition Offset:          188026839040 Bytes (45904990 4096-Byte-Device-Blocks)
Disk Size:                 63.0 GB (62973333504 Bytes) (exactly 122994792 512-Byte-Units)
  • The simplest solution would be to backup your stuff, erase everything, reinstall macOS and restore from your backup. If this is not an acceptable solution, then post a comment. – David Anderson Apr 24 at 0:06
  • @DavidAnderson yes I know... but I would like to avoid this drastic solution. – apt45 Apr 24 at 6:54

You must log in to answer this question.

Browse other questions tagged .