A method for releasing storage space in first and second storage devices, wherein updates to the first storage are copied to the second storage device to provide secondary storage for the updates, wherein first and second tables map data sets to addresses in the first and second storage devices, respectively, comprising:
- detecting a first command to invalidate data sets in the first table, wherein the addresses in the first table comprise virtual addresses, and wherein a third table provides a mapping of the virtual addresses to physical storage locations in the first storage device;
- generating a second command to update the second table to invalidate the data sets in the second storage device invalidated in the first table by the first command;
- detecting a third command to invalidate the virtual addresses in the third table used by the data sets invalidated in the first table to free the physical storage locations in the first storage device pointed to by the invalidated virtual addresses;
- and
- generating a fourth command directed to the physical storage locations in the second storage device used by the invalidated data sets.