Provided are techniques for spare device management. Candidate devices are
sorted into spare coverage groups by type. One or more candidate devices
having closest fitting characteristics of a desired type are identified
from the spare coverage groups. The identified one or more candidate
devices are assigned to be spare devices for the spare coverage group. It
is determined whether a desired number of spare devices have been
assigned to the spare coverage group. In response to determining that the
desired number of spare devices have not been assigned, a spare device
having the closest fitting characteristics for every predetermined number
of candidate devices having the closest fitting characteristics is
assigned, until the desired number of spare devices having the closest
fitting characteristics are assigned.