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

Fusion Drive: Restore from Time Machine - "The disk can't be erased."

Hello,


On a new (late 2015) iMac I need to erase my 3TB Fusion drive (El Capitan, not encrypted, just 1 partition, no Boot Camp partition), and then restore a Time Machine backup (made on a previous iMac, also with 3TB Fusion drive (El Capitan, not encrypted, just 1 partition, no Boot Camp partition).


According to Apple document: https://support.apple.com/en-us/HT204904 "Restore from a Time Machine backup" I...

1. restarted with cmd+R (later I also tried cmd+alt+R, and also from a bootable El Cap USB flash drive)

2. selected "Restore from Time Machine Backup"

3. selected my external Time Machine backup drive

4. selected the most recent backup

5. selected "Macintosh HD" as destination and clicked "Continue"

... but then the following message appeared "The disk can't be erased."


User uploaded file


Then I tried to erase "Macintosh HD" via Disk Utility:

1. restarted with cmd+R (later I also tried cmd+alt+R, and also from a bootable El Cap USB flash drive)

2. selected Disk Utility

3. selected "Macintosh HD"

4. clicked "Erase" tab

5. clicked "Erase" button

... then I got the error message:

"Erase process has failed... Details: Unmounting disk3 - Removing Logical Volume from Logical Volume Group - Unable to delete the Core Storage logical volume. Operation failed..."


I was in the "Recovery loop", and the only way out was to "Reinstall OS X", but then after many hours, there was again my old flubbed installation with everything I wanted to get rid of!


How can I restore my Time Machine backup - nothing more or less - to my new iMac?


I've lost 3 days now with this problem. I really hope someone has a solution.


Many thanks!

Posted on Jan 16, 2016 1:07 PM

Reply
46 replies

Jan 19, 2016 5:54 PM in response to Linc Davis

Success on iMac #1! Restoring from Time Machine backup is running now...

(Migration Assistant is NOT required – great!)


On iMac #2, where I had also started with the procedure, it says now:

"Ownership of the affected disks is required."

I assume I can get my ownership back via Terminal, but how?

(I can't remember to have done anything which could have removed my ownership...)


For the future, should I need to do this ever again on another Mac, will the following 2 steps suffice?


diskutil cs deleteLVG `diskutil cs list | awk 'NR==3{print $NF}'`

N=Macintosh\ HD; diskutil cs createLV "$N" jhfs+ "$N" 100%

Thanks again!!

Jan 19, 2016 7:35 PM in response to coxorange

I answered your original question; now you're bringing up another one. I suggest you start a new thread to address it, if you can't find a solution by searching the site. Below are revised instructions for solving the problem raised in your first question.

Apple has not provided an easy way to recover from this condition. Please read this whole message before doing anything. If you don't feel able to carry out the instructions, get someone more experienced to help you. One option is to make a "Genius" appointment at an Apple Store.

This procedure applies only to an iMac or Mac mini with a factory-installed Fusion Drive.

You'll need to refer to these instructions while no web browser is running, so either print them or load them on another device before you begin.

1. You need at least two complete, independent backups of all data before proceeding. One backup is not enough to be safe. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

2. Disconnect all external storage devices.

3. Start up in Internet Recovery mode by holding down the key combination command-option-R at the startup chime. Release the keys when you see a spinning globe. Select a language, if prompted.

Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with proxy servers, or with networks that require a certificate for authentication.

4. In the OS X Utilities screen, select Get Help Online. Safari will launch. While in Recovery, you'll have no access to your bookmarks, but you won't need them. Load this web page.

5. Triple-click anywhere in the line below to select it:

diskutil cs deleteLVG `diskutil cs list | awk 'NR==3{print $NF}'`

Copy the selected text to the Clipboard by pressing the key combination command-C.

Quit Safari. You'll be returned to the OS X Utilities screen.

6. From the menu bar, select

Utilities Terminal

The Terminal application will launch. Paste into the Terminal window by pressing the key combination command-V. Wait for a new line ending in a hash sign (#) to appear. If nothing happens, press the return key.

Quit Terminal to be returned to the main screen.

This operation will remove all data from the Fusion Drive, so you had better be sure of your backups.

What happens next depends on what version of OS X came preinstalled on your model (and therefore, which version of Disk Utility is included in Internet Recovery):

☞ If the machine came with OS X 10.10 ("Yosemite") or an older version, please take Step 7a and skip Step 7b.

☞ If it came with OS X 10.11 ("El Capitan") or a newer version, go to Step 7b.

☞ If you don't know what version of OS X the machine came with, try Step 7a first, and if it doesn't work, go to Step 7b.

After taking whichever of those steps is applicable, you should have a Fusion Drive named "Macintosh HD" on which you can carry out either Step 8 or Step 9.

7a. Repair the Fusion Drive (see under "Troubleshooting" on the linked page.) Quit Disk Utility.

7b. Enter the command below as in Steps 4-6:

N=Macintosh\ HD; diskutil cs create "$N" disk0 disk1 && diskutil cs createLV "$N"
jhfs+ "$N" 100%

Quit Terminal.

8. If you have a Time Machine backup, connect the backup device and restore your data. If you backed up to a network device such as a Time Capsule, it should be connected automatically.

9. If you don't have a Time Machine backup, or if you can't restore from the Time Machine backup that you do have, install OS X. Restore the data afterwards in Migration Assistant.

In Internet Recovery mode, you'll be installing the original version of OS X that shipped with the machine. If you've upgraded the OS in the App Store, and you want to install the latest version, then restart in local Recovery mode by holding down the key combination command-R (not the option key) at the startup chime. When you install the OS, you'll be prompted for the Apple ID and password that you used to upgrade.

Jan 19, 2016 7:53 PM in response to Linc Davis

Dear Linc,


I'm grateful and happy that you took the time and went with me through this labyrinth to finally find the solution.

And as I see you have created a complete useful Guide for others who might have this problem too

(and as I read in many forums, a lot of Mac-with-Fusion-Drive users have it!).


Regarding the last little problem in conjunction with this matter

(the error "Ownership of the affected disks is required." which stopped the solution from working on my 2nd Mac)

I have searched forums for many hours and just found


sudo chown root: /


but it didn't work. What is wrong with it?


(Your suggestion to open a new thread might get complicated, because for finding help

I would have to explain HOW it came to the situation and this would lead to this thread.)

Jan 20, 2016 10:58 AM in response to Linc Davis

Dear Linc, unfortunately I got no reply in that other thread regarding the missing ownership.

The matter seems to be too complicated, probably because that issue had developed

by carrying out your earlier, incomplete suggestions in this thread. As you wrote:


I see that I haven't been clear enough. I didn't intend for you to start over

from the beginning. Without repeating anything you've already done [...]


On my second Mac obviously not all commands, from the beginning, had been carried out –

only the later ones of which we thought were already optimized, hence the Fusion drive

has already been split, but the HDD and SSD are now in undefined condition (ownership).


Furthermore, wouldn't you agree that your Guide should work for all users,

independent from the drives' ownership conditions they have on their Macs?


So it should include some "reset" functionality and my only hope is

that you can help with this. Thank you again!

Jan 21, 2016 3:44 AM in response to Linc Davis

Linc, good news, I regained ownership (after 2 days searching) by repartitioning in Windows format,

and then going back to OS X Extended (Journaled).


Now, unfortunately, another problem occurred when running step 7b:

Linc Davis wrote:

7b. Enter the command below as in Steps 4-6:

N=Macintosh\ HD; diskutil cs create "$N" disk0 disk1 && diskutil cs createLV "$N"
jhfs+ "$N" 100%


This error message in Terminal came up:


User uploaded file

Please, how can this be fixed?

Many thanks!

Jan 25, 2016 1:50 PM in response to coxorange

Apple has not provided an easy way to recover from this condition. Please read this whole message before doing anything. If you don't feel confident that you can follow the instructions, get someone more experienced to help you. One option is to make a "Genius" appointment at an Apple Store.

This procedure applies only to an iMac or Mac mini with a factory-installed Fusion Drive.

You'll need to refer to these instructions while no web browser is running, so either print them or load them on another device before you begin.

1. All data on the internal drives will be removed, including Boot Camp data, which is not backed up by Time Machine. You need at least two complete, independent backups. One backup is not enough to be safe. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

2. Disconnect all external storage devices.

3. Start up in Internet Recovery mode by holding down the key combination command-option-R at the startup chime. Release the keys when you see a spinning globe. Select a language, if prompted.

Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with proxy servers, or with networks that require a certificate for authentication.

4. In the OS X Utilities screen, select Get Help Online. Safari will launch. While in Recovery, you'll have no access to your bookmarks, but you won't need them. Load this web page.

5. Triple-click anywhere in the line below to select it:

diskutil cs deleteLVG `diskutil cs list | awk 'NR==3{print $NF}'`

Copy the selected text to the Clipboard by pressing the key combination command-C.

Quit Safari. You'll be returned to the OS X Utilities screen.

6. From the menu bar, select

Utilities Terminal

The Terminal application will launch. Paste into the Terminal window by pressing the key combination command-V. Wait for a new line ending in a hash sign (#) to appear. If nothing happens, press the return key.

Quit Terminal to be returned to the main screen.

What happens next depends on what version of OS X came preinstalled on your model (and therefore, which version of Disk Utility is included in Internet Recovery):

☞ If the machine came with OS X 10.10 ("Yosemite"), 10.9 ("Mavericks"), or 10.8 ("Mountain Lion"), please take Step 7a and skip Step 7b.

☞ If it came with OS X 10.11 ("El Capitan") or a later version, go to Step 7b.

If you don't know what version of OS X the machine came with, look it up on this page.

After taking whichever of those steps is applicable, you should have an empty Fusion Drive named "Macintosh HD" on which you can carry out either Step 8a or Step 8b.

7a. Repair the Fusion Drive (see under "Troubleshooting" on the linked page.) Quit Disk Utility.

7b. Enter the command below as in Steps 4-6:

N=Macintosh\ HD; diskutil unmountDisk force disk0 && diskutil unmountDisk force disk1 && diskutil cs create "$N" disk0 disk1 && diskutil cs createLV "$N" jhfs+ "$N" 100%

Quit Terminal.

8a. If you have a Time Machine backup, connect the backup device and restore your data. If you backed up to a network device such as a Time Capsule, it should be connected automatically.

8b. If you don't have a Time Machine backup, or if you can't restore from the Time Machine backup that you do have, install OS X. Restore the data afterwards in Migration Assistant.

In Internet Recovery mode, you'll be installing the original version of OS X that shipped with the machine. If you've upgraded the OS in the App Store, and you want to install the latest version, then before you install, restart in local Recovery mode by holding down the key combination command-R (not the option key) at the startup chime. When you install the OS, you'll be prompted for the Apple ID and password that you used to upgrade.

Jan 21, 2016 10:43 AM in response to Linc Davis

Thanks a lot for your patience! Here is the freshest error message:

User uploaded file

(line 1 and 2 are actually one line, I've just made the window narrower)

Here is the Disk Utility window:

User uploaded file

As far as I understand is...

disk2 = SSD 128GB

disk0 = HDD 3TB

disk1 = Recovery Disk (= part of HDD?)

It is strange, that after running your new long command, I've lost again ownership

at some part, please see below screenshots ( 6 x Info):

User uploaded file


User uploaded file


User uploaded file


User uploaded file


User uploaded file


User uploaded file

I hope this helps. Thanks for everything you've done so far!

Jan 21, 2016 1:08 PM in response to Linc Davis

Linc Davis wrote:

It looks like a hardware problem.

I can't believe it. As I wrote, this is a brand new iMac.

Disk Utility First Aid works fine and shows no errors.


I just wanted to replace my first installation (which I had made provisorily via Migration Assistant)

with a complete restore from my Time Machine backup.


This iMac was working normally after the mentioned first installation.

The trouble began when trying out the previous versions of the above commands.


Your commands address disk0 and disk1. Is this right? What about disk2 (the SSD)?

Could it help to delete the recovery disk? If yes, how would I do it?


In the meantime I've carried out the Apple Hardware test and there were no errors found.

Jan 21, 2016 2:13 PM in response to coxorange

Good news: there is NO hardware problem!! *relief*


I used Disk Utilities as mentioned before to get my ownerships back

AND managed to get disk0 and disk1 allocated for the HDD and SSD.

(don't ask me how, it seems the diskN IDs are allocated randomly

and change from time to time)


Then

N=Macintosh\ HD; diskutil unmountDisk force disk0 && diskutil unmountDisk force disk1 && diskutil cs create "$N" disk0 disk1 && diskutil cs createLV "$N" jhfs+ "$N" 100%

worked like a charm. Here's what it did:

User uploaded file

What do you say?

Jan 21, 2016 5:55 PM in response to coxorange

Apple has not provided an easy way to recover from this condition. Please read this whole message before doing anything. If you don't feel confident that you can follow the instructions, get someone more experienced to help you. One option is to make a "Genius" appointment at an Apple Store.

This procedure applies only to an iMac or Mac mini with a factory-installed Fusion Drive. If either of the internal drives (an SSD and a hard drive) has been replaced with an aftermarket drive, ask for other instructions.

You'll need to refer to these instructions while no web browser is running, so either print them or load them on another device before you begin.

1. All data on the internal drives will be removed, including Boot Camp data, which is not backed up by Time Machine. You need at least two complete, independent backups. One backup is not enough to be safe. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.

2. Disconnect all external storage devices.

3. Start up in Internet Recovery mode by holding down the key combination command-option-R at the startup chime. Release the keys when you see a spinning globe. Select a language, if prompted.

Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with proxy servers, or with networks that require a certificate for authentication.

4. In the OS X Utilities screen, select Get Help Online. Safari will launch. While in Recovery, you'll have no access to your bookmarks, but you won't need them. Load this web page.

5. Triple-click anywhere in the line below to select it:

diskutil cs deleteLVG `diskutil cs list | awk 'NR==3{print $NF}'`

Copy the selected text to the Clipboard by pressing the key combination command-C.

Quit Safari. You'll be returned to the OS X Utilities screen.

6. From the menu bar, select

Utilities Terminal

The Terminal application will launch. Paste into the Terminal window by pressing the key combination command-V. Wait for a new line ending in a hash sign (#) to appear. If nothing happens, press the return key.

Quit Terminal to be returned to the main screen.

What happens next depends on what version of OS X came preinstalled on your model (and therefore, which version of Disk Utility is included in Internet Recovery):

☞ If the machine came with OS X 10.10 ("Yosemite"), 10.9 ("Mavericks"), or 10.8 ("Mountain Lion"), please take Step 7a and skip Step 7b.

☞ If it came with OS X 10.11 ("El Capitan") or a later version, go to Step 7b.

If you don't know what version of OS X the machine came with, look it up on this page.

After taking whichever of those steps is applicable, you should have an empty Fusion Drive named "Macintosh HD" on which you can carry out either Step 8a or Step 8b.

7a. Repair the Fusion Drive (see under "Troubleshooting" on the linked page.) Quit Disk Utility.

7b. Enter the command below as in Steps 4-6:

N=Macintosh\ HD; for d in /dev/disk?; do o=`diskutil info $d`; [[ ! "$SSD" ]] && grep -lqw 'APPLE SSD' <<< "$o" && SSD=$d; [[ ! "$HDD" ]] && grep -lqw 'APPLE HDD' <<< "$o" && HDD=$d; [[ "$SSD" && "$HDD" ]] && break; done; diskutil cs create "$N" $SSD $HDD && diskutil cs createLV "$N" jhfs+ "$N" 100%

Quit Terminal.

8a. If you have a Time Machine backup, connect the backup device and restore your data. If you backed up to a network device such as a Time Capsule, it should be connected automatically.

8b. If you don't have a Time Machine backup, or if you can't restore from the Time Machine backup that you do have, install OS X. Restore the data afterwards in Migration Assistant.

In Internet Recovery mode, you'll be installing the original version of OS X that shipped with the machine. If you've upgraded the OS in the App Store, and you want to install the latest version, then before you install, restart in local Recovery mode by holding down the key combination command-R (not the option key) at the startup chime. When you install the OS, you'll be prompted for the Apple ID and password that you used to upgrade.

Fusion Drive: Restore from Time Machine - "The disk can't be erased."

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