Disconnecting HDs has always been a somewhat picky operation. Be they usb drives, firewire, or flash drives. When you eject a drive there are some things to remember:

1) always eject a drive if you can, before unplugging it. There are some situations you can get yourself into that prevent this, but do what you can.

2) when the drive disappears off the desktop, it's about 1 second from being 'ready' to be removed. don't yank the drive the instant it disappears off the desktop.

3) if you attempt to select or highlight a drive after starting the eject process, I guarantee it will disappear off the desktop instantly. This is a bug in Finder, and does NOT mean the drive is anywhere near ready to be removed. Once you have done this you have to take alternate steps to determine if the drive is safe for removal.

4) you can also open disk utility to eject a drive or to determine if it's safe for disconnect. Drives that have disappeared from the desktop due to (3) will still show up in disk utility's drive list until they are actually safe for removal.

5) spotlight and some other processes will lock files without really telling you about it, and will prevent eject. In those cases, they are SUPPOSED to see your first eject attempt (which fails with a warning) and then release the file so you can eject it a few seconds later. Sometimes this works as intended, and sometimes not.

6) sometimes Finder won't eject a drive. In some of those cases, it will say it can't eject it, and in other cases it just doesn't appear to DO anything. In most cases, something on the drive is in use. This could be from a wide variety of things. Word, Excel, and many other apps leave locks on files after closing them, and you may have to quit their application to release a drive - I have this issue frequently with Excel and spreadsheets on my flash drive. Spotlight is notorious for locking drives for extended periods of time without your consent even after you have attempted to eject a drive. In some cases I've gone into activity monitor and force quit processes that were locking a drive to eject it. More than once I've gotten into a fight with spotlight that kept respawning mds new processes and attacking the drive again before I could eject it.

If you do pull a drive when you shouldn't, and get the warning, the drive will remember it was not cleanly dismounted, and fsck will run automatically the next time you connect the drive. Depending on the amount of data on the drive, fsck may take up to a couple minutes to run, during which time you may see activity on the drive's light but the volume will not appear on the desktop. Don't pull the drive and try to plug it back in again, you'll only get the warning again.

If I get the warning, I usually plug the drive back in again and try again for a clean eject. That way I don't have to wait on fsck next time I go to use it.

You can use terminal to find out what has a lock on your files, which may or may not help you. In terminal,

sudo lsof | grep "volumename"

That should tell you all the open files on the drive, and the name of the process that has them open. This might tell you what has them locked. The wildcards are "mds" (which is spotlight) and "Finder". I have no idea why Finder sometimes has my files locked, but in those cases I force quit Finder and when it releaunches I'm able to eject the drive. Short of killing the mds processes in Activity Monitor, there's no easy way to get Spotlight to let go of a drive. Sometimes when you do, they respawn and jump in again which is really annoying.

If the computer is having problems ejecting a drive, and you have attempted to select it, and made it disappear, it sometimes will reappear on the desktop a few seconds later, often with the "can't eject it right now" message.