A method of eliminating duplicated data by a storage apparatus in cooperation with a host apparatus in a storage system comprising the storage apparatus and the host apparatus, the storage apparatus comprising a first storage unit, a second storage unit, a first comparison module, a block identifier generation module, and a first control module, and the host apparatus comprising a first cache, a second cache, a second comparison module, and a second control module, the method comprising:
- causing the second comparison module to compare each of the block data items constituting data to be written into the storage apparatus with block data items stored in the first cache when a write request for the writing has been generated at the host apparatus, the data to be written into the storage apparatus being processed in block data items;
- causing the second control module to transmit a first-type write request including a first block data item and a first address of the first block data item to the storage apparatus when the result of comparison by the second comparison module has shown that the first block data item has coincided with none of the block data items stored in the first cache, the first block data item being included in the data to be written,
- causing the first comparison module to compare the first block data item with the block data items stored in the first storage unit when the storage apparatus has received the first-type write request;
- causing the block identifier generation module to generate a first block identifier unique to the first block data item when the result of comparison by the first comparison module has shown that the first block data item has coincided with none of the block data items stored in the first storage unit;
- causing the first control module to store the first block identifier and the first block data item in the first storage unit such that the first block identifier and the first block data item are associated with each other;
- causing the first control module to store the first address and the first block identifier in the second storage unit such that the first address and the first block identifier are associated with each other,
- causing the first control module to transmit the first block identifier as a completion response to the first-type write request to the host apparatus after the first control module has stored the first block identifier and first block data item and the first address and first block identifier;
- causing the second control module to store the first block identifier and the first block data item in the first cache such that the first block identifier and the first block data item are associated with each other when the host apparatus has received the first block identifier as the completion response to the first-type write request;
- causing the second control module to store the first address and the first block identifier in the second cache such that the first address and the first block identifier are associated with each other when the host apparatus has received the first block identifier as the completion response to the first-type write request;
- causing the second control module to transmit a second-type write request including a second block identifier stored in the first cache in such a manner that the second block identifier corresponds to any one of the block data items stored in the first cache and a second address of the second block data item to the storage apparatus when the result of comparison by the second comparison module has shown that the second block data item has coincided with any one of the block data items stored in the first cache, the second block data item being included in the data to be written;
- causing the first control module to store the second address and the second block identifier in the second storage unit such that the second address and the second block identifier are associated with each other when the storage apparatus has received the second-type write request;
- causing the first control module to transmit a completion response to the second-type write request to the host apparatus after the first control module has stored the second address and second block identifier;
- and
- causing the second control module to store the second address and the second block identifier in the second cache in such a manner that the former corresponds to the latter according to a completion response to the second-type write request.