Patent ID: 8898384

Claim:
A data storage system comprising: at least one storage device; and a controller, comprising a cache memory and configured to manage a capacity pool comprising a plurality of storage regions and provide a plurality of virtual volumes having a plurality of virtual areas, wherein one or more of the plurality of the storage regions are allocated to each of a plurality of first virtual areas in a first virtual volume of the plurality of virtual volumes from the capacity pool, wherein a compression function is not enabled for the first virtual volume of the plurality of virtual volumes, the number of the allocated one or more storage regions is a first value, and wherein when the compression function is changed from being not enabled to being enabled for the first virtual volume of the plurality of virtual volumes, the controller is further configured to: store data read from the allocated one or more storage regions to the cache memory for each of the first virtual areas in the first virtual volume of the plurality of virtual volumes; compress the data in the cache memory for each of the first virtual areas in the first virtual volume of the plurality of virtual volumes; decide whether to store the data in a compressed form for a particular first virtual area of the first virtual areas in the first virtual volume of the plurality of virtual volumes based on the compression step in the cache memory; if the controller decided to store the data in the compressed form for the particular first virtual area, change the number of the allocated one or more storage regions, which are allocated to the particular first virtual area, to be smaller than the first value; and if the controller decided not to store the data in the compressed form, maintain the number of the allocated one or more storage regions, which are allocated to the particular first virtual area.