For the warm standby repairable system with two types of components, this paper introduces the retrial characteristics of components and unreliable repair facility into the system, and establishes a new system reliability and cost model based on the priority in use rule. Failed components are repaired by an unreliable repair facility. The repair facility may partially breakdown in normal busy state, then it can be immediately repaired with a certain probability or continue to provide service for failed components at a lower efficiency with a certain probability. The repair facility may occur completely breakdown during partially breakdown idle or busy state, and it will be immediately repaired after completely breakdown. Due to the random volatility of the maintenance environment, the PH distribution is used to model the repair time of failed components, which extends the applicability of the model to a certain extent. Some system steady-state performance indices are obtained by probability discussion, the expected total cost function per unit time of system is constructed, and the sensitivity of the expected total cost to each parameter is analyzed. The effect of various parameters on the steady-state performance indices and cost of the system is demonstrated by numerical results, which provides theoretical support and reference for system reliability designers and decision makers.