Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

APFS inverter failed... trying to clone SSD

Hi all! My first post here.


I am rather frustrated. I upgraded my early 2011MacBook Pro with an SSD about 1yr ago. It was a smaller drive around 130G which has filled up rather quickly. So... I purchased a new SSD drive (500G) to upgrade my upgrade. I have cloned my drive a number of times so I'm not new to cloning.


However, this time around I cannot get the clone to work. I am using the Disk Utility from recovery and the process seems to go all the way through until the very end where I get "APFS inverted failed to inver the volume - Invalid argument".


User uploaded file


I tried formatting the drive several different ways but nothing changes. I tried converting to APFS prior to cloning, that didn't work either but seemed to go a little further. Doing it that way it at lease renamed the drive to the same name as the boot drive I am trying to clone.


I tried cloning to an old drive I had to see if it was something to do with the SSD but it failed the same way!


If anyone can help, I would be very grateful!


Thank you in advance!

MacBook Pro, macOS High Sierra (10.13.3)

Posted on May 7, 2018 4:54 PM

Reply
Question marked as Best reply

Posted on Jun 11, 2018 12:41 PM

APFS Bootable Clone With Command Line

After multiple trial and error attempts, we finally mastered APFS and are ready to share the knowledge on creating APFS bootable backup with macOS command line. Having such copy on an external drive is rather useful in case something disastrous happens to your local disk, you will have an exact copy of the disk that can be connected externally to your Mac and boot it up. Clone copy of your disk will protect you against any physical or software damage to your computer and system disk, by preserving all the essential files and data.

All of the commands below should be used in Terminal app on macOS 10.13 or later. Highlighted in bold parts should be replaced with your own respective volume name, disk ID, etc.

Using Disk Utility app create an APFS volume on your external disk. Make sure that your external disk use GUID partition scheme. It’s also important that created APFS volume size is equal or bigger than the source system volume. Let's name the external disk volume as BackupClone


Activate on-disk ownership on your disk volume with the help of vsdbutil tool. Copy/paste the string below into Terminal, change BackupClone part to your external disk volume name and press return:

sudo vsdbutil -a /Volumes/BackupClone

Create full copy of the source system volume on BackupClone volume with the help of rsync tool:

sudo rsync -xrlptgoEvHS --progress --delete / /Volumes/BackupClone

Now we need to make our clone bootable. To do this we need to create a new Preboot volume in APFS container that includes BackupClone and copy system files from source Preboot volume in there.

Check the current situation with all your volumes:

diskutil list

As a result we see that MyDisk (disk1s1) is the source, and BackupClone (disk3s1) is our clone copy destination

Create Preboot volume in APFS container disk3 that includes BackupClone:

diskutil apfs addVolume disk3 apfs Preboot -role B

In the new Preboot volume let's create a folder, name the folder exactly as UUID of your volume BackupClone (disk3s1).

UUID can be obtained with diskutil:

diskutil info disk3s1 | grep "Volume UUID"

Copy/paste this UUID to create a folder on Preboot volume:

mkdir /Volumes/Preboot/A579A99E-9795-4086-890E-04E2112D1E78

Now mount the source Preboot volume:

diskutil mount disk1s2

Obtain UUID of the source volume and copy system files from source volume to external Preboot volume:

diskutil info disk1s1 | grep "Volume UUID"

Copy files using rsync tool:

sudo rsync -xrlptgoEvHS --progress --delete /Volumes/Preboot\ 1/CD9E8D34-F576-3F9B-AF7C-217C860721F4/ /Volumes/Preboot/A579A99E-9795-4086-890E-04E2112D1E78

Unmount Preboot volumes one by one:

diskutil unmount disk1s2

diskutil unmount disk3s2

Specify the path to boot files folder on your clone volume:

sudo bless --folder/Volumes/BackupClone/System/Library/CoreServices --bootefi

Update dyld's shared cache on clone volume using update_dyld_shared_cache tool:

sudo update_dyld_shared_cache -root /Volumes/BackupClone -force

In System Preferences open Startup Disk tab, then select BackupClone and press Restart button. Your computer will restart and boot up from created BackupClone volume.

Now you successfully created a bootable clone of your APFS disk volume. The next time you need to boot up your Mac from the clone, connect the external drive and start your Mac holding Option (Alt) key, until boot disk selection appears.

Similar questions

6 replies
Question marked as Best reply

Jun 11, 2018 12:41 PM in response to johnwizz

APFS Bootable Clone With Command Line

After multiple trial and error attempts, we finally mastered APFS and are ready to share the knowledge on creating APFS bootable backup with macOS command line. Having such copy on an external drive is rather useful in case something disastrous happens to your local disk, you will have an exact copy of the disk that can be connected externally to your Mac and boot it up. Clone copy of your disk will protect you against any physical or software damage to your computer and system disk, by preserving all the essential files and data.

All of the commands below should be used in Terminal app on macOS 10.13 or later. Highlighted in bold parts should be replaced with your own respective volume name, disk ID, etc.

Using Disk Utility app create an APFS volume on your external disk. Make sure that your external disk use GUID partition scheme. It’s also important that created APFS volume size is equal or bigger than the source system volume. Let's name the external disk volume as BackupClone


Activate on-disk ownership on your disk volume with the help of vsdbutil tool. Copy/paste the string below into Terminal, change BackupClone part to your external disk volume name and press return:

sudo vsdbutil -a /Volumes/BackupClone

Create full copy of the source system volume on BackupClone volume with the help of rsync tool:

sudo rsync -xrlptgoEvHS --progress --delete / /Volumes/BackupClone

Now we need to make our clone bootable. To do this we need to create a new Preboot volume in APFS container that includes BackupClone and copy system files from source Preboot volume in there.

Check the current situation with all your volumes:

diskutil list

As a result we see that MyDisk (disk1s1) is the source, and BackupClone (disk3s1) is our clone copy destination

Create Preboot volume in APFS container disk3 that includes BackupClone:

diskutil apfs addVolume disk3 apfs Preboot -role B

In the new Preboot volume let's create a folder, name the folder exactly as UUID of your volume BackupClone (disk3s1).

UUID can be obtained with diskutil:

diskutil info disk3s1 | grep "Volume UUID"

Copy/paste this UUID to create a folder on Preboot volume:

mkdir /Volumes/Preboot/A579A99E-9795-4086-890E-04E2112D1E78

Now mount the source Preboot volume:

diskutil mount disk1s2

Obtain UUID of the source volume and copy system files from source volume to external Preboot volume:

diskutil info disk1s1 | grep "Volume UUID"

Copy files using rsync tool:

sudo rsync -xrlptgoEvHS --progress --delete /Volumes/Preboot\ 1/CD9E8D34-F576-3F9B-AF7C-217C860721F4/ /Volumes/Preboot/A579A99E-9795-4086-890E-04E2112D1E78

Unmount Preboot volumes one by one:

diskutil unmount disk1s2

diskutil unmount disk3s2

Specify the path to boot files folder on your clone volume:

sudo bless --folder/Volumes/BackupClone/System/Library/CoreServices --bootefi

Update dyld's shared cache on clone volume using update_dyld_shared_cache tool:

sudo update_dyld_shared_cache -root /Volumes/BackupClone -force

In System Preferences open Startup Disk tab, then select BackupClone and press Restart button. Your computer will restart and boot up from created BackupClone volume.

Now you successfully created a bootable clone of your APFS disk volume. The next time you need to boot up your Mac from the clone, connect the external drive and start your Mac holding Option (Alt) key, until boot disk selection appears.

May 29, 2018 7:04 AM in response to KiltedTim

What about compatibility problems with Apple's own SSD drives builtin into MacBook Air circa 2010?


I have yet to find any solution to "APFS inverter failed to invert the volume - Invalid argument" that comes from attempting to clone SSD drive formatted to APFS by installation of High Sierra.


Workaround is to forgo High Sierra and revert back to Sierra.

May 29, 2018 7:51 AM in response to astirusty

After chatting with Apple support, the problem (APFS inverter failed to invert the volume - Invalid argument) is result of older Macs (7 to 8 years old) that don't have firmware installed to support APFS -or- using 3rd Party SSD disks in system.


Of issue is, required firmware to support APFS is not available by itself. Required firmware may be installed with some future update to High Sierra. But that would run counter to Apple's policy of not rolling out firmware for systems older than 7 to 8 years of age.


Only two choices a user has is to get 3rd-Party backup / restore software that supports APFS (advise checking with vendor about aforementioned error before buying) or don't install High Sierra on older Mac that has internal SSD drive; least file system will be converted from HFS to APFS.

APFS inverter failed... trying to clone SSD

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.