2

I cloned a 750Gb HDD to a 1Tb SSD.
I can only access 750Gb on the SSD so 250Gb are wasted.
How can I include (assimlate?) the remaining 250Gb so they're not wasted, or create an accessible partition (I was thinking of installing linux).
Machine: Mid-2012 MacBook Pro running Mojave.
Thanks

diskutil list output

edit
macOS recovery mode, output from gpt -r show /dev/disk enter image description here

2

The output you posted shows 250 GB of free space. You could either use the space to install Linux or you could add this space to the APFS container. The command to add the space to the container is given below.

sudo diskutil apfs resizecontainer disk0s2 0

If you want to use the free space to install Linux, then nothing needs to be done from macOS. You will need to allocate the free space for Linux partitions when you run the Linux installer.

You might consider booting to macOS Recover and posting the output from the command below. This command will not change your computer. The output will give a better idea if the drive was cloned correctly.

gpt -r show /dev/disk0

Update

If you enter the command diskutil apfs resizecontainer, the following documentation is produced.

Usage:  diskutil APFS resizeContainer <inputDisk> limits [-plist]
        diskutil APFS resizeContainer <inputDisk> <newSize> [<triple>*]
        where <inputDisk> = A Container Reference DiskIdentifier (preferred)
              or a Physical Store DiskIdentifier
              <newSize> = the desired new Container or Physical Store size
              <triple> = a { fileSystemPersonality, name, size } tuple
Resize an APFS Container. One of the Container's Physical Store disks will be
resized, and therefore the Container which it defines will be resized by an
equal amount. You do this by specifying a new Container size; to preview the
current available range, you can instead specify "limits"; no change will be
made. A new size of zero is taken as a request to do a grow-to-fit operation.
If the new size implies a shrink, you can specify ordered triples in the same
manner as `diskutil partitionDisk`, etc, to fill the partition map's free
space gap that would otherwise result. If there is more than one Physical Store
and you specify a Container Reference, the appropriate Physical Store will be
chosen automatically. Ownership of the affected disks is required, and all of
the Container's Volumes must be unencrypted or unlocked.
Example:  diskutil apfs resizeContainer disk5 110g
          diskutil apfs resizeContainer disk0s2 110g
          diskutil apfs resizeContainer disk5 0
          diskutil apfs resizeContainer disk5 1.5t jhfs+ foo 10g ms-dos BAR 0

In your case, your APFS container only has one physical store disk with identifier disk0s2.

The output from the gpt -r show /dev/disk0 command shows there is a block containing 48,8376,007 sectors of free space. This is 48,8376,007 sectors x 512 bytes/sector = 250,048,515,584 bytes of free space.

 

2
  • I edited my original post to include ouput from gpt -r show /dev/disk0, sudo was not a recognised command. I am a bit concerned by the 0 at the end of your first suggestion, would this not delete the Apple container? Thank you for the suggestions though. (markdown doesn't seem to be working for me..)
    – AGB
    Feb 13 at 22:52
  • 1
    I updated my question. The documentation states the following: "A new size of zero is taken as a request to do a grow-to-fit operation." This means the partition that is part of the container will be expanded to include all free space directly below the partition. The container will not be deleted. Also, the output from the gpt -r show /dev/disk0 looks correct. I removed the sudo. Feb 14 at 1:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .