BACKGROUND

Data storage systems are arrangements of hardware and software in which storage processors are coupled to arrays of non-volatile storage devices, such as magnetic disk drives, electronic flash drives, and/or optical drives. The storage processors service storage requests arriving from host machines (“hosts”), which specify blocks, files, and/or other data elements to be written, read, created, deleted, etc. Software running on the storage processors manages incoming storage requests and performs various data processing tasks to organize and secure the data elements on the non-volatile storage devices.

Some storage systems store data across a plurality of drives using striping techniques, such as Redundant Array of Independent Disk (RAID) technology. Mapped RAID techniques allow stripes of N disk extents to be dynamically spread across M disks, M>N. Particular extents can be rearranged or rebuilt onto different disks as needed.

SUMMARY

Unfortunately, in a conventional storage system, failure of a disk can leave the system degraded. It is possible to keep a hot spare in a RAID configuration or a set of spare extents in a Mapped RAID configuration available for rebuilding in case a single disk fails. However, it is generally not efficient to reserve enough spares to deal with the failures of two or three or more drives. Nevertheless, even if space is not reserved, there may be space allocated to stripes which are actually empty. Some of those empty allocated stripes may, in fact, be necessary for garbage collection or other reasons. Thus, it may not be possible or advisable to use the extents of those empty allocated stripes to rebuild a failed drive onto once the spare extents have been exhausted.

Thus, it would be desirable to allow reclamation of already-allocated empty stripes for use in performing rebuilds. This may be accomplished by applying a set of decision criteria to decide whether to permit reclamation of already-allocated stripes, and reclaiming a stripe for use in rebuilding a failed drive only if the decision criteria permit doing so. In some embodiments, the decision criteria may balance the threat of future data loss due to not rebuilding against the need to prevent resource unavailability at the present due to a lack of sufficient allocated stripes to use for garbage collection and data intake.

In one embodiment, a method of rebuilding a failed drive of a plurality of drives is provided. The method includes (a) determining a number of empty data stripes that have been allocated from the plurality of drives; (b) applying a set of decision criteria to the determined number to yield a decision, wherein applying the set of decision criteria yields a first decision at a first time and a differing second decision at a second time; (c) in response to the first decision at the first time, deallocating an empty data stripe that was allocated from the plurality of drives to yield a plurality of data extents on disparate drives of the plurality of drives and continuing to rebuild the failed drive onto at least one of the plurality of data extents; and (d) in response to the second decision at the second time, pausing rebuilding the failed drive until applying the set of decision criteria yields the first decision. An apparatus, system, and computer program product for performing a similar method are also provided.

The foregoing summary is presented for illustrative purposes to assist the reader in readily grasping example features presented herein. However, the foregoing summary is not intended to set forth required elements or to limit embodiments hereof in any way.

