I am not sure if you can defrag or otherwise repair a drive being used for a Replay TV. What you can do is reformat it, and that might help. Keep in mind that replay drives can get a lot of use, and you might want to consider replacing the drive.
To reformat the drive, transfer any of the shows you want to keep, over to DV Archive. Then, remove the drive, and hook it up to your desktop PC.
Perform a low level format, and that may go a LONG way toward re-invigorating your drive. Other than that, chuck it, and get a new drive. They are cheap these days, and Replay TV - even with five year old models floating around - is still the best hardware in town. Just wish they had stayed around long enough to design digital tuners into them.