if you built it yourself, put it apart and rebuild it. Either a card is not well seated, a power cable isn't properly attached or your HDD is defective and cannot withstand shock like it should. Rebuilding should take care of the two first possibilities. If it still happens after, it might be time to RMA the hdd.
Also, make sure that there are no loose wires that could potentially short-out other components.