Mac – Impossible deactivate the disk

disk-utilityhard drivepartitiontime-machine

Some time ago I split the hard drive (500gb) in two partitions (250 each), now I have first successfully erased one partition but I still have the second one (Mac HD 2, which runs Mavericks) but I can not deactivate to erase it.

Anytime I try to remove it or deactivate it, this is the message:

"Deactivation failed, make sure that all the files and applications are closed"

Disk Utility Dialog

I am working on an other Hard Disk SSD 250 gigabyte which runs Yosemite, and I want to use the other 2 partitions for storage.

I assume that I am still using some applications and files coming from that partition and that's why I cannot proceed with the erase?

What you recommend for me to in this case? Deleting all the applications manually in the Hard Disk to make sure I am not running any of them? Is there any way to check which application(s) or file(s) are in use which causes the problem?

Best Answer

By typing the command lsof /Volumes/Mac\ HD\ 2 into the terminal, you can get a list of which apps are using that volume. The output looks like this:

enter image description here

The COMMAND column should tell you what's using your disk, and what you have to quit.

Based on your comment, it looks like the GitHub application is using your disk. Try quitting it first, then you should be able to do it.

In general, you can also use Recovery HD to safely perform disk operations without having open files spoil the fun. It has Disk Utility and you can eject the partitions that normally run OS X and have your way with them.