Problem with my steam games

I have 2 hard disk inside my gaming rig, on the secondary 1tb HHD the games I had installed are not showing as installed. However, when I go into the steam directory in the drive, they all are there and I can launch them from the file, also when I try to reinstall them it say there is not enough space on the drive, however when I look at the drive form windows it displays around 540gbs free. I have tried defragmentation, disk checking and browsing countless fourms with no result.