The bit cost of a flash memory is more expensive than that of a magnetic disk, and as such, there is a strong need to reduce the capacity of stored data and to increase apparent capacity.
Furthermore, when rewriting data, the memory characteristics of a flash memory (for example, a NAND flash memory) make it impossible to directly overwrite this data to the physical area in which this data was originally stored. In order to write new data to a physical area in which data is already being stored, it is necessary to execute a delete process in a unit called a “block”, which is the flash memory delete unit, and to write the data thereafter. For this reason, in a case where data is to be rewritten, ordinarily the new data is not written to the physical area in which this data was originally stored, but rather, the data is written to a different physical area. When data having the same write-destination logical address is written to a plurality of physical areas and a block becomes full, the latest data (valid data) inside this block is written to a different block, and a process is carried out to make this block usable (to make this block an empty block) by performing a delete process (a process for deleting the data stored in the block) with respect to a block that is full of invalid data. This process will be called a “reclamation process” hereinbelow. For this reason, in a package equipped with one or more flash memories (hereinafter, a flash package), a logical address layer that is separate from a physical address layer is provided as an address layer that appears to be outside of the flash package. A logical address, which is allocated to a physical address, is changed as needed. Furthermore, the logical address does not change when the physical address changes. For this reason, data access using the same logical address is possible from outside the flash package. Consequently, usability can be maintained.
Next, technology for reducing the capacity of stored data will be described. Generally speaking, compression technology is a typical technology for reducing the capacity of stored data. In recent years, a technology called capacity virtualization technology has become known as a technology for reducing the capacity of stored data. Capacity virtualization technology is for showing an apparatus outside the storage system (for example, the host) a virtual capacity that is larger than the physical capacity of a storage device comprising the storage system, and is realized by the storage system controller (hereinafter, the storage controller). This technology makes use of the characteristic by which the amount of data actually stored with respect to the capacity of a user-defined user volume (a logical volume as seen from the standpoint of the user) when the user is actually using the storage system seldom reaches the storage capacity (the user-defined capacity) of this user volume. That is, in a storage system that does not employ capacity virtualization technology, a defined physical capacity is allocated when a volume is defined, and in a storage system in which capacity virtualization technology is being employed, the physical capacity is first allocated when data is actually stored in the storage system. In accordance with this, the storage capacity being consumed in the storage system (the allocated storage capacity) can be reduced, and, in addition, usability can be enhanced since the user does not need to strictly define the capacity of the user volume (for example, since sufficient capacity may simply be defined).
Patent Literature 1 discloses a system in which, in a storage system comprising a storage controller coupled to a large number of flash packages, both the storage controller and the flash packages are equipped with the capacity virtualization technology. In Patent Literature 1, the capacity virtualization technology possessed by the storage controller is called the “higher-level capacity virtualization technology” and the capacity virtualization technology possessed by the flash package is called the “lower-level capacity virtualization technology” to distinguish between the two.
For this reason, the flash package can appear to the storage controller to have a larger capacity than the actual physical capacity of the flash memory. In the capacity virtualization technology, a physical storage area, which is allocated when data has been written, is called a page. In Patent Literature 1, the physical storage area allocated when data has been written is called a “page” in the higher-level capacity virtualization technology realized in accordance with the storage controller. However, the physical storage area allocated when data has been written in the lower-level capacity virtualization technology realized in accordance with the flash package is called a “block”, which is the delete unit of the flash memory. In general, the size of a page is highly diverse, but in Patent Literature 1, the size of the page is larger than the size of the block.
When it comes of a flash memory, the delete unit is generally called a “block” as mentioned above, and the read/write unit inside the block is called a “page”. Naturally, the size of the block is larger than the size of the page in a flash memory. However, in Patent Literature 1, the word “page” is not the flash memory read/write unit, but rather signifies the physical storage area allocated in accordance with the higher-level capacity virtualization technology. Furthermore, in the present specification, the word “page” also signifies the physical storage area allocated in accordance with the higher-level capacity virtualization technology rather than the flash memory read/write unit. The flash memory read/write unit will be called a “segment” in this specification.
However, a storage system according to this present invention does not necessarily have to have the higher-level capacity virtualization technology. In addition, formatting is ordinarily performed using a specific pattern (for example, all 0's) prior to storing user data in a storage device. In Patent Literature 2, the page into which the specific pattern is written at formatting time is open. In Patent Literature 1, the storage system notifies the flash memory storage device of the all 0's write destination, and the flash memory storage device exercises control such that a block is not allocated to this write destination.