USB External Drive Ejects For No Reason
I have a 1 TB hard drive (the internal from my old G5) in a USB enclosure. Recently, starting a few weeks ago, it has been ejecting from the desktop while the computer (iMac 2011) is asleep. When I wake the iMac I get a message saying that the drive was put away improperly which could damage it (words like that). I need the drive to be permanently connected (but asleep is OK) so that an operation can be carried out while the iMac sleeps. I have looked at System Prefs but there seems no setting there which would cause this. I have to switch it off then on again to get it to mount.
Mountain Lion 10.8.5
How can I get it to remain mounted please?