To resolve the hard drive auto-eject issue, tweak the power management settings of Mac, as shown here:
• Go to Finder > Applications > Utilities > Terminal.
• On Terminal, type “pmset –g | grep disksleep” and hit Return.
• Check the value of disksleep. If it is low, provide a significant number.
• Type “sudo pmset –a disksleep #” (here, replace # with a suitable number) and hit Return.
• Provide the admin password when prompted.
• Check the changed sleep value using the “pmset –g | grep disksleep” command.
The above solution will fix the drive auto-eject problem. Now, use the hard drive to save and access data as usual.