Mobile storage systems (MSSs) which store popular content in mobile devices can reduce the heavy traffic burden on the base station (BS). To deal with data loss caused by the mobility of devices, erasure codes are widely used in practice to improve system reliability. The duration to repair all lost data is defined the repair delay. However, the repair delay via device-to-device communications is usually large due to intermittent contacts among devices within a given communication range, which causes files to be irreparable and permanently lost. This paper focuses on analyzing the repair delay of the MSSs through D2D communications. We adopt a coded repair process running periodically and derive analytical expressions of the average repair delay by taking into account factors, i.e., limited communication range, device mobility, and coded repair scheme. Moreover, considering that devices need multipath contacts to repair lost data for large files, we propose a relay cooperation repair scheme, in which some mobile devices can act as relay nodes to transmit data cooperatively. Furthermore, we design a heuristic algorithm to optimize the number of relay devices and the amount of data allocated to each path, with the objective of minimizing the average repair delay. We find that maximum distance separable codes can yield smaller average repair delays for small files, and the average repair delay can be reduced by selecting faster moving devices to participate. With the file size increasing, the relay cooperation repair scheme can significantly improve repair efficiency in MSSs using the proposed heuristic algorithm.