You should never change that setting (AHCI vs IDE) once an operating system is installed. It will mess up your installation badly. Just leave it at AHCI.
All the advice in here should give you a hand, I just add another layer of troubleshooting.
After reading everything and considering how thorough you have done everything, I would like to suggest that it may also be a setting in the BIOS, try seeing if there is a RAID setting that is enabled and disable it.
How you can test, unplug /dev/sda, plug the 1TB into that controller, boot a liveCD and see if it picks up the drive correctly.
Also, make sure all your SATA cables are new/undamaged, try another cable, you should have some lying around. SATA cables cannot bend like the old IDE cables, so a sharp bend in the cable can cause headaches.
Now for the technical part:
If it is not the controller, and you have ruled out any hardware problems (different controllers, different cables, unplugging everything and only leaving the drives attatched, etc.), you need to find out why the system does not release or recognise the drive.
If this does not help, how old is the drive? Try and see if you can test another drive to make sure it is not the drive that is causing the errors.
sudo su # This will give you a permanent superuser session, everything you need to do is going to be as root so this is easier, otherwise you need to type sudo before each command
cffdisk /dev/sdb # This is much easier to use than fdisk and the chances that you will make a mistake minimal
# Create new primary partition and set the filetype, write changes to disk
mkfs.ext4 /dev/sdb1 # Format the drive ext4 filesystem. See if any errors are reported
mkdir /opt/data # Create the mount path
mount /dev/sdb1 /opt/data # If it succeeds or fail, does not matter, check you logs
dmesg | tail # If something is wrong it should be mentioned here
cat /var/log/errors.log | tail # Check the timestamp and see if there are any errors
cat /var/log/kernel.log | tail # Same, see corresponding timestamp and see if there are any kernel errors
This is a mouthful, hope you get everything sorted!