Wow... I have to second Harry's advice above about the iMac HDD Fan Control application. After taking my 21.5" iMac apart twice and making sure I replaced all the connections, I was ready to go back and install the original drive because I just couldn't tolerate the hard drive fan running at 5200 rpm all the time. My wife could hear it in the room next door.
Then I read about the temperature sensor on the Apple drive (doh)... but this application is golden. For $30 it saved me even having to open my iMac back up. And there's a DEMO! Now that's instant gratification for you. I didn't suspect this was a problem that could be solved by software. Thankfully I was wrong.