Sometimes Mac OS X goes a little crazy and won’t let you eject an external drive, even after it’s no longer in use by any application. If you can’t unmount a disk even after all open applications are closed, and don’t want to restart your machine, this little Terminal trick is for you.
Simply open the Terminal, and type:
diskutil unmountDisk force /Volumes/DISK_NAME
Just replace DISK_NAME with the volume name (yes, it’s case sensitive) and you are all set!
Disclaimer: Make sure you have closed all applications that could be using the drive, and that the drive is not in use, or you could suffer data loss/corruption!