The invention discloses an SSD (
Solid State Disk)
garbage collection method and device with
RAID (Redundant Array of Independent Disk) redundancy and a medium, and relates to the technical field of
garbage collection, and the method comprises the following steps: in a
garbage collection process, selecting a target
NAND flash memory physical block of which the effective data volume meets a collection condition,
copying the effective data to a new position, and updating
address mapping; querying a first
RAID block to which the target block belongs and all member block identifiers thereof according to a first mapping table and a second mapping table which
record a mapping relationship between the
NAND flash memory physical block and the
RAID blocks; and recombining other blocks except the target block in the first RAID block into a second RAID block, recalculating and storing
verification data for the second RAID block, synchronously updating the two mapping tables to reflect a new composition relationship, and finally erasing the target block. The physical block of the
NAND flash memory is used as the minimum
recovery unit to replace the traditional
recovery mode taking the whole RAID block as the unit, and the block with the minimum effective data can be preferentially recovered, so that the effective
data migration amount is remarkably reduced, the
write amplification coefficient is reduced, the abrasion is reduced, and the service life of a hard disk is prolonged.