Since the late 2009 iMacs came out, replacing the hard drive has caused the internal Hard Drive Fan to start running at around 6000RPM.
This is due to Apple replacing the external Hard Drive temperature sensor with a proprietary firmware and using the drives internal sensor.
Replacement drives do not contain the firmware to deliver temperature data on the temperature sensor cable.
When the iMac does not receive a good signal from the hard drive it puts the fan at full speed to protect the drive.
If you replace your drive, your iMac will initially seem fine, but soon the fan will begin to speed up to full speed. Resetting the SMC (System Management Controller) will have a temporary effect, but again the fan will speed up.
Both these fixes are less then perfect and leave the drive in a dangerous situation with no protection from overheating.
Another option people try is other Fan Control software. These programs will not work for this particular issue as they often only control the base speed, and if they do control the fans actual speed they rely on the temperature reported by the sensor which is now incorrect.
HDD Fan Control works to fix this issue by reading the drives internal temperature using the S.M.A.R.T protocol and set the fans actual speed to a value good to protect the drive.
It runs at startup and continually to always control the fan correctly, prevent the loud fan noise and protect the drive from overheating.