There is an option "Put the hard disk(s) to sleep when possible" in Mac OS X's preferences:

Is it possible to configure which disks Mac OS X can put into a sleepy state? For example, I want to leave only the drives which are installed in my laptop, but not the drives that are connected via USB. How can I reach this?

System starts working veeery slow, Finder doesn't open at all after Mac OS sent the external harddrive to sleep. The only solution is to unsafely eject a USB-cable from MacBook.
–
Sunny Reborn PonyMay 6 '13 at 16:05

It is too hard for me to find the reason of this issue.So it would be much easier to configure which disks the system can put into sleep.
–
Sunny Reborn PonyMay 9 '13 at 19:40