Patent ID: 8117419

Claim:
A storage apparatus comprising: a channel control unit that receives an I/O request to a storage device from an external device; a storage device control unit that writes or reads data to or from the storage device; a cache memory accessible from the channel control unit and the storage device control unit; an I/O processing unit that causes the storage device control unit to write or read data in response to the I/O request received by the channel control unit; a real logical device management unit that provides a real logical device which is a logical device configured of a storage area of the storage device; and a virtual logical device management unit that provides a virtual logical device which is a virtual logical device configured of a storage area of the real logical device, in a dynamic provisioning system, wherein the real logical device management unit manages the storage area of the real logical device by dividing the storage area into unit cache areas, which are predetermined management units of storage area of the cache memory, the virtual logical device management unit manages the storage area of the virtual logical device by dividing the storage area into virtual unit areas, which are predetermined management units, the I/O processing unit manages data stored in the storage device by establishing correspondence between one of the unit cache areas and a plurality of the virtual unit areas having the same data stored therein, if data of one of the unit cache areas with destage uncompleted in the cache memory is the same as data of a unit cache area with destage completed in the cache memory, the I/O processing unit establishes correspondence between one of the unit cache areas and a plurality of the virtual unit areas having the same data stored therein by causing only the data of the unit cache area with destage completed to remain in the cache memory and then making the unit cache area of the remaining data correspond to the plurality of virtual unit areas, the I/O processing unit manages the number of the virtual unit areas which are made to correspond to the unit cache area as a number of links, and if no unused storage area exists in the cache memory but a plurality of storage areas with destage completed exist in the cache memory at the time of storing data in the cache memory, reserves a storage area in the cache memory for storing the data by releasing the storage area corresponding to the unit cache area having the least number of links.