How to the internal SSD be cloned onto an external 1 TB SSD (for swapping)

apfsdisk-utilitypartitionssd

I want to clone my internal 500 GB SSD onto a new 1 TB SSD which is going to replace the internal 500 GB SSD in my MBP.

Currently the 500 GB SD is partitioned like the following:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Mac OS                  459.4 GB   disk1s1
   2:                APFS Volume Preboot                 46.4 MB    disk1s2
   3:                APFS Volume Recovery                510.4 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4

I tried to use the following command in Recovery Mode:

dd if=/dev/rdisk0 of=/dev/rdisk2 bs=1m

Will this work?
After dd finished, I was not able to mount disk2.
Do I have to change the dd command?

I was not yet able to swap the internal 500 GB SSD by the 1 TB one to check if it would boot. But I guess it won't 🙁

disk2 looks after dd like this:

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                 Apple_APFS                         1.0 TB     disk2s2

But Apple_APFS can't be mounted.
I am also wondering why it is recognized as 1.0 TB – I think after using dd it should be 500.1 GB (the size from 'Apple_APFS Container disk1').

I tried to find some information about cloning APFS volumes with EFI, Recovery, VM and Preboot stuff, but I could not find any useful information.

Maybe someone can help me here?
Thanks
Daniel

Best Answer

I am currently typing this from the system on the cloned 1 TB SSD, my solution was:

  1. Clone internal 500 GB SSD with Carbon Copy Cloner 5 to the 1 TB SSD (using QNINE NVMe enclosure)
  2. Swap 500 GB internal with 1 TB Sabrent Rocket NVMe
  3. Directly boot into Recovery Mode
  4. Added the missing VM container with the command: diskutil apfs addVolume disk1 APFS VM -role V I was not afraid of doing this because I found an Acronis script for cloning APFS volumes https://kb.acronis.com/content/60425 which executes the command pre restore. Interestingly the size of VM after the command was only some KB.
  5. After booting Mojave the size of VM was 1.1 GB like before

Sadly we won't know if dd and afterwards diskutil repairDisk disk1 would also have worked.

Thanks and I hope this post will help people with a MacBook Pro up to mid 2015 to upgrade the internal storage. (After mid 2015 Apple started to solder the storage onto the mainboard).