Patent attributes
Multi-granular deduplication is performed on I/O data received at a storage system as part of replicating the I/O data to another storage system. Deduplication may be performed in an iterative fashion, for example, on blocks and smaller and smaller sub-blocks of the I/O data. Deduplication may be performed on blocks and smaller sub-blocks by comparing each block or sub-block to preceding blocks or sub-blocks, respectively, in the I/O data to determine if there is a duplicate. If a duplicate block of sub-block is determined for a block or sub-block, the block or sub-block may be replaced in the I/O data with a reference to the duplicate block or sub-block in a deduplication header for the block. A metadata structure may indicate which blocks of the I/O data have had deduplication performed thereon. The replicating storage system may use the metadata structure and deduplication block headers to restore the I/O data.