  We consider distributed storage (DS) for a wireless network where mobile
devices arrive and depart according to a Poisson random process. Content is
stored in a number of mobile devices, using an erasure correcting code. When
requesting a piece of content, a user retrieves the content from the mobile
devices using device-to-device communication or, if not possible, from the base
station (BS), at the expense of a higher communication cost. We consider the
repair problem when a device that stores data leaves the network. In
particular, we introduce a repair scheduling where repair is performed (from
storage devices or the BS) periodically. We derive analytical expressions for
the overall communication cost of repair and download as a function of the
repair interval. We illustrate the analysis by giving results for maximum
distance separable codes and regenerating codes. Our results indicate that DS
can reduce the overall communication cost with respect to the case where
content is only downloaded from the BS, provided that repairs are performed
frequently enough. The required repair frequency depends on the code used for
storage and the network parameters. In particular, minimum bandwidth
regenerating codes require very frequent repairs, while maximum distance
separable codes give better performance if repair is performed less frequently.
We also show that instantaneous repair is not always optimal.
