WO2015097739A1 - ストレージ装置及びその制御方法 - Google Patents

ストレージ装置及びその制御方法 Download PDF

Info

Publication number
WO2015097739A1
WO2015097739A1 PCT/JP2013/084438 JP2013084438W WO2015097739A1 WO 2015097739 A1 WO2015097739 A1 WO 2015097739A1 JP 2013084438 W JP2013084438 W JP 2013084438W WO 2015097739 A1 WO2015097739 A1 WO 2015097739A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
area
address
cache
cache device
Prior art date
Application number
PCT/JP2013/084438
Other languages
English (en)
French (fr)
Inventor
悠二 伊藤
定広 杉本
和衛 弘中
山本 彰
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2013/084438 priority Critical patent/WO2015097739A1/ja
Publication of WO2015097739A1 publication Critical patent/WO2015097739A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/31Providing disk cache in a specific location of a storage system
    • G06F2212/312In storage controller
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/40Specific encoding of data in memory or cache
    • G06F2212/401Compressed data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7208Multiple device management, e.g. distributing data over multiple flash devices

Definitions

  • the present invention relates to a storage device that compresses and stores data.
  • the storage device compresses and stores data in a final storage medium such as a hard disk used for storing data
  • a final storage medium such as a hard disk used for storing data
  • the size after compression of the data before update may differ from the size after compression of the data after update, especially when the size after compression of the data after update is larger than the size after compression of the data before update. This is because data cannot be written in the area where data is stored. Therefore, when compressing and storing data in the final storage medium, when storing the updated data, the data updated from the final storage medium is once read into the cache (staging), and the data is expanded and expanded. It is necessary to devise methods such as generating compressed data after updating by merging the updated data and update data and then compressing, and then destageing the updated compressed data again to the final storage device become.
  • the load on the storage controller increases due to processing such as staging, merging, and destage of the pre-update data, and the write performance decreases.
  • An object of the present invention is to reduce the load on the storage controller.
  • the storage apparatus of the present invention employs a configuration in which data is additionally written to the final storage medium when the data requested to be written by the host computer is compressed and stored in the final storage medium.
  • mapping information between a write position (address) of data requested to be written from the host computer and an address on the final storage medium storing the data is managed.
  • the storage location on the final storage medium of the data for which the read request is made is specified based on the mapping information, and the data is read from the final storage medium. Decompress and transfer to the host computer.
  • the storage device of the present invention reads the data of a predetermined size area from the final storage medium at a time in order to delete the pre-update data remaining in the final storage medium, and finally stores only the latest update data among the read data. Garbage collection to write back to the medium. At this time, a part of the garbage collection process is performed by the cache device mounted on the storage device, thereby reducing the load on the storage controller.
  • post-update compressed data is additionally written to the final storage medium of the storage device, so that processing such as staging and merging of pre-update data is unnecessary, and an increase in the load on the storage controller is suppressed. Can do. Further, by offloading a part of the garbage collection processing to a cache device provided in the storage device, the load on the storage controller can be reduced and the write performance during compression can be improved.
  • FIG. 1 is a diagram illustrating an example of a configuration of a storage apparatus according to an embodiment of the present invention.
  • FIG. 2 is a diagram illustrating an example of the configuration of the cache memory according to the embodiment of the present invention.
  • FIG. 3 is a diagram schematically illustrating the concept of association between the logical areas LBA0 and LBA1 provided to the storage controller by the cache memory according to the embodiment of the present invention and the physical area PBA.
  • FIG. 4 is a diagram showing the contents of the LBA0-PBA conversion table and the LBA1-PBA conversion table managed by the cache memory according to the embodiment of the present invention.
  • FIG. 5 is a diagram showing a write command and response information to the write command supported by the cache memory according to the embodiment of the present invention.
  • FIG. 6 is a diagram showing a read command and its response information supported by the cache memory according to the embodiment of the present invention.
  • FIG. 7 is a diagram showing an LBA1 mapping command and its response information supported by the cache memory according to the embodiment of the present invention.
  • FIG. 8 is a diagram showing an LBA0 mapping command and its response information supported by the cache memory according to the embodiment of the present invention.
  • FIG. 9 is a diagram showing a mapping release command and its response information supported by the cache memory according to the embodiment of the present invention.
  • FIG. 10 is a conceptual diagram showing the relationship between the volume and the cache provided by the storage apparatus according to the embodiment of the present invention to the host computer.
  • FIG. 11 is a diagram showing an example of an address mapping table.
  • FIG. 12 is a diagram illustrating an example of the cache management table.
  • FIG. 13 is a diagram illustrating an example of the compression information management table.
  • FIG. 14 is a diagram showing an example of a free list.
  • FIG. 15 is a diagram showing an example of the area management table.
  • FIG. 16 is a diagram showing a garbage collection request command and its response information supported by the cache memory according to the embodiment of the present invention.
  • FIG. 17 is a diagram showing a flow of garbage collection processing by the storage apparatus according to the embodiment of the present invention.
  • FIG. 18 is a diagram illustrating a flow of garbage collection processing executed by the cache memory according to the embodiment of the present invention.
  • FIG. 1 is an example of a configuration of a storage system according to an embodiment of the present invention.
  • This system is composed of the storage apparatus 10 and the host computer 40.
  • the storage apparatus 10 and the host computer 40 are connected by a network 20 such as a SAN (Storage Area Network) or a LAN (Local Area Network).
  • a network 20 such as a SAN (Storage Area Network) or a LAN (Local Area Network).
  • the storage device 10 includes a storage controller 100, a cache 126, and a plurality of final storage devices 190 such as HDDs.
  • the storage controller 100 includes an interface controller 100 of the network 20, a CPU (processor) 120 that controls the operation of the entire storage apparatus 10, a cache memory having a compression / decompression function (hereinafter also abbreviated as “cache”) 126, and a final An interface controller 150 with a storage device 190 is provided, and these are connected by an ASIC 140 via a dedicated internal bus 160 such as PCI.
  • Various processes of the storage apparatus 10 are executed by the CPU 120, and a memory 130 for storing the control program, control data, and the like is connected to the ASIC 140 by a memory bus 180.
  • the ASIC 140 includes a DMA (Direct Memory Access) that transfers data on the memory 130 without using the CPU 120.
  • the storage controller 100 is connected to the final storage device 190 via the bus 170.
  • DMA Direct Memory Access
  • Data read / written by the host computer 40 is stored in the cache 126 and can be accessed at high speed.
  • the cache 126 is a kind of device having a compression / decompression function, and compresses and decompresses data in the final storage device 190 having no compression / decompression function.
  • the cache memory 126 may be referred to as a “cache device”.
  • the storage apparatus 10 compresses data inside the cache 126 and writes (destages) the compressed data to the HDD that is the final storage medium 190.
  • the cache memory 126 in the embodiment of the present invention uses a flash memory as a storage medium.
  • the cache memory 126 includes an FM controller (FM CTL) 410 and a plurality (for example, 32) of FM 420.
  • the FM controller 410 includes a processor 415, a RAM (DRAM) 413, a data compression / decompression unit 418, a parity generation unit 419, a data buffer 416, an I / O interface (I / F) 411, an FM interface 417, and data.
  • a switch 414 is provided for mutual transfer.
  • the I / O interface 411 is connected to the internal switch 122 included in the storage controller 100 in the storage apparatus 10 and is connected to each part of the flash controller 410 via the switch 414.
  • the I / O interface 411 is for receiving various commands for the cache memory 126 from the CPU 120 included in the storage controller 100 or for transferring data.
  • the processor 415 is connected to each part of the FM controller 410 via the switch 414 and controls the entire FM controller 410 based on the program and management information recorded in the RAM 413.
  • the data buffer 416 is used for temporarily storing data in the middle of data transfer processing in the flash controller 410.
  • the FM interface (I / F) 417 is connected to the FM 420 by a plurality of buses (for example, 16). A plurality (for example, 2) of FM 420 is connected to each bus.
  • the data compression / decompression unit 418 has a function of processing a lossless compression algorithm.
  • the data compression / decompression unit 418 compresses data that comes from the I / O interface 411 and is written to the FM 420 according to an instruction from the processor 415, or decompresses data that is sent from the FM 420 to the I / O interface 411.
  • the data compression / decompression unit may be implemented as a logic circuit, or a similar function may be realized by processing a compression / decompression program by the processor 415.
  • the parity generation unit 419 has a function of generating parity, which is redundant data required in the RAID technology. It has a function to generate Diagonal Parity calculated by the Reed-Solomon code used or the EVENODD method.
  • the switch 414, the disk interface 411, the processor 415, the data buffer 416, the FM interface 417, the data compression / decompression unit 418, and the parity generation unit 419 described above are one semiconductor element as an ASIC or FPGA (Field Programmable Gate Array). It may be configured in a plurality, or a plurality of individual dedicated ICs (Integrated Circuits) may be connected to each other.
  • ASIC Application Specific integrated circuit
  • FPGA Field Programmable Gate Array
  • the RAM 413 is specifically a volatile memory such as a DRAM.
  • the RAM 413 stores management information of the FM 420 used in the flash module 110, a transfer list including transfer control information used by each DMA, and the like.
  • a part or all of the role of the data buffer 416 for storing data may be included in the RAM 413 and the RAM 413 may be used for data storage.
  • FIG. 2 a configuration in which a flash memory is installed in the cache memory 126 is described.
  • the storage medium installed in the cache memory 126 is limited to the flash memory.
  • Phase Change RAM or Resistance RAM may be used.
  • a configuration may be adopted in which part or all of the FM 420 is a volatile RAM (DRAM or the like).
  • the cache 126 in this embodiment is equipped with a plurality of FM (FM chips) 420, manages a storage area composed of a plurality of blocks and a plurality of pages, and is connected to the storage controller 100 (CPU 120) to which the cache 126 is connected.
  • FM FM chips
  • a logical storage space is provided.
  • the cache 126 “provides storage space” means that each area on the storage space of the cache 126 is assigned an address, and the CPU 120 of the storage controller 100 to which the cache 126 is connected specifies the address. By issuing the access request (command), it means that the data stored in the storage space area specified by the address can be referred to and updated.
  • the physical storage area configured by the FM 420 is managed in a manner uniquely associated with an address space used only within the cache 126.
  • the physical area designating address space (physical address space) used only inside the cache 126 is referred to as a PBA (Physical Block Address) space, and each physical storage area (sector in the PBA space.
  • PBA Physical Block Address
  • each physical storage area (sector in the PBA space is 512 bytes.
  • the cache 126 of this embodiment manages the association between this PBA and an LBA (Logical Block Address) that is the address of the area of the logical storage space provided to the storage device.
  • LBA Logical Block Address
  • the cache 126 of this embodiment has two logical storage spaces, and provides two logical storage spaces to the storage controller 100 to which the cache 126 is connected.
  • the relationship between the two logical storage spaces LBA and PBA will be described with reference to FIG.
  • FIG. 3 is a diagram illustrating a concept of association between the LBA0 space 701 and the LBA1 space 702, which are logical storage spaces provided to the storage controller 100 by the cache 126 of this embodiment, and the PBA space 703.
  • the cache 126 provides two logical storage spaces, an LBA0 space 701 and an LBA1 space 702.
  • the addresses assigned to the storage areas on the LBA 0 space 701 are referred to as “LBA 0” or “LBA 0 address”
  • the addresses assigned to the storage areas on the LBA 1 space 702 are referred to as “LBA 1”.
  • LBA1 address the addresses assigned to the storage areas on the LBA 1 space 702 are referred to as “LBA 1”.
  • the size of the LBA0 space 701 and the size of the LBA1 space 702 are both equal to or smaller than the size of the PBA space. However, even when the size of the LBA0 space 701 is larger than the size of the PBA space, The invention is effective.
  • the LBA0 space 701 is a logical storage space for allowing the CPU 120 of the storage controller 100 to access the compressed data recorded in the physical storage area configured by the FM 420 as uncompressed data.
  • the CPU 120 designates an address (LBA0) on the LBA0 space 701 and issues a write request to the cache 126
  • the cache 126 acquires write data from the storage controller 100 and compresses it by the data compression / decompression unit 418.
  • Data is recorded in the physical storage area on the FM 420 specified by the PBA dynamically selected by the cache 126, and the LBA 0 and the PBA are associated with each other.
  • the cache 126 acquires data (compressed data) from the physical storage area of the FM 420 indicated by the PBA associated with LBA0, and compresses / decompresses the data. After decompression by the unit 418, the decompressed data is transferred to the storage controller 100 as read data.
  • the association between LBA0 and PBA is managed by an LBA0-PBA conversion table described later.
  • the LBA1 space 702 is a logical storage space for allowing the storage controller 100 to access the compressed data recorded in the physical storage area configured by the FM 420 as it is (not expanded).
  • the cache 126 acquires data (compressed write data) from the storage controller 100, and the PBA dynamically selected by the cache 126 is acquired. Data is recorded in the storage area of the FM designated by, and LBA1 and PBA are associated with each other. Further, when the CPU 120 issues a read request specifying LBA1, the cache 126 acquires data (compressed data) from the physical storage area of the FM 420 indicated by the PBA associated with LBA1, and sends it to the storage controller 100 as read data. Transfer compressed data.
  • the association between LBA1 and PBA is managed by an LBA1-PBA conversion table described later.
  • the area on the PBA space which is the physical storage area in which the compressed data 713 is recorded, may be associated with both the LBA0 space area and the LBA1 space area at the same time.
  • the decompressed data of the compressed data 713 is associated with the LBA0 space as the decompressed data 711, and the compressed data 713 is directly associated with the LBA1 space as the compressed data 712.
  • the CPU 120 specifies LBA0 (assuming LBA0 is 0x000000011000) and writes data to the cache 126, the data is compressed by the data compression / decompression unit 418 in the cache 126, and the compressed data is stored in the cache 126.
  • the data is managed in a state associated with the address 0x000000011000 of the LBA0 space.
  • the CPU 120 issues a request (“LBA1 mapping command” described later) for associating the data associated with 0x000000011000 with the address of the LBA1 space (assumed to be 0x80000000010) to the cache 126, this data also accommodates the LBA1 space.
  • the CPU 120 When the CPU 120 issues a request (read command) for reading the data at the LBA1 address 0x80000000010 to the cache 126, the CPU 120 can read the data written to the LBA0 address 0x000000011000 in a compressed state. I can do it.
  • the size of the compressed data generated by the cache 126 in the embodiment of the present invention is limited to a multiple of 512 bytes (1 sector), and does not exceed the size of the uncompressed data. . That is, when 4 KB data is compressed, the minimum size is 512 bytes and the maximum size is 4 KB.
  • LBA0-PBA conversion table 810 and the LBA1-PBA conversion table 820 which are management information used for control by the cache 126 in this embodiment, will be described with reference to FIG.
  • the LBA0-PBA conversion table 810 is stored in the DRAM 413 in the cache 126, and includes information on the cache LBA0 (811), the cache PBA (812), and the PBA length (813).
  • the processor 415 of the cache 126 receives the LBA 0 specified at the time of the read request from the host device, and then uses the LBA 0 to acquire the PBA indicating the location where the actual data is stored.
  • the cache 126 records the update data (write data) in a physical storage area different from the PBA in which the pre-update data is recorded, and the PBA and PBA length in which the update data is recorded are stored in the LBA0-PBA conversion table.
  • the data is recorded in the corresponding portion of 810, and the LBA0-PBA conversion table 810 is updated.
  • the cache 126 operates in this manner, thereby enabling (pseudo) overwriting of data in the area on the LBA0 space.
  • the cache LBA0 (811) is a logical area of the LBA0 space provided by the cache 126 arranged in order in units of 4 KB (each address (LBA0) in the LBA0 space is assigned to each sector (512 bytes). )
  • LBA0 each address (LBA0) in the LBA0 space is assigned to each sector (512 bytes).
  • LBA0 address
  • PBA cache PBA
  • the association between the cache LBA0 (811) and the cache PBA (812) may be managed in an arbitrary unit other than the 4 KB unit.
  • the cache PBA (812) is a field for storing the head address of the PBA associated with the cache LBA0 (811).
  • the physical storage area of the PBA space is divided and managed for every 512 bytes (one sector).
  • the value (PBA) “XXX” is associated with the PBA associated with the cache LBA 0 (811) “0x000 — 0000 — 0000”. This value is an address that uniquely indicates a storage area among a plurality of FMs 420 mounted on the cache 126.
  • the actual storage size of 4 KB data designated in the cache LBA0 (811) is recorded.
  • the storage size is recorded by the number of sectors.
  • uncompressed data instructed to be written by the CPU 120 of the storage controller 100 is compressed in units of 4 KB.
  • the CPU 120 receives a write request for 8 KB data (uncompressed data) starting from the address (0x000_0000_0000) in the LBA0 space
  • the data is compressed in units of 4 KB in the address range 0x000_0000_0000 to 0x000_0000_0007 (in the LBA0 space).
  • compressed data is generated, and subsequently compressed data is generated by compressing 4 KB data in the address range 0x000_0000_0008 to 0x000_0000_000F as a unit, and each compressed data is written in the physical storage area of the FM 420.
  • the present invention is not limited to a mode in which data is compressed in units of 4 KB, and the present invention is effective even in a configuration in which data is compressed in other units.
  • the LBA1-PBA conversion table 820 is stored in the DRAM 413 in the cache 126, and includes two pieces of information of the cache LBA1 (821) and the cache PBA (822).
  • the processor 415 of the cache 126 receives the LBA 1 specified at the time of the read request from the host device, and then uses the LBA 1 received by the LBA 1 to the PBA conversion table 820 to indicate the location where the actual data of the LBA 1 is stored. Convert to
  • the cache LBA1 (821) is a logical area of the LBA1 space provided by the cache 126 arranged in order for each sector (a numerical value 1 in the cache LBA1 (821) means one sector (512 bytes)). This is because the cache 126 in this embodiment is described on the assumption that the association between the cache LBA1 (821) and the cache PBA (822) is managed in units of 512B, but this cache LBA1 (821) and the cache PBA are described.
  • the association with (822) is not limited to the mode managed in 512B units, and may be managed in any unit.
  • LBA1 is a space that directly maps the physical storage area PBA that is the storage destination of the compressed data, and is preferably equal to the PBA division management size. In this embodiment, the LBA1 is divided in units of 512B. to manage.
  • the cache PBA (822) is a field for storing the head address of the PBA associated with the LBA1.
  • the PBA is divided and managed for every 512B.
  • a certain PBA value “ZZZ” is associated with the cache LBA1 “0x000 — 0000 — 0002”.
  • This PBA value is an address that uniquely indicates a storage area of a certain FM 420 installed in the cache 126.
  • LBA1 the read request destination start address
  • ZZZ is acquired as the physical read destination start address in the cache 126.
  • a value indicating “unallocated” is stored in the cache PBA (822).
  • the cache memory 126 receives a command from the CPU 120 of the storage controller 100, the cache memory 126 analyzes the content of the received command, performs a predetermined process, and returns a response (response information) to the storage controller after the process is completed.
  • the command includes a set of information necessary for the cache memory 126 to perform a predetermined process. For example, if the command is a write command that instructs the cache memory 126 to write data, the command includes , Information indicating that the command is a write command and information necessary for executing the write process (write data write position, data length, etc.) are included.
  • the cache memory 126 supports a plurality of types of commands. First, information common to each command will be described.
  • Each command includes information such as an operation code (Opcode) and a command ID at the head as common information. Then, after the command ID, information unique to each command (command parameter, also called parameter) is added to form one command.
  • FIG. 5 is a diagram showing the format of the LBA0 write command of the cache memory 126 and the format of response information for the write command in this embodiment.
  • the element (field) 1011 in FIG. 5 is Opcode, and the element 1012 is Command ID.
  • Each information after the element 1013 is a command parameter unique to the write command.
  • the command ID and status are information included in all response information, and information unique to each response information is added after the status. Sometimes.
  • the operation code is information for notifying the cache memory 126 of the command type, and the cache memory 126 that has acquired the command recognizes the notified command type by referring to this information. For example, in the case of a write command, it is determined that the Opcode is 0x01, and in the case of a read command, the Opcode is 0x02.
  • the command ID is a field for storing a unique ID of the command.
  • the ID specified in this field is used to make the storage controller 100 recognize which command is the response information. Is granted.
  • the storage controller 100 generates an ID capable of uniquely identifying the command when creating the command, creates a command storing this ID in the command ID field, and sends the command to the cache memory 126. Then, when the processing corresponding to the received command is completed, the cache memory 126 includes the command ID of the command in response information and returns it to the storage controller 100.
  • the storage controller 100 recognizes the completion of the command by acquiring the ID included in the response information.
  • the status (element 1022 in FIG. 5) included in the response information is a field in which information indicating whether or not the command processing has been normally completed is stored. If the command process is not completed normally (error), the status stores a number that can identify the cause of the error, for example.
  • the cache memory 126 also supports a command for generating parity using the parity generation unit 419, but since it is a function not directly related to the present invention, description thereof is omitted here.
  • FIG. 5 is a diagram showing a write command of the cache memory 126 and response information to the write command in this embodiment.
  • the LBA0 write command 1010 of the cache memory 126 in this embodiment is constituted by an operation code 1011, a command ID 1012, an LBA0 / 1 start address 1013, an LBA0 / 1 length 1014, a compression necessity flag 1015, and a write data address 1016 as command information. Is done.
  • an example of a command composed of the above information will be described, but there may be additional information above. For example, information related to DIF (Data Integrity Field) or the like may be given to the command.
  • DIF Data Integrity Field
  • the LBA 0/1 start address 1013 is a field for designating the start address of the write destination logical space.
  • the LBA0 space is a space in the range of addresses 0x000_0000_0000 to 0x07F_FFFF_FFFF
  • the LBA1 space is defined as a space of 0x after the address 0x800_0000_0000, so the cache memory 126 starts the LBA0 / 1 start of the write command If an address in the range from 0x000_0000_0000 to 0x07F_FFFF_FFFF is stored in the address 1013, it is recognized that an address in the LBA0 space is designated, and if an address after 0x800_0000_0000 is designated, it is recognized that an address in the LBA1 space is designated.
  • a method other than the method described above can be adopted as a method for recognizing which address space in the LBA0 space or the LBA1 space is designated. For example, there may be a method of identifying the LBA0 space and the LBA1 space according to the contents of Opcode 1011.
  • the LBA 0/1 length 1014 is a field for designating the range (length) of the recording destination LBA 0 or LBA 1 starting from the LBA 0/1 start address 1013, and stores the length represented by the number of sectors.
  • the cache memory 126 performs processing for associating the PBA area storing the write data with the LBA 0/1 area specified by the LBA 0/1 start address 1013 and the LBA 0/1 length 1014 described above.
  • the compression necessity flag 1015 is a field for designating whether to compress the write target data indicated by this command.
  • the CPU 120 explicitly notifies the cache memory 126 that compression is unnecessary, a write command specifying the LBA1 address is issued, so this compression necessity flag 1015 do not use.
  • the storage controller 100 creates a write command, the write target data coming from the host computer 40 cannot expect a size reduction effect due to data compression (for example, when it is already recognized as data compressed by image compression or the like).
  • the flag value is turned ON ("1" is stored), thereby enabling the cache memory 126 to be notified that compression is unnecessary. When this flag is ON, the cache memory 126 has a function of not performing compression.
  • the write data address 1017 and the write data length 1018 are fields for storing the start address of the current storage destination (the address of the memory 130 in the embodiment of the present invention) of the write target data indicated by this command, and the length of the data, respectively. It is.
  • the write target data is stored in the continuous area of the memory 130, only one set of the write data address 1017 and the write data length 1018 is stored in the write command. Is stored.
  • the write target data is discretely stored in a plurality of areas in the memory 130, a plurality of sets of the write data address 1017 and the write data length 1018 are stored in the write command. The number of stored sets of the write data address 1017 and the write data length 1018 is stored.
  • the cache memory 126 acquires the write data by acquiring the data of the area of the size stored in the LBA 0/1 length (1014) from the area on the memory 130 indicated in this field.
  • another command format may be adopted.
  • pointer information an address at which the list is stored (for example, an address in the memory 130)) of a list in which a plurality of addresses (a combination of the write data address 1017 and the write data length 1018) is stored is stored in the write command.
  • the write response information 1020 includes a command ID 1021, a status 1022, and a compressed data length 1023. Since the command ID 1021 and the status 1022 are response information common to each command, description thereof is omitted.
  • the compressed data length 1023 is a field for recording the compressed data length of the written data. The storage controller 100 can grasp the data size after compression of the written data by acquiring this field. In this embodiment, when the write destination (LBA 0/1 start address 1013) is LBA 1, compressed data is recorded, so this field is invalid.
  • the LBA0 space (or LBA1 space) specified by the LBA0 / 1 start address 1013 and the LBA0 / 1 length 1014 of the write command may be associated with a PBA or a PBA. It may not be. If the PBA is not associated, the cache memory 126 newly associates the PBA, and then writes the data in the area specified by the PBA. When the PBA is associated, the area designated by the associated PBA is managed as an unused area, a new PBA is associated, and then data is written in the area designated by the PBA. This is because the flash memory is used as the storage medium of the cache memory 126 in the embodiment of the present invention, and the flash memory cannot be overwritten in principle. Because it is necessary).
  • the cache memory 126 When the number of areas to be managed as unused areas exceeds a certain number (or when writable pages run short), the cache memory 126 performs processing such as erasing blocks only for unused areas. Create a write page (garbage collection). However, since these processes are the same as the processes (garbage collection) performed in a storage device using a known flash memory, detailed description thereof is omitted in this embodiment. It should be noted that this garbage collection is different from GC (processing for organizing unused areas on the final storage medium) described later in the embodiment of the present invention. In the following, the term “garbage collection (GC)” refers to a process of organizing unused areas on the final storage medium, not the process of creating an unwritten page on the flash memory described here.
  • GC processing for organizing unused areas on the final storage medium
  • FIG. 6 is a diagram showing a read command and response information to the read command supported by the cache memory 126 in this embodiment.
  • the read command 1610 of the cache memory 126 in the present embodiment is constituted by an operation code 1611, a command ID 1012, an LBA 0/1 start address 1613, an LBA 0/1 length 1614, an expansion necessity flag 1615, and a read data address 1616 as command information.
  • the In this embodiment an example of a command based on the above information will be described, but there may be additional information above. Since the command ID 1012 has the same contents as the previous LBA0 write command, description thereof is omitted.
  • the operation code 1111 is a field for notifying the cache memory 126 of the type of command, and the cache memory 126 that has acquired the command recognizes that the command notified by this field is a compressed data size acquisition command.
  • the LBA 0/1 start address 1613 is a field for designating the start address of the logical space of the read destination.
  • the LBA 0/1 length 1614 is a field for designating a range of the recording destination LBA 0 or LBA 1 starting from the LBA 0/1 start address 1613.
  • the cache memory 126 acquires data from the PBA associated with the LBA0 space or the LBA1 space area in the range indicated by the LBA0 or LBA1 start address 1613 and the LBA0 / 1 length 1614 described above, and the acquired data (required)
  • the read processing is performed by expanding the data and transferring the data to the storage controller 100.
  • the decompression necessity flag 1615 is a field for designating the necessity of decompression of the read target data indicated by this command. When the storage device creates a read command, this flag is controlled to notify the cache memory 126 that decompression is unnecessary. This field may not be included in the read command. In the case of the cache memory 126 of this embodiment, when the LBA1 is specified and read, the acquired data is not expanded, so the expansion necessity flag 1615 is not essential. However, as another embodiment, when the cache memory 126 receives a read command designating LBA1, if the decompression necessity flag 1615 is OFF (0), the data is decompressed and the decompression necessity flag 1615 is ON (1 In the case of (), data reading may be performed without decompressing the data.
  • the head address of the output destination area of the read target data is designated (for example, an address in the memory 130).
  • data having a length designated by the LBA 0/1 length 1614 is continuously stored from the area of the address designated by the read data address 1616.
  • the read response 1620 includes only information common to other command response information (command ID 1021 and status 1022), and thus description thereof is omitted. Note that the read response 1620 may include additional information other than the common information.
  • the cache memory 126 compresses and writes the data written by designating the area of LBA0 in the FM 420. After that, it is necessary to write this compressed data to the final storage medium in a compressed state, and the LBA1 mapping command is used for that purpose.
  • FIG. 7 is a diagram schematically showing an LBA1 mapping command and response information to the LBA1 mapping command supported by the cache memory 126 in the present embodiment.
  • the LBA1 mapping command 1210 is composed of operation code 1011, command ID 1012, LBA0 start address 1213, LBA0 length 1214, and LBA1 start address 1215 as command information.
  • operation code 1011 command ID 1012
  • LBA0 start address 1213 LBA0 length 1214
  • LBA1 start address 1215 LBA1 start address
  • the LBA 0 start address 1213 is a field for designating a head address for designating the LBA 0 area of the target data for mapping the compressed data to LBA 1.
  • the LBA0 length 1214 is a field for designating a range of LBA0 starting from the LBA0 start address 1213 to be mapped to LBA1.
  • the LBA 0 start address 1213 and the LBA 0 length 1214 are limited to multiples of 8 sectors (4 KB).
  • the LBA1 start address 1215 is a field for designating the start address of LBA1 to be mapped.
  • the CPU 120 of the storage controller 100 knows the data size to be mapped in advance, reserves an LBA1 area to which this data size can be mapped, stores this head address in the LBA1 start address 12115 field, and caches the command. Issue to the memory 126.
  • the cache memory 126 transfers the compressed data associated with the LBA 0 area in the range indicated by the LBA 0 start address 1213 and the LBA 0 length 1214 from the LBA 1 start address 1215 to the area corresponding to the compressed data size. Perform mapping. More specifically, the PBA (cache PBA 812) associated with the LBA 0 space in the range indicated by the LBA 0 start address 1213 and the LBA 0 length 1214 is acquired by referring to the LBA 0-PBA conversion table 810.
  • the PBA 822 column of the LBA 1 range entry (entry specified by the cache LBA 1 (821)) having the same size as the total size of the acquired PBA from the LBA 1 start address 1215 Enter the address of the acquired PBA.
  • the CPU 120 when the CPU 120 thereafter issues a read command specifying the LBA1 address mapped by the command to the cache memory, the compressed data associated with the LBA0 area in the range indicated by the LBA0 start address 1213 and the LBA0 length 1214 is It can be read out in a compressed state.
  • the CPU 120 can read the data compressed by the cache memory 126 and write the compressed data to the final storage medium 190 by using the LBA1 mapping command and the read command.
  • the LBA1 mapping command When the LBA1 mapping command is received, if the LBA1 address specified by the LBA1 start address 1215 is already associated with the LBA0 area in the range indicated by the LBA0 start address 1213 and the LBA0 length 1214, this is already associated. The association is canceled for the LBA1 address that has been assigned (specifically, the information is deleted from the PBA822 column of the entry corresponding to the LBA1 address that has already been associated in the LBA1-PBA conversion table 820), and LBA0-PBA In the conversion table 810 and the LBA1-PBA conversion table 820, information indicating that LBA0 and LBA1 specified by the LBA1 mapping command correspond is registered.
  • the LBA1 mapping response 1220 includes a command ID 1021 and a status 1022.
  • a command ID 1021 includes a command ID 1021 and a status 1022.
  • response information includes a command ID 1021 and a status 1022.
  • LBA0 mapping command When the storage apparatus 10 of this embodiment reads data (compressed data) from the final storage medium, it issues a write command designating the area of LBA1 to the cache memory 126 and FM 420) stores the compressed data. Further, when there is a read request from the host computer 40, the compressed data recorded in the FM 420 needs to be transmitted to the host computer 40 in an expanded state.
  • the LBA0 mapping command is used for this purpose.
  • FIG. 8 is a diagram showing the LBA0 mapping command supported by the cache memory 126 in the present embodiment and the response information to the LBA0 mapping command.
  • the LBA0 mapping command 1210 of the cache memory 126 in this embodiment is constituted by an operation code 1011, a command ID 1012, an LBA1 start address 1913, an LBA1 length 1914, and an LBA0 start address 1915 as command information.
  • an example of a command based on the above information will be described, but there may be additional information above.
  • the LBA1 start address 1913 is a field for designating a head address for designating an LBA1 area of target data for mapping compressed data to LBA1.
  • the LBA1 length 1914 is a field for designating a range of LBA1 starting from the LBA0 start address 1213 to be mapped to LBA1.
  • the LBA 0 start address 1915 is a field for designating the start address of LBA 0 to be mapped.
  • the storage controller 100 knows the data size after decompression of the compressed data recorded in the LBA 1 from the compression information managed by the storage device, secures an area of the LBA 0 to which this data size can be mapped, and sets the head address to the LBA 0 Fill in the Start Address 1915 field.
  • the address that can be specified as the LBA 0 start address 1915 is limited to a multiple of 8 sectors (4 KB).
  • the cache memory 126 of this embodiment receives the LBA0 mapping command from the storage controller 100, the compressed data associated with the LBA1 area in the range indicated by the LBA1 start address 1913 and the LBA0 length 1914 is transferred from the LBA0 start address 1915. Mapping is performed over an area corresponding to the data size after decompression.
  • the specific mapping process is the same as the LBA1 mapping command, and the PBA information associated with the LBA1 area range indicated by the LBA1 start address 1913 and the LBA0 length 1914 is registered in the LBA0-PBA conversion table 810. Mapping is performed.
  • the compressed data associated with the LBA1 area in the range indicated by the LBA1 start address 1913 and the LBA0 length 1914 is It can be read out in an expanded state.
  • the LBA 0 mapping response 1920 includes only information (command ID 1021, status 1022) common to response information of other commands, and thus the description thereof is omitted. A configuration in which additional information other than the common information is included in the LBA 0 mapping response 1920 may be used.
  • Unmapping command the storage controller 100 maps the data to LBA1 in order to acquire the compressed write data and record it, or to generate a parity for the compressed data. Further, in order to decompress and acquire the compressed information, LBA1 is designated and data recorded in the cache memory 126 is mapped to LBA0. The mapped area is released when the processing is completed and becomes unnecessary.
  • the storage apparatus of this embodiment uses the mapping release command to release the association of the LBA0 or LBA1 area associated with the PBA.
  • FIG. 9 is a diagram showing a mapping cancellation command and response information to the mapping cancellation command supported by the cache memory 126 in the present embodiment.
  • the mapping cancellation command 1710 of the cache memory 126 in this embodiment is constituted by an operation code 1011, a command ID 1012, an LBA 0/1 start address 1713, and an LBA 0/1 length 1714 as command information.
  • an example of a command based on the above information will be described, but there may be additional information above.
  • the contents of the parameters specific to the mapping cancellation command and the processing performed when the cache memory 126 receives the mapping cancellation command will be described.
  • the LBA 0/1 start address 1713 is a field for designating the start address of the logical space to be unmapped, and addresses in both the LBA 0 space and the LBA 1 space can be designated. However, when an address in the LBA0 space is designated, the address must be an address on a 4 KB (8 sector) boundary. return it.
  • the LBA 0/1 length 1714 is a field for designating the range of the recording destination LBA 0 or LBA 1 starting from the LBA 0/1 start address 1713.
  • the configuration and functions of the cache memory 126 have been described so far.
  • the storage apparatus 10 receives an I / O request (read, write command) from the host computer 40, how the cache memory 126 is used. Process or outline.
  • the relationship between the storage area (volume) provided by the storage apparatus 10 to the host computer 40 and the cache (consisting of the cache memory 126) will be described with reference to the conceptual diagram of FIG.
  • the storage apparatus 10 of the present invention provides one or a plurality of volumes 5000 to the host computer 40.
  • the volume provided to the host computer 40 is referred to as “expansion VOL” (elements in the figure).
  • the volume provided to the host computer 40 is referred to as “expansion VOL” (elements in the figure).
  • the decompression VOL 5000 is written to the cache memory 126 that is a cache of the storage apparatus 10.
  • the data is written into the storage area (configured by the FM 420) of the cache memory 126 in a compressed state as described above.
  • the host computer 40 is not shown that the data is compressed, and when the host computer 40 issues a read request to the decompression VOL 5000 and reads the data previously written in the decompression VOL 5000, the data is not compressed. Data is read out.
  • the object of the present invention is to store the compressed data in the final storage medium 190 in a compressed state
  • the compressed data stored in the cache memory 126 is written into the final storage medium 190 in a compressed state.
  • the problem in this case is that when the data is compressed, the data size varies depending on the data contents.
  • the update data is overwritten and stored in an area where pre-update data of the update data is stored.
  • the compressed data is stored in the final storage medium, if an update (overwrite) request is received for the compressed data stored in the volume first, the update data is compressed as a result of the compression of the update data.
  • the size of the data may be larger than the size of the compressed data stored first. In that case, it becomes impossible to overwrite the final storage medium. Therefore, the storage apparatus 10 of the present invention has a configuration in which update data is not written in the same area as the pre-update data, but is additionally written to the final storage medium 190.
  • a volume (referred to as a compressed VOL 5500) different from the decompressed VOL is prepared, and the data written in the decompressed VOL (exactly, on the decompressed VOL issued from the host computer 40)
  • This data is sent to the storage apparatus 10 together with a write command request designating the area of the data, and is temporarily stored as compressed data in the cache 126. In this specification, this is referred to as “written to the decompression VOL. (Represented as “data”) is moved to the compression VOL 5500 in a pseudo manner.
  • the compression VOL 5500 is the same as a logical volume provided by a well-known storage device to a host device such as a host computer, and one compression VOL 5500 (logical volume) using a storage area of one or a plurality of final storage media 190. Is configured.
  • the configuration of the logical volume (compressed VOL) can have various modes, for example, a configuration in which a RAID group is configured with a plurality of final storage media 190, and a partial area in the RAID group is configured as one logical volume, one final storage There may be a configuration in which the medium 190 is one logical volume.
  • the present invention is effective even when a virtual volume formed by using the so-called Thin Provisioning technology adopted by recent storage apparatuses is used as the logical volume of the present invention.
  • one final storage medium 190 is configured to correspond to one logical volume (compressed VOL 5500).
  • the compression VOL of the access destination is specified, the final storage medium 190 corresponding to the compression VOL is uniquely determined accordingly, the address assigned to each storage area (sector) in the compression VOL, and the compression VOL
  • the addresses assigned to the storage areas (sectors) of the final storage medium corresponding to are the same.
  • the process of moving the data written in the decompression VOL to the compression VOL 5500 in a pseudo manner utilizes the fact that the cache memory 126 can provide two address spaces to the storage controller 100.
  • the storage controller 100 stores the data in the cache 126.
  • the storage controller 100 specifies and stores the address of the LBA0 space.
  • the storage controller 100 reads data from the final storage medium 190 (corresponding to a compressed VOL in the embodiment of the present invention) in order to respond to a read request from the host computer 40, the read data is temporarily cached. Although stored in the memory 126, at that time, the address of the LBA1 space is designated and stored.
  • the outline when moving the data written in the decompression VOL to the compression VOL 5500 in a pseudo manner is as follows.
  • data written at the address (LBA) address X of the decompression VOL (actually stored as compressed data in the cache) is moved to the compression VOL 5500 in a pseudo manner.
  • LBA address
  • a data write request for the address (LBA) X of the decompression VOL is received from the host computer 40, the data is once written in the buffer area 1302 of the memory 130, and at the same time, the storage controller 100 does not store the data in the LBA0 space of the cache memory 126.
  • a use area is secured (here, it is assumed that an area of address (LBA0) x address in the LBA0 space is secured).
  • the storage controller 100 issues the write command described above to the cache memory 126, stores the write data in the buffer area 1302 in the cache memory 126, and also stores the address X of the decompression VOL.
  • Information indicating that the data is stored at the address (LBA0) x in the LBA0 space of the cache memory 126 is stored in management information (a cache management table 1301 described later).
  • the host computer 40 returns a response indicating that the data writing has been completed.
  • the subsequent processing is processing performed at an arbitrary timing (for example, when the load on the CPU 120 is low) asynchronously with the data write request from the host computer 40.
  • the storage controller 100 determines to which position (LBA) of the compressed VOL the data written to the address X of the decompression VOL should be moved (associated) (assuming that the determined address is the Y address). ).
  • LBA position of the compressed VOL
  • an unwritten area on the compressed VOL is selected as the address Y on the compressed VOL.
  • the storage controller 100 stores the address at which data was last written to the compressed VOL when data was moved from the previous decompression VOL to the compressed VOL (in an area management table 650 described later). (Which is stored in the last write position 657 managed in step S1), additional writing is performed from the address next to the stored address.
  • management information address mapping table 600 described later
  • the storage controller 100 secures an unused area in the LBA1 space of the cache memory 126 (assuming that the address y is secured), and stores the data to be stored at the address (Y address) of the compressed VOL. In the above, it is decided to store in the address y on the cache LBA1 space.
  • the storage controller 100 issues the LBA1 mapping command described above to the cache memory 126, and sets the address of the cache memory 126 (the x address of the LBA0 space) where the write data for the decompression VOL is stored. , Mapping to the y address of the LBA1 space address of the cache memory 126. Then, the storage controller 100 indicates that the data to be written to the address Y address of the compression VOL is stored at the address Y of the LBA1 space address of the cache memory 126, and management information (compression information described later) It is stored in the management table 1303). Thereby, the pseudo data movement from the decompression VOL to the compression VOL is realized without physically moving the data entity.
  • the management information (compression information management table 1303) is used to read the data on the cache memory 126 (stored at the address y in the LBA1 space), and the compressed VOL (final By writing to the address (address Y) of the storage medium 190), the compressed data can be written to the final storage medium 190.
  • (pseudo) data movement from the decompression VOL to the compression VOL is performed in units of 8 sectors (4 KB) at a minimum.
  • the cache memory 126 in the embodiment of the present invention performs data compression in units of 4 KB, so when the storage apparatus 10 compresses the data written in the decompression VOL, it compresses every 4 KB area from the beginning of the decompression VOL. This is because if the minimum unit of data movement is 8 sectors (4 KB), management becomes easy. However, the present invention is effective even if the minimum unit of data movement is a unit other than 4 KB.
  • the storage apparatus 10 When the storage apparatus 10 receives a request to read data in the decompression VOL from the host computer 40, the reverse processing described above is performed.
  • management information address mapping table 600 described later
  • the address of the area on the decompression VOL specified by the current read request Is converted to the address of the area on the compressed VOL (final storage medium 190) corresponding to the area on the decompressed VOL (assuming that the address is converted to the Y address)
  • the compressed VOL final Data is read from address Y of the storage medium 190
  • the storage controller 100 secures an area on the LBA1 space of the cache memory 126 (here, it is assumed that an area at address (LBA1) y in the LBA1 space is secured).
  • the storage controller 100 issues the write command described above to the cache memory 126, and the write data on the buffer area 1302 is stored in the address of the LBA1 space (LBA1) y area of the cache memory 126.
  • information indicating that the data at address Y in the compressed VOL is stored at address y in the LBA1 space of the cache memory 126 is stored in the management information (compression information management table 1303).
  • a cache area (address on LBA0 space) for storing data at address X of the decompression VOL is also secured (assuming that an area at address (LBA0) x of the LBA0 space is secured), and the decompression VOL Information indicating that the data at the address X is stored at the address (LBA0) x in the LBA0 space of the cache memory 126 is stored in the management information (cache management table 1301).
  • the data of the compressed VOL (the data staged at the LBA1 space address y address of the cache memory 126) is moved to the decompression VOL. This movement is also a pseudo one, and the actual data is not actually moved.
  • the storage controller 100 issues the LBA0 mapping command described above to the cache memory 126, and the y address of the LBA1 space address of the cache memory 126 is changed to the address of the LBA0 space of the cache memory 126 (the x address of the LBA0 space. Data is moved in a pseudo manner by mapping it to the address on the cache 126 where the data of the VOL X address is to be stored.
  • the storage controller 100 reads the data by issuing a read command designating the x address of the LBA0 space to the cache 126.
  • the data is read after being converted from the compressed state to the uncompressed state, and the read data is transferred to the host computer 40, thereby realizing the read processing.
  • the management information is stored in the memory 130 of the storage controller 100 and updated by the CPU 120.
  • the area on the decompressed VOL identified by VVOL # 601 and LBA602 is the area on the compressed VOL identified by LDEV # 603, LBA (Base) 604, and LBA (Update) 605
  • Each row (entry) of the address mapping table 600 has an area corresponding to 8 sectors of the decompression VOL (1 sector is a minimum access unit when the decompression VOL is accessed from the host computer 40, usually 512 bytes). This indicates which LBA area is associated, and the LBA 602 of each entry indicates the head LBA of the area. Also, the number of compressed VOL disk areas (number of sectors) associated with each row (entry) of the address mapping table 600 varies depending on the data compression state, but there is a minimum of one sector (8 sectors of decompressed VOL). (When compressed to 1 sector by compression), an area of up to 8 sectors (when the size of the decompressed VOL data has not been reduced by compression) is associated. In the example of FIG.
  • the area for 8 sectors starting from the sector with 0x08 in the LVOL 602 is the decompressed VOL with the VVOL # 601 of 0, and the LBA 604 (Base) with the compressed VOL with 0x125 in the LDEV # 603 is Corresponding to areas of 2 sectors of 0x0530 and 0x0531 (that is, the area of 8 sectors of the decompression VOL is compressed and stored in a size of 2 sectors by being compressed) Therefore, when the storage controller 100 receives a read request from the host computer for an area in the range from 0x08 to 0x0F of the extended VOL with VVOL # 601 of 0 and the LBA ranging from 0x08 to 0x0F, the storage controller 100 refers to this address mapping table 600 and # 603 is 0x125 compression VOL, LBA604 is 0x0530, 0x05 It performs a process of reading the area of the two sectors of 1.
  • An LBA (Base) 604 is a column in which information on an area in which data before update is stored is stored
  • an LBA (Update) 605 is a column in which information on an area in which data after update is stored is stored.
  • the information of the area to which the data of the first write (the first write after the decompression VOL is newly created) with respect to the area of the decompression VOL (the area specified by VVOL # 601, LBA602) is associated with the LBA ( Base) 604.
  • the data is destaged to the compressed VOL, and information on the area where the data is written at that time is also stored in the LBA (Base) 604.
  • LBA Base
  • LBA Base
  • the data stored in the compressed VOL information on the area where the data is written at that time is also stored in the LBA (Base) 604.
  • LBA LBA
  • information on the area on the compressed VOL associated with the overwritten data is stored in an LBA (Update) 605.
  • base data data stored in the final storage medium before update
  • post-update data is referred to as update data or update data.
  • FIG. 12 is a diagram showing an example of the cache management table 1301.
  • the cache management table 1301 is information for managing location information on the cache memory 126 in which data written from the host computer 40 is stored for each area of the decompression VOL.
  • the cache management table 1301 is a cache address 13011, VVOL # 13012, The LBA 13013, cache status 13014, last access time 13015, and post-compression size 13016 are held.
  • the cache address 13011 stores an address (LBA0) on the cache memory 126 in which data in the area on the decompressed VOL specified by VVOL # 13012 and LBA13012 is stored.
  • the cache status 13014 represents the state of data stored in the cache memory 126.
  • the state in which the data on the cache memory 126 and the data stored in the final storage device 190 are equal is called the Clean state, and the data on the cache memory 126 is more than the data stored in the final storage device 190.
  • the new state is called Dirty. In the cache status 13014, either Clean or Dirty value is stored.
  • the CPU 120 of the storage controller 100 stores a program (hereinafter referred to as a front-end program) that stores data written to the decompressed VOL from the host computer 40 and data of the decompressed VOL stored in the cache 126.
  • a program that moves to a compression VOL and performs a destage (hereinafter referred to as a destage program) is operating independently.
  • the front-end program receives a write data write request from the host computer 40 to the decompression VOL, Data is stored in the area on the cache 126, and at the same time, the cache status 13014 of the cache area in which the data is stored is set to Dirty.
  • the destage program monitors the contents of the cache management table 1301, and a predetermined condition (for example, data managed in the cache management table 1301 having a cache status 13014 of Dirty has reached a predetermined amount or more) ), The data whose cache status 13014 is set to Dirty is moved to the compressed VOL, and further destaged to the final storage device 190. Then, the process of changing the cache status 13014 of the data that has been destaged to Clean is performed.
  • a predetermined condition for example, data managed in the cache management table 1301 having a cache status 13014 of Dirty has reached a predetermined amount or more
  • the last access time 13015 stores the time when the data (the data in the area on the cache 126 specified by the cache address 13011) was last accessed.
  • the number of seconds elapsed from a certain point in time (for example, January 1, 2000 0: 0: 0) is used as the expression format of the time information stored at the last access time 13015.
  • Other representation formats may be used.
  • the post-compression size 13016 stores the size on the cache memory 126 (the size after being compressed by the data compression / decompression unit 418 of the cache memory 126).
  • FIG. 13 is a diagram showing an example of the compression information management table 1303.
  • the compression information management table 1303 includes information about each data stored (destaged) in the final storage medium, and, when the data is cached on the cache 126, the address of the cache destination (LBA1 provided by the cache 126). It is a table for managing information of (space address).
  • Each entry (row) of the compressed information management table 1303 includes a cache address (13031) for storing the address (address on the LBA1 space) of the cache memory 126, and a compressed VOLDEV # 13032 that is the identification number of the final storage medium that is the storage destination.
  • a compressed VOLBA 13033 which is the LBA of the final storage medium, an attribute 13034 whether the data is base data (Base) or update data (Update), a cache status (state) 13035, and a compressed data size 13036 are held.
  • the cache status 13035 stores one of the values of Clean and Dirty.
  • each entry (compression VOLBA 13033) of the compression information management table 1303 is associated with each area of 8 sectors that is the compression unit of the decompression VOL (or the LBA of the compression VOL associated with the past). Therefore, a plurality of compressed VOLBABA13033 may be stored. For example, when an area for 8 sectors with decompressed VOL is compressed to a size of 2 KB (4 sectors), when compressed data is stored on the compressed VOL, the area for 4 sectors of the compressed VOL is occupied.
  • LBAs are stored in the compressed VOLBA 13033 of the entry of the compressed information management table 1303 corresponding to the 8-sector area of the decompressed VOL (for example, row 13037 in FIG. 13). Similarly, a plurality of cache addresses 13031 may be stored.
  • the free list 700 includes a free LBA 0 list 710 and a free LBA 1 list 720.
  • Each list (710, 720) includes an unused LBA 0/1 (specifically, a cache management table 1301 and a compressed information management).
  • a list of LBA 0/1) in which values are not stored in the cache addresses 13011 and 13031 of the table 1303 is stored.
  • the storage controller 100 selects an unused area stored in the free LBA0 list 710 when securing an area of the LBA0 space (for example, when storing write data from the host computer 40).
  • an area of the LBA1 space is secured (for example, in the case of the processing for moving the data of the decompressed VOL to the compressed VOL described above)
  • it is stored in the free LBA1 list 720.
  • the unused area is selected and the value is stored in the cache address 13031 of the compression information management table 1303.
  • the cache becomes unnecessary.
  • the address information of the memory 126 is deleted from the cache management table 1301 or the compressed information management table 1303, and the deleted address information is registered again in the free LBA0 list 710 or the free LBA1 list 720.
  • the storage controller 100 also has an area management table 650 shown in FIG.
  • the storage apparatus 10 of the present invention moves (associates) the data of the decompression VOL to the compression VOL, but the association range is limited.
  • the data in the area specified by the start LBA 652 to the end LBA 653 of the decompression VOL specified by the VVOL # 651 of the area management table 650 is the start LBA 655 and the end of the compressed VOL specified by the LDEV # 654. It is moved (associated) only to the area specified by the LBA 656.
  • compression VOL page When the area specified by the expansion LVOL 652 to the end LBA 653 is referred to as “decompression VOL page”, and the area specified by the compression VOL start LBA 655 and the terminal LBA 656 is referred to as an expansion VOL page. This is called “compressed VOL page”. This page is an execution unit when the garbage collection described later is performed.
  • the last write position 657 is the last address on the compression VOL determined as the data movement destination when the data movement processing from the decompression VOL to the compression VOL was performed last. That is, the area from the start LBA 655 to the final write position 657 of each page of the compressed VOL is an area in which data to be moved from the decompression VOL to the compression VOL is stored, and the destage program described above uses the decompression VOL.
  • a process of adding the size of the moved data (compressed data) to the final writing position 657 is also performed (for example, if the moved data is the size of N sectors, the final N is added to the value stored at the write position 657).
  • the area from the “last write position 657 + 1” to the end LBA 656 is an unused area. Therefore, the next time the data is moved from the decompression VOL to the compression VOL, the data is moved with the address next to the address recorded at the final write position 657 (final write position 657 + 1) as the head address (addition to the compression VOL). Just write).
  • the size of the decompression VOL page and the size of the compression VOL page are the same size, but they do not necessarily have to be the same size, and expect the data to be compressed. It is also possible to adopt a configuration in which the size of the compressed VOL page is made smaller than the size of the decompressed VOL page. Moreover, it is not necessary to make the size of each page the same size. Further, a configuration in which the size of one page is the same as the size of one compressed VOL (final storage medium 190) is also possible. However, since the data for one page is once staged in the cache 126 in the garbage collection process described later, the size of one page is equal to or smaller than the storage capacity of the cache 126. In the embodiment of the present invention, for simplification of description, it is assumed that the size of each page is the same, and the size of one page is sufficiently smaller than the capacity of the cache 126.
  • Garbage collection is performed on a page-by-page basis.
  • the basic principle of the garbage collection process of the present invention is as follows. First, select one garbage collection target page. As described above, various methods can be selected as the page selection opportunity and method. Subsequently, all the data of the selected page is staged from the final storage medium 190 onto the cache 126. During staging, a continuous address space (area) for one page is secured as a staging area on the cache LBA1 space, and staging is performed on the reserved area on the cache 126. Simultaneously with staging, the contents of the compression information management table 1303 are updated. Specifically, the cache address 13031 of each staged data is registered on the cache 126.
  • the data staged on the cache 126 is associated with the decompressed VOL.
  • the outline of the process of pseudo-moving the compressed VOL data to the decompression VOL in the read process is described above, but here, the same process is performed.
  • the first sector is the decompressed VOL with VVOL # 601 and the sector with 0x08 is LBA602. It can be seen that the area for 8 sectors is associated with the area for 2 sectors of LDEV # 603 of the compressed VOL of 0x125 and LBA604 (Base) of 0x0530 and 0x0531.
  • the compression information management table 1303 stores information on the position (address in the LBA1 space) on the cache memory 126 where the in-page data of the compression VOL to be GC processed this time is staged.
  • the address (LBA1) on the cache 126 where the data of # 603 is the compressed VOL of 0x125, LBA604 (Base) is 0x0530, and 0x0531 is staged is also found.
  • the LBA0 address of the cache memory 126 is assigned to the extended VOL area (the area corresponding to 8 sectors starting from the 0x08 sector where the VVOL # 601 is the 0th extended VOL and the LBA602 is the first sector).
  • the LBA1 address where the data staged on the cache 126 of the compressed VOL is stored is associated with the LBA0 address of the cache 126 reserved for the decompression VOL.
  • the data of the compression VOL is pseudo-moved to the decompression VOL.
  • This process is performed only for the latest data associated with the decompression VOL among the data in the page of the compression VOL (that is, when there are multiple updates to an area with the decompression VOL, the page of the compression VOL
  • data before update (base data) and data after update (update data) should be stored.
  • base data base data
  • update data update data
  • only the update data is moved to the decompression VOL
  • the host computer 40 decompresses.
  • the latest data is extracted and moved to the decompression VOL.
  • the cache status 13014 of the cache management table 1301 is set to Dirty, and the information (in the compression information management table 1303 about the data in the current garbage collection process target page range ( Specifically, the cache address 13031, the attribute 13033, and the state 13034) are all deleted.
  • this destage program destages data in which the cache status 13014 is set to Dirty in the cache management table 1301, but necessary data (latest data is stored in the cache management table 1301 by garbage collection processing). Since the cache status 13014 is set to Dirty, only the latest data is additionally written from the top of the page. Then, the same effect as when unnecessary data is deleted from the final storage medium is obtained, and garbage collection is realized.
  • the cache 126 receives the command (garbage collection request command) from the CPU 120, and takes charge of the above-described process of moving the data of the compressed VOL to the decompressed VOL in a pseudo manner.
  • FIG. 16 shows an example of a garbage collection request command 3300 from the storage controller 100 to the cache 126 and its completion response 3310. Since the garbage collection is executed in units of pages, the storage controller 100 once stages the data for one page of the final storage medium 190 (compressed VOL) in the cache memory 126. Then, garbage collection for deleting unnecessary (unused) data is performed on the staged data. The processing is performed by issuing a garbage collection request command 3300 from the storage controller 100 to the cache 126, so that the cache 126 Let it be implemented.
  • the garbage collection request command 3300 is used for garbage collection as a command parameter unique to the garbage collection request command, in addition to information common to the commands such as an operation code 1101 indicating a garbage collection request and a command ID 1102 for command identification. It has a cache LBA1 address 3303 indicating the address (LBA1) of the secured cache area, a list number 3304, and one or more garbage collection target data information 3305 (hereinafter also referred to as “target data information 3305”). Each garbage collection target data information 3305 stores a set of information of a compressed VOL address 33051, a size 33052, an expanded VOL address 33053, an LBA start address 33043, and an attribute 33055. The number of target data information 3305 is equal to the value stored in the list number 3304.
  • the CPU 120 of the storage controller 100 once stages the data for one page of the final storage medium 190 (compressed VOL) in the cache memory 126. Reserve a continuous address space.
  • the cache LBA1 address 3303 stores the start address (LBA1) of the secured cache area, and before the garbage collection request command 3300 is issued to the cache 126, the CPU 120 uses the cache LBA1 address 3303 as the start address. 126, data for one page is staged from the final storage medium 190 and stored.
  • the decompression VOL address 33053 represents the head address of the area (4 KB) on the decompression VOL that is specified by the compression VOL address 33051 and the size 33052 and is associated with the area on the compression VOL.
  • the LBA 0 start address 33054 is the head address of the cache space (LBA 0 space) allocated to the area specified by the decompressed VOL address 33053.
  • the attribute 33055 either Base or Update is stored.
  • Base is stored in the attribute 33055, the base data is stored in the area on the compressed VOL specified by the compressed VOL address 33051 and the size 33052.
  • “Update” is stored in the attribute 33055, this indicates that Update data is stored in the area on the compressed VOL specified by the compressed VOL address 33051 and the size 33052.
  • the cache 126 In response to the garbage collection request command 3300, the cache 126 that has completed the garbage collection returns a completion response 3310 to the storage controller 100. It includes a command number 3311 for command identification, a status 1022 indicating the success or failure of garbage collection, and a compressed size 3313 of the corresponding data after garbage collection.
  • the target data information 3305 is stored for all areas in the page (hereinafter referred to as the target page) on the target compression VOL on which the garbage collection process is performed. create. Specifically, an entry in which the area specified by the compressed VOLDEV # 13032 and the compressed VOLBA 13033 is within the range of the GC target page area is extracted from each entry in the compressed information management table 1303, and the target data is stored for each entry. Information 3305 is created. For example, if the content of the compression information management table 1303 is in the state shown in FIG.
  • the compressed entry VOLDEV # 13032 of the first entry is 2 KB (compressed size 13036 is stored in the compressed size 13036) and the compressed VOLBA 13033 is 0-3.
  • the attribute 13034 is “Base”.
  • the start address (address 0) stored in the compressed VOLBA 13033 is set to the size 33052 in the compressed VOL address 33051 in the target data information 3305 to be created. Creates information in which the information (2 KB) stored in the post-compression size 13036 and the information (Base) stored in the attribute 13034 are stored in the attribute 33055.
  • the other information (expanded VOL address 33053, LBA0 start address 33054) in the target data information 3305 is acquired from the address mapping table 600 and the cache management table 1301. Specifically, the LBA of the decompression VOL associated with the 2 KB area in which the compressed VOLDEV # 13032 is 0 and the compressed VOLBA 13033 is 0 to 3 is searched from the address mapping table 600. The LBA of the retrieved decompression VOL is stored in the decompression VOL address 33053 in the target data information 3305.
  • the cache management table 1301 is referred to, the cache address 13011 where the data in the area specified by the decompressed VOL address 33053 is to be stored is searched, and the information of the searched cache address 13011 is used as the LBA0 in the target data information 3305.
  • the target data information 3305 is created.
  • the CPU 120 performs this process for all entries in the compressed information management table 1303 in which the area specified by the compressed VOLDEV # 13032 and the compressed VOLBA 13033 falls within the range of the page area that is the current GC target. .
  • target data information 3305 when multiple pieces of target data information 3305 (compressed VOL address 33051, size 33052, decompressed VOL address 33053, LBA start address 33054, attribute 33055 information) are stored in the command parameter (in most cases, target data information 3305 is stored in plural), the CPU 120 stores the command data in order from the target data information 3305 having the smallest value of the compressed VOL address 33051 included in the target data information 3305 among the plurality of target data information 3305. In addition, a garbage collection request command 3300 is created.
  • FIG. 17 is a schematic diagram of a flow of processing executed by the storage controller 100 (CPU 120 thereof), the cache 126, and the final storage device 190 in the garbage collection process.
  • a cache area necessary for garbage collection is secured (S331).
  • a cache area required for garbage collection a cache area (allocating an area on the LBA1 space) for storing the staged data when staging the GC target page data of the compressed VOL from the final storage medium 190, and There is a cache area (allocating an area on the LBA0 space) to be assigned to each area in the page of the decompressed VOL associated with the page of the compression VOL that is the GC target.
  • the LBA1 address of the secured cache area is recorded in the cache address 13031 column of each entry of the compressed information management table 1303, and also the cache address 13011 of each entry of the cache management table 1301 Record the LBA0 address of the secured cache area.
  • the data in the dirty state exists in the cache 126 among the data of the GC target page, the data in the dirty state is destaged at this point. Then, in the subsequent processing after S333, the area for one page is staged collectively from the final storage medium 190.
  • a lock is acquired for the data subject to garbage collection (data for one page of decompression VOL and compression VOL) (S332).
  • one page of data is staged from the final storage device 190 to the buffer area 1302 of the storage controller 100, the write command described above is issued to the cache 126, and the data is stored in one page on the cache 126 secured in S331. Store in the minutes area. (S333 to S339).
  • the storage controller 100 may issue a read command for reading data for one page to the final storage medium 190 only once.
  • the storage controller 100 After staging the data on the compressed VOL, the storage controller 100 sends a garbage collection request command 3300 to each cache 126 to make a garbage collection request. Details of processing performed by the cache 126 that has received the garbage collection request command 3300 will be described later.
  • the cache 126 sends a garbage collection completion response 3310 described later to notify the storage controller 100 of completion.
  • all the data in the page of the decompression VOL that is the target of the current garbage collection (hereinafter referred to as “target data”) is associated with the address on the LBA 0 space of the cache 126. Yes.
  • the storage controller 100 changes the cache status 13014 to Dirty for all target data in the cache management table 1301. Thereafter, the storage controller 100 releases the lock of the target data (S3313), and deletes the data corresponding to the range of the page area targeted for garbage collection this time.
  • the area specified by the compressed VOLDEV # 13032 and the compressed VOLBA 13033 is stored in the cache address 13031 for each entry within the range of the page area that is the current GC target.
  • the address information stored in the cache address 13031 is moved to the free LBA1 list 720 and the contents of the cache address 13031 are deleted).
  • the information of LDEV # 603, LBA (Base) 604, and LBA (Update) 605 corresponding to the range of the page area targeted for garbage collection is deleted from the address mapping table 600, and at the same time, the last write of the area management table 650 is performed.
  • the position 657 is returned to the initial state (specifically, the value of the start LBA 655 is stored in the final write position 657) (S3314).
  • the area on the final storage medium 190 in which the page to be processed in the current GC process is stored becomes unused (when the next destage is performed, writing starts from the top of the page. )
  • the destage program that is executed asynchronously with the current garbage collection process when executed asynchronously with the current garbage collection process is executed, all the data of the pages targeted by the current garbage collection process exists in the cache 126 and the latest data Since only the latest data is written to the final storage medium 190 as a result of execution of the destage program, unnecessary data is deleted. Become.
  • the destage program is executed immediately, and the in-page data of the decompressed VOL associated with the address on the LBA0 space of the cache 126 is artificially moved to the compressed VOL.
  • the final storage medium 190 may be destaged.
  • FIG. 18 is an example of a processing flow in the cache 126 that has received the garbage collection request command 3300.
  • the FM controller 410 receives the garbage collection request command 3300 (S33110). Subsequently, with respect to a plurality of target data information 3305 existing in the received command (in principle, a plurality of target data information 3305 exists in the garbage collection request command 3300), the compressed VOL address 33051 and size 33052 of each target data information 3305 The address on the cache 126 where the data of the specified area is staged is calculated (S33111). Before issuing the garbage collection request command 3300, the storage controller 100 stages the data of the garbage collection target pages on the compressed VOL in order from the top in a continuous area on the LBA1 space starting from the cache LBA1 address 3303.
  • the data in the area specified by the compressed VOL address 33051 and the size 33052 of the first target data information 3305 among the plurality of target data information 3305 is the first data of the garbage collection target page on the compressed VOL. It is stored in an area in the range of the size 33052 from the LBA1 address specified by the LBA1 address 3303.
  • the data in the area specified by the compressed VOL address 33051 and the size 33052 in the second and subsequent target data information 3305 is stored in the next position on the cache 126 (“cache LBA1 address 3303 + 1 LBA1 in the first target data information 3305 Address) calculated from “address”.
  • the cache LBA1 address 3303 and the compressed VOL address 33051 and size 33052 of each target data information 3305 are used, the data in the area specified by the compressed VOL address 33051 and size 33052 of each target data information 3305 is staged.
  • the address on the cache 126 can be calculated. Therefore, when the CPU 120 of the storage controller 100 issues the garbage collection request command 3300, it is not necessary to individually specify the LBA1 address on the cache 126 where each data in the page of the compressed VOL is staged.
  • the storage controller 100 instead of calculating each address on the cache 126 where the data of each area specified by the compressed VOL address 33051 and the size 33052 is staged by the FM controller 410, the storage controller 100 performs garbage collection.
  • the command including the address (LBA1) on each cache 126 in which the data of each area specified by the compressed VOL address 33051 and the size 33052 is staged may be issued in the parameters of the request command 3300. .
  • the compressed VOL address 33051, size 33052, decompressed VOL address 33053, LBA0 start address 33054, and attribute 33055 are extracted from the target data information 3305 stored at the end of the command (S33112).
  • the decompressed VOL address 33053 is confirmed among the information extracted in S33112. If this address is not yet confirmed in the current garbage collection process (S33113: No), this data is the latest data.
  • the process of associating the LBA1 space address with the cache LBA0 space address (LBA0 start address 33054) associated with the decompressed VOL address 33053 is executed internally in the cache 126. carry out. Since this data size is a part of the size after garbage collection, the size 33052 is added to the size after garbage collection (S33115).
  • next target data information 3304 (stored immediately before in the command parameter) It is confirmed whether there is target data information 3304) (S33116). If there is next target data information 3304 (S33116: Yes), data information is extracted (S33118). This process is the same as S33112. Then, the processing from S33113 to S33115 is repeated.
  • a completion response 3310 including the size after the added garbage collection is transmitted to the storage controller 100.
  • the present invention can be implemented in various forms in addition to the forms disclosed in the above-described embodiments.
  • the storage apparatus described in the embodiment it is possible to adopt a configuration in which a controller or a plurality of elements in the controller exist. It is also possible to adopt a configuration in which some or all of the components described as programs in the embodiments are realized by hardware using hard-wired logic or the like. It is also possible to take a form in which each program in the embodiment is provided by being stored in a storage medium such as a DVD.
  • the storage apparatus when the storage apparatus has written (updated) data a plurality of times in the same area of the decompression VOL from the host computer, the address on the final storage medium in which the data before the update is stored is stored is stored. And the information on the address on the final storage medium in which the updated data is stored, as a modification, the address of the address on the final storage medium in which the latest (latest) update data is stored.
  • the address mapping table 600 and the compressed information management table 1303. Even in such a case, the present invention is effective.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

本発明のストレージ装置は、ホスト計算機からボリュームに対して書き込まれたライトデータをキャッシュ装置で圧縮し、圧縮したデータを最終記憶媒体に追記書きするストレージ装置であって、ガベージコレクション実行時にキャッシュ装置にその処理の一部をオフロードすることを特徴とする。ストレージ装置は最終記憶媒体上のページ内書き込み領域が不足してきた時点で、ガベージコレクション処理を開始する。ガベージコレクション処理では、最終記憶媒体のページ全体をキャッシュ装置にステージングし、キャッシュ装置ではステージングされたデータの中で最新の更新データのみをボリュームにマッピングする。ストレージコントローラでは、ガベージコレクション対象ページ全領域を未使用状態にし、当該ボリュームにマッピングされたキャッシュ装置上データを、最終記憶媒体のページの先頭から順に書き戻す。

Description

ストレージ装置及びその制御方法
 本発明は、データを圧縮して格納するストレージ装置に関する。
 ストレージ装置がデータを格納するために用いる、ハードディスクなどの最終記憶媒体にデータを圧縮して格納するようにすると、最終記憶媒体の利用可能な容量を仮想的に増加させることができる。しかし、最終記憶媒体へ圧縮したデータを格納する場合、データの更新が困難である。なぜなら、更新前のデータの圧縮後のサイズは、更新後データの圧縮後のサイズと異なる場合があるため、特に更新後データの圧縮後サイズが更新前データの圧縮後サイズより大きい場合、更新前データを格納している領域に書き込めないからである。そのため、最終記憶媒体にデータを圧縮して格納する場合、更新後データの格納の際には、一旦最終記憶媒体から更新されるデータをキャッシュに読み上げ(ステージング)、データの伸長を行って、伸長を行ったデータと更新データとをマージしてから圧縮することで更新後の圧縮データを生成し、その後当該更新後の圧縮データを再度最終記憶装置へディステージ(destage)する等の工夫が必要になる。
 この方法では、ストレージコントローラが更新データを格納する際、更新前データのステージング、マージ、ディステージといった処理による、ストレージコントローラの負荷が増大し、ライト性能が低下する。
 本発明の目的は、ストレージコントローラの負荷を低減することにある。
 上記課題を解決するために、本発明のストレージ装置は、ホスト計算機からライト要求のあったデータを圧縮して最終記憶媒体に格納する際、最終記憶媒体にデータを追記書き込みする構成を採用する。ライト時に、ホスト計算機からライト要求のあったデータのライト位置(アドレス)と、当該データの格納された最終記憶媒体上のアドレスとのマッピング情報を管理する。そしてホスト計算機から当該データのリード要求があった場合には、当該マッピング情報に基づいて、リード要求のあったデータの、最終記憶媒体上の格納先を特定し、データを最終記憶媒体から読み出して伸長し、ホスト計算機へと転送する。
 また本発明のストレージ装置は、最終記憶媒体に残った更新前データを削除するため、最終記憶媒体から所定サイズ領域のデータを一括して読み出し、読み出したデータのうち最新の更新データのみを最終記憶媒体へと書き戻すガベージコレクションを行う。その際、ガベージコレクション処理の一部を、ストレージ装置に搭載されるキャッシュ装置で実施することで、ストレージコントローラの負荷を削減する。
 本発明によれば、更新後圧縮データをストレージ装置の最終記憶媒体に追記書き込みすることで、更新前データのステージング、マージ等の処理を不要とし、ストレージコントローラの負荷が増大することを抑止することができる。またガベージコレクション処理の一部を、ストレージ装置が備えるキャッシュ装置にオフロードすることによって、ストレージコントローラの負荷を削減し、圧縮時のライト性能を向上させることができる。
図1は、本発明の実施例に係るストレージ装置の構成の一例を表す図である。 図2は、本発明の実施例に係るキャッシュメモリの構成の一例を表す図である。 図3は、本発明の実施例に係るキャッシュメモリがストレージコントローラに提供する論理領域LBA0、LBA1と、物理領域PBAの対応付けの概念を模擬的に示した図である。 図4は、本発明の実施例に係るキャッシュメモリが管理するLBA0-PBA変換テーブルとLBA1-PBA変換テーブルの内容を示した図である。 図5は、本発明の実施例に係るキャッシュメモリがサポートする、ライトコマンドとそのライトコマンドに対する応答情報を示した図である。 図6は、本発明の実施例に係るキャッシュメモリがサポートする、リードコマンドとその応答情報を示した図である。 図7は、本発明の実施例に係るキャッシュメモリがサポートする、LBA1マッピングコマンドとその応答情報を示した図である。 図8は、本発明の実施例に係るキャッシュメモリがサポートする、LBA0マッピングコマンドとその応答情報を示した図である。 図9は、本発明の実施例に係るキャッシュメモリがサポートする、マッピング解除コマンドとその応答情報を示した図である。 図10は、本発明の実施例に係るストレージ装置がホスト計算機に提供するボリュームとキャッシュとの関係を示す概念図である。 図11は、アドレスマッピングテーブルの一例を示した図である。 図12は、キャッシュ管理テーブルの一例を示した図である。 図13は、圧縮情報管理テーブルの一例を示した図である。 図14は、フリーリストの一例を示した図である。 図15は、領域管理テーブルの一例を示した図である。 図16は、本発明の実施例に係るキャッシュメモリがサポートする、ガベージコレクション要求コマンドとその応答情報を示した図である。 図17は、本発明の実施例に係るストレージ装置による、ガベージコレクション処理の流れを示した図である。 図18は、本発明の実施例に係るキャッシュメモリが実行するガベージコレクション処理の流れを示した図である。
 以下、本発明の実施形態について、図を用いて説明する。なお、本発明は、以下に説明する実施形態に限定されるものではない。また、本明細書では、「プログラムが…処理を実行する」のように、プログラムが動作主体となって特定の処理が実行されるような記載がされている箇所も存在するが、これは計算機のプロセッサ等のハードウェアが、そのプログラムを実行することを表現している。
 本発明の実施例の概要を、図1を用いて説明する。図1は、本発明の実施例に係るストレージシステムの構成の一例である。
 本システムは、ストレージ装置10とホスト計算機40によって構成される。ストレージ装置10とホスト計算機40は、SAN(Storage Area Network)やLAN(Local Area Network)などのネットワーク20によって接続される。
 ストレージ装置10は、ストレージコントローラ100とキャッシュ126、HDDなど複数の最終記憶装置190から構成される。
 ストレージコントローラ100は、ネットワーク20のインタフェースコントローラ100、ストレージ装置10全体の動作制御を行うCPU(プロセッサ)120、圧縮伸長機能を持つキャッシュメモリ(以下、「キャッシュ」と略記することもある)126、最終記憶装置190とのインタフェースコントローラ150を備え、これらはPCIなどの専用内部バス160によってASIC140で接続される。ストレージ装置10の各種処理はCPU120によって実行され、その制御プログラムや制御データ等を格納するメモリ130は、メモリバス180によってASIC140に接続される。ASIC140には、CPU120を介さずにメモリ130上のデータを転送するDMA(Direct Memory Access)を備える。また、ストレージコントローラ100は、バス170を介して最終記憶装置190と接続される。
 ホスト計算機40によってリード、ライトされるデータは、キャッシュ126に格納され、高速にアクセス可能である。
 キャッシュ126は圧縮伸長機能を持った一種の装置で、圧縮伸長機能を持たない最終記憶装置190のデータを圧縮および伸長する。以下、キャッシュメモリ126のことを、「キャッシュ装置」と呼ぶこともある。本発明の実施例におけるストレージ装置10は、キャッシュ126内部でデータを圧縮し、圧縮したデータを最終記憶媒体190であるHDDへ書き出す(ディステージする)。
 次に図2を用いて、キャッシュメモリ126の内部構成について説明する。本発明の実施例におけるキャッシュメモリ126は、フラッシュメモリ(Flash Memory)を記憶媒体として使用する。キャッシュメモリ126は内部に、FMコントローラ(FM CTL)410と複数(例えば32個)のFM420を備える。
 FMコントローラ410は、その内部にプロセッサ415、RAM(DRAM)413、データ圧縮/伸長ユニット418、Parity生成ユニット419、データバッファ416、I/Oインタフェース(I/F)411、FMインタフェース417、及びデータ転送を相互に行うスイッチ414を備えている。
 I/Oインタフェース411は、ストレージ装置10内のストレージコントローラ100が備える内部スイッチ122と接続し、スイッチ414を介してフラッシュコントローラ410の各部位と接続する。I/Oインタフェース411は、ストレージコントローラ100が備えるCPU120から、キャッシュメモリ126に対する各種コマンドを受け付ける、あるいはデータ転送を行うためのものである。
 プロセッサ415は、スイッチ414を介してFMコントローラ410の各部位と接続し、RAM413に記録されたプログラム及び管理情報を基にFMコントローラ410全体を制御する。データバッファ416は、フラッシュコントローラ410でのデータ転送処理途中のデータを一時的に格納するために用いられる。
 FMインタフェース(I/F)417は、複数バス(例えば16)によってFM420と接続する。各バスには複数(例えば2)のFM420が接続される。
 データ圧縮/伸長ユニット418は、可逆圧縮のアルゴリズムを処理する機能を有する。データ圧縮/解凍ユニット418は、プロセッサ415からの指示に従って、I/Oインタフェース411から到来してFM420に書き込まれるデータを圧縮する、またはFM420からI/Oインタフェース411へ送出されるデータを伸長する。尚、データ圧縮/伸長ユニットは、論理回路として実装してもよいし、圧縮/伸長のプログラムをプロセッサ415で処理することで、同様の機能を実現してもよい。
 Parity生成ユニット419は、RAID技術で必要とされる冗長データであるパリティの生成機能を有しており、具体的には、RAID5、6等で用いられるXOR(排他的論理和)演算、RAID6で用いられるリードソロモン符号またはEVENODD法により算出される対角パリティ(Diagonal Parity)の生成機能を有している。
 以上説明した、スイッチ414、ディスクインタフェース411、プロセッサ415、データバッファ416、FMインタフェース417、データ圧縮/伸長ユニット418、Parity生成ユニット419は、ASICやFPGA(Field Programmable Gate Array)として、一つの半導体素子内で構成してもよいし、複数の個別専用IC(Integrated Circuit)を相互に接続した構成であってもよい。
 RAM413は具体的にはDRAMなどの揮発性メモリが挙げられる。RAM413は、フラッシュモジュール110内で用いられるFM420の管理情報、各DMAが用いる転送制御情報を含んだ転送リスト等を格納する。尚、データを格納するデータバッファ416の役割の一部または全てをRAM413に含ませて、RAM413をデータ格納に用いる構成としてもよい。
 なお、本実施例では図2に示すように、キャッシュメモリ126にフラッシュメモリ(Flash Memory)を搭載した構成について記述しているが、キャッシュメモリ126に搭載する記憶媒体はフラッシュメモリに限定されるものではなく、Phase Change RAMやResistance RAMであってもよい。また、FM420の一部または全部を揮発性のRAM(DRAM等)とする構成であってもよい。
 続いて、本実施例においてキャッシュ126がストレージ装置10に提供する記憶空間について説明する。本実施例におけるキャッシュ126は、複数のFM(FMチップ)420を搭載し、複数のブロック、複数のページにより構成される記憶領域を管理し、自身が接続されるストレージコントローラ100(のCPU120)に対して、論理的な記憶空間を提供する。ここで、キャッシュ126が「記憶空間を提供する」とは、キャッシュ126の記憶空間上の各領域にアドレスが付けられており、キャッシュ126が接続されるストレージコントローラ100のCPU120が、当該アドレスを指定したアクセス要求(コマンド)を発行することにより、当該アドレスで特定された記憶空間上領域に格納されているデータの参照・更新が可能な状態にされていることを意味する。FM420により構成される物理記憶領域は、キャッシュ126内部のみで用いるアドレス空間に一意に対応づけて管理される。以降、このキャッシュ126内部のみで用いる物理領域指定用アドレス空間(物理アドレス空間)を、PBA(Physical Block Address)空間と呼び、PBA空間内の各物理記憶領域(セクタ。本発明の実施例では、1セクタは512バイトとする)の位置(アドレス)をPBAと記す。本実施例のキャッシュ126は、このPBAと、ストレージ装置に提供する論理記憶空間の領域のアドレスであるLBA(Logical Block Address)との対応付けを管理する。
 本実施例のキャッシュ126は、二つの論理記憶空間を有し、キャッシュ126が接続されるストレージコントローラ100に2つの論理記憶空間を提供することを特徴とする。この2つの論理記憶空間LBAとPBAの関係について図3を用いて説明する。
 図3は、本実施例のキャッシュ126がストレージコントローラ100に提供する論理記憶空間であるLBA0空間701及びLBA1空間702と、PBA空間703との対応付けの概念を示した図である。
 キャッシュ126は、LBA0空間701とLBA1空間702という2つの論理記憶空間を提供する。なお、これ以降、LBA0空間701上の各記憶領域に付されたアドレスのことを「LBA0」または「LBA0アドレス」と呼び、LBA1空間702上の各記憶領域に付されたアドレスのことを「LBA1」または「LBA1アドレス」と呼ぶ。また、本発明の実施例では、LBA0空間701のサイズ及びLBA1空間702のサイズはいずれも、PBA空間のサイズ以下とするが、LBA0空間701のサイズがPBA空間のサイズよりも大きい場合でも、本発明は有効である。
 LBA0空間701は、FM420により構成される物理記憶領域に記録された圧縮データを非圧縮データとして、ストレージコントローラ100のCPU120にアクセスさせるための論理記憶空間である。CPU120がLBA0空間701上のアドレス(LBA0)を指定してキャッシュ126にライト要求を発行すると、キャッシュ126は、ストレージコントローラ100からライトデータを取得し、データ圧縮/伸長ユニット418にて圧縮した後、キャッシュ126が動的に選択したPBAにより指定されるFM420上の物理記憶領域にデータを記録し、LBA0とPBAの対応付けを行う。また、CPU120がLBA0を指定してキャッシュ126にリード要求を発行すると、キャッシュ126は、LBA0に対応付けられたPBAが示すFM420の物理記憶領域からデータ(圧縮データ)を取得し、データ圧縮/伸長ユニット418にて伸長した後、この伸長したデータをリードデータとしてストレージコントローラ100に転送する。尚、このLBA0とPBAとの対応づけは、後述するLBA0-PBA変換テーブルにて管理する。
 LBA1空間702は、FM420により構成される物理記憶領域に記録された圧縮データを圧縮データのまま(伸長せず)、ストレージコントローラ100にアクセスさせるための論理記憶空間である。ストレージコントローラ100のCPU120が、LBA1を指定してキャッシュ126にライト要求を発行すると、キャッシュ126は、ストレージコントローラ100よりデータ(圧縮済みのライトデータ)を取得し、キャッシュ126が動的に選択したPBAにより指定されるFMの記憶領域にデータを記録し、LBA1とPBAの対応付けを行う。また、CPU120がLBA1を指定してリード要求を発行すると、キャッシュ126は、LBA1に対応付けられたPBAが示すFM420の物理記憶領域よりデータ(圧縮データ)を取得し、ストレージコントローラ100にリードデータとして圧縮済みデータを転送する。尚、このLBA1とPBAとの対応づけは、後述するLBA1-PBA変換テーブルにて管理する。
 尚、図3に示すとおり、圧縮データ713が記録された物理記憶領域であるPBA空間上の領域は、同時にLBA0空間の領域とLBA1空間の領域との両方に対応づけられることもある。例えば、圧縮データ713の伸長されたデータがLBA0空間上に伸長データ711として対応づけられ、圧縮データ713がそのままLBA1空間上に圧縮データ712として対応づけられる。たとえばCPU120が、LBA0(仮にLBA0が0x00000001000とする)を指定してキャッシュ126にデータをライトすると、当該データはキャッシュ126内のデータ圧縮/伸長ユニット418により圧縮され、圧縮されたデータはキャッシュ126が動的に選択したPBA空間上(具体的には、FM420の複数のページ中の、いずれかの未書き込みページ)に配置される。またそのデータはLBA0空間のアドレス0x00000001000に対応付けられた状態で管理される。その後CPU120が、0x00000001000に対応づけられたデータを、LBA1空間のアドレス(仮に0x80000000010とする)に対応付ける要求(後述する「LBA1マッピングコマンド」)をキャッシュ126に発行すると、このデータはLBA1空間にも対応づけられ、CPU120がLBA1アドレス0x80000000010のデータをリードする要求(リードコマンド)をキャッシュ126に対して発行すると、CPU120は、自身がLBA0アドレス0x00000001000に対して書き込んだデータを、圧縮した状態で読み出すことが出来る。
 なお、本発明の実施例におけるキャッシュ126で生成される圧縮データのサイズは、512バイト(1セクタ)の倍数のサイズに限定され、また非圧縮データのサイズを超えないサイズになるようにしている。つまり4KBのデータを圧縮した場合、最小サイズが512バイトで、最大サイズが4KBになる。
 続いて、本実施例におけるキャッシュ126が制御に用いる管理情報である、LBA0-PBA変換テーブル810とLBA1-PBA変換テーブル820について図4を用いて説明する。
 LBA0-PBA変換テーブル810は、キャッシュ126内のDRAM413内に格納されており、キャッシュLBA0(811)、キャッシュPBA(812)、PBA長(813)の情報から構成される。キャッシュ126のプロセッサ415は、上位装置からリード要求時に指定されるLBA0を受信した後、そのLBA0を用いて、実際のデータが格納されている場所を示すPBAを取得する。
 また、更新ライト時には、キャッシュ126は更新データ(ライトデータ)を更新前データが記録されたPBAとは異なる物理記憶領域に記録し、更新データを記録したPBAとPBA長を、LBA0-PBA変換テーブル810の該当する箇所に記録し、LBA0-PBA変換テーブル810を更新する。キャッシュ126はこのように動作することによって、LBA0空間上領域のデータの上書きを(疑似的に)可能にしている。
 キャッシュLBA0(811)は、キャッシュ126が提供するLBA0空間の論理領域を4KB単位ごとに順に並べたものである(LBA0空間の各アドレス(LBA0)は、1セクタ(512バイト)ごとに付されている)。本実施例におけるLBA0-PBA変換テーブル810では、キャッシュLBA0(811)とキャッシュPBA(812)との対応付けが4KB(8セクタ)単位で管理されていることを意図している。但し、このキャッシュLBA0(811)とキャッシュPBA(812)との対応付けを4KB単位以外の任意の単位で管理してもよい。
 キャッシュPBA(812)は、キャッシュLBA0(811)に対応付けられたPBAの先頭アドレスを格納するフィールドである。本実施例では、PBA空間の物理記憶領域を512バイト(1セクタ)毎に分割して管理する。図4の例では、キャッシュLBA0(811)「0x000_0000_0000」に対応付けられたPBAとして、「XXX」という値(PBA)が対応付けられている。この値は、キャッシュ126が搭載する複数のFM420のうちの、ある記憶領域を一意に示すアドレスである。これにより、リードリクエスト先の先頭アドレス(LBA0)として「0x000_0000_0000」を受領した場合、キャッシュ126内の物理記憶領域(リード先)の先頭アドレス(PBA)として「XXX」が取得される。また、キャッシュLBA0(811)で特定されるLBA0に対応付けられたPBAが無い場合、キャッシュPBA(812)には「未割当」であることを示す値(NULLあるいは0xFFFFFFFFなど)が格納される。
 PBA長813には、キャッシュLBA0(811)に指定された4KBのデータの、実際の格納サイズが記録される。なお、格納サイズはセクタ数にて記録されている。図4に示す例では、LBA0「0x000_0000_0000」を開始アドレスとする4KB(LBA0空間としては8sector)のデータは、PBA長として「2」すなわち512B×2=1KBの長さで、記録されていることを示している。従って、キャッシュPBA(812)の情報と組み合わせるとLBA0[0x000_0000_0000]を開始アドレスとする4KBのデータは、PBA「XXX」から「XXX+2」の1KBの領域に圧縮して格納されていることを表している。なお、本実施例におけるキャッシュ126では、ストレージコントローラ100のCPU120からライト指示された非圧縮データを、4KB単位で圧縮する。たとえばCPU120から、LBA0空間のアドレス(0x000_0000_0000)を開始アドレスとする8KBのデータ(非圧縮データ)のライト要求があった場合、(LBA0空間の)アドレス範囲0x000_0000_0000~0x000_0000_0007の4KBのデータを単位として圧縮して圧縮データを生成し、続いてアドレス範囲0x000_0000_0008~0x000_0000_000Fの4KBのデータを単位として圧縮して圧縮データを生成し、それぞれの圧縮データをFM420の物理記憶領域に書き込む。ただし、本発明はデータを4KB単位で圧縮する態様に限定されるものではなく、その他の単位でデータが圧縮される構成であっても本発明は有効である。
 続いて、LBA1-PBA変換テーブル820について説明する。LBA1-PBA変換テーブル820は、キャッシュ126内のDRAM413内に格納されており、キャッシュLBA1(821)、キャッシュPBA(822)の2つの情報から構成される。キャッシュ126のプロセッサ415は、上位装置からリード要求時に指定されるLBA1を受信した後、受信したLBA1を、LBA1-PBA変換テーブル820を用いて、LBA1実際のデータが格納されている場所を示すPBAに変換する。
 キャッシュLBA1(821)は、キャッシュ126が提供するLBA1空間の論理領域をセクタごとに順に並べたものである(キャッシュLBA1(821)内の数値1は、1セクタ(512バイト)を意味する)。これは、本実施例におけるキャッシュ126が、キャッシュLBA1(821)とキャッシュPBA(822)との対応付けを512B単位で管理する前提で記載されているためだが、このキャッシュLBA1(821)とキャッシュPBA(822)との対応付けは、512B単位にて管理される態様に限定されるものではなく、如何なる単位で管理してもよい。但し、LBA1は、圧縮データの格納先である物理記憶領域PBAを直接マッピングする空間であり、PBAの分割管理サイズと同等であることが望ましいことから、本実施例では、512B単位で分割して管理する。
 キャッシュPBA(822)は、LBA1に対応付けられたPBAの先頭アドレスを格納するフィールドである。本実施例では、PBAを512B毎に分割して管理する。図4の例では、キャッシュLBA1「0x000_0000_0002」に「ZZZ」というあるPBA値が対応付けられている。このPBA値は、キャッシュ126が搭載する、あるFM420の記憶領域を一意に示すアドレスである。これにより、リードリクエスト先の先頭アドレス(LBA1)として、「0x000_0000_0002」を受領した場合、キャッシュ126内の物理的なリード先の先頭アドレスとして「ZZZ」が取得される。また、キャッシュLBA1(821)で特定されるLBA1に対応付けられたPBAが無い場合、キャッシュPBA(822)には「未割当」であることを示す値が格納される。
 続いて、本発明が適用されるキャッシュメモリ126がサポートする、主なコマンドについて説明する。本実施例におけるキャッシュメモリ126は、ストレージコントローラ100のCPU120からコマンドを受理すると、当該受理したコマンドの内容を解析して所定の処理を行い、処理完了後に応答(応答情報)をストレージコントローラに返答する。なお、コマンドには、キャッシュメモリ126が所定の処理を行うために必要となる情報の集合が含まれており、たとえばキャッシュメモリ126にデータの書き込みを指示するライトコマンドであれば、コマンド中には、そのコマンドがライトコマンドであることを示す情報及びライト処理の実行に必要となる情報(ライトデータの書き込み位置やデータ長など)を含んでいる。キャッシュメモリ126は複数種類のコマンドをサポートしているが、最初に各コマンドに共通の情報について説明する。
 各コマンドには、共通の情報として、オペレーションコード(Opcode)とコマンドIDという情報が、先頭に含まれている。そしてコマンドIDの後に、各コマンドに固有の情報(コマンドパラメータ。パラメータとも呼ばれる)が付加されて、1つのコマンドが形成される。たとえば図5は、本実施例におけるキャッシュメモリ126のLBA0ライトコマンドのフォーマットと、そのライトコマンドに対する応答情報のフォーマットを示した図であるが、図5の要素(フィールド)1011がOpcode、要素1012がコマンドIDである。そして要素1013以降の各情報が、ライトコマンドに固有のコマンドパラメータである。また、各コマンドの処理完了後に返送される応答情報として、コマンドIDとステータス(Status)が、全応答情報に共通に含まれる情報であり、ステータスの後に各応答情報に固有の情報が付加されることもある。
 オペレーションコード(Opcode)は、コマンドの種別をキャッシュメモリ126に通知するための情報であり、コマンドを取得したキャッシュメモリ126は、この情報を参照することにより、通知されたコマンドの種類を認識する。たとえばライトコマンドの場合、0x01というOpcodeで、リードコマンドの場合、0x02というOpcodeであると決められている。
 コマンドIDは、コマンドの固有のIDを格納するフィールドであり、コマンドの応答情報には、どのコマンドに対する応答情報であるかを、ストレージコントローラ100に認識させるために、このフィールドに、指定されたIDが付与される。ストレージコントローラ100は、コマンド作成時にコマンドを一意に識別可能なIDを生成して、このコマンドIDのフィールドにこのIDを格納したコマンドを作成し、キャッシュメモリ126にコマンドを送信する。そして、キャッシュメモリ126では、受信したコマンドに対応した処理が完了すると、当該コマンドのコマンドIDを応答情報に含めてストレージコントローラ100に返送する。ストレージコントローラ100は、この応答情報を受領した際、応答情報に含まれるIDを取得することで、当該コマンドの完了を認識する。また、応答情報に含まれるステータス(図5の要素1022)は、コマンドの処理が正常に完了したか否かを表す情報が格納されるフィールドである。コマンドの処理が正常に完了しなかった(エラー)場合、ステータスには、例えばエラー原因等を識別できる番号が格納される。
 以下、主なコマンド(ライトコマンド、リードコマンド、LBA1マッピングコマンド、LBA0マッピングコマンド、マッピング解除コマンド)の内容について説明する。なお、キャッシュメモリ126は、パリティ生成ユニット419を使用してパリティを生成するコマンドなどもサポートしているが、本発明には直接関係しない機能であるため、ここでは説明を省略する。
(1)ライトコマンド
 図5は、本実施例におけるキャッシュメモリ126のライトコマンドとそのライトコマンドに対する応答情報を示した図である。本実施例におけるキャッシュメモリ126のLBA0ライトコマンド1010は、コマンド情報として、オペレーションコード1011、コマンドID1012、LBA0/1開始アドレス1013、LBA0/1長1014、圧縮要否フラグ1015、ライトデータアドレス1016により構成される。尚、本実施例では、上記の情報から構成されるコマンドの例について記すが、上記以上の付加的な情報があってもよい。例えば、DIF(Data Integrity Field)等に関連する情報がコマンドに付与されていたとしてもよい。
 LBA0/1開始アドレス1013は、ライト先の論理空間の先頭アドレスを指定するフィールドである。なお、本発明の実施例におけるLBA0空間はアドレス0x000_0000_0000から0x07F_FFFF_FFFFの範囲の空間であり、LBA1空間はアドレス0x800_0000_0000以降0xの空間と定められているので、キャッシュメモリ126は、ライトコマンドのLBA0/1開始アドレス1013に0x000_0000_0000から0x07F_FFFF_FFFFの範囲のアドレスが格納されていた場合、LBA0空間のアドレスが指定されたと認識し、0x800_0000_0000以降のアドレスが指定されていた場合、LBA1空間のアドレスが指定されたと認識する。ただLBA0空間とLBA1空間のいずれのアドレス空間に従うアドレスが指定されたかを認識する方法は、上で説明した方法以外の方法を採用することも可能である。たとえばOpcode1011の内容によってLBA0空間とLBA1空間を識別する方法などもありえる。
 LBA0/1長1014は、LBA0/1開始アドレス1013から始まる記録先LBA0またはLBA1の範囲(長さ)を指定するフィールドで、セクタ数で表された長さが格納される。キャッシュメモリ126は、前述のLBA0/1開始アドレス1013とLBA0/1長1014で特定される範囲のLBA0/1領域に対して、ライトデータを格納したPBA領域を対応づける処理を行う。
 圧縮要否フラグ1015は、このコマンドが指示するライト対象データの圧縮要否を指定するフィールドである。本実施例のストレージ装置10では、CPU120がキャッシュメモリ126に対して、圧縮が不要であることを明示的に伝える場合、LBA1アドレスを指定したライトコマンドを発行するため、この圧縮要否フラグ1015は使用しない。ただしストレージコントローラ100がライトコマンドを作成する際、ホスト計算機40から到来するライト対象データにデータ圧縮によるサイズ削減効果が見込めない(例えば既に画像圧縮等で圧縮されたデータと認識している場合)ことが事前に分かっている場合、このフラグの値をONにする(「1」を格納する)ことで、キャッシュメモリ126に圧縮が不要であることを通知することを可能にする。このフラグがONの場合には、キャッシュメモリ126は圧縮を実行しないという機能を持つ。
 ライトデータアドレス1017とライトデータ長1018はそれぞれ、このコマンドが指示するライト対象データの現在の格納先(本発明の実施例ではメモリ130のアドレス)の先頭アドレス、そしてデータの長さを格納するフィールドである。ライト対象データがメモリ130の連続領域に格納されている場合、ライトコマンド中には、ライトデータアドレス1017とライトデータ長1018の組は1つだけ格納されており、その時リスト数1016には「1」が格納される。一方、ライト対象データがメモリ130内の複数の領域に離散的に格納されている場合、ライトコマンド中にはライトデータアドレス1017とライトデータ長1018の組が複数格納され、リスト数1016には、ライトデータアドレス1017とライトデータ長1018の組が格納されている数が格納される。キャッシュメモリ126は、このフィールドに指示されたメモリ130上領域から、LBA0/1長(1014)に格納されているサイズの領域のデータを取得することでライトデータの取得を行う。尚、ライトコマンド中にライトデータアドレス1017とライトデータ長1018の組を複数格納するフォーマット以外に、別のコマンドフォーマットを採用してもよい。たとえば、複数のアドレス(ライトデータアドレス1017とライトデータ長1018の組)が格納されたリストのポインタ情報(リストが格納されているアドレス(たとえばメモリ130内のアドレス))をライトコマンドに格納し、キャッシュメモリ126が当該ポインタ情報を参照してライトデータアドレス1017とライトデータ長1018を取得する態様もあり得る。
 ライト応答情報1020は、コマンドID1021、ステータス1022、圧縮データ長1023により構成される。コマンドID1021とステータス1022は、各コマンド共通の応答情報であるので説明を省略する。圧縮データ長1023は、ライトしたデータの圧縮後のデータ長を記録するフィールドである。ストレージコントローラ100は、このフィールドを取得することで、ライトしたデータの圧縮後のデータサイズを把握できる。また、本実施例では、ライト先(LBA0/1開始アドレス1013)がLBA1であるとき、圧縮済みのデータを記録することとなっている為、本フィールドは無効となる。
 なお、ライトコマンドのLBA0/1開始アドレス1013、LBA0/1長1014で指定されるLBA0空間(またはLBA1空間)の領域には、PBAが対応付けられている場合もあれば、PBAが対応付けられていない場合もある。PBAが対応付けられていない場合は、キャッシュメモリ126は新たにPBAを対応付けて、そのあと当該PBAで指定される領域にデータを書き込む。PBAが対応付けられている場合、当該対応付けられていたPBAで指定される領域は未使用領域として管理し、新たなPBAを対応付け、そのあと当該PBAで指定される領域にデータを書き込む。これは、本発明の実施例におけるキャッシュメモリ126の記憶媒体がフラッシュメモリを採用しており、フラッシュメモリは原則上書きが不可能(上書きする場合、一旦データの書き込まれているブロックを消去する処理が必要)であるためである。そして未使用領域として管理する領域が一定数以上になった場合(あるいは書き込み可能なページが不足してきた場合)、キャッシュメモリ126では未使用領域のみのブロックを消去する等の処理を行って、未書き込みページを作成(ガーベッジコレクション)する。ただしこれらの処理は、周知のフラッシュメモリを用いた記憶デバイスで行われている処理(ガーベッジコレクション)と同様であるため、本実施例では詳細な説明は省略する。また、このガーベッジコレクションは、本発明の実施例において後述するGC(最終記憶媒体上の未使用領域を整理する処理)とも異なることに留意する必要がある。以下でガベージコレクション(GC)と表記されている場合、ここで述べたフラッシュメモリ上の未書き込みページを作成する処理ではなく、最終記憶媒体上の未使用領域を整理する処理のことを指す。
(2)リードコマンド
 図6は、本実施例におけるキャッシュメモリ126がサポートする、リードコマンドとそのリードコマンドへの応答情報を示した図である。本実施例におけるキャッシュメモリ126のリードコマンド1610は、コマンド情報として、オペレーションコード1611、コマンドID1012、LBA0/1開始アドレス1613、LBA0/1長1614、伸長要否フラグ1615、リードデータアドレス1616により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。尚、コマンドID1012は先のLBA0ライトコマンドと同一の内容の為、説明は省略する。
 オペレーションコード1111は、コマンドの種別をキャッシュメモリ126に通知するフィールドであり、コマンドを取得したキャッシュメモリ126は、このフィールドにより通知されたコマンドが圧縮データサイズ取得コマンドであることを認知する。
 LBA0/1開始アドレス1613は、リード先の論理空間の先頭アドレスを指定するフィールドである。LBA0/1長1614は、LBA0/1開始アドレス1613から始まる記録先LBA0またはLBA1の範囲を指定するフィールドである。キャッシュメモリ126は、前述のLBA0またはLBA1開始アドレス1613とLBA0/1長1614が示す範囲のLBA0空間またはLBA1空間の領域に対して対応付けられたPBAからデータを取得し、取得したデータを(必要に応じて伸長して)ストレージコントローラ100に転送することでリード処理を行う。
 伸長要否フラグ1615は、このコマンドが指示するリード対象データの伸長要否を指定するフィールドである。ストレージ装置がリードコマンドを作成する際、このフラグを制御することで、キャッシュメモリ126に伸長が不要であることを通知する。尚、このフィールドは、リードコマンドに含まれていなくても良い。本実施例のキャッシュメモリ126の場合、LBA1を指定してリードする際、取得データの伸長を行わないため、伸長要否フラグ1615は必須ではない。ただし別の実施形態として、キャッシュメモリ126がLBA1を指定したリードコマンドを受信した時、伸長要否フラグ1615がOFF(0)の場合にはデータを伸長し、伸長要否フラグ1615がON(1)の場合にはデータを伸長せずにデータリードを行うようにしてもよい。
 リードデータアドレス1616は、リード対象データの出力先領域の先頭アドレスが指定される(たとえばメモリ130内のアドレス)。リードされたデータはリードデータアドレス1616で指定されたアドレスの領域から、連続的にLBA0/1長1614で指定された長さのデータが格納されることになる。なお、ライトコマンドと同様に、リードデータアドレス1616とデータ長の組を複数、リードコマンドのパラメータとして指定できるようにし、離散的な領域にデータを出力することを可能とする態様もありえる。
 リード応答1620は、その他のコマンドの応答情報と共通の情報(コマンドID1021、ステータス1022)のみを含むものであるため、説明は省略する。なお、共通の情報以外の付加的な情報がリード応答1620に含まれている構成でもよい。
(3)LBA1マッピングコマンド
 本実施例におけるキャッシュメモリ126では、LBA0の領域を指定してライトしたデータを、キャッシュメモリ126が圧縮してFM420に記録する。そしてその後、この圧縮データを圧縮状態のまま最終記憶媒体へ書き込む必要があるが、LBA1マッピングコマンドはそのために用いられる。
 図7は、本実施例におけるキャッシュメモリ126でサポートされる、LBA1マッピングコマンドと、そのLBA1マッピングコマンドに対する応答情報を模式的に示した図である。LBA1マッピングコマンド1210は、コマンド情報として、オペレーションコード1011、コマンドID1012、LBA0開始アドレス1213、LBA0長1214、LBA1開始アドレス1215、により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。
 LBA0開始アドレス1213は、LBA1に圧縮データをマッピングする対象データのLBA0領域を指定する先頭アドレスを指定するフィールドである。LBA0長1214は、LBA1へのマッピング対象となるLBA0開始アドレス1213から始まるLBA0の範囲を指定するフィールドである。なお、LBA0開始アドレス1213とLBA0長1214は、8セクタ(4KB)の倍数に限定される。
 LBA1開始アドレス1215は、マッピングするLBA1の開始アドレスを指定するフィールドである。ストレージコントローラ100のCPU120は、予めマッピングするデータサイズを把握しており、このデータサイズがマッピング可能なLBA1の領域を確保し、この先頭アドレスをLBA1開始アドレス12115フィールドに格納して、当該コマンドをキャッシュメモリ126に発行する。
 本実施例のキャッシュメモリ126は、前述のLBA0開始アドレス1213とLBA0長1214が示す範囲のLBA0領域に対応づけられている圧縮データを、LBA1開始アドレス1215から、圧縮データサイズ分の領域に渡ってマッピングを行う。より具体的には、LBA0-PBA変換テーブル810を参照し、LBA0開始アドレス1213とLBA0長1214が示す範囲のLBA0空間に対応付けられたPBA(キャッシュPBA812)を取得する。そして、LBA1-PBA変換テーブル820を参照し、LBA1開始アドレス1215から、取得したPBAの総サイズと同サイズとなるLBA1範囲のエントリ(キャッシュLBA1(821)で特定されるエントリ)のPBA822欄に、取得したPBAのアドレスを記入する。これにより、この後CPU120が当該コマンドによりマッピングしたLBA1アドレスを指定したリードコマンドをキャッシュメモリに発行すると、LBA0開始アドレス1213とLBA0長1214が示す範囲のLBA0領域に対応づけられていた圧縮データを、圧縮された状態のまま読み出すことができる。CPU120は、このLBA1マッピングコマンドとリードコマンドとを用いることによって、キャッシュメモリ126によって圧縮されたデータを読み出して、当該圧縮されたデータを最終記憶媒体190に書き出すことができる。なお、LBA1マッピングコマンドを受信した時、LBA0開始アドレス1213とLBA0長1214が示す範囲のLBA0領域に、すでにLBA1開始アドレス1215で特定されるLBA1アドレスが対応付けられていたとき、この既に対応付けられていたLBA1アドレスに関して、対応付けは解除され(具体的にはLBA1-PBA変換テーブル820の、既に対応付けられていたLBA1アドレスに対応するエントリのPBA822欄から情報が削除される)、LBA0-PBA変換テーブル810とLBA1-PBA変換テーブル820には、LBA1マッピングコマンドで指定されたLBA0とLBA1とが対応している旨を表す情報が登録される。
 LBA1マッピング応答1220は、コマンドID1021、ステータス1022、により構成される。尚、本実施例では、上記の情報による応答情報の例について記すが、上記以上の付加的な情報があってもよい。
(4)LBA0マッピングコマンド
 本実施例のストレージ装置10は、最終記憶媒体からデータ(圧縮データ)を読み出すと、LBA1の領域を指定したライトコマンドをキャッシュメモリ126に発行して、キャッシュメモリ126(のFM420)に圧縮データを格納する。また、FM420に記録された圧縮データは、ホスト計算機40からのリード要求等があった場合には、伸長した状態でホスト計算機40に送信される必要がある。LBA0マッピングコマンドはそのために用いられる。
 図8は、本実施例におけるキャッシュメモリ126がサポートするLBA0マッピングコマンドと、当該LBA0マッピングコマンドへの応答情報を示した図である。本実施例におけるキャッシュメモリ126のLBA0マッピングコマンド1210は、コマンド情報として、オペレーションコード1011、コマンドID1012、LBA1開始アドレス1913、LBA1長1914、LBA0開始アドレス1915、により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。
 LBA1開始アドレス1913は、LBA1に圧縮データをマッピングする対象データのLBA1領域を指定する先頭アドレスを指定するフィールドである。LBA1長1914は、LBA1へのマッピング対象となるLBA0開始アドレス1213から始まるLBA1の範囲を指定するフィールドである。
 LBA0開始アドレス1915は、マッピングするLBA0の開始アドレスを指定するフィールドである。ストレージコントローラ100は、ストレージ装置が管理する圧縮情報より、LBA1に記録した圧縮データの伸長後のデータサイズを知っており、このデータサイズがマッピング可能なLBA0の領域を確保し、この先頭アドレスをLBA0開始アドレス1915フィールドに記入する。また、LBA0開始アドレス1915に指定できるアドレスは、8セクタ(4KB)の倍数に限定される。
 本実施例のキャッシュメモリ126は、ストレージコントローラ100からLBA0マッピングコマンドを受け付けると、前述のLBA1開始アドレス1913とLBA0長1914が示す範囲のLBA1領域に対応づけられている圧縮データをLBA0開始アドレス1915から、伸長後のデータサイズ分の領域に渡ってマッピングを行う。マッピングの具体的な処理は、LBA1マッピングコマンドと同様で、LBA1開始アドレス1913とLBA0長1914が示す範囲のLBA1領域の範囲に対応付けられているPBAの情報を、LBA0-PBA変換テーブル810に登録することでマッピングが行われる。これにより、この後CPU120が当該コマンドによりマッピングしたLBA0アドレスを指定したリードコマンドをキャッシュメモリに発行すると、LBA1開始アドレス1913とLBA0長1914が示す範囲のLBA1領域に対応づけられている圧縮データを、伸長された状態で読み出すことができる。
 LBA0マッピング応答1920は、その他のコマンドの応答情報と共通の情報(コマンドID1021、ステータス1022)のみを含むものであるため、説明は省略する。なお、共通の情報以外の付加的な情報がLBA0マッピング応答1920に含まれている構成でもよい。
(5)マッピング解除コマンド
 本実施例では、ストレージコントローラ100は圧縮して記録したライトデータを圧縮した状態で取得する為、または圧縮データに対してParityを生成する為、データをLBA1にマッピングする。また、圧縮した情報を伸長して取得するために、LBA1を指定してキャッシュメモリ126に記録したデータをLBA0にマッピングする。こうしてマッピングした領域は、処理が終了し不要となった場合、マッピングを解除する。本実施例のストレージ装置は、マッピング解除コマンドを用いて、PBAに対応付けたLBA0またはLBA1の領域の対応付けを解除する。
 図9は、本実施例におけるキャッシュメモリ126がサポートする、マッピング解除コマンドとそのマッピング解除コマンドへの応答情報を示した図である。本実施例におけるキャッシュメモリ126のマッピング解除コマンド1710は、コマンド情報として、オペレーションコード1011、コマンドID1012、LBA0/1開始アドレス1713、LBA0/1長1714、により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。以下、マッピング解除コマンドに固有のパラメータの内容と、マッピング解除コマンドをキャッシュメモリ126が受け付けた時に行われる処理について説明する。
 LBA0/1開始アドレス1713は、マッピングを解除する論理空間の先頭アドレスを指定するフィールドで、LBA0空間、LBA1空間の両方のアドレス空間のアドレスが指定可能である。ただし、LBA0空間のアドレスが指定される場合には、そのアドレスは4KB(8セクタ)境界のアドレスでなければならず、4KB(8セクタ)境界でないアドレスが指定された場合、キャッシュメモリ126はエラーを返す。LBA0/1長1714は、LBA0/1開始アドレス1713から始まる記録先LBA0またはLBA1の範囲を指定するフィールドである。
 ここまで、キャッシュメモリ126の構成と機能について説明してきたが、以下ではストレージ装置10がホスト計算機40からI/O要求(リード、ライトコマンド)を受信した場合、キャッシュメモリ126をどのように用いて処理を行うか、概説する。まず、ストレージ装置10がホスト計算機40に提供する記憶領域(ボリューム)とキャッシュ(キャッシュメモリ126から構成される)との関係について、図10の概念図を用いて説明する。
 本発明のストレージ装置10は、ホスト計算機40に対して1または複数のボリューム5000を提供するが、以下ではこのホスト計算機40に対して提供されるボリュームのことを「伸長VOL」(図中の要素5000に対応する)と呼ぶ。伸長VOL5000に対してホスト計算機40から書き込まれたライトデータは、ストレージ装置10のキャッシュであるキャッシュメモリ126に書き込まれる。その時、先に述べたとおり圧縮された状態で、キャッシュメモリ126の記憶領域(FM420で構成される)に書き込まれる。ただしホスト計算機40には、データが圧縮されていることは見せないようにし、ホスト計算機40が伸長VOL5000に対してリード要求を発行し、以前伸長VOL5000に書き込んだデータを読み出した場合、非圧縮のデータが読み出される。
 本発明の目的は、データを圧縮した状態で最終記憶媒体190に格納することであるため、キャッシュメモリ126に格納された圧縮データを、圧縮された状態のまま最終記憶媒体190に書き込む。この場合の問題は、データを圧縮する際、データサイズがデータ内容に依存して変動する点である。一般的なストレージ装置では、ボリュームに対するデータ更新要求と更新データを受け取った時、当該更新データの更新前データの格納されている領域に当該更新データを上書きして格納する。しかし、圧縮データを最終記憶媒体に格納する構成の場合、ボリュームに最初に格納された圧縮データに対し、更新(上書き)の要求が来たとすると、更新データの圧縮の結果、当該更新データの圧縮データのサイズは、最初に格納された圧縮データのサイズよりも大きくなることもある。その場合、最終記憶媒体に対する上書きが不可能になる。そこで本発明のストレージ装置10では、更新データを更新前データと同一領域には書き込まず、最終記憶媒体190に追記書きする構成をとる。
 圧縮データを格納、管理するために、伸長VOLとは別のボリューム(圧縮VOL5500と呼ぶ)を用意し、伸長VOLに書き込まれたデータ(正確には、ホスト計算機40から発行される、伸長VOL上の領域を指定したライトコマンド要求とともにストレージ装置10に送信されたデータであって、一旦キャッシュ126に圧縮データとして格納されているデータ、であるが、本明細書ではこれを「伸長VOLに書き込まれたデータ」と表現する)を疑似的に圧縮VOL5500に移動する処理を行う。圧縮VOL5500は、周知のストレージ装置が、ホスト計算機等の上位装置に対して提供する論理ボリュームと同じもので、1または複数の最終記憶媒体190の記憶領域を用いて1つの圧縮VOL5500(論理ボリューム)が構成されている。論理ボリューム(圧縮VOL)の構成は様々な態様がありえ、たとえば複数の最終記憶媒体190でRAIDグループを構成して、当該RAIDグループ内の部分領域を1つの論理ボリュームとする構成、1つの最終記憶媒体190を1つの論理ボリュームとする構成等があり得る。または最近のストレージ装置が採用している、いわゆるThin Provisioning技術を用いて形成される仮想的なボリュームを、本発明の論理ボリュームとしても、本発明は有効である。ただし、以降で説明する実施例では説明の簡単化のため、1つの最終記憶媒体190が1つの論理ボリューム(圧縮VOL5500)に相当する構成とする。そのため、アクセス先の圧縮VOLが特定されると、それに伴い圧縮VOLに対応する最終記憶媒体190が一意に決定され、圧縮VOL内の各記憶領域(セクタ)に付されたアドレスと、当該圧縮VOLに対応する最終記憶媒体の各記憶領域(セクタ)に付されたアドレスは同じである。
 なお、伸長VOLに書き込まれたデータを疑似的に圧縮VOL5500に移動する処理は、キャッシュメモリ126が2つのアドレス空間をストレージコントローラ100に提供可能であることを利用する。伸長VOLにホスト計算機40からデータが書き込まれると、ストレージコントローラ100はそのデータをキャッシュ126に格納するが、その際、LBA0空間のアドレスを指定して格納する。一方、ストレージコントローラ100が、ホスト計算機40からのリード要求に応答するために、最終記憶媒体190(本発明の実施例では、圧縮VOLに相当する)からデータを読み出す際、読み出したデータは一旦キャッシュメモリ126に格納されるが、その時は、LBA1空間のアドレスを指定して格納する。
 伸長VOLに書き込まれたデータを疑似的に圧縮VOL5500に移動する際の概要は以下の通りである。以下では一例として、伸長VOLのアドレス(LBA)X番地に書き込まれたデータ(実体はキャッシュに圧縮データとして格納されている)を疑似的に圧縮VOL5500に移動する場合について説明する。ホスト計算機40から伸長VOLのアドレス(LBA)X番地に対するデータ書き込み要求を受け付けると、データは一旦メモリ130のバッファ領域1302に書き込まれ、これと同時にストレージコントローラ100はキャッシュメモリ126のLBA0空間上の未使用領域を確保する(ここではLBA0空間のアドレス(LBA0)x番地の領域を確保したとする)。領域を確保すると、ストレージコントローラ100はキャッシュメモリ126に対して、先に説明したライトコマンドを発行して、バッファ領域1302上のライトデータをキャッシュメモリ126に格納し、また伸長VOLのアドレスX番地のデータはキャッシュメモリ126のLBA0空間のアドレス(LBA0)x番地に格納されている旨を表す情報を、管理情報(後述するキャッシュ管理テーブル1301)に格納する。この時点でホスト計算機40には、データ書き込みが完了した旨の応答を返却する。
 以降の処理は、ホスト計算機40からのデータ書き込み要求とは非同期に、任意の契機(たとえばCPU120の負荷が低い時など)で行われる処理である。ストレージコントローラ100は、伸長VOLのアドレスX番地に対して書き込まれたデータを圧縮VOLのどの位置(LBA)に移動する(対応付ける)べきか、決定する(この決定されたアドレスを仮にY番地とする)。先に述べた通り、圧縮VOLにはデータを追記書きするため、圧縮VOL上のアドレスY番地は、圧縮VOL上の未書き込み領域が選択される。具体的には、ストレージコントローラ100は前回伸長VOLから圧縮VOLに対してデータの移動を行った時に、最後に圧縮VOLにデータが書き込まれたアドレスを記憶しておき(後述する領域管理テーブル650内で管理される、最終書き込み位置657に記憶されている)、この記憶されているアドレスの次のアドレスから追記書きを行う。
 そして、伸長VOLのアドレスと圧縮VOLのアドレスとの対応付けを管理する管理情報(後述するアドレスマッピングテーブル600)に、この対応付けについての情報を格納する。またストレージコントローラ100は、キャッシュメモリ126のLBA1空間上の未使用領域を確保し(仮にy番地を確保したとする)、圧縮VOLのアドレス(Y番地)に格納されるべきデータを、キャッシュメモリ126上では、キャッシュLBA1空間上のy番地に格納することに決定する。
 そしてストレージコントローラ100は、キャッシュメモリ126に対して先に説明したLBA1マッピングコマンドを発行し、伸長VOLに対してのライトデータが格納されている、キャッシュメモリ126のアドレス(LBA0空間のx番地)を、キャッシュメモリ126のLBA1空間アドレスのy番地にマッピングする。そしてストレージコントローラ100は、キャッシュメモリ126のLBA1空間アドレスのy番地には圧縮VOLのアドレスY番地に書き込まれるべきデータが格納されている旨を、ストレージコントローラ100の管理する管理情報(後述する圧縮情報管理テーブル1303)に記憶しておく。これにより、データの実体を物理的に移動せずに、伸長VOL上から圧縮VOL上への疑似的なデータ移動を実現している。
 その後ディステージを行う際には、この管理情報(圧縮情報管理テーブル1303)を用いて、キャッシュメモリ126上のデータ(LBA1空間のアドレスy番地に格納されている)を読み出して、圧縮VOL(最終記憶媒体190)のアドレス(Y番地)に書き出すことによって、圧縮されたデータを最終記憶媒体190に書き出すことが出来る。なお、伸長VOL上から圧縮VOL上への(疑似的な)データ移動は、最小で8セクタ(4KB)単位で行われる。これは、本発明の実施例におけるキャッシュメモリ126が、4KB単位でデータ圧縮を行うため、ストレージ装置10は伸長VOLに書き込まれたデータを圧縮する際、伸長VOLの先頭から4KBの領域ごとに圧縮するようにしており、データ移動の最小単位を8セクタ(4KB)とすると管理が容易になるためである。ただしデータ移動の最小単位を4KB以外の単位にしても、本発明は有効である。
 ストレージ装置10が、ホスト計算機40から伸長VOL内のデータをリードする要求を受け取った場合には、上記の逆の処理が行われる。まず伸長VOLのアドレスと圧縮VOLのアドレスとの対応付けを管理する管理情報(後述するアドレスマッピングテーブル600)を参照し、今回のリード要求で指定された伸長VOL上の領域のアドレス(仮にこのアドレスをX番地とする)を、当該伸長VOL上の領域に対応する圧縮VOL(最終記憶媒体190)上領域のアドレスに変換し(この結果、仮にY番地に変換されたとする)、圧縮VOL(最終記憶媒体190)のY番地からデータを読み出し、一旦バッファ領域1302に格納する。続いてストレージコントローラ100はキャッシュメモリ126のLBA1空間上の領域を確保する(ここではLBA1空間のアドレス(LBA1)y番地の領域を確保したとする)。領域を確保すると、ストレージコントローラ100はキャッシュメモリ126に対して、先に説明したライトコマンドを発行して、バッファ領域1302上のライトデータをキャッシュメモリ126のLBA1空間のアドレス(LBA1)y番地の領域に格納し、また圧縮VOLのアドレスY番地のデータはキャッシュメモリ126のLBA1空間のアドレスy番地に格納されている旨を表す情報を、管理情報(圧縮情報管理テーブル1303)に格納する。さらに、伸長VOLのX番地のデータを格納するためのキャッシュ領域(LBA0空間上アドレス)の確保も行い(ここではLBA0空間のアドレス(LBA0)x番地の領域を確保したとする)、伸長VOLのアドレスX番地のデータはキャッシュメモリ126のLBA0空間のアドレス(LBA0)x番地に格納されている旨を表す情報を、管理情報(キャッシュ管理テーブル1301)に格納する。
 続いて圧縮VOLのデータ(キャッシュメモリ126のLBA1空間アドレスy番地にステージングされたデータ)を伸長VOLに移動する。この移動も疑似的なもので、実際にデータの実体が移動されるわけではない。ストレージコントローラ100はキャッシュメモリ126に対し、先に説明したLBA0マッピングコマンドを発行し、キャッシュメモリ126のLBA1空間アドレスのy番地を、キャッシュメモリ126のLBA0空間のアドレス(LBA0空間のx番地。つまり伸長VOLのX番地のデータが格納されるべきキャッシュ126上アドレス)にマッピングすることで、疑似的にデータ移動を行う。その後ストレージコントローラ100は、LBA0空間のx番地を指定したリードコマンドをキャッシュ126に発行することでデータを読み出す。この時データは圧縮状態から非圧縮状態に変換されて読み出され、この読み出されたデータがホスト計算機40に渡されることで、リード処理が実現される。
 次に、上の説明で出てきた、ストレージコントローラ100の管理する各種管理情報について、図11~図15を用いて説明する。これら管理情報はストレージコントローラ100のメモリ130上に格納され、CPU120により更新が行われる。
 図11のアドレスマッピングテーブル600は、VVOL#601、LBA602で特定される伸長VOL上の領域が、LDEV#603、LBA(Base)604、LBA(Update)605で特定される圧縮VOL上の領域(セクタ)に対応付けられるものであることを管理するテーブルである。このテーブルは、ストレージコントローラ100が伸長VOL上に書き込まれたデータを圧縮VOLに移動する(対応付ける)際に更新する。そのため初期状態では、ボリューム間マッピング情報3000のVVOL#601とLBA602にはすべての値が格納されているが、LDEV#603、LBA(Base)604、LBA(Update)605には値が格納されていない。そしてホスト計算機40からのライト処理が進行する過程で(伸長VOLから圧縮VOLへのデータ移動が行われる時)、LDEV#603とLBA(Base)604またはLBA(Update)605の各欄に情報が格納されていく。LBA(Base)604とLBA(Update)605の差異については後述する。
 なお、アドレスマッピングテーブル600の各行(エントリ)は、伸長VOLの8セクタ(1セクタは、ホスト計算機40から伸長VOLにアクセスする際の最小アクセス単位で、通常512バイト)分の領域が圧縮VOLのどのLBAの領域に対応付けるかを表しており、各エントリのLBA602は、当該領域の先頭LBAを表している。また、アドレスマッピングテーブル600の各行(エントリ)に対応付けられる圧縮VOLのディスク領域の数(セクタ数)は、データの圧縮状態によって異なるが、最小で1セクタ(伸長VOLの8セクタ分の領域が圧縮により1セクタに圧縮された場合)、最大で8セクタ(伸長VOLのデータが圧縮により、サイズが小さくならなかった場合)の領域が対応付けられる。図11の例では、VVOL#601が0番の伸長VOLの、LBA602が0x08番のセクタを先頭とする8セクタ分の領域が、LDEV#603が0x125番の圧縮VOLの、LBA604(Base)が0x0530、0x0531の2セクタ分の領域に対応付けられている(つまり伸長VOLの8セクタ分の領域が、圧縮されたことにより2セクタ分のサイズに圧縮されて格納されていることを表している)ので、ストレージコントローラ100はホスト計算機から、VVOL#601が0番の伸長VOLの、LBAが0x08~0x0F番の範囲の領域のリード要求を受け付けた場合、このアドレスマッピングテーブル600を参照し、LDEV#603が0x125番の圧縮VOLの、LBA604が0x0530、0x0531の2セクタ分の領域を読み出す処理を行う。
 また、先に述べたとおり、伸長VOL上のデータを更新すると、その更新データは圧縮VOL上で追記書きされる。そのため、VVOL#601、LBA602で特定される伸長VOL上の領域に対応する圧縮VOL上領域を表す情報として、BaseとUpdateの2種類の情報を管理する。LBA(Base)604が更新前のデータが格納される領域の情報が格納される欄で、LBA(Update)605が更新後データの格納される領域の情報が格納される欄である。具体的には、伸長VOLの領域(VVOL#601、LBA602で特定される領域)に対する初回書き込み(伸長VOLが新規作成された後、最初の書き込み)のデータが対応づけられる領域の情報がLBA(Base)604に格納される。あるいは後述するガベージコレクションを実行した後、圧縮VOLにデータがディステージされるが、その時にデータが書き込まれる領域の情報もLBA(Base)604に格納される。そしてそれ以降伸長VOLに対してデータの上書きが発生すると、当該上書きデータが対応付けられる圧縮VOL上の領域の情報は、LBA(Update)605に格納される。なお、以下では、更新前に最終記憶媒体に格納されているデータをベース(Base)データと呼び、更新後データを更新データあるいはアップデート(Update)データと呼ぶ。
 図12は、キャッシュ管理テーブル1301の一例を表した図である。キャッシュ管理テーブル1301は、伸長VOLの各領域に対してホスト計算機40から書き込まれたデータが格納されている、キャッシュメモリ126上の位置情報等を管理する情報で、キャッシュアドレス13011、VVOL#13012、LBA13013、キャッシュステータス13014、最終アクセス時刻13015、圧縮後サイズ13016を保持する。キャッシュアドレス13011には、VVOL#13012、LBA13012で特定される伸長VOL上領域のデータの格納されている、キャッシュメモリ126上のアドレス(LBA0)が格納される。VVOL#13012、LBA13012で特定される伸長VOL上領域に対応するキャッシュメモリ126の領域が割り当てられていない場合には、キャッシュアドレス13011には値が格納されない(あるいはNULL等の無効状態を表す値が格納される)。キャッシュステータス13014は、キャッシュメモリ126に格納されたデータの状態を表す。本発明の実施例では、キャッシュメモリ126上のデータと最終記憶装置190に格納されたデータが等しい状態をClean状態と呼び、キャッシュメモリ126上のデータが最終記憶装置190に格納されたデータよりも新しい状態をDirtyと呼ぶ。そしてキャッシュステータス13014には、Clean、Dirtyのいずれかの値が格納される。
 なお、ストレージコントローラ100のCPU120では、ホスト計算機40から伸長VOLに対して書き込まれたデータをキャッシュに格納するプログラム(以下、フロントエンドプログラムと呼ぶ)と、キャッシュ126に格納された伸長VOLのデータを圧縮VOLに移動し、ディステージを行うプログラム(以下、ディステージプログラムと呼ぶ)とが独立して稼働しており、フロントエンドプログラムはホスト計算機40から伸長VOLへのライトデータ書き込み要求を受け付けると、キャッシュ126上領域に対してデータを格納し、同時に当該データの格納されたキャッシュ領域のキャッシュステータス13014をDirtyに設定する。ディステージプログラムはキャッシュ管理テーブル1301の内容を監視しており、所定条件(たとえばキャッシュ管理テーブル1301内で管理されているデータのうち、キャッシュステータス13014がDirtyであるデータが所定量以上に達した等)を満たした場合、キャッシュステータス13014がDirtyに設定されているデータを圧縮VOLに移動し、さらに最終記憶装置190にディステージする。そしてディステージが終了したデータのキャッシュステータス13014をCleanに変更する処理を行う。
 最終アクセス時刻13015には、当該データ(キャッシュアドレス13011で特定される、キャッシュ126上領域のデータ)が最後にアクセスされた時刻が格納される。本発明の実施例では最終アクセス時刻13015に格納される時刻情報の表現形式として、ある時点(たとえば2000年1月1日0時0分0秒など)からの経過秒数を用いているが、その他の表現形式を用いてもよい。また圧縮後サイズ13016には、キャッシュメモリ126上でのサイズ(キャッシュメモリ126のデータ圧縮/伸長ユニット418により圧縮された後のサイズ)が格納される。
 図13は、圧縮情報管理テーブル1303の一例を表した図である。圧縮情報管理テーブル1303は、最終記憶媒体に格納(ディステージ)された各データについての情報、及び当該データがキャッシュ126上にキャッシュされている場合、当該キャッシュ先のアドレス(キャッシュ126の提供するLBA1空間のアドレス)の情報を管理するためのテーブルである。圧縮情報管理テーブル1303の各エントリ(行)は、キャッシュメモリ126のアドレス(LBA1空間上のアドレス)を格納するキャッシュアドレス(13031)、格納先である最終記憶媒体の識別番号である圧縮VOLLDEV#13032、当該最終記憶媒体のLBAである圧縮VOLLBA13033、データがベースデータ(Base)であるか更新データ(Update)であるかの属性13034、キャッシュステータス(状態)13035、圧縮後データサイズ13036を保持する。キャッシュステータス13035は、キャッシュ管理テーブル1301のキャッシュステータス13014と同様に、Clean、Dirtyのいずれかの値が格納される。
 なお、圧縮情報管理テーブル1303の各エントリは、圧縮VOLLDEV#13032及び圧縮VOLLBA13033の小さい順に並んで格納されている。また圧縮情報管理テーブル1303の各エントリ(の圧縮VOLLBA13033)には、伸長VOLの圧縮単位である8セクタ分の各領域に対応付けられている(あるいは過去に対応付けられていた)圧縮VOLのLBAの情報が格納されるため、複数の圧縮VOLLBA13033が格納されることがある。たとえば伸長VOLのある8セクタ分領域が2KB(4セクタ)のサイズに圧縮された場合、圧縮VOL上に圧縮データが格納される場合には、圧縮VOLの4セクタ分の領域を占有するため、伸長VOLの当該8セクタ分領域に対応する圧縮情報管理テーブル1303のエントリの圧縮VOLLBA13033には、4つのLBAが格納される(たとえば図13の行13037).また同様に複数のキャッシュアドレス13031が格納されることがある。
 続いて図14を用いて、フリーリスト700について説明する。ストレージ装置10は、ライトデータやリードデータをキャッシュメモリ126に格納する際に、キャッシュメモリ126の未使用領域(キャッシュデータが格納されていない領域)を確保する必要があるため、キャッシュメモリ126のLBA0空間、LBA1空間それぞれの未使用領域一覧の情報を管理している。これをフリーリスト700と呼び、一例を図14に示している。フリーリスト700には、フリーLBA0リスト710と、フリーLBA1リスト720があり、それぞれのリスト(710、720)には、未使用のLBA0/1(具体的にはキャッシュ管理テーブル1301や、圧縮情報管理テーブル1303の、キャッシュアドレス13011、13031に値が格納されていないLBA0/1)のリストが格納されている。ストレージコントローラ100は、LBA0空間の領域を確保する場合(たとえばホスト計算機40からのライトデータを格納する場合)には、フリーLBA0リスト710に格納されている未使用の領域を選択してキャッシュ管理テーブル1301のキャッシュアドレス13011にその値を格納し、LBA1空間の領域を確保する場合(たとえば先に述べた、伸長VOLのデータを圧縮VOLに移動する処理の場合)には、フリーLBA1リスト720に格納されている未使用の領域を選択して圧縮情報管理テーブル1303のキャッシュアドレス13031にその値を格納する。そして、確保したキャッシュメモリ126の領域が不要になった場合(たとえば、データがキャッシュ126からディステージされ、キャッシュ126上にデータを保持する必要がなくなった場合など)には、不要になったキャッシュメモリ126のアドレスの情報をキャッシュ管理テーブル1301または圧縮情報管理テーブル1303から削除し、削除されたアドレスの情報をフリーLBA0リスト710またはフリーLBA1リスト720への再び登録する。
 また、ストレージコントローラ100は、図15に示す領域管理テーブル650も有する。先に述べたとおり、本発明のストレージ装置10は伸長VOLのデータを圧縮VOLへと移動する(対応づけられる)が、対応付けの範囲には制限が設けられている。具体的には、領域管理テーブル650のVVOL#651で特定される伸長VOLの、開始LBA652から終端LBA653で特定される領域のデータは、LDEV#654で特定される圧縮VOLの、開始LBA655と終端LBA656で特定される領域にのみ移動(対応付け)される。これにより、たとえば図15の例では、VVOL#が0番の伸長VOLのLBA(開始LBA652)0番からLBA(終端LBA653)0x14FFFまでの範囲に書き込まれたデータは、LDEV#(654)が0x125番の圧縮VOLの、LBA(開始LBA655)0番からLBA(終端LBA656)0x14FFFまでの領域にのみ格納される。なお、本発明の実施例では、伸長VOLの開始LBA652から終端LBA653で特定される領域、及び圧縮VOLの開始LBA655と終端LBA656で特定される領域のことを、「ページ」と呼ぶ。また、伸長VOLの開始LBA652から終端LBA653で特定される領域を「伸長VOLのページ」、そして圧縮VOLの開始LBA655と終端LBA656で特定される領域を、伸長VOLのページと区別して呼ぶ場合、「圧縮VOLのページ」と呼ぶ。そしてこのページが、後述するガベージコレクションを行う時の実行単位となる。
 また、最終書き込み位置657は、最後に伸長VOLから圧縮VOLへのデータの移動処理が行われた際に、データの移動先として決定された圧縮VOL上の最後尾アドレスである。つまり、圧縮VOLの各ページの開始LBA655から最終書き込み位置657までの領域は、伸長VOLから圧縮VOLへと移動されるデータが格納される領域であり、先に述べたディステージプログラムは、伸長VOLから圧縮VOLへのデータ移動処理を実行すると、最終書き込み位置657に、移動したデータ(圧縮後データ)のサイズを加算する処理も行う(たとえば移動したデータがNセクタ分のサイズであれば、最終書き込み位置657に格納されている値にNを加算する)。また「最終書き込み位置657+1」から終端LBA656までの領域は、未使用領域である。そのため、次回伸長VOLから圧縮VOLへのデータの移動を行う時には、最終書き込み位置657に記録されているアドレスの次のアドレス(最終書き込み位置657+1)を先頭アドレスとしてデータを移動(圧縮VOLへの追記書き)すればよい。
 また、最終書き込み位置657がページの終端に達した場合、当該ページへの追記書きはできなくなるので、最終書き込み位置657がページの終端に達する前に、後述するガベージコレクション処理を行って、不要なデータを削除する必要がある。
 なお、図15の例では、伸長VOLのページのサイズと圧縮VOLのページのサイズとは同じサイズとしているが、両者は必ずしも同じサイズである必要はなく、データが圧縮されることを期待して、圧縮VOLのページのサイズを伸長VOLのページのサイズよりも小さくする構成をとることも可能である。また各ページのサイズを同一サイズにする必要もない。さらに、1ページのサイズを1つの圧縮VOL(最終記憶媒体190)のサイズと同じとする構成も可能である。ただし後述するガベージコレクション処理では1ページ分のデータを一旦キャッシュ126にステージングするため、1ページのサイズがキャッシュ126の記憶容量以下であることが、ページサイズの制限事項となる。本発明の実施例では説明の簡単化のため、各ページのサイズは同サイズで、かつ1ページのサイズはキャッシュ126の容量より十分小さいものとする。
 続いて、本発明のガベージコレクション処理について説明する。ガベージコレクションはページ単位に実行される。ガベージコレクションの実行契機は様々ありえる。たとえば伸長VOLのデータを圧縮VOLに移動する処理を行う際、データ移動先ページにデータを追記書きできる領域がないことを検知した時点で実行する、あるいはストレージコントローラ100の負荷が低い時に、伸長VOLのデータを圧縮VOLに移動する処理とは非同期に、各ページの空き容量(データ追記書きを行うことができる、未使用領域の量。これは領域管理テーブル650に記録されている、終端LBA656と最終書き込み位置657の差を計算することで算出できる)を確認し、空き容量が所定値以下のページについてガベージコレクションを行う等の方法があり得る。
 本発明のガベージコレクション処理の基本原理は、以下の通りである。はじめに、ガベージコレクション対象のページを1つ選択する。ページ選択の契機、方法は上記の通り、様々な方法を選択し得る。続いて選択したページのデータを全て、最終記憶媒体190からキャッシュ126上にステージングする。なお、ステージングの際には、キャッシュLBA1空間上に1ページ分の連続アドレス空間(領域)をステージング用の領域として確保し、その確保したキャッシュ126上領域にステージングを行う。ステージングと同時に圧縮情報管理テーブル1303の内容を更新する。具体的にはキャッシュ126上にステージングした各データのキャッシュアドレス13031を登録する。
 続いて、キャッシュ126上にステージングしたデータを、伸長VOLに対応付ける。上ではリード処理で圧縮VOLのデータを疑似的に伸長VOLに移動する処理の概要を説明しているが、ここではそれと同様の処理を行う。たとえばストレージ装置10が保持するアドレスマッピングテーブル600の状態が、図11に記載されているような状態であった場合、VVOL#601が0番の伸長VOLの、LBA602が0x08番のセクタを先頭とする8セクタ分の領域は、LDEV#603が0x125番の圧縮VOLの、LBA604(Base)が0x0530、0x0531の2セクタ分の領域に対応付けられていることが分かる。そして圧縮情報管理テーブル1303には、今回GC処理対象の圧縮VOLのページ内データがそれぞれステージングされている、キャッシュメモリ126上の位置(LBA1空間のアドレス)についての情報が格納されているため、LDEV#603が0x125番の圧縮VOLの、LBA604(Base)が0x0530、0x0531のデータがステージングされているキャッシュ126上のアドレス(LBA1)も判明する。
 そこで、伸長VOLの領域(VVOL#601が0番の伸長VOLの、LBA602が0x08番のセクタを先頭とする8セクタ分の領域)に対して、キャッシュメモリ126のLBA0アドレスを割り当て、先に説明したLBA0マッピングを用いて、圧縮VOLの、キャッシュ126上にステージングされているデータの格納されているLBA1アドレスを、伸長VOL用に確保されているキャッシュ126のLBA0アドレスに対応付ける。これにより、圧縮VOLのデータが疑似的に伸長VOLに移動される。この処理を圧縮VOLのページ内データのうち、伸長VOLに対応付けられている最新のデータについてのみ行う(つまり伸長VOLのある領域に対して複数回更新があった場合には、圧縮VOLのページ内には更新前データ(ベースデータ)と更新後データ(アップデートデータ)とが格納されているはずだが、その場合にはアップデートデータのみが伸長VOLに移動される)ことにより、ホスト計算機40が伸長VOLに対して書き込まれたデータのうち、最新のデータのみが抽出されて、伸長VOLに移動されることになる。
 そしてこの処理で伸長VOLに移動したデータについて、キャッシュ管理テーブル1301のキャッシュステータス13014をDirtyにし、また圧縮情報管理テーブル1303内の情報のうち、今回のガベージコレクション処理対象ページ範囲のデータについての情報(具体的にはキャッシュアドレス13031、属性13033、状態13034)をすべて削除する。
 こうすることで、ガベージコレクション前に最終記憶媒体190に存在した、今回のガベージコレクション対象のページのデータのうち、伸長VOLに対応付けられるべきデータはすべて、キャッシュメモリ126上に格納されたことになるので、最終記憶媒体190に存在している、今回のガベージコレクション対象のページのデータはすべて不要になる(削除されてよい)。そして、伸長VOLに対応付けられるべきデータはすべてDirty状態として管理されているので、ストレージコントローラ100内で常時実行されている、伸長VOLに対応付けられたデータを圧縮VOLに移動し、ディステージを行う処理(先に述べたディステージプログラム)が実行されることによって、自動的に最終記憶媒体に格納される。このディステージプログラムは先に述べたとおり、キャッシュ管理テーブル1301で、キャッシュステータス13014がDirtyに設定されているデータをディステージするが、ガベージコレクション処理によって、キャッシュ管理テーブル1301には必要なデータ(最新のデータ)の情報だけが格納され、かつキャッシュステータス13014がDirtyに設定されている状態になっているので、ディステージプログラムが実行されると最新のデータだけがページ先頭から追記書きされる。そして不要なデータが最終記憶媒体から削除されたことと同じ効果が得られ、ガベージコレクションが実現される。
 ただし、これらすべての処理を、ストレージコントローラ100のCPU120で実施すると、CPU120の負担が大きい。そのため本発明の実施例におけるストレージ装置10では、一部の処理をキャッシュ126で実行させるようにし、CPU120の負荷をオフロードする。具体的にはキャッシュ126は、CPU120からのコマンド(ガベージコレクション要求コマンド)を受信することにより、上で説明した、圧縮VOLのデータを伸長VOLへと疑似的に移動する処理を担う。
 図16は、ストレージコントローラ100からキャッシュ126へのガベージコレクション要求コマンド3300とその完了応答3310の一例である。なお、ガベージコレクションは、ページ単位で実行するため、ストレージコントローラ100は一旦最終記憶媒体190(圧縮VOL)の1ページ分のデータをキャッシュメモリ126にステージングする。そしてこのステージングしたデータに対して不要な(未使用の)データを削除するガベージコレクションを行うが、その処理はストレージコントローラ100からキャッシュ126へのガベージコレクション要求コマンド3300を発行することにより、キャッシュ126で実施させる。
 ガベージコレクション要求コマンド3300は、ガベージコレクション要求であるというオペレーションコード1101、コマンド識別のためのコマンドID1102という各コマンドに共通の情報に加え、ガベージコレクション要求コマンドに固有のコマンドパラメータとして、ガベージコレクションのために確保したキャッシュ領域のアドレス(LBA1)を示すキャッシュLBA1アドレス3303、リスト数3304、1以上のガベージコレクション対象データ情報3305(以下では「対象データ情報3305」とも呼ばれる)を有する。また各ガベージコレクション対象データ情報3305には、圧縮VOLアドレス33051、サイズ33052、伸長VOLアドレス33053、LBA開始アドレス33043、属性33055の情報の組(セット)が格納されている。なお、対象データ情報3305の数は、リスト数3304に格納されている値と等しい。
 なお、ガベージコレクション処理の際、ストレージコントローラ100のCPU120は一旦最終記憶媒体190(圧縮VOL)の1ページ分のデータをキャッシュメモリ126にステージングするが、ステージング前にキャッシュLBA1空間上に1ページ分の連続アドレス空間を確保する。キャッシュLBA1アドレス3303には、この確保したキャッシュ領域の先頭アドレス(LBA1)が格納され、ガベージコレクション要求コマンド3300がキャッシュ126に発行される前には、CPU120はキャッシュLBA1アドレス3303を先頭アドレスとするキャッシュ126上領域に、1ページ分のデータを最終記憶媒体190からステージングして、格納しておく。
 伸長VOLアドレス33053は、圧縮VOLアドレス33051、サイズ33052で特定される、圧縮VOL上の領域に対応付けられている伸長VOL上の領域(4KB)の先頭アドレスを表す。またLBA0開始アドレス33054は、伸長VOLアドレス33053で特定される領域に割り当てられているキャッシュ空間(LBA0空間)の先頭アドレスである。属性33055には、BaseまたはUpdateのいずれかの値が格納され、属性33055にBaseが格納されている場合、圧縮VOLアドレス33051、サイズ33052で特定される、圧縮VOL上の領域に、ベースデータが格納されていることを表し、属性33055にUpdateが格納されている場合には圧縮VOLアドレス33051、サイズ33052で特定される、圧縮VOL上の領域に、Updateデータが格納されていることを表す。
 ガベージコレクション要求コマンド3300に対して、ガベージコレクションを完了したキャッシュ126はストレージコントローラ100へ完了応答3310を返す。コマンド識別のためのコマンド番号3311、ガベージコレクションの成否を示すステータス1022、該当データのガベージコレクション後の圧縮サイズ3313を含む。
 ストレージコントローラ100(のCPU120)がガベージコレクション要求コマンド3300を作成する際、ガベージコレクション処理が行われる対象の圧縮VOL上のページ(以下、対象ページと呼ぶ)内の全領域について、対象データ情報3305を作成する。具体的には、圧縮情報管理テーブル1303内の各エントリのうち、圧縮VOLLDEV#13032、圧縮VOLLBA13033で特定される領域が、GC対象ページ領域の範囲内であるエントリを抽出し、エントリごとに対象データ情報3305を作成する。たとえば圧縮情報管理テーブル1303の内容が図13の状態である場合、先頭のエントリの圧縮VOLLDEV#13032は0番、圧縮VOLLBA13033は0~3番地で構成される2KB(圧縮後サイズ13036に格納されている情報から判明する)の領域で、その属性13034は“Base”である。この領域がGC処理となったページ領域の範囲内である場合、作成される対象データ情報3305内の圧縮VOLアドレス33051には圧縮VOLLBA13033に格納されている先頭アドレス(0番地)が、サイズ33052には圧縮後サイズ13036に格納されている情報(2KB)が、そして属性33055には属性13034に格納されている情報(Base)が格納された情報を作成する。そして対象データ情報3305内のその他の情報(伸長VOLアドレス33053、LBA0開始アドレス33054)は、アドレスマッピングテーブル600とキャッシュ管理テーブル1301から取得する。具体的には、アドレスマッピングテーブル600の中から、圧縮VOLLDEV#13032が0番、圧縮VOLLBA13033が0~3番地である2KBの領域に対応付けられた伸長VOLのLBAを検索する。そして検索された伸長VOLのLBAを、対象データ情報3305内の伸長VOLアドレス33053に格納する。またキャッシュ管理テーブル1301を参照し、伸長VOLアドレス33053で特定される領域のデータが格納されるべきキャッシュアドレス13011を検索して、検索されたキャッシュアドレス13011の情報を、対象データ情報3305内のLBA0開始アドレス33054に格納することで、対象データ情報3305を作成する。そしてCPU120はこの処理を圧縮情報管理テーブル1303内の各エントリのうち、圧縮VOLLDEV#13032、圧縮VOLLBA13033で特定される領域が、今回GC対象となったページ領域の範囲内に属する全エントリについて実施する。
 また、対象データ情報3305(圧縮VOLアドレス33051、サイズ33052、伸長VOLアドレス33053、LBA開始アドレス33054、属性33055の情報の組)が、コマンドパラメータに複数格納される場合(ほとんどの場合、対象データ情報3305は複数格納される)、CPU120は複数の対象データ情報3305のうち、対象データ情報3305に含まれる圧縮VOLアドレス33051の値が最も小さい対象データ情報3305から順に、コマンドパラメータ中に格納されるように、ガベージコレクション要求コマンド3300を作成する。
 図17は、ガベージコレクション処理でストレージコントローラ100(のCPU120)とキャッシュ126および最終記憶装置190が実行する処理の流れの概要図である。
 まずガベージコレクションのために必要なキャッシュ領域を確保する(S331)。ガベージコレクションのために必要なキャッシュ領域としては、最終記憶媒体190から圧縮VOLのGC対象ページデータをステージングした際に、ステージングしたデータを格納するためのキャッシュ領域(LBA1空間上領域を割り当てる)、及びGC対象の圧縮VOLのページに対応付けられている伸長VOLのページ内の各領域に対して割り当てられるべきキャッシュ領域(LBA0空間上領域を割り当てる)がある。キャッシュ領域の確保を行うと同時に、圧縮情報管理テーブル1303の各エントリのキャッシュアドレス13031の欄に、確保したキャッシュ領域のLBA1アドレスを記録し、またキャッシュ管理テーブル1301の各エントリのキャッシュアドレス13011にも確保したキャッシュ領域のLBA0アドレスを記録する。なおGC対象ページのデータのうち、Dirty状態のデータがキャッシュ126に存在している場合、この時点でDirty状態のデータはディステージする。そしてその後に行われるS333以降の処理において、最終記憶媒体190から一括して1ページ分の領域をステージングする。
 続いてガベージコレクション中にデータの更新を防ぐためにガベージコレクション対象のデータ(伸長VOL、圧縮VOLの1ページ分のデータ)についてロックを取得する(S332)。その後、最終記憶装置190からストレージコントローラ100のバッファ領域1302に1ページ分のデータをステージングし、先に説明したライトコマンドをキャッシュ126に発行し、そのデータをS331で確保したキャッシュ126上の1ページ分の領域に格納する。(S333~S339)。ここでは、最終記憶媒体190から1ページ分の連続データを読み出せばよいので、ストレージコントローラ100は最終記憶媒体190に対して1ページ分のデータを読み出すリードコマンドを1回だけ発行すればよい。
 圧縮VOL上のデータをステージングした後、ストレージコントローラ100は、ガベージコレクション要求コマンド3300を各キャッシュ126に送信することで、ガベージコレクション要求を行う。ガベージコレクション要求コマンド3300を受領したキャッシュ126が行う処理の詳細は後述する。
 キャッシュ126内でのガベージコレクションが完了すると、キャッシュ126は後述するガベージコレクション完了応答3310を送信してストレージコントローラ100に完了通知する。この時点で、今回のガベージコレクションの対象となった伸長VOLのページ内全データ(以下、これを「対象データ」と呼ぶ)は、キャッシュ126のLBA0空間上アドレスに対応付けられた状態になっている。ストレージコントローラ100は、キャッシュ管理テーブル1301内の全対象データについて、キャッシュステータス13014をDirtyに変更する。その後、ストレージコントローラ100は対象データのロックを解放し(S3313)、今回ガベージコレクション対象となったページ領域の範囲に該当するデータを削除する。具体的には、圧縮情報管理テーブル1303中の、圧縮VOLLDEV#13032、圧縮VOLLBA13033で特定される領域が、今回GC対象となったページ領域の範囲内である各エントリについて、キャッシュアドレス13031に格納されているキャッシュ領域を解放する(キャッシュアドレス13031に格納されていたアドレス情報をフリーLBA1リスト720に移し、キャッシュアドレス13031の内容を削除する)。またアドレスマッピングテーブル600の、今回ガベージコレクション対象となったページ領域の範囲に該当するLDEV#603、LBA(Base)604、LBA(Update)605の情報を削除し、同時に領域管理テーブル650の最終書き込み位置657を初期状態に戻す(具体的には最終書き込み位置657に開始LBA655の値を格納する)(S3314)。これにより、今回のGC処理において処理対象であったページが格納されていた最終記憶媒体190上の領域は未使用の状態になる(次回ディステージが行われる際には、ページ先頭から書き込みが行われる)。
 その後、今回のガベージコレクション処理とは非同期に実行されるディステージプログラムが実行される際には、今回のガベージコレクション処理で対象としたページのデータはすべてキャッシュ126上に存在し、かつ最新のデータのみがキャッシュ126上にDirty状態で存在している状態になっているので、ディステージプログラムの実行の結果、最新のデータのみ最終記憶媒体190に書きこまれ、不要なデータが削除された状態になる。また、今回のガベージコレクション処理が終了した後、即座にディステージプログラムを実行して、キャッシュ126のLBA0空間上アドレスに対応付けられた伸長VOLのページ内データを圧縮VOLへと疑似的に移動し、最終記憶媒体190にディステージするようにしてもよい。
 図18は、ガベージコレクション要求コマンド3300を受領したキャッシュ126での処理フローの一例である。
 FMコントローラ410は、ガベージコレクション要求コマンド3300を受領する(S33110)。続いて受領したコマンドに存在する複数の対象データ情報3305について(原則として、ガベージコレクション要求コマンド3300中に対象データ情報3305は複数存在する)、各対象データ情報3305の圧縮VOLアドレス33051及びサイズ33052で特定される領域のデータがステージングされている、キャッシュ126上アドレスを算出する(S33111)。ストレージコントローラ100はガベージコレクション要求コマンド3300を発行する前に、キャッシュLBA1アドレス3303を開始アドレスとするLBA1空間上の連続領域に、圧縮VOL上のガベージコレクション対象ページのデータを、先頭から順にステージングしており、かつ複数の対象データ情報3305のうち、先頭の対象データ情報3305の圧縮VOLアドレス33051、サイズ33052で特定される領域のデータは圧縮VOL上のガベージコレクション対象ページの先頭データであるから、キャッシュLBA1アドレス3303で特定されるLBA1アドレスからサイズ33052の範囲の領域に格納されている。そして、2番目以降の対象データ情報3305中の圧縮VOLアドレス33051、サイズ33052で特定される領域のデータは、キャッシュ126上の次の位置(「キャッシュLBA1アドレス3303+1番目の対象データ情報3305中のLBA1アドレス」で算出されるアドレス)から格納されている。したがって、キャッシュLBA1アドレス3303、そして各対象データ情報3305の圧縮VOLアドレス33051及びサイズ33052を用いれば、各対象データ情報3305の圧縮VOLアドレス33051及びサイズ33052で特定される領域のデータがステージングされている、キャッシュ126上アドレスが算出可能である。そのため、ストレージコントローラ100のCPU120がガベージコレクション要求コマンド3300を発行する際、圧縮VOLのページ内各データがステージングされているキャッシュ126上のLBA1アドレスを個別に指定する必要がない。ただし、別の実施形態として、FMコントローラ410で圧縮VOLアドレス33051及びサイズ33052で特定される各領域のデータがステージングされているキャッシュ126上アドレスの各々を算出する代わりに、ストレージコントローラ100がガベージコレクション要求コマンド3300のパラメータ中に、圧縮VOLアドレス33051及びサイズ33052で特定される各領域のデータがステージングされている、それぞれのキャッシュ126上アドレス(LBA1)を含めたコマンドを発行するようにしてもよい。
 つづいてコマンドの最後尾に格納されている対象データ情報3305の、圧縮VOLアドレス33051、サイズ33052、伸長VOLアドレス33053、LBA0開始アドレス33054、属性33055を抽出する(S33112)。
 S33113では、S33112で抽出した情報のうち、伸長VOLアドレス33053を確認し、このアドレスが今回のガベージコレクション処理において、まだ確認していないアドレスであった場合(S33113:No)、本データは最新データであるとして、伸長VOLアドレス33053に対応付けられているキャッシュLBA0空間アドレス(LBA0開始アドレス33054)に、LBA1空間アドレスを対応付ける処理を、キャッシュ126内で内部的にLBA0マッピングコマンドの処理を実行して実施する。また、本データサイズがガベージコレクション後のサイズの一部となるため、サイズ33052をガベージコレクション後のサイズに加算する(S33115)。
 本ガベージコレクション処理で確認済みアドレスであった場合(S33113:Yes)またはマッピング更新(S33114)とサイズ加算(S33115)を終えた場合、次の対象データ情報3304(コマンドパラメータ内の1つ前に格納されている対象データ情報3304)があるか確認する(S33116)。次の対象データ情報3304がある場合(S33116:Yes)、データ情報の抽出を行う(S33118)。この処理はS33112と同様である。そしてS33113からS33115の処理を繰り返す。次のデータ情報(S33116:No)がない場合、ガベージコレクション対象の全データについて確認したため、加算したガベージコレクション後のサイズを含めて完了応答3310をストレージコントローラ100へ送信する。
 以上、本発明の実施例を説明してきたが、本発明は、上で説明した実施例に開示の形態の他、種々の形態でも実施可能である。たとえば実施例に記載のストレージ装置において、コントローラ、あるいはコントローラ内の各要素が複数存在する構成をとることも可能である。また、実施例においてプログラムとして記載されている構成物の一部または全部を、ハードワイヤードロジックなどを用いたハードウェアによって実現する構成をとることも可能である。また実施例中の各プログラムをDVD等の記憶媒体に格納して提供する形態をとることも可能である。
 また、上で説明した実施例では、ストレージ装置はホスト計算機から伸長VOLの同一領域に対して複数回データの書き込み(更新)があった場合、更新前のデータの格納された最終記憶媒体上アドレスの情報と、更新後データの格納された最終記憶媒体上アドレスの情報の両方を管理していたが、変形例として、最も最近の(最新の)更新データの格納された最終記憶媒体上アドレスの情報のみをアドレスマッピングテーブル600、圧縮情報管理テーブル1303で管理する構成もあり得、その場合でも本発明は有効である。
10:ストレージ装置
20:ネットワーク
40:ホスト計算機
100:コントローラ
110:インタフェースコントローラ
120:CPU
126:キャッシュメモリ
130:メモリ
140:ASIC
190:最終記憶媒体

Claims (10)

  1.  プロセッサと、キャッシュ装置と、最終記憶媒体とを有するストレージ装置において、
     前記ストレージ装置はホスト計算機と接続され、前記ホスト計算機にボリュームを提供するよう構成され、前記ボリュームの各領域に対応付けられている前記最終記憶媒体上の領域の対応関係の情報を管理するマッピングテーブルを有し、
     前記プロセッサは、前記ホスト計算機から前記ボリュームに対するライト要求と前記ライト要求に伴うライトデータを受け付けると、前記キャッシュ装置に、前記ライトデータを圧縮させるとともに前記キャッシュ装置内の記憶領域に格納させた後、前記キャッシュ装置から、前記圧縮状態のライトデータを読み出して前記最終記憶媒体の所定サイズの領域内に格納するとともに、前記マッピングテーブルに、前記ライト要求のあった前記ボリュームの領域と、前記圧縮されたライトデータの格納された前記最終記憶媒体の領域との対応関係を記録し、
     さらに前記ホスト計算機から前記ライトデータを上書きするライト要求と該ライト要求に伴う更新データを受け付けると、前記キャッシュ装置に、前記更新データを圧縮させるとともに前記キャッシュ装置内の記憶領域に格納させた後、前記キャッシュ装置から、前記圧縮状態の更新データを読み出して前記最終記憶媒体の所定サイズの領域内の未使用領域に格納するとともに、前記マッピングテーブルに、前記ライトデータを上書きするライト要求のあった前記ボリュームの領域と、前記圧縮された更新データの格納された前記最終記憶媒体の領域との対応関係を記録するように構成されており、
     前記プロセッサは、前記最終記憶媒体の所定サイズの領域の空き容量が所定値以下になったことに応じて、前記所定サイズの領域に格納されている全データを読み出して前記キャッシュ装置へ格納し、前記マッピングテーブルに格納されている対応関係の情報に基づき、前記キャッシュ装置へと読み出されたデータのうち前記ボリュームの各領域に書き込まれた最新のデータを抽出し、前記抽出された最新のデータを前記最終記憶媒体の所定サイズの領域に対して、該領域の先頭から順にディステージすることを特徴とする、ストレージ装置。
  2.  前記ストレージ装置は、前記ボリューム上の領域と、前記ボリューム上の領域を指定して前記ホスト計算機から書き込まれたデータを格納する前記キャッシュ装置上記憶領域のアドレスとの対応関係を管理するキャッシュ管理情報を有し、
     前記プロセッサは、前記マッピングテーブルに格納されている対応関係の情報に基づき、前記キャッシュ装置へと読み出されたデータのうち、前記ボリューム上の前記領域に対して前記ホスト計算機から書き込まれた最新のデータの格納されている前記キャッシュ装置上の前記記憶領域のアドレスを、前記領域に対応付けて前記キャッシュ管理情報に格納した後、前記キャッシュ装置上へと読み出されたデータのうち、前記キャッシュ管理情報に対応関係が格納されている前記キャッシュ装置上領域のデータを、前記最終記憶媒体の所定サイズの領域に対して、該領域の先頭から順にディステージすることを特徴とする、請求項1に記載のストレージ装置。
  3.  前記キャッシュ装置は、前記プロセッサに対して第1の論理記憶空間と第2の論理記憶空間を提供し、
     前記プロセッサは、前記キャッシュ装置に前記ライト要求に伴うデータを圧縮して格納させる際、前記キャッシュ装置に対して前記第1の論理記憶空間のアドレスが指定された第1のデータ格納指示を前記ライトデータまたは更新データとともに発行し、前記キャッシュ装置は前記第1のデータ格納指示に応じて、前記ライトデータまたは更新データを圧縮して、当該圧縮された状態のデータを前記第1の前論理記憶空間のアドレスで特定される前記キャッシュ装置の記憶領域上の位置に格納し、
     前記プロセッサから、前記第1の論理記憶空間のアドレスが指定された第1のデータ読み出し指示を受け付けると、前記キャッシュ装置は前記第1の論理記憶空間のアドレスで特定される前記キャッシュ装置の記憶領域上の位置から、前記圧縮された状態のデータを読み出し、前記読み出されたデータを前記圧縮されていない状態に変換した後、外部に送信し、
     前記プロセッサから、前記第2の論理記憶空間のアドレスが指定された第2のデータ格納指示を、前記最終記憶媒体から読み出された前記圧縮されたライトデータまたは更新データとともに受け付けると、前記キャッシュ装置は前記圧縮されたライトデータまたは更新データを前記第2の前論理記憶空間のアドレスで特定される前記キャッシュ装置の記憶領域上の位置に格納し、
     前記プロセッサから、前記第2の論理記憶空間の第2アドレスと前記第1の論理空間の第1アドレスとをマッピングする指示を受け付けた後、前記第1アドレスが指定されたデータ読み出し指示を受け付けると、前記キャッシュ装置は、前記第2アドレスに格納された前記圧縮されたライトデータまたは更新データを読み出し、前記読み出されたデータを前記圧縮されていない状態に変換した後、外部に送信することを特徴とする、請求項2に記載のストレージ装置。
  4.  前記ストレージ装置は、前記最終記憶媒体の所定サイズの領域の空き容量が所定値以下になったことに応じて、前記所定サイズの領域に格納されている全データを読み出し、前記キャッシュ装置の前記第2の論理記憶空間上の第3アドレスを指定して前記キャッシュ装置上記憶領域へ格納し、
     前記キャッシュ装置は、前記圧縮されたライトデータまたは更新データの前記最終記憶媒体上のアドレスと、前記ライトデータまたは更新データの対応付けられている前記ボリューム上領域のアドレスと、前記ボリューム上領域に対応付けられた前記キャッシュ装置上の前記第1の論理記憶空間上のアドレスとから構成される、複数の対象データ情報と、前記第3アドレスとがコマンドパラメータとして指定されたガベージコレクション要求コマンドを、前記プロセッサから受け付けると、
     前記キャッシュ装置へと読み出されたデータの前記第2の論理記憶空間上領域のうち、前記ボリュームに対して書き込まれた最新のデータの格納されている前記第2の論理記憶空間上アドレスと前記ボリューム上領域に対応付けられた前記第1の論理記憶空間上アドレスとをマッピングする処理を前記ボリューム上の各領域に対して行い、前記プロセッサに処理の完了を通知し、
     前記プロセッサは、前記処理の完了の通知を受け取ると、前記キャッシュ装置へと読み出されたデータの格納されている前記第2の論理記憶空間上アドレスを未使用状態にし、前記最終記憶媒体の所定サイズの領域を未使用状態にし、前記ボリューム上の各領域に対応付けられた、前記キャッシュ装置上の前記第1の論理空間上アドレスにより特定されるデータを、圧縮された状態で前記最終記憶媒体の所定サイズの領域の先頭から順にディステージする、
    ことを特徴とする、請求項3に記載のストレージ装置。
  5.  前記キャッシュ装置は、前記コマンドパラメータに同一の前記ボリューム上領域のアドレスを含む前記対象データ情報が複数含まれている場合、前記対象データ情報に含まれる前記最終記憶媒体上のアドレスが最も大きな前記対象データ情報を選択し、前記選択した対象データ情報に含まれる前記最終記憶媒体上のアドレスのデータが格納されているキャッシュ装置上のアドレスを算出し、該算出されたアドレスと前記選択した対象データ情報に含まれる前記第1の論理記憶空間上アドレスとをマッピングする処理を行うことを特徴とする、請求項4に記載のストレージ装置。
  6.  ストレージ装置の制御方法であって、
     前記ストレージ装置はプロセッサと、キャッシュ装置と、最終記憶媒体とを有し、前記ストレージ装置に接続されるホスト計算機に対してボリュームを提供するよう構成され、前記ボリュームの領域と、該領域に対応付けられている前記最終記憶媒体上の領域との対応関係の情報を管理するマッピングテーブルを有するストレージ装置であって、
     前記プロセッサは、
     前記ホスト計算機から前記ボリュームに対するライト要求と前記ライト要求に伴うライトデータを受け付けると、前記キャッシュ装置に、前記ライトデータを圧縮させるとともに前記キャッシュ装置内の記憶領域に格納させた後、前記キャッシュ装置から、前記圧縮状態のライトデータを読み出して前記最終記憶媒体の所定の位置に格納するとともに、前記マッピングテーブルに前記ライト要求のあった前記ボリュームの領域と、前記圧縮されたライトデータの格納された前記最終記憶媒体の領域との対応関係を記録し、
     前記ホスト計算機から前記ライトデータを上書きするライト要求と該ライト要求に伴う更新データを受け付けると、前記キャッシュ装置に、前記更新データを圧縮させるとともに前記キャッシュ装置内の記憶領域に格納させた後、前記キャッシュ装置から、前記圧縮状態の更新データを前記最終記憶媒体の前記所定の位置とは異なる位置に格納するとともに、前記マッピングテーブルに前記ライトデータを上書きするライト要求のあった前記ボリュームの領域と、前記圧縮された更新データの格納された前記最終記憶媒体の領域との対応関係を記録し、
     前記最終記憶媒体の所定サイズの領域の空き容量が所定値以下になった場合、前記所定サイズの領域に格納されている全データを読み出して前記キャッシュ装置へ格納し、前記マッピングテーブルに格納されている対応関係の情報に基づき、前記キャッシュ装置へと読み出されたデータのうち前記ボリュームの各領域に対して書き込まれた最新のデータを抽出し、前記抽出された最新のデータを前記最終記憶媒体の所定サイズの領域に対して、該領域の先頭から順にディステージすることにより、前記所定サイズの領域のガベージコレクションを行う、
    ことを特徴とする、ストレージ装置の制御方法。
  7.  前記ストレージ装置は、前記ボリューム上の領域と、前記ボリューム上の領域を指定して前記ホスト計算機から書き込まれたデータを格納する前記キャッシュ装置上記憶領域のアドレスとの対応関係を管理するキャッシュ管理情報を有し、
     前記所定サイズの領域のガベージコレクションを行う際、前記プロセッサは、前記キャッシュ装置へと読み出されたデータのうち、前記ボリューム上の前記領域に対して前記ホスト計算機から書き込まれた最新のデータの格納されている前記キャッシュ装置上の前記記憶領域のアドレスを、前記領域に対応付けて前記キャッシュ管理情報に格納した後、前記キャッシュ装置上へと読み出されたデータのうち、前記キャッシュ管理情報に対応関係が格納されている前記キャッシュ装置上領域のデータを、前記最終記憶媒体の所定サイズの領域に対して、該領域の先頭から順にディステージすることを特徴とする、
    請求項6に記載のストレージ装置の制御方法。
  8.  前記キャッシュ装置は、前記プロセッサに対して第1の論理記憶空間と第2の論理記憶空間を提供し、
     前記キャッシュ装置は、前記プロセッサから前記第1の論理記憶空間のアドレスが指定された第1のデータ格納指示を前記ライトデータまたは更新データとともに受け付けると、前記ライトデータまたは更新データを圧縮して、当該圧縮された状態のデータを前記第1の前論理記憶空間のアドレスで特定される前記キャッシュ装置の記憶領域上の位置に格納し、
     前記プロセッサから、前記第1の論理記憶空間のアドレスが指定された第1のデータ読み出し指示を受け付けると、前記キャッシュ装置は前記第1の論理記憶空間のアドレスで特定される前記キャッシュ装置の記憶領域上の位置から、前記圧縮された状態のデータを読み出し、前記読み出されたデータを前記圧縮されていない状態に変換した後、外部に送信し、
     前記プロセッサから、前記第2の論理記憶空間のアドレスが指定された第2のデータ格納指示を、前記最終記憶媒体から読み出された前記圧縮されたライトデータまたは更新データとともに受け付けると、前記キャッシュ装置は前記圧縮されたライトデータまたは更新データを前記第2の前論理記憶空間のアドレスで特定される前記キャッシュ装置の記憶領域上の位置に格納し、
     前記プロセッサから、前記第2の論理記憶空間の第2アドレスと前記第1の論理空間の第1アドレスとをマッピングする指示を受け付けた後、前記第1アドレスが指定されたデータ読み出し指示を受け付けると、前記キャッシュ装置は、前記第2アドレスに格納された前記圧縮されたライトデータまたは更新データを読み出し、前記読み出されたデータを前記圧縮されていない状態に変換した後、外部に送信することを特徴とする、
    請求項7に記載のストレージ装置の制御方法。
  9.  前記プロセッサは、前記所定サイズの領域のガベージコレクションを行う際、
     前記所定サイズの領域に格納されている全データを読み出し、前記キャッシュ装置の前記第2の論理記憶空間上の第3アドレスを指定して前記キャッシュ装置上記憶領域へ格納し、
     前記圧縮されたライトデータまたは更新データの前記最終記憶媒体上のアドレスと、前記ライトデータまたは更新データの対応付けられている前記ボリューム上領域のアドレスと、前記ボリューム上領域に対応付けられた前記キャッシュ装置上の前記第1の論理記憶空間上のアドレスとから構成される、複数の対象データ情報と、前記第3アドレスとがコマンドパラメータとして指定されたガベージコレクション要求コマンドを、前記キャッシュ装置に発行し、
     前記キャッシュ装置は、前記キャッシュ装置へと読み出されたデータの前記第2の論理記憶空間上領域のうち、前記ボリュームに対して書き込まれた最新のデータの格納されている前記第2の論理記憶空間上アドレスと前記ボリューム上領域に対応付けられた前記第1の論理記憶空間上アドレスとをマッピングする処理を前記ボリューム上の各領域に対して行い、前記プロセッサに処理の完了を通知し、
     前記プロセッサは、前記処理の完了の通知を受け取ると、前記キャッシュ装置へと読み出されたデータの格納されている前記第2の論理記憶空間上アドレスを未使用状態にし、前記最終記憶媒体の所定サイズの領域を未使用状態にし、前記ボリューム上の各領域に対応付けられた、前記キャッシュ装置上の前記第1の論理空間上アドレスにより特定されるデータを、圧縮された状態で前記最終記憶媒体の所定サイズの領域の先頭から順にディステージする、
    ことを特徴とする、請求項8に記載のストレージ装置の制御方法。
  10.  前記キャッシュ装置は、前記コマンドパラメータに同一の前記ボリューム上領域のアドレスを含む前記対象データ情報が複数含まれている場合、前記対象データ情報に含まれる前記最終記憶媒体上のアドレスが最も大きな前記対象データ情報を選択し、前記選択した対象データ情報に含まれる前記最終記憶媒体上のアドレスのデータが格納されているキャッシュ装置上のアドレスを算出し、該算出されたアドレスと前記選択した対象データ情報に含まれる前記第1の論理記憶空間上アドレスとをマッピングする処理を行うことを特徴とする、請求項9に記載のストレージ装置の制御方法。
PCT/JP2013/084438 2013-12-24 2013-12-24 ストレージ装置及びその制御方法 WO2015097739A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/084438 WO2015097739A1 (ja) 2013-12-24 2013-12-24 ストレージ装置及びその制御方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/084438 WO2015097739A1 (ja) 2013-12-24 2013-12-24 ストレージ装置及びその制御方法

Publications (1)

Publication Number Publication Date
WO2015097739A1 true WO2015097739A1 (ja) 2015-07-02

Family

ID=53477683

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/084438 WO2015097739A1 (ja) 2013-12-24 2013-12-24 ストレージ装置及びその制御方法

Country Status (1)

Country Link
WO (1) WO2015097739A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113253923A (zh) * 2021-04-28 2021-08-13 锐掣(杭州)科技有限公司 数据处理方法、装置、设备、介质及产品
CN114064585A (zh) * 2021-11-10 2022-02-18 南京信易达计算技术有限公司 一种基于国产ai芯片架构的存储压缩系统及控制方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06309111A (ja) * 1993-04-23 1994-11-04 Fujitsu Ltd 磁気ディスク制御方法
JPH08234921A (ja) * 1994-11-22 1996-09-13 Internatl Business Mach Corp <Ibm> アドレス・スペースを管理するための方法及び記憶サブシステム
JPH08249159A (ja) * 1995-03-09 1996-09-27 Fujitsu Ltd ディスク制御装置
JP2010238107A (ja) * 2009-03-31 2010-10-21 Fujitsu Ltd データ記憶プログラム、方法、及び情報処理装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06309111A (ja) * 1993-04-23 1994-11-04 Fujitsu Ltd 磁気ディスク制御方法
JPH08234921A (ja) * 1994-11-22 1996-09-13 Internatl Business Mach Corp <Ibm> アドレス・スペースを管理するための方法及び記憶サブシステム
JPH08249159A (ja) * 1995-03-09 1996-09-27 Fujitsu Ltd ディスク制御装置
JP2010238107A (ja) * 2009-03-31 2010-10-21 Fujitsu Ltd データ記憶プログラム、方法、及び情報処理装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113253923A (zh) * 2021-04-28 2021-08-13 锐掣(杭州)科技有限公司 数据处理方法、装置、设备、介质及产品
CN114064585A (zh) * 2021-11-10 2022-02-18 南京信易达计算技术有限公司 一种基于国产ai芯片架构的存储压缩系统及控制方法
CN114064585B (zh) * 2021-11-10 2023-10-13 南京信易达计算技术有限公司 一种基于国产ai芯片架构的存储压缩系统及控制方法

Similar Documents

Publication Publication Date Title
US11977481B2 (en) Controller for controlling non-volatile semiconductor memory and method of controlling non-volatile semiconductor memory
JP6212137B2 (ja) ストレージ装置及びストレージ装置の制御方法
US9063663B2 (en) Semiconductor storage device and data control method thereof
JP5918906B2 (ja) ストレージ装置及びストレージ制御方法
US9792067B2 (en) Trim command processing in a solid state drive
US9323667B2 (en) System and method for managing trim operations in a flash memory system using mapping tables and block status tables
JP6429963B2 (ja) ストレージ装置及びストレージ装置の制御方法
US20020118582A1 (en) Log-structure array
US10866743B2 (en) Storage control device using index indicating order of additional writing of data, storage control method using index indicating order of additional writing of data, and recording medium recording program using index indicating order of additional writing of data
US10296229B2 (en) Storage apparatus
JP5944502B2 (ja) 計算機システム及び制御方法
WO2016056104A1 (ja) ストレージ装置、及び、記憶制御方法
JP2019128906A (ja) ストレージ装置及びその制御方法
WO2015075837A1 (ja) ストレージ装置及びその制御方法
JPWO2017141315A1 (ja) ストレージ装置
WO2015162755A1 (ja) データを圧縮して格納するストレージ装置
WO2015097739A1 (ja) ストレージ装置及びその制御方法
JP6817340B2 (ja) 計算機
WO2018061161A1 (ja) ストレージ装置およびその制御方法
WO2015118680A1 (ja) ストレージ装置
JPH0863294A (ja) データ記憶システム及びその操作方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13900084

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13900084

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP