OS X determine which application is accessing a HDD and preventing ejection?
sudo lsof | grep /Volumes/External, where "External" would be the name of your external drive. Are you hosting any services' data off of that drive?
lsof - List of open files
At your command promt just type
sudo lsof to see a list of open files and their location and process id so that you can kill the process.
To refine it a little bit you could use
sudo lsof | grep hard drive name.
Once you have the pid
sudo kill -9 pid to kill the naughty process.
Easy way, the freeware "What's Keeping Me": http://www.hamsoftengineering.com/products/wkm/wkm.html