The problem considered is a priori planning of spare parts inventory intended to keep operable a redundant system consisting of n identical and statistically independent elements. The system is subject to a certain mission proceeding in a number of successive time periods, called phases, during which environmental conditions and, thus, element reliabilities vary. Maintenance actions, intended to determine the system state and replace failed elements by new ones, may be performed only during overhauls between two successive phases. Spares inventories for replacement purposes are planned in advance for each overhaul assuming that spare parts remaining unused from previous overhauls can be used in succeeding ones. The mathematical model of the described system is developed in the paper and expressions for calculating relevant performances are derived. An optimization problem is stated in which the total purchase and holding costs are the criterion function and the stockout probabilities represent constraints.