If unable to unmount drive on macOS

You can try booting from OS X recovery by holding CMD + R at the time of startup. Once booted from OS X recovery, select Terminal from the utilities and then at the unix prompt enter:

  • diskutil list
  • then press return and look for the disk identifier and enter the following command with the disk identifier

sudo diskutil unmountDisk /dev/(enter here disk identifier name)

  • Press return and enter your admin password if prompted. This should unmount all volumes of the physical drive.
  • If still the above method didn’t work, then the last option is to force the entire disk to unmount.
  • For that using the terminal application again, enter the following command:

sudo diskutil unmount force /dev/(enter here disk identifier name)

  • Then press return and enter the admin password if prompted. This will definetely unmount the entire disk and all its related volume.