Patent attributes
A method is used in managing data in a data storage system. A first set of flash drives in arranged into a redundant array of independent disks (RAID) group and a wear indicator for each of the flash drives in the first set of flash drives is determined. A second set of flash drives are configured, where the second set of flash drives are configured as spare flash drives and a wear metric is determined for each of the flash drives in the second set of flash drives. A first flash drive in the first set of flash drives that is to be replaced is identified. A spare flash drive from the second set of flash drives is selected, where the spare flash drive is selected based on a wear metric. A rebuild process is initiated where the first flash drive is replaced with the selected spare flash drive.