[go: up one dir, main page]

WO2015118680A1 - Storage device - Google Patents

Storage device Download PDF

Info

Publication number
WO2015118680A1
WO2015118680A1 PCT/JP2014/053000 JP2014053000W WO2015118680A1 WO 2015118680 A1 WO2015118680 A1 WO 2015118680A1 JP 2014053000 W JP2014053000 W JP 2014053000W WO 2015118680 A1 WO2015118680 A1 WO 2015118680A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
information
storage device
added
write
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2014/053000
Other languages
French (fr)
Japanese (ja)
Inventor
彬史 鈴木
定広 杉本
和衛 弘中
山本 彰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to PCT/JP2014/053000 priority Critical patent/WO2015118680A1/en
Publication of WO2015118680A1 publication Critical patent/WO2015118680A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1076Parity data used in redundant arrays of independent storages, e.g. in RAID systems

Definitions

  • the present invention relates to a storage device using a semiconductor recording device as a data storage device.
  • Patent Document 1 confirms that there is no error using a sum check given to data in order to ensure that the data before compression is correctly input to the compressor in the storage device. Later, it is disclosed that the data is compressed and a new sum check is added to the compressed data.
  • the guarantee code is generally composed of an error detection code and some ID (for example, an address at which data is stored).
  • the storage device gives a guarantee code to the data when write data is received from the host device. Then, when transferring the write data to the final storage medium, the storage apparatus checks the assigned guarantee code and records only the data that has cleared the check on the final storage medium. With this control, it is possible to detect garbled data generated in the cache or transfer path in the storage apparatus and a control error in the control software of the storage apparatus, and high reliability is guaranteed.
  • a storage device using a non-volatile memory as a storage element has recently been used as a cache of a storage device.
  • the storage device temporarily records the write data received from the host device in a cache device of a nonvolatile memory that can be stored at high speed. Then, when the load on the storage device is low, the data is taken out from the cache device and recorded in a final storage device composed of an HDD (Hard Disk Drive) or SSD (Solid State Drive).
  • HDD Hard Disk Drive
  • SSD Solid State Drive
  • the storage device may be transferred via a non-volatile memory cache device.
  • a non-volatile memory cache device For example, when data is transferred from the SSD to the HDD, a certain amount of data to be copied is temporarily stored in the cache device of the non-volatile memory, and after being stored, the data is collectively written in the HDD. By performing such control, it becomes possible to transfer data to the HDD at a higher speed in the sequential IO processing than in the random IO processing.
  • the data stored in the cache is selected according to some rule (for example, the LRU: Last Recently Used algorithm that selects the data that has passed the most time since the last access).
  • the process of storing the selected data in the final storage device is called destage.
  • FIG. 2 shows a data flow from when the conventional storage apparatus receives the write data 210 until the data is recorded in the storage area in the recording destination volume 230 configured by the final storage device in the storage apparatus. .
  • the host interface (host I / F) 124 in the storage apparatus that has received the write data 210 from the host apparatus such as a host computer designates the storage area in the recording volume 230 that is the storage destination for this data.
  • a guarantee code 211 including Then, the storage device stores the data 210 with the guarantee code 211 added to the NVM cache memory. After the completion of this operation, the storage apparatus notifies the host apparatus that the write request processing has been completed.
  • the storage device performs destage control at an arbitrary timing. Specifically, the data 210 and the guarantee code 211 recorded in the NVM cache memory are acquired and transferred to the disk interface 123. At this time, the storage apparatus instructs the disk interface 123 to check the guarantee code 211 of the data to be transferred, and sets an address for designating the storage area in the recording destination volume 230, which is one of the expected values of the guarantee code 211. Notice.
  • the disk interface 123 inspects the guarantee code 211 of the received data 210, and an address that designates a storage area in the recording destination volume 230, which is one of the expected values of the guarantee code 211 notified from the storage device, is given to the data. Make sure that it is.
  • the write data 210 and the guarantee code 211 are transferred to the storage area in the recording destination volume 230, thereby allowing the storage device to Write processing that guarantees that no data corruption or incorrect control has been performed is completed.
  • the storage apparatus of FIG. 3 has a cache memory having a data compression function.
  • This cache memory is referred to herein as an NVM module.
  • FIG. 3 shows the data until the storage device acquires the write data 210, compresses it with the NVM module, and records the compressed data in the storage area in the recording volume 230 configured by the final storage device inside the storage device. The flow is shown.
  • the storage device assigns a guarantee code 311 based on some rule (for example, the storage address of the NVM module that is the cache device) to the data 210 acquired from the higher-level device, and the cache device 126 configured by the NVM module is given. Control to transfer. After this operation is completed, the storage apparatus 101 notifies the host apparatus that the write request processing has been completed.
  • FIG. 3 shows an example in which the guarantee code cannot be assigned at the host interface due to a size change due to compression
  • a problem is not a problem that occurs only during data compression.
  • the storage apparatus 101 instructs the host interface 124 to give a guarantee code 311 based on some rule, and controls the transfer to the cache apparatus 126 configured by the NVM module.
  • the NVM module 126 that has acquired the data 210 to which the guarantee code 311 based on a certain rule has been acquired temporarily stores the data in a nonvolatile memory managed by the NVM module 126.
  • the storage device destages data from the NVM module 126 which is a cache device, it is necessary to inspect the guarantee code 312 at the disk interface 123. Therefore, in the configuration of FIG. 3, it is desirable that a new guarantee code 312 for checking with the disk interface 123 is added to the compressed data or the uncompressed data in the NVM module 126 so that the data can be acquired.
  • the storage apparatus when the storage apparatus according to the present invention receives write target data from a host apparatus such as a host computer, the storage apparatus provides a first guarantee code to the NVM module operating as a cache apparatus or a final storage apparatus. Assign and record the write target data.
  • the storage apparatus issues an instruction to the NVM module to read data in which the second guarantee code different from the first guarantee code is added to the target data.
  • the NVM module returns data in which the second guarantee code different from the first guarantee code is added to the target data to the storage device.
  • the guarantee code assigned to the data can be changed during the data transfer process in the storage device, and the write data storage location is not determined when the write data is received from the host device. Even if it exists, an appropriate guarantee code can be given later.
  • the storage apparatus can manage the data to be controlled with the guarantee code always attached, so that an error check can be performed during the entire data transfer process.
  • FIG. 1 is a diagram showing a configuration of a computer system centered on a storage apparatus according to Embodiment 1 of the present invention.
  • FIG. 2 is a diagram showing a data flow when a conventional storage device stores write data in a final storage device.
  • FIG. 3 is a diagram showing a data flow when a storage device having a cache device having a data compression function stores write data in the final storage device.
  • FIG. 4 is a diagram showing an internal configuration of the NVM module.
  • FIG. 5 is a diagram showing the configuration of the FM.
  • FIG. 6 is a diagram showing the configuration of the physical block.
  • FIG. 7 is a diagram showing the concept of associating the LBA0 and LBA1 spaces, which are logical spaces provided by the NVM module of this embodiment to the storage controller, and the PBA space, which is a physical area designating address space.
  • FIG. 8 is a diagram showing the contents of the LBA0-PBA conversion table and the LBA1-PBA conversion table.
  • FIG. 9 is a diagram showing block management information.
  • FIG. 10 is a diagram illustrating a data format handled by the storage apparatus according to the first embodiment of the invention.
  • FIG. 11 is a diagram showing the configuration of a sector with a guarantee code.
  • FIG. 12 is a diagram showing a write command and response information for the write command.
  • FIG. 13 is a diagram showing a read command and response information to the read command.
  • FIG. 14 is a diagram showing an LBA1 mapping command and response information for the LBA1 mapping command.
  • FIG. 15 is a diagram showing LBA0 mapping command and response information to the LBA0 mapping command.
  • FIG. 16 is a diagram for explaining the storage space handled by the storage apparatus according to the first embodiment of the invention.
  • FIG. 17 is a flow of write processing executed by the storage apparatus according to Embodiment 1 of the present invention.
  • FIG. 18 is a flowchart of destage processing executed by the storage apparatus according to the first embodiment of the invention.
  • FIG. 19 is a flow of a read process performed by the NVM module.
  • FIG. 20 is a diagram showing the configuration of the storage system related to Example 2 of the present invention.
  • FIG. 21 is a diagram for explaining copy processing by the storage apparatus according to the second embodiment of the present invention.
  • FM NAND flash memory
  • FIG. 16 is a diagram illustrating the storage space handled by the storage apparatus 101 according to the first embodiment.
  • the storage apparatus 101 is a compressed volume composed of a final storage device (one or a plurality) such as an HDD 112 or an SSD 111, which is a destage storage destination of compressed data, with respect to a host device 103 such as a host computer. 5500 is concealed, and one or a plurality of virtual decompressed volumes 5000 are recognized from the host device 103 that are recognized as if the compressed data is stored in an uncompressed state (expanded state). The host apparatus 103 sends the read / write request to the storage apparatus 101 by designating the address of the decompression volume 5000.
  • the host apparatus 103 When the host apparatus 103 records data in the storage apparatus 101, it designates an address in the decompression volume 5000 and transfers write data to the storage apparatus 101.
  • the storage apparatus 101 uses an NVM module 126 having an internal compression function as a cache apparatus.
  • the NVM module 126 provides the storage apparatus 101 with two independent logical storage spaces, LBA0 space and LBA1 space, which will be described in detail later.
  • the storage apparatus 101 records the write data acquired from the host apparatus in the NVM module 126 by designating the address of the LBA0 space.
  • the NVM module 126 compresses and stores the received write data.
  • the storage apparatus 101 maps the compressed data of the data recorded by designating the address of the LBA0 space onto the LBA1 space.
  • the storage apparatus 101 acquires the compressed data from the NVM module 126 by designating an address in the LBA1 space, and designates the address of the compressed volume 5500 configured by the final storage device such as an HDD or SSD. Stage.
  • the compressed volume 5500 is a logical volume configured using storage areas of one or more final storage devices, similar to a volume provided to a host device by a known storage device.
  • the storage apparatus 101 acquires compressed data from the compressed volume 5500 in response to a read request received from the host apparatus, and writes to the cache apparatus configured by the NVM module 126 by designating an address on the LBA1 space.
  • the storage apparatus 101 maps the decompressed data of the compressed data recorded by designating an address on the LBA1 space to the LBA0 space.
  • the storage apparatus 101 acquires the compressed data by specifying the address of LBA0 from the NVM module 126 and transfers it as read data to the host apparatus.
  • the storage apparatus 101 additionally writes the compressed data to the compressed volume 5500 when recording the compressed data on the volume.
  • the compressed data is recorded sequentially from the head area of the compressed volume in the order of destage.
  • the address in the compressed volume that is the recording destination of the compressed data is determined when the storage device controls the destage.
  • the storage apparatus 101 When the storage apparatus 101 according to the first embodiment receives write data from the upper apparatus, the first guarantee code including the error detection code calculated from the write data and the storage address of the decompression volume 5000 is received for the write data. Is granted.
  • the storage apparatus 101 instructs the NVM module 126 to compress and store the write data including the first guarantee code.
  • the storage apparatus 101 notifies the NVM module 126 that stores the data the storage address of the decompressed volume that is the expected value of the first guarantee code, and checks the first guarantee code to the NVM module 126. Let The NVM module 126 checks the first guarantee code for the acquired data.
  • the NVM module 126 compresses the data and the first guarantee code together.
  • the present invention is not limited to an example in which the first guarantee code and data are compressed together. An area in which only the data is compressed and is controlled in the same way as the compressed data (an area to be transferred by the same control as the transferred data and adjacent (continuous) to the transferred data. It may be recorded in a storage format in which a non-compressed first guarantee code is assigned to the address area that is not addressed).
  • the storage apparatus 101 determines an address in the compressed volume 5500 serving as a recording destination, and the address in the compressed volume for the compressed data. To give a second warranty code containing At the same time, the storage apparatus 101 notifies the NVM module 126 of the expected value for the first guarantee code assigned to the data obtained by decompressing the compressed data to be destaged. The NVM module 126 once expands the recorded compressed data, and compares the first guarantee code included in the decompressed data with the expected value notified from the storage apparatus 101. If the first guarantee code matches, the second guarantee code is assigned to the compressed data and transferred to the storage apparatus 101.
  • the storage apparatus 101 instructs the disk interface or the final storage device to transfer data when recording the compressed data with the second guarantee code acquired from the NVM module 126 in the compressed volume 5500.
  • the storage apparatus 101 notifies the expected value of the second guarantee code including the address in the compressed volume 5500 to the disk interface or the final storage apparatus.
  • the disk interface or the final storage device notified of the expected value of the second guarantee code checks the second guarantee code when acquiring the compressed data. Specifically, it is confirmed from the error detection code that there is no error in the data, and it is confirmed that the storage destination address of the volume matches the expected value notified from the storage apparatus.
  • the storage apparatus 101 confirms that, in the data transfer in the storage apparatus 101, the control program of the storage apparatus 101 has not mistakenly transferred data different from the data that was originally targeted for access. it can. In addition, it can be guaranteed that no data corruption has occurred in the storage apparatus 101. This guarantee can improve the reliability of the storage apparatus.
  • FIG. 1 shows a schematic configuration of a computer system centering on a storage device including a semiconductor recording device (hereinafter referred to as “NVM module”) using an FM relating to the present invention as a recording medium.
  • NVM module semiconductor recording device
  • FIG. 1 is a semiconductor recording device using FM as a recording medium.
  • the storage apparatus 101 includes a plurality of storage controllers 110.
  • Each storage controller 110 includes a host interface 124 that connects to the host device 103 and a disk interface 123 that connects to the recording device.
  • Examples of the host interface 124 include devices that support protocols such as FC (Fibre Channel), iSCSI (Internet Small Computer System Interface), FCoE (Fibre Channel over Ether), and the disk interface 123 includes FC, SAS (S Examples include devices that support various protocols such as Attached SCSI), SATA (Serial Advanced Technology Attachment), and PCI (Peripheral Component Interconnect) -Express.
  • the storage controller 110 includes hardware resources such as a processor 121 and a memory 125.
  • the storage controller 110 When the processor 121 executes a control program, the storage controller 110 performs final storage such as the SSD 111 and the HDD 112 in response to a read / write request from the host device 103. Request read / write to the media device.
  • Each storage controller 110 has an NVM module 126 to which the present invention is applied. The NVM module 126 can be controlled from the processor 121 via the internal SW 122.
  • the storage controller 110 also has a RAID (Redundant Arrays of Inexpensive Disks) parity generation function and a data restoration function using RAID parity, and also has a function of managing a plurality of SSDs 111 and a plurality of HDDs 112 as a RAID group in arbitrary units. Further, it has a function of dividing a RAID group as an LU (Logical Unit) in an arbitrary unit and presenting it as a recording area to the host apparatus 103.
  • RAID Redundant Arrays of Inexpensive Disks
  • parity is generated according to the specified RAID configuration and written to the recording device.
  • receiving a read request from the host apparatus 103 to the LU after reading the data from the recording apparatus, it checks for the presence of data loss, and if data loss is detected, restores the data using RAID parity, Transfer data.
  • the storage controller 110 has a function of monitoring and managing the failure, usage status, operation status, etc. of the recording device.
  • the storage apparatus 101 is connected to the management apparatus 104 via a network.
  • An example of this network is a LAN (Local Area Network). Although this network is omitted for simplification in FIG. 1, it is connected to each storage controller 110 in the storage apparatus 101. This network may be connected by the same network as the SAN 102.
  • the management device 104 is a computer having hardware resources such as a processor, a memory, a network interface, and a local input / output device, and software resources such as a management program.
  • the management device 104 acquires information from the storage device by a program and displays a management screen.
  • the system administrator uses the management screen displayed on the management apparatus to monitor the storage apparatus 101 and control the operation.
  • the SSD 111 stores data transferred in response to a write request from the storage controller, retrieves stored data in response to a read request, and transfers the data to the storage controller.
  • the disk interface 123 designates the logical storage location for the read / write request by a logical address (hereinafter, LBA: Logical Block Address).
  • LBA Logical Block Address
  • the plurality of SSDs 111 are divided into a plurality of RAID groups and managed, and are configured such that lost data can be restored when data is lost.
  • a plurality of HDDs (Hard Disk Drives) 112 (for example, 120) are provided in the storage apparatus 101 and, like the SSD 111, are connected to a plurality of storage controllers 110 in the same storage apparatus via the disk interface 123.
  • the HDD 112 stores data transferred in response to a write request from the storage controller 110, retrieves stored data in response to a read request, and transfers it to the storage controller 110.
  • the disk interface 123 designates the logical storage location for the read / write request by a logical address (hereinafter, LBA: Logical Block Address).
  • LBA Logical Block Address
  • the plurality of HDDs 112 are divided into a plurality of RAID groups and managed, and the lost data can be restored when data is lost.
  • the storage controller 110 is connected to the SAN 102 connected to the host device 103 via the host interface 124. Although omitted in FIG. 1 for simplification, a connection path for mutual communication of data and control information between storage controllers is also provided.
  • the host device 103 corresponds to, for example, a host computer or a file server that forms the core of the business system.
  • the host device 103 includes hardware resources such as a processor, a memory, a network interface, and a local input / output device, and includes software resources such as a device driver, an operating system (OS), and an application program.
  • OS operating system
  • the host apparatus 103 executes various programs under processor control to perform communication with the storage apparatus 108 and data read / write requests.
  • management information such as usage status and operation status of the storage apparatus 101 is acquired by executing various programs under processor control.
  • the management unit of the recording apparatus, the recording apparatus control method, the data compression setting, and the like can be designated and changed.
  • the NVM module 126 includes an FM controller (FM CTL) 410 and a plurality of (for example, 32) FM 420s.
  • FM CTL FM controller
  • 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 (I / F). ) 417, and a switch 414 for mutually transferring data.
  • the switch 414 connects the processor 415 in the FM controller 410, the RAM 413, the data compression / decompression unit 418, the parity generation unit 419, the data buffer 416, the I / O interface 411, and the FM interface 417, and addresses the data between the parts. Or route and forward by ID.
  • the I / O interface 411 is connected to the internal switch 122 included in the storage controller 110 in the storage apparatus 101, and is connected to each part of the FM controller 410 via the switch 414.
  • the I / O interface 411 receives a read / write request and a logical storage location (LBA: Logical Block Address) to be requested from the processor 121 included in the storage controller 110 in the storage apparatus 101, and processes the request. I do. Further, when a write request is made, the write data is received and the write data is recorded in the FM 420. Further, the I / O interface 411 receives an instruction from the processor 121 included in the storage controller 110 and issues an interrupt to the processor 415 in the FM controller internal 410.
  • LBA Logical Block Address
  • the I / O interface 411 also receives a control command for the NVM module 126 from the processor 121 included in the storage controller 110, and displays the operation status, usage status, current setting value, etc. of the NVM module 126 according to the command.
  • the storage controller 110 can be notified.
  • 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. In addition, the processor 415 monitors the entire FM controller 410 by a periodic information acquisition and interrupt reception function.
  • the data buffer 416 stores temporary data during the data transfer process in the FM controller 410.
  • the FM interface 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, and a plurality of FMs 420 connected to the same bus are controlled independently using a CE (Chip Enable) signal that is also connected to the FM 420.
  • CE Chip Enable
  • the FM interface 417 operates in response to a read / write request instructed by the processor 415. At this time, the FM interface 417 is instructed by the processor 415 as the chip, block, and page numbers as request targets. If it is a read request, the stored data is read from the FM 420 and transferred to the data buffer 416. If it is a write request, the data to be stored is called from the data buffer 416 and transferred to the FM 420.
  • the FM interface 417 includes an ECC generation circuit, an ECC data loss detection circuit, and an ECC correction circuit.
  • ECC generation circuit When writing data to the FM 420, the data is written with the ECC added. Further, when data is called, the call data from the FM 420 is inspected by the data loss detection circuit using ECC, and when the data loss is detected, the data is corrected by the ECC correction circuit.
  • ECC added to the data is added to the data written in the FM 420 and is inspected by the FM interface 417 when it is read from the FM 420. Is different.
  • the data compression / decompression unit 418 has a data compression function using a reversible compression algorithm. In addition, there are a plurality of types of data compression algorithms, and a compression level changing function is also provided.
  • the data compression / decompression unit 418 reads data from the data buffer 416 according to an instruction from the processor 415, performs a data compression operation that is a data compression operation or an inverse conversion of the data compression by a lossless compression algorithm, and outputs the result again. Write to the data buffer.
  • the data compression / decompression unit 418 may be implemented as a logic circuit, or a similar function may be realized by executing a compression / decompression program with a processor.
  • the data compression / decompression unit 418 also has a function of verifying a guarantee code attached to data transmitted from the host apparatus 103 and a function of changing the ID of a guarantee code attached to data. This function will be described later.
  • the parity generation unit 419 has a function of generating parity that is redundant data required in the RAID technology. Specifically, the parity generation unit 419 includes an XOR operation used in RAID 5 and 6, a Reed-Solomon code or EVENODD used in RAID 6. It has a function to generate diagonal parity calculated by the method.
  • the parity generation unit 419 reads data that is a parity generation target from the data buffer 416 in accordance with an instruction from the processor 415, and generates RAID5 or RAID6 parity by the above-described parity generation function.
  • the switch 414, I / O interface 411, processor 415, data buffer 416, FM interface 417, data compression / decompression unit 418, and parity generation unit 419 described above are ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate).
  • Array may be configured within a single semiconductor element, or may be configured such that a plurality of individual dedicated ICs (Integrated Circuits) are connected to each other.
  • a volatile memory such as a DRAM is used for the RAM 413.
  • the RAM 413 stores management information of the FM 420 used in the NVM module 126, 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.
  • the configuration of the NVM module 126 to which the present invention is applied has been described with reference to FIG.
  • the NVM module 126 having the flash memory Flash Memory
  • the nonvolatile memory to be mounted on the NVM module 126 is not limited to the flash memory.
  • a non-volatile memory such as 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 nonvolatile memory area in the FM 420 is composed of a plurality (for example, 4096) of blocks (physical blocks) 502, and stored data is erased in units of physical blocks.
  • the FM 420 has an I / O register 501 inside.
  • the I / O register 501 is a register having a recording capacity equal to or larger than a physical page size (for example, 8 KB).
  • FM 420 operates in accordance with a read / write request instruction from FM interface 417.
  • the flow of the write operation is as follows. First, the FM 420 receives a write command, a requested physical block, and a physical page from the FM interface 417. Next, the write data transferred from the FM interface 417 is stored in the I / O register 501. Thereafter, the data stored in the I / O register 501 is written to the designated physical page.
  • the flow of read operation is as follows. First, the FM 420 receives a read command, a requested physical block, and a page from the FM interface 417. Next, the data stored in the physical page of the designated physical block is read and stored in the I / O register 501. Thereafter, the data stored in the I / O register 501 is transferred to the FM interface 417.
  • the physical block 502 is divided into a plurality of (for example, 128) pages 601, and reading of stored data and writing of data are processed in units of pages.
  • the order of writing to the physical page 601 in the block 502 is fixed, and writing is performed in order from the first page. That is, data must be written in the order of Page1, Page2, Page3,.
  • overwriting on a written page 601 is prohibited in principle, and when data is overwritten on a written page 601, it is necessary to delete the data in the block 502 to which the page 601 belongs only after the data is erased. Data cannot be written to page 601.
  • the NVM module 126 in this embodiment is equipped with a plurality of FM (chips) 420 and manages a storage area composed of a plurality of blocks and a plurality of pages. Then, a logical storage space is provided to the storage controller 110 (the processor 121) to which the storage controller 110 is connected.
  • “providing storage space” means that each storage area that the NVM module 126 accesses the storage controller 110 is assigned with an address, and the storage controller 110 to which the NVM module 126 is connected is managed. This means that the processor 121 issues an access request (command) designating the address to enable the reference / update of the data stored in the area specified by the address.
  • the physical storage area configured by the FM 420 is managed in a manner uniquely associated with an address space used only within the NVM module 126.
  • this physical area designating address space (physical address space) used only within the NVM module 126 will be referred to as a PBA (Physical Block Address) space, and each physical storage area (sector in the PBA space.
  • PBA Physical Block Address
  • the position (address) of 1 sector is 512 bytes) is described as PBA (Physical Block Address).
  • the NVM module 126 of this embodiment manages the association between this PBA and LBA (Logical Block Address) that is the address of each area of the logical storage space provided to the storage apparatus.
  • LBA Logical Block Address
  • a conventional storage device such as an SSD provides one storage space for a host device (such as a host computer) to which the storage device is connected.
  • the NVM module 126 of the present embodiment has two logical storage spaces, and provides two logical storage spaces to the storage controller 110 to which the NVM module 126 is connected. The relationship between the two logical storage spaces LBA and PBA will be described with reference to FIG.
  • FIG. 7 is a diagram illustrating a concept of association between the LBA0 space 701 and the LBA1 space 702, which are logical storage spaces provided by the NVM module 126 of the present embodiment to the storage controller 110, and the PBA space 703.
  • the NVM module 126 provides two logical storage spaces, an LBA0 space 701 and an LBA1 space 702, to the storage controller 110, which is a host device.
  • the addresses assigned to the storage areas on the LBA 0 space 701 are referred to as “LBA 0” or “LBA 0 address”, and the addresses assigned to the storage areas on the LBA 1 space 702 are referred to as “LBA 1”. Or “LBA1 address”.
  • 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 processor 121 of the storage controller 110 to access the compressed data recorded in the physical storage area configured by the FM 420 as uncompressed data.
  • the processor 121 designates an address (LBA0) on the LBA0 space 701 and issues a write request to the NVM module 126
  • the NVM module 126 acquires write data from the storage controller 110 and compresses it by the data compression / decompression unit 418. After that, the NVM module 126 records data in the physical storage area on the FM 420 designated by the dynamically selected PBA, and associates LBA0 and PBA.
  • the NVM module 126 acquires data (compressed data) from the physical storage area of the FM 420 indicated by the PBA associated with the LBA0. After decompression by the compression / decompression unit 418, the decompressed data is transferred to the storage controller 110 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 110 to access the compressed data recorded in the physical storage area configured by the FM 420 as it is (not expanded).
  • the processor 121 of the storage controller 110 designates LBA1 and issues a write request to the NVM module 126
  • the NVM module 126 acquires data (compressed write data) from the storage controller 110, and the NVM module 126 dynamically
  • the data is recorded in the storage area of the FM designated by the selected PBA, and the LBA 1 and the PBA are associated with each other.
  • the NVM module 126 acquires data (compressed data) from the physical storage area of the FM 420 indicated by the PBA associated with LBA 1 and reads it to the storage controller 110. Transfer compressed data as 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 processor 121 specifies LBA0 (assuming that LBA0 is set to 0x000000011000) and writes data to the NVM module 126, the data is compressed by the data compression / decompression unit 418 in the NVM module 126.
  • the NVM module 126 is arranged on the dynamically selected PBA space (specifically, any unwritten page among a plurality of pages of the FM 420).
  • the data is managed in a state associated with the address 0x000000011000 of the LBA0 space. Thereafter, when the processor 121 issues a request for associating the data associated with 0x000000011000 with the address of the LBA1 space (assuming 0x80000000010) to the NVM module 126, this data is also associated with the LBA1 space.
  • the processor 121 when the processor 121 issues a request (command) for reading the data at the LBA1 address 0x80000000010 to the NVM module 126, the processor 121 compresses the data that it has written to the LBA0 address 0x000000011000. Can be read.
  • the size of the compressed data generated by the NVM module 126 in the embodiment of the present invention varies depending on the data contents, but it is easy to handle if the size is a multiple of 512 bytes (1 sector), and will be described later.
  • the size 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.
  • the LBA0-PBA conversion table 810 and the LBA1-PBA conversion table 820 will be described with reference to FIG.
  • the LBA0-PBA conversion table 810 is stored in the RAM 413 in the NVM module 126, and includes information on the NVM module LBA0 (811), the NVM module PBA (812), and the PBA length (813).
  • the processor 415 of the NVM module 126 receives the LBA 0 specified at the time of the read request from the host device, and then uses the LBA 0 to obtain the PBA indicating the location where the actual data is stored.
  • the NVM module 126 records update data (write data) in a physical storage area different from the PBA in which the pre-update data is recorded, and converts the PBA and PBA length in which the update data is recorded into an LBA0-PBA conversion. Record in the corresponding part of the table and update the LBA0-PBA conversion table. By operating in this manner, the NVM module 126 enables (pseudo) overwriting of data in the area on the LBA0 space.
  • the NVM module LBA0 (811) is a logical area of the LBA0 space provided by the NVM module 126 arranged in units of 4 KB in order (each address (LBA0) in the LBA0 space is attached to each sector (512 bytes). Have been).
  • LBA0 each address
  • PBA NVM module PBA
  • the association between the NVM module LBA0 (811) and the NVM module PBA (812) is managed in units of 4 KB (8 sectors).
  • the association between the NVM module LBA0 (811) and the NVM module PBA (812) may be managed in an arbitrary unit other than the 4 KB unit.
  • the NVM module PBA (812) is a field for storing the head address of the PBA associated with the NVM module LBA0 (811).
  • the physical storage area of the PBA space is divided and managed for every 512 bytes (one sector).
  • a value (PBA) of “XXX” is associated as PBA (Physical Block Address) associated with the NVM module LBA0 (811) “0x000_0000_0000”. This value is an address that uniquely indicates a storage area among a plurality of FMs 420 mounted on the NVM module 126.
  • the actual storage size of the 4 KB data specified in the NVM module LBA0 (811) is recorded.
  • the storage size is recorded by the number of sectors.
  • PBA 4 KB data starting from LBA 0 [0x000_0000_0000] is compressed and stored in the 1 KB area from PBA “XXX” to “XXX + 1”. Represents.
  • the NVM module 126 in this embodiment compresses uncompressed data instructed by the processor 121 of the storage controller 110 in units of 4 KB.
  • the processor 121 receives a write request for 8 KB data (uncompressed data) starting from the address (0x000_0000_0000) in the LBA0 space
  • 4 KB data in the address range 0x000_0000_0000 to 0x000_0000_0007 (in the LBA0 space) is used as a unit.
  • Compressed data is generated by compression, and then 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 NVM module 126, and includes two pieces of information of the NVM module LBA1 (821) and the NVM module PBA (822).
  • the processor 415 of the NVM module 126 receives the LBA1 specified at the time of the read request from the host device, and then converts the received LBA1 into a PBA indicating the location where the data is stored using the LBA1-PBA conversion table 820. To do.
  • the NVM module LBA1 (821) is a logical area of the LBA1 space provided by the NVM module 126 arranged in order for each sector (a numerical value 1 in the NVM module LBA1 (821) means one sector (512 bytes). To do). This is because the NVM module 126 in this embodiment is described on the premise that the association between the NVM module LBA1 (821) and the NVM module PBA (822) is managed in units of 512B, but this NVM module LBA1 (821). ) And the NVM module PBA (822) are not limited to the mode managed in 512B units, and may be managed in any unit.
  • the LBA1 space is a space that directly maps the PBA space that is the physical storage space where the compressed data is stored, and is preferably equal to the PBA division management size. Divide and manage with.
  • the NVM module PBA (822) is a field for storing the head address of the PBA associated with LBA1.
  • the PBA value “ZZZ” is associated with the NVM module LBA1 “0x800_0000_0002”.
  • This PBA value is an address that uniquely indicates a storage area on a certain FM 420 mounted on the NVM module 126. Accordingly, when “0x800_0000_0002” is received as the read request destination start address (LBA1), “ZZZ” is acquired as the physical read destination start address in the NVM module 126.
  • LBA1 the read request destination start address
  • a value indicating “unallocated” is stored in the NVM module PBA (822).
  • the above is the contents of the LBA0-PBA logical-physical conversion table 810 and the LBA1-PBA logical-physical conversion table 820 used by the NVM module 126.
  • the block management information 900 is stored in the DRAM 413 in the NVM module 126 and includes items of an NVM module PBA 901, an NVM chip number 902, a block number 903, and an invalid PBA amount 904.
  • the NVM module PBA 901 is a field for storing a PBA value that uniquely identifies each area in all the FMs 420 managed by the NVM module 126.
  • the NVM module PBA 901 is divided and managed in units of blocks.
  • FIG. 9 shows an example in which the head address is stored as the NVM module PBA value. For example, in the row (entry) where the value of the NVM module PBA 901 is “0x000_0000_0000”, information about the PBA range from “0x000_0000_0000” to “0x000_0000_0FFF” is stored.
  • the NVM chip number 902 is a field for storing a number for uniquely specifying the FM Chip 420 mounted on the NVM module 126.
  • the block number 903 is a field for storing the block number in the FM Chip 420 specified by the stored value of the NVM Chip number 902.
  • the invalid PBA amount 904 is a field for storing the invalid PBA amount of the block specified by the stored value of the block number 903 in the FM Chip specified by the stored value of the NVM Chip number 902.
  • the invalid PBA amount is associated with the LBA0 space and / or LBA1 space specified by the NVM module LBA0 (811) and the NVM module LBA1 (821) in the LBA0-PBA conversion table 810 and the LBA1-PBA conversion table 820. This is the amount of the area (on the PBA space) that was later released from the association.
  • the PBA associated with the NVM module LBA0 or LBA1 by the LBA0-PBA conversion table 810 or the LBA1-PBA conversion table 820 is referred to as an effective PBA in this specification.
  • the invalid PBA area is inevitably generated when a pseudo-overwrite is attempted in a non-volatile memory where data cannot be overwritten.
  • the NVM module 126 records the update data in an unwritten PBA (different from the PBA in which the pre-update data is written) at the time of data update, and the NVM module PBA 812 of the LBA0-PBA conversion table 810. And the PBA length 813 field are rewritten to the start address and PBA length of the PBA area in which the update data is recorded. At this time, the association by the LBA0-PBA conversion table 810 is released for the PBA area in which the pre-update data is recorded.
  • the NVM module 126 also checks the LBA1-PBA conversion table 820 and sets an area that is not associated in the LBA1-PBA conversion table as an invalid PBA area.
  • the NVM module 126 counts the amount of invalid PBA for each block, which is the minimum erase unit of FM, and preferentially selects a block with a large amount of invalid PBA as a garbage collection target area.
  • the block number 0 of the NVM chip number 0 managed by the NVM module 126 has an invalid PBA area of 160 KB.
  • garbage collection when the total amount of invalid PBA areas managed by the NVM module 126 exceeds a predetermined garbage collection start threshold (depletion of unwritten pages), blocks including invalid PBA areas are erased and unwritten. Create a PBA area. This operation is called garbage collection.
  • garbage collection When an effective PBA area is included in an erasure target block at the time of garbage collection, it is necessary to copy the effective PBA area to another block before erasing the block. Since this data copy involves a write operation to the FM, the destruction of the FM progresses, and resources such as the processor of the NVM module 126 and the bus bandwidth are consumed as the copy operation, which causes a decrease in performance. For this reason, it is desirable that the number of valid PBA areas be as small as possible.
  • the NVM module 126 refers to the block management information 900 at the time of garbage collection, and deletes the effective PBA by sequentially deleting the blocks having a larger storage value of the invalid PBA amount 904 (including many invalid PBA areas). Operates to reduce the amount of space copy.
  • the amount of area released from the association with the NVM modules LBA0 (811) and LBA1 (821) is managed by the PBA amount (number of sectors). Is not limited to this management unit. For example, instead of the PBA amount, there may be a mode in which the number of pages that are the minimum writing unit is managed.
  • the above is the content of the block management information 900 used by the NVM module to which the present invention is applied.
  • FIG. 10 shows the data format generated by each component of the storage device as 1000, 1010, 1020, 1030, and 1040 in order when the host device writes 4 KB data.
  • the storage device of the first embodiment compresses and manages data in units of 4 KB, but the present invention is not limited to the storage device in which the management unit of compressed data in the storage device is 4 KB.
  • the data compression / decompression unit 418 of the NVM module 126 that performs data compression according to the first embodiment is a unit that compresses and decompresses data in units of 4 KB.
  • the present invention is a unit for compressing and decompressing data. Is not limited to 4 KB.
  • the first data format 1000 indicates 4 KB data transferred from the host device 103 to the storage device 101.
  • the minimum access unit when the host apparatus 103 accesses the volume of the storage apparatus 101 is 512 B (bytes), and the storage apparatus 101 can be configured to specify data in 512 B units.
  • the 512B unit data that can be designated as an address by the host device 103 is referred to as a sector, and 4 KB data is handled as eight sectors.
  • the case where the sector is 512B will be described.
  • the present invention is not limited to this sector unit. For example, one sector may be 4 KB.
  • the storage apparatus 101 When the storage apparatus 101 receives a 4 KB request in the data format 1000, it causes the host interface 124 to generate a guarantee code.
  • an 8B guarantee code is assigned to each 512B sector, which is a data designation unit. This configuration is described in detail in FIG. FIG. 11 shows an example in which an 8B guarantee code is assigned to the 512B sector.
  • the sector to which the guarantee code is assigned is referred to as a sector with a guarantee code.
  • the sector 1100 with a guarantee code is composed of 512B data 1101 and 8B guarantee code, and the 8B guarantee code is composed of 2B CRC 1102 and 6B ID 1103.
  • a guarantee code composed only of CRC and ID will be described, but the present invention is not limited to this example. The present invention is applied if it is necessary to change the ID 1103 of the guarantee code during the control of the apparatus.
  • CRC 1102 is a 2B CRC (Cyclic Redundancy Check) code generated using 512B data 1101. If the bit value constituting the data 1101 changes for some reason and an error bit is generated, a change in the bit value can be detected by performing an inspection using this CRC.
  • CRC Cyclic Redundancy Check
  • the processor 121 of the storage apparatus 101 instructs the hardware (for example, the host interface 124) to transfer, the received hardware detects a bit error using the data 1101 and CRC 1102 of the sector with a guarantee code to be transferred. . If no error bit is detected, data transfer is performed. On the other hand, if an error bit is detected, the data transfer is stopped and the processor 121 is notified of the error.
  • Example 1 although the example which set CRC to 2B was shown, this invention is not limited to the size of this CRC. The amount of CRC may be increased according to the required detection capability. Further, although the CRC of the first embodiment is shown as an example generated only from the data portion, the present invention is not limited to this CRC generation method. For example, a CRC may be created from data and ID. In this case, it is possible to detect an error bit generated in the ID. On the other hand, it is necessary to recalculate the CRC when changing the ID.
  • ID 1103 is an ID that can identify a sector with a guarantee code.
  • the logical address (LBA) of the decompression volume that is a virtual recording destination of uncompressed data is used as the ID.
  • LBA logical address
  • a configuration in which a sector can be uniquely identified from an ID is described.
  • the reliability is not significantly impaired. I do not care.
  • the probability that the same ID is assigned is very low, the same ID may be assigned to different sectors.
  • the data size of the ID 1103 is 6B is shown, but the present invention is not limited to this data size.
  • the data size of ID 1103 may be made larger than 6B in order to reduce the probability of transferring erroneous data.
  • the ID used in the storage apparatus guarantees the correctness of the operation of the storage apparatus 101.
  • the processor 121 notifies the hardware that performs the transfer of the expected ID value.
  • the hardware instructed to transfer acquires the ID 1103 in the sector 1100 with a guarantee code to be transferred, and confirms that it matches the expected value.
  • the hardware instructed to transfer notifies the processor 121 of an error.
  • a compressed sector with a guarantee code which will be described later, stores compressed data in the data 1101, and is given a guarantee code including a CRC created from the compressed data and an ID assigned to the compressed data. Since the size of each field of the compressed sector with a guarantee code is the same as that of the sector 1100 with a guarantee code, detailed description thereof is omitted.
  • FIG. 10 shows an example in which compressed data of 1210B is generated as a result of compressing a sector with a guarantee code of 4160B, but compressed data of other sizes may be generated depending on the data contents.
  • compression Data indicates “Compression Data” in the figure.
  • FIG. 10 shows an example in which compressed data of 1210B is generated as a result of compressing a sector with a guarantee code of 4160B, but compressed data of other sizes may be generated depending on the data contents.
  • FIG. 10 shows an example in which data 1101 and a guarantee code are compressed together in a sector with a guarantee code will be described.
  • the present invention is not limited to this example.
  • only the data 1101 is compressed in the sector with the guarantee code, and the guarantee code is not compressed.
  • compressed data 1020 having a configuration in which uncompressed guarantee codes are collected and compressed at the beginning or end of data may be created.
  • the NVM module 126 manages the compressed data on a sector basis as well as the uncompressed data. Therefore, the 326B data is padded after the compressed data of 1210B to obtain data of the size of 1536B (that is, the size of 3 sectors). Then, 1536B data is divided into three compressed sectors ("CompData" in the figure) (see data format 1030), and data 1040 is generated by padding an 8B area for a guarantee code at the end of each compressed sector. (The black box portion in the figure means a guarantee code padding area of the compressed sector. Also, when the data 1040 is generated, no guarantee code is stored in the padding area). This data is recorded in the FM 420.
  • the NVM module 126 Since the minimum recording unit of FM is a page, for example, a size such as 8 KB or 16 KB, the NVM module 126 stores a certain amount of data in the data buffer 416 in the NVM module 126, and the data exceeding the minimum recording unit. A plurality of write data is collectively recorded in the FM 420 at the timing when the error is accumulated.
  • the processor 121 of the storage apparatus 101 reads out data in which an 8B area for a guarantee code is added to each compressed sector by issuing a read command to be described later to the NVM module 126.
  • the NVM module 126 assigns a compression sector guarantee code to each compression sector. More specifically, when the storage controller 110 (the processor 121) issues a read command to the NVM module 126, the ID of the guarantee code to be given to the compression sector is included in the read command.
  • the NVM module 126 when transferring the compressed sector to the storage controller 110, stores the 2B CRC generated from the compressed sector in the padded guarantee code area and the 6B specified by the storage controller 110. Are generated, and a compressed sector 1050 with a guarantee code is generated. Thereafter, the NVM module 126 transfers the compressed sector 1050 with a guarantee code as read data to the controller 110.
  • NVM Module Control Command 1 Write Command Next, commands supported by the NVM module 126 to which the present invention is applied will be described.
  • the NVM module 126 analyzes the content of the received command, performs predetermined processing, and sends one response (response information) after the processing is completed. Reply to the storage controller.
  • This process is realized by the processor 415 in the NVM module 126 executing a command processing program stored in the RAM 413.
  • the command includes information necessary for the NVM module 126 to perform a predetermined process. For example, in the case of a write command that instructs the NVM module 126 to write data, the command includes a write command and information (such as the write data write position and data length) required for the write. Contains.
  • FIG. 12 is a diagram showing a write command and response information to the write command supported by the NVM module 126 according to the first embodiment of the present invention.
  • the write command 1210 of the NVM module in this embodiment includes, as command information, an operation code (Opcode) 1211, a command ID 1212, an LBA 0/1 start address 1213, an LBA 0/1 length 1214, a compression necessity flag 1215, a write data address 1216, It consists of an expected value 1217 of the guarantee code ID and a seed 1218 of the guarantee code ID.
  • Opcode operation code
  • Operation code 1211 and command ID 1212 are fields that exist in common with each command supported by the NVM module 126.
  • the operation code 1211 is a field in which information for notifying the NVM module 126 of the command type is stored. As an example, a value of 0x01 is stored in the field for a write command, and a value of 0x02 is stored for a read command.
  • the NVM module 126 that has acquired the command recognizes that the notified command is a write command by referring to this field.
  • the command ID 1212 is a field for storing a unique ID of the command.
  • the command issuer storage controller 110
  • the specified ID is given.
  • the storage controller 110 stores an ID that can uniquely identify the command in the command ID 1212.
  • the completion of the command is recognized by acquiring the ID included in the response information.
  • the LBA 0/1 start address 1213 is a field for designating the head address of the write destination logical space (LBA 0 space or LBA 1 space).
  • LBA 0 space in the embodiment of the present invention is a space in the range of addresses 0x000_0000_0000 to 0x07F_FFFF_FFFF
  • the LBA1 space is defined as a space in the range after the address 0x800_0000_0000.
  • an address in the range from 0x000_0000_0000 to 0x07F_FFFF_FFFF is stored in 1 start address 1213, it is recognized that an address in the LBA0 space has been designated, and if an address in the range from 0x800_0000_0000 to 0x8FF_FFFF_FFFF is designated, the address in the LBA1 space is designated Can be recognized.
  • the address according to the address space of the LBA0 space or the LBA1 space is specified (that is, whether data is compressed and written or whether data is written as it is without being compressed)
  • a method other than the method described above can be adopted as a method for recognizing. For example, there may be a method of identifying the LBA0 space and the LBA1 space according to the contents of the operation code 1211.
  • the LBA 0/1 length 1214 is a field for designating the range (length) of the data recording destination LBA 0 or LBA 1 starting from the LBA 0/1 start address 1213.
  • the NVM module 126 associates the PBA space area for storing write data with the LBA0 space upper area or the LBA1 space upper area within the range indicated by the LBA0 or LBA1 start address 1213 and the LBA0 / 1 length 1214 described above. I do.
  • the compression necessity flag 1215 is a field for designating whether or not to compress the write target data indicated by this command.
  • the storage controller 110 creates a write command, if the size reduction effect due to data compression cannot be expected for the write target data (for example, when it is already recognized as data compressed by image compression or the like), “0” is set in this field. Is stored, the NVM module 126 is notified that compression is not necessary. Conversely, if a value other than 0 is stored in this field, the NVM module 126 performs compression. In the first embodiment, when writing to the LBA1 space, “0” is stored in this field in order to explicitly notify that the write target data has already been compressed and no further compression processing is necessary. As another embodiment, when data is written to the LBA1 space, the NVM module 126 may determine that compression of transfer data is not always necessary. In that case, the field of the compression necessity flag 1215 is not necessary.
  • the write data address 1216 is a field for storing the start address of the current storage destination (for example, the DRAM 125 of the storage controller 110) of the write target data indicated by this command.
  • the NVM module 126 acquires write data by reading data existing in the range of the length specified by the LBA 0/1 length (1214) from the position specified by this field. When the write target data is discretely stored in a plurality of areas, a plurality of addresses are stored in this field. As another embodiment, the NVM module 126 refers to the pointer information so that this field stores pointer information (address of an area in which the list is stored) for storing a plurality of addresses. The write data address may be acquired.
  • the expected value 1217 of the guarantee code ID is a field for storing the expected value of the guarantee code assigned to the write target data.
  • 6B data is used as the ID of the guarantee code. For this reason, this field also specifies an ID expectation value of 6B.
  • the NVM module 126 that has received the command checks whether the ID of the guarantee code added to each 512B of the data to be written matches the expected value 1217 of the guarantee code ID.
  • a specific method of the inspection is as follows. When the write data size is 4 KB (8 sectors), the NVM module 126 performs a comparison operation for the IDs of the sectors with eight guarantee codes. First, expected values of IDs of eight guarantee code-added sectors are generated from expected values 1217 of guarantee code IDs. The expected value of the ID of the sector with the first guarantee code in the write data is the expected value 1217 of the guarantee code ID, and the expected value of the ID of the sector with the guarantee code thereafter is the expected value 1217 of the guarantee code ID one by one. The added value. As described above, in the case of a 4 KB write request, each of the eight sectors with a guarantee code is compared with an expected value obtained by adding a value of 0 to 7 to the expected value 1217 of the guarantee code ID.
  • the write data coming from the host apparatus 103 is recorded in the NVM module 126 that is a cache.
  • the host interface 124 of the storage apparatus 101 assigns 2B CRC and 6B ID as a guarantee code for each 512B data acquired from the host apparatus 103.
  • the ID given at the time of the write operation is the lower 6 bytes of the logical address (LBA) of the decompression volume 5000 to which the write data is written. A value is added as an ID.
  • LBA logical address
  • the present invention is not limited to an aspect in which the write destination address of the decompression volume 5000 is used as the guarantee code ID.
  • the NVM module 126 when LBA0 is designated as the LBA0 / 1 start address 1213, the contents of the ID part of the guarantee code of each sector of the decompressed data are set to the expectation of the guarantee code ID.
  • the LBA1 is specified as the LBA0 / 1 start address 1213, the contents of the ID part of the guarantee code of each sector of the compressed data are expected of the guarantee code ID. It operates to check based on the value stored in the value 1217 field. Therefore, when the storage apparatus 101 reads data (compressed data) from the final storage device constituting the compressed volume and records it in the area on the LBA1 space of the NVM module 126, the ID of the guarantee code of each sector of the compressed data Perform part inspection.
  • the new guarantee code ID type 1218 is a field used when changing the guarantee code at the time of writing or when attaching a new guarantee code to the compressed data.
  • the new guarantee code ID seed 1218 stores an ID value newly added to the data of the first sector of the write target data in the write request. In the first embodiment, 6B data is used as the guarantee code ID. For this reason, this field also specifies the seed of 6B.
  • a value indicating invalidity for example, a value not used as a guarantee code ID such as 0xFFFFFFFF) is stored in the field of the new guarantee code ID seed 1218.
  • the new guarantee code seed 1218 is not used in the storage apparatus 101 shown in the first embodiment during normal write processing, that is, when write data from the host apparatus 103 is stored in the NVM module 126. This is because, as described above, when the write data from the host device 103 is stored in the NVM module 126, the address on the compressed volume in which the data is stored is not determined.
  • the storage apparatus 101 writes data to the NVM module 126, if the newly assigned guarantee code is known, the new guarantee code seed 1218 field may be used.
  • the processor 121 of the storage apparatus 101 When changing the guarantee code at the time of data writing to the NVM module 126, the processor 121 of the storage apparatus 101 stores information that becomes the seed of the new guarantee code in the new guarantee code seed 1218 field of the write command. Upon receiving the instruction, the NVM module 126 generates a new guarantee code from the new guarantee code seed 1218 included in the write command and stores the write data in the FM 420, and a sector with guarantee code (or compression with guarantee code). (Sector) guarantee code is changed and stored in FM.
  • the NVM module 126 when the write request size specified by the LBA 0/1 length 1214 is 4 KB, the NVM module 126 generates eight new guarantee codes from the new guarantee code ID seed 1218. Specifically, the NVM module 126 sets the ID of the sector with the guarantee code at the head of the 4 KB (8 sectors) data to be transferred as the value specified by the new guarantee code ID seed 1218 and sets the next guarantee code.
  • the ID value of the attached sector is a value obtained by incrementing the seed of the new guarantee code by one.
  • the ID part included in the sector guarantee code with a guarantee code (in each sector of the decompressed data)
  • the ID generated based on the value stored in the seed 1218 field of the new guarantee code ID is stored in the ID part of the guarantee code included), and LBA1 is designated as the LBA0 / 1 start address 1213
  • the ID part in the guarantee code of the compressed sector with the guarantee code (the ID part of the guarantee code added to each sector of the compressed data) is generated based on the value stored in the seed 1218 field of the new guarantee code ID. To store stored IDs.
  • the write response information 1220 includes a command ID 1221, a status 1222, and a compressed data length 1223.
  • a command ID 1221 a command ID 1221
  • a status 1222 a status 1222
  • a compressed data length 1223 a compressed data length
  • the command ID 1221 and the status 1222 are common information included in the response of each command supported by the NVM module 126.
  • the command ID 1221 is a field for storing a number that can uniquely identify a completed command.
  • the status 1222 is a field for notifying the command request source (the processor 121 of the storage apparatus 101) of the completion or error of the command.
  • the command request source the processor 121 of the storage apparatus 101
  • a number for identifying the cause of the error is stored.
  • the compressed data length 1223 is a field for recording the data length when the written data is reduced by data compression.
  • the processor 121 that has issued the command can acquire the compressed data size of the written data by acquiring information in this field included in the write response information 1220.
  • this field is invalid because compressed data is recorded.
  • NVM Module Control Command 2 Read Command Next, a read command supported by the NVM module to which the present invention is applied will be described. This read command instructs the replacement of the guarantee code, which is a characteristic operation of the present invention.
  • FIG. 13 is a diagram showing an NVM module read command and response information to the read command in the present embodiment.
  • the read command 1310 of the NVM module in this embodiment includes, as command information, an operation code 1311, a command ID 1312, an LBA0 / 1 start address 1313, an LBA0 / 1 length 1314, an expansion necessity flag 1315, a read data address 1316, and a guarantee code ID. Expected value 1317 and guarantee code ID seed 1318.
  • an example of a command based on the above information will be described, but there may be additional information above. Since the command ID 1312 has the same contents as the previous write command, description thereof is omitted.
  • the operation code 1311 is a field for notifying the command type to the NVM module 126, and the NVM module 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 1313 is a field for designating the start address of the logical space (LBA 0 space or LBA 1 space) of the read destination. Similarly to the write command, if LBA0 is specified as the LBA0 / 1 start address 1313, the decompressed data is returned to the request source, and if LBA1 is specified, the unexpanded data is returned to the request source. Return to
  • the LBA 0/1 length 1314 is a field for designating the range of the recording destination LBA 0 or LBA 1 starting from the LBA 0/1 start address 1313.
  • the NVM module 126 identifies the PBA associated with the LBA0 or LBA1 area in the range indicated by the LBA0 or LBA1 start address 1313 and the LBA0 / 1 length 1314 described above, and the identified PBA. Data is acquired from the associated physical area, and read processing is performed by transferring the data to the storage apparatus.
  • the decompression necessity flag 1315 is a field for designating the necessity of decompression of the read target data indicated by this command.
  • “0” is stored in this field to notify the NVM module 126 that decompression is unnecessary.
  • the decompression necessity flag 1315 is used to explicitly tell that decompression is unnecessary.
  • the NVM module 126 may determine that it is not necessary to decompress the acquired data when reading the LBA1 space. In this case, the decompression necessity flag 1315 may not be provided.
  • the head address (for example, an address in the DRAM 125) of the output destination area of the read target data is designated.
  • the read data data having a length designated by the LBA 0/1 length 1314 is continuously stored from the area of the address designated by the read data address 1316.
  • the write data address of the write command there is also an aspect in which a plurality of combinations of the read data address 1316 and the data length can be specified as read command parameters, and data can be output to discrete areas. It can be.
  • the guarantee code ID expected value 1317 is a field in which the storage apparatus stores the expected value of the guarantee code of the read target data. In the first embodiment, 6B data is used as the guarantee code ID. For this reason, this field also specifies an ID expectation value of 6B.
  • the NVM module 126 notified of the command checks whether the guarantee code ID included in each read target data 512B matches the expected value 1317 of the guarantee code ID.
  • the NVM module 126 compares the IDs of the eight sectors with guarantee codes.
  • the expected values of the IDs of the eight sectors with guarantee codes are generated from the expected value 1317 of the guarantee code ID.
  • the expected value of the ID of the sector with the first guarantee code of the transfer is the expected value 1317 of the guarantee code ID
  • the expected value of the ID of the next sector with the guarantee code is a value obtained by incrementing the expected value 1317 of the guarantee code ID by one. It becomes.
  • each of the eight sectors with a guarantee code is compared with an expected value obtained by adding the expected value 1317 of the guarantee code ID.
  • the expanded sector with a guarantee code is inspected.
  • a read command is sent to the host apparatus 103 when the storage apparatus 101 destages the data recorded in the cache NVM module 126 to a volume (compressed volume) or the data recorded in the NVM module 126. Used when transferring.
  • the storage controller 110 receives the changed guarantee code from the NVM module 126. Get the appended data.
  • the NVM module 126 gives a new guarantee code to the compressed data.
  • the NVM module 126 When the NVM module 126 assigns the new guarantee code, for the purpose of guaranteeing the consistency of the data, the NVM module 126 decompresses the compressed data once to generate a sector with the guarantee code, and then checks the sector with the guarantee code. Specifically, a CRC is generated from the decompressed data, and compared with the CRC of the guarantee code included in the decompressed sector with the guarantee code, and it is confirmed whether there is a difference between the two. Further, it is confirmed that the guarantee code ID included in the decompressed sector with the guarantee code matches the expected value 1317 of the guarantee code ID. If the CRC or ID does not match, an error is notified to the processor 121 of the storage apparatus 101. If they match, a new guarantee code for compressed data is assigned, and the data (compressed data) with the new guarantee code is transferred to the storage controller 110.
  • the new guarantee code ID type 1318 is a field for designating an ID for attaching a new guarantee code to data at the time of reading.
  • the new guarantee code ID type 1318 stores an ID value newly assigned to the sector with guarantee code or the sector with guarantee code compression at the head of the read request.
  • 6B data is used as the guarantee code ID. For this reason, this field also specifies the seed of 6B.
  • each of the expanded data is stored in the ID part of the guarantee code of the sector, and compression is performed when LBA1 is designated as the LBA0 / 1 start address 1313.
  • An ID generated based on the value stored in the seed 1318 field of the new guarantee code ID is stored in the ID part of the guarantee code of each sector of the data.
  • the processor 121 of the storage apparatus 101 When the processor 121 of the storage apparatus 101 wants to change the guarantee code when reading data from the NVM module 126, it stores the new guarantee code ID seed in the new guarantee code ID seed 1318 field of the read command. Upon receiving the instruction, the NVM module 126 generates a new guarantee code from the new guarantee code seed 1318 at the time of data read, and changes the guarantee code of the sector with the guarantee code read from the FM or the compressed sector with the guarantee code to store the data. Transfer to device.
  • the NVM module when the write request size specified by the LBA 0/1 length 1104 is 4 KB, the NVM module generates eight new guarantee codes from the new guarantee code ID seed 1318. Specifically, the NVM module uses the ID of the sector with the first guarantee code for transfer as the value specified by the seed 1318 of the new guarantee code ID, and the expected ID of the sector with the next guarantee code is the new guarantee code. The value specified by the code ID seed 1318 is incremented by one. In this way, a 4 KB write request is generated by adding a value from 0 to 7 to the value specified by the new guarantee code ID seed 1318 for each of eight sectors with guarantee codes. Give an ID.
  • FIG. 13 shows an example in which one expected value 1317 of the guarantee code ID is included in one read command 1310, the present invention is not limited to this number.
  • a plurality of sectors with guarantee codes or compressed sectors with guarantee codes constituting the read target data designated by one read command are not necessarily constituted by consecutive guarantee codes ID.
  • the ID value of the sector with a guarantee code constituting the data obtained by decompressing the compressed data may not be continuous.
  • data A ′ obtained by compressing data recorded in the area A of the decompression volume and data B ′ obtained by compressing data recorded in the area B of the decompression volume are recorded in the NVM module. It is conceivable that the LBA1 space is continuously mapped. In this case, the storage apparatus can acquire A ′ and B ′ with a single read command.
  • the read command 1310 may include a plurality of guarantee code expected values.
  • the read command 1310 includes a data length to which the A ′ guarantee code expected value is applied and a B ′ guarantee code expectation. A field for storing information on the data length to which the value is applied is added.
  • the read command 1310 may include a pointer indicating the start address of the data area in which a plurality of expected values of the guarantee code ID are described. In this case, a field describing the size of the data area describing a plurality of expected values of the guarantee code ID is also added to the read command 1310.
  • the read response 1320 includes a command ID 1321 and a status 1322 as in the previous write response. This content is the same as the write response described above. In the present embodiment, an example of response information based on the above information will be described, but there may be additional information above.
  • FIG. 14 is a diagram schematically showing an LBA1 mapping command 1410 supported by the NVM module 126 in this embodiment and response information for the LBA1 mapping command.
  • the NVM module 126 compresses and writes the data written by designating the LBA 0 area to the FM 420.
  • the storage controller 110 maps LBA1 different from LBA0 using the LBA1 mapping command 1410 in order to write the compressed data recorded in the FM 420 to the final storage medium in a compressed state.
  • the LBA1 mapping command 1410 of the NVM module 126 in the present embodiment is composed of an operation code 1411, a command ID 1412, an LBA0 start address 1413, an LBA0 length 1414, and an LBA1 start address 1415 as command information.
  • an example of a command based on the above information will be described, but there may be additional information above.
  • the LBA 0 start address 1413 is a field for designating a head address for designating the LBA 0 area of the target data for mapping the compressed data to the LBA 1.
  • the LBA0 length 1414 is a field for designating a range of LBA0 starting from the LBA0 start address 1413 to be mapped to LBA1. As with the compressed data size acquisition command, the LBA 0 start address 1413 and the LBA 0 length 1414 are limited to multiples of 8 sectors (4 KB).
  • the LBA1 start address 1415 is a field for designating the start address of LBA1 to be mapped.
  • the processor 121 of the storage controller 110 manages the data size of the data to be mapped (data size when compressed) and the information on the LBA1 space area that can be mapped (the LBA1 space area where other data is not mapped). Based on this information, the head address of the area on the LBA1 space where the mapping target data can be mapped is stored in the LBA1 start address 1415 field, and the command is issued to the NVM module 126.
  • LBA1 start addresses 1415 a specification that specifies a plurality of LBA1 start addresses 1415 is adopted, that is, a configuration in which an LBA0 space area specified by an LBA0 start address 1413 and an LBA0 length 1414 is mapped to a discrete LBA1 space area. It is also possible to take
  • the NVM module 126 maps the compressed data associated with the LBA0 space in the range indicated by the LBA0 start address 1413 and the LBA0 length 1414 from the LBA1 start address 1415 over an area corresponding to the compressed data size. More specifically, the PBA (NVM module PBA812) associated with the LBA0 space in the range indicated by the LBA0 start address 1413 and the LBA0 length 1414 is acquired by referring to the LBA0-PBA conversion table. Then, referring to the LBA1-PBA conversion table, from the LBA1 start address 1415, the PBA acquired in the PBA 822 in the LBA1 range (entry specified by the NVM module LBA1 (821)) is the same size as the total size of the acquired PBA. Enter the address.
  • the LBA1 mapping response 1420 includes a command ID 1421 and a status 1422.
  • a command ID 1421 includes a command ID 1421 and a status 1422.
  • response information based on the above information will be described, but there may be additional information above.
  • FIG. 15 is a diagram showing an LBA0 mapping command supported by the NVM module 126 in this embodiment and response information to the LBA0 mapping command.
  • the LBA0 mapping command 1510 of the NVM module 126 in the present embodiment is configured by an operation code 1511, a command ID 1512, an LBA1 start address 1513, an LBA1 length 1514, and an LBA0 start address 1515 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 1513 is a field for designating the start address of the range of the LBA1 space of the compressed data to be mapped.
  • the LBA1 length 1514 is a field for designating the range of the LBA1 space starting from the LBA1 start address 1513 to be mapped to LBA0.
  • the LBA 0 start address 1515 is a field for designating the start address of LBA 0 to be mapped. Since the storage controller 110 manages the usage state of the LBA0 / 1 space based on the management information of the data cached in the NVM module 126 managed by the storage controller 110, the LBA0 area that can be mapped based on the management status And the start address is written in the LBA 0 start address 1515.
  • the address that can be specified as the LBA0 start address 1515 is limited to a multiple of 8 sectors (4 KB).
  • the compressed data associated with the LBA1 space in the range indicated by the LBA1 start address 1513 and the LBA1 length 1514 is expanded from the LBA0 start address 1515. Mapping is performed over the area for the data size. More specifically, the PBA associated with the LBA in the range indicated by the LBA1 start address 1513 and the LBA1 length 1514 is acquired by referring to the LBA1-PBA conversion table. Then, referring to the LBA0-PBA conversion table, the address of the acquired PBA is entered from the LBA0 start address 1515 into the PBA822 in the LBA0 range that is the same size as the decompressed size of the compressed data.
  • the LBA 0 mapping response 1520 includes only information common to other command response information (command ID 1521, status 1522), and thus description thereof is omitted. A configuration in which additional information other than the common information is included in the LBA 0 mapping response 1520 may be used.
  • Storage device operation Write operation (up to cache storage) Subsequently, a write process performed by the storage apparatus 101 according to the first embodiment of the present invention will be described with reference to FIG.
  • the storage apparatus 101 obtains the write request designating the expansion volume area and the write target data (write data) from the higher level apparatus 103 and stores the write data in the cache (NVM module 126). A write completion response is transferred to the host device 103.
  • the first step S1501 of the write operation is a step in which the storage apparatus 101 receives a write request from the host apparatus.
  • the processor 121 of the storage apparatus 101 is notified from the host interface 124 that there is a request from the host apparatus 103, and recognizes that it is a write request from the information notified from the host interface 124, and the data size of the write request Get the address of the write request.
  • step S1502 the processor 121 of the storage apparatus 101 secures a cache area for storing write data.
  • the processor 121 stores information on the usage status of the storage space of the NVM module 126, specifically, an area storing data on the LBA0 space / LBA1 space of the NVM module 126, and decompression corresponding to the data stored in the area.
  • Information about the address of the volume or the compressed volume is managed in the DRAM 125, and this information is hereinafter referred to as cache information.
  • the processor 121 refers to the cache information, and selects an area on the LBA0 space of the NVM module 126 that is not larger than the write data size specified by the write request acquired in S1501 from the area that has not yet stored data. Secure.
  • This securing process is the same as the disk cache securing process performed by a well-known storage device, so detailed description will be omitted, but the write data storage area (LBA0 space area) is used by other processes. This is a process of locking so as not to be performed and updating the contents of the cache information.
  • step S1503 the processor 121 of the storage apparatus 101 instructs the host interface 124 to acquire write data.
  • the processor 121 instructs the host interface 124 to transfer data, and notifies the write destination address (LBA) in the decompressed volume designated by the write command from the higher level device 103 as the seed of the guarantee code ID.
  • the host interface 124 that has been instructed to transfer data acquires write data from the host device 103 and divides the data by 512B (size of one sector in the first embodiment). Then, a 2B CRC is generated from the 512B data. Further, a 6B ID for each divided 512B data is generated from the type of guarantee code ID instructed by the processor 121.
  • the host interface 124 assigns an 8B ID, which is a combination of the 2B CRC and the 6B ID, to each 512B data, generates a sector with a 520B guarantee code, and transfers it to the DRAM 125 of the storage apparatus 101.
  • the first embodiment shows an example in which the data of the host interface 124 is transferred to the NVM module 126 via the DRAM 125 of the storage apparatus 101, but the present invention is not limited to this transfer path. For example, it may be transferred directly from the host interface 124 to the NVM module 126.
  • step S1504 the processor 121 of the storage apparatus 101 instructs the NVM module 126 to write data. More specifically, the processor 121 instructs the NVM module 126 to write using the write command 1210. At this time, the write command 1210 is given the lower 6B of the decompressed volume address designated by the upper device 103 as the expected value 1217 of the guarantee code ID. In the field of the new guarantee code ID seed 1218, a value notifying that it is invalid is entered.
  • the storage apparatus 101 performs a process for failure (for example, notifying the host apparatus 103 of an error and canceling the write process).
  • a process for failure for example, notifying the host apparatus 103 of an error and canceling the write process.
  • the NVM module 126 determines that the write data is intended for the storage apparatus 101 and sends the write data to the data compression / decompression unit 418. Compress and record.
  • step S1506 following step S1505 the processor 121 of the storage apparatus 101 acquires the compressed size of the data recorded by writing from the NVM module 126. More specifically, the compressed size is acquired by referring to the compressed data length 1223 of the write response information 1220 transferred from the NVM module 126.
  • the processor 121 that has acquired the size after compression uses the LBA0 address of the NVM module 126 that recorded the write data in the cache information and the address of the decompression volume in order to transfer the compressed data to the compressed volume in a later destage operation. And the compressed data length are managed in association with each other.
  • FIG. 18 is a flowchart showing the destage operation of the first embodiment.
  • S1601 which is the first step of the destage operation, is a step of determining data to be destaged.
  • the storage apparatus 101 manages the last access time from the higher level apparatus 103 for each data stored in the NVM module 126 that is a cache.
  • an LRU (Least Recently Used) algorithm is used to determine data to be destaged. For this reason, the processor 121 selects the data stored in the NVM module 126 as data to be destaged in order from the data with the oldest access time.
  • step S1602 following S1601 the post-compression data size of the destage target data determined in S1601 is acquired.
  • the processor 121 acquires the compressed data length of the destage target data recorded in the LBA0 space of the NVM module 126 from the cache information in which the compressed data length is recorded in S1506 in the write operation.
  • Step S1603 following S1602 is a step of securing a compressed volume area that is a destage destination of the write data.
  • the storage apparatus 101 stores (destages) write data
  • the storage apparatus 101 performs additional writing from the head address of the compressed volume. Therefore, whenever the destaging process is performed on the compressed volume, the storage apparatus 101 stores the next address after the end address on the compressed volume in which the destage target data is written as the next write start position.
  • the area of the data length after compression of the destage target data acquired in S1602 is secured from the next write start position on the compression volume.
  • the position (address) on the compressed volume in which write data (destage target data) is stored is determined for the first time at this point. If the compressed volume is a so-called logical volume composed of a plurality of final storage devices, the address on the compressed volume determined here and the address on the final storage device where the write data is actually stored are Although not necessarily the same, since the relationship between the address on the compressed volume and the address on the final storage device is fixedly determined, when the address on the compressed volume is determined, the address on the final storage device is also uniquely determined. Therefore, the determination of the position (address) on the compressed volume where the write data is stored is equivalent to the determination of the address on the final storage device.
  • the processor 121 manages, in the DRAM 125, information on the correspondence between the (virtual) storage destination address on the decompression volume (the decompression volume address specified by the host apparatus 103 in the write request) and the storage destination address on the compression volume. (Hereinafter, this information is referred to as inter-volume mapping information).
  • inter-volume mapping information the processor 121 determines the correspondence between the (virtual) storage destination address on the decompressed volume and the storage destination address on the compressed volume in which the destage target data is stored. The process of recording is also performed.
  • This inter-volume mapping information is used to specify the storage address of the read target data on the compressed volume (final storage device) when the storage apparatus 101 receives a data read request from the host apparatus 103.
  • step S1604 following S1603, the compressed data of the destage target data recorded in the area on the LBA0 space of the NVM module 126 is mapped to the LBA1 space of the NVM module 126.
  • the processor 121 of the storage apparatus 101 manages the information on the usage status of the storage space of the NVM module 126 as cache information, the processor 121 can be secured by referring to this cache information (yet An unused (unused) LBA1 space area that is not associated with compressed data is acquired. Then, by issuing an LBA1 mapping command 1410 to the NVM module 126, the compressed data is associated with the acquired area on the LBA1 space.
  • the storage device when the storage device is destaged, in order to acquire (read) the compressed data from the NVM module 126, it is mapped to the LBA1 space independent of the LBA0 space, and the data on the LBA1 space (compressed data)
  • the present invention is not limited to this method.
  • the same LBA0 space address as that at the time of writing may be specified, and the compressed data may be transferred to the storage device without being decompressed.
  • S1604 is not necessary.
  • Step S1605 following S1604 is a step in which the storage controller 110 acquires compressed data from the area on the LBA1 space mapped in S1604. Since this step is a characteristic operation of the first embodiment, the process flow will be described in detail below.
  • the processor 121 issues a read command 1310 to the NVM module 126 in order to acquire compressed data.
  • the read command includes an expected value 1317 of the guarantee code ID to be inspected and a new guarantee code ID to be newly assigned to the compressed sector constituting the read data. Contains seed 1318.
  • the cache information is referred to and the data on the decompressed volume (virtual The storage destination address (the decompressed volume address specified by the upper apparatus 103 in the write request) is acquired, and the lower 6B of this address is set as the expected value of the guarantee code ID to be checked.
  • the lower 6B of the start address of the area in the compressed volume secured in step S1603 is used as the ID of the guarantee code ID assigned to the compressed sector constituting the read data.
  • the processor 415 of the NVM module 126 acquires the read command 1310 issued by the processor 121 of the storage controller 110.
  • the processor 415 obtains data associated with the LBA1 area designated by the LBA1 start address 1313 and the LBA1 length 1314 of the read command 1310 from the FM 420 and stores the data in the data buffer 416.
  • the acquisition target data may exist not in the FM 420 but in the data buffer 416 (this is because the storage controller 110 in the NVM module 126 in the data write processing received from the host apparatus 103 described with reference to FIG. 17).
  • the NVM module 126 temporarily stores the data in the data buffer 416 after issuing an instruction to write data by issuing a write command, but acquires the data from the processor 121 before writing the data to the FM 420. In this case, the process of acquiring data from the FM 420 is not performed.
  • step S1703 From step S1703 to at least step S1707 following step S1702, the data compression / decompression unit 418 performs as a series of processes without the processor 415 of the NVM module 126 being intervened.
  • the processor 415 instructs the data compression / decompression unit 418 to continuously execute steps S1703 to S1708.
  • the data compression / decompression unit 418 that has received the instruction generates a sector with a guarantee code by decompressing the acquired data in step S1703.
  • Step S1704 following step S1703 is a step of checking the guarantee code for the decompressed data generated in S1703.
  • the data compression / decompression unit 418 confirms that no error has occurred in the sector with the guarantee code using the CRC of the sector with the guarantee code that is the decompressed data, and the compressed data can be decompressed correctly. Confirm. Further, it is confirmed whether the guarantee code ID matches the expected value 1317 of the guarantee code ID given to the command, and the compressed data requested to be read from the processor 121 of the storage apparatus 101 is the data assumed by the storage apparatus 101. Confirm that it is compressed data.
  • step S1705 the process branches according to the comparison result in step S1704. If the guarantee code ID of the sector with the guarantee code constituting the decompressed data matches the expected value 1317 of the guarantee code ID given to the read command, the process proceeds to S1706. On the other hand, if they do not match, the error is transferred to the processor 121 of the storage apparatus 101 because the storage control is incorrect.
  • Step S1706 which transitions from step S1705, is a step of generating guarantee code information for the compressed data for which it is confirmed that the destage target data is the data intended by the storage.
  • the data compression / decompression unit 418 generates a compressed sector by dividing the compressed data every 512 bytes, and then generates a 2B CRC from the data of each compressed sector. Further, the ID of each compressed sector is generated from the seed 1318 of the new guarantee code ID given to the read command.
  • the data compression / decompression unit 418 adds the CRC and ID for the compression sector generated in S1706 to the compression sector, and generates a compression sector with a guarantee code.
  • step S1708 the processor 415 transfers the compressed sector with the guarantee code generated in S1707 to the storage controller 110.
  • step S1709 the processor 415 notifies the processor 121 of the storage controller 110 that the read command has been completed.
  • the storage apparatus 101 has stored the destage target data stored in the compressed state as the data that it requested access to, and the data content has an error. It can be confirmed that the data after compression of the destage target data can be expanded. A desired guarantee code can be assigned to the compressed sector with the guarantee code recorded in the compressed volume.
  • step S1606 the processor 121 of the storage apparatus 101 records the compressed data constituted by the compressed sector with the guarantee code acquired in S1605 in the compressed volume 5500. More specifically, the processor 121 controls the disk interface 123 to transfer the compressed data to one or more final storage devices (SSD 111 or HDD 112) constituting the compressed volume. At this time, the processor 121 notifies the expected value of the guarantee code ID of the transfer data to the disk interface 123. This expected value is the lower 6B of the address (LBA) on the compressed volume.
  • LBA lower 6B of the address
  • the disk interface 123 Upon receiving the instruction, the disk interface 123 checks the CRC of the guarantee code of the compressed sector with the guarantee code constituting the transfer data and confirms that no error bit has occurred, and then notifies the ID of the guarantee code and the processor 121. After confirming that the ID of the guarantee code matches the expected value, the data is transferred to the SSD 111 or HDD 112 as the final storage device. If a CRC error or ID mismatch is detected in this check, the disk interface 123 stops data transfer to the final storage device and notifies the processor 121 of the error.
  • the read operation according to the first embodiment is started when the processor 121 receives a read request from the higher-level device 103.
  • the processor 121 acquires the read target address of the decompression volume included in the read request, and converts it into the address of the compression volume associated with the read target address of the decompression volume. This conversion is performed by referring to the inter-volume mapping information described in the description of the destage processing.
  • the address of the compressed volume is converted into an address on the final storage device that constitutes the compressed volume.
  • the processor 121 reads the compressed sector with the guarantee code from the address on the final storage device.
  • the processor 121 notifies the disk interface 123 of the expected value of the guarantee code ID of the compressed sector with the guarantee code to be read.
  • This expected value is the lower 6B of the address of the compressed volume 5500 in which the compressed sector with the guarantee code is stored as described above.
  • the disk interface 123 Upon receiving the instruction, the disk interface 123 reads the compressed sector with the guarantee code from the final storage device, and checks the guarantee code. If a CRC error or ID mismatch is detected in this guarantee code check, the disk interface 123 notifies the processor 121 of the error.
  • the compressed data with the guarantee code that has passed the guarantee code check is transferred to the storage controller 110 and temporarily stored in the DRAM 125.
  • the processor 121 records the compressed sector with the guarantee code acquired from the disk interface 123 in the area on the LBA1 space of the NVM module 126.
  • the processor 121 writes data to the NVM module 126 using the write command 1210.
  • the lower 6B of the address in the compressed volume 5500 in which the compressed sector with the guarantee code is stored is entered.
  • the NVM module 126 acquires a compressed sector with a guarantee code from the storage controller 110, and checks the guarantee code. If a CRC error or ID mismatch is detected in this guarantee code check, the NVM module 126 notifies the processor 121 of the error.
  • the processor 121 issues an LBA0 mapping command 1510 to the NVM module 126, thereby mapping the compressed data recorded in the LBA1 space of the NVM module 126 to the LBA0 space so that the decompressed data can be taken out.
  • the processor 121 reads the data obtained by decompressing the compressed data using the LBA0 space.
  • the processor 121 issues a read command 1310 to the NVM module 126.
  • This read command 1310 includes the lower 6B of the address in the decompression volume 5000, which is the storage destination of the virtual read target data, as the expected value of the guarantee code.
  • the processor 415 in the NVM module 126 controls the data compression / decompression unit 418 to record one or a plurality of guarantee codes recorded by designating LBA1 at the time of writing.
  • the compressed data composed of attached compressed sectors is decompressed to generate read target data composed of one or more sectors with guarantee codes.
  • the CRC is inspected using the guarantee code, and it is confirmed that the ID matches the value generated based on the expected value 1217 of the guarantee code ID given to the read command. Thereafter, the data is transferred to the storage controller 110. In this check, if a CRC error or a mismatch with the expected ID value is detected, the NVM module 126 notifies the processor 121 of the error.
  • the storage controller 110 that has acquired the sector with the guarantee code constituting the read target data from the NVM module 126 instructs the host interface 124 to transfer the sector with the guarantee code to the host device 103.
  • the processor 121 notifies the host interface 124 of the lower 6B of the address in the decompression volume 5000 that is the storage destination of the virtual read target data as the expected value of the guarantee code.
  • the host interface 124 confirms that no error bit has occurred for each sector with a guarantee code using the CRC, and uses the expected value of the ID to read data requested by the host device 103. Check that there is. When an error is detected in this inspection, the error is notified to the processor 121.
  • the host interface 124 deletes the guarantee code from each sector with the guarantee code, and generates one or more sectors. Then, data composed of one or more sectors is transferred as read request data from the host device 103 to the host device 103, and the read process is terminated.
  • the above is the configuration and processing contents of the storage apparatus and NVM module according to the first embodiment.
  • the write data is compressed and the data size after compression is determined.
  • the storage location of the write data on the final storage device cannot be determined. For this reason, it is difficult to add a guarantee code including information such as a data storage destination address to data in order to improve reliability.
  • a storage device when a storage device receives a write request and write data specifying a volume write destination address from a host device, it is generated based on the volume write destination address in the host interface of the storage device.
  • a CRC code generated from the first ID and the write data is added to the write data as a guarantee code, and transferred to the NVM module which is a cache device.
  • an error can be detected when an error occurs in data during the data transfer process from the host interface to the cache device.
  • the data (compressed data) is destaged to the final storage device, that is, when the storage location (write destination address) of the data on the final storage device is determined, the NVM module serving as the cache device is stored on the final storage device.
  • the second ID generated based on the write destination address is added to the data as a guarantee code, and the storage device transmits the data with the second ID added to the final storage device.
  • the storage device receives the write data from the host device and sends it to the final storage device.
  • error checking is possible in the entire process until the write data is stored. Similarly, it is possible to perform error checking in the entire process from when the storage device reads data requested from the host device from the final storage device and transmits the data to the host device via the host interface.
  • guarantee codes there are two types of guarantee codes: a guarantee code added to a compressed sector and a guarantee code added to uncompressed data (expanded data).
  • the NVM module 126 adds or checks a guarantee code, with the exception of some exceptions, any guarantee code is added depending on whether the address specified in the LBA0 / 1 start address field of the read command or write command is LBA0 or LBA1.
  • the present invention is not limited to this method. In the command, use a method such as including information that explicitly indicates whether the guarantee code added to the compressed sector or the guarantee code added to the decompressed data is to be added / inspected. Also good.
  • the ID of the new guarantee code is added to the compressed sector with the guarantee code in the process of reading the compressed data from the NVM module 126 and destaging to the final storage device.
  • a new guarantee code ID may be added when data is written to 126.
  • migration source volume data stored in a certain compression volume 5500
  • migration destination volume another compression volume
  • the data stored at the address a of the migration source volume may be stored at the address b of the migration destination volume (a and b are different values).
  • guarantee code ID part of the compressed sector with the guarantee code.
  • the processor 121 of the storage apparatus 101 reads the compressed data (compressed sector with guarantee code) from the area of the final storage device corresponding to the LBA at address a of the migration source volume, and temporarily stores it in the DRAM 125. This process is the same as the read process of the storage apparatus described in the first embodiment.
  • the processor 121 records the compressed sector with the guarantee code stored in the DRAM 125 in the area on the LBA1 space of the NVM module 126 by issuing a write command to the NVM module 126.
  • This process is also similar to the read process of the storage apparatus described in the first embodiment.
  • the new guarantee code ID seed 1218 field of the write command contains the LBA (data storage address) of the migration destination volume. This is different from the read processing of the storage apparatus described in the first embodiment in that the lower 6B of (address b) is stored and a write command is issued.
  • the NVM module 126 Upon receiving the instruction, the NVM module 126 acquires the compressed sector with the guarantee code from the storage controller 110, checks the guarantee code, and if no error is found, the NVM module 126 is included in the guarantee code of the compressed sector with the guarantee code. The ID is changed to the value specified by the new guarantee code ID seed 1218 and then stored in the FM 420 or the data buffer 416.
  • the processor 121 reads the compressed sector with the guarantee code by issuing a read command designating the LBA1 address storing the compressed sector with the guarantee code stored in the NVM module 126 in the previous process to the NVM module 126.
  • the read compressed sector with a guarantee code is written in the area of the final storage device corresponding to the LBA at address b of the migration destination volume.
  • the guarantee code (ID portion) of the compression sector already stores the lower 6B value of the address b of the migration destination volume. Here, there is no need to replace the warranty code.
  • the processor 121 stores an invalid value in the field of the seed 1318 of the new guarantee code ID of the read command issued here.
  • data for which the guarantee code has not been replaced is read from the NVM module 126, and the processor 121 stores the data in the final storage medium via the disk interface.
  • the data inspection based on the guarantee code of the sector with the guarantee code is performed, and the process of writing the read compressed sector with the guarantee code to the final storage device In the disk interface, the data inspection based on the guarantee code is performed in the same manner as the destage processing described in the first embodiment.
  • the guarantee code can be replaced when data is moved from the migration source volume to the migration destination volume, and error checking can be performed appropriately during the entire data transfer process from the migration source volume to the migration destination volume. It becomes possible.
  • the guarantee code When data is moved from the migration source volume to the migration destination volume, it is not always necessary to replace the guarantee code when storing the compressed sector with the guarantee code in the NVM module 126.
  • the guarantee code When data is stored in the NVM module 126 from the final storage device, the guarantee code is not reassigned.
  • the compressed sector with the guarantee code is read from the NVM module 126 and written to the final storage medium constituting the migration destination volume, the guarantee is performed. The code may be replaced.
  • the NVM module plays the same role as the SSD 111 in the storage device shown in FIG.
  • the DRAM 125 is used as a cache of the storage device.
  • FIG. 20 shows the configuration of the storage apparatus 1801 in the second embodiment. Since many components of the storage apparatus 1801 in the second embodiment are common to the storage apparatus 101 in the first embodiment, the differences will be mainly described below, and the components common to the first embodiment will not be described. Omitted.
  • a plurality of NVM modules 1826 are connected by the internal switch 122 in the storage controller 110.
  • the NVM module 1826 is a module having the same function as that of the NVM module 126 described in the first embodiment, and is a final storage device that receives a command directly (without passing through a disk interface) from the processor 121.
  • the storage apparatus 1801 configures one or a plurality of volumes from one or more NVM modules 1826, and provides the configured volumes to the host apparatus 103.
  • FIG. 21 shows that, based on a copy instruction from the upper level apparatus 103, the storage apparatus 1801 stores data stored in a volume A6000 composed of one or a plurality of NVM modules 1826 to which the present invention is applied. Alternatively, an operation of copying to a volume B 6500 constituted by a plurality of NVM modules 1826 is shown.
  • the copy instruction from the host device 103 is to notify the storage device 1801 of the address where the copy source data is stored and the address of the copy destination of the data, for example, as in the SCSI Extended Copy command.
  • the storage apparatus 1801 of the second embodiment Similar to the storage apparatus of the first embodiment, the storage apparatus 1801 of the second embodiment generates a sector with a guarantee code by adding a guarantee code to each sector of data at the host interface 124, and this sector with the guarantee code is converted into an NVM.
  • the data is stored in the area above the LBA0 space of the module 1826. Therefore, the data is stored in the NVM module 1826 in a compressed state.
  • the address (LBA) in the volume A6000 in which the sector with the guarantee code is recorded is recorded in the ID portion of the guarantee code of the sector with the guarantee code. Note that the storage apparatus 1801 maintains the reliability by inspecting the guarantee code by the NVM module 1826 at the time of writing.
  • the storage apparatus 1801 copies the guarantee code ID in the volume B when copying (writing) the data in the volume A 6000 with the address in the volume A 6000 as the guarantee code ID to the volume B 6500. Change to the address of and read.
  • the processor 121 of the storage apparatus 1801 that has received a data copy instruction from the volume A to the volume B from the higher-level apparatus 103 identifies the area of the volume A and the area of the volume B for which the copy instruction has been issued.
  • the read command is issued to one or a plurality of NVM modules 1826 storing the data of the volume A area.
  • the read command 1310 shown in FIG. 13 is used for this read command.
  • the read command 1310 stores an LBA 0 start address 1313 and an LBA 0 length 1314 for notifying the data storage position (position on the LBA 0 space) in each NVM module 1826 constituting the volume A area.
  • An address in the volume A is stored as the expected code value 1317, and an address in the volume B to be replaced is stored as the new guarantee code seed 1318.
  • Each of the one or more NVM modules 1826 constituting the volume A area receives a read command from the processor 121.
  • the processing performed by each NVM module 1826 that has received the read command performs processing similar to the processing described in FIG. 17 of the first embodiment, and therefore will be described with reference to FIG.
  • the processing from S1701 to S1704 is the same as that described in the first embodiment. That is, the data associated with the LBA 0 start address 1313 and the LBA 0 length 1314 is acquired from the FM 420 or the data buffer 416 and decompressed, and the CRC and ID of the guarantee code are set for one or more sectors with a guarantee code constituting the data. Check the error used.
  • the storage controller 110 acquires a sector with a guarantee code, which has been changed with respect to the guarantee code ID, from the NVM module 1826 and transfers it to one or a plurality of NVM modules constituting the volume B. At this time, the storage apparatus 1801 transfers the write command 1210 shown in FIG. 12 to one or a plurality of NVM modules 1826 constituting the volume B.
  • Each of the one or more NVM modules 1826 constituting the volume B area receives the write command 1210 from the storage apparatus 1801.
  • This write command 1210 includes an LBA 0 start address 1313, an LBA 0 length 1314 indicating a new storage location of data in each NVM module 1826 constituting the volume B area, and an expected value 1317 of the guarantee code.
  • the expected value 1317 of the guarantee code is an address in the copy destination volume B, and is the same as that notified by the processor 121 as the seed of the new guarantee code when reading from the NVM module 1826 constituting the volume A. .
  • the NVM module 1826 that has received the write command 1210 receives a sector with a guarantee code to which a new guarantee code is assigned as write data from the storage controller 110, and checks the guarantee code. Specifically, it is confirmed that there is no bit error by using the CRC of the guarantee code, and it is confirmed that the guarantee code ID matches the expected value 1317 of the guarantee code assigned to the write command.
  • the above is the data copy operation performed by the storage apparatus of the second embodiment.
  • the storage apparatus can be controlled in a state where a guarantee code is always added to the data of the data copy. For this reason, when erroneous data is copied due to a deficiency in the control program, an error notification can be acquired.
  • the guarantee code is added and inspected in each final storage device (NVM module) connected to the storage controller 110, the burden of the guarantee code addition and the inspection processing conventionally performed in the storage controller is reduced. Can be offloaded. In general, since a large number of final storage devices are connected to the storage controller, the burden of adding a guarantee code and processing for inspection is large. In the storage apparatus according to the second embodiment of the present invention, since a plurality of NVM modules add and check a guarantee code only for data written to / read from itself, the processing load of guarantee code addition and check Can be dispersed.
  • the NVM module 1826 is described as being the same as the NVM module 126 described in the first embodiment. However, the NVM module 1826 is not necessarily the same as the NVM module 126 according to the first embodiment. Absent.
  • the NVM module 126 includes a data compression / decompression unit 418 and has a function of compressing and storing write data.
  • the NVM module 1826 in the second embodiment is required to compress and store data. Therefore, a configuration without the data compression / decompression unit 418 may be used.
  • the write data from the host device 103 is stored in the NVM module 1826 in an uncompressed state, and the data copied from the volume A to the device constituting the volume B is also stored in the uncompressed state.
  • the operation is the same as in the second embodiment described above.
  • another element in the NVM module such as the I / O interface 411, may be provided with means for checking and adding the guarantee code.
  • the parity generation unit 419 is not essential.
  • the function of the NVM module providing two logical storage spaces, LBA0 space and LBA1 space, to the host device is not essential.
  • the NVM module like a normal SSD or the like, it is a storage device that provides only a single storage space, and is an NVM module having a configuration in which a means for checking and adding a guarantee code is added.
  • the objects and effects of the present invention can be achieved.
  • the storage controller 110 does not have the disk interface 123 for connecting the final storage apparatus, and the SSD 111 and the HDD 112 are not connected to the storage controller 110.
  • the present invention is not limited to the storage apparatus having such a configuration. The present invention is effective even when a disk interface is connected to the internal switch 122 and an SSD or HDD is connected to the disk interface.
  • the data stored in the volume A composed of one or a plurality of NVM modules 1826 is copied to the volume B composed of the one or a plurality of NVM modules 1826.
  • volume B is configured as the volume B ′ configured from the SSD 111 or the HDD 112 and the data stored in the volume A configured from one or more NVM modules 1826 is copied to the volume B ′.
  • the present invention is effective.
  • the NVM module to which the present invention is applied has a function of changing the guarantee code given to the data and sending it to the request source, or storing it in the NVM module.
  • the storage apparatus can manage data to be controlled with a guarantee code always attached. For this reason, the storage apparatus can perform data transfer while confirming correctness of control, and the reliability of the apparatus can be improved.
  • Storage device 102 SAN 103: Host device 104: Management device 110: Storage controller 111: SSD 112: HDD 121: Processor 122: Internal SW 123: Disk interface 124: Host interface 125: DRAM 126: NVM module 410: FM controller 411: I / O interface 413: RAM 414: Switch 416: Data buffer 417: FM interface 418: Data compression / decompression unit 419: Parity generation unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This storage device has an NVM module operating as a cache device or a final storage device. Upon receiving write data from a host device, the storage device adds a first verification code to the write data and stores the resulting data in the NVM module. When the stored write data is later read, the storage device issues an instruction instructing the NVM module to read data which is obtained by adding to the write data a second verification code different from the first verification code. Receiving this instruction, the NVM module adds to the write data a second verification code different from the first verification code and returns the resulting data to the storage device.

Description

ストレージ装置Storage device

 本発明は、半導体記録装置をデータの記憶装置として用いるストレージ装置に関するものである。 The present invention relates to a storage device using a semiconductor recording device as a data storage device.

 データの保持コストを低減するため、いくつかのストレージ装置は上位装置より受領したライトデータを圧縮し、HDDやSSDなどから構成される最終記憶媒体に記録する。データ保持コストの低減に加えて、ストレージ装置においてはデータインテグリティの確保も求められる。たとえば特許文献1には、ストレージ装置において、データ圧縮の際、圧縮前のデータが正しく圧縮器に入力されたことを保証する為、データに付与したサムチェックを用いて誤りがないことを確認した後、データを圧縮し、圧縮データに新たにサムチェックを付与することが開示されている。 In order to reduce the data retention cost, some storage devices compress the write data received from the host device and record it on the final storage medium composed of HDD, SSD, etc. In addition to reducing data retention costs, storage devices are also required to ensure data integrity. For example, Patent Document 1 confirms that there is no error using a sum check given to data in order to ensure that the data before compression is correctly input to the compressor in the storage device. Later, it is disclosed that the data is compressed and a new sum check is added to the compressed data.

 また、エンタープライズ分野に用いられるストレージは、さらに高い信頼性が要求される。こうしたストレージでは、上位装置から受領したライトデータを最終記憶媒体に格納する際、データに対して「データ化けが生じていないこと」と「制御プログラムが意図したデータであること」を確認する。この確認は、データに付与した保証コードにより行う。保証コードは、一般に誤り検出符号となんらかのID(例えばデータの格納先のアドレス)にて構成されている。 In addition, storage used in the enterprise field is required to have higher reliability. In such a storage, when the write data received from the host device is stored in the final storage medium, it is confirmed that the data is “not garbled” and “the data is intended by the control program”. This confirmation is performed by the guarantee code assigned to the data. The guarantee code is generally composed of an error detection code and some ID (for example, an address at which data is stored).

 ストレージ装置は、上位装置からのライトデータ受領時にデータに対して保証コードを付与する。そして、ストレージ装置は、最終記憶媒体にライトデータを転送する際、付与した保証コードの検査を行い、その検査をクリアしたデータのみを最終記憶媒体に記録する。この制御にて、ストレージ装置内のキャッシュや転送経路にて生じたデータ化け、及びストレージ装置の制御ソフトの制御誤りを検出でき、高い信頼性が保証される。 The storage device gives a guarantee code to the data when write data is received from the host device. Then, when transferring the write data to the final storage medium, the storage apparatus checks the assigned guarantee code and records only the data that has cleared the check on the final storage medium. With this control, it is possible to detect garbled data generated in the cache or transfer path in the storage apparatus and a control error in the control software of the storage apparatus, and high reliability is guaranteed.

 近年、不揮発性メモリを記憶素子として用いた記憶装置は、近年ストレージ装置のキャッシュとして利用されている。IO処理性能を向上させるため、ストレージ装置は、上位装置より受領したライトデータを、高速に格納可能な不揮発性メモリのキャッシュ装置に一旦記録する。そして、ストレージ装置の負荷が低い時等に、キャッシュ装置からデータを取り出し、HDD(Hard Disk Drive)やSSD(Solid State Drive)にて構成される最終記憶装置に記録する。このような制御を行うことで、ストレージ装置は、上位装置に高いIO処理性能を提供できる。 In recent years, a storage device using a non-volatile memory as a storage element has recently been used as a cache of a storage device. In order to improve the IO processing performance, the storage device temporarily records the write data received from the host device in a cache device of a nonvolatile memory that can be stored at high speed. Then, when the load on the storage device is low, the data is taken out from the cache device and recorded in a final storage device composed of an HDD (Hard Disk Drive) or SSD (Solid State Drive). By performing such control, the storage apparatus can provide high IO processing performance to the host apparatus.

 また、ストレージ装置は、最終記憶装置のデータを別の最終記憶装置に移動またはコピーする際、不揮発性メモリのキャッシュ装置を経由して転送することが考えられる。例えばSSDからHDDにデータを移す際、コピー対象のデータを一旦、不揮発性メモリのキャッシュ装置に一定量貯め、貯まった後まとめてHDDに書く。このような制御を行うことで、シーケンシャルIOの処理がランダムIOの処理に比べて高速なHDDに高速にデータを移すことが可能になる。 Also, when the data in the final storage device is moved or copied to another final storage device, the storage device may be transferred via a non-volatile memory cache device. For example, when data is transferred from the SSD to the HDD, a certain amount of data to be copied is temporarily stored in the cache device of the non-volatile memory, and after being stored, the data is collectively written in the HDD. By performing such control, it becomes possible to transfer data to the HDD at a higher speed in the sequential IO processing than in the random IO processing.

米国特許第6026508号明細書US Pat. No. 6,026,508

 前述のとおり、ストレージ装置では、内部の転送データを一旦、不揮発性メモリを用いたキャッシュ装置に記録し、一定時間経過後にデータを取得し、何らかの記憶装置に対して転送する。このような構成において、保証コードを付け替える必要が生じる場合がある。 As described above, in the storage device, internal transfer data is once recorded in a cache device using a nonvolatile memory, data is acquired after a predetermined time, and transferred to some storage device. In such a configuration, it may be necessary to replace the guarantee code.

 保証コードの付け替えの必要性について、図2、図3を用いてより詳細に説明する。尚、以降、キャッシュ装置を有するストレージ装置において、キャッシュに格納されたデータを、何らかのルール(例えば、最後にアクセスされてから最も時間が経過したデータを選択するLRU:Least Recently Usedアルゴリズム等)に従って選択し、当該選択されたデータを最終記憶装置に格納する処理のことを、デステージと呼ぶ。 Requirement for replacement of warranty code will be described in more detail with reference to FIGS. In the following, in the storage device having the cache device, the data stored in the cache is selected according to some rule (for example, the LRU: Last Recently Used algorithm that selects the data that has passed the most time since the last access). The process of storing the selected data in the final storage device is called destage.

 図2は、従来のストレージ装置がライトデータ210を受領し、ストレージ装置内部の最終記憶装置にて構成される記録先ボリューム230内の格納領域にデータを記録するまでのデータの流れを示している。 FIG. 2 shows a data flow from when the conventional storage apparatus receives the write data 210 until the data is recorded in the storage area in the recording destination volume 230 configured by the final storage device in the storage apparatus. .

 まず、ホスト計算機などの上位装置からライトデータ210を受領したストレージ装置内部のホストインターフェース(ホストI/F)124は、このデータに対して格納先である記録ボリューム230内の格納領域を指定するアドレスを含んだ保証コード211を付与する。そして、ストレージ装置は、NVMキャッシュメモリに保証コード211を付与したデータ210を格納する。この動作の完了後、ストレージ装置は上位装置に対してライトリクエストの処理が完了したことを通知する。 First, the host interface (host I / F) 124 in the storage apparatus that has received the write data 210 from the host apparatus such as a host computer designates the storage area in the recording volume 230 that is the storage destination for this data. A guarantee code 211 including Then, the storage device stores the data 210 with the guarantee code 211 added to the NVM cache memory. After the completion of this operation, the storage apparatus notifies the host apparatus that the write request processing has been completed.

 次に、ストレージ装置は任意のタイミングでデステージ制御を行う。具体的にはNVMキャッシュメモリに記録されたデータ210と保証コード211を取得し、ディスクインターフェース123に転送する。このときストレージ装置はディスクインターフェース123に対して転送するデータの保証コード211を検査するように指示し、保証コード211の期待値の一つである記録先ボリューム230内の格納領域を指定するアドレスを通知する。ディスクインターフェース123は、受領したデータ210の保証コード211を検査し、ストレージ装置から通知された保証コード211の期待値の一つである記録先ボリューム230内の格納領域を指定するアドレスがデータに付与されていることを確認する。データに付与されていた保証コード211とストレージ装置から通知された期待値が同一の場合、記録先ボリューム230内の格納領域にライトデータ210と保証コード211を転送することで、ストレージ装置内部にてデータ化けや誤った制御が行われていないことを保証したライト処理が完了となる。 Next, the storage device performs destage control at an arbitrary timing. Specifically, the data 210 and the guarantee code 211 recorded in the NVM cache memory are acquired and transferred to the disk interface 123. At this time, the storage apparatus instructs the disk interface 123 to check the guarantee code 211 of the data to be transferred, and sets an address for designating the storage area in the recording destination volume 230, which is one of the expected values of the guarantee code 211. Notice. The disk interface 123 inspects the guarantee code 211 of the received data 210, and an address that designates a storage area in the recording destination volume 230, which is one of the expected values of the guarantee code 211 notified from the storage device, is given to the data. Make sure that it is. When the guarantee code 211 assigned to the data and the expected value notified from the storage device are the same, the write data 210 and the guarantee code 211 are transferred to the storage area in the recording destination volume 230, thereby allowing the storage device to Write processing that guarantees that no data corruption or incorrect control has been performed is completed.

 続いて本発明が解決しようとする課題について、図3を用いて説明する。図3のストレージ装置は、データ圧縮機能を備えたキャッシュメモリを有する。このキャッシュメモリのことを、ここではNVMモジュールと呼ぶ。図3は、ストレージ装置がライトデータ210を取得し、NVMモジュールにて圧縮し、ストレージ装置内部の最終記憶装置にて構成される記録ボリューム230内の格納領域に圧縮データを記録するまでのデータの流れを示している。 Subsequently, the problem to be solved by the present invention will be described with reference to FIG. The storage apparatus of FIG. 3 has a cache memory having a data compression function. This cache memory is referred to herein as an NVM module. FIG. 3 shows the data until the storage device acquires the write data 210, compresses it with the NVM module, and records the compressed data in the storage area in the recording volume 230 configured by the final storage device inside the storage device. The flow is shown.

 図3に示す制御では、ホストインターフェース124が記録ボリューム230内の格納領域を指定したアドレスを含む保証コードを付与することは困難である。何故なら、実際に圧縮する前に圧縮後のデータサイズを推定できないため、圧縮後データの記録先を圧縮前に特定できないからである。このため、ストレージ装置は、上位装置から取得したデータ210に何らかのルール(例えばキャッシュ装置であるNVMモジュールの格納アドレス)に基づいた保証コード311を付与し、NVMモジュールにて構成されるキャッシュ装置126に転送するように制御する。この動作が完了した後、ストレージ装置101は、上位装置に対してライトリクエストの処理が完了したことを通知する。 In the control shown in FIG. 3, it is difficult for the host interface 124 to assign a guarantee code including an address specifying a storage area in the recording volume 230. This is because the data size after compression cannot be estimated before actual compression, and the recording destination of post-compression data cannot be specified before compression. For this reason, the storage device assigns a guarantee code 311 based on some rule (for example, the storage address of the NVM module that is the cache device) to the data 210 acquired from the higher-level device, and the cache device 126 configured by the NVM module is given. Control to transfer. After this operation is completed, the storage apparatus 101 notifies the host apparatus that the write request processing has been completed.

 尚、図3では、圧縮によるサイズ変化により、ホストインターフェースにて保証コードが付与できなくなる例について示したが、こうした課題は、データ圧縮時だけに生じる課題ではない。例えば、ボリュームへのデータ記録を追記で行っている場合、該当するライトデータをボリュームに記録する前に、他のライトデータが、キャッシュ装置からボリュームにデステージされれば、該当するライトデータの追記先が変化する。このため、データが圧縮されていなくとも、ホストインターフェース124が上位装置からライトデータ210を取得した時点では、ディスクインターフェース123にて検査する保証コードを付与することはできない。いずれの場合でも、ストレージ装置101は、ホストインターフェース124に何らかのルールに基づいた保証コード311を付与するように指示し、NVMモジュールにて構成されるキャッシュ装置126に転送するように制御する。 Although FIG. 3 shows an example in which the guarantee code cannot be assigned at the host interface due to a size change due to compression, such a problem is not a problem that occurs only during data compression. For example, when data recording to a volume is performed by appending, if other write data is destaged from the cache device to the volume before recording the corresponding write data to the volume, appending the corresponding write data The destination changes. For this reason, even if the data is not compressed, at the time when the host interface 124 acquires the write data 210 from the host device, a guarantee code to be inspected by the disk interface 123 cannot be given. In any case, the storage apparatus 101 instructs the host interface 124 to give a guarantee code 311 based on some rule, and controls the transfer to the cache apparatus 126 configured by the NVM module.

 何らかのルールに基づいた保証コード311が付与されたデータ210を取得したNVMモジュール126は、そのデータを一旦、NVMモジュール126が管理する不揮発性メモリに格納する。 The NVM module 126 that has acquired the data 210 to which the guarantee code 311 based on a certain rule has been acquired temporarily stores the data in a nonvolatile memory managed by the NVM module 126.

 ストレージ装置は、キャッシュ装置であるNVMモジュール126よりデータをデステージする際、ディスクインターフェース123にて保証コード312を検査する必要がある。このため、図3の構成では、NVMモジュール126内で圧縮データまたは非圧縮データに、ディスクインターフェース123にて検査する為の新たな保証コード312を付与し、取得可能とすることが望ましい。 When the storage device destages data from the NVM module 126 which is a cache device, it is necessary to inspect the guarantee code 312 at the disk interface 123. Therefore, in the configuration of FIG. 3, it is desirable that a new guarantee code 312 for checking with the disk interface 123 is added to the compressed data or the uncompressed data in the NVM module 126 so that the data can be acquired.

 また、データを圧縮して格納する場合の他にも、保証コードの付け替えが必要となる場面が存在する。例えば、あるボリューム内のデータを他のボリュームにコピーする際、データの保証コードを他のボリューム用の保証コードに付け替えて、他のボリュームに格納する必要がある。 In addition to the case where data is compressed and stored, there are situations where it is necessary to replace the guarantee code. For example, when copying data in a certain volume to another volume, it is necessary to replace the data guarantee code with the guarantee code for the other volume and store it in the other volume.

 前記目的を達成するため、本発明に係るストレージ装置は、ホスト計算機等の上位装置からライト対象データを受信すると、キャッシュ装置または最終記憶装置として動作するNVMモジュールに対して、第一の保証コードを付与してライト対象データを記録する。後になってその対象データをリードするときに、ストレージ装置はNVMモジュールに対して、対象データに第一の保証コードとは異なる第二の保証コードを付加したデータを読み出す指示を発行する。NVMモジュールはその指示を受け、対象データに第一の保証コードとは異なる第二の保証コードを付加したデータをストレージ装置に返却する。 In order to achieve the above object, when the storage apparatus according to the present invention receives write target data from a host apparatus such as a host computer, the storage apparatus provides a first guarantee code to the NVM module operating as a cache apparatus or a final storage apparatus. Assign and record the write target data. When the target data is read later, the storage apparatus issues an instruction to the NVM module to read data in which the second guarantee code different from the first guarantee code is added to the target data. In response to the instruction, the NVM module returns data in which the second guarantee code different from the first guarantee code is added to the target data to the storage device.

 本発明によれば、ストレージ装置内のデータ転送過程で、データに付与された保証コードを付け替えることができ、上位装置からライトデータを受信した時点ではライトデータの格納位置が決定していない場合であっても、後から適切な保証コードを付与することができる。これによりストレージ装置は、制御対象とするデータを常に保証コードを付与した状態で管理できるので、データ転送の全過程でエラーチェックが可能となる。 According to the present invention, the guarantee code assigned to the data can be changed during the data transfer process in the storage device, and the write data storage location is not determined when the write data is received from the host device. Even if it exists, an appropriate guarantee code can be given later. As a result, the storage apparatus can manage the data to be controlled with the guarantee code always attached, so that an error check can be performed during the entire data transfer process.

図1は、本発明の実施例1に係るストレージ装置を中心とした、コンピュータシステムの構成を示した図である。FIG. 1 is a diagram showing a configuration of a computer system centered on a storage apparatus according to Embodiment 1 of the present invention. 図2は、従来のストレージ装置がライトデータを最終記憶装置に格納する際のデータの流れを示した図である。FIG. 2 is a diagram showing a data flow when a conventional storage device stores write data in a final storage device. 図3は、データ圧縮機能を備えたキャッシュ装置を有するストレージ装置がライトデータを最終記憶装置に格納する際のデータの流れを示した図である。FIG. 3 is a diagram showing a data flow when a storage device having a cache device having a data compression function stores write data in the final storage device. 図4は、NVMモジュールの内部構成を示した図である。FIG. 4 is a diagram showing an internal configuration of the NVM module. 図5は、FMの構成を示した図である。FIG. 5 is a diagram showing the configuration of the FM. 図6は、物理ブロックの構成を示した図である。FIG. 6 is a diagram showing the configuration of the physical block. 図7は、本実施例のNVMモジュールがストレージコントローラに提供する論理空間であるLBA0空間及びLBA1空間と、物理領域指定用アドレス空間であるPBA空間との対応付けの概念を示した図である。FIG. 7 is a diagram showing the concept of associating the LBA0 and LBA1 spaces, which are logical spaces provided by the NVM module of this embodiment to the storage controller, and the PBA space, which is a physical area designating address space. 図8は、LBA0-PBA変換テーブルとLBA1-PBA変換テーブルの内容を示した図である。FIG. 8 is a diagram showing the contents of the LBA0-PBA conversion table and the LBA1-PBA conversion table. 図9は、ブロック管理情報を示した図である。FIG. 9 is a diagram showing block management information. 図10は、本発明の実施例1に係るストレージ装置が扱うデータフォーマットを示した図である。FIG. 10 is a diagram illustrating a data format handled by the storage apparatus according to the first embodiment of the invention. 図11は、保証コード付きセクタの構成を示した図である。FIG. 11 is a diagram showing the configuration of a sector with a guarantee code. 図12は、ライトコマンドとそのライトコマンドに対する応答情報を示した図である。FIG. 12 is a diagram showing a write command and response information for the write command. 図13は、リードコマンドとそのリードコマンドへの応答情報を示した図である。FIG. 13 is a diagram showing a read command and response information to the read command. 図14は、LBA1マッピングコマンドとそのLBA1マッピングコマンドに対する応答情報を示した図である。FIG. 14 is a diagram showing an LBA1 mapping command and response information for the LBA1 mapping command. 図15は、LBA0マッピングコマンドとLBA0マッピングコマンドへの応答情報を示した図である。FIG. 15 is a diagram showing LBA0 mapping command and response information to the LBA0 mapping command. 図16は、本発明の実施例1に係るストレージ装置が扱う記憶空間について説明した図である。FIG. 16 is a diagram for explaining the storage space handled by the storage apparatus according to the first embodiment of the invention. 図17は、本発明の実施例1に係るストレージ装置が実施するライト処理のフローである。FIG. 17 is a flow of write processing executed by the storage apparatus according to Embodiment 1 of the present invention. 図18は、本発明の実施例1に係るストレージ装置が実施するデステージ処理のフローである。FIG. 18 is a flowchart of destage processing executed by the storage apparatus according to the first embodiment of the invention. 図19は、NVMモジュールが実施するリード処理のフローである。FIG. 19 is a flow of a read process performed by the NVM module. 図20は、本発明の実施例2に係るストレージ装置の構成を示した図である。FIG. 20 is a diagram showing the configuration of the storage system related to Example 2 of the present invention. 図21は、本発明の実施例2に係るストレージ装置によるコピー処理を説明した図である。FIG. 21 is a diagram for explaining copy processing by the storage apparatus according to the second embodiment of the present invention.

 次に、本発明の実施形態を図面に基づいて説明する。尚、本発明は、以下に説明する実施形態に限定されるものではない。尚、不揮発性メモリとしてNAND型フラッシュメモリ(以下、FM)を例に説明するが、本発明はFMを記憶素子として利用したNVMモジュールに限定されるものではない。 Next, an embodiment of the present invention will be described based on the drawings. The present invention is not limited to the embodiments described below. Note that a NAND flash memory (hereinafter referred to as FM) will be described as an example of the nonvolatile memory, but the present invention is not limited to an NVM module using FM as a storage element.

 図16は、実施例1のストレージ装置101が扱う記憶空間について説明する図である。 FIG. 16 is a diagram illustrating the storage space handled by the storage apparatus 101 according to the first embodiment.

 実施例1のストレージ装置101は、ホスト計算機などの上位装置103に対して、圧縮後データのデステージ格納先である、HDD112やSSD111等の最終記憶装置(1または複数)から構成される圧縮ボリューム5500を隠蔽し、上位装置103からは圧縮データが非圧縮状態(伸長状態)で格納されているように認識される仮想的な伸長ボリューム5000を、1または複数提供する。上位装置103は、この伸長ボリューム5000のアドレスを指定してリード/ライトリクエストをストレージ装置101に送付する。 The storage apparatus 101 according to the first embodiment is a compressed volume composed of a final storage device (one or a plurality) such as an HDD 112 or an SSD 111, which is a destage storage destination of compressed data, with respect to a host device 103 such as a host computer. 5500 is concealed, and one or a plurality of virtual decompressed volumes 5000 are recognized from the host device 103 that are recognized as if the compressed data is stored in an uncompressed state (expanded state). The host apparatus 103 sends the read / write request to the storage apparatus 101 by designating the address of the decompression volume 5000.

 上位装置103はストレージ装置101にデータを記録する際、伸長ボリューム5000内のアドレスを指定してライトデータをストレージ装置101に転送する。 When the host apparatus 103 records data in the storage apparatus 101, it designates an address in the decompression volume 5000 and transfers write data to the storage apparatus 101.

 実施例1のストレージ装置101は、内部に圧縮機能を持つNVMモジュール126をキャッシュ装置として用いる。このNVMモジュール126は、詳細は後述するが独立した二つの論理記憶空間であるLBA0空間、LBA1空間をストレージ装置101に提供する。そして、ストレージ装置101は、上位装置から取得したライトデータを、LBA0空間のアドレスを指定してNVMモジュール126に記録する。このとき、NVMモジュール126は、受領したライトデータを圧縮して格納する。続いてストレージ装置101は、LBA0空間のアドレスを指定して記録したデータの圧縮データを、LBA1空間上にマッピングする。そして、ストレージ装置101はLBA1空間上のアドレスを指定することで、NVMモジュール126より圧縮データを取得し、HDDやSSD等の最終記憶装置にて構成される圧縮ボリューム5500のアドレスを指定してデステージする。なお、圧縮ボリューム5500は、周知のストレージ装置が上位装置に対して提供するボリュームと同様の、1以上の最終記憶装置の記憶領域を用いて構成される論理的なボリュームである。 The storage apparatus 101 according to the first embodiment uses an NVM module 126 having an internal compression function as a cache apparatus. The NVM module 126 provides the storage apparatus 101 with two independent logical storage spaces, LBA0 space and LBA1 space, which will be described in detail later. Then, the storage apparatus 101 records the write data acquired from the host apparatus in the NVM module 126 by designating the address of the LBA0 space. At this time, the NVM module 126 compresses and stores the received write data. Subsequently, the storage apparatus 101 maps the compressed data of the data recorded by designating the address of the LBA0 space onto the LBA1 space. The storage apparatus 101 acquires the compressed data from the NVM module 126 by designating an address in the LBA1 space, and designates the address of the compressed volume 5500 configured by the final storage device such as an HDD or SSD. Stage. Note that the compressed volume 5500 is a logical volume configured using storage areas of one or more final storage devices, similar to a volume provided to a host device by a known storage device.

 また、ストレージ装置101は上位装置から受領したリードリクエストに応じて、圧縮データを圧縮ボリューム5500から取得し、NVMモジュール126にて構成されたキャッシュ装置にLBA1空間上アドレスを指定してライトする。次に、ストレージ装置101は、LBA1空間上のアドレスを指定して記録した圧縮データの伸長データをLBA0空間にマッピングする。そして、ストレージ装置101は、NVMモジュール126からLBA0のアドレスを指定して圧縮データを伸長して取得し、上位装置にリードデータとして転送する。 In addition, the storage apparatus 101 acquires compressed data from the compressed volume 5500 in response to a read request received from the host apparatus, and writes to the cache apparatus configured by the NVM module 126 by designating an address on the LBA1 space. Next, the storage apparatus 101 maps the decompressed data of the compressed data recorded by designating an address on the LBA1 space to the LBA0 space. Then, the storage apparatus 101 acquires the compressed data by specifying the address of LBA0 from the NVM module 126 and transfers it as read data to the host apparatus.

 実施例1のストレージ装置101は、圧縮データをボリュームに記録する際、圧縮データを圧縮ボリューム5500に対して追記書きする。つまり、圧縮データはデステージされた順に圧縮ボリュームの先頭の領域から順に詰めて記録される。この追記記録方式において、圧縮データの記録先となる圧縮ボリューム内のアドレスは、ストレージ装置がデステージを制御するときに決定する。 The storage apparatus 101 according to the first embodiment additionally writes the compressed data to the compressed volume 5500 when recording the compressed data on the volume. In other words, the compressed data is recorded sequentially from the head area of the compressed volume in the order of destage. In this additional recording system, the address in the compressed volume that is the recording destination of the compressed data is determined when the storage device controls the destage.

 実施例1のストレージ装置101は、上位装置からライトデータを受領する際に、そのライトデータに対し、ライトデータから算出される誤り検出符号と伸長ボリューム5000の格納先アドレスを含む第一の保証コードを付与する。ストレージ装置101は第一の保証コードを含むライトデータをNVMモジュール126に圧縮して格納するように指示する。このとき、ストレージ装置101は、データを格納するNVMモジュール126に対して、第一の保証コードの期待値となる伸長ボリュームの格納先アドレスを通知し、NVMモジュール126に第一の保証コードを検査させる。NVMモジュール126は、取得したデータについて、第一の保証コードの検査をする。具体的には、誤り検出符号からデータに誤りがないことを確認し、仮想的な伸長ボリューム5000の格納先アドレスがストレージ装置101から通知された期待値と一致していることを確認する。NVMモジュール126は、第一の保証コードを確認後、データと第一の保証コードを纏めて圧縮する。尚、詳細については後述するが本発明では、第一の保証コードとデータを纏めて圧縮する例に限定されるものではない。データのみ圧縮し、その圧縮データと同一に制御される領域(転送されるデータと同一の制御によって転送対象とされる領域であって、転送されるデータに隣接(連続)したアドレス領域。あるいは隣接していないアドレス領域でもよい)に無圧縮の第一の保証コードを付与する格納形式で記録したとしてもよい。 When the storage apparatus 101 according to the first embodiment receives write data from the upper apparatus, the first guarantee code including the error detection code calculated from the write data and the storage address of the decompression volume 5000 is received for the write data. Is granted. The storage apparatus 101 instructs the NVM module 126 to compress and store the write data including the first guarantee code. At this time, the storage apparatus 101 notifies the NVM module 126 that stores the data the storage address of the decompressed volume that is the expected value of the first guarantee code, and checks the first guarantee code to the NVM module 126. Let The NVM module 126 checks the first guarantee code for the acquired data. Specifically, it is confirmed from the error detection code that there is no error in the data, and it is confirmed that the storage destination address of the virtual decompression volume 5000 matches the expected value notified from the storage apparatus 101. After confirming the first guarantee code, the NVM module 126 compresses the data and the first guarantee code together. Although details will be described later, the present invention is not limited to an example in which the first guarantee code and data are compressed together. An area in which only the data is compressed and is controlled in the same way as the compressed data (an area to be transferred by the same control as the transferred data and adjacent (continuous) to the transferred data. It may be recorded in a storage format in which a non-compressed first guarantee code is assigned to the address area that is not addressed).

 実施例1のストレージ装置101は、NVMモジュール126にて圧縮したデータをデステージする際に、記録先となる圧縮ボリューム5500内のアドレスを決定し、圧縮したデータに対して、圧縮ボリューム内のアドレスを含む第二の保証コードを付与するように通知する。同時にストレージ装置101は、デステージ対象となる圧縮データを伸長したデータに付与されている第一の保証コードについての期待値をNVMモジュール126に通知する。NVMモジュール126は、記録している圧縮データを一旦伸長し、伸長データに含まれる第一の保証コードとストレージ装置101から通知されたその期待値を比較する。第一の保証コードが一致していた場合、圧縮データに対して第二の保証コードを付与しストレージ装置101に転送する。 When the storage apparatus 101 according to the first embodiment destages the data compressed by the NVM module 126, the storage apparatus 101 determines an address in the compressed volume 5500 serving as a recording destination, and the address in the compressed volume for the compressed data. To give a second warranty code containing At the same time, the storage apparatus 101 notifies the NVM module 126 of the expected value for the first guarantee code assigned to the data obtained by decompressing the compressed data to be destaged. The NVM module 126 once expands the recorded compressed data, and compares the first guarantee code included in the decompressed data with the expected value notified from the storage apparatus 101. If the first guarantee code matches, the second guarantee code is assigned to the compressed data and transferred to the storage apparatus 101.

 実施例1のストレージ装置101は、NVMモジュール126より取得した第二の保証コードが付与された圧縮データを圧縮ボリューム5500に記録する際、ディスクインターフェース、または最終記憶装置にデータの転送を指示する。このとき、ストレージ装置101はディスクインターフェースまたは最終記憶装置に対して、圧縮ボリューム5500内のアドレスを含む第二の保証コードの期待値を通知する。第二の保証コードの期待値を通知されたディスクインターフェースまたは最終記憶装置は、圧縮データを取得する際、第二の保証コードを検査する。具体的には、誤り検出符号からデータに誤りがないことを確認し、ボリュームの格納先アドレスがストレージ装置から通知された期待値と一致していることを確認する。 The storage apparatus 101 according to the first embodiment instructs the disk interface or the final storage device to transfer data when recording the compressed data with the second guarantee code acquired from the NVM module 126 in the compressed volume 5500. At this time, the storage apparatus 101 notifies the expected value of the second guarantee code including the address in the compressed volume 5500 to the disk interface or the final storage apparatus. The disk interface or the final storage device notified of the expected value of the second guarantee code checks the second guarantee code when acquiring the compressed data. Specifically, it is confirmed from the error detection code that there is no error in the data, and it is confirmed that the storage destination address of the volume matches the expected value notified from the storage apparatus.

 この方法により、ストレージ装置101は、ストレージ装置101内でのデータ転送において、ストレージ装置101の制御プログラムが誤って本来のアクセス対象としていたデータとは異なるデータを転送していることがないかを確認できる。また、ストレージ装置101内にてデータ化けが生じていないことを保証できる。この保証により、ストレージ装置の信頼性を向上できる。 By this method, the storage apparatus 101 confirms that, in the data transfer in the storage apparatus 101, the control program of the storage apparatus 101 has not mistakenly transferred data different from the data that was originally targeted for access. it can. In addition, it can be guaranteed that no data corruption has occurred in the storage apparatus 101. This guarantee can improve the reliability of the storage apparatus.

 上述の制御を行う装置について、以降詳細に説明する。 The apparatus that performs the above control will be described in detail below.

(1-1)ストレージ装置の構成
 図1は、本発明に関わるFMを記録媒体とした半導体記録装置(以下、「NVMモジュール」と記す)を含むストレージ装置を中心としたコンピュータシステムの概略構成を示す図である。図1に示すNVMモジュール126は、FMを記録媒体とした半導体記録装置である。
(1-1) Configuration of Storage Device FIG. 1 shows a schematic configuration of a computer system centering on a storage device including a semiconductor recording device (hereinafter referred to as “NVM module”) using an FM relating to the present invention as a recording medium. FIG. The NVM module 126 shown in FIG. 1 is a semiconductor recording device using FM as a recording medium.

 ストレージ装置101は複数のストレージコントローラ110を備えている。各ストレージコントローラ110は、上位装置103との接続を行うホストインターフェース124と記録装置との接続を行うディスクインターフェース123を備えている。ホストインターフェース124は例えば、FC(Fibre Channel)、iSCSI(internet Small Computer System Interface)、FCoE(Fibre Channel over Ether)等のプロトコルに対応したデバイスが挙げられ、ディスクインターフェース123は例えば、FC、SAS(Serial Attached SCSI)、SATA(Serial Advanced Technology Attachment)、PCI(Peripheral Component Interconnect)-Express等の各種プロトコルに対応したデバイスが挙げられる。更に、ストレージコントローラ110はプロセッサ121やメモリ125などのハードウェア資源を備え、プロセッサ121が制御プログラムを実行することにより、上位装置103からのリード/ライト要求に応じて、SSD111やHDD112等の最終記憶媒体装置へのリード/ライト要求を行う。また、各ストレージコントローラ110は、本発明が適用されるNVMモジュール126を有し、NVMモジュール126は内部SW122を介してプロセッサ121から制御可能となっている。 The storage apparatus 101 includes a plurality of storage controllers 110. Each storage controller 110 includes a host interface 124 that connects to the host device 103 and a disk interface 123 that connects to the recording device. Examples of the host interface 124 include devices that support protocols such as FC (Fibre Channel), iSCSI (Internet Small Computer System Interface), FCoE (Fibre Channel over Ether), and the disk interface 123 includes FC, SAS (S Examples include devices that support various protocols such as Attached SCSI), SATA (Serial Advanced Technology Attachment), and PCI (Peripheral Component Interconnect) -Express. Further, the storage controller 110 includes hardware resources such as a processor 121 and a memory 125. When the processor 121 executes a control program, the storage controller 110 performs final storage such as the SSD 111 and the HDD 112 in response to a read / write request from the host device 103. Request read / write to the media device. Each storage controller 110 has an NVM module 126 to which the present invention is applied. The NVM module 126 can be controlled from the processor 121 via the internal SW 122.

 また、ストレージコントローラ110はRAID(Redundant Arrays of Inexpensive Disks)パリティ生成機能及び、RAIDパリティによるデータ復元機能を備え、複数のSSD111や複数のHDD112を任意の単位でRAIDグループとして管理する機能も持つ。また、RAIDグループを任意の単位でLU(Logical Unit)として分割し上位装置103に記録領域として提示する機能も持つ。 The storage controller 110 also has a RAID (Redundant Arrays of Inexpensive Disks) parity generation function and a data restoration function using RAID parity, and also has a function of managing a plurality of SSDs 111 and a plurality of HDDs 112 as a RAID group in arbitrary units. Further, it has a function of dividing a RAID group as an LU (Logical Unit) in an arbitrary unit and presenting it as a recording area to the host apparatus 103.

 上位装置103からのLUへのライト要求受信時には指定されたRAID構成に応じてパリティを生成し、記録装置にライトする。また、上位装置103からのLUへのリード要求受信時には記録装置からデータをリードした後、データ損失の有無を検査、データ損失が検出された場合RAIDパリティを用いてデータを復元し、上位装置にデータを転送する。 When receiving a write request to the LU from the host device 103, parity is generated according to the specified RAID configuration and written to the recording device. When receiving a read request from the host apparatus 103 to the LU, after reading the data from the recording apparatus, it checks for the presence of data loss, and if data loss is detected, restores the data using RAID parity, Transfer data.

 また、ストレージコントローラ110は記録装置の障害、使用状況、動作状況等を監視及び管理する機能を持っている。 Also, the storage controller 110 has a function of monitoring and managing the failure, usage status, operation status, etc. of the recording device.

 ストレージ装置101は管理装置104とネットワークを介して接続している。このネットワークは例えばLAN(Local Area Network)などが挙げられる。このネットワークは図1では簡略化の為に省略したが、ストレージ装置101内部の各ストレージコントローラ110に接続している。尚、このネットワークはSAN102と同じネットワークによって接続してもよい。 The storage apparatus 101 is connected to the management apparatus 104 via a network. An example of this network is a LAN (Local Area Network). Although this network is omitted for simplification in FIG. 1, it is connected to each storage controller 110 in the storage apparatus 101. This network may be connected by the same network as the SAN 102.

 管理装置104は、プロセッサやメモリ、ネットワークインターフェース、ローカル入出力デバイス等のハードウェア資源と、管理プログラム等のソフトウェア資源を備えたコンピュータである。管理装置104は、プログラムによってストレージ装置から情報を取得し、管理画面を表示する。システム管理者は、管理装置に表示された管理画面を用いて、ストレージ装置101の監視、及び運用における制御を行う。 The management device 104 is a computer having hardware resources such as a processor, a memory, a network interface, and a local input / output device, and software resources such as a management program. The management device 104 acquires information from the storage device by a program and displays a management screen. The system administrator uses the management screen displayed on the management apparatus to monitor the storage apparatus 101 and control the operation.

 SSD111は、ストレージ装置101内に複数(例えば16個)あり、同じくストレージ装置内に複数あるストレージコントローラ110とディスクインターフェース123を介して接続されている。SSD111は、ストレージコントローラからのライト要求に応じて転送されるデータを格納し、リード要求に応じて格納済みのデータを取り出しストレージコントローラに転送する。尚、このときディスクインターフェース123は、リード/ライト要求する論理的な格納位置を論理アドレス(以下LBA:Logical Block Address)によって指定する。また、複数のSSD111は複数のRAIDグループに分割して管理されており、データ損失時に損失データの復元が可能な構成としている。 There are a plurality (for example, 16) of SSDs 111 in the storage apparatus 101, and they are connected to a plurality of storage controllers 110 in the storage apparatus via the disk interface 123. The SSD 111 stores data transferred in response to a write request from the storage controller, retrieves stored data in response to a read request, and transfers the data to the storage controller. At this time, the disk interface 123 designates the logical storage location for the read / write request by a logical address (hereinafter, LBA: Logical Block Address). Further, the plurality of SSDs 111 are divided into a plurality of RAID groups and managed, and are configured such that lost data can be restored when data is lost.

 HDD(Hard Disk Drive)112は、ストレージ装置101内に複数(例えば120個)あり、SSD111と同様に、同じストレージ装置内に複数あるストレージコントローラ110とディスクインターフェース123を介して接続されている。HDD112は、ストレージコントローラ110からのライト要求に応じて転送されるデータを格納し、リード要求に応じて格納済みのデータを取り出しストレージコントローラ110に転送する。尚、このときディスクインターフェース123は、リード/ライト要求する論理的な格納位置を論理アドレス(以下LBA:Logical Block Address)によって指定する。また、複数のHDD112は複数のRAIDグループに分割して管理されており、データ損失時に損失データの復元が可能な構成としている。 A plurality of HDDs (Hard Disk Drives) 112 (for example, 120) are provided in the storage apparatus 101 and, like the SSD 111, are connected to a plurality of storage controllers 110 in the same storage apparatus via the disk interface 123. The HDD 112 stores data transferred in response to a write request from the storage controller 110, retrieves stored data in response to a read request, and transfers it to the storage controller 110. At this time, the disk interface 123 designates the logical storage location for the read / write request by a logical address (hereinafter, LBA: Logical Block Address). In addition, the plurality of HDDs 112 are divided into a plurality of RAID groups and managed, and the lost data can be restored when data is lost.

 ストレージコントローラ110は、ホストインターフェース124を介して、上位装置103と接続するSAN102と接続する。尚、図1では簡略化の為に省略したが、ストレージコントローラ間でデータや制御情報を相互に通信する接続パスも備えている。 The storage controller 110 is connected to the SAN 102 connected to the host device 103 via the host interface 124. Although omitted in FIG. 1 for simplification, a connection path for mutual communication of data and control information between storage controllers is also provided.

 上位装置103は、例えば業務システムの中核をなすホストコンピュータ、ファイルサーバー等が相当する。上位装置103は、プロセッサやメモリ、ネットワークインターフェース、ローカル入出力デバイス等のハードウェア資源を備え、デバイスドライバやオペレーティングシステム(OS)、アプリケーションプログラムなどのソフトウェア資源を備えている。これにより上位装置103は、プロセッサ制御の下、各種プログラムを実行することで、ストレージ装置108との通信及び、データのリード/ライト要求を行う。また、プロセッサ制御の下、各種プログラムを実行することで、ストレージ装置101の使用状況、動作状況等の管理情報を取得する。また、記録装置の管理単位や記録装置制御方法、データ圧縮設定等を指定し、変更を行うことができる。 The host device 103 corresponds to, for example, a host computer or a file server that forms the core of the business system. The host device 103 includes hardware resources such as a processor, a memory, a network interface, and a local input / output device, and includes software resources such as a device driver, an operating system (OS), and an application program. As a result, the host apparatus 103 executes various programs under processor control to perform communication with the storage apparatus 108 and data read / write requests. Also, management information such as usage status and operation status of the storage apparatus 101 is acquired by executing various programs under processor control. In addition, the management unit of the recording apparatus, the recording apparatus control method, the data compression setting, and the like can be designated and changed.

 ここまで、本発明が適用されるNVMモジュール126を含むコンピュータシステムの構成について説明した。 So far, the configuration of the computer system including the NVM module 126 to which the present invention is applied has been described.

(1-2)NVMモジュールの構成
 次に図4を用いて、NVMモジュール126の内部構成について説明する。
(1-2) Configuration of NVM Module Next, the internal configuration of the NVM module 126 will be described with reference to FIG.

 NVMモジュール126は内部に、FMコントローラ(FM CTL)410と複数(例えば32個)のFM420を備える。 The NVM module 126 includes an FM controller (FM CTL) 410 and a plurality of (for example, 32) FM 420s.

 FMコントローラ410は、その内部にプロセッサ415、RAM(DRAM)413、データ圧縮/伸長ユニット418、パリティ生成ユニット419、データバッファ416、I/Oインターフェース(I/F)411、FMインターフェース(I/F)417、及びデータ転送を相互に行うスイッチ414を備えている。 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 (I / F). ) 417, and a switch 414 for mutually transferring data.

 スイッチ414は、FMコントローラ410内のプロセッサ415、RAM413、データ圧縮/伸長ユニット418、パリティ生成ユニット419、データバッファ416、I/Oインターフェース411、FMインターフェース417を接続し、各部位間のデータをアドレスまたはIDによってルーティングし転送する。 The switch 414 connects the processor 415 in the FM controller 410, the RAM 413, the data compression / decompression unit 418, the parity generation unit 419, the data buffer 416, the I / O interface 411, and the FM interface 417, and addresses the data between the parts. Or route and forward by ID.

 I/Oインターフェース411は、ストレージ装置101内のストレージコントローラ110が備える内部スイッチ122と接続し、スイッチ414を介してFMコントローラ410の各部位と接続する。I/Oインターフェース411は、ストレージ装置101内のストレージコントローラ110が備えるプロセッサ121から、リード/ライト要求と要求対象とする論理的な格納位置(LBA:Logical Block Address)を受領し、当該要求の処理を行う。さらにライト要求時にはライトデータを受領し、ライトデータをFM420に記録する。また、I/Oインターフェース411は、ストレージコントローラ110が備えるプロセッサ121からの指示を受領し、FMコントローラ内部410のプロセッサ415に割り込みを発行する。さらに、I/Oインターフェース411は、ストレージコントローラ110が備えるプロセッサ121よりNVMモジュール126の制御用コマンド等も受領し、そのコマンドに応じてNVMモジュール126の動作状況、利用状況、現在の設定値等を、ストレージコントローラ110に通知可能である。 The I / O interface 411 is connected to the internal switch 122 included in the storage controller 110 in the storage apparatus 101, and is connected to each part of the FM controller 410 via the switch 414. The I / O interface 411 receives a read / write request and a logical storage location (LBA: Logical Block Address) to be requested from the processor 121 included in the storage controller 110 in the storage apparatus 101, and processes the request. I do. Further, when a write request is made, the write data is received and the write data is recorded in the FM 420. Further, the I / O interface 411 receives an instruction from the processor 121 included in the storage controller 110 and issues an interrupt to the processor 415 in the FM controller internal 410. Further, the I / O interface 411 also receives a control command for the NVM module 126 from the processor 121 included in the storage controller 110, and displays the operation status, usage status, current setting value, etc. of the NVM module 126 according to the command. The storage controller 110 can be notified.

 プロセッサ415は、スイッチ414を介してFMコントローラ410の各部位と接続し、RAM413に記録されたプログラム及び管理情報を基にFMコントローラ410全体を制御する。また、プロセッサ415は、定期的な情報取得、及び割り込み受信機能によって、FMコントローラ410全体を監視する。 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. In addition, the processor 415 monitors the entire FM controller 410 by a periodic information acquisition and interrupt reception function.

 データバッファ416は、FMコントローラ410でのデータ転送処理途中の一時的なデータを格納する。 The data buffer 416 stores temporary data during the data transfer process in the FM controller 410.

 FMインターフェース417は、複数バス(例えば16)によってFM420と接続する。各バスには複数(例えば2)のFM420を接続し、同じくFM420に接続されるCE(Chip Enable)信号を用い、同一バスに接続された複数のFM420を独立して制御する。 The FM interface 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, and a plurality of FMs 420 connected to the same bus are controlled independently using a CE (Chip Enable) signal that is also connected to the FM 420.

 FMインターフェース417は、プロセッサ415より指示されるリード/ライト要求に応じて動作する。このときFMインターフェース417はプロセッサ415より要求対象をチップ、ブロック、ページ、の各番号として指示される。リード要求であればFM420から格納データをリードしデータバッファ416に転送し、ライト要求であれば格納すべきデータをデータバッファ416から呼び出し、FM420に転送する。 The FM interface 417 operates in response to a read / write request instructed by the processor 415. At this time, the FM interface 417 is instructed by the processor 415 as the chip, block, and page numbers as request targets. If it is a read request, the stored data is read from the FM 420 and transferred to the data buffer 416. If it is a write request, the data to be stored is called from the data buffer 416 and transferred to the FM 420.

 また、FMインターフェース417はECC生成回路、ECCによるデータ損失検出回路、ECC訂正回路を有し、FM420へのデータ書き込み時にはデータに対してECCを付加して書き込む。またデータ呼び出し時にECCによるデータ損失検出回路によって、FM420からの呼び出しデータを検査し、データ損失が検出された際には、ECC訂正回路によってデータ訂正を行う。なお、ここでデータに付加されるECCは、FM420に書きこまれるデータに対して付加され、FM420から読み出される際にFMインターフェース417で検査されるものであって、後述する「保証コード」とは異なるものである。 Also, the FM interface 417 includes an ECC generation circuit, an ECC data loss detection circuit, and an ECC correction circuit. When writing data to the FM 420, the data is written with the ECC added. Further, when data is called, the call data from the FM 420 is inspected by the data loss detection circuit using ECC, and when the data loss is detected, the data is corrected by the ECC correction circuit. Here, the ECC added to the data is added to the data written in the FM 420 and is inspected by the FM interface 417 when it is read from the FM 420. Is different.

 データ圧縮/伸長ユニット418は、可逆圧縮のアルゴリズムを用いたデータ圧縮機能を有する。またデータ圧縮アルゴリズムとして複数種のアルゴリズムを有し、さらに圧縮レベルの変更機能も備える。データ圧縮/伸長ユニット418は、プロセッサ415からの指示に従って、データバッファ416からデータをリードし、可逆圧縮のアルゴリズムによりデータ圧縮演算もしくはデータ圧縮の逆変換であるデータ伸長演算を行い、その結果を再度データバッファにライトする。尚、データ圧縮/伸長ユニット418は、論理回路として実装してもよいし、圧縮/伸長のプログラムをプロセッサで実行することで、同様の機能を実現してもよい。またデータ圧縮/伸長ユニット418は、上位装置103から送信されるデータに付与された保証コードを検証する機能、及びデータに付与された保証コードのIDを付け替える機能も有する。この機能については後述する。 The data compression / decompression unit 418 has a data compression function using a reversible compression algorithm. In addition, there are a plurality of types of data compression algorithms, and a compression level changing function is also provided. The data compression / decompression unit 418 reads data from the data buffer 416 according to an instruction from the processor 415, performs a data compression operation that is a data compression operation or an inverse conversion of the data compression by a lossless compression algorithm, and outputs the result again. Write to the data buffer. The data compression / decompression unit 418 may be implemented as a logic circuit, or a similar function may be realized by executing a compression / decompression program with a processor. The data compression / decompression unit 418 also has a function of verifying a guarantee code attached to data transmitted from the host apparatus 103 and a function of changing the ID of a guarantee code attached to data. This function will be described later.

 パリティ生成ユニット419は、RAID技術で必要とされる冗長データであるパリティの生成機能を有しており、具体的には、RAID5、6で用いられるXOR演算、RAID6で用いられるリードソロモン符号またはEVENODD法により算出される対角パリティ(Diagonal Parity)の生成機能を有している。パリティ生成ユニット419は、プロセッサ415からの指示に従って、データバッファ416からパリティ生成対象となるデータをリードし、前述のパリティ生成機能により、RAID5またはRAID6のパリティを生成する。 The parity generation unit 419 has a function of generating parity that is redundant data required in the RAID technology. Specifically, the parity generation unit 419 includes an XOR operation used in RAID 5 and 6, a Reed-Solomon code or EVENODD used in RAID 6. It has a function to generate diagonal parity calculated by the method. The parity generation unit 419 reads data that is a parity generation target from the data buffer 416 in accordance with an instruction from the processor 415, and generates RAID5 or RAID6 parity by the above-described parity generation function.

 以上説明した、スイッチ414、I/Oインターフェース411、プロセッサ415、データバッファ416、FMインターフェース417、データ圧縮/伸長ユニット418、パリティ生成ユニット419は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)として、一つの半導体素子内で構成してもよいし、複数の個別専用IC( Integrated Circuit)を相互に接続した構成であってもよい。 The switch 414, I / O interface 411, processor 415, data buffer 416, FM interface 417, data compression / decompression unit 418, and parity generation unit 419 described above are ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate). Array) may be configured within a single semiconductor element, or may be configured such that a plurality of individual dedicated ICs (Integrated Circuits) are connected to each other.

 RAM413には具体的にはDRAMなどの揮発性メモリが用いられる。RAM413は、NVMモジュール126内で用いられるFM420の管理情報、各DMAが用いる転送制御情報を含んだ転送リスト等を格納する。尚、データを格納するデータバッファ416の役割の一部または全てをRAM413に含ませて、RAM413をデータ格納に用いる構成としてもよい。 Specifically, a volatile memory such as a DRAM is used for the RAM 413. The RAM 413 stores management information of the FM 420 used in the NVM module 126, 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.

 ここまで、図4を用いて本発明が適用されるNVMモジュール126の構成について説明した。尚、本実施例では図4に示すようにフラッシュメモリ(Flash Memory)を搭載したNVMモジュール126について記述しているが、NVMモジュール126に搭載する不揮発性メモリはフラッシュメモリに限定されるものではない。たとえばPhase Change RAMやResistance RAM等の不揮発メモリであってもよい。また、FM420の一部または全部を揮発性のRAM(DRAM等)とする構成であってもよい。 Up to this point, the configuration of the NVM module 126 to which the present invention is applied has been described with reference to FIG. In this embodiment, as shown in FIG. 4, the NVM module 126 having the flash memory (Flash Memory) is described. However, the nonvolatile memory to be mounted on the NVM module 126 is not limited to the flash memory. . For example, a non-volatile memory such as Phase Change RAM or Resistance RAM may be used. Further, a configuration may be adopted in which part or all of the FM 420 is a volatile RAM (DRAM or the like).

 次に、図5を用いてFM420について説明する。FM420内の不揮発性メモリ領域は、複数(例えば、4096個)のブロック(物理ブロック)502で構成され、格納されたデータは物理ブロック単位で消去される。またFM420は、I/Oレジスタ501を内部に持つ。I/Oレジスタ501は、物理ページサイズ(例えば8KB)以上の記録容量を持つレジスタである。 Next, the FM 420 will be described with reference to FIG. The nonvolatile memory area in the FM 420 is composed of a plurality (for example, 4096) of blocks (physical blocks) 502, and stored data is erased in units of physical blocks. The FM 420 has an I / O register 501 inside. The I / O register 501 is a register having a recording capacity equal to or larger than a physical page size (for example, 8 KB).

 FM420は、FMインターフェース417からのリード/ライト要求の指示に従って動作する。ライト動作の流れは以下の通りである。FM420はまず、FMインターフェース417より、ライトコマンドと要求対象の物理ブロック、物理ページを受信する。次に、FMインターフェース417より転送されるライトデータをI/Oレジスタ501に格納する。その後、I/Oレジスタ501に格納されたデータを、指定された物理ページにライトする。 FM 420 operates in accordance with a read / write request instruction from FM interface 417. The flow of the write operation is as follows. First, the FM 420 receives a write command, a requested physical block, and a physical page from the FM interface 417. Next, the write data transferred from the FM interface 417 is stored in the I / O register 501. Thereafter, the data stored in the I / O register 501 is written to the designated physical page.

 リード動作の流れは以下の通りである。FM420はまず、FMインターフェース417からリードコマンドと要求対象の物理ブロック、ページを受信する。次に、指定された物理ブロックの物理ページに格納されたデータをリードしI/Oレジスタ501に格納する。その後、I/Oレジスタ501に格納されたデータをFMインターフェース417に対して転送する。 The flow of read operation is as follows. First, the FM 420 receives a read command, a requested physical block, and a page from the FM interface 417. Next, the data stored in the physical page of the designated physical block is read and stored in the I / O register 501. Thereafter, the data stored in the I / O register 501 is transferred to the FM interface 417.

 次に、図6を用いて物理ブロック502について説明する。物理ブロック502は、複数(例えば128)のページ601に分かれており、格納データの読み出しやデータの書き込みは、ページ単位で処理される。また、ブロック502内の物理ページ601に対して書き込みを行う順序は固定されており、先頭のページから順に書き込みが行われる。つまりPage1、Page2、Page3…の順にデータが書き込まれなければならない。また、書き込み済みのページ601への上書きは原則として禁止されており、書き込み済みのページ601にデータを上書きする場合、そのページ601が属するブロック502内のデータをすべて消去した後でなければ、そのページ601に対してデータを書き込むことができない。 Next, the physical block 502 will be described with reference to FIG. The physical block 502 is divided into a plurality of (for example, 128) pages 601, and reading of stored data and writing of data are processed in units of pages. The order of writing to the physical page 601 in the block 502 is fixed, and writing is performed in order from the first page. That is, data must be written in the order of Page1, Page2, Page3,. In addition, overwriting on a written page 601 is prohibited in principle, and when data is overwritten on a written page 601, it is necessary to delete the data in the block 502 to which the page 601 belongs only after the data is erased. Data cannot be written to page 601.

 ここまで、本発明が適用されるNVMモジュールの構成、及びNVMモジュールが利用されるコンピュータシステムについて説明を行った。続いて、本実施例においてNVMモジュールがストレージ装置に提供する記憶空間について説明する。 So far, the configuration of the NVM module to which the present invention is applied and the computer system using the NVM module have been described. Next, the storage space provided by the NVM module to the storage device in this embodiment will be described.

(1-3)NVMモジュールのLBAとPBA対応付けの概要
 本実施例におけるNVMモジュール126は、複数のFM(チップ)420を搭載し、複数のブロック、複数のページにより構成される記憶領域を管理し、自身が接続されるストレージコントローラ110(のプロセッサ121)に対して、論理的な記憶空間を提供する。ここで、「記憶空間を提供する」とは、NVMモジュール126がストレージコントローラ110に対してアクセスさせる各記憶領域にアドレスを付して管理しており、NVMモジュール126が接続されるストレージコントローラ110のプロセッサ121が、当該アドレスを指定したアクセス要求(コマンド)を発行することにより、当該アドレスで特定された領域に格納されているデータの参照・更新が可能な状態にされていることを意味する。またFM420により構成される物理記憶領域は、NVMモジュール126内部のみで用いるアドレス空間に一意に対応づけて管理される。以降、このNVMモジュール126内部のみで用いる物理領域指定用アドレス空間(物理アドレス空間)を、PBA(Physical Block Address)空間と呼び、PBA空間内の各物理記憶領域(セクタ。本発明の実施例では、1セクタは512バイトとする)の位置(アドレス)をPBA(Physical Block Address)と記す。本実施例のNVMモジュール126は、このPBAと、ストレージ装置に提供する論理記憶空間の各領域のアドレスであるLBA(Logical Block Address)との対応付けを管理する。
(1-3) Outline of LBA and PBA correspondence of NVM module The NVM module 126 in this embodiment is equipped with a plurality of FM (chips) 420 and manages a storage area composed of a plurality of blocks and a plurality of pages. Then, a logical storage space is provided to the storage controller 110 (the processor 121) to which the storage controller 110 is connected. Here, “providing storage space” means that each storage area that the NVM module 126 accesses the storage controller 110 is assigned with an address, and the storage controller 110 to which the NVM module 126 is connected is managed. This means that the processor 121 issues an access request (command) designating the address to enable the reference / update of the data stored in the area specified by the address. The physical storage area configured by the FM 420 is managed in a manner uniquely associated with an address space used only within the NVM module 126. Hereinafter, this physical area designating address space (physical address space) used only within the NVM module 126 will be referred to as a PBA (Physical Block Address) space, and each physical storage area (sector in the PBA space. In the embodiment of the present invention). The position (address) of 1 sector is 512 bytes) is described as PBA (Physical Block Address). The NVM module 126 of this embodiment manages the association between this PBA and LBA (Logical Block Address) that is the address of each area of the logical storage space provided to the storage apparatus.

 従来のSSD等の記憶装置は、記憶装置が接続される上位装置(ホスト計算機等)に対して一つの記憶空間を提供している。一方で本実施例のNVMモジュール126は、二つの論理記憶空間を有し、NVMモジュール126が接続されるストレージコントローラ110に2つの論理記憶空間を提供することを特徴とする。この2つの論理記憶空間LBAとPBAの関係について図7を用いて説明する。 A conventional storage device such as an SSD provides one storage space for a host device (such as a host computer) to which the storage device is connected. On the other hand, the NVM module 126 of the present embodiment has two logical storage spaces, and provides two logical storage spaces to the storage controller 110 to which the NVM module 126 is connected. The relationship between the two logical storage spaces LBA and PBA will be described with reference to FIG.

 図7は、本実施例のNVMモジュール126がストレージコントローラ110に提供する論理記憶空間であるLBA0空間701及びLBA1空間702と、PBA空間703との対応付けの概念を示した図である。 FIG. 7 is a diagram illustrating a concept of association between the LBA0 space 701 and the LBA1 space 702, which are logical storage spaces provided by the NVM module 126 of the present embodiment to the storage controller 110, and the PBA space 703.

 NVMモジュール126は、上位装置であるストレージコントローラ110に、LBA0空間701とLBA1空間702という2つの論理記憶空間を提供する。なお、これ以降、LBA0空間701上の各記憶領域に付されたアドレスのことを「LBA0」または「LBA0アドレス」と呼び、LBA1空間702上の各記憶領域に付されたアドレスのことを「LBA1」または「LBA1アドレス」と呼ぶ。また、本発明の実施例では、LBA0空間701のサイズ及びLBA1空間702のサイズはいずれも、PBA空間のサイズ以下とするが、LBA0空間701のサイズがPBA空間のサイズよりも大きい場合でも、本発明は有効である。 The NVM module 126 provides two logical storage spaces, an LBA0 space 701 and an LBA1 space 702, to the storage controller 110, which is a host device. Hereinafter, the addresses assigned to the storage areas on the LBA 0 space 701 are referred to as “LBA 0” or “LBA 0 address”, and the addresses assigned to the storage areas on the LBA 1 space 702 are referred to as “LBA 1”. Or “LBA1 address”. In the embodiment of the present invention, 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.

 LBA0空間701は、FM420により構成される物理記憶領域に記録された圧縮データを非圧縮データとして、ストレージコントローラ110のプロセッサ121にアクセスさせるための論理記憶空間である。プロセッサ121がLBA0空間701上のアドレス(LBA0)を指定してNVMモジュール126にライト要求を発行すると、NVMモジュール126は、ストレージコントローラ110からライトデータを取得し、データ圧縮/伸長ユニット418にて圧縮した後、NVMモジュール126が動的に選択したPBAにより指定されるFM420上の物理記憶領域にデータを記録し、LBA0とPBAの対応付けを行う。また、プロセッサ121がLBA0を指定してNVMモジュール126にリード要求を発行すると、NVMモジュール126は、LBA0に対応付けられたPBAが示すFM420の物理記憶領域からデータ(圧縮データ)を取得し、データ圧縮/伸長ユニット418にて伸長した後、この伸長したデータをリードデータとしてストレージコントローラ110に転送する。尚、このLBA0とPBAとの対応づけは、後述するLBA0-PBA変換テーブルにて管理する。 The LBA0 space 701 is a logical storage space for allowing the processor 121 of the storage controller 110 to access the compressed data recorded in the physical storage area configured by the FM 420 as uncompressed data. When the processor 121 designates an address (LBA0) on the LBA0 space 701 and issues a write request to the NVM module 126, the NVM module 126 acquires write data from the storage controller 110 and compresses it by the data compression / decompression unit 418. After that, the NVM module 126 records data in the physical storage area on the FM 420 designated by the dynamically selected PBA, and associates LBA0 and PBA. When the processor 121 designates LBA0 and issues a read request to the NVM module 126, the NVM module 126 acquires data (compressed data) from the physical storage area of the FM 420 indicated by the PBA associated with the LBA0. After decompression by the compression / decompression unit 418, the decompressed data is transferred to the storage controller 110 as read data. The association between LBA0 and PBA is managed by an LBA0-PBA conversion table described later.

 LBA1空間702は、FM420により構成される物理記憶領域に記録された圧縮データを圧縮データのまま(伸長せず)、ストレージコントローラ110にアクセスさせるための論理記憶空間である。ストレージコントローラ110のプロセッサ121が、LBA1を指定してNVMモジュール126にライト要求を発行すると、NVMモジュール126は、ストレージコントローラ110よりデータ(圧縮済みのライトデータ)を取得し、NVMモジュール126が動的に選択したPBAにより指定されるFMの記憶領域にデータを記録し、LBA1とPBAの対応付けを行う。また、プロセッサ121がLBA1を指定してリード要求を発行すると、NVMモジュール126は、LBA1に対応付けられたPBAが示すFM420の物理記憶領域よりデータ(圧縮データ)を取得し、ストレージコントローラ110にリードデータとして圧縮済みデータを転送する。尚、このLBA1とPBAとの対応づけは、後述するLBA1-PBA変換テーブルにて管理する。 The LBA1 space 702 is a logical storage space for allowing the storage controller 110 to access the compressed data recorded in the physical storage area configured by the FM 420 as it is (not expanded). When the processor 121 of the storage controller 110 designates LBA1 and issues a write request to the NVM module 126, the NVM module 126 acquires data (compressed write data) from the storage controller 110, and the NVM module 126 dynamically The data is recorded in the storage area of the FM designated by the selected PBA, and the LBA 1 and the PBA are associated with each other. When the processor 121 designates LBA 1 and issues a read request, the NVM module 126 acquires data (compressed data) from the physical storage area of the FM 420 indicated by the PBA associated with LBA 1 and reads it to the storage controller 110. Transfer compressed data as data. The association between LBA1 and PBA is managed by an LBA1-PBA conversion table described later.

 尚、図7に示すとおり、圧縮データ713が記録された物理記憶領域であるPBA空間上の領域は、同時にLBA0空間の領域とLBA1空間の領域との両方に対応づけられることもある。例えば、圧縮データ713の伸長されたデータがLBA0空間上に伸長データ711として対応づけられ、圧縮データ713がそのままLBA1空間上に圧縮データ712として対応づけられる。たとえばプロセッサ121が、LBA0(仮にLBA0が0x00000001000とする)を指定してNVMモジュール126にデータをライトすると、当該データはNVMモジュール126内のデータ圧縮/伸長ユニット418により圧縮され、圧縮されたデータはNVMモジュール126が動的に選択したPBA空間上(具体的には、FM420の複数のページ中の、いずれかの未書き込みページ)に配置される。またそのデータはLBA0空間のアドレス0x00000001000に対応付けられた状態で管理される。その後プロセッサ121が、0x00000001000に対応づけられたデータを、LBA1空間のアドレス(仮に0x80000000010とする)に対応付ける要求をNVMモジュール126に発行すると、このデータはLBA1空間にも対応づけられる。この状態のとき、プロセッサ121がLBA1アドレス0x80000000010のデータをリードする要求(コマンド)をNVMモジュール126に対して発行すると、プロセッサ121は、自身がLBA0アドレス0x00000001000に対して書き込んだデータを、圧縮した状態で読み出すことが出来る。 Note that, as shown in FIG. 7, 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. For example, 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. For example, when the processor 121 specifies LBA0 (assuming that LBA0 is set to 0x000000011000) and writes data to the NVM module 126, the data is compressed by the data compression / decompression unit 418 in the NVM module 126. The NVM module 126 is arranged on the dynamically selected PBA space (specifically, any unwritten page among a plurality of pages of the FM 420). The data is managed in a state associated with the address 0x000000011000 of the LBA0 space. Thereafter, when the processor 121 issues a request for associating the data associated with 0x000000011000 with the address of the LBA1 space (assuming 0x80000000010) to the NVM module 126, this data is also associated with the LBA1 space. In this state, when the processor 121 issues a request (command) for reading the data at the LBA1 address 0x80000000010 to the NVM module 126, the processor 121 compresses the data that it has written to the LBA0 address 0x000000011000. Can be read.

 なお、本発明の実施例におけるNVMモジュール126で生成される圧縮データのサイズは、データ内容に依存して変動するが、512バイト(1セクタ)の倍数のサイズであると取扱いやすいため、後述するように、圧縮後のデータが512バイト(1セクタ)の倍数のサイズでない場合には、圧縮後データの後端にパディングデータを付加して512バイト(1セクタ)の倍数のサイズにする。また非圧縮データのサイズを超えないサイズになるようにしている。つまり4KBのデータを圧縮した場合、最小サイズが512バイトで、最大サイズが4KBになる。 Note that the size of the compressed data generated by the NVM module 126 in the embodiment of the present invention varies depending on the data contents, but it is easy to handle if the size is a multiple of 512 bytes (1 sector), and will be described later. As described above, when the compressed data is not a multiple of 512 bytes (1 sector), padding data is added to the rear end of the compressed data so as to have a multiple of 512 bytes (1 sector). In addition, the size 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.

(1-4)LBA-PBA変換テーブル
 続いて、本実施例におけるNVMモジュール126が制御に用いる管理情報について説明する。
(1-4) LBA-PBA Conversion Table Next, management information used for control by the NVM module 126 in this embodiment will be described.

 NVMモジュール126が用いる管理情報として、まずLBA0-PBA変換テーブル810とLBA1-PBA変換テーブル820について図8を用いて説明する。 As management information used by the NVM module 126, the LBA0-PBA conversion table 810 and the LBA1-PBA conversion table 820 will be described with reference to FIG.

 LBA0-PBA変換テーブル810は、NVMモジュール126内のRAM413内に格納されており、NVMモジュールLBA0(811)、NVMモジュールPBA(812)、PBA長(813)の情報から構成される。NVMモジュール126のプロセッサ415は、上位装置からリード要求時に指定されるLBA0を受信した後、そのLBA0を用いて、実際のデータが格納されている場所を示すPBAを取得する。 The LBA0-PBA conversion table 810 is stored in the RAM 413 in the NVM module 126, and includes information on the NVM module LBA0 (811), the NVM module PBA (812), and the PBA length (813). The processor 415 of the NVM module 126 receives the LBA 0 specified at the time of the read request from the host device, and then uses the LBA 0 to obtain the PBA indicating the location where the actual data is stored.

 また、更新ライト時には、NVMモジュール126は更新データ(ライトデータ)を更新前データが記録されたPBAとは異なる物理記憶領域に記録し、更新データを記録したPBAとPBA長を、LBA0-PBA変換テーブルの該当する箇所に記録し、LBA0-PBA変換テーブルを更新する。NVMモジュール126はこのように動作することによって、LBA0空間上領域のデータの上書きを(疑似的に)可能にしている。 At the time of update write, the NVM module 126 records update data (write data) in a physical storage area different from the PBA in which the pre-update data is recorded, and converts the PBA and PBA length in which the update data is recorded into an LBA0-PBA conversion. Record in the corresponding part of the table and update the LBA0-PBA conversion table. By operating in this manner, the NVM module 126 enables (pseudo) overwriting of data in the area on the LBA0 space.

 NVMモジュールLBA0(811)は、NVMモジュール126が提供するLBA0空間の論理領域を4KB単位ごとに順に並べたものである(LBA0空間の各アドレス(LBA0)は、1セクタ(512バイト)ごとに付されている)。本実施例におけるLBA0-PBA変換テーブル810では、NVMモジュールLBA0(811)とNVMモジュールPBA(812)との対応付けが4KB(8セクタ)単位で管理されていることを意図している。但し、このNVMモジュールLBA0(811)とNVMモジュールPBA(812)との対応付けを4KB単位以外の任意の単位で管理してもよい。 The NVM module LBA0 (811) is a logical area of the LBA0 space provided by the NVM module 126 arranged in units of 4 KB in order (each address (LBA0) in the LBA0 space is attached to each sector (512 bytes). Have been). In the LBA0-PBA conversion table 810 in this embodiment, it is intended that the association between the NVM module LBA0 (811) and the NVM module PBA (812) is managed in units of 4 KB (8 sectors). However, the association between the NVM module LBA0 (811) and the NVM module PBA (812) may be managed in an arbitrary unit other than the 4 KB unit.

 NVMモジュールPBA(812)は、NVMモジュールLBA0(811)に対応付けられたPBAの先頭アドレスを格納するフィールドである。本実施例では、PBA空間の物理記憶領域を512バイト(1セクタ)毎に分割して管理する。図8の例では、NVMモジュールLBA0(811)「0x000_0000_0000」に対応付けられたPBA(Physical Block Address)として、「XXX」という値(PBA)が対応付けられている。この値は、NVMモジュール126が搭載する複数のFM420のうちの、ある記憶領域を一意に示すアドレスである。これにより、リードリクエスト先の先頭アドレス(LBA0)として「0x000_0000_0000」を受領した場合、NVMモジュール126内の物理記憶領域(リード先)の先頭アドレス(PBA)として「XXX」が取得される。また、NVMモジュールLBA0(811)で特定されるLBA0に対応付けられたPBAが無い場合、NVMモジュールPBA(812)には「未割当」であることを示す値(NULLあるいは0xFFFFFFFFなど)が格納される。 The NVM module PBA (812) is a field for storing the head address of the PBA associated with the NVM module LBA0 (811). In this embodiment, the physical storage area of the PBA space is divided and managed for every 512 bytes (one sector). In the example of FIG. 8, a value (PBA) of “XXX” is associated as PBA (Physical Block Address) associated with the NVM module LBA0 (811) “0x000_0000_0000”. This value is an address that uniquely indicates a storage area among a plurality of FMs 420 mounted on the NVM module 126. As a result, when “0x000 — 0000 — 0000” is received as the head address (LBA 0) of the read request destination, “XXX” is acquired as the head address (PBA) of the physical storage area (read destination) in the NVM module 126. When there is no PBA associated with LBA0 specified by the NVM module LBA0 (811), the NVM module PBA (812) stores a value indicating “unallocated” (such as NULL or 0xFFFFFFFF). The

 PBA長813には、NVMモジュールLBA0(811)に指定された4KBのデータの、実際の格納サイズが記録される。なお、格納サイズはセクタ数にて記録されている。図8に示す例では、LBA0「0x000_0000_0000」を開始アドレスとする4KB(LBA0空間としては8sector)のデータは、PBA長として「2」すなわち512B×2=1KBの長さで、記録されていることを示している。従って、NVMモジュールPBA(812)の情報と組み合わせるとLBA0[0x000_0000_0000]を開始アドレスとする4KBのデータは、PBA「XXX」から「XXX+1」の1KBの領域に圧縮して格納されていることを表している。なお、本実施例におけるNVMモジュール126では、ストレージコントローラ110のプロセッサ121からライト指示された非圧縮データを、4KB単位で圧縮する。たとえばプロセッサ121から、LBA0空間のアドレス(0x000_0000_0000)を開始アドレスとする8KBのデータ(非圧縮データ)のライト要求があった場合、(LBA0空間の)アドレス範囲0x000_0000_0000~0x000_0000_0007の4KBのデータを単位として圧縮して圧縮データを生成し、続いてアドレス範囲0x000_0000_0008~0x000_0000_000Fの4KBのデータを単位として圧縮して圧縮データを生成し、それぞれの圧縮データをFM420の物理記憶領域に書き込む。ただし、本発明はデータを4KB単位で圧縮する態様に限定されるものではなく、その他の単位でデータが圧縮される構成であっても本発明は有効である。 In the PBA length 813, the actual storage size of the 4 KB data specified in the NVM module LBA0 (811) is recorded. The storage size is recorded by the number of sectors. In the example shown in FIG. 8, data of 4 KB (8 sectors as the LBA 0 space) with LBA 0 “0x000 — 0000 — 0000” as the start address is recorded with a PBA length of “2”, that is, 512 B × 2 = 1 KB. Is shown. Therefore, when combined with the information of the NVM module PBA (812), 4 KB data starting from LBA 0 [0x000_0000_0000] is compressed and stored in the 1 KB area from PBA “XXX” to “XXX + 1”. Represents. Note that the NVM module 126 in this embodiment compresses uncompressed data instructed by the processor 121 of the storage controller 110 in units of 4 KB. For example, when the processor 121 receives a write request for 8 KB data (uncompressed data) starting from the address (0x000_0000_0000) in the LBA0 space, 4 KB data in the address range 0x000_0000_0000 to 0x000_0000_0007 (in the LBA0 space) is used as a unit. Compressed data is generated by compression, and then 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. However, 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.

 続いて、LBA1-PBA変換テーブル820について説明する。LBA1-PBA変換テーブル820は、NVMモジュール126内のDRAM413内に格納されており、NVMモジュールLBA1(821)、NVMモジュールPBA(822)の2つの情報から構成される。NVMモジュール126のプロセッサ415は、上位装置からリード要求時に指定されるLBA1を受信した後、受信したLBA1を、LBA1-PBA変換テーブル820を用いて、データが格納されている場所を示すPBAに変換する。 Subsequently, the LBA1-PBA conversion table 820 will be described. The LBA1-PBA conversion table 820 is stored in the DRAM 413 in the NVM module 126, and includes two pieces of information of the NVM module LBA1 (821) and the NVM module PBA (822). The processor 415 of the NVM module 126 receives the LBA1 specified at the time of the read request from the host device, and then converts the received LBA1 into a PBA indicating the location where the data is stored using the LBA1-PBA conversion table 820. To do.

 NVMモジュールLBA1(821)は、NVMモジュール126が提供するLBA1空間の論理領域をセクタごとに順に並べたものである(NVMモジュールLBA1(821)内の数値1は、1セクタ(512バイト)を意味する)。これは、本実施例におけるNVMモジュール126が、NVMモジュールLBA1(821)とNVMモジュールPBA(822)との対応付けを512B単位で管理する前提で記載されているためだが、このNVMモジュールLBA1(821)とNVMモジュールPBA(822)との対応付けは、512B単位にて管理される態様に限定されるものではなく、如何なる単位で管理してもよい。但し、LBA1空間は、圧縮データの格納先である物理記憶空間であるPBA空間を直接マッピングする空間であり、PBAの分割管理サイズと同等であることが望ましいことから、本実施例では、512B単位で分割して管理する。 The NVM module LBA1 (821) is a logical area of the LBA1 space provided by the NVM module 126 arranged in order for each sector (a numerical value 1 in the NVM module LBA1 (821) means one sector (512 bytes). To do). This is because the NVM module 126 in this embodiment is described on the premise that the association between the NVM module LBA1 (821) and the NVM module PBA (822) is managed in units of 512B, but this NVM module LBA1 (821). ) And the NVM module PBA (822) are not limited to the mode managed in 512B units, and may be managed in any unit. However, the LBA1 space is a space that directly maps the PBA space that is the physical storage space where the compressed data is stored, and is preferably equal to the PBA division management size. Divide and manage with.

 NVMモジュールPBA(822)は、LBA1に対応付けられたPBAの先頭アドレスを格納するフィールドである。図8の例では、NVMモジュールLBA1「0x800_0000_0002」に「ZZZ」というPBA値が対応付けられている。このPBA値は、NVMモジュール126が搭載する、あるFM420上の記憶領域を一意に示すアドレスである。これにより、リードリクエスト先の先頭アドレス(LBA1)として、「0x800_0000_0002」を受領した場合、NVMモジュール126内の物理的なリード先の先頭アドレスとして「ZZZ」が取得される。また、NVMモジュールLBA1(821)で特定されるLBA1に対応付けられたPBAが無い場合、NVMモジュールPBA(822)には「未割当」であることを示す値が格納される。 The NVM module PBA (822) is a field for storing the head address of the PBA associated with LBA1. In the example of FIG. 8, the PBA value “ZZZ” is associated with the NVM module LBA1 “0x800_0000_0002”. This PBA value is an address that uniquely indicates a storage area on a certain FM 420 mounted on the NVM module 126. Accordingly, when “0x800_0000_0002” is received as the read request destination start address (LBA1), “ZZZ” is acquired as the physical read destination start address in the NVM module 126. When there is no PBA associated with LBA1 specified by the NVM module LBA1 (821), a value indicating “unallocated” is stored in the NVM module PBA (822).

 以上が、NVMモジュール126が用いるLBA0-PBA論物変換テーブル810とLBA1-PBA論物変換テーブル820の内容である。 The above is the contents of the LBA0-PBA logical-physical conversion table 810 and the LBA1-PBA logical-physical conversion table 820 used by the NVM module 126.

(1-5)ブロック管理情報
 続いて、本発明が適用されるNVMモジュールが用いるブロック管理情報について図9を用いて説明する。
(1-5) Block Management Information Next, block management information used by the NVM module to which the present invention is applied will be described with reference to FIG.

 ブロック管理情報900は、NVMモジュール126内のDRAM413内に格納されており、NVMモジュールPBA901、NVM chip番号902、ブロック番号903、無効PBA量904の各項目にて構成される。 The block management information 900 is stored in the DRAM 413 in the NVM module 126 and includes items of an NVM module PBA 901, an NVM chip number 902, a block number 903, and an invalid PBA amount 904.

 NVMモジュールPBA901は、NVMモジュール126が管理する全FM420内の各領域を一意に特定するPBA値を格納するフィールドである。尚、本実施例では、NVMモジュールPBA901をブロック単位で区分して管理する。図9では、NVMモジュールPBA値として、先頭アドレスを格納した例について示している。例えば、NVMモジュールPBA901の値が「0x000_0000_0000」の行(エントリ)には、「0x000_0000_0000」~「0x000_0000_0FFF」のPBA範囲についての情報が格納される。 The NVM module PBA 901 is a field for storing a PBA value that uniquely identifies each area in all the FMs 420 managed by the NVM module 126. In this embodiment, the NVM module PBA 901 is divided and managed in units of blocks. FIG. 9 shows an example in which the head address is stored as the NVM module PBA value. For example, in the row (entry) where the value of the NVM module PBA 901 is “0x000_0000_0000”, information about the PBA range from “0x000_0000_0000” to “0x000_0000_0FFF” is stored.

 NVM chip番号902は、NVMモジュール126が搭載するFM Chip420を一意に指定する番号を格納するフィールドである。ブロック番号903は、NVM Chip番号902の格納値により指定されるFM Chip420内のブロック番号を格納するフィールドである。 The NVM chip number 902 is a field for storing a number for uniquely specifying the FM Chip 420 mounted on the NVM module 126. The block number 903 is a field for storing the block number in the FM Chip 420 specified by the stored value of the NVM Chip number 902.

 無効PBA量904は、NVM Chip番号902の格納値により指定されるFM Chip内の、ブロック番号903の格納値により指定されるブロックの無効PBA量を格納するフィールドである。無効PBA量とは、LBA0-PBA変換テーブル810及びLBA1-PBA変換テーブル820にて、NVMモジュールLBA0(811)及びNVMモジュールLBA1(821)で特定されるLBA0空間及び/またはLBA1空間に対応付けられていたが、のちに対応づけを解除された領域(PBA空間上)の量である。逆に、LBA0-PBA変換テーブル810またはLBA1-PBA変換テーブル820によってNVMモジュールLBA0またはLBA1に対応付けがなされているPBAのことを本明細書では有効PBAと呼ぶ。 The invalid PBA amount 904 is a field for storing the invalid PBA amount of the block specified by the stored value of the block number 903 in the FM Chip specified by the stored value of the NVM Chip number 902. The invalid PBA amount is associated with the LBA0 space and / or LBA1 space specified by the NVM module LBA0 (811) and the NVM module LBA1 (821) in the LBA0-PBA conversion table 810 and the LBA1-PBA conversion table 820. This is the amount of the area (on the PBA space) that was later released from the association. Conversely, the PBA associated with the NVM module LBA0 or LBA1 by the LBA0-PBA conversion table 810 or the LBA1-PBA conversion table 820 is referred to as an effective PBA in this specification.

 無効PBA領域は、データの上書きが不可能な不揮発性メモリにおいて、疑似的に上書きを実現しようとする際に必然的に生じるものである。具体的には、NVMモジュール126はデータ更新の際に更新データを(更新前データの書き込まれているPBAとは異なる)未書き込みPBAに対して記録し、LBA0-PBA変換テーブル810のNVMモジュールPBA812とPBA長813のフィールドを更新データが記録されたPBA領域の先頭アドレスとPBA長に書き換える。この時、更新前データが記録されたPBA領域は、LBA0-PBA変換テーブル810による対応付けが解除される。NVMモジュール126はこのとき、LBA1-PBA変換テーブル820も調査し、LBA1-PBA変換テーブルにおいても対応付けがなされていない領域を無効PBA領域とする。NVMモジュール126は、FMの最小消去単位であるブロック毎にこの無効PBAの量をカウントし、無効PBA量が多いブロックを優先的にガーベッジコレクション対象領域として選択する。図9の例では、NVMモジュール126が管理するNVM chip番号0のブロック番号0には、無効PBA領域が160KBあることを示している。 The invalid PBA area is inevitably generated when a pseudo-overwrite is attempted in a non-volatile memory where data cannot be overwritten. Specifically, the NVM module 126 records the update data in an unwritten PBA (different from the PBA in which the pre-update data is written) at the time of data update, and the NVM module PBA 812 of the LBA0-PBA conversion table 810. And the PBA length 813 field are rewritten to the start address and PBA length of the PBA area in which the update data is recorded. At this time, the association by the LBA0-PBA conversion table 810 is released for the PBA area in which the pre-update data is recorded. At this time, the NVM module 126 also checks the LBA1-PBA conversion table 820 and sets an area that is not associated in the LBA1-PBA conversion table as an invalid PBA area. The NVM module 126 counts the amount of invalid PBA for each block, which is the minimum erase unit of FM, and preferentially selects a block with a large amount of invalid PBA as a garbage collection target area. In the example of FIG. 9, the block number 0 of the NVM chip number 0 managed by the NVM module 126 has an invalid PBA area of 160 KB.

 本実施例では、NVMモジュール126が管理する無効PBA領域の総量が、所定のガーベッジコレクション開始閾値以上となった(未書き込みページの枯渇)際に、無効PBA領域を含むブロックを消去し、未書き込みPBA領域を作成する。この動作をガーベッジコレクションと呼ぶ。このガーベッジコレクション時に、消去対象ブロック中に有効PBA領域が含まれる場合、ブロック消去の前に有効PBA領域を別のブロックへとコピーする必要が生じる。このデータコピーは、FMへのライト動作を伴うため、FMの破壊を進展させるとともに、コピー動作としてNVMモジュール126のプロセッサやバス帯域などのリソースを消費するため、性能低下の要因ともなる。このため、有効PBA領域のコピーは可能な限り少ないことが望ましい。本実施例のNVMモジュール126は、ガーベッジコレクション時にブロック管理情報900を参照し、無効PBA量の904の格納値が大きい(無効PBA領域を多く含む)ブロックから順に削除を実施することで、有効PBA領域のコピー量を削減するように動作する。 In this embodiment, when the total amount of invalid PBA areas managed by the NVM module 126 exceeds a predetermined garbage collection start threshold (depletion of unwritten pages), blocks including invalid PBA areas are erased and unwritten. Create a PBA area. This operation is called garbage collection. When an effective PBA area is included in an erasure target block at the time of garbage collection, it is necessary to copy the effective PBA area to another block before erasing the block. Since this data copy involves a write operation to the FM, the destruction of the FM progresses, and resources such as the processor of the NVM module 126 and the bus bandwidth are consumed as the copy operation, which causes a decrease in performance. For this reason, it is desirable that the number of valid PBA areas be as small as possible. The NVM module 126 according to the present embodiment refers to the block management information 900 at the time of garbage collection, and deletes the effective PBA by sequentially deleting the blocks having a larger storage value of the invalid PBA amount 904 (including many invalid PBA areas). Operates to reduce the amount of space copy.

 尚、本実施例では、NVMモジュールLBA0(811)及びLBA1(821)との対応付けが解除された領域の量をPBA量(セクタ数)にて管理した例について記述しているが、本発明はこの管理単位に限定されるものではない。例えばPBA量に代えて、最小書き込み単位であるページの個数を管理する態様もあり得る。 In the present embodiment, an example is described in which the amount of area released from the association with the NVM modules LBA0 (811) and LBA1 (821) is managed by the PBA amount (number of sectors). Is not limited to this management unit. For example, instead of the PBA amount, there may be a mode in which the number of pages that are the minimum writing unit is managed.

 以上が、本発明が適用されるNVMモジュールが用いるブロック管理情報900の内容である。 The above is the content of the block management information 900 used by the NVM module to which the present invention is applied.

(1-6)実施例1のデータフォーマット
 続いて、実施例1のストレージ装置101が扱うデータフォーマットについて、図10を用いて説明する。図10は、上位装置が4KBのデータをライトした際に、ストレージ装置の各コンポーネントが生成するデータフォーマットを順に1000、1010、1020、1030、1040として記したものである。尚、実施例1のストレージ装置は、データを4KB単位で圧縮して管理するが、本発明は、ストレージ装置の圧縮データの管理単位が4KBであるものに限定されるものではない。
(1-6) Data Format of Embodiment 1 Next, the data format handled by the storage apparatus 101 of Embodiment 1 will be described with reference to FIG. FIG. 10 shows the data format generated by each component of the storage device as 1000, 1010, 1020, 1030, and 1040 in order when the host device writes 4 KB data. The storage device of the first embodiment compresses and manages data in units of 4 KB, but the present invention is not limited to the storage device in which the management unit of compressed data in the storage device is 4 KB.

 また、実施例1のデータ圧縮を行うNVMモジュール126のデータ圧縮/伸長ユニット418は、データを4KB単位で圧縮や伸長するユニットであるが、本発明は、データ圧縮/伸長ユニット418の圧縮伸長単位が4KBであるものに限定されるものではない。 The data compression / decompression unit 418 of the NVM module 126 that performs data compression according to the first embodiment is a unit that compresses and decompresses data in units of 4 KB. However, the present invention is a unit for compressing and decompressing data. Is not limited to 4 KB.

 最初のデータフォーマット1000は、上位装置103がストレージ装置101に転送する4KBのデータを示している。実施例1において、上位装置103がストレージ装置101のボリュームにアクセスする際の最小アクセス単位は512B(バイト)で、ストレージ装置101は、データを512B単位で指定可能な構成である。以降、この上位装置103よりアドレスとして指定可能な512B単位のデータをセクタと記す、4KBのデータは8個のセクタとして扱われる。尚、実施例1ではセクタを512Bとした場合について記すが、本発明は、このセクタ単位に限定されるものではない。例えば1セクタを4KBとしても良い。 The first data format 1000 indicates 4 KB data transferred from the host device 103 to the storage device 101. In the first embodiment, the minimum access unit when the host apparatus 103 accesses the volume of the storage apparatus 101 is 512 B (bytes), and the storage apparatus 101 can be configured to specify data in 512 B units. Hereinafter, the 512B unit data that can be designated as an address by the host device 103 is referred to as a sector, and 4 KB data is handled as eight sectors. In the first embodiment, the case where the sector is 512B will be described. However, the present invention is not limited to this sector unit. For example, one sector may be 4 KB.

 ストレージ装置101は、データフォーマット1000の4KBのリクエストを受領する際、ホストインターフェース124に保証コードを生成させる。実施例1では、データの指定単位である512Bのセクタ毎に8Bの保証コードを付与する。この構成について詳細に記述したのが図11である。図11は、512Bセクタに8Bの保証コードを付与した例について示している。この保証コードが付与されたセクタを以降、保証コード付きセクタと呼ぶ。 When the storage apparatus 101 receives a 4 KB request in the data format 1000, it causes the host interface 124 to generate a guarantee code. In the first embodiment, an 8B guarantee code is assigned to each 512B sector, which is a data designation unit. This configuration is described in detail in FIG. FIG. 11 shows an example in which an 8B guarantee code is assigned to the 512B sector. Hereinafter, the sector to which the guarantee code is assigned is referred to as a sector with a guarantee code.

 保証コード付きセクタ1100は、512Bのデータ1101と8Bの保証コードにより構成され、8Bの保証コードは、2BのCRC1102と6BのID1103により構成される。尚、実施例1では、CRCとIDのみにより構成された保証コードについて記すが、本発明はこの例に限定されるものではない。本発明は、装置の制御中に保証コードのID1103を変更する必要があれば適用される。 The sector 1100 with a guarantee code is composed of 512B data 1101 and 8B guarantee code, and the 8B guarantee code is composed of 2B CRC 1102 and 6B ID 1103. In the first embodiment, a guarantee code composed only of CRC and ID will be described, but the present invention is not limited to this example. The present invention is applied if it is necessary to change the ID 1103 of the guarantee code during the control of the apparatus.

 CRC1102は、512Bのデータ1101を用いて生成される2BのCRC(Cyclic Redundancy Check)コードである。何らかの要因でデータ1101を構成するbitの値が変化しエラービットが生じた場合、このCRCを用いた検査を行うことで、bit値の変化を検出できる。 CRC 1102 is a 2B CRC (Cyclic Redundancy Check) code generated using 512B data 1101. If the bit value constituting the data 1101 changes for some reason and an error bit is generated, a change in the bit value can be detected by performing an inspection using this CRC.

 ストレージ装置101のプロセッサ121がハードウェア(たとえばホストインターフェース124)に転送を指示したとき、指示を受けたハードウェアは、転送する保証コード付きセクタのデータ1101とCRC1102を用いてビットエラーの検出を行う。そして、エラービットが検出されなかった場合は、データ転送を行う。一方で、エラービットが検出された場合、データ転送を中止し、プロセッサ121にエラーを通知する。 When the processor 121 of the storage apparatus 101 instructs the hardware (for example, the host interface 124) to transfer, the received hardware detects a bit error using the data 1101 and CRC 1102 of the sector with a guarantee code to be transferred. . If no error bit is detected, data transfer is performed. On the other hand, if an error bit is detected, the data transfer is stopped and the processor 121 is notified of the error.

 尚、実施例1では、CRCを2Bとした例について示したが、本発明はこのCRCのサイズに限定されるものではない。必要な検出能力に応じてCRCの量を増やしたとしてもよい。また、実施例1のCRCはデータ部のみから生成した例について示すが、本発明はこのCRC生成方式に限定されるものではない。例えば、データとIDからCRCを作成するとしてもよい。この場合、IDにて生じたエラービットを検出することが可能となる。一方で、IDの付け替え時にCRCを再計算する必要が生じる。 In addition, in Example 1, although the example which set CRC to 2B was shown, this invention is not limited to the size of this CRC. The amount of CRC may be increased according to the required detection capability. Further, although the CRC of the first embodiment is shown as an example generated only from the data portion, the present invention is not limited to this CRC generation method. For example, a CRC may be created from data and ID. In this case, it is possible to detect an error bit generated in the ID. On the other hand, it is necessary to recalculate the CRC when changing the ID.

 ID1103は、保証コード付きセクタを識別可能なIDである。実施例1では、IDとして、非圧縮データの仮想的な記録先となる伸長ボリュームの論理アドレス(LBA)を用いる。尚、実施例1では、IDからセクタを一意に識別できる構成について記すが、本発明では、IDから保証コード付きセクタを一意に識別できなくても、信頼性が著しく損なわれない場合であれば構わない。例えば、同一IDが付与される確率が極めて低い場合、異なるセクタに同一のIDを付与しても良い。尚、実施例1では、ID1103のデータサイズが6Bの例について示すが、本発明はこのデータサイズに限定されるものではない。伸長ボリュームのサイズが極めて大きい場合、誤ったデータを転送する確率を低減するためにID1103のデータサイズを6Bより大きくするとしてもよい。 ID 1103 is an ID that can identify a sector with a guarantee code. In the first embodiment, the logical address (LBA) of the decompression volume that is a virtual recording destination of uncompressed data is used as the ID. In the first embodiment, a configuration in which a sector can be uniquely identified from an ID is described. However, in the present invention, even if a sector with a guarantee code cannot be uniquely identified from an ID, the reliability is not significantly impaired. I do not care. For example, when the probability that the same ID is assigned is very low, the same ID may be assigned to different sectors. In the first embodiment, an example in which the data size of the ID 1103 is 6B is shown, but the present invention is not limited to this data size. When the size of the decompression volume is extremely large, the data size of ID 1103 may be made larger than 6B in order to reduce the probability of transferring erroneous data.

 本発明の実施例に係るストレージ装置で用いられるIDは、ストレージ装置101の動作の正しさを保証するものである。プロセッサ121はデータ転送時に、転送を行うハードウェアにIDの期待値を通知する。そして、転送を指示されたハードウェアは、転送する保証コード付きセクタ1100内のID1103を取得し、期待値と一致していることを確認する。保証コード付きセクタ1100内のID1103がプロセッサ121から通知された期待値と異なっていた場合、転送を指示されたハードウェアは、プロセッサ121にエラーを通知する。 The ID used in the storage apparatus according to the embodiment of the present invention guarantees the correctness of the operation of the storage apparatus 101. At the time of data transfer, the processor 121 notifies the hardware that performs the transfer of the expected ID value. The hardware instructed to transfer acquires the ID 1103 in the sector 1100 with a guarantee code to be transferred, and confirms that it matches the expected value. When the ID 1103 in the guarantee code-added sector 1100 is different from the expected value notified from the processor 121, the hardware instructed to transfer notifies the processor 121 of an error.

 以上が保証コード付きセクタの構成に関する詳細な説明である。尚、後述する保証コード付き圧縮セクタは、データ1101に圧縮データを格納し、圧縮データから作られたCRCと圧縮データに対して付与したIDを含む保証コードを付与したものである。保証コード付き圧縮セクタの各フィールドのサイズは、保証コード付きセクタ1100と同一であるため、詳細な説明は、省略する。 The above is a detailed description of the configuration of the sector with a guarantee code. A compressed sector with a guarantee code, which will be described later, stores compressed data in the data 1101, and is given a guarantee code including a CRC created from the compressed data and an ID assigned to the compressed data. Since the size of each field of the compressed sector with a guarantee code is the same as that of the sector 1100 with a guarantee code, detailed description thereof is omitted.

 続いて、図10に示した圧縮データ1020について説明する。、実施例1では、保証コード付きセクタをNVMモジュール126に記録する。この際、NVMモジュール126は、データ圧縮/伸長ユニット418にて保証コード付きセクタを圧縮する。この圧縮処理によって生成されるデータが、圧縮データ1020である(図中では”Compression Data“と表記している)。図10では、4160Bの保証コード付きセクタを圧縮した結果、1210Bの圧縮データが生成された例について示しているが、データ内容によってはそれ以外のサイズの圧縮データが生成されることもある。尚、実施例1では、保証コード付きセクタの内、データ1101と保証コードを纏めて圧縮した例について記すが、本発明は、この例に限定されるものではない。例えば、保証コード付きセクタの内、データ1101のみを圧縮し、保証コードについて無圧縮とする。そして、無圧縮の保証コードを纏めて圧縮したデータの先頭あるいは終端などに付与した構成の圧縮データ1020を作成してもよい。 Subsequently, the compressed data 1020 shown in FIG. 10 will be described. In the first embodiment, a sector with a guarantee code is recorded in the NVM module 126. At this time, the NVM module 126 compresses the sector with the guarantee code by the data compression / decompression unit 418. Data generated by this compression processing is compressed data 1020 (indicated as “Compression Data” in the figure). FIG. 10 shows an example in which compressed data of 1210B is generated as a result of compressing a sector with a guarantee code of 4160B, but compressed data of other sizes may be generated depending on the data contents. In the first embodiment, an example in which data 1101 and a guarantee code are compressed together in a sector with a guarantee code will be described. However, the present invention is not limited to this example. For example, only the data 1101 is compressed in the sector with the guarantee code, and the guarantee code is not compressed. Then, compressed data 1020 having a configuration in which uncompressed guarantee codes are collected and compressed at the beginning or end of data may be created.

 実施例1のNVMモジュール126は、圧縮データも非圧縮データと同様に、セクタ単位で管理する。そのため、1210Bの圧縮データの後ろに326Bのデータをパディングし、1536Bのサイズ(つまり3セクタ分のサイズ)のデータにする。そして、1536Bのデータを3つの圧縮セクタ(図中の“CompData”)に分割し(データフォーマット1030を参照)、各圧縮セクタの終端に保証コード用の8Bの領域をパディングしたデータ1040を生成する(図中の黒いボックス部分が圧縮セクタの保証コード用パディング領域を意味する。またデータ1040が生成された時点では、当該パディング領域には保証コードは格納されていない)。そして、このデータをFM420に記録する。尚、FMの最小記録単位は、ページ、たとえば8KBや16KB等の大きさである為、NVMモジュール126は、一定量のデータをNVMモジュール126内のデータバッファ416に溜め、最小記録単位以上のデータが溜まったタイミングで複数のライトデータを一括してFM420に記録する。 The NVM module 126 according to the first embodiment manages the compressed data on a sector basis as well as the uncompressed data. Therefore, the 326B data is padded after the compressed data of 1210B to obtain data of the size of 1536B (that is, the size of 3 sectors). Then, 1536B data is divided into three compressed sectors ("CompData" in the figure) (see data format 1030), and data 1040 is generated by padding an 8B area for a guarantee code at the end of each compressed sector. (The black box portion in the figure means a guarantee code padding area of the compressed sector. Also, when the data 1040 is generated, no guarantee code is stored in the padding area). This data is recorded in the FM 420. Since the minimum recording unit of FM is a page, for example, a size such as 8 KB or 16 KB, the NVM module 126 stores a certain amount of data in the data buffer 416 in the NVM module 126, and the data exceeding the minimum recording unit. A plurality of write data is collectively recorded in the FM 420 at the timing when the error is accumulated.

 実施例1に係るストレージ装置101のプロセッサ121は、後述するリードコマンドをNVMモジュール126に発行することによって、各圧縮セクタに保証コード用の8Bの領域が付加されたデータを読み出す。このときNVMモジュール126は、各圧縮セクタに対して圧縮セクタ用の保証コードを付与する。より具体的には、ストレージコントローラ110(のプロセッサ121)がNVMモジュール126にリードコマンドを発行する時、リードコマンド中に圧縮セクタに付与する保証コードのIDを含ませる。コマンドを受けとったNVMモジュール126は、ストレージコントローラ110に圧縮セクタを転送する際に、パディングされている保証コード用の領域に、圧縮セクタから生成した2BのCRCと、ストレージコントローラ110より指示された6BのIDを埋め込み、保証コード付き圧縮セクタ1050を生成する。その後NVMモジュール126は、リードデータとして保証コード付き圧縮セクタ1050をコントローラ110に転送する。 The processor 121 of the storage apparatus 101 according to the first embodiment reads out data in which an 8B area for a guarantee code is added to each compressed sector by issuing a read command to be described later to the NVM module 126. At this time, the NVM module 126 assigns a compression sector guarantee code to each compression sector. More specifically, when the storage controller 110 (the processor 121) issues a read command to the NVM module 126, the ID of the guarantee code to be given to the compression sector is included in the read command. Upon receiving the command, the NVM module 126, when transferring the compressed sector to the storage controller 110, stores the 2B CRC generated from the compressed sector in the padded guarantee code area and the 6B specified by the storage controller 110. Are generated, and a compressed sector 1050 with a guarantee code is generated. Thereafter, the NVM module 126 transfers the compressed sector 1050 with a guarantee code as read data to the controller 110.

(1-7)NVMモジュール制御用のコマンド1:ライトコマンド
 続いて、本発明が適用されるNVMモジュール126がサポートするコマンドについて説明する。本実施例におけるNVMモジュール126は、ストレージコントローラ110のプロセッサ121から1つのコマンドを受理すると、当該受理したコマンドの内容を解析して所定の処理を行い、処理完了後に1つの応答(応答情報)をストレージコントローラに返答する。この処理は、NVMモジュール126内のプロセッサ415が、RAM413に格納されているコマンド処理用のプログラムを実行することにより実現される。なお、コマンドには、NVMモジュール126が所定の処理を行うために必要となる情報が含まれている。たとえばNVMモジュール126にデータの書き込みを指示するライトコマンドの場合、コマンド中には、そのコマンドがライトコマンドであること、ライトのために必要となる情報(ライトデータの書き込み位置やデータ長など)を含んでいる。
(1-7) NVM Module Control Command 1: Write Command Next, commands supported by the NVM module 126 to which the present invention is applied will be described. When the NVM module 126 in this embodiment receives one command from the processor 121 of the storage controller 110, the NVM module 126 analyzes the content of the received command, performs predetermined processing, and sends one response (response information) after the processing is completed. Reply to the storage controller. This process is realized by the processor 415 in the NVM module 126 executing a command processing program stored in the RAM 413. The command includes information necessary for the NVM module 126 to perform a predetermined process. For example, in the case of a write command that instructs the NVM module 126 to write data, the command includes a write command and information (such as the write data write position and data length) required for the write. Contains.

 図12は、本発明の実施例1におけるNVMモジュール126がサポートする、ライトコマンドとライトコマンドへの応答情報を示した図である。本実施例におけるNVMモジュールのライトコマンド1210は、コマンド情報として、オペレーションコード(Opcode)1211、コマンドID1212、LBA0/1開始アドレス1213、LBA0/1長1214、圧縮要否フラグ1215、ライトデータアドレス1216、保証コードIDの期待値1217、保証コードIDの種1218により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。 FIG. 12 is a diagram showing a write command and response information to the write command supported by the NVM module 126 according to the first embodiment of the present invention. The write command 1210 of the NVM module in this embodiment includes, as command information, an operation code (Opcode) 1211, a command ID 1212, an LBA 0/1 start address 1213, an LBA 0/1 length 1214, a compression necessity flag 1215, a write data address 1216, It consists of an expected value 1217 of the guarantee code ID and a seed 1218 of the guarantee code ID. In this embodiment, an example of a command based on the above information will be described, but there may be additional information above.

 オペレーションコード1211及びコマンドID1212は、NVMモジュール126がサポートする各コマンドに共通に存在するフィールドである。オペレーションコード1211は、コマンドの種別をNVMモジュール126に通知するための情報が格納されるフィールドである。一例として、ライトコマンドの場合、当該フィールドには0x01という値が格納されており、リードコマンドの場合、0x02という値が格納されている。コマンドを取得したNVMモジュール126はこのフィールドを参照することにより、通知されたコマンドがライトコマンドであることを認知する。 Operation code 1211 and command ID 1212 are fields that exist in common with each command supported by the NVM module 126. The operation code 1211 is a field in which information for notifying the NVM module 126 of the command type is stored. As an example, a value of 0x01 is stored in the field for a write command, and a value of 0x02 is stored for a read command. The NVM module 126 that has acquired the command recognizes that the notified command is a write command by referring to this field.

 コマンドID1212は、コマンドの固有のIDを格納するフィールドであり、コマンドの応答情報には、どのコマンドに対する応答情報であるかをコマンドの発行元(ストレージコントローラ110)に認識させるために、このフィールドに指定されたIDが付与される。ストレージコントローラ110はコマンド作成時に、コマンドを一意に識別可能なIDをコマンドID1212に格納する。そして、NVMモジュール126からの応答情報を受領した際、応答情報に含まれるIDを取得することで、当該コマンドの完了を認識する。 The command ID 1212 is a field for storing a unique ID of the command. In the command response information, the command issuer (storage controller 110) recognizes which command is the response information for this command. The specified ID is given. When creating a command, the storage controller 110 stores an ID that can uniquely identify the command in the command ID 1212. When the response information from the NVM module 126 is received, the completion of the command is recognized by acquiring the ID included in the response information.

 LBA0/1開始アドレス1213は、ライト先の論理空間(LBA0空間、あるいはLBA1空間)の先頭アドレスを指定するフィールドである。なお、本発明の実施例におけるLBA0空間は、アドレス0x000_0000_0000から0x07F_FFFF_FFFFの範囲の空間であり、LBA1空間はアドレス0x800_0000_0000以降の範囲の空間と定められているので、NVMモジュール126は、ライトコマンドのLBA0/1開始アドレス1213に0x000_0000_0000から0x07F_FFFF_FFFFの範囲のアドレスが格納されていた場合、LBA0空間のアドレスが指定されたと認識し、0x800_0000_0000から0x8FF_FFFF_FFFFの範囲のアドレスが指定されていた場合、LBA1空間のアドレスが指定されたと認識することができる。ただLBA0空間とLBA1空間のいずれのアドレス空間に従うアドレスが指定されたか(つまり、データを圧縮して書き込むことを指示しているか、データに圧縮処理を施さずにそのまま書き込むことを指示しているか)を認識する方法は、上で説明した方法以外の方法を採用することも可能である。たとえばオペレーションコード1211の内容によってLBA0空間とLBA1空間を識別する方法などもありえる。 The LBA 0/1 start address 1213 is a field for designating the head address of the write destination logical space (LBA 0 space or LBA 1 space). Note that the LBA0 space in the embodiment of the present invention is a space in the range of addresses 0x000_0000_0000 to 0x07F_FFFF_FFFF, and the LBA1 space is defined as a space in the range after the address 0x800_0000_0000. If an address in the range from 0x000_0000_0000 to 0x07F_FFFF_FFFF is stored in 1 start address 1213, it is recognized that an address in the LBA0 space has been designated, and if an address in the range from 0x800_0000_0000 to 0x8FF_FFFF_FFFF is designated, the address in the LBA1 space is designated Can be recognized. Whether the address according to the address space of the LBA0 space or the LBA1 space is specified (that is, whether data is compressed and written or whether data is written as it is without being compressed) A method other than the method described above can be adopted as a method for recognizing. For example, there may be a method of identifying the LBA0 space and the LBA1 space according to the contents of the operation code 1211.

 LBA0/1長1214は、LBA0/1開始アドレス1213から始まるデータ記録先のLBA0またはLBA1の範囲(長さ)を指定するフィールドである。NVMモジュール126は、前述のLBA0またはLBA1開始アドレス1213とLBA0/1長1214が示す範囲のLBA0空間上領域またはLBA1空間上領域領域に対して、ライトデータを格納するPBA空間上領域を対応づける処理を行う。 The LBA 0/1 length 1214 is a field for designating the range (length) of the data recording destination LBA 0 or LBA 1 starting from the LBA 0/1 start address 1213. The NVM module 126 associates the PBA space area for storing write data with the LBA0 space upper area or the LBA1 space upper area within the range indicated by the LBA0 or LBA1 start address 1213 and the LBA0 / 1 length 1214 described above. I do.

 圧縮要否フラグ1215は、このコマンドが指示するライト対象データの圧縮要否を指定するフィールドである。ストレージコントローラ110がライトコマンドを作成する際、ライト対象データにデータ圧縮によるサイズ削減効果が見込めない場合(例えば既に画像圧縮等で圧縮されたデータと認識している場合)、このフィールドに「0」を格納することで、NVMモジュール126に圧縮が不要であることを通知する。逆に、このフィールドに0以外の値が格納されている場合には、NVMモジュール126は圧縮を実行する。実施例1では、LBA1空間に対してライトする際、ライト対象データが既に圧縮済みでそれ以上の圧縮処理は不要であることを明示的に伝えるために、このフィールドに「0」を格納する。尚、別の実施態様として、LBA1空間へのデータライト時には、NVMモジュール126が転送データの圧縮が常に不要であると判断するようにしてもよい。その場合、この圧縮要否フラグ1215のフィールドは必要ない。 The compression necessity flag 1215 is a field for designating whether or not to compress the write target data indicated by this command. When the storage controller 110 creates a write command, if the size reduction effect due to data compression cannot be expected for the write target data (for example, when it is already recognized as data compressed by image compression or the like), “0” is set in this field. Is stored, the NVM module 126 is notified that compression is not necessary. Conversely, if a value other than 0 is stored in this field, the NVM module 126 performs compression. In the first embodiment, when writing to the LBA1 space, “0” is stored in this field in order to explicitly notify that the write target data has already been compressed and no further compression processing is necessary. As another embodiment, when data is written to the LBA1 space, the NVM module 126 may determine that compression of transfer data is not always necessary. In that case, the field of the compression necessity flag 1215 is not necessary.

 ライトデータアドレス1216は、このコマンドが指示するライト対象データの現在の格納先(たとえばストレージコントローラ110のDRAM125)の先頭アドレスを格納するフィールドである。NVMモジュール126は、このフィールドで指定された位置から、LBA0/1長(1214)で指定された長さの範囲に存在するデータを読み出すことでライトデータの取得を行う。尚、ライト対象データが複数の領域に離散的に格納されている場合、このフィールドに複数のアドレスが格納される。別の実施態様として、このフィールドには複数のアドレスを格納するリストのポインタ情報(リストが格納されている領域のアドレス)が格納されるようにして、NVMモジュール126が当該ポインタ情報を参照してライトデータアドレスを取得するようにしてもよい。 The write data address 1216 is a field for storing the start address of the current storage destination (for example, the DRAM 125 of the storage controller 110) of the write target data indicated by this command. The NVM module 126 acquires write data by reading data existing in the range of the length specified by the LBA 0/1 length (1214) from the position specified by this field. When the write target data is discretely stored in a plurality of areas, a plurality of addresses are stored in this field. As another embodiment, the NVM module 126 refers to the pointer information so that this field stores pointer information (address of an area in which the list is stored) for storing a plurality of addresses. The write data address may be acquired.

 保証コードIDの期待値1217は、ライト対象データに付与されている保証コードの期待値を格納するフィールドである。実施例1に係るストレージ装置101では、保証コードのIDとして6Bのデータを用いる。このため、本フィールドも6BのID期待値を指定する。 The expected value 1217 of the guarantee code ID is a field for storing the expected value of the guarantee code assigned to the write target data. In the storage apparatus 101 according to the first embodiment, 6B data is used as the ID of the guarantee code. For this reason, this field also specifies an ID expectation value of 6B.

 コマンドを受信したNVMモジュール126は、ライトするデータの512B毎に付加されている保証コードのIDについて、保証コードIDの期待値1217と一致しているか検査する。検査の具体的な方法は以下の通りである、ライトデータサイズが4KB(8セクタ)の場合、NVMモジュール126は8つの保証コード付きセクタのIDについて比較作業を行う。まず8個の保証コード付きセクタのIDのそれぞれの期待値を、保証コードIDの期待値1217より生成する。ライトデータ中の最初の保証コード付きセクタのIDの期待値は、保証コードIDの期待値1217となり、以降の保証コード付きセクタのIDの期待値は、保証コードIDの期待値1217を1つずつ加算した値となる。このように、4KBのライトリクエストであれば、8個の保証コード付きセクタそれぞれについて、保証コードIDの期待値1217に0~7の値を加算した期待値と比較を行う。 The NVM module 126 that has received the command checks whether the ID of the guarantee code added to each 512B of the data to be written matches the expected value 1217 of the guarantee code ID. A specific method of the inspection is as follows. When the write data size is 4 KB (8 sectors), the NVM module 126 performs a comparison operation for the IDs of the sectors with eight guarantee codes. First, expected values of IDs of eight guarantee code-added sectors are generated from expected values 1217 of guarantee code IDs. The expected value of the ID of the sector with the first guarantee code in the write data is the expected value 1217 of the guarantee code ID, and the expected value of the ID of the sector with the guarantee code thereafter is the expected value 1217 of the guarantee code ID one by one. The added value. As described above, in the case of a 4 KB write request, each of the eight sectors with a guarantee code is compared with an expected value obtained by adding a value of 0 to 7 to the expected value 1217 of the guarantee code ID.

 実施例1では、ストレージ装置101のライト動作時に、上位装置103から到来するライトデータをキャッシュであるNVMモジュール126に記録する。この時、ストレージ装置101のホストインターフェース124が、上位装置103から取得した512Bのデータ毎に2BのCRCと6BのIDを、保証コードとして付与する。実施例1に係るストレージ装置101では、ライト動作時に付与するIDは、ライトデータの書き込み先の伸長ボリューム5000の論理アドレス(LBA)の下位6バイトとしているので、伸長ボリューム5000のLBAの下位6Bの値がIDとして付加される。尚、本発明は、保証コードのIDとして伸長ボリューム5000のライト先アドレスを用いる態様に限定されるものではない。 In the first embodiment, during the write operation of the storage apparatus 101, the write data coming from the host apparatus 103 is recorded in the NVM module 126 that is a cache. At this time, the host interface 124 of the storage apparatus 101 assigns 2B CRC and 6B ID as a guarantee code for each 512B data acquired from the host apparatus 103. In the storage apparatus 101 according to the first embodiment, the ID given at the time of the write operation is the lower 6 bytes of the logical address (LBA) of the decompression volume 5000 to which the write data is written. A value is added as an ID. The present invention is not limited to an aspect in which the write destination address of the decompression volume 5000 is used as the guarantee code ID.

 なお、実施例1に係るNVMモジュール126の場合、LBA0/1開始アドレス1213にLBA0が指定されている場合、伸長されたデータの各セクタの保証コードのID部分の内容を、保証コードIDの期待値1217フィールドに格納されている値に基づいて検査し、LBA0/1開始アドレス1213にLBA1が指定されている場合、圧縮データの各セクタの保証コードのID部分の内容を、保証コードIDの期待値1217フィールドに格納されている値に基づいて検査するよう動作する。したがって、ストレージ装置101が圧縮ボリュームを構成している最終記憶装置からデータ(圧縮データ)を読み出してNVMモジュール126のLBA1空間上領域に記録する際には、圧縮データの各セクタの保証コードのID部分の検査を行う。 In the case of the NVM module 126 according to the first embodiment, when LBA0 is designated as the LBA0 / 1 start address 1213, the contents of the ID part of the guarantee code of each sector of the decompressed data are set to the expectation of the guarantee code ID. When the LBA1 is specified as the LBA0 / 1 start address 1213, the contents of the ID part of the guarantee code of each sector of the compressed data are expected of the guarantee code ID. It operates to check based on the value stored in the value 1217 field. Therefore, when the storage apparatus 101 reads data (compressed data) from the final storage device constituting the compressed volume and records it in the area on the LBA1 space of the NVM module 126, the ID of the guarantee code of each sector of the compressed data Perform part inspection.

 新保証コードIDの種1218は、ライト時に保証コードを付け替える際、または圧縮データに新たな保証コードを付ける際に用いるフィールドである。新保証コードIDの種1218は、当該ライトリクエストにおけるライト対象データの先頭セクタのデータに新たに付与するIDの値を格納する。実施例1では、保証コードのIDとして6Bのデータを用いる。このため、本フィールドも6Bの種を指定する。なお、保証コードを付加しない場合には、新保証コードIDの種1218のフィールドには、無効であることを示す値(たとえば0xFFFFFFFF等の、保証コードIDとして用いられない値)が格納される。 The new guarantee code ID type 1218 is a field used when changing the guarantee code at the time of writing or when attaching a new guarantee code to the compressed data. The new guarantee code ID seed 1218 stores an ID value newly added to the data of the first sector of the write target data in the write request. In the first embodiment, 6B data is used as the guarantee code ID. For this reason, this field also specifies the seed of 6B. When a guarantee code is not added, a value indicating invalidity (for example, a value not used as a guarantee code ID such as 0xFFFFFFFF) is stored in the field of the new guarantee code ID seed 1218.

 新保証コードの種1218は、実施例1に示すストレージ装置101では、通常のライト処理の際、つまり上位装置103からのライトデータをNVMモジュール126に格納する際には用いない。これは先に述べたとおり、上位装置103からのライトデータをNVMモジュール126に格納する時点では、当該データが格納される圧縮ボリューム上のアドレスが定まっていないからである。ストレージ装置101がNVMモジュール126にデータをライトする際、新たに付与する保証コードが既知であった場合には、新保証コードの種1218フィールドを用いることがある。 The new guarantee code seed 1218 is not used in the storage apparatus 101 shown in the first embodiment during normal write processing, that is, when write data from the host apparatus 103 is stored in the NVM module 126. This is because, as described above, when the write data from the host device 103 is stored in the NVM module 126, the address on the compressed volume in which the data is stored is not determined. When the storage apparatus 101 writes data to the NVM module 126, if the newly assigned guarantee code is known, the new guarantee code seed 1218 field may be used.

 ストレージ装置101のプロセッサ121は、NVMモジュール126へのデータライト時に保証コードを変更する場合、新保証コードの種となる情報をライトコマンドの新保証コードの種1218フィールドに格納する。指示を受けたNVMモジュール126は、ライトデータをFM420に格納する際、ライトコマンドに含まれている新保証コードの種1218から新たな保証コードを生成し、保証コード付きセクタ(あるいは保証コード付き圧縮セクタ)の保証コードを変更してFMに格納する。 When changing the guarantee code at the time of data writing to the NVM module 126, the processor 121 of the storage apparatus 101 stores information that becomes the seed of the new guarantee code in the new guarantee code seed 1218 field of the write command. Upon receiving the instruction, the NVM module 126 generates a new guarantee code from the new guarantee code seed 1218 included in the write command and stores the write data in the FM 420, and a sector with guarantee code (or compression with guarantee code). (Sector) guarantee code is changed and stored in FM.

 実施例1では、LBA0/1長1214にて指定されるライトリクエストサイズが4KBの場合、NVMモジュール126は、8個の新たな保証コードを新保証コードIDの種1218より生成する。具体的には、NVMモジュール126は、転送対象である4KB(8セクタ)のデータの先頭の保証コード付きセクタのIDを、新保証コードIDの種1218で指定された値とし、次の保証コード付きセクタのIDの値は、新保証コードの種を1つインクリメントした値となる。このように、4KBのライトリクエストであれば、8個の保証コード付きセクタそれぞれについて、新保証コードIDの種1218で指定される値に対して0~7の値を加算して生成されるIDを付与する。 In the first embodiment, when the write request size specified by the LBA 0/1 length 1214 is 4 KB, the NVM module 126 generates eight new guarantee codes from the new guarantee code ID seed 1218. Specifically, the NVM module 126 sets the ID of the sector with the guarantee code at the head of the 4 KB (8 sectors) data to be transferred as the value specified by the new guarantee code ID seed 1218 and sets the next guarantee code. The ID value of the attached sector is a value obtained by incrementing the seed of the new guarantee code by one. Thus, in the case of a 4 KB write request, an ID generated by adding a value of 0 to 7 to the value specified by the seed 1218 of the new guarantee code ID for each of the eight sectors with a guarantee code. Is granted.

 なお、実施例1に係るNVMモジュール126の場合、LBA0/1開始アドレス1213にLBA0が指定されている場合、保証コード付きセクタ保証コードに含まれているID部分(伸長されたデータの各セクタに含まれている保証コードのID部分)に、新保証コードIDの種1218フィールドに格納されている値に基づいて生成されるIDを格納し、LBA0/1開始アドレス1213にLBA1が指定されている場合、保証コード付き圧縮セクタの保証コード内ID部分(圧縮データの各セクタに付加されている保証コードのID部分)に、新保証コードIDの種1218フィールドに格納されている値に基づいて生成されるIDを格納するよう動作する。 In the case of the NVM module 126 according to the first embodiment, when LBA0 is specified in the LBA0 / 1 start address 1213, the ID part included in the sector guarantee code with a guarantee code (in each sector of the decompressed data) The ID generated based on the value stored in the seed 1218 field of the new guarantee code ID is stored in the ID part of the guarantee code included), and LBA1 is designated as the LBA0 / 1 start address 1213 In the case, the ID part in the guarantee code of the compressed sector with the guarantee code (the ID part of the guarantee code added to each sector of the compressed data) is generated based on the value stored in the seed 1218 field of the new guarantee code ID. To store stored IDs.

 ライト応答情報1220は、コマンドID1221、ステータス1222、圧縮データ長1223により構成される。尚、本実施例では、上記の情報による応答情報の例について記すが、上記以上の付加的な情報があってもよい。 The write response information 1220 includes a command ID 1221, a status 1222, and a compressed data length 1223. In the present embodiment, an example of response information based on the above information will be described, but there may be additional information above.

 コマンドID1221及びステータス1222は、NVMモジュール126がサポートする各コマンドの応答に含まれる、共通の情報である。コマンドID1221は、完了したコマンドを一意に特定できる番号を格納するフィールドである。 The command ID 1221 and the status 1222 are common information included in the response of each command supported by the NVM module 126. The command ID 1221 is a field for storing a number that can uniquely identify a completed command.

 ステータス1222は、コマンドの完了またはエラーを、コマンド要求元(ストレージ装置101のプロセッサ121)に通知する為のフィールドである。エラーである場合、例えばエラー原因等を識別できる番号を格納する。 The status 1222 is a field for notifying the command request source (the processor 121 of the storage apparatus 101) of the completion or error of the command. In the case of an error, for example, a number for identifying the cause of the error is stored.

 圧縮データ長1223は、ライトしたデータが、データ圧縮により縮小した際のデータ長を記録するフィールドである。コマンドを発行したプロセッサ121は、ライト応答情報1220に含まれるこのフィールドの情報を取得することで、ライトしたデータの圧縮後のデータサイズを把握できる。 The compressed data length 1223 is a field for recording the data length when the written data is reduced by data compression. The processor 121 that has issued the command can acquire the compressed data size of the written data by acquiring information in this field included in the write response information 1220.

 また、本実施例では、ライト先がLBA1であるとき、圧縮済みのデータを記録することとなっている為、本フィールドは無効となる。 Also, in this embodiment, when the write destination is LBA1, this field is invalid because compressed data is recorded.

 (1-8)NVMモジュール制御用のコマンド2:リードコマンド
 続いて、本発明が適用されるNVMモジュールがサポートするリードコマンドについて説明する。このリードコマンドは、本発明の特徴的な動作である保証コードの付け替えリードを指示するものである。
(1-8) NVM Module Control Command 2: Read Command Next, a read command supported by the NVM module to which the present invention is applied will be described. This read command instructs the replacement of the guarantee code, which is a characteristic operation of the present invention.

 図13は、本実施例におけるNVMモジュールのリードコマンドとそのリードコマンドへの応答情報を示した図である。本実施例におけるNVMモジュールのリードコマンド1310は、コマンド情報として、オペレーションコード1311、コマンドID1312、LBA0/1開始アドレス1313、LBA0/1長1314、伸長要否フラグ1315、リードデータアドレス1316、保証コードIDの期待値1317、保証コードIDの種1318により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。尚、コマンドID1312は先のライトコマンドと同一の内容の為、説明は省略する。 FIG. 13 is a diagram showing an NVM module read command and response information to the read command in the present embodiment. The read command 1310 of the NVM module in this embodiment includes, as command information, an operation code 1311, a command ID 1312, an LBA0 / 1 start address 1313, an LBA0 / 1 length 1314, an expansion necessity flag 1315, a read data address 1316, and a guarantee code ID. Expected value 1317 and guarantee code ID seed 1318. 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 1312 has the same contents as the previous write command, description thereof is omitted.

 オペレーションコード1311は、コマンドの種別をNVMモジュール126に通知するフィールドであり、コマンドを取得したNVMモジュール126は、このフィールドにより通知されたコマンドが圧縮データサイズ取得コマンドであることを認知する。 The operation code 1311 is a field for notifying the command type to the NVM module 126, and the NVM module 126 that has acquired the command recognizes that the command notified by this field is a compressed data size acquisition command.

 LBA0/1開始アドレス1313は、リード先の論理空間(LBA0空間またはLBA1空間)の先頭アドレスを指定するフィールドである。またライトコマンドと同様、 LBA0/1開始アドレス1313にLBA0が指定された場合には、伸長されたデータを要求元に返却し、LBA1が指定された場合には、伸長していないデータを要求元に返却する。 The LBA 0/1 start address 1313 is a field for designating the start address of the logical space (LBA 0 space or LBA 1 space) of the read destination. Similarly to the write command, if LBA0 is specified as the LBA0 / 1 start address 1313, the decompressed data is returned to the request source, and if LBA1 is specified, the unexpanded data is returned to the request source. Return to

 LBA0/1長1314は、LBA0/1開始アドレス1313から始まる記録先LBA0またはLBA1の範囲を指定するフィールドである。NVMモジュール126はリードコマンドを受信すると、前述のLBA0またはLBA1開始アドレス1313とLBA0/1長1314が示す範囲のLBA0またはLBA1領域に対して対応付けられたPBAを特定し、当該特定されたPBAに対応付けられた物理領域からデータを取得し、ストレージ装置に転送することでリード処理を行う。 The LBA 0/1 length 1314 is a field for designating the range of the recording destination LBA 0 or LBA 1 starting from the LBA 0/1 start address 1313. Upon receiving the read command, the NVM module 126 identifies the PBA associated with the LBA0 or LBA1 area in the range indicated by the LBA0 or LBA1 start address 1313 and the LBA0 / 1 length 1314 described above, and the identified PBA. Data is acquired from the associated physical area, and read processing is performed by transferring the data to the storage apparatus.

 伸長要否フラグ1315は、このコマンドが指示するリード対象データの伸長要否を指定するフィールドである。ストレージ装置101がリードコマンドを作成する際、このフィールドに「0」を格納することで、NVMモジュール126に伸長が不要であることを通知する。圧縮データを最終記憶媒体に格納するときなどには、リード対象データを意図的に伸長せずに取得する必要がある。このため、伸長要否フラグ1315は、伸長が不要であることを明示的に伝えるために使用される。尚、別の実施態様として、LBA1空間に対するリード時は、NVMモジュール126は取得データの伸長が不要であると判定するようにしてもよい。その場合、この伸長要否フラグ1315は無くとも良い。 The decompression necessity flag 1315 is a field for designating the necessity of decompression of the read target data indicated by this command. When the storage apparatus 101 creates a read command, “0” is stored in this field to notify the NVM module 126 that decompression is unnecessary. When storing the compressed data in the final storage medium, it is necessary to acquire the read target data without intentionally expanding it. Therefore, the decompression necessity flag 1315 is used to explicitly tell that decompression is unnecessary. As another embodiment, the NVM module 126 may determine that it is not necessary to decompress the acquired data when reading the LBA1 space. In this case, the decompression necessity flag 1315 may not be provided.

 リードデータアドレス1316は、リード対象データの出力先領域の先頭アドレス(たとえばDRAM125内のアドレス)が指定される。リードされたデータはリードデータアドレス1316で指定されたアドレスの領域から、連続的にLBA0/1長1314で指定された長さのデータが格納されることになる。なお、ライトコマンドのライトデータアドレスと同様に、リードデータアドレス1316とデータ長の組を複数、リードコマンドのパラメータとして指定できるようにし、離散的な領域にデータを出力することを可能とする態様もありえる。保証コードIDの期待値1317は、ストレージ装置がリード対象データの保証コードの期待値を格納するフィールドである。実施例1では、保証コードのIDとして6Bのデータを用いる。このため、本フィールドも6BのID期待値を指定する。 In the read data address 1316, the head address (for example, an address in the DRAM 125) of the output destination area of the read target data is designated. As the read data, data having a length designated by the LBA 0/1 length 1314 is continuously stored from the area of the address designated by the read data address 1316. As with the write data address of the write command, there is also an aspect in which a plurality of combinations of the read data address 1316 and the data length can be specified as read command parameters, and data can be output to discrete areas. It can be. The guarantee code ID expected value 1317 is a field in which the storage apparatus stores the expected value of the guarantee code of the read target data. In the first embodiment, 6B data is used as the guarantee code ID. For this reason, this field also specifies an ID expectation value of 6B.

 コマンドを通知されたNVMモジュール126はリード対象データの512B毎に含まれる保証コードのIDについて、保証コードIDの期待値1317と一致しているか検査する。尚、LBA0/1長1314にて指定されるデータサイズが4KBの場合、NVMモジュール126は8つの保証コード付きセクタのIDを比較する。8個の保証コード付きセクタのIDのそれぞれ期待値は、保証コードIDの期待値1317より生成する。転送の最初の保証コード付きセクタのIDの期待値は、保証コードIDの期待値1317となり、次の保証コード付きセクタのIDの期待値は、保証コードIDの期待値1317を1つインクリメントした値となる。このように、4KBのリードリクエストであれば、8個の保証コード付きセクタそれぞれについて、保証コードIDの期待値1317をそれぞれ加算した期待値と比較を行う。なお、実施例1に係るNVMモジュール126の場合、伸長された保証コード付きセクタについて検査を行う。 The NVM module 126 notified of the command checks whether the guarantee code ID included in each read target data 512B matches the expected value 1317 of the guarantee code ID. When the data size specified by the LBA 0/1 length 1314 is 4 KB, the NVM module 126 compares the IDs of the eight sectors with guarantee codes. The expected values of the IDs of the eight sectors with guarantee codes are generated from the expected value 1317 of the guarantee code ID. The expected value of the ID of the sector with the first guarantee code of the transfer is the expected value 1317 of the guarantee code ID, and the expected value of the ID of the next sector with the guarantee code is a value obtained by incrementing the expected value 1317 of the guarantee code ID by one. It becomes. As described above, if the read request is 4 KB, each of the eight sectors with a guarantee code is compared with an expected value obtained by adding the expected value 1317 of the guarantee code ID. In the case of the NVM module 126 according to the first embodiment, the expanded sector with a guarantee code is inspected.

 実施例1ではリードコマンドを、ストレージ装置101が、キャッシュであるNVMモジュール126に記録されたデータをボリューム(圧縮ボリューム)にデステージする時、あるいはNVMモジュール126に記録されたデータを上位装置103に転送するときに使用する。ストレージ装置101が圧縮ボリュームにデータをデステージする時、NVMモジュール126にデータを記録した時に付与した保証コードを変更する必要があるので、ストレージコントローラ110はNVMモジュール126から、変更された保証コードの付加されたデータを取得する。実施例1では、ストレージコントローラ110が圧縮したデータをNVMモジュール126からリードする際に、NVMモジュール126が圧縮データに対して新たな保証コードを付与する。NVMモジュール126はこの新たな保証コードを付与する際に、データの一貫性を保証する目的で、圧縮データをいったん伸長して保証コード付きセクタを生成した後、保証コード付きセクタの検査を行う。具体的には、伸長されたデータからCRCを生成し、伸長された保証コード付きセクタに含まれていた保証コードのCRCと比較し、両者に違いがないか確認する。さらに、伸長された保証コード付きセクタに含まれている保証コードのIDについて、保証コードIDの期待値1317と一致していることを確認する。CRCあるいはIDが一致していない場合は、ストレージ装置101のプロセッサ121にエラーを通知する。一致していた場合、圧縮データ用の新たな保証コードを付与し、この新たな保証コードの付与されたデータ(圧縮データ)をストレージコントローラ110に転送する。 In the first embodiment, a read command is sent to the host apparatus 103 when the storage apparatus 101 destages the data recorded in the cache NVM module 126 to a volume (compressed volume) or the data recorded in the NVM module 126. Used when transferring. When the storage apparatus 101 destages data to the compressed volume, it is necessary to change the guarantee code given when the data is recorded in the NVM module 126. Therefore, the storage controller 110 receives the changed guarantee code from the NVM module 126. Get the appended data. In the first embodiment, when the storage controller 110 reads the compressed data from the NVM module 126, the NVM module 126 gives a new guarantee code to the compressed data. When the NVM module 126 assigns the new guarantee code, for the purpose of guaranteeing the consistency of the data, the NVM module 126 decompresses the compressed data once to generate a sector with the guarantee code, and then checks the sector with the guarantee code. Specifically, a CRC is generated from the decompressed data, and compared with the CRC of the guarantee code included in the decompressed sector with the guarantee code, and it is confirmed whether there is a difference between the two. Further, it is confirmed that the guarantee code ID included in the decompressed sector with the guarantee code matches the expected value 1317 of the guarantee code ID. If the CRC or ID does not match, an error is notified to the processor 121 of the storage apparatus 101. If they match, a new guarantee code for compressed data is assigned, and the data (compressed data) with the new guarantee code is transferred to the storage controller 110.

 新保証コードIDの種1318は、リード時にデータに対して新たな保証コードを付けるIDを指示するフィールドである。新保証コードIDの種1318には、当該リードリクエストの先頭の保証コード付きセクタまたは保証コード圧縮付きセクタに新たに付与するIDの値を格納する。実施例1では、保証コードのIDとして6Bのデータを用いる。このため、本フィールドも6Bの種を指定する。なお、実施例1に係るNVMモジュール126の場合、LBA0/1開始アドレス1313にLBA0が指定されている場合、つまり伸長されたデータを読み出す旨の指示がされている場合、伸長されたデータの各セクタの保証コードのID部分に、新保証コードIDの種1318フィールドに格納されている値に基づいて生成されるIDを格納し、LBA0/1開始アドレス1313にLBA1が指定されている場合、圧縮データの各セクタの保証コードのID部分に、新保証コードIDの種1318フィールドに格納されている値に基づいて生成されるIDを格納する。 The new guarantee code ID type 1318 is a field for designating an ID for attaching a new guarantee code to data at the time of reading. The new guarantee code ID type 1318 stores an ID value newly assigned to the sector with guarantee code or the sector with guarantee code compression at the head of the read request. In the first embodiment, 6B data is used as the guarantee code ID. For this reason, this field also specifies the seed of 6B. In the case of the NVM module 126 according to the first embodiment, when LBA0 is specified as the LBA0 / 1 start address 1313, that is, when an instruction to read the expanded data is given, each of the expanded data An ID generated based on the value stored in the seed 1318 field of the new guarantee code ID is stored in the ID part of the guarantee code of the sector, and compression is performed when LBA1 is designated as the LBA0 / 1 start address 1313. An ID generated based on the value stored in the seed 1318 field of the new guarantee code ID is stored in the ID part of the guarantee code of each sector of the data.

 ストレージ装置101のプロセッサ121は、NVMモジュール126からのデータリード時に保証コードを変更したい場合、新保証コードIDの種をリードコマンドの新保証コードIDの種1318フィールドに格納する。指示を受けたNVMモジュール126は、データリード時に新保証コードの種1318から新たな保証コードを生成し、FMから読出した保証コード付きセクタ、または保証コード付き圧縮セクタの保証コードを変更してストレージ装置に転送する。 When the processor 121 of the storage apparatus 101 wants to change the guarantee code when reading data from the NVM module 126, it stores the new guarantee code ID seed in the new guarantee code ID seed 1318 field of the read command. Upon receiving the instruction, the NVM module 126 generates a new guarantee code from the new guarantee code seed 1318 at the time of data read, and changes the guarantee code of the sector with the guarantee code read from the FM or the compressed sector with the guarantee code to store the data. Transfer to device.

 実施例1では、LBA0/1長1104にて指定されるライトリクエストサイズが4KBの場合、NVMモジュールは、8個の新たな保証コードを新保証コードIDの種1318より生成する。具体的には、NVMモジュールは、転送の最初の保証コード付きセクタのIDを、新保証コードIDの種1318で指定された値とし、次の保証コード付きセクタのIDの期待値は、新保証コードIDの種1318で指定された値を1つインクリメントした値となる。このように、4KBのライトリクエストであれば、8個の保証コード付きセクタそれぞれに対して、新保証コードIDの種1318で指定された値に0~7の値をそれぞれ加算して生成されるIDを付与する。 In the first embodiment, when the write request size specified by the LBA 0/1 length 1104 is 4 KB, the NVM module generates eight new guarantee codes from the new guarantee code ID seed 1318. Specifically, the NVM module uses the ID of the sector with the first guarantee code for transfer as the value specified by the seed 1318 of the new guarantee code ID, and the expected ID of the sector with the next guarantee code is the new guarantee code. The value specified by the code ID seed 1318 is incremented by one. In this way, a 4 KB write request is generated by adding a value from 0 to 7 to the value specified by the new guarantee code ID seed 1318 for each of eight sectors with guarantee codes. Give an ID.

 尚、図13では、保証コードIDの期待値1317が一つのリードコマンド1310に一つ含まれる例について記すが、本発明は、この個数に限定されるものではない。本発明では、一つのリードコマンドにて指定されるリード対象データを構成する複数の保証コード付きセクタまたは、保証コード付き圧縮セクタが、連続した保証コードIDにて構成されるとは限らない。 Although FIG. 13 shows an example in which one expected value 1317 of the guarantee code ID is included in one read command 1310, the present invention is not limited to this number. In the present invention, a plurality of sectors with guarantee codes or compressed sectors with guarantee codes constituting the read target data designated by one read command are not necessarily constituted by consecutive guarantee codes ID.

 実施例1では、圧縮データをリードする際に圧縮データを伸長したデータを構成する保証コード付きセクタのID値が連続していない場合がある。例えば、実施例1では伸長ボリュームの領域Aに記録されるデータを圧縮したデータA’と伸長ボリュームの領域Bに記録されるデータを圧縮したデータB’がNVMモジュールに記録されており、NVMモジュールのLBA1空間に連続してマッピングされる場合が考えられる。この場合ストレージ装置は一つのリードコマンドにて、A’とB’を取得可能である。A’とB’のデステージ先となる圧縮ボリューム5500内のアドレスが連続の場合、A’とB’を構成する圧縮セクタに付与する保証コードのIDは、連続となるため、リードコマンドが含む新保証コードの種1318は一つで良く、新保証コードの種の値を初期値として、LBA0/1開始アドレス1313からはじまる各圧縮セクタにID値を一つづインクリメントした値を記録すればよい。しかし、このとき検査すべき、圧縮データを伸長したデータを構成する保証コード付きセクタの保証コードの期待値群は、AとBの二系統が存在する。このため、リードコマンド1310は、複数の保証コード期待値を含む場合もあり、その場合、リードコマンド1310には、A’用の保証コード期待値を適用するデータ長とB’用の保証コード期待値を適用するデータ長の情報を格納するフィールドが加えられる。 In the first embodiment, when the compressed data is read, the ID value of the sector with a guarantee code constituting the data obtained by decompressing the compressed data may not be continuous. For example, in the first embodiment, data A ′ obtained by compressing data recorded in the area A of the decompression volume and data B ′ obtained by compressing data recorded in the area B of the decompression volume are recorded in the NVM module. It is conceivable that the LBA1 space is continuously mapped. In this case, the storage apparatus can acquire A ′ and B ′ with a single read command. If the addresses in the compressed volume 5500 that is the destage destination of A ′ and B ′ are continuous, the IDs of the guarantee codes assigned to the compressed sectors constituting A ′ and B ′ are continuous, so the read command includes The number of new guarantee code seeds 1318 may be one, and a value obtained by incrementing the ID value one by one may be recorded in each compressed sector starting from the LBA 0/1 start address 1313 with the value of the new guarantee code seed as an initial value. However, there are two groups of expected values of the guarantee code of the sector with the guarantee code constituting the data obtained by decompressing the compressed data to be inspected, A and B. Therefore, the read command 1310 may include a plurality of guarantee code expected values. In this case, the read command 1310 includes a data length to which the A ′ guarantee code expected value is applied and a B ′ guarantee code expectation. A field for storing information on the data length to which the value is applied is added.

 また、リードコマンド1310は、保証コードIDの期待値を複数記載したデータ領域の先頭アドレスを示すポインタを含む場合もある。この場合、リードコマンド1310には、保証コードIDの期待値を複数記載したデータ領域のサイズを記載したフィールドも加えられる。 Further, the read command 1310 may include a pointer indicating the start address of the data area in which a plurality of expected values of the guarantee code ID are described. In this case, a field describing the size of the data area describing a plurality of expected values of the guarantee code ID is also added to the read command 1310.

 リード応答1320には、先のライト応答と同様、コマンドID1321、ステータス1322が含まれる。この内容は先に述べたライト応答と同様である。尚、本実施例では、上記の情報による応答情報の例について記すが、上記以上の付加的な情報があってもよい。 The read response 1320 includes a command ID 1321 and a status 1322 as in the previous write response. This content is the same as the write response described above. In the present embodiment, an example of response information based on the above information will be described, but there may be additional information above.

(1-9)LBA1マッピングコマンド
 図14は、本実施例におけるNVMモジュール126でサポートされる、LBA1マッピングコマンド1410と、そのLBA1マッピングコマンドに対する応答情報を模式的に示した図である。本実施例におけるNVMモジュール126では、LBA0の領域を指定してライトしたデータを、NVMモジュール126が圧縮してFM420に記録する。ストレージコントローラ110は、FM420に記録された圧縮データを圧縮状態のまま最終記憶媒体へ書き込むために、LBA1マッピングコマンド1410を用いて、LBA0とは異なるLBA1にマッピングする。
(1-9) LBA1 Mapping Command FIG. 14 is a diagram schematically showing an LBA1 mapping command 1410 supported by the NVM module 126 in this embodiment and response information for the LBA1 mapping command. In the NVM module 126 in this embodiment, the NVM module 126 compresses and writes the data written by designating the LBA 0 area to the FM 420. The storage controller 110 maps LBA1 different from LBA0 using the LBA1 mapping command 1410 in order to write the compressed data recorded in the FM 420 to the final storage medium in a compressed state.

 本実施例におけるNVMモジュール126のLBA1マッピングコマンド1410は、コマンド情報として、オペレーションコード1411、コマンドID1412、LBA0開始アドレス1413、LBA0長1414、LBA1開始アドレス1415、により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。 The LBA1 mapping command 1410 of the NVM module 126 in the present embodiment is composed of an operation code 1411, a command ID 1412, an LBA0 start address 1413, an LBA0 length 1414, and an LBA1 start address 1415 as command information. In this embodiment, an example of a command based on the above information will be described, but there may be additional information above.

 LBA0開始アドレス1413は、LBA1に圧縮データをマッピングする対象データのLBA0領域を指定する先頭アドレスを指定するフィールドである。LBA0長1414は、LBA1へのマッピング対象となるLBA0開始アドレス1413から始まるLBA0の範囲を指定するフィールドである。なお、圧縮データサイズ取得コマンドと同様、LBA0開始アドレス1413とLBA0長1414は、8セクタ(4KB)の倍数に限定される。 The LBA 0 start address 1413 is a field for designating a head address for designating the LBA 0 area of the target data for mapping the compressed data to the LBA 1. The LBA0 length 1414 is a field for designating a range of LBA0 starting from the LBA0 start address 1413 to be mapped to LBA1. As with the compressed data size acquisition command, the LBA 0 start address 1413 and the LBA 0 length 1414 are limited to multiples of 8 sectors (4 KB).

 LBA1開始アドレス1415は、マッピングするLBA1の開始アドレスを指定するフィールドである。ストレージコントローラ110のプロセッサ121は、マッピングするデータのデータサイズ(圧縮された時のデータサイズ)、及びマッピング可能なLBA1空間上領域(他のデータがマッピングされていないLBA1空間上領域)の情報を管理しており、この情報をもとにして、マッピング対象のデータをマッピング可能なLBA1空間上領域の先頭アドレスをLBA1開始アドレス1415フィールドに格納して、当該コマンドをNVMモジュール126に発行する。なお、LBA1開始アドレス1415を複数指定するような仕様を採用する、つまりLBA0開始アドレス1413とLBA0長1414で特定されるLBA0空間の領域が、離散的なLBA1空間上領域にマッピングされるような構成をとることも可能である。 The LBA1 start address 1415 is a field for designating the start address of LBA1 to be mapped. The processor 121 of the storage controller 110 manages the data size of the data to be mapped (data size when compressed) and the information on the LBA1 space area that can be mapped (the LBA1 space area where other data is not mapped). Based on this information, the head address of the area on the LBA1 space where the mapping target data can be mapped is stored in the LBA1 start address 1415 field, and the command is issued to the NVM module 126. It is to be noted that a specification that specifies a plurality of LBA1 start addresses 1415 is adopted, that is, a configuration in which an LBA0 space area specified by an LBA0 start address 1413 and an LBA0 length 1414 is mapped to a discrete LBA1 space area. It is also possible to take

 NVMモジュール126は、前述のLBA0開始アドレス1413とLBA0長1414が示す範囲のLBA0空間に対応づけられている圧縮データを、LBA1開始アドレス1415から、圧縮データサイズ分の領域に渡ってマッピングを行う。より具体的には、LBA0-PBA変換テーブルを参照し、LBA0開始アドレス1413とLBA0長1414が示す範囲のLBA0空間に対応付けられたPBA(NVMモジュールPBA812)を取得する。そして、LBA1-PBA変換テーブルを参照し、LBA1開始アドレス1415から、取得したPBAの総サイズと同サイズとなるLBA1範囲(NVMモジュールLBA1(821)で特定されるエントリ)のPBA822に取得したPBAのアドレスを記入する。 The NVM module 126 maps the compressed data associated with the LBA0 space in the range indicated by the LBA0 start address 1413 and the LBA0 length 1414 from the LBA1 start address 1415 over an area corresponding to the compressed data size. More specifically, the PBA (NVM module PBA812) associated with the LBA0 space in the range indicated by the LBA0 start address 1413 and the LBA0 length 1414 is acquired by referring to the LBA0-PBA conversion table. Then, referring to the LBA1-PBA conversion table, from the LBA1 start address 1415, the PBA acquired in the PBA 822 in the LBA1 range (entry specified by the NVM module LBA1 (821)) is the same size as the total size of the acquired PBA. Enter the address.

 LBA1マッピング応答1420は、コマンドID1421、ステータス1422、により構成される。尚、本実施例では、上記の情報による応答情報の例について記すが、上記以上の付加的な情報があってもよい。 The LBA1 mapping response 1420 includes a command ID 1421 and a status 1422. In the present embodiment, an example of response information based on the above information will be described, but there may be additional information above.

(1-10)LBA0マッピングコマンド
 実施例1に係るストレージ装置101では、最終記憶装置に格納されたデータに対するリード要求を上位装置103から受け取ると、最終記憶装置からデータ(圧縮データ)を読み出して、NVMモジュール126の提供するLBA1空間上領域を指定してライトする。ただし、NVMモジュール126のLBA1空間上に格納された圧縮データは、上位装置103に伸長された状態で転送される必要があるので、LBA0マッピングコマンドはその時に用いられる。
(1-10) LBA0 Mapping Command When the storage apparatus 101 according to the first embodiment receives a read request for data stored in the final storage device from the upper level apparatus 103, it reads the data (compressed data) from the final storage device, An area on the LBA1 space provided by the NVM module 126 is designated and written. However, since the compressed data stored in the LBA1 space of the NVM module 126 needs to be transferred in an expanded state to the upper apparatus 103, the LBA0 mapping command is used at that time.

 図15は、本実施例におけるNVMモジュール126がサポートするLBA0マッピングコマンドと、当該LBA0マッピングコマンドへの応答情報を示した図である。本実施例におけるNVMモジュール126のLBA0マッピングコマンド1510は、コマンド情報として、オペレーションコード1511、コマンドID1512、LBA1開始アドレス1513、LBA1長1514、LBA0開始アドレス1515、により構成される。尚、本実施例では、上記の情報によるコマンドの例について記すが、上記以上の付加的な情報があってもよい。 FIG. 15 is a diagram showing an LBA0 mapping command supported by the NVM module 126 in this embodiment and response information to the LBA0 mapping command. The LBA0 mapping command 1510 of the NVM module 126 in the present embodiment is configured by an operation code 1511, a command ID 1512, an LBA1 start address 1513, an LBA1 length 1514, and an LBA0 start address 1515 as command information. In this embodiment, an example of a command based on the above information will be described, but there may be additional information above.

 LBA1開始アドレス1513は、マッピング対象となる圧縮データのLBA1空間の範囲の先頭アドレスを指定するフィールドである。LBA1長1514は、LBA0へのマッピング対象となるLBA1開始アドレス1513から始まるLBA1空間の範囲を指定するフィールドである。 The LBA1 start address 1513 is a field for designating the start address of the range of the LBA1 space of the compressed data to be mapped. The LBA1 length 1514 is a field for designating the range of the LBA1 space starting from the LBA1 start address 1513 to be mapped to LBA0.

 LBA0開始アドレス1515は、マッピングするLBA0の開始アドレスを指定するフィールドである。ストレージコントローラ110は、自身が管理するNVMモジュール126内にキャッシュしているデータの管理情報により、LBA0/1空間の使用状態を管理しているので、それをもとに、マッピング可能なLBA0の領域を確保し、この先頭アドレスをLBA0開始アドレス1515に記入する。なお、LBA0開始アドレス1515に指定できるアドレスは、8セクタ(4KB)の倍数に限定される。 The LBA 0 start address 1515 is a field for designating the start address of LBA 0 to be mapped. Since the storage controller 110 manages the usage state of the LBA0 / 1 space based on the management information of the data cached in the NVM module 126 managed by the storage controller 110, the LBA0 area that can be mapped based on the management status And the start address is written in the LBA 0 start address 1515. The address that can be specified as the LBA0 start address 1515 is limited to a multiple of 8 sectors (4 KB).

 NVMモジュール126は、ストレージコントローラ110からLBA0マッピングコマンドを受け付けると、前述のLBA1開始アドレス1513とLBA1長1514が示す範囲のLBA1空間に対応づけられている圧縮データを、LBA0開始アドレス1515から伸長後のデータサイズ分の領域に渡ってマッピングを行う。より具体的には、LBA1-PBA変換テーブルを参照し、LBA1開始アドレス1513とLBA1長1514が示す範囲のLBAに対応付けられたPBAを取得する。そして、LBA0-PBA変換テーブルを参照し、LBA0開始アドレス1515から、圧縮データの伸長後のサイズと同サイズとなるLBA0範囲のPBA822に、取得したPBAのアドレスを記入する。 When the NVM module 126 receives the LBA0 mapping command from the storage controller 110, the compressed data associated with the LBA1 space in the range indicated by the LBA1 start address 1513 and the LBA1 length 1514 is expanded from the LBA0 start address 1515. Mapping is performed over the area for the data size. More specifically, the PBA associated with the LBA in the range indicated by the LBA1 start address 1513 and the LBA1 length 1514 is acquired by referring to the LBA1-PBA conversion table. Then, referring to the LBA0-PBA conversion table, the address of the acquired PBA is entered from the LBA0 start address 1515 into the PBA822 in the LBA0 range that is the same size as the decompressed size of the compressed data.

 LBA0マッピング応答1520は、その他のコマンドの応答情報と共通の情報(コマンドID1521、ステータス1522)のみを含むものであるため、説明は省略する。なお、共通の情報以外の付加的な情報がLBA0マッピング応答1520に含まれている構成でもよい。 The LBA 0 mapping response 1520 includes only information common to other command response information (command ID 1521, status 1522), and thus description thereof is omitted. A configuration in which additional information other than the common information is included in the LBA 0 mapping response 1520 may be used.

(1-11)ストレージ装置の動作:ライト動作(キャッシュ格納まで)
 続いて、本発明の実施例1に係るストレージ装置101が実施するライト処理について図17を用いて説明する。ストレージ装置101は上位装置103より、伸長ボリュームの領域を指定したライト要求と、当該ライト要求でライト対象となるデータ(ライトデータ)を取得し、ライトデータをキャッシュ(NVMモジュール126)へ格納後、上位装置103にライト完了応答を転送する。ライト動作の最初のステップS1501は、ストレージ装置101が上位装置よりライト要求を受領するステップである。ストレージ装置101のプロセッサ121は、ホストインターフェース124より、上位装置103からの要求があることを通知され、ホストインターフェース124より通知される情報から、ライト要求であることを認識し、ライト要求のデータサイズ、ライト要求のアドレスを取得する。
(1-11) Storage device operation: Write operation (up to cache storage)
Subsequently, a write process performed by the storage apparatus 101 according to the first embodiment of the present invention will be described with reference to FIG. The storage apparatus 101 obtains the write request designating the expansion volume area and the write target data (write data) from the higher level apparatus 103 and stores the write data in the cache (NVM module 126). A write completion response is transferred to the host device 103. The first step S1501 of the write operation is a step in which the storage apparatus 101 receives a write request from the host apparatus. The processor 121 of the storage apparatus 101 is notified from the host interface 124 that there is a request from the host apparatus 103, and recognizes that it is a write request from the information notified from the host interface 124, and the data size of the write request Get the address of the write request.

 ステップS1501より続くステップS1502では、ストレージ装置101のプロセッサ121がライトデータ格納用のキャッシュ領域を確保する。プロセッサ121は、NVMモジュール126の記憶空間の使用状況の情報、具体的にはNVMモジュール126のLBA0空間上/LBA1空間上のデータを格納した領域、及び当該領域に格納されたデータに対応する伸長ボリュームまたは圧縮ボリュームのアドレスについての情報をDRAM125に管理しており、以下、この情報の事をキャッシュ情報と呼ぶ。プロセッサ121は、キャッシュ情報を参照し、NVMモジュール126のLBA0空間上の、まだデータを格納していない領域の中から、S1501にて取得したライト要求で指定されているライトデータサイズ以上の領域を確保する。この確保処理とは、周知のストレージ装置が行う、ディスクキャッシュの確保処理と同様であるため、詳細な説明は省略するが、ライトデータ格納用の領域(LBA0空間上領域)を他の処理によって使用されないようにロックし、キャッシュ情報の内容を更新する処理である。 In step S1502 following step S1501, the processor 121 of the storage apparatus 101 secures a cache area for storing write data. The processor 121 stores information on the usage status of the storage space of the NVM module 126, specifically, an area storing data on the LBA0 space / LBA1 space of the NVM module 126, and decompression corresponding to the data stored in the area. Information about the address of the volume or the compressed volume is managed in the DRAM 125, and this information is hereinafter referred to as cache information. The processor 121 refers to the cache information, and selects an area on the LBA0 space of the NVM module 126 that is not larger than the write data size specified by the write request acquired in S1501 from the area that has not yet stored data. Secure. This securing process is the same as the disk cache securing process performed by a well-known storage device, so detailed description will be omitted, but the write data storage area (LBA0 space area) is used by other processes. This is a process of locking so as not to be performed and updating the contents of the cache information.

 ステップS1502より続くステップS1503では、ストレージ装置101のプロセッサ121が、ホストインターフェース124にライトデータの取得を指示する。この時プロセッサ121は、ホストインターフェース124にデータ転送を指示するとともに、上位装置103からライトコマンドで指定された伸長ボリューム内のライト先アドレス(LBA)を保証コードIDの種として通知する。データ転送を指示されたホストインターフェース124は、上位装置103よりライトデータを取得し、データを512B(実施例1における1セクタ分のサイズ)ごとに分割する。そして、512Bのデータから2BのCRCを生成する。また、プロセッサ121より指示された保証コードIDの種から、分割された512Bの各データ用の6BのIDを生成する。最後にホストインターフェース124は、2BのCRCと6BのIDを合わせた8BのIDを512Bの各データにそれぞれ付与し、520Bの保証コード付きセクタを生成しストレージ装置101のDRAM125に転送する。尚、実施例1では、ホストインターフェース124のデータをストレージ装置101のDRAM125を経由してNVMモジュール126に転送する例について示すが、本発明はこの転送経路に限定されるものではない。例えば、ホストインターフェース124から直接NVMモジュール126に転送されるようにしてもよい。 In step S1503 following step S1502, the processor 121 of the storage apparatus 101 instructs the host interface 124 to acquire write data. At this time, the processor 121 instructs the host interface 124 to transfer data, and notifies the write destination address (LBA) in the decompressed volume designated by the write command from the higher level device 103 as the seed of the guarantee code ID. The host interface 124 that has been instructed to transfer data acquires write data from the host device 103 and divides the data by 512B (size of one sector in the first embodiment). Then, a 2B CRC is generated from the 512B data. Further, a 6B ID for each divided 512B data is generated from the type of guarantee code ID instructed by the processor 121. Finally, the host interface 124 assigns an 8B ID, which is a combination of the 2B CRC and the 6B ID, to each 512B data, generates a sector with a 520B guarantee code, and transfers it to the DRAM 125 of the storage apparatus 101. The first embodiment shows an example in which the data of the host interface 124 is transferred to the NVM module 126 via the DRAM 125 of the storage apparatus 101, but the present invention is not limited to this transfer path. For example, it may be transferred directly from the host interface 124 to the NVM module 126.

 ステップS1503より続くステップS1504では、ストレージ装置101のプロセッサ121がNVMモジュール126にデータのライトを指示する。より具体的には、プロセッサ121が、ライトコマンド1210を用いてNVMモジュール126にライトを指示する。この時、ライトコマンド1210には、保証コードIDの期待値1217として上位装置103が指定した伸長ボリューム内アドレスの下位6Bが与えられる。また、新保証コードIDの種1218のフィールドは、無効であることを通知する値が記入される。 In step S1504 following step S1503, the processor 121 of the storage apparatus 101 instructs the NVM module 126 to write data. More specifically, the processor 121 instructs the NVM module 126 to write using the write command 1210. At this time, the write command 1210 is given the lower 6B of the decompressed volume address designated by the upper device 103 as the expected value 1217 of the guarantee code ID. In the field of the new guarantee code ID seed 1218, a value notifying that it is invalid is entered.

 ステップS1504より続くステップS1505では、ライトコマンド1210を受領したNVMモジュール126が、S1504にて指示されたライトコマンドの情報に従って、ストレージ装置101のDRAM125よりデータを取得し、そのデータを構成する保証コード付きセクタの保証コードを用いて、データの検査を行う。具体的には、データと保証コードのCRCを用いてデータにエラービットが発生していないことを確認する。そして、保証コードのIDの値が、ライトコマンド1210の保証コードIDの期待値1217から生成した各保証コード付きセクタの期待値と一致していることを確認する。このとき、NVMモジュール126がCRCのエラーまたは保証コードID期待値の不一致を検出した場合、ストレージ装置101のプロセッサ121にエラーを通知する。この通知を受けたストレージ装置101は、障害時用の処理(たとえば上位装置103にエラーを通知し、ライト処理を中止する等)を行う。一方で、NVMモジュール126がCRCのエラー及び保証コードIDの不一致を検出しなかった場合、NVMモジュール126は、ストレージ装置101の意図したライトデータと判断し、ライトデータをデータ圧縮/伸長ユニット418にて圧縮して記録する。 In step S1505 following step S1504, the NVM module 126 that has received the write command 1210 acquires data from the DRAM 125 of the storage apparatus 101 according to the write command information instructed in S1504, and includes a guarantee code that constitutes the data Data is inspected using the sector guarantee code. Specifically, it is confirmed by using the CRC of the data and the guarantee code that no error bit has occurred in the data. Then, it is confirmed that the ID value of the guarantee code matches the expected value of each sector with a guarantee code generated from the expected value 1217 of the guarantee code ID of the write command 1210. At this time, if the NVM module 126 detects a CRC error or a mismatch of the expected guarantee code ID value, it notifies the processor 121 of the storage apparatus 101 of the error. Receiving this notification, the storage apparatus 101 performs a process for failure (for example, notifying the host apparatus 103 of an error and canceling the write process). On the other hand, if the NVM module 126 does not detect a CRC error and a guarantee code ID mismatch, the NVM module 126 determines that the write data is intended for the storage apparatus 101 and sends the write data to the data compression / decompression unit 418. Compress and record.

 ステップS1505より続くステップS1506では、ストレージ装置101のプロセッサ121が、NVMモジュール126より、ライトにて記録したデータの圧縮後のサイズを取得する。より具体的には、NVMモジュール126より転送されるライト応答情報1220の圧縮データ長1223を参照することで圧縮後のサイズを取得する。圧縮後のサイズを取得したプロセッサ121は、後のデステージ動作にて、圧縮データを圧縮ボリュームに転送するために、キャッシュ情報に、ライトデータを記録したNVMモジュール126のLBA0アドレスと伸長ボリュームのアドレスとこの圧縮データ長とを対応付けて管理する。 In step S1506 following step S1505, the processor 121 of the storage apparatus 101 acquires the compressed size of the data recorded by writing from the NVM module 126. More specifically, the compressed size is acquired by referring to the compressed data length 1223 of the write response information 1220 transferred from the NVM module 126. The processor 121 that has acquired the size after compression uses the LBA0 address of the NVM module 126 that recorded the write data in the cache information and the address of the decompression volume in order to transfer the compressed data to the compressed volume in a later destage operation. And the compressed data length are managed in association with each other.

 ステップS1506より続くステップS1507では、ストレージ装置101が上位装置103に対してライトが完了したことを通知する。 In step S1507 following step S1506, the storage apparatus 101 notifies the higher level apparatus 103 that the writing has been completed.

 以上が実施例1におけるライト動作である。 The above is the write operation in the first embodiment.

(1-12)ストレージ装置の動作:デステージ動作
 続いて実施例1のデステージ動作について説明する。実施例1のストレージ装置101は、図17にて示したライト処理によるNVMモジュール126へのライトデータの書き込みが一定量なされると、ライトデータを一時的に格納可能なNVMモジュール126のLBA0空間の領域が減少する。実施例1のストレージ装置101は、NVMモジュール126のLBA0空間の領域が一定量まで減少したことを契機に、NVMモジュール126のデータを圧縮ボリュームに転送するデステージ動作を行う。
(1-12) Operation of Storage Device: Destage Operation Next, the destage operation of the first embodiment will be described. When the write data is written to the NVM module 126 by the write process shown in FIG. 17, the storage apparatus 101 according to the first embodiment stores the write data in the LBA0 space of the NVM module 126 that can temporarily store the write data. The area decreases. The storage apparatus 101 according to the first embodiment performs a destage operation of transferring the data of the NVM module 126 to the compression volume when the area of the LBA0 space of the NVM module 126 has decreased to a certain amount.

 図18は、この実施例1のデステージ動作を示したフロー図である。 FIG. 18 is a flowchart showing the destage operation of the first embodiment.

 デステージ動作の最初のステップであるS1601は、デステージ対象のデータを決定するステップである。実施例1のストレージ装置101は、キャッシュであるNVMモジュール126に格納された各データについて、上位装置103からの最終アクセス時刻を管理している。また、デステージ対象のデータの決定には、LRU(Least Recently Used)アルゴリズムを用いる。このため、プロセッサ121は、NVMモジュール126に格納された各データのなかから、最終アクセス時刻の古いデータから順に、デステージ対象のデータとして選択する。 S1601, which is the first step of the destage operation, is a step of determining data to be destaged. The storage apparatus 101 according to the first embodiment manages the last access time from the higher level apparatus 103 for each data stored in the NVM module 126 that is a cache. In addition, an LRU (Least Recently Used) algorithm is used to determine data to be destaged. For this reason, the processor 121 selects the data stored in the NVM module 126 as data to be destaged in order from the data with the oldest access time.

 S1601より続くステップS1602では、S1601にて決定したデステージ対象データの圧縮後のデータサイズを取得する。プロセッサ121は、ライト動作におけるS1506にて圧縮データ長を記録したキャッシュ情報から、NVMモジュール126のLBA0空間に記録されたデステージ対象のデータの、圧縮後のデータ長を取得する。 In step S1602 following S1601, the post-compression data size of the destage target data determined in S1601 is acquired. The processor 121 acquires the compressed data length of the destage target data recorded in the LBA0 space of the NVM module 126 from the cache information in which the compressed data length is recorded in S1506 in the write operation.

 S1602より続くステップS1603は、ライトデータのデステージ先となる圧縮ボリュームの領域を確保するステップである。実施例1におけるストレージ装置101はライトデータを格納する(デステージする)際、圧縮ボリュームの先頭アドレスから追記書き込みを行う。そのため、ストレージ装置101は、圧縮ボリュームにデステージ処理を行うたびに、デステージ対象データの書き込まれた圧縮ボリューム上の終端アドレスの次のアドレスを、次回書き込み開始位置として記憶している。S1603では、圧縮ボリューム上の次回書き込み開始位置から、S1602にて取得したデステージ対象データの圧縮後のデータ長の領域を確保する。実施例1に係るストレージ装置101では、この時点ではじめて、ライトデータ(デステージ対象データ)が格納される圧縮ボリューム上の位置(アドレス)が決定される。また、圧縮ボリュームが複数の最終記憶装置から構成される、いわゆる論理ボリュームである場合、ここで決定される圧縮ボリューム上のアドレスと、実際にライトデータの格納される最終記憶装置上のアドレスとは必ずしも同一ではないが、圧縮ボリューム上のアドレスと最終記憶装置上のアドレスの関係は固定的に定められているので、圧縮ボリューム上のアドレスが定まると、最終記憶装置上のアドレスも一意に定まる。そのため、ライトデータが格納される圧縮ボリューム上の位置(アドレス)が決定されるということは、最終記憶装置上のアドレスが決定されるということと等価である。 Step S1603 following S1602 is a step of securing a compressed volume area that is a destage destination of the write data. When the storage apparatus 101 according to the first embodiment stores (destages) write data, the storage apparatus 101 performs additional writing from the head address of the compressed volume. Therefore, whenever the destaging process is performed on the compressed volume, the storage apparatus 101 stores the next address after the end address on the compressed volume in which the destage target data is written as the next write start position. In S1603, the area of the data length after compression of the destage target data acquired in S1602 is secured from the next write start position on the compression volume. In the storage apparatus 101 according to the first embodiment, the position (address) on the compressed volume in which write data (destage target data) is stored is determined for the first time at this point. If the compressed volume is a so-called logical volume composed of a plurality of final storage devices, the address on the compressed volume determined here and the address on the final storage device where the write data is actually stored are Although not necessarily the same, since the relationship between the address on the compressed volume and the address on the final storage device is fixedly determined, when the address on the compressed volume is determined, the address on the final storage device is also uniquely determined. Therefore, the determination of the position (address) on the compressed volume where the write data is stored is equivalent to the determination of the address on the final storage device.

 またプロセッサ121は、伸長ボリューム上の(仮想的な)格納先アドレス(上位装置103がライト要求で指定した伸長ボリューム上アドレス)と圧縮ボリューム上の格納先アドレスとの対応関係の情報をDRAM125に管理している(以下、この情報をボリューム間マッピング情報と呼ぶ)。S1603でプロセッサ121は、デステージ対象データについて、伸長ボリューム上の(仮想的な)格納先アドレスとデステージ対象データが格納される圧縮ボリューム上の格納先アドレスとの対応関係を、ボリューム間マッピング情報に記録する処理も行う。このボリューム間マッピング情報は、ストレージ装置101が上位装置103からデータリード要求を受け付けたときに、リード対象データの圧縮ボリューム(最終記憶装置)上の格納アドレスを特定するために用いられる。 Further, the processor 121 manages, in the DRAM 125, information on the correspondence between the (virtual) storage destination address on the decompression volume (the decompression volume address specified by the host apparatus 103 in the write request) and the storage destination address on the compression volume. (Hereinafter, this information is referred to as inter-volume mapping information). In S1603, for the destage target data, the processor 121 determines the correspondence between the (virtual) storage destination address on the decompressed volume and the storage destination address on the compressed volume in which the destage target data is stored. The process of recording is also performed. This inter-volume mapping information is used to specify the storage address of the read target data on the compressed volume (final storage device) when the storage apparatus 101 receives a data read request from the host apparatus 103.

 S1603より続くステップS1604では、NVMモジュール126のLBA0空間上領域に記録されたデステージ対象データの圧縮後のデータを、NVMモジュール126のLBA1空間にマッピングする。先に述べたとおり、ストレージ装置101のプロセッサ121は、NVMモジュール126の記憶空間の使用状況の情報をキャッシュ情報として管理しているので、プロセッサ121はこのキャッシュ情報を参照し、確保可能な(まだ圧縮データが対応付けられていない未使用の)LBA1空間上領域を取得する。そしてLBA1マッピングコマンド1410をNVMモジュール126に対して発行することにより、圧縮データを当該取得したLBA1空間上領域に対応づける。尚、実施例1では、ストレージ装置がデステージ時に、圧縮データをNVMモジュール126から取得する(読み出す)ために、LBA0空間とは独立したLBA1空間にマッピングして、LBA1空間上データ(圧縮データ)を読み出す方式を採っているが、本発明はこの方式に限定されるものではない。たとえばライト時と同じLBA0空間上アドレスを指定し、圧縮データを、伸長せずにストレージ装置に転送する方式であっても良い。このLBA0アドレスのみを使って圧縮データを取得する場合、S1604は不要となる。 In step S1604 following S1603, the compressed data of the destage target data recorded in the area on the LBA0 space of the NVM module 126 is mapped to the LBA1 space of the NVM module 126. As described above, since the processor 121 of the storage apparatus 101 manages the information on the usage status of the storage space of the NVM module 126 as cache information, the processor 121 can be secured by referring to this cache information (yet An unused (unused) LBA1 space area that is not associated with compressed data is acquired. Then, by issuing an LBA1 mapping command 1410 to the NVM module 126, the compressed data is associated with the acquired area on the LBA1 space. In the first embodiment, when the storage device is destaged, in order to acquire (read) the compressed data from the NVM module 126, it is mapped to the LBA1 space independent of the LBA0 space, and the data on the LBA1 space (compressed data) However, the present invention is not limited to this method. For example, the same LBA0 space address as that at the time of writing may be specified, and the compressed data may be transferred to the storage device without being decompressed. When acquiring compressed data using only this LBA0 address, S1604 is not necessary.

 S1604より続くステップS1605は、ストレージコントローラ110が、S1604にてマッピングしたLBA1空間上領域から圧縮データを取得するステップである。このステップは、実施例1の特徴的な動作な為、以下で詳細に処理の流れを説明する。 Step S1605 following S1604 is a step in which the storage controller 110 acquires compressed data from the area on the LBA1 space mapped in S1604. Since this step is a characteristic operation of the first embodiment, the process flow will be described in detail below.

 S1605ではまず、プロセッサ121は圧縮データを取得する為、リードコマンド1310をNVMモジュール126に発行する。このリードコマンドは、リード対象データを示すLBA1開始アドレス1313、LBA1長1314の他に、検査すべき保証コードIDの期待値1317とリードデータを構成する圧縮セクタに新たに付与する新保証コードIDの種1318を含んでいる。実施例1では、プロセッサ121がデステージ対象とするデータ(NVMモジュール126のLBA0空間上領域に格納されている)を決定した後、キャッシュ情報を参照し、当該データの、伸長ボリューム上の(仮想的な)格納先アドレス(上位装置103がライト要求で指定した伸長ボリューム上アドレス)を取得し、このアドレスの下位6Bを、検査すべき保証コードIDの期待値とする。また、実施例1では、リードデータを構成する圧縮セクタに付与する保証コードのIDの種として、ステップS1603にて確保した圧縮ボリューム内の領域の先頭アドレスの下位6Bを用いる。続いて、当該リードコマンドを受信したNVMモジュール126が実行する処理の流れを図19を用いて説明する。 In S1605, first, the processor 121 issues a read command 1310 to the NVM module 126 in order to acquire compressed data. In addition to the LBA1 start address 1313 and the LBA1 length 1314 indicating the read target data, the read command includes an expected value 1317 of the guarantee code ID to be inspected and a new guarantee code ID to be newly assigned to the compressed sector constituting the read data. Contains seed 1318. In the first embodiment, after the processor 121 determines data to be destaged (stored in the area on the LBA0 space of the NVM module 126), the cache information is referred to and the data on the decompressed volume (virtual The storage destination address (the decompressed volume address specified by the upper apparatus 103 in the write request) is acquired, and the lower 6B of this address is set as the expected value of the guarantee code ID to be checked. In the first embodiment, the lower 6B of the start address of the area in the compressed volume secured in step S1603 is used as the ID of the guarantee code ID assigned to the compressed sector constituting the read data. Next, the flow of processing executed by the NVM module 126 that has received the read command will be described with reference to FIG.

 S1701にてNVMモジュール126のプロセッサ415は、ストレージコントローラ110のプロセッサ121が発行したリードコマンド1310を取得する。続くステップS1702にてプロセッサ415は、リードコマンド1310のLBA1開始アドレス1313、LBA1長1314で指定されたLBA1領域に対応付けられたデータをFM420から取得し、データバッファ416に格納する。なお、取得対象データがFM420ではなくデータバッファ416に存在する場合もありえ(これは、図17を用いて説明した、上位装置103から受け付けたデータのライト処理において、ストレージコントローラ110がNVMモジュール126に対してライトコマンドを発行することによりデータの書き込みを指示した後、NVMモジュール126が当該データをいったんデータバッファ416に格納したが、それをFM420へと書き込む前に、プロセッサ121から当該データを取得するためのリードコマンドを受信した場合が該当する)、その場合にはFM420からデータを取得する処理は行われない。 In S1701, the processor 415 of the NVM module 126 acquires the read command 1310 issued by the processor 121 of the storage controller 110. In step S1702, the processor 415 obtains data associated with the LBA1 area designated by the LBA1 start address 1313 and the LBA1 length 1314 of the read command 1310 from the FM 420 and stores the data in the data buffer 416. Note that the acquisition target data may exist not in the FM 420 but in the data buffer 416 (this is because the storage controller 110 in the NVM module 126 in the data write processing received from the host apparatus 103 described with reference to FIG. 17). The NVM module 126 temporarily stores the data in the data buffer 416 after issuing an instruction to write data by issuing a write command, but acquires the data from the processor 121 before writing the data to the FM 420. In this case, the process of acquiring data from the FM 420 is not performed.

 ステップS1702の次の、ステップS1703から少なくともステップS1707までは、NVMモジュール126のプロセッサ415が途中で介在することなく、データ圧縮/伸長ユニット418が一連の処理として実施する。ステップS1702の後、プロセッサ415は、データ圧縮/伸長ユニット418に対して、S1703からステップS1708までを連続して実行するように指示する。 From step S1703 to at least step S1707 following step S1702, the data compression / decompression unit 418 performs as a series of processes without the processor 415 of the NVM module 126 being intervened. After step S1702, the processor 415 instructs the data compression / decompression unit 418 to continuously execute steps S1703 to S1708.

 指示を受けたデータ圧縮/伸長ユニット418は、ステップS1703で取得データを伸長することによって、保証コード付きセクタを生成する。 The data compression / decompression unit 418 that has received the instruction generates a sector with a guarantee code by decompressing the acquired data in step S1703.

 ステップS1703より続くステップS1704は、S1703にて生成した伸長データについて保証コードの検査を行うステップである。具体的には、データ圧縮/伸長ユニット418が、伸長データである保証コード付きセクタのCRCを用いて保証コード付きセクタに誤りが生じていないことを確認し、圧縮データが正確に伸長可能なことを確認する。さらに、保証コードのIDがコマンドに付与された保証コードIDの期待値1317と一致しているか確認して、ストレージ装置101のプロセッサ121よりリード要求された圧縮データが、ストレージ装置101が想定するデータの圧縮データであることを確認する。 Step S1704 following step S1703 is a step of checking the guarantee code for the decompressed data generated in S1703. Specifically, the data compression / decompression unit 418 confirms that no error has occurred in the sector with the guarantee code using the CRC of the sector with the guarantee code that is the decompressed data, and the compressed data can be decompressed correctly. Confirm. Further, it is confirmed whether the guarantee code ID matches the expected value 1317 of the guarantee code ID given to the command, and the compressed data requested to be read from the processor 121 of the storage apparatus 101 is the data assumed by the storage apparatus 101. Confirm that it is compressed data.

 ステップS1704より続くステップS1705では、S1704での比較結果により分岐するステップである。伸長データを構成する保証コード付きセクタの保証コードIDがリードコマンドに付与された保証コードIDの期待値1317と一致している場合、S1706に遷移する。一方で、不一致であった場合、ストレージの制御が誤っているとしてエラーをストレージ装置101のプロセッサ121に転送する。 In step S1705 following step S1704, the process branches according to the comparison result in step S1704. If the guarantee code ID of the sector with the guarantee code constituting the decompressed data matches the expected value 1317 of the guarantee code ID given to the read command, the process proceeds to S1706. On the other hand, if they do not match, the error is transferred to the processor 121 of the storage apparatus 101 because the storage control is incorrect.

 ステップS1705より遷移するステップS1706は、デステージ対象データがストレージの意図したデータであることが確認された圧縮データに対して保証コードをの情報を生成するステップである。データ圧縮/伸長ユニット418は、圧縮データを512バイト毎に分割して圧縮セクタを生成し、続いて各圧縮セクタのデータから2BのCRCを生成する。さらに、リードコマンドに付与された新保証コードIDの種1318より、各圧縮セクタのIDを生成する。 Step S1706, which transitions from step S1705, is a step of generating guarantee code information for the compressed data for which it is confirmed that the destage target data is the data intended by the storage. The data compression / decompression unit 418 generates a compressed sector by dividing the compressed data every 512 bytes, and then generates a 2B CRC from the data of each compressed sector. Further, the ID of each compressed sector is generated from the seed 1318 of the new guarantee code ID given to the read command.

 続くステップS1707では、データ圧縮/伸長ユニット418が、S1706にて生成した圧縮セクタ用のCRCとIDを圧縮セクタに付与し、保証コード付き圧縮セクタを生成する。 In subsequent step S1707, the data compression / decompression unit 418 adds the CRC and ID for the compression sector generated in S1706 to the compression sector, and generates a compression sector with a guarantee code.

 続くステップS1708では、プロセッサ415はS1707にて生成した保証コード付き圧縮セクタをストレージコントローラ110に転送する。 In subsequent step S1708, the processor 415 transfers the compressed sector with the guarantee code generated in S1707 to the storage controller 110.

 続くステップS1709では、プロセッサ415は、ストレージコントローラ110のプロセッサ121にリードコマンドが完了したことを通知する。 In subsequent step S1709, the processor 415 notifies the processor 121 of the storage controller 110 that the read command has been completed.

 以上図19に示した各ステップを経ることで、ストレージ装置101は、圧縮した状態で格納されているデステージ対象データが、自身がアクセスを要求したデータであり、かつデータ内容にエラーが生じていないことを確認するとともに、デステージ対象データの圧縮後のデータが伸長可能であることを確認できる。そして、圧縮ボリュームに記録する保証コード付き圧縮セクタに対して希望する保証コードを付与できる。 Through the steps shown in FIG. 19, the storage apparatus 101 has stored the destage target data stored in the compressed state as the data that it requested access to, and the data content has an error. It can be confirmed that the data after compression of the destage target data can be expanded. A desired guarantee code can be assigned to the compressed sector with the guarantee code recorded in the compressed volume.

 図18の説明に戻る。ステップS1605より続くステップS1606では、ストレージ装置101のプロセッサ121が、S1605にて取得した保証コード付き圧縮セクタにより構成される圧縮データを圧縮ボリューム5500に記録する。より具体的には、プロセッサ121はディスクインターフェース123を制御して、圧縮ボリュームを構成する1以上の最終記憶装置(SSD111またはHDD112)に対して圧縮データを転送する。この時、プロセッサ121は、ディスクインターフェース123に対して、転送データの保証コードIDの期待値を通知する。この期待値は、圧縮ボリューム上のアドレス(LBA)の下位6Bである。指示を受けたディスクインターフェース123は、転送データを構成する保証コード付き圧縮セクタの保証コードのCRCを検査してエラービットが生じていないことを確認した後、保証コードのIDとプロセッサ121から通知された保証コードのIDの期待値とを比較して一致していることを確認した後、最終記憶装置であるSSD111またはHDD112にデータを転送する。この検査にて、CRCエラーやIDの不一致が検出された場合、ディスクインターフェース123は最終記憶装置へのデータ転送を中止し、エラーをプロセッサ121に通知する。 Returning to the explanation of FIG. In step S1606 following step S1605, the processor 121 of the storage apparatus 101 records the compressed data constituted by the compressed sector with the guarantee code acquired in S1605 in the compressed volume 5500. More specifically, the processor 121 controls the disk interface 123 to transfer the compressed data to one or more final storage devices (SSD 111 or HDD 112) constituting the compressed volume. At this time, the processor 121 notifies the expected value of the guarantee code ID of the transfer data to the disk interface 123. This expected value is the lower 6B of the address (LBA) on the compressed volume. Upon receiving the instruction, the disk interface 123 checks the CRC of the guarantee code of the compressed sector with the guarantee code constituting the transfer data and confirms that no error bit has occurred, and then notifies the ID of the guarantee code and the processor 121. After confirming that the ID of the guarantee code matches the expected value, the data is transferred to the SSD 111 or HDD 112 as the final storage device. If a CRC error or ID mismatch is detected in this check, the disk interface 123 stops data transfer to the final storage device and notifies the processor 121 of the error.

 以上が実施例1におけるデステージ動作である。 The above is the destage operation in the first embodiment.

 (1-13)ストレージ装置の動作:リード動作
 続いて、実施例1におけるリード動作について説明する。実施例1のリード動作は、プロセッサ121が上位装置103からのリード要求を受信することで開始される。リード要求を受信すると、プロセッサ121はリード要求に含まれている、伸長ボリュームのリード対象アドレスを取得し、当該伸長ボリュームのリード対象アドレスに対応付けられた圧縮ボリュームのアドレスに変換する。この変換は、デステージ処理の説明の際に述べた、ボリューム間マッピング情報を参照することで行われる。さらに圧縮ボリュームのアドレスを、圧縮ボリュームを構成する最終記憶装置上のアドレスへ変換する。次にプロセッサ121は、この最終記憶装置上アドレスから保証コード付き圧縮セクタを読み出す。この時プロセッサ121はディスクインターフェース123に対して、読み出し対象の保証コード付き圧縮セクタの保証コードIDの期待値を通知する。この期待値は、前述のとおり保証コード付き圧縮セクタが格納されている圧縮ボリューム5500のアドレスの下位6Bである。指示を受けたディスクインターフェース123は、最終記憶装置から保証コード付き圧縮セクタを読み出し、保証コードを検査する。この保証コードの検査にてCRCのエラーやIDの不一致が検出された場合、ディスクインターフェース123はエラーをプロセッサ121に通知する。保証コードの検査に合格した保証コード付き圧縮データは、ストレージコントローラ110に転送され、一旦DRAM125に格納される。
(1-13) Operation of Storage Device: Read Operation Next, the read operation in Embodiment 1 will be described. The read operation according to the first embodiment is started when the processor 121 receives a read request from the higher-level device 103. When the read request is received, the processor 121 acquires the read target address of the decompression volume included in the read request, and converts it into the address of the compression volume associated with the read target address of the decompression volume. This conversion is performed by referring to the inter-volume mapping information described in the description of the destage processing. Furthermore, the address of the compressed volume is converted into an address on the final storage device that constitutes the compressed volume. Next, the processor 121 reads the compressed sector with the guarantee code from the address on the final storage device. At this time, the processor 121 notifies the disk interface 123 of the expected value of the guarantee code ID of the compressed sector with the guarantee code to be read. This expected value is the lower 6B of the address of the compressed volume 5500 in which the compressed sector with the guarantee code is stored as described above. Upon receiving the instruction, the disk interface 123 reads the compressed sector with the guarantee code from the final storage device, and checks the guarantee code. If a CRC error or ID mismatch is detected in this guarantee code check, the disk interface 123 notifies the processor 121 of the error. The compressed data with the guarantee code that has passed the guarantee code check is transferred to the storage controller 110 and temporarily stored in the DRAM 125.

 次にプロセッサ121は、ディスクインターフェース123より取得した保証コード付き圧縮セクタをNVMモジュール126のLBA1空間上領域に記録する。この時プロセッサ121は、ライトコマンド1210を用いて、NVMモジュール126にデータをライトする。このライトコマンド1210の保証コードIDの期待値には、保証コード付き圧縮セクタが格納されている圧縮ボリューム5500内アドレスの下位6Bが記入される。指示を受けたNVMモジュール126は、ストレージコントローラ110から保証コード付き圧縮セクタを取得し、保証コードの検査を行う。この保証コードの検査にてCRCのエラーやIDの不一致が検出された場合、NVMモジュール126はエラーをプロセッサ121に通知する。 Next, the processor 121 records the compressed sector with the guarantee code acquired from the disk interface 123 in the area on the LBA1 space of the NVM module 126. At this time, the processor 121 writes data to the NVM module 126 using the write command 1210. In the expected value of the guarantee code ID of the write command 1210, the lower 6B of the address in the compressed volume 5500 in which the compressed sector with the guarantee code is stored is entered. Upon receiving the instruction, the NVM module 126 acquires a compressed sector with a guarantee code from the storage controller 110, and checks the guarantee code. If a CRC error or ID mismatch is detected in this guarantee code check, the NVM module 126 notifies the processor 121 of the error.

 その後、プロセッサ121はNVMモジュール126にLBA0マッピングコマンド1510を発行することにより、NVMモジュール126のLBA1空間に記録された圧縮データを、LBA0空間にマッピングし、伸長したデータを取り出せるようにする。 Thereafter, the processor 121 issues an LBA0 mapping command 1510 to the NVM module 126, thereby mapping the compressed data recorded in the LBA1 space of the NVM module 126 to the LBA0 space so that the decompressed data can be taken out.

 次にプロセッサ121は、LBA0の空間を用いて圧縮データを伸長したデータをリードする。この時プロセッサ121は、リードコマンド1310をNVMモジュール126に発行する。このリードコマンド1310は、保証コードの期待値として、仮想的なリード対象データの格納先である伸長ボリューム5000内アドレスの下位6Bを含んでいる。プロセッサ121よりリードコマンドを受けたNVMモジュール126では、NVMモジュール126内のプロセッサ415が、データ圧縮/伸長ユニット418を制御して、ライト時にLBA1を指定して記録された、1または複数の保証コード付き圧縮セクタから構成された圧縮データを伸長し、1または複数の保証コード付きセクタから構成されるリード対象データを生成する。そして、各保証コード付きセクタについて、保証コードを用いてCRCを検査し、IDがリードコマンドに付与された保証コードIDの期待値1217に基づいて生成される値と一致していることを確認した後、ストレージコントローラ110に転送する。この検査において、CRCのエラー、またはIDの期待値との不一致が検出された場合、NVMモジュール126はプロセッサ121にエラーを通知する。 Next, the processor 121 reads the data obtained by decompressing the compressed data using the LBA0 space. At this time, the processor 121 issues a read command 1310 to the NVM module 126. This read command 1310 includes the lower 6B of the address in the decompression volume 5000, which is the storage destination of the virtual read target data, as the expected value of the guarantee code. In the NVM module 126 that has received a read command from the processor 121, the processor 415 in the NVM module 126 controls the data compression / decompression unit 418 to record one or a plurality of guarantee codes recorded by designating LBA1 at the time of writing. The compressed data composed of attached compressed sectors is decompressed to generate read target data composed of one or more sectors with guarantee codes. Then, for each sector with a guarantee code, the CRC is inspected using the guarantee code, and it is confirmed that the ID matches the value generated based on the expected value 1217 of the guarantee code ID given to the read command. Thereafter, the data is transferred to the storage controller 110. In this check, if a CRC error or a mismatch with the expected ID value is detected, the NVM module 126 notifies the processor 121 of the error.

 NVMモジュール126よりリード対象データを構成する保証コード付きセクタを取得したストレージコントローラ110は、ホストインターフェース124に、保証コード付きセクタの上位装置103への転送を指示する。このときプロセッサ121はホストインターフェース124に対して、仮想的なリード対象データの格納先である伸長ボリューム5000内アドレスの下位6Bを保証コードの期待値として通知する。転送指示を受けたホストインターフェース124は、各保証コード付きセクタについて、CRCを用いてエラービットが生じていない事を確認し、またIDの期待値を用いて上位装置103より要求されたリードデータであることを検査する。この検査にてエラーが検出された場合、エラーをプロセッサ121に通知する。エラーが検出されず、リードデータの保証が完了した場合、ホストインターフェース124は、各保証コード付きセクタから保証コードを削除して、1または複数のセクタを生成する。そして1または複数のセクタにより構成されるデータを、上位装置103からのリード要求データとして上位装置103に転送し、リード処理を終了する。 The storage controller 110 that has acquired the sector with the guarantee code constituting the read target data from the NVM module 126 instructs the host interface 124 to transfer the sector with the guarantee code to the host device 103. At this time, the processor 121 notifies the host interface 124 of the lower 6B of the address in the decompression volume 5000 that is the storage destination of the virtual read target data as the expected value of the guarantee code. Receiving the transfer instruction, the host interface 124 confirms that no error bit has occurred for each sector with a guarantee code using the CRC, and uses the expected value of the ID to read data requested by the host device 103. Check that there is. When an error is detected in this inspection, the error is notified to the processor 121. If no error is detected and read data guarantee is completed, the host interface 124 deletes the guarantee code from each sector with the guarantee code, and generates one or more sectors. Then, data composed of one or more sectors is transferred as read request data from the host device 103 to the host device 103, and the read process is terminated.

 以上が、実施例1に係るストレージ装置及びNVMモジュールの構成と処理内容である。実施例1に係るストレージ装置のように、上位装置からライト要求のあったライトデータを圧縮して最終記憶装置に格納するストレージ装置の場合、ライトデータが圧縮され、圧縮後のデータサイズが確定するまでは、当該ライトデータの最終記憶装置上の格納位置を決定できない。そのため、信頼性向上のために、データに対してデータ格納先アドレス等の情報を含んだ保証コードを付加することが困難である。 The above is the configuration and processing contents of the storage apparatus and NVM module according to the first embodiment. In the case of a storage apparatus that compresses write data requested to be written from the host apparatus and stores it in the final storage apparatus like the storage apparatus according to the first embodiment, the write data is compressed and the data size after compression is determined. Until then, the storage location of the write data on the final storage device cannot be determined. For this reason, it is difficult to add a guarantee code including information such as a data storage destination address to data in order to improve reliability.

 本発明によれば、ストレージ装置が上位装置から、ボリュームのライト先アドレスを指定したライト要求及びライトデータを受信すると、ストレージ装置のホストインターフェースにおいて、ボリュームのライト先アドレスをもとにして生成される第1のID及びライトデータから生成されるCRCコードを保証コードとしてライトデータに付加して、キャッシュ装置であるNVMモジュールに転送する。これにより、ホストインターフェースからキャッシュ装置までのデータ転送過程で、データにエラーが発生した場合に、エラーを検出することができる。そして、データ(圧縮データ)を最終記憶装置にデステージする時点、つまりデータの最終記憶装置上の格納位置(ライト先アドレス)が確定した時点で、キャッシュ装置であるNVMモジュールは最終記憶装置上のライト先アドレスをもとに生成した第2のIDを保証コードとしてデータに付加し、ストレージ装置は当該第2のIDの付加されたデータを最終記憶装置へ送信する。これにより、キャッシュ装置から最終記憶装置までのデータ転送過程で、データにエラーが発生した場合でも、エラーを検出することができるので、ストレージ装置が上位装置からライトデータを受信し、最終記憶装置へと当該ライトデータを格納するまでの全過程で、エラーチェックが可能となる。同様に、ストレージ装置が最終記憶装置から上位装置から要求のあったデータを読み出して、ホストインターフェースを経由して上位装置に向けてデータを送信するまでの全過程でのエラーチェックも可能としている。 According to the present invention, when a storage device receives a write request and write data specifying a volume write destination address from a host device, it is generated based on the volume write destination address in the host interface of the storage device. A CRC code generated from the first ID and the write data is added to the write data as a guarantee code, and transferred to the NVM module which is a cache device. Thus, an error can be detected when an error occurs in data during the data transfer process from the host interface to the cache device. When the data (compressed data) is destaged to the final storage device, that is, when the storage location (write destination address) of the data on the final storage device is determined, the NVM module serving as the cache device is stored on the final storage device. The second ID generated based on the write destination address is added to the data as a guarantee code, and the storage device transmits the data with the second ID added to the final storage device. As a result, even if an error occurs in the data during the data transfer process from the cache device to the final storage device, the error can be detected, so the storage device receives the write data from the host device and sends it to the final storage device. And error checking is possible in the entire process until the write data is stored. Similarly, it is possible to perform error checking in the entire process from when the storage device reads data requested from the host device from the final storage device and transmits the data to the host device via the host interface.

 なお、実施例1において、保証コードには、圧縮セクタに付加される保証コード、非圧縮データ(伸長データ)に付加される保証コードの2通りがある。NVMモジュール126で保証コードの付加、検査を行う場合、一部例外を除き、リードコマンド、ライトコマンドのLBA0/1開始アドレスフィールドで指定されたアドレスがLBA0かLBA1かによって、いずれの保証コードの付加または検査を行うかを決定しているが、本発明はこの方法に限定されるものではない。コマンド中に、圧縮セクタに付加される保証コード、あるいは伸長データに付加される保証コードのいずれについて、付加・検査を行うか、明示的に指示する情報を含めるようにするなどの方法を採ってもよい。 In the first embodiment, there are two types of guarantee codes: a guarantee code added to a compressed sector and a guarantee code added to uncompressed data (expanded data). When the NVM module 126 adds or checks a guarantee code, with the exception of some exceptions, any guarantee code is added depending on whether the address specified in the LBA0 / 1 start address field of the read command or write command is LBA0 or LBA1. Although it is determined whether to perform the inspection, the present invention is not limited to this method. In the command, use a method such as including information that explicitly indicates whether the guarantee code added to the compressed sector or the guarantee code added to the decompressed data is to be added / inspected. Also good.

[変形例]
 実施例1におけるストレージ装置101では、NVMモジュール126から圧縮データを読み出して、最終記憶装置にデステージする過程において、保証コード付き圧縮セクタに、新保証コードのIDを付加していたが、NVMモジュール126にデータを書き込む際に新保証コードのIDを付加してもよい場合もある。以下ではその例の概要を説明する。
[Modification]
In the storage apparatus 101 according to the first embodiment, the ID of the new guarantee code is added to the compressed sector with the guarantee code in the process of reading the compressed data from the NVM module 126 and destaging to the final storage device. In some cases, a new guarantee code ID may be added when data is written to 126. Below, the outline | summary of the example is demonstrated.

 一例として、ある圧縮ボリューム5500(以下、これを「移動元ボリューム」と呼ぶ)に格納されたデータを、別の圧縮ボリューム(以下、これを「移動先ボリューム」と呼ぶ)へと移動する必要が生じる場合がある(なお、この時移動されるデータが対応付けられている伸長ボリュームの位置は変更がない場合を想定する)。その時、移動元ボリュームのアドレスaに格納されていたデータが、移動先ボリュームのアドレスb(なお、aとbは異なる値である)に格納されることが発生し得る。その場合、保証コード付き圧縮セクタの保証コード(ID部分)を変更する必要がある。 As an example, it is necessary to move data stored in a certain compression volume 5500 (hereinafter referred to as “migration source volume”) to another compression volume (hereinafter referred to as “migration destination volume”). (It is assumed that there is no change in the position of the decompression volume associated with the data to be moved at this time). At that time, the data stored at the address a of the migration source volume may be stored at the address b of the migration destination volume (a and b are different values). In that case, it is necessary to change the guarantee code (ID part) of the compressed sector with the guarantee code.

 以下、移動元ボリュームのLBAがa番地に格納されていたデータ(保証コード付き圧縮セクタ)を、移動先ボリュームのLBAがb番地の領域に移動する処理を例にとって、処理の流れを説明する。ストレージ装置101のプロセッサ121は、移動元ボリュームのa番地のLBAに対応する最終記憶装置の領域から圧縮データ(保証コード付き圧縮セクタ)を読み出し、一旦DRAM125に格納する。この処理は実施例1で説明したストレージ装置のリード処理と同様である。続いて、プロセッサ121は、DRAM125に格納してある保証コード付き圧縮セクタを、NVMモジュール126にライトコマンドを発行することにより、NVMモジュール126のLBA1空間上領域に記録する。この処理も、実施例1で説明したストレージ装置のリード処理と類似しているが、ここではライトコマンドの新保証コードIDの種1218のフィールドに、移動先ボリュームのLBA(データの格納されるアドレスであるb番地)の下位6Bを格納して、ライトコマンドを発行する点が、実施例1で説明したストレージ装置のリード処理と異なる点である。 Hereinafter, the flow of processing will be described by taking as an example processing for moving data (compressed sector with guarantee code) in which the LBA of the migration source volume is stored at address a to the area where the LBA of the migration destination volume is at address b. The processor 121 of the storage apparatus 101 reads the compressed data (compressed sector with guarantee code) from the area of the final storage device corresponding to the LBA at address a of the migration source volume, and temporarily stores it in the DRAM 125. This process is the same as the read process of the storage apparatus described in the first embodiment. Subsequently, the processor 121 records the compressed sector with the guarantee code stored in the DRAM 125 in the area on the LBA1 space of the NVM module 126 by issuing a write command to the NVM module 126. This process is also similar to the read process of the storage apparatus described in the first embodiment. Here, the new guarantee code ID seed 1218 field of the write command contains the LBA (data storage address) of the migration destination volume. This is different from the read processing of the storage apparatus described in the first embodiment in that the lower 6B of (address b) is stored and a write command is issued.

 指示を受けたNVMモジュール126は、ストレージコントローラ110から保証コード付き圧縮セクタを取得し、保証コードの検査を行い、エラーが発見されなかった場合には、保証コード付き圧縮セクタの保証コードに含まれるIDを、新保証コードIDの種1218で指定された値に変更してから、FM420あるいはデータバッファ416に格納する。 Upon receiving the instruction, the NVM module 126 acquires the compressed sector with the guarantee code from the storage controller 110, checks the guarantee code, and if no error is found, the NVM module 126 is included in the guarantee code of the compressed sector with the guarantee code. The ID is changed to the value specified by the new guarantee code ID seed 1218 and then stored in the FM 420 or the data buffer 416.

 続いてプロセッサ121は、先の処理でNVMモジュール126に格納した保証コード付き圧縮セクタの格納されているLBA1アドレスを指定したリードコマンドをNVMモジュール126に発行することにより、保証コード付き圧縮セクタを読み出し、この読み出された保証コード付き圧縮セクタを、移動先ボリュームのb番地のLBAに対応する最終記憶装置の領域に書き出す。先の処理でNVMモジュール126に保証コード付き圧縮データが格納された時点で、すでに圧縮セクタの保証コード(ID部分)には、移動先ボリュームのb番地の下位6Bの値が格納されているため、ここでは保証コードの付け替えの必要がない。そのためプロセッサ121は、ここで発行するリードコマンドの新保証コードIDの種1318のフィールドには無効値を格納する。その結果、NVMモジュール126からは、保証コードの付け替えの行われていないデータが読み出され、プロセッサ121はそのデータを、ディスクインターフェースを経由して最終記憶媒体へと格納する。 Subsequently, the processor 121 reads the compressed sector with the guarantee code by issuing a read command designating the LBA1 address storing the compressed sector with the guarantee code stored in the NVM module 126 in the previous process to the NVM module 126. The read compressed sector with a guarantee code is written in the area of the final storage device corresponding to the LBA at address b of the migration destination volume. At the time when compressed data with a guarantee code is stored in the NVM module 126 in the previous process, the guarantee code (ID portion) of the compression sector already stores the lower 6B value of the address b of the migration destination volume. Here, there is no need to replace the warranty code. Therefore, the processor 121 stores an invalid value in the field of the seed 1318 of the new guarantee code ID of the read command issued here. As a result, data for which the guarantee code has not been replaced is read from the NVM module 126, and the processor 121 stores the data in the final storage medium via the disk interface.

 なお、NVMモジュール126から保証コード付き圧縮セクタを読み出す過程で、保証コード付きセクタの保証コードに基づいたデータ検査が行われること、そして読み出された保証コード付き圧縮セクタを最終記憶装置に書き出す過程で、ディスクインターフェースにおいて、保証コードに基づいたデータ検査が行われることは、実施例1で説明したデステージ処理と同様である。 In the process of reading the compressed sector with the guarantee code from the NVM module 126, the data inspection based on the guarantee code of the sector with the guarantee code is performed, and the process of writing the read compressed sector with the guarantee code to the final storage device In the disk interface, the data inspection based on the guarantee code is performed in the same manner as the destage processing described in the first embodiment.

 これにより、移動元ボリュームから移動先ボリュームへのデータ移動時に保証コードの付け替えを行うことができ、移動元ボリュームから移動先ボリュームへのデータ転送処理の全過程において、エラーチェックを適切に行うことが可能になる。なお、移動元ボリュームから移動先ボリュームへのデータ移動の際、必ずしもNVMモジュール126への保証コード付き圧縮セクタの格納時に保証コードの付け替えを行わなければならないわけではない。最終記憶装置からNVMモジュール126にデータを格納する際には保証コードの付け替えを行わず、NVMモジュール126から保証コード付き圧縮セクタを読み出して移動先ボリュームを構成する最終記憶媒体へ書き出す際に、保証コードの付け替えを行うようにしてもよい。 As a result, the guarantee code can be replaced when data is moved from the migration source volume to the migration destination volume, and error checking can be performed appropriately during the entire data transfer process from the migration source volume to the migration destination volume. It becomes possible. When data is moved from the migration source volume to the migration destination volume, it is not always necessary to replace the guarantee code when storing the compressed sector with the guarantee code in the NVM module 126. When data is stored in the NVM module 126 from the final storage device, the guarantee code is not reassigned. When the compressed sector with the guarantee code is read from the NVM module 126 and written to the final storage medium constituting the migration destination volume, the guarantee is performed. The code may be replaced.

 実施例1では、本発明が適用されるNVMモジュールをストレージ装置のキャッシュとして用いた例について述べた。実施例2では、実施例1において説明したNVMモジュールを、ストレージ装置における最終記憶装置として利用する場合の例について説明する。 In the first embodiment, an example in which an NVM module to which the present invention is applied is used as a cache of a storage apparatus has been described. In the second embodiment, an example in which the NVM module described in the first embodiment is used as a final storage device in a storage device will be described.

 NVMモジュールを最終記憶装置として用いた場合、NVMモジュールは、図1に示したストレージ装置内のSSD111と同等の役割を果たすこととなる。そしてDRAM125がストレージ装置のキャッシュとして用いられる。 When the NVM module is used as the final storage device, the NVM module plays the same role as the SSD 111 in the storage device shown in FIG. The DRAM 125 is used as a cache of the storage device.

 実施例2におけるストレージ装置1801の構成を、図20に示す。実施例2におけるストレージ装置1801の多くの構成要素は、実施例1におけるストレージ装置101と共通しているので、以下では相違点を中心に説明し、実施例1と共通する構成物についての説明は省略する。ストレージ装置1801は、ストレージコントローラ内110の内部スイッチ122によってNVMモジュール1826を複数接続している。NVMモジュール1826は、実施例1において説明したNVMモジュール126と同じ機能を持つモジュールであって、プロセッサ121より直接(ディスクインタフェースを介さず)コマンドを受け取る最終記憶装置である。ストレージ装置1801は、1以上のNVMモジュール1826から1または複数のボリュームを構成し、構成したボリュームを上位装置103に提供する。 FIG. 20 shows the configuration of the storage apparatus 1801 in the second embodiment. Since many components of the storage apparatus 1801 in the second embodiment are common to the storage apparatus 101 in the first embodiment, the differences will be mainly described below, and the components common to the first embodiment will not be described. Omitted. In the storage apparatus 1801, a plurality of NVM modules 1826 are connected by the internal switch 122 in the storage controller 110. The NVM module 1826 is a module having the same function as that of the NVM module 126 described in the first embodiment, and is a final storage device that receives a command directly (without passing through a disk interface) from the processor 121. The storage apparatus 1801 configures one or a plurality of volumes from one or more NVM modules 1826, and provides the configured volumes to the host apparatus 103.

 実施例2におけるコピー処理について、図21を用いて説明する。図21は、上位装置103からのコピー指示に基づいて、ストレージ装置1801が、本発明が適用される1または複数のNVMモジュール1826から構成されるボリュームA6000内に格納されているデータを、同じく1または複数のNVMモジュール1826にて構成されるボリュームB6500にコピーする動作を示したものである。なお、ここでの上位装置103からのコピー指示とは、たとえばSCSIのExtended Copyコマンドのように、コピー元データの格納されているアドレスと当該データのコピー先のアドレスとをストレージ装置1801に通知して、ストレージ装置1801内部でデータコピーを実施することを要求するための指示を意味する。つまり、実施例2で想定するコピー処理は、上位装置103がリードコマンドなどによってコピー元データを読み出し、ライトコマンドによってコピー先ボリュームにデータを書き込むことでコピーを行う態様ではない。 Copy processing according to the second embodiment will be described with reference to FIG. FIG. 21 shows that, based on a copy instruction from the upper level apparatus 103, the storage apparatus 1801 stores data stored in a volume A6000 composed of one or a plurality of NVM modules 1826 to which the present invention is applied. Alternatively, an operation of copying to a volume B 6500 constituted by a plurality of NVM modules 1826 is shown. Here, the copy instruction from the host device 103 is to notify the storage device 1801 of the address where the copy source data is stored and the address of the copy destination of the data, for example, as in the SCSI Extended Copy command. This means an instruction for requesting to execute data copy in the storage apparatus 1801. That is, the copy process assumed in the second embodiment is not a mode in which the upper apparatus 103 performs copying by reading copy source data by a read command or the like and writing data to a copy destination volume by a write command.

 実施例2のストレージ装置1801は、実施例1のストレージ装置と同様、ホストインターフェース124にて、データの各セクタに保証コードを付加して保証コード付きセクタを生成し、この保証コード付きセクタをNVMモジュール1826の有するLBA0空間上領域に格納する。そのため、データは圧縮された状態でNVMモジュール1826に格納される。また保証コード付きセクタの保証コードのIDの部分には、保証コード付きセクタが記録されているボリュームA6000内のアドレス(LBA)が記録されている。なお、ストレージ装置1801は、ライト時に、NVMモジュール1826にて保証コードを検査することで信頼性を維持する。 Similar to the storage apparatus of the first embodiment, the storage apparatus 1801 of the second embodiment generates a sector with a guarantee code by adding a guarantee code to each sector of data at the host interface 124, and this sector with the guarantee code is converted into an NVM. The data is stored in the area above the LBA0 space of the module 1826. Therefore, the data is stored in the NVM module 1826 in a compressed state. In addition, the address (LBA) in the volume A6000 in which the sector with the guarantee code is recorded is recorded in the ID portion of the guarantee code of the sector with the guarantee code. Note that the storage apparatus 1801 maintains the reliability by inspecting the guarantee code by the NVM module 1826 at the time of writing.

 図21に示すストレージ装置1801のデータコピーの例において、ボリュームA6000のデータの格納位置(アドレス)とボリュームB6500のデータの格納位置(アドレス)が異なるコピーが行われることがあり、その場合、ボリュームB6500に格納されたデータの保証コードのIDの部分を変更する必要がある。このため、実施例2のストレージ装置1801は、ボリュームA6000内のアドレスを保証コードのIDとした、ボリュームA6000内データについて、ボリュームB6500にコピーする(書き込む)際には、保証コードIDをボリュームB内のアドレスに変更してリードする。 In the example of data copy of the storage apparatus 1801 shown in FIG. 21, a copy in which the data storage location (address) of the volume A6000 and the data storage location (address) of the volume B6500 are different may be performed. It is necessary to change the ID part of the guarantee code of the data stored in. Therefore, the storage apparatus 1801 according to the second embodiment copies the guarantee code ID in the volume B when copying (writing) the data in the volume A 6000 with the address in the volume A 6000 as the guarantee code ID to the volume B 6500. Change to the address of and read.

 具体的には、上位装置103より、ボリュームAからボリュームBへのデータコピー指示を受領したストレージ装置1801のプロセッサ121は、コピー指示のあったボリュームAの領域とボリュームBの領域を特定し、続いてボリュームAの領域のデータを格納している1または複数のNVMモジュール1826にリードコマンドを発行する。 Specifically, the processor 121 of the storage apparatus 1801 that has received a data copy instruction from the volume A to the volume B from the higher-level apparatus 103 identifies the area of the volume A and the area of the volume B for which the copy instruction has been issued. The read command is issued to one or a plurality of NVM modules 1826 storing the data of the volume A area.

 このリードコマンドには、図13に示したリードコマンド1310を用いる。また、このリードコマンド1310には、ボリュームAの領域を構成する各NVMモジュール1826内のデータの格納位置(LBA0空間上位置)を通知するLBA0開始アドレス1313、LBA0長1314が格納され、さらに、保証コードの期待値1317としてボリュームA内のアドレス、新保証コードの種1318として、付け替え対象のボリュームB内のアドレスが格納される。 The read command 1310 shown in FIG. 13 is used for this read command. The read command 1310 stores an LBA 0 start address 1313 and an LBA 0 length 1314 for notifying the data storage position (position on the LBA 0 space) in each NVM module 1826 constituting the volume A area. An address in the volume A is stored as the expected code value 1317, and an address in the volume B to be replaced is stored as the new guarantee code seed 1318.

 ボリュームAの領域を構成する1または複数のNVMモジュール1826はそれぞれ、プロセッサ121からリードコマンドを受領する。リードコマンドを受領した各NVMモジュール1826の行う処理は、実施例1の図17に記載の処理と類似の処理を行うので、図17を用いて、主な相違点を中心に説明する。S1701からS1704までの処理は実施例1において説明したものと同一である。つまり、LBA0開始アドレス1313、LBA0長1314に対応づけられたデータをFM420やデータバッファ416から取得して伸長し、データを構成する1または複数の保証コード付きセクタについて、保証コードのCRC及びIDを用いたエラーチェックを行う。S1705で、CRCによるエラービットの検出、または保証コードの不一致が検出された場合、エラーをプロセッサ121に通知する点は実施例1の図17の処理と同様である。一方で、保証コードの検査をクリアした保証コード付きセクタについては、実施例1のS1706からS1709では保証コード付き圧縮セクタのIDを変更する処理を行っていたが、実施例2におけるNVMモジュール1826では、保証コード付きセクタの保証コード内IDをリードコマンド1310で指定された新保証コードの種1318に基づいて変更し、保証コード内IDの変更された保証コード付きセクタ(つまり伸長データ)をストレージ110に転送する。 Each of the one or more NVM modules 1826 constituting the volume A area receives a read command from the processor 121. The processing performed by each NVM module 1826 that has received the read command performs processing similar to the processing described in FIG. 17 of the first embodiment, and therefore will be described with reference to FIG. The processing from S1701 to S1704 is the same as that described in the first embodiment. That is, the data associated with the LBA 0 start address 1313 and the LBA 0 length 1314 is acquired from the FM 420 or the data buffer 416 and decompressed, and the CRC and ID of the guarantee code are set for one or more sectors with a guarantee code constituting the data. Check the error used. In S1705, when error bit detection by CRC or mismatch of guarantee codes is detected, an error is notified to the processor 121 in the same manner as the processing in FIG. 17 of the first embodiment. On the other hand, for the sector with a guarantee code that has cleared the guarantee code inspection, the process of changing the ID of the compressed sector with the guarantee code was performed in S1706 to S1709 of the first embodiment, but in the NVM module 1826 in the second embodiment, Then, the guarantee code ID of the sector with the guarantee code is changed based on the new guarantee code type 1318 specified by the read command 1310, and the sector with the guarantee code with the changed guarantee code ID (ie, decompressed data) is stored in the storage 110. Forward to.

 ストレージコントローラ110は、保証コードのIDについて変更がなされた保証コード付きセクタをNVMモジュール1826より取得し、ボリュームBを構成する1または複数のNVMモジュールに転送する。この時、ストレージ装置1801は、ボリュームBを構成する1または複数のNVMモジュール1826に対し、それぞれ図12に示すライトコマンド1210を転送する。 The storage controller 110 acquires a sector with a guarantee code, which has been changed with respect to the guarantee code ID, from the NVM module 1826 and transfers it to one or a plurality of NVM modules constituting the volume B. At this time, the storage apparatus 1801 transfers the write command 1210 shown in FIG. 12 to one or a plurality of NVM modules 1826 constituting the volume B.

 ボリュームBの領域を構成する1または複数のNVMモジュール1826はそれぞれ、ストレージ装置1801よりライトコマンド1210を受領する。このライトコマンド1210は、ボリュームBの領域を構成する各NVMモジュール1826におけるデータの新たな格納先を示すLBA0開始アドレス1313、LBA0長1314と保証コードの期待値1317を含んでいる。保証コードの期待値1317は、コピー先であるボリュームB内のアドレスであり、ボリュームAを構成するNVMモジュール1826からリードする際に、プロセッサ121が新保証コードの種として通知したものと同じである。 Each of the one or more NVM modules 1826 constituting the volume B area receives the write command 1210 from the storage apparatus 1801. This write command 1210 includes an LBA 0 start address 1313, an LBA 0 length 1314 indicating a new storage location of data in each NVM module 1826 constituting the volume B area, and an expected value 1317 of the guarantee code. The expected value 1317 of the guarantee code is an address in the copy destination volume B, and is the same as that notified by the processor 121 as the seed of the new guarantee code when reading from the NVM module 1826 constituting the volume A. .

 ライトコマンド1210を受領したNVMモジュール1826は、ストレージコントローラ110より、ライトデータとして新たな保証コードが付与された保証コード付きセクタを受領し、保証コードを検査する。具体的には、保証コードのCRCを用いてビットエラーが無いことを確認し、保証コードのIDが、ライトコマンドに付与された保証コードの期待値1317と一致していることを確認する。 The NVM module 1826 that has received the write command 1210 receives a sector with a guarantee code to which a new guarantee code is assigned as write data from the storage controller 110, and checks the guarantee code. Specifically, it is confirmed that there is no bit error by using the CRC of the guarantee code, and it is confirmed that the guarantee code ID matches the expected value 1317 of the guarantee code assigned to the write command.

 以上が実施例2のストレージ装置が実施するデータコピー動作である。上記動作によって、ストレージ装置は、データコピーのデータに常に保証コードを付与した状態で制御できる。このため、制御プログラムの不備等で誤ったデータをコピーした際、エラーの通知を取得できる。 The above is the data copy operation performed by the storage apparatus of the second embodiment. Through the above operation, the storage apparatus can be controlled in a state where a guarantee code is always added to the data of the data copy. For this reason, when erroneous data is copied due to a deficiency in the control program, an error notification can be acquired.

 また、保証コードの付加、検査を、ストレージコントローラ110に接続される個々の最終記憶装置(NVMモジュール)で実施するため、従来ストレージコントローラで実施していた保証コードの付加、検査の処理の負担をオフロードすることができる。一般にストレージコントローラには多数の最終記憶装置が接続されるため、保証コードの付加、検査の処理の負担は大きい。本発明の実施例2に係るストレージ装置では、複数のNVMモジュールが、自身に書き込まれるデータ/自身から読み出されるデータについてのみ保証コードの付加、検査を行うので、保証コードの付加、検査の処理負荷を分散させることが可能である。 In addition, since the guarantee code is added and inspected in each final storage device (NVM module) connected to the storage controller 110, the burden of the guarantee code addition and the inspection processing conventionally performed in the storage controller is reduced. Can be offloaded. In general, since a large number of final storage devices are connected to the storage controller, the burden of adding a guarantee code and processing for inspection is large. In the storage apparatus according to the second embodiment of the present invention, since a plurality of NVM modules add and check a guarantee code only for data written to / read from itself, the processing load of guarantee code addition and check Can be dispersed.

 なお、上で説明した実施例2では、NVMモジュール1826は実施例1にて説明したNVMモジュール126と同じものを用いるとして説明したが、必ずしも実施例1のNVMモジュール126と同じものである必要はない。たとえば、NVMモジュール126はデータ圧縮/伸長ユニット418を備えており、ライトデータを圧縮して格納する機能を有するが、実施例2におけるNVMモジュール1826には、データを圧縮して格納することは必須ではないため、データ圧縮/伸長ユニット418を持たない構成でも良い。その場合、上位装置103からのライトデータはNVMモジュール1826に非圧縮状態で格納され、またボリュームAからボリュームBを構成する装置にコピーされるデータも非圧縮状態で格納される点を除いては、上で説明した実施例2と同様に動作する。またこの場合、保証コードの検査、付加を行うための手段を、NVMモジュール内の別の要素、たとえばI/Oインターフェース411に持たせるなどしてもよい。また、パリティ生成ユニット419も必須ではない。 In the second embodiment described above, the NVM module 1826 is described as being the same as the NVM module 126 described in the first embodiment. However, the NVM module 1826 is not necessarily the same as the NVM module 126 according to the first embodiment. Absent. For example, the NVM module 126 includes a data compression / decompression unit 418 and has a function of compressing and storing write data. However, the NVM module 1826 in the second embodiment is required to compress and store data. Therefore, a configuration without the data compression / decompression unit 418 may be used. In that case, the write data from the host device 103 is stored in the NVM module 1826 in an uncompressed state, and the data copied from the volume A to the device constituting the volume B is also stored in the uncompressed state. The operation is the same as in the second embodiment described above. In this case, another element in the NVM module, such as the I / O interface 411, may be provided with means for checking and adding the guarantee code. Also, the parity generation unit 419 is not essential.

 また、データ圧縮/伸長ユニット418を持たない場合、NVMモジュールがLBA0空間、LBA1空間という2つの論理記憶空間を上位装置に提供する機能も必須ではない。つまり、通常のSSDなどと同様に、単一の記憶空間のみを提供する記憶装置であって、保証コードの検査、付加を行うための手段が追加されているだけの構成のNVMモジュールであっても、本発明の目的と効果を達成可能である。 If the data compression / decompression unit 418 is not provided, the function of the NVM module providing two logical storage spaces, LBA0 space and LBA1 space, to the host device is not essential. In other words, like a normal SSD or the like, it is a storage device that provides only a single storage space, and is an NVM module having a configuration in which a means for checking and adding a guarantee code is added. In addition, the objects and effects of the present invention can be achieved.

 また、上で説明した実施例2に係るストレージ装置1801では、ストレージコントローラ110が最終記憶装置を接続するためのディスクインターフェース123を有さず、またSSD111及びHDD112がストレージコントローラ110に接続されていないが、本発明はこのような構成のストレージ装置に限定されるものではない。内部スイッチ122にディスクインターフェースが接続され、そのディスクインターフェースにSSDやHDDが接続されていても、本発明は有効である。そして上で説明した実施例2では、1または複数のNVMモジュール1826から構成されるボリュームA内に格納されているデータを、同じく1または複数のNVMモジュール1826にて構成されるボリュームBにコピーする処理について説明したが、ボリュームBをSSD111またはHDD112から構成されるボリュームB’として、1または複数のNVMモジュール1826から構成されるボリュームA内に格納されているデータをボリュームB’にコピーする場合でも、本発明は有効である。 In the storage apparatus 1801 according to the second embodiment described above, the storage controller 110 does not have the disk interface 123 for connecting the final storage apparatus, and the SSD 111 and the HDD 112 are not connected to the storage controller 110. The present invention is not limited to the storage apparatus having such a configuration. The present invention is effective even when a disk interface is connected to the internal switch 122 and an SSD or HDD is connected to the disk interface. In the second embodiment described above, the data stored in the volume A composed of one or a plurality of NVM modules 1826 is copied to the volume B composed of the one or a plurality of NVM modules 1826. Although the processing has been described, even when the volume B is configured as the volume B ′ configured from the SSD 111 or the HDD 112 and the data stored in the volume A configured from one or more NVM modules 1826 is copied to the volume B ′. The present invention is effective.

 本発明が適用されるNVMモジュールは、データに付与されている保証コードを変更して要求元に送出する、あるいはNVMモジュール内に格納する機能を有する。この機能により、ストレージ装置は、制御対象とするデータを常に保証コードを付与した状態で管理できる。このため、ストレージ装置は、制御の正しさを確認しながらデータ転送を行うことができ、装置の信頼性を向上できる。 The NVM module to which the present invention is applied has a function of changing the guarantee code given to the data and sending it to the request source, or storing it in the NVM module. With this function, the storage apparatus can manage data to be controlled with a guarantee code always attached. For this reason, the storage apparatus can perform data transfer while confirming correctness of control, and the reliability of the apparatus can be improved.

101:ストレージ装置
102:SAN
103:上位装置
104:管理装置
110:ストレージコントローラ
111:SSD
112:HDD
121:プロセッサ
122:内部SW
123:ディスクインターフェース
124:ホストインターフェース
125:DRAM
126:NVMモジュール
410:FMコントローラ
411:I/Oインターフェース
413:RAM
414:スイッチ
416:データバッファ
417:FMインターフェース
418:データ圧縮/伸長ユニット
 419:パリティ生成ユニット
101: Storage device 102: SAN
103: Host device 104: Management device 110: Storage controller 111: SSD
112: HDD
121: Processor 122: Internal SW
123: Disk interface 124: Host interface 125: DRAM
126: NVM module 410: FM controller 411: I / O interface 413: RAM
414: Switch 416: Data buffer 417: FM interface 418: Data compression / decompression unit 419: Parity generation unit

Claims (13)

 1以上の最終記憶装置と、ホスト計算機と接続するためのホストインターフェースと、プロセッサと、不揮発記憶装置とを少なくとも有するストレージ装置であって、
 前記プロセッサは、前記ホスト計算機からライト先アドレスを指定したライト要求及びライトデータを受信すると、前記ホストインターフェースにおいて前記ライトデータに対して前記ライト先アドレスに基づいて生成される第1情報を付加させ、前記不揮発記憶装置に対して、前記第1情報の付加されたライトデータを格納するよう指示し、
 前記プロセッサはまた、前記不揮発記憶装置に格納された前記ライトデータを読み出すためのリードコマンドを発行する時、前記不揮発記憶装置に対し、前記ライトデータの前記最終記憶装置上の格納先アドレスに基づいて生成される第2情報を付加する旨を指示する情報を前記リードコマンドに含め、
 前記リードコマンドを受信した前記不揮発記憶装置は、前記不揮発記憶装置の有する記憶媒体から前記ライトデータを読み出し、該読み出されたデータに前記第2情報を付加したデータを返却することを特徴とする、
ストレージ装置。
A storage device having at least one or more final storage devices, a host interface for connecting to a host computer, a processor, and a nonvolatile storage device;
When the processor receives a write request and write data designating a write destination address from the host computer, the processor adds the first information generated based on the write destination address to the write data in the host interface, Instructing the nonvolatile storage device to store the write data to which the first information is added,
The processor also issues a read command for reading the write data stored in the nonvolatile storage device based on a storage destination address of the write data on the final storage device to the nonvolatile storage device. Including information instructing to add the generated second information in the read command,
The nonvolatile storage device that has received the read command reads the write data from a storage medium included in the nonvolatile storage device, and returns data obtained by adding the second information to the read data. ,
Storage device.
 前記ストレージ装置は、前記ホスト計算機に対して1または複数のボリュームを提供し、前記プロセッサが前記ホスト先から受信するライト先アドレスは、前記ボリューム上のアドレスであって、
 前記プロセッサは、前記受信したライトデータを前記不揮発記憶装置に格納した後、前記ライトデータの前記最終記憶装置上の格納位置を決定し、
 前記プロセッサはまた、前記ライトデータの前記最終記憶装置上の格納位置を決定した後、前記不揮発記憶装置に格納された前記ライトデータを読み出すための前記リードコマンドを発行することにより前記第2情報の付加されたデータを受信し、前記第2情報の付加されたデータを前記最終記憶装置へと書き込むことを特徴とする、
請求項1に記載のストレージ装置。
The storage device provides one or a plurality of volumes to the host computer, and a write destination address that the processor receives from the host destination is an address on the volume,
The processor stores the received write data in the nonvolatile storage device, and then determines a storage position of the write data on the final storage device,
The processor also determines the storage location of the write data on the final storage device, and then issues the read command for reading the write data stored in the nonvolatile storage device to thereby store the second information. Receiving the added data, and writing the added data of the second information to the final storage device,
The storage apparatus according to claim 1.
 前記不揮発記憶装置は、
 前記第1情報の付加されたライトデータを前記記憶媒体に格納する際、前記第1情報の付加されたライトデータを圧縮して格納し、
 前記プロセッサから前記リードコマンドを受信すると、圧縮された前記第1情報の付加されたライトデータに対して前記第2情報を付加することによって、前記第2情報を付加したデータを生成し、前記生成された第2情報を付加したデータを返却することを特徴とする、
請求項2に記載のストレージ装置。
The nonvolatile storage device is
When storing the write data to which the first information is added in the storage medium, the write data to which the first information is added is compressed and stored,
When the read command is received from the processor, the second information is added to the compressed write data to which the first information is added, thereby generating data with the second information added thereto, and the generation The data added with the second information is returned,
The storage apparatus according to claim 2.
 前記プロセッサが前記不揮発記憶装置に対して、前記第1情報の付加されたライトデータを格納するよう指示する際、前記第1情報の期待値を前記指示に含ませ、
 前記指示を受信した前記不揮発記憶装置は、前記期待値と前記第1情報が一致しているか判定し、一致していない場合には前記プロセッサにエラーを報告することを特徴とする、請求項2に記載のストレージ装置。
When the processor instructs the nonvolatile storage device to store the write data to which the first information is added, the expected value of the first information is included in the instruction,
The non-volatile storage device that has received the instruction determines whether the expected value and the first information match, and if not, reports an error to the processor. The storage device described in 1.
 前記ストレージ装置は、前記最終記憶装置が接続されるディスクインターフェースを有し、
 前記プロセッサが前記第2情報の付加されたデータを前記最終記憶装置に格納する際、前記ディスクインターフェースに前記第2情報の期待値を通知し、
 前記ディスクインターフェースは、前記最終記憶装置に前記第2情報の付加されたデータを転送する時、前記第2情報の付加されたデータに含まれる前記第2情報と、前記第2情報の期待値とが一致しているか判定し、一致していない場合には前記プロセッサにエラーを報告することを特徴とする、請求項4に記載のストレージ装置。
The storage device has a disk interface to which the final storage device is connected,
When the processor stores the data to which the second information is added in the final storage device, the processor notifies the disk interface of the expected value of the second information,
When the disk interface transfers the data to which the second information is added to the final storage device, the second information included in the data to which the second information is added, and an expected value of the second information, The storage apparatus according to claim 4, wherein the storage apparatus determines whether or not they match, and if not, reports an error to the processor.
 前記プロセッサは、前記ホスト計算機から前記ボリューム上アドレスを指定したリード要求を受信すると、
 前記ボリューム上アドレスに対応する前記最終記憶装置上アドレスに格納された前記第2情報の付加されたデータを読み出し、
 前記不揮発記憶装置に対して、前記第2情報の期待値を前記第2情報の付加されたデータを格納する指示に含ませて送信し、
 前記不揮発記憶装置は前記第2情報の付加されたデータを格納する指示を受信すると、前記第2情報の付加されたデータに含まれる前記第2情報と、前記指示に含まれている前記第2情報の期待値とが一致しているか判定し、一致していない場合には前記プロセッサにエラーを報告することを特徴とする、請求項4に記載のストレージ装置。
When the processor receives a read request designating an address on the volume from the host computer,
Read the added data of the second information stored at the address on the final storage device corresponding to the address on the volume;
Sending the expected value of the second information to the nonvolatile storage device in an instruction to store the data to which the second information is added,
When the nonvolatile storage device receives an instruction to store the data to which the second information is added, the second information included in the data to which the second information is added and the second information included in the instruction 5. The storage apparatus according to claim 4, wherein it is determined whether the expected value of the information matches, and if it does not match, an error is reported to the processor.
 前記ストレージ装置は、前記ホスト計算機に対して前記不揮発記憶装置から構成される第1ボリューム及び前記最終記憶装置から構成される第2ボリュームを提供し、
 前記プロセッサが前記ホスト先から受信するライト先アドレスは、前記第1ボリューム上のアドレスであって、
 前記プロセッサは、前記ホスト計算機から前記第1ボリューム上の第1アドレスのデータを前記第2ボリューム上の前記第2アドレスにコピーする指示を受信すると、
 前記不揮発記憶装置に対し、前記ライトデータの前記最終記憶装置上の格納位置に基づいて生成される第2情報を付加する旨を指示する情報を含めたリードコマンドを発行し、
 前記不揮発記憶装置は前記リードコマンドを受信すると、前記記憶媒体から前記リードコマンドで指定されたデータを読み出した後、前記読み出されたデータに付加されている前記第1情報を、前記第2アドレスに基づいて生成される前記第2情報に置換することにより、前記第2情報を付加することを特徴とする、
請求項1に記載のストレージ装置。
The storage device provides the host computer with a first volume composed of the nonvolatile storage device and a second volume composed of the final storage device,
The write destination address that the processor receives from the host destination is an address on the first volume,
When the processor receives an instruction from the host computer to copy the data at the first address on the first volume to the second address on the second volume,
Issuing a read command including information instructing to add second information generated based on a storage position of the write data on the final storage device to the nonvolatile storage device,
Upon receiving the read command, the nonvolatile storage device reads the data specified by the read command from the storage medium, and then uses the second information to add the first information added to the read data. The second information is added by replacing the second information generated based on
The storage apparatus according to claim 1.
 前記最終記憶装置は、前記不揮発記憶装置と同種の記憶装置であることを特徴とする、請求項7に記載のストレージ装置。 The storage device according to claim 7, wherein the final storage device is a storage device of the same type as the non-volatile storage device.  上位装置と接続するためのインターフェースと、不揮発性の記憶媒体とを有し、
前記上位装置からライト要求及び該ライト要求に伴うデータを受領することによって、該データを前記記憶媒体に格納する不揮発記憶装置であって、
 前記データには、前記データの格納位置に固有の情報である第1情報が付加されており、前記ライト要求には少なくとも、前記データの前記不揮発記憶装置内の格納位置及び前記第1情報の期待値とが含まれており、
 前記不揮発記憶装置は、前記上位装置から前記ライト要求及び前記ライト要求に伴うデータを受領したとき、前記データに付加された前記第1情報及び前記第1情報の期待値とを比較し、比較の結果が正常の場合に前記データを前記記憶媒体に格納し、
 前記上位装置から、リード要求であって、前記データの格納位置に固有の情報である第2情報が指定されたリード要求を受信すると、
 前記記憶媒体から前記リード要求で指定されたデータを読み出し、該読み出されたデータに前記リード要求に含まれる前記第2情報を付加したデータを、前記上位装置へ返却する、
ことを特徴とする、不揮発記憶装置。
An interface for connecting to a host device and a non-volatile storage medium;
A nonvolatile storage device that stores the data in the storage medium by receiving a write request and data accompanying the write request from the host device,
The data is added with first information that is unique to the storage location of the data, and at least the storage location of the data in the nonvolatile storage device and the expectation of the first information are included in the write request. Value and
When the nonvolatile storage device receives the write request and the data accompanying the write request from the host device, it compares the first information added to the data and the expected value of the first information, and compares Storing the data in the storage medium when the result is normal,
When a read request is received from the higher-level device and the second information is specified as information unique to the storage location of the data,
Reading the data specified by the read request from the storage medium, and returning the data added with the second information included in the read request to the read data to the host device;
A non-volatile memory device.
 前記不揮発記憶装置は、
 前記第1情報の付加されたデータを前記記憶媒体に格納する際、前記第1情報の付加されたデータを圧縮して格納し、
 前記上位装置から前記リード要求を受信すると、圧縮された前記第1情報の付加されたデータに対して前記第2情報を付加することによって、前記第2情報を付加したデータを生成し、前記生成された第2情報を付加したデータを前記上位装置に返却することを特徴とする、請求項9に記載の不揮発記憶装置。
The nonvolatile storage device is
When storing the data to which the first information is added in the storage medium, the data to which the first information is added is compressed and stored,
When the read request is received from the host device, the second information is added to the compressed data to which the first information is added, thereby generating data with the second information added thereto, and the generation 10. The nonvolatile memory device according to claim 9, wherein the data added with the second information is returned to the host device.
 前記上位装置から受信する前記リード要求には、前記第1情報の期待値が含まれており、
 前記リード要求を受信した前記不揮発記憶装置は、前記圧縮された前記第1情報の付加されたデータを伸長し、前記伸長したデータに付加されている前記第1情報と前記第1情報の期待値とが一致しているか判定し、一致していない場合には前記上位装置にエラーを報告することを特徴とする、請求項10に記載の不揮発記憶装置。
The read request received from the host device includes an expected value of the first information,
The nonvolatile storage device that has received the read request decompresses the data to which the compressed first information is added, and the first information and the expected value of the first information added to the decompressed data The nonvolatile memory device according to claim 10, wherein an error is reported to the higher-level device if the two are not matched.
 前記上位装置から、前記第2情報が指定された前記リード要求を受信し、前記記憶媒体から前記リード要求で指定されたデータを読み出した後、前記読み出されたデータに付加されている前記第1情報の格納されている領域に前記第2情報を格納することにより、前記第2情報を付加することを特徴とする、請求項9に記載の不揮発記憶装置。 The read request in which the second information is specified is received from the host device, the data specified in the read request is read out from the storage medium, and then the first information added to the read data is added. The non-volatile memory device according to claim 9, wherein the second information is added by storing the second information in an area where one information is stored.  前記不揮発記憶装置は、
 前記第1情報の付加されたデータを前記記憶媒体に格納する際、前記第1情報の付加されたデータを圧縮して格納し、
 前記上位装置から前記リードコマンドを受信すると、圧縮された前記第1情報の付加されたデータを前記記憶媒体から読み出した後伸長し、前記伸長されたデータに付加されている前記第1情報の格納されている領域に前記第2情報を格納することにより、前記第2情報を付加し、前記第2情報を付加したデータを前記上位装置に返却することを特徴とする、請求項12に記載の不揮発記憶装置。
The nonvolatile storage device is
When storing the data to which the first information is added in the storage medium, the data to which the first information is added is compressed and stored,
When the read command is received from the host device, the compressed data to which the first information is added is read out from the storage medium and then decompressed, and the first information added to the decompressed data is stored. 13. The storage device according to claim 12, wherein the second information is added to the area where the second information is added, and the data to which the second information is added is returned to the host device. Non-volatile storage device.
PCT/JP2014/053000 2014-02-10 2014-02-10 Storage device Ceased WO2015118680A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/053000 WO2015118680A1 (en) 2014-02-10 2014-02-10 Storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/053000 WO2015118680A1 (en) 2014-02-10 2014-02-10 Storage device

Publications (1)

Publication Number Publication Date
WO2015118680A1 true WO2015118680A1 (en) 2015-08-13

Family

ID=53777506

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/053000 Ceased WO2015118680A1 (en) 2014-02-10 2014-02-10 Storage device

Country Status (1)

Country Link
WO (1) WO2015118680A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019212175A (en) * 2018-06-07 2019-12-12 株式会社日立製作所 Storage control system, and storage control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006072435A (en) * 2004-08-31 2006-03-16 Hitachi Ltd Storage system and data recording method
JP2008009635A (en) * 2006-06-28 2008-01-17 Hitachi Ltd Storage system and data protection method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006072435A (en) * 2004-08-31 2006-03-16 Hitachi Ltd Storage system and data recording method
JP2008009635A (en) * 2006-06-28 2008-01-17 Hitachi Ltd Storage system and data protection method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019212175A (en) * 2018-06-07 2019-12-12 株式会社日立製作所 Storage control system, and storage control method

Similar Documents

Publication Publication Date Title
US9304685B2 (en) Storage array system and non-transitory recording medium storing control program
JP5937697B2 (en) Storage system
US9811277B2 (en) Information processing system
JP6212137B2 (en) Storage device and storage device control method
US8850114B2 (en) Storage array controller for flash-based storage devices
US8862808B2 (en) Control apparatus and control method
JP5722500B2 (en) Remote copy system and remote copy control method
US9465561B2 (en) Storage system and storage control method
US20080201392A1 (en) Storage system having plural flash memory drives and method for controlling data storage
US20050144382A1 (en) Method, system, and program for managing data organization
US20060156059A1 (en) Method and apparatus for reconstructing data in object-based storage arrays
JP6429963B2 (en) Storage device and storage device control method
US10019315B2 (en) Control device for a storage apparatus, system, and method of controlling a storage apparatus
JP2011180831A (en) Semiconductor memory device
WO2015052833A1 (en) Storage device, storage system, and storage device control method
WO2015015611A1 (en) Storage system and data write method
JP6666540B2 (en) Storage control device and program
WO2015075837A1 (en) Storage device and control method therefor
CN104166601B (en) The backup method and device of a kind of data storage
US10691550B2 (en) Storage control apparatus and storage control method
US11487428B2 (en) Storage control apparatus and storage control method
US7716519B2 (en) Method and system for repairing partially damaged blocks
JP6451769B2 (en) Storage control device and storage control program
WO2015118680A1 (en) Storage device
JP6163588B2 (en) Storage system

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: 14881826

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: 14881826

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP