Patent ID: 8868864

Claim:
A storage apparatus comprising: a plurality of storage media, wherein at least two storage media are set as a data write destination and at least one storage medium other than the storage media set as a data write destination is set as a spare; and one or more processors configured to perform a procedure including: writing input data to a storage medium set as a data write destination; counting the number of write operations performed on each of the plurality of storage media; selecting a second storage medium as a target of replacement, wherein a difference between the number of write operations of a first storage medium set as a data write destination and the number of write operations of the second storage medium set as a data write destination is smaller than a difference between the number of write operations of the first storage medium, and a value determined based on the number of write operations of a third storage medium set as a spare and the number of write operations occurring at the time of copying of data within the second storage medium to the third storage medium; copying the data stored in the second storage medium selected as a target of replacement to the third storage medium; and changing the setting of the second storage medium to a spare and the setting of the third storage medium to a data write destination.