Since the original drive was replaced by a new one on a Mac G5 PowerPC (original drive : Maxtor 160 Gb. S-ATA / new drive : Western Digital 500 Gb. S-ATA), the computer detect randomly or not at all the new hard disk.
The solution is to limit the drive speed operation to S-ATA 150 instead of S-ATA 300. To achieve that, just put a jumper on pins 5 and 6.