There is a growing need to connect a large amount of renewable energy (RE), such as photovoltaic (PV) systems, to the power grid for solving the environmental problem. However, an electricity grid with RE occurs problems of power shortage and surplus due to uncertainty in generation RE output. In addition, grid failures may increase the impact of power shortage and surplus so it is necessary to build a fault tolerant renewable energy system. Energy storage systems (ESSs) can be used to solve supply reliability problems, but the amount of installed ESSs should be minimized considering its high cost. This paper demonstrates that the optimal allocation of PV and ESSs can be achieved to minimize the amount of the ESSs whilst satisfying the PV installation target and the constraints of the supply reliability indices for power shortage and power surplus in the event of a grid failure. By simulating optimal power flow in the IEEE reliability test system, the optimization problem for allocating PV and ESSs is solved by genetic algorithm in this paper. The result shows that PV and ESSs are allocated in each bus satisfying the PV installation target and the constraints of the supply reliability and achieving.