WO2015155824A1 - ストレージシステム - Google Patents

ストレージシステム Download PDF

Info

Publication number
WO2015155824A1
WO2015155824A1 PCT/JP2014/060126 JP2014060126W WO2015155824A1 WO 2015155824 A1 WO2015155824 A1 WO 2015155824A1 JP 2014060126 W JP2014060126 W JP 2014060126W WO 2015155824 A1 WO2015155824 A1 WO 2015155824A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage
data
storage device
write
write data
Prior art date
Application number
PCT/JP2014/060126
Other languages
English (en)
French (fr)
Inventor
匡人 仁科
朋宏 吉原
弘明 圷
純司 小川
俊二 川村
Original Assignee
株式会社日立製作所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2014/060126 priority Critical patent/WO2015155824A1/ja
Priority to US15/127,838 priority patent/US20170097795A1/en
Publication of WO2015155824A1 publication Critical patent/WO2015155824A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0688Non-volatile semiconductor memory arrays
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/60Details of cache memory

Definitions

  • the present invention relates to a storage system using a flash memory as a storage device and a control method thereof.
  • the storage controller of the storage system temporarily stores a plurality of write data coming from a host device such as a host computer in a disk cache. Thereafter, when write data stored on the disk cache is stored in a final storage device such as an HDD, write data in a certain address range may be collectively written to the storage device. At this time, in the area within the fixed address range, an area where write data has arrived and an area not so may be mixed. For the area where the write data has arrived, the write data exists on the disk cache, but the data in the other area does not exist on the disk cache. In such a case, data that is not on the disk cache is read from the storage device to the cache (slack read), and the efficiency is improved so that writing to the storage device can be performed only once.
  • the data read from the storage device (data not updated from the host) is also written in the storage device.
  • the storage device is a flash storage that uses a flash memory as a storage medium
  • the number of writes to the flash memory increases and the rewrite life of the flash memory is shortened.
  • Patent Document 1 In order to extend the life of the flash memory, a technique as disclosed in Patent Document 1 is known.
  • Patent Document 1 before a storage device using a storage medium such as a flash memory having an upper limit on the number of rewrites stores update request data (new data) from a higher-level device in the storage medium, the storage device A technique is disclosed in which data (old data) is read, old and new data are compared, and if they do not match, the entire new data is written to the storage device, and if they match, the new data is not written to the storage device. .
  • new data having the same contents as the old data need not be written to the storage device, so that the number of rewrites of the storage medium is reduced, and as a result, the life of the storage medium can be extended.
  • An object of the present invention is to reduce the write amount to the storage device without degrading the performance of the RAID storage controller and the storage device.
  • the storage system includes at least a controller and at least one storage device having a nonvolatile storage device.
  • the storage system stores the write data from the host computer in the storage device, it transmits a command including the write data storage range instruction and the write data.
  • the storage device that has received the command compares the write data with the pre-update data of the write data stored in the storage range of the storage device, and stores only the portions with different contents in the storage device. Store.
  • the number of flash memory rewrites can be reduced without degrading the performance of the storage system.
  • FIG. 1 is a hardware configuration diagram of the computer system according to the first embodiment.
  • FIG. 2 is a hardware configuration diagram of the flash storage according to the first embodiment.
  • FIG. 3A illustrates programs and tables stored in the LM of the storage apparatus according to the first embodiment.
  • FIG. 3B illustrates a program stored in the package memory of the flash storage according to the first embodiment.
  • FIG. 4 shows a configuration example of the compare write support management table in the first embodiment.
  • FIG. 5 shows an example of summary writing according to the first embodiment.
  • FIG. 6 is a flowchart of the batch writing process of the storage controller according to the first embodiment.
  • FIG. 7 is a flowchart of the compare write processing of the flash storage according to the first embodiment.
  • FIG. 1 is a hardware configuration diagram of the computer system according to the first embodiment.
  • FIG. 2 is a hardware configuration diagram of the flash storage according to the first embodiment.
  • FIG. 3A illustrates programs and tables stored in the LM of the storage apparatus according to the first embodiment.
  • FIG. 8A illustrates programs and tables stored in the LM of the storage apparatus according to the second embodiment.
  • FIG. 8B illustrates a program stored in the package memory of the flash storage according to the second embodiment.
  • FIG. 9 shows an example of summary writing in the second embodiment.
  • FIG. 10 is a flowchart of the storage controller batch writing process according to the second embodiment.
  • FIG. 11 is a flowchart of compare write processing of the flash storage according to the second embodiment.
  • FIG. 12A illustrates programs and tables stored in the LM of the storage apparatus according to the third embodiment.
  • FIG. 12B illustrates a program stored in the package memory of the flash storage according to the third embodiment.
  • FIG. 13A shows the contents of the write method determination information table.
  • FIG. 13B shows a configuration example of a drive information entry in the write method determination information table.
  • FIG. 14 is a flowchart of the storage controller batch writing process according to the third embodiment.
  • FIG. 15 illustrates an example of a write method determination criterion for the storage controller according to the third embodiment.
  • FIG. 16 illustrates an example of summary writing according to the fourth embodiment.
  • FIG. 17A illustrates programs and tables stored in the LM of the storage apparatus according to the fourth embodiment.
  • FIG. 17B illustrates a program stored in the package memory of the flash storage according to the fourth embodiment.
  • FIG. 18 is a flowchart of the batch writing process of the storage controller according to the fourth embodiment.
  • FIG. 19 is a flowchart of the update position designation write process of the flash storage according to the fourth embodiment.
  • FIG. 20 illustrates an example of a data format when the storage controller according to the fourth embodiment transfers data to the storage device.
  • xxx table various types of information may be described using the expression “xxx table”, but the various types of information may be expressed using a data structure other than a table. In order to show that it does not depend on the data structure, the “xxx table” can be called “xxx information”.
  • the process may be described with “program” as the subject, but the program is executed by a processor (for example, a CPU (Central Processing Unit)) to appropriately store the determined process. Since processing is performed using resources (for example, memory) and communication interface devices (for example, communication ports), the subject of processing may be a processor.
  • the processor may have dedicated hardware in addition to the CPU.
  • the computer program may be installed in each computer from a program source such as a program distribution server or a storage medium.
  • Each element for example, a drive
  • Each element is managed so as to be identifiable by an ID, a number, etc.
  • ID for example, a drive
  • number for example, a number
  • other types of identification information such as a name may be used.
  • FIG. 1 is a hardware configuration diagram of the computer system according to the first embodiment.
  • the computer system includes one or more host computers (hereinafter also referred to as hosts) 30, a management computer 20, and a storage device 10.
  • hosts one or more host computers (hereinafter also referred to as hosts) 30, a management computer 20, and a storage device 10.
  • the host computer 30 and the storage device (also called storage system) 10 are connected via a data network 40.
  • the data network 40 is, for example, a SAN (Storage Area Network) configured by a combination of a fiber channel cable and a fiber channel switch.
  • the data network 40 may be an IP network or any other type of data communication network.
  • the host computer 30, the management computer 20, and the storage device 10 are connected via a management network 50.
  • the management network 50 is, for example, an IP network.
  • the management network 50 may be a local area network, a wide area network, or any other type of network.
  • the data network 40 and the management network 50 may be the same network.
  • the storage apparatus 10 accommodates a plurality of storage devices (also called drives) 160 (160a, 160b) and a storage controller 170 for storing data (user data) sent from the host computer.
  • the storage device 160 mounted in the storage apparatus 10 includes a hard disk drive (HDD) having a magnetic disk that is a nonvolatile recording medium, a solid state drive (SSD) mounted with a nonvolatile semiconductor memory, and a compare write processing function described later.
  • HDD hard disk drive
  • SSD solid state drive
  • a flash storage or the like provided with is used.
  • the storage apparatus 10 is not limited to a configuration in which only one specific type of storage device is mounted. HDDs, SSDs, flash storages, and the like may be installed together.
  • the storage apparatus 10 manages a plurality of storage devices 160 as one or a plurality of RAID (Redundant Arrays of Independent / Independent Disks) groups.
  • RAID Redundant Arrays of Independent / Independent Disks
  • the write data from the host computer 30 is stored in a RAID group composed of (n + m) storage devices 160 (n ⁇ 1, m ⁇ 1)
  • the write data is stored in a predetermined range of the n storage devices 160.
  • m redundant data (parity) is generated based on the write data, and the parity is stored in a predetermined range of the remaining m storage devices.
  • the storage controller 170 includes a front-end package (FEPK) 100 for connecting to a host computer, a back-end package (BEPK) 140 for connecting to a storage device 160, a cache memory package (CMPK) 130 for mounting a cache memory, It has a microprocessor package (MPPK) 120 on which a microprocessor that performs processing is mounted, and an internal network 150 that connects them.
  • FEPK front-end package
  • BEPK back-end package
  • MPPK microprocessor package
  • MPPK microprocessor package
  • the storage apparatus 10 of this example includes a plurality of FEPKs 100, a plurality of BEPKs 140, a plurality of CMPKs 130, and a plurality of MPPKs 120.
  • Each FEPK 100 has an interface (I / F) 101 for connecting to the host computer 30, a transfer circuit 102 for transferring data in the storage apparatus 10, and a buffer 103 for temporarily storing data on the substrate.
  • the interface 101 can include a plurality of ports, and each port can be connected to a device connected to the SAN 40 such as the host computer 30.
  • the interface 101 uses a protocol used for communication between the host computer 30 and the storage apparatus 10, for example, Fiber Channel (FC), iSCSI (Internet SCSI), or Fiber Channel Over Ethernet (FCoE) in the internal network 150. Convert to a protocol, for example, PCI-Express.
  • Each BEPK 140 has an interface (I / F) 141 for connecting to the storage device 160, a transfer circuit 142 for transferring data in the storage apparatus 10, and a buffer 143 for temporarily storing data on the substrate.
  • the interface 141 can include a plurality of ports, and each port is connected to the storage device 160.
  • the interface 141 converts a protocol used for communication with the storage device 160, for example, FC, into a protocol used in the internal network 150.
  • Each CMPK 130 has a cache memory (CM) 131 for temporarily storing user data read and written from the host computer 30 and a shared memory (SM) 132 for storing control information handled by one or a plurality of MPPKs 120 on the substrate.
  • CM cache memory
  • SM shared memory
  • a plurality of MPPKs 120 (microprocessors) in charge of different volumes can access the shared memory 132.
  • Data and programs handled by the MPPK 120 are loaded from the nonvolatile memory or the storage device 160 in the storage apparatus 10.
  • the cache memory 131 and the shared memory 132 may be mounted on different substrates (in a package).
  • Each MPPK 120 includes one or more microprocessors (sometimes abbreviated as processors) 121, a local memory (LM) 122, and a bus 123 connecting them.
  • processors sometimes abbreviated as processors
  • LM local memory
  • bus 123 connecting them.
  • a plurality of microprocessors 121 are mounted.
  • the number of microprocessors 121 may be one.
  • the plurality of microprocessors 121 are substantially one processor.
  • the local memory 122 stores programs executed by the microprocessor 121 and control information used by the microprocessor 121.
  • FIG. 2 is a diagram illustrating a configuration example of flash storage, which is an example of the storage device 160 according to the first embodiment.
  • the flash storage 160b includes a package processor 161, a package memory 162, a cache memory 163, a bus transfer device 164, and one or more flash memories 165 that are storage media for storing write data from the storage controller 170. Further, a port (not shown) for connecting to an external device such as the storage controller 170 (the interface 141 of the BEPK 140 therein) is also included.
  • Package memory 162 stores a program executed by package processor 161 and control information used by package processor 161.
  • the cache memory 163 temporarily stores user data read and written from the storage controller 170.
  • the flash storage 160b supports the compare write processing function described below. The details of the compare write processing function will be described later.
  • the write data new data
  • the flash storage 160b that supports the compare write processing function is referred to as a storage device that does not support the compare write processing function, such as a conventional SSD or HDD
  • storage device 160b storage device that supports the compare write processing function and other storage devices (storage devices that do not support the compare write processing function)
  • storage device 160 storage device 160”.
  • the configuration of the flash storage 160b is not limited to the configuration described with reference to FIG. 2, and for example, each function described in each embodiment of the present specification may be implemented in an SSD.
  • FIG. 3A illustrates an example of programs and control information stored in the LM 122 of the storage controller 170 according to the first embodiment.
  • the LM 122 stores a batch writing processing program 1220, an input / output processing program 1221, a cache management program 1222, an OS 1223, and a compare write support management table 1224.
  • the compare write support management table 1224 may be stored in the SM 132, may be stored in the CM 131, or may be stored in the storage device 160.
  • FIG. 3B shows an example of a program stored in the package memory 162 in the flash storage 160b according to the first embodiment.
  • the package memory 162 stores a cache management program 1620, an input / output processing program 1621, and a compare write program 1622.
  • FIG. 4 is a diagram illustrating a configuration example of a compare write support management table according to the first embodiment.
  • the compare write support management table 1224 has a drive ID column 12240 and a compare write support presence / absence column 12241.
  • the compare write support presence / absence column 12241 stores information indicating whether or not the storage device 160 specified by the identifier stored in the drive ID column 12240 is a storage device that supports a compare write processing function described later. For example, “support” is stored for the storage device 160 that supports the compare write processing function, and “unsupported” is stored for the storage device 160 that does not support the compare write processing function.
  • CMPK 130 there are a storage apparatus 10 and a host computer 30 that issues an I / O request.
  • CMPK 130 there are a CMPK 130 and a flash storage 160b.
  • the cache memory 131 in the CMPK 130 stores new data 1310 written from the host and old data 1311 read from the flash storage 160b.
  • the flash storage 160b includes a cache memory 163 and a flash memory 165.
  • the cache memory 163 temporarily stores new data 1630 written from the storage controller 170 and old data 1631 read from the flash memory.
  • the host computer 30 transmits a write request (write command) and write data associated with the write request to the storage apparatus.
  • the storage controller 170 in the storage device includes a fixed address range of the flash storage 160b among the plurality of write data from the host computer 30 (a fixed address range is, for example, a stripe (which is a unit for distributed storage of data in a RAID group) Alternatively, write data to be stored in a range corresponding to the size of an integer multiple of the stripe, etc.) are collectively written to the flash storage 160b (collective writing). For this reason, there are a plurality of updated portions in a certain address range. In FIG. 4, a box written as “new” in the cache memory 131 represents an updated portion. In FIG. 4, there are two update locations, but three or more update locations may be included.
  • the storage controller 170 reads the old data 1311 from the flash storage 160b in order to complement data in an area that has not been updated from the host computer 30 within a certain address range.
  • the storage controller 170 merges the new data 1310 written from the host 30 and the old data 1311 read from the flash storage 160b, and sends a compare write request (a command for instructing execution of the compare write processing function) to the flash storage 160b. Is issued.
  • the compare write request includes information on the write destination address range on the flash storage 160b of the write target data (new data 1310 merged with the old data 1311).
  • the address range information is usually composed of a head address and a data length, but may be composed of other information (for example, a head address and a terminal address).
  • the new data 1630 written to the flash storage 160b includes a new data 1310 area updated by the host write and an old data 1311 area read from the flash storage 160b.
  • the flash storage 160b that has received the compare write request compares the old data 1631 stored in the flash storage 160b with the new data 1630 received by the compare write request, and identifies the updated part.
  • the data comparison unit may be a minimum unit for reading and writing (512-byte sector) when the host computer accesses the storage apparatus 10, a page which is the minimum access unit of the flash memory 165, etc. (for example, the data comparison unit is a sector)
  • the new data and the old data are compared for each unit (one sector)
  • all the data all bits in one unit (one sector))
  • the storage device (flash storage) 160 transmits at least one compare write request from the storage controller 170.
  • the comparison is performed in units of a size smaller than the size of data in a certain address range (for example, one stripe or an integer multiple of stripes). If the comparison unit is the minimum read / write unit (one sector or the like) when the host computer accesses the storage apparatus 10, the difference between the new data and the old data is determined finely. There is an advantage that an improvement in reduction effect can be expected. Further, when the comparison unit is a page unit that is the minimum unit of reading and writing of the flash memory 165 used as the storage medium by the flash storage 160b, there is an advantage that management of the storage area in the flash storage 160b is simplified.
  • the updated part is specified based on the comparison result, the updated part specified by the flash storage 160b and the new data 1310 actually written by the host computer 30 do not always match. Since the new data 1310 actually written by the host computer 30 may include the same part as the old data, the data amount of the updated part specified by the flash storage 160b is The data amount of the new data 1310 actually written by the host computer 30 may be smaller.
  • the flash storage 160b has a write command supported by a storage device such as a conventional HDD or SSD (that is, without comparing new data with old data). , Simply write new data specified).
  • a write command supported by a storage device such as a conventional HDD or SSD is referred to as a “normal write request”.
  • the flash storage 160b When the flash storage 160b according to the embodiment of the present invention receives a normal write request from the storage controller 170, the flash storage 165 simply stores new data specified in the same manner as the write processing performed in the conventional storage device. Process to store in. Only when a compare write request is received from the storage controller 170, only the processing described above, that is, only the new data 1630 in the area where the values of the old data 1631 and the new data 1630 are different is stored in the flash memory 165 in the flash storage 160b. Perform the process.
  • FIG. 6 is a flowchart for explaining the process of the batch writing program 1220 executed by the processor 121 of the storage controller 170.
  • the summary writing program 1220 operates to store an updated portion within a certain address range in the storage device 160 at an appropriate timing. The processing of each step described below is performed by the processor 121 executing the batch writing program 1220 unless otherwise specified.
  • step S100 old data in a certain address range including the update location (hereinafter referred to as a write target range) is read from the storage device 160 into the cache memory 131.
  • step S101 in order to create redundant data (parity), the old parity corresponding to the data read in step S100 is read from the storage device 160 that stores the parity.
  • the storage device 160 accessed in step S100 is different from the storage device 160 accessed in step S101 (storage device for storing parity).
  • the address range in which the old parity is stored is the same as the address range in which the old data corresponding to the old parity is stored (in the storage device that stores the data). is there.
  • the address range in which the old parity is stored may differ from the address range in which the old data is stored. Even in such a case, the present invention is effective.
  • step S102 a new parity is generated using the old data read in step S100, the old parity read in step S101, and the new data that is the updated portion written from the host computer 30.
  • a method for generating a new parity an XOR operation may be used, or another operation method in which redundancy is ensured may be used.
  • step S103 the old data read in step S100 and the update data written from the host computer 30 are merged to generate data to be written to the storage device 160.
  • step S104 the write method is determined. For example, in the write method determination, when it is determined that the effect of reducing the number of rewrites of the flash memory 165 is relatively high by using the compare write processing function, the determination is made such that the write method using the compare write is selected. It is good to do.
  • the write target storage device 160 is a storage device that supports the compare write processing function, and there are two or more continuous areas to be written in the current write target range (that is, from the host computer 30). Compare write is performed if at least one part that has not been updated is included), and normal write is performed otherwise.
  • the compare write support management table 1224 may be referred to.
  • the load status and life of the storage controller 170 and the storage device 160 may be used as a determination criterion for the write method determination.
  • the load status, the lifetime, and the like are used as a criterion will be described.
  • Step S105 and step S106 are executed when it is determined in step S104 that the compare write is to be used (compare write execution).
  • step S105 the write data generated in step 103 is transferred to the storage device 160 using the compare write request.
  • step S106 the new parity generated in step S102 is transferred to the storage device 160 using the compare write request.
  • Step S107 is executed when it is determined in step S104 that the normal write is performed.
  • the write data generated in step 103 is transferred to the storage device 160 using the normal write request.
  • the normal parity request is used to transfer the new parity generated in step S102 to the storage device 160.
  • FIG. 6 has been described assuming that the RAID type of the RAID group is RAID 5, other RAID types (for example, RAID 1 and RAID 6) may be used.
  • RAID 1 RAID 1
  • step S101, step S102, step S106, and step S108, which are processes for parity calculation, are not required, but step S105 (or step S107) is performed multiple times for different storage devices 160. Is done.
  • step S105 or step S107
  • Q parity is added.
  • FIG. 7 is a flowchart for explaining the processing of the compare write program 1622 of the flash storage 160b.
  • the compare write program 1622 operates when a compare write request or normal write request is received from the storage controller 170.
  • the processing of each step described below is performed when the package processor 161 of the flash storage 160b executes the compare write program 1622 unless otherwise specified.
  • step S110 the write data is stored in the cache memory 163.
  • step S111 the request method of the storage controller 170 is determined.
  • step S112 is performed, and when the storage controller 170 has issued a normal write request, step S115 is performed.
  • step S112 old data corresponding to the new data received in step S110 is read from the flash memory 165 to the cache memory 163. If old data exists in the cache memory before reading the old data in step S112, it is not necessary to read the old data from the flash memory.
  • step S113 the new data received at the time of the compare write request is compared with the old data read out in step S112, and the updated part (the part where the contents of the new data and the old data are different) is specified.
  • the comparison unit can be compared in various units.
  • the flash storage 160b according to the embodiment of the present invention, it is transmitted with a single compare write request from the storage controller 170.
  • the new data and the old data are compared for each size (sector, page, etc.) smaller than the size of the data in the address range.
  • the comparison between the new data and the old data may be performed by the package processor 161, or hardware dedicated to data comparison is provided in the flash storage 160b, and the package processor 161 stores data in the hardware dedicated to data comparison. You may make it perform a comparison.
  • step S114 only the updated part specified in step S113 is stored in the flash memory 165.
  • step S115 the write data received from the storage controller 170 in S110 is stored in the flash memory 165 as it is.
  • a function that can be designated from the outside is provided so that the data is preferentially left in the cache memory 163, and the processing of the flash storage 160b is performed.
  • a method of reducing the load can also be adopted.
  • the batch writing program 1220 the processor 121 that executes it
  • the flash storage 160b may be instructed to preferentially leave the data read out in the cache memory 163 of the flash storage 160b in step S100 (or step S101).
  • the priority cache By specifying the priority cache, it is not necessary to read old data / old parity from the flash memory 165 to the cache memory 163 in step S112, so that the processing load of the flash storage 160b can be reduced.
  • the priority cache designation may be issued explicitly by the processor 121 or after the flash storage 160b uses the old data left in the cache memory 163 in step S113, the flash storage 160b voluntarily releases it. You may do it.
  • the timing at which the completion response of the compare write request is returned to the storage controller 170 may be immediately after step S110 in which the flash storage 160b stores the write data received from the storage controller 170 in the cache memory 163, or the processing of FIG. It may be after completion.
  • the write method may be determined by the flash storage 160b.
  • the processor 121 of the storage controller 170 does not perform step S104 of FIG. 6 and issues a normal write request unconditionally to the flash storage 160b.
  • the flash storage 160b that has received the write request performs a write method determination instead of the request method determination in step S111.
  • the load state of the flash storage 160b is managed. If the load is higher than a predetermined threshold, the normal write method is used. If the load is lower (below the predetermined threshold), the write method is determined.
  • a method such as a compare write method is conceivable.
  • Example 2 of the present invention will be described with reference to FIGS.
  • the configuration of the storage apparatus 10 according to the second embodiment is the same as that of the storage apparatus 10 according to the first embodiment described with reference to FIG.
  • the storage device 160 according to the second embodiment is different from the storage device 160 according to the first embodiment in that it has a function of assisting parity calculation.
  • the function of assisting the parity operation may be realized by a program executed by the package processor 161, or may be configured to implement hardware such as a dedicated ASIC that performs the parity operation.
  • a configuration using a flash storage 160b having a function of assisting parity calculation will be described. Only the differences from the first embodiment will be described below.
  • the function of assisting the parity operation is a technique disclosed in, for example, US Patent Application Publication No. 2013/0290773, and the storage device 160 performs exclusive OR (write data and pre-update data of the write data). XOR) and the like, a function of transmitting the generated XOR calculation result to the outside, and the like.
  • the outline of the parity generation method of the storage apparatus 10 using the storage device 160 having the function of assisting the parity calculation is as follows.
  • the storage controller transmits update data to the storage device 160 storing the pre-update data of the update data together with a new data transmission request.
  • the storage device 160 receives the new data transmission request, the storage device 160 stores the update data in the storage device.
  • pre-update data corresponding to the update data is also stored in the storage device. This is because it is necessary for generation of intermediate parity, which will be described later.
  • the storage controller issues an intermediate parity read request to the storage device 160.
  • the storage device 160 calculates the intermediate parity from the update data and the pre-update data, and returns the calculated intermediate parity to the storage controller. For example, an XOR operation is used as the intermediate parity calculation method.
  • the storage controller 170 transmits the intermediate parity together with an intermediate parity write request to the storage device 160 that stores the parity.
  • the storage device 160 that stores the parity receives the intermediate parity write request, it generates an updated parity from the intermediate parity received in the previous request and the pre-update parity, and stores it in its own storage device. At this time, the intermediate parity and the parity before update are held.
  • the storage controller issues a purge (commit) request to the storage device 160 that stores the update data and the storage device 160 that stores the parity.
  • the storage device 160 that stores the parity receives the commit request, the storage device 160 discards the intermediate parity and the pre-update parity received in the previous request, and determines the post-update parity as formal data.
  • the storage device 160 that stores the update data discards the pre-update data and determines the post-update data as formal data.
  • FIG. 8A shows an example of programs and control information stored in the LM 122 of the storage controller 170 according to the second embodiment.
  • the LM 122 stores a batch writing processing program 1220, an input / output processing program 1221, a cache management program 1222, an OS 1223, and a compare write support management table 1224.
  • the compare write support management table 1224 may be stored in the SM 132, may be stored in the CM 131, or may be stored in the storage device 160.
  • FIG. 8B shows an example of programs and control information stored in the package memory 162 in the flash storage 160b according to the second embodiment.
  • the package memory 162 stores a cache management program 1620, an input / output processing program 1621, an intermediate parity read processing program 1623, an intermediate parity write processing program 1624, and a new data write processing program 1625.
  • Example 2 The outline of Example 2 will be described with reference to FIG. In the following description, a flow of processing when the storage controller 170 performs batch writing processing of data (and parity corresponding to the data) to the storage devices 160 constituting the RAID group will be described.
  • An example in which the RAID type of the RAID group (data redundancy method in RAID technology) is RAID 5, that is, a parity generated by XOR operation for one storage device 160 will be mainly described.
  • a storage device 10 and a host computer 30 that issues I / O.
  • a cache memory 131, a storage controller 170 including a buffer 143, a first flash storage 160b for storing user data (write data received from the host computer 30), and a parity corresponding to the user data are stored.
  • Each flash storage 160 b includes a cache memory 163 and a flash memory 165.
  • the cache memory 131 of the storage controller 170 stores new data 1310 written from the host and old data 1311 read from the flash storage 160b.
  • the buffer 143 of the storage controller 170 stores the intermediate parity 1430 read from the flash storage 160b.
  • the flash storage 160b includes a cache memory 163 and a flash memory 165.
  • the cache memory 163 of the first flash storage 160b has new data 1630 written from the host computer 30, old data 1631 read from the flash memory, old data
  • the intermediate parity 1632 generated from the data 1631 and the new data 1630 is stored.
  • the cache memory 163 of the second flash storage 160b stores the intermediate parity 1633 written from the storage controller 170, the old parity 1634 read from the flash memory, and the new parity 1635 generated from the intermediate parity 1633 and the old parity 1634.
  • the flash storage 160b has a function for assisting the parity calculation described at the beginning (new data transmission request, intermediate parity read request, intermediate parity write request, commit request), and a compare new data transmission request. Supports a command called compare intermediate parity write. The operation of the flash storage 160b that has received these commands will be described below.
  • the host computer 30 transmits a write request and write data accompanying the write request to the storage apparatus 10.
  • the storage controller 170 in the storage device 10 collectively writes the write data to be stored in a certain address range to the flash storage 160b (collective writing). For this reason, there are a plurality of updated portions in a certain address range. In FIG. 9, there are two update locations, but three or more update locations may be included.
  • the storage controller 170 reads the old data 1311 from the first flash storage 160b and stores it in the cache memory 131 in order to supplement the data in the area that has not been updated from the host computer 30 within the fixed address range.
  • the storage controller 170 merges the new data 1310 and the old data 1311 written from the host 30 and sends a compare new data transmission request to the first flash storage 160b.
  • the new data 1630 written to the flash storage 160b includes a new data 1310 area updated by the host write and an old data 1311 area read from the flash storage 160b.
  • the compare new data transmission request includes the address range information of the write target data, as in the compare write request described in the first embodiment.
  • the first flash storage 160b that has received the compare new data transmission request is updated by comparing the old data 1631 stored in the first flash storage 160b with the new data 1630 received by the compare new data transmission request. Identify the part.
  • an arbitrary unit can be used as the data comparison unit. Since the updated portion is specified based on the comparison result, the updated portion determined by the flash storage 160b and the new data 1310 actually written by the host computer 30 do not necessarily match.
  • the storage controller 170 issues an intermediate parity read request to the first flash storage 160b, and stores the intermediate parity 1430 read from the first flash storage 160b in the Buffer 143.
  • the example stored in the Buffer 143 is shown, but another area may be used as long as the area can be held until writing to the second flash storage 160b.
  • the first flash storage 160 b that has received the intermediate parity read request generates the intermediate parity 1632 from the new data 1630 and the old data 1631, and transfers the intermediate parity 1632 to the storage controller 170.
  • the first flash storage 160b generates the intermediate parity 1632 at the time of an intermediate parity read request.
  • the first flash storage 160b is generated asynchronously with a command generated when the compare new data is transmitted or from the storage controller 170 (for example, Alternatively, it may be generated at any time from when the compare new data transmission request is issued until the intermediate parity read is performed.
  • the storage controller 170 issues a compare intermediate parity write request to write the intermediate parity 1430 to the second flash storage 160b.
  • the compare intermediate parity write request includes information on the address range of the old parity corresponding to the intermediate parity 1430.
  • the second flash storage 160b that has received the compare intermediate parity write request generates a new parity 1635 from the old parity 1634 stored in the second flash storage 160b and the intermediate parity 1633 written in the storage controller 170.
  • the second flash storage 160 b stores only the new parity 1635 corresponding to the area where the intermediate parity 1633 is not “0” in the flash memory 165.
  • the unit for specifying the new parity 1635 corresponding to the area where the intermediate parity 1633 is not “0” is an arbitrary unit (for example, sector unit, page unit) as in the data comparison unit described in the first embodiment. It is.
  • a new parity 1635 corresponding to an area where the intermediate parity 1633 is not “0” may be specified in units of sectors.
  • the XOR operation In the parity operation of RAID5, the XOR operation is used, and in the XOR operation, the update part is specified by using the property that the area having the same value is 0.
  • the new parity 1635 generated in the second flash storage 160b is compared with the old parity 1634 stored in the second flash storage 160b.
  • the update part may be specified.
  • FIG. 10 is a flowchart for explaining the processing of the summary writing program 1220 of the storage controller 170.
  • the summary writing program 1220 operates to store an updated portion within a certain address range in the storage device 160 at an appropriate timing.
  • the processing of each step described below is performed by the processor 121 executing the batch writing program 1220 unless otherwise specified.
  • Each storage device 160 has a function of assisting the parity calculation described at the beginning of the second embodiment, but only the flash storage 160b has a function of storing only an update part such as a compare new data write request. It is assumed that the other storage device 160 does not have a function of storing only the updated part.
  • step S200 old data in a certain address range including the update location is read from the storage device 160 into the cache memory 131.
  • a data write system determination is performed.
  • the data write method determination can use the same method as described in the first embodiment.
  • Step S202 is executed when it is determined in step S201 that the compare new data transmission request should be used.
  • step S202 the old data read into the cache memory 131 in step S200 and the new data written from the host are merged, and the merged data of the old data is issued as a compare new data transmission request.
  • Step S203 is executed when it is determined in step S201 that a normal new data transmission request should be used.
  • step S203 the old data read into the cache memory 131 in step S200 and the new data written from the host are merged, and the merged data of the old data is issued as a normal new data transmission request. Data is written to the first storage device 160 that stores data.
  • step S204 an intermediate parity read request is issued to the first storage device 160 for storing data, and the intermediate parity is read.
  • step S205 parity write method determination is performed. The write method determination method is performed in the same manner as in step S201. If it is determined that it is appropriate to use the compare intermediate parity write request, step S206 is performed, and if not, step S207 is performed.
  • step S206 the intermediate parity read in step S204 is transmitted to the second storage device 160 storing parity by transmitting the intermediate parity together with the compare intermediate parity write request to the second storage device 160 storing parity.
  • step S207 the intermediate parity is transmitted together with the normal intermediate parity write request to the second storage device 160 that stores the intermediate parity read in step S204.
  • step S208 a request for committing (purging) old data and old parity is issued to the first storage device 160 storing old data and the second storage device 160 storing old parity.
  • the first storage device 160 that has received the commit (purge) request discards the old data, and the second storage device 160 discards the intermediate parity and the old parity.
  • RAID 5 is used, but other RAID types (for example, RAID 6) may be used.
  • RAID 6 in addition to the processing in FIG. 10, processing necessary for generating / updating the second parity is added.
  • FIG. 11 is a flowchart for explaining the intermediate parity writing program 1624 of the flash storage 160b.
  • the intermediate parity write program 1624 operates when an intermediate parity write request (compare intermediate parity write request or normal intermediate parity write request) is received from the storage controller 170.
  • the processing of each step described below is performed by the package processor 161 of the flash storage 160b executing the intermediate parity writing program 1624 unless otherwise specified.
  • step S210 write data (more precisely, intermediate parity) is stored in the cache memory 163.
  • step S211 the old parity is read from the flash memory 165 into the cache memory 163.
  • step S212 a new parity is generated from the old parity read in step S211 and the intermediate parity written from the storage controller 170 in step S210.
  • FIG. 11 describes a method for generating parity for the entire written range. However, before step S210, an updated part equivalent to step S214 (described later) is specified, and a new parity is generated only for the updated part. It may be.
  • step S213 the request method of the storage controller 170 is determined. If the storage controller 170 has issued a compare intermediate parity write request, steps S214 and S215 are performed. If the storage controller 170 has issued a normal intermediate parity write request, step S216 is performed.
  • step S214 the intermediate parity value is confirmed, and an area having a value other than “0” is specified as the update portion.
  • This is a process for specifying the update part using the characteristics of the XOR operation as described in FIG. 9, and when using a calculation method other than the XOR operation, an update part specifying method corresponding to the method is used. It may be used. Further, if the updated part cannot be determined only by confirming the intermediate parity value, the updated part may be specified by comparing the new parity and the old parity.
  • step S215 only the new data area corresponding to the updated part specified in step S214 is stored in the flash memory 165, and the process is terminated.
  • step S215 the created new parity is stored in the flash memory 165 as it is, and the process is terminated.
  • the priority cache designation may be issued explicitly by the storage controller 170, or the flash storage 160b is synchronized with the receipt of a command (purge request) that can be judged as the end of a series of processing as in step S208.
  • the flash storage 160b may be released after being used in the flash storage 160b.
  • timing at which the flash storage 160b returns the response of the intermediate parity write request to the storage controller 170 may be immediately after step S210 in which the write data is stored in the cache memory 163 or after a series of processing is completed.
  • the storage controller 170 determines the write method in steps S201 and S205 of FIG. 10
  • the write method may be determined by the flash storage 160b.
  • the storage controller 170 unconditionally issues a normal write request (new data transmission request, intermediate parity write request), and thus new data is issued to the flash storage 160b. Or write intermediate parity.
  • the flash storage 160b that has received the write request performs a write method determination instead of the request method determination in step S213.
  • a write method determination method for example, the load state of the flash storage 160b is managed, and the normal write method is used when the load is high, and the compare write method is used when the load is low.
  • the new data writing program 1625 in the flash storage 160b is the same as the compare write program 1622 (FIG. 7) described in the first embodiment. However, as described above, by executing the new data writing program 1625, the old data is managed without being discarded so that intermediate parity can be created even after the new data is stored. (The old data and the new data are managed in association with each other, and the old data and the new data are made readable when an intermediate parity read request is received). It is different from processing. When the flash storage 160b receives a purge (commit) request, the old data is discarded (when the flash storage 160b storing the parity receives a purge (commit) request, the old parity and intermediate parity are deleted).
  • the update part is specified by the flash storage 160b has been described.
  • the storage controller 170 in the fourth embodiment specifies the update position using information such as bitmap. Also good.
  • Example 3 of the present invention will be described with reference to FIGS.
  • the information on the presence / absence of support for the compare write processing function of the storage device 160 and the update location information is not used as in the first and second embodiments.
  • An example in which the determination is performed in consideration of information such as the load state and the lifetime of the flash storage 160b is shown.
  • the third embodiment shows an example in which the storage controller 170 holds the write method determination and the write method determination information table 1225 that holds the write method determination information.
  • the same determination and information are stored in the flash storage 160b.
  • the flash storage 160b may determine the write method.
  • both the storage controller 170 and the flash storage 160b may hold the write method determination and the write method determination information table 1225, and the storage controller 170 and the flash storage 160b may determine the write method, respectively.
  • Example 3 only the parts different from Example 1 are described.
  • FIG. 12A illustrates an example of programs and control information stored in the LM 122 of the storage controller 170 according to the third embodiment.
  • the LM 122 stores a summary writing processing program 1220, an input / output processing program 1221, a cache management program 1222, an OS 1223, and a write method determination information table 1225.
  • the write method determination information table 1225 may be stored in the SM 132, may be stored in the CM 131, or may be stored in the storage device 160.
  • FIG. 12B illustrates an example of programs and control information stored in the package memory 162 in the flash storage 160b according to the third embodiment.
  • the package memory 162 stores a cache management program 1620, an input / output processing program 1621, and a compare write program 1622.
  • FIG. 13A shows a configuration example of the write method determination information table 1225 according to the third embodiment.
  • the write method determination information table 1225 includes a processor information entry 12250 and a drive information entry 12252.
  • the processor information entry 12250 stores the average operating rate of the processor.
  • the drive information entry 12252 stores operation information of the storage device 160 (drive). Details of the drive information entry 12252 will be described with reference to FIG. 13B.
  • the operating rate of each processor may be managed, and information corresponding to the processor performing the processing may be used for the determination.
  • information indicating the state of the storage apparatus 10 such as cache information and path information may be considered.
  • the amount of data (dirty data) that has not been written to the storage device 160 on the cache can be used for predicting the drive load (for example, when the amount of dirty data is large, it is determined that the drive load is high).
  • the path load between the storage controller 170 and the storage device 160 it is possible to determine whether or not to implement a method in which only an update part as described later in the fourth embodiment is sent.
  • FIG. 13B shows a configuration example of the drive information entry 12252 in the write method determination information table 1225.
  • the drive information entry 12252 has a drive ID column 122520, a life (remaining number of times) column 122521, an operation rate column 122522, and a compare write support presence / absence column 122523.
  • the drive ID column 122520 stores an identifier for individually identifying the storage device 160 connected to the storage controller 170.
  • the lifetime (remaining number of times) column 122521 the lifetime of the storage device 160 is stored.
  • the number of times of writing is determined for the storage device 160 using the flash memory, and the lifetime (remaining number of times) of the storage device 160 is the remaining number of times that the target storage device can be written (rewritable).
  • the life of the storage device 160 may be acquired periodically from the storage device 160, or acquired from the storage device 160 when connected to the storage apparatus 10, and thereafter the storage controller counts the number of writes.
  • the value stored in the life (remaining number of times) column 122521 may be determined based on the information.
  • the operation rate column 122522 stores the operation rate of the storage device 160.
  • the operating rate of the storage device 160 may be periodically acquired from the storage device 160, or calculated based on the number (frequency) of input / output requests issued by the storage controller 170 to each storage device 160. Good.
  • the compare write support presence / absence column 122523 stores whether the storage device supports the compare write process. “Supported” is stored for the storage device 160 that supports the compare write process, and “unsupported” is stored for the storage device 160 that does not support the compare write process.
  • information indicating the characteristics and status of the drive such as the page size of the storage device 160 may be used for the drive information entry.
  • FIG. 14 is a flowchart for explaining the summary writing program 1220 of the storage controller 170.
  • the summary writing program 1220 operates to store an updated portion within a certain address range in the storage device 160 at an appropriate timing.
  • the processing of each step described below is performed by the processor 121 executing the batch writing program 1220 unless otherwise specified.
  • step S120 the write method is determined using the write method determination information table 1225. Details of the determination of the write method will be described later with reference to FIG. If the write method is determined to be a compare write, step S121 is performed. If it is determined to be a summary write, step S122 is performed. If it is determined to be an individual write, step S123 is performed.
  • step S121 the same processing as in the case where it is determined as a compare write in FIG. 6 is performed.
  • step S122 the same processing as that in the case where it is determined as normal writing in FIG. 6 is performed.
  • step S123 old data in a certain address range including the update location is read from the storage device 160 into the cache memory 131.
  • step S124 the old parity corresponding to the old data is read from the storage device 160.
  • step S125 a new parity is generated from the new data, old data, and old parity.
  • step S126 the update location of the new data is individually written in the storage device 160 by the normal write instruction.
  • step S127 the parity corresponding to the update location is written to the storage device 160 in accordance with the normal write instruction.
  • FIG. 15 is a diagram showing an example of a criterion for determining the write method by the storage controller 170 in a table format (write method determination criterion table).
  • the write method determination criteria table includes a determination condition column 122530 and a determination result column 122540.
  • a determination condition column 122530 represents combinations of determination conditions.
  • the determination condition column 122530 includes compare write support presence / absence 122531, a processor operation rate 122532, a disk operation rate 122533, a disk life 122534, and an update location number 122535.
  • compare write support presence / absence 122531 With the condition of compare write support presence / absence 122531, the entry corresponding to the storage device 160 in the compare write support column 122523 of the write method determination information table 1225 is referred to, and “support” is set when the target storage device 160 supports compare write. "If the compare write is not supported, it is determined as” unsupported ".
  • the processor information 12250 of the write method determination information table 1225 is referred to and it is determined whether or not the operation rate of the MP 121 of the storage controller 170 exceeds M%.
  • the entry corresponding to the storage device 160 in the operation rate column 12252 of the write method determination information table 1225 is referenced to determine whether the operation rate of the storage device 160 exceeds N%.
  • the entry corresponding to the storage device 160 in the life 122521 column of the write method determination information table 1225 is referenced to determine whether the storage device 160 has a remaining life longer than X times.
  • the number of update locations in the write range is the number of areas in the update portion that are included in the write range and the addresses are continuous, and the update location and the update location are divided by unupdated locations. For example, in the case of the new data 1310 in FIG.
  • the thresholds for conditions such as M%, N%, X times and Y locations may be set as fixed values, or may be set by a storage administrator by providing a setting method on a management screen such as GUI, It may change dynamically in combination with other conditions.
  • a plurality of thresholds for determining the condition may be used.
  • the determination result 122540 is determined by other conditions, and “-” is set when the determination condition is not relevant.
  • whether or not old data used for comparison remains in the cache memory 163 of the storage device 160 may be used, and whether or not the data is random write data or sequential write data. Or other information related to write data may be used.
  • a part of the information shown in FIG. 15 may be used for the determination. For example, instead of using both the disk operation rate 122533 and the disk life 122534 for determination, a method using only one of the disk operation rate 122533 and the disk life 122534 may be adopted.
  • a write method to be executed in the case of a combination of each determination result is shown.
  • “summary writing (compare write)” is set.
  • “summary write” is set.
  • the storage controller 170 divides the write range for each update location and each update location should be written to the storage device 160 by a normal write instruction an individual write is set.
  • Example 4 of the present invention will be described with reference to FIGS.
  • Embodiment 4 shows an example in which the storage controller 170 notifies a bit map indicating an update position together with write data as information for specifying the update data position.
  • a bitmap is used as the information for designating the update position.
  • a list of information indicating the start address and the end address may be used, and other information may be used as long as the information can designate the update position. In the present embodiment, only differences from the first embodiment will be described.
  • FIG. 16 is an explanatory diagram of an outline of the fourth embodiment.
  • a storage apparatus 10 and a host computer 30 that issues I / O.
  • a storage controller 170 and a flash storage 160b.
  • the storage controller includes a cache memory 131 and an LM 122.
  • the cache memory 131 stores new data 1310 written by the host computer 30 and old data 1311 read from the flash storage 160b.
  • the LM 122 stores an update bitmap 1229 indicating the update position of the new data 1310.
  • the update bitmap 1229 may be stored in the cache memory 131 or the shared memory 132, or may be stored anywhere as long as the storage controller 170 can access it.
  • the flash storage 160b includes a cache memory 163, a package memory 162, and a flash memory 165.
  • the cache memory 163 stores new data 1630 written from the storage controller 170 and old data 1631 read from the flash memory 165.
  • the package memory 162 stores an update bitmap 1629 transferred from the storage controller 170 together with new data 1630.
  • the update bitmap 1229 may be stored on the cache memory 163, or may be stored anywhere as long as it is accessible from the package processor 161 of the flash storage 160b.
  • the host computer 30 transmits a write request and write data accompanying the write request to the storage apparatus 10.
  • the storage controller 170 that has received the write request from the host computer records the update position in the update bitmap 1229 of the LM 122.
  • the storage apparatus 10 normally has information (dirty bitmap) for specifying an area in which data not reflected in the flash storage 160b is stored in the area on the cache memory 131.
  • the bit of the dirty bitmap corresponding to the area on the cache memory 131 in which the write data is stored is turned ON.
  • the update bitmap 1229 is generated from the dirty bitmap during the update position designation write.
  • the dirty bitmap may be used as the update position designation bitmap 1229 as it is.
  • the update position designation bitmap 1229 may be managed regardless of the dirty bit.
  • the storage controller 170 in the storage device collectively writes the write data to be stored in a certain address range to the flash storage 160b (collective writing). For this reason, there are a plurality of updated portions in a certain address range. In FIG. 16, there are two update locations, but three or more update locations may be included.
  • the storage controller 170 reads the old data 1311 from the flash storage 160b in order to complement data in an area that has not been updated from the host computer 30 within a certain address range.
  • the storage controller 170 generates an update bitmap 1229 from the dirty bitmap.
  • the storage controller 170 merges the new data 1310 written from the host 30 and the old data 1311 read from the flash storage 160b, and issues an update position designation write request to the flash storage 160b together with the update bitmap 1229. Since the storage controller 170 merges and transfers the new data 1310 and the old data 1311 to the new data 1630 written to the flash storage 160b, the area of the new data 1310 updated by the host write and the flash storage 160b There is an area of the old data 1311 that has been read.
  • the flash storage 160b that has received the update position designation write request stores the new data 1630 in the cache memory 163 and the update bitmap 1629 in the package memory 162, respectively.
  • the flash storage 160b refers to the update bitmap 1629, identifies the update location of the new data 1630, and stores only the update location of the new data 1630 in the flash memory 165.
  • the update position designation write request also includes information on the write destination address range of the write target data on the flash storage 160b as in the normal write request, and the flash storage 160b is precisely the update bitmap.
  • the update position (address) of the new data 1630 is specified using 1229 and the write destination address range information.
  • FIG. 16 a method of reading old data from the flash storage 160b as a method of complementing an unupdated portion between areas updated by the host computer 30 has been described. However, instead of the method of reading old data, the storage controller 170 is a dummy. A method may be employed in which data is generated and an unupdated portion between regions updated by the host computer 30 is supplemented with dummy data.
  • a function for attaching a guarantee code for confirming the validity of data for each unit of data stored in the storage device 160 (512-byte sector or the like), or a guarantee code is used. Some of them have a function to perform data inspection.
  • the storage apparatus 10 according to the fourth embodiment when the flash storage 160b has a function of performing a data check using a guarantee code, when the storage controller 170 generates dummy data as unupdated data, a dummy data An intentionally incorrect guarantee code is generated and added as a guarantee code for data, and dummy data to which the intentionally wrong guarantee code is added is written in the storage medium (flash memory 165) in the flash storage 160b. It may not be possible.
  • the storage controller 170 generates the data justified by removing the non-updated part of the new data 1310 (prepared data) without complementing the non-updated part between the areas updated by the host computer, and the update bitmap 1229. At the same time, it may be transferred to the flash storage 160b (FIG. 20). Since the update bitmap 1229 shows an updated part and an unupdated part corresponding to the new data 1310 before being prepended, the flash storage 160b is based on the update bitmap 1629 transferred from the storage controller 170 and is updated from the prepended data. The data can be expanded (on the cache memory 163) to the same data as the new data 1310.
  • Unupdated portions that occur after expansion may be supplemented with dummy data, or old data may be read from the flash memory 165 and supplemented.
  • the flash storage 160b refers to the update bitmap 1629 and stores only the updated portion of the expanded data in the flash memory 165. Since the expanded address can be known by referring to the update bitmap 1629, the padded data may be stored directly in the flash memory 165 while specifying the address using the update bitmap 1629 without expanding the padded data. By transferring the justified data between the storage controller 170 and the flash storage 160b, the flow of data can be suppressed, and the path between the storage controller 170 and the flash storage 160b can be used efficiently.
  • the method of transferring the justified data may be combined with the configuration in which the parity calculation is performed in the flash storage 160b as in the second embodiment.
  • the first storage device when the intermediate parity is read from the first flash storage 160b, the first storage device only has the intermediate parity corresponding to the update portion. May be transferred to the storage controller.
  • the storage controller 170 transfers the front-justified intermediate parity and the update bitmap to the second storage device that stores the old parity.
  • FIG. 17A illustrates an example of programs and control information stored in the LM 122 of the storage controller 170 according to the fourth embodiment.
  • the LM 122 stores a batch writing program 1220, an input / output processing program 1221, a cache management program 1222, an OS 1223, and an update position designation write support management table 1226.
  • the update position designation write support management table 1226 may be stored in the SM 132, the CM 131, the flash storage 160b, or accessible by the storage controller 170. Any area may be used.
  • the details of the update position designation write support management table 1226 are the same as the compare write support management table 1224 (FIG. 4). In order to manage the presence / absence of the update position designation write instead of managing the presence / absence of the compare write support. Used for.
  • FIG. 17B shows an example of programs and control information stored in the package memory 162 in the flash storage 160b according to the fourth embodiment.
  • the package memory 162 stores a cache management program 1620, an input / output processing program 1621, and an update position designation write processing program 1626.
  • FIG. 18 is a flowchart for explaining processing performed by the summary writing program 1220 of the storage controller 170.
  • the summary writing program 1220 operates to store an updated part within a certain address range in the flash storage 160b at an appropriate timing.
  • the processing of each step described below is performed by the processor 121 executing the batch writing program 1220 unless otherwise specified.
  • step S400 the cache memory 131 is read from the first flash storage 160b that stores the old data in a certain address range including the update location.
  • step S401 in order to create redundant data (parity data), data is read from the second flash storage 160b that stores the old parity corresponding to the data read in step S400.
  • the first flash storage 160b accessed in step S400 is different from the second flash storage 160b accessed in step S401.
  • step S402 a new parity is generated using the old data read in step S400, the old parity read in step S401, and the new data that is the updated portion written from the host computer 30.
  • a method for generating a new parity an XOR operation may be used, or another operation method in which redundancy is ensured may be used.
  • an update bitmap 1229 is generated from the dirty bitmap.
  • the granularity of the update bitmap 1229 corresponding to the flash storage 160b may be acquired from the flash storage 160b for each write, may be fixed for each type of the flash storage 160b, or updated when an update position designation write request is made.
  • the granularity of the bitmap 1229 may be notified to the flash storage 160b as long as the storage controller 170 and the flash storage 160b can share the granularity.
  • step S404 new data 1310 is written to the first flash storage 160b together with the update position designation bitmap 1229 in response to an update position designation write instruction.
  • step S405 the update bitmap 1229 and the new parity are stored in the second flash storage 160b according to the update position designation write instruction.
  • the normal write process may be performed to reduce the process of generating the update bitmap 1229.
  • FIG. 18 has been described assuming RAID5, other RAID types (for example, RAID1, RAID6, etc.) may be used.
  • RAID1 instead of eliminating steps S400, S401, and S405, which are processes for parity calculation, new data may be written to a plurality of different flash storages 160b in step S404. .
  • RAID 6 in addition to the processing in FIG. 18, processing necessary for generating / updating the second parity is added.
  • FIG. 19 is a flowchart for explaining processing performed by the update position designation write program 1626.
  • the processing of each step described below is performed by the package processor 161 of the flash storage 160b executing the update location designation write program 1626 unless otherwise specified.
  • step S410 the data transferred from the storage controller 170 is stored in the cache memory 163.
  • step S411 the update bitmap 1629 transferred from the storage controller 170 is stored in the package memory 162.
  • step S412 only the portion specified by the update bitmap 1629 is stored in the flash memory 165, and the process ends.
  • the update position designation write and the normal write may be switched according to the request method of the storage controller as in the first embodiment.
  • the fourth embodiment and the first embodiment may be combined so that only the area designated by the storage controller 170 using the bitmap is compared with the old data by the flash storage 160b.
  • the flash storage 160b By designating an area to be compared by the storage controller 170, the flash storage 160b reduces the amount of processing for comparing the new data and the old data, and the flash storage when the host computer 30 is writing the same data as the old data The amount of writing to 160b can be reduced.
  • the storage controller has a predetermined range (for example, stripes) in which write data (new data) coming from the host computer and data that is not (old data read from the storage device) are mixed. Data) is transmitted to the storage device together with the compare write request.
  • the old data corresponding to the data in the predetermined range transmitted from the storage controller is read from the storage medium, compared with the data in the predetermined range (transmitted from the storage controller, and transmitted from the storage controller. Since only a part of the predetermined range of data that has been changed from the old data is stored in the storage medium, the number of rewrites of the storage medium can be reduced.
  • the predetermined range of data includes a plurality of write data written by a plurality of write requests coming from the host computer.
  • the processing overhead when the storage controller issues a command to the storage device is reduced. And a reduction in the number of times of rewriting of the storage medium can be achieved.
  • the write to the storage device using the compare write request is performed according to the storage status of the write data in the cache memory, the load status of the storage device, etc. Since it is determined whether or not to write to the storage device using this write request, the storage device does not need to perform an unnecessarily large amount of compare write processing.

Landscapes

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

Abstract

 フラッシュストレージシステムにおいてストレージコントローラ及びフラッシュストレージの性能を低下させることなく、フラッシュストレージのフラッシュメモリへのライト量を削減する。ストレージシステムは、ストレージコントローラが中抜けリードありのデータをフラッシュストレージにまとめ書きするとき、フラッシュストレージにコンペアライト要求を発行する。コンペアライト要求を受けたフラッシュストレージは、ライトされたデータの範囲の更新前データをフラッシュメモリからリードし、リードしたデータをライトされたデータと比較し、内容が異なるデータのみフラッシュメモリにライトする。

Description

ストレージシステム
 本発明は、記憶デバイスとしてフラッシュメモリを使用するストレージシステム及びその制御方法に関する。
 ストレージシステムのストレージコントローラでは、ホスト計算機などの上位装置から到来する複数のライトデータを一旦ディスクキャッシュに格納する。その後、ディスクキャッシュ上に格納されたライトデータを、HDD等の最終記憶デバイスに格納する際、一定アドレス範囲のライトデータをまとめて記憶デバイスにライト(まとめ書き)することがある。このとき、当該一定アドレス範囲内の領域の中で、ライトデータが到来した領域とそうでない領域が混在することがある。ライトデータが到来した領域については、当該ライトデータがディスクキャッシュ上に存在するが、そうでない領域のデータはディスクキャッシュ上に存在しない。その場合、ディスクキャッシュ上にないデータを記憶デバイスからキャッシュに読み(中抜けリード)、記憶デバイスへのライトを一回で済むように効率化する。
 上記まとめ書き時に、記憶デバイスでは、記憶デバイスから読み上げたデータ(ホストから更新されていないデータ)もライトされることになる。記憶デバイスがフラッシュメモリを記憶媒体として用いるフラッシュストレージの場合、フラッシュメモリへのライト回数が増え、フラッシュメモリの書き換え寿命を縮める。
 フラッシュメモリの長寿命化を図るため、特許文献1に開示されているような技術が知られている。特許文献1には、書き換え回数に上限があるフラッシュメモリ等の記憶媒体を用いた記憶装置が、上位装置からの更新要求データ(新データ)を記憶媒体に格納する前に、記憶媒体から更新前データ(旧データ)をリードし、新旧データを比較し、一致しない場合、新データ全体を記憶装置に書き込み、一致した場合には新データを記憶装置に書き込まないようにする技術が開示されている。これにより、旧データと内容が同一の新データは記憶装置に書き込まずに済むので、記憶媒体の書き換え回数が削減され、結果として記憶媒体の長寿命化を図ることができる。
米国特許出願公開第2008/0082744号明細書 米国特許出願公開第2013/0290773号明細書
 特許文献1に開示の技術をストレージRAIDコントローラに適用した場合、RAIDストレージコントローラは、更新対象データに対応する更新前データを読み上げて比較する(以下、この処理を「リードコンペア」と呼ぶ)という追加処理が必要になるため、RAIDストレージコントローラの処理負荷が増大し、ストレージシステムの性能低下につながる。
 また、記憶デバイスにこの技術を単純適用した場合、更新データを書き込む際に必ずリードコンペアが必要になる。たとえばシーケンシャルライトなど、長大データを書き込む場合には、上で説明した中抜けリードはまず発生しないため、特許文献1に開示の技術を使用せずに書き込みを行っても、ホストから更新されていないデータがライトされる可能性は著しく低い。特許文献1に開示の技術を単純適用すると、このような場合にもリードコンペアが実施されることになるため、やはりストレージシステムの性能低下につながる。
 本発明の目的は、RAIDストレージコントローラおよび記憶デバイスの性能を低下させることなく、記憶デバイスへのライト量を削減することである。
 本発明に係るストレージシステムは少なくとも、コントローラと、不揮発性の記憶デバイスを有する1以上の記憶デバイスを有する。ストレージシステムがホスト計算機からのライトデータを記憶デバイスに格納する際、ライトデータの格納範囲の指示を含むコマンドとライトデータとを送信する。当該コマンドを受信した記憶デバイスは、前記記憶デバイスの前記格納範囲に格納されている前記ライトデータの更新前データと、前記ライトデータとを比較し、その内容が異なる部分についてのみ、前記記憶デバイスに格納する。
 本発明により、ストレージシステムの性能を低下させることなく、フラッシュメモリの書き換え回数を削減できる。
図1は、実施例1に係る計算機システムのハードウェア構成図である。 図2は、実施例1に係るフラッシュストレージのハードウェア構成図である。 図3Aは、実施例1に係るストレージ装置のLMに格納されるプログラムおよびテーブルを示す。 図3Bは、実施例1に係るフラッシュストレージのパッケージメモリに格納されるプログラムを示す。 図4は、実施例1にコンペアライトサポート管理テーブルの構成例を示す。 図5は、実施例1に係るまとめ書きの一例を示す。 図6は、実施例1に係るストレージコントローラのまとめ書き処理のフローチャートを示す。 図7は、実施例1に係るフラッシュストレージのコンペアライト処理のフローチャートを示す。 図8Aは、実施例2に係るストレージ装置のLMに格納されるプログラムおよびテーブルを示す。 図8Bは、実施例2に係るフラッシュストレージのパッケージメモリに格納されるプログラムを示す。 図9は、実施例2におけるまとめ書きの一例を示す。 図10は、実施例2に係るストレージコントローラのまとめ書き処理のフローチャートを示す。 図11は、実施例2に係るフラッシュストレージのコンペアライト処理のフローチャートを示す。 図12Aは、実施例3に係るストレージ装置のLMに格納されるプログラムおよびテーブルを示す。 図12Bは、実施例3に係るフラッシュストレージのパッケージメモリに格納されるプログラムを示す。 図13Aは、ライト方式判定情報テーブルの内容を示す。 図13Bは、ライト方式判定情報テーブル内のドライブ情報エントリの構成例を示す。 図14は、実施例3に係るストレージコントローラのまとめ書き処理のフローチャートを示す。 図15は、実施例3に係るストレージコントローラの、ライト方式の判定基準の例を示す。 図16は、実施例4に係るまとめ書きの一例を示す。 図17Aは、実施例4に係るストレージ装置のLMに格納されるプログラムおよびテーブルを示す。 図17Bは、実施例4に係るフラッシュストレージのパッケージメモリに格納されるプログラムを示す。 図18は、実施例4に係るストレージコントローラのまとめ書き処理のフローチャートを示す。 図19は、実施例4に係るフラッシュストレージの更新位置指定ライト処理のフローチャートを示す。 図20は、実施例4に係るストレージコントローラが記憶デバイスにデータ転送する際のデータ形式の一例を示す。
 以下、図を用いて、本発明の一実施例を説明する。以下の図中、同一の部分には同一の符号を付加する。ただし、本発明が本実施例に制限されることは無く、本発明の思想に合致するあらゆる応用例が本発明の技術的範囲に含まれる。また、特に限定しない限り、各構成要素は複数でも単数でも構わない。
 なお、以下の説明では、「xxxテーブル」の表現にて各種情報を説明することがあるが、各種情報は、テーブル以外のデータ構造で表現されていても良い。データ構造に依存しないことを示すために「xxxテーブル」を「xxx情報」と呼ぶことができる。
 また、以下の説明では、「プログラム」を主語として処理を説明する場合があるが、プログラムは、プロセッサ(例えばCPU(Central Processing Unit))によって実行されることで、定められた処理を適宜に記憶資源(例えばメモリ)及び通信インタフェース装置(例えば通信ポート)を用いながら行うため、処理の主語がプロセッサとされても良い。プロセッサは、CPUの他に専用ハードウェアを有していても良い。コンピュータプログラムは、例えばプログラム配布サーバ又は記憶メディア等のプログラムソースから各計算機にインストールされても良い。
 また、各要素(例えばドライブ)は、ID、番号などで識別可能に管理されているが、識別可能な情報であれば、名前など他種の識別情報が用いられても良い。
 本発明の実施例1について、図1~図6を用いて説明する。図1は、実施例1に係る計算機システムのハードウェア構成図である。
 計算機システムは、1以上のホスト計算機(以下、ホストとも呼ばれる)30と、管理計算機20とストレージ装置10とを含む。
 ホスト計算機30とストレージ装置(ストレージシステムとも呼ばれる)10とはデータネットワーク40を介して接続されている。データネットワーク40は、例えば、ファイバチャネルケーブルやファイバチャネルスイッチの組み合わせで構成されるSAN(Storage Area Network)である。あるいはデータネットワーク40は、IPネットワークもしくはその他いかなる種類のデータ通信用ネットワークであってもよい。
 ホスト計算機30と、管理計算機20と、ストレージ装置10とは、管理ネットワーク50を介して接続されている。管理ネットワーク50は、例えば、IPネットワークである。管理ネットワーク50は、ローカルエリアネットワークであってもよく、ワイドエリアネットワーク、その他いかなる種類のネットワークであってもよい。データネットワーク40と管理ネットワーク50とが同一のネットワークであっても良い。
 ストレージ装置10は、ホスト計算機から送られたデータ(ユーザデータ)を格納するための、複数の記憶デバイス(ドライブとも呼ばれる)160(160a、160b)と、ストレージコントローラ170を収容している。ストレージ装置10に搭載される記憶デバイス160には、不揮発性の記録媒体である磁気ディスクを有するハードディスクドライブ(HDD)、不揮発半導体メモリを搭載したSolid State Drive(SSD)、そして後述するコンペアライト処理機能を備えたフラッシュストレージ等が用いられる。ストレージ装置10は、特定の一種類の記憶デバイスのみを搭載する構成に限定されるものではない。HDD、SSD、フラッシュストレージ等が混在して搭載されていてよい。
 また、本発明の実施例に係るストレージ装置10は、複数の記憶デバイス160を1または複数のRAID(Redundant Arrays of Inexpensive/Independent Disks)グループとして管理する。(n+m)台の記憶デバイス160(n≧1、m≧1)で構成されるRAIDグループにホスト計算機30からのライトデータを格納する際には、n台の記憶デバイス160の所定範囲にライトデータを分散格納するとともに、ライトデータをもとにm個の冗長データ(パリティ)を生成して、パリティを残りのm台の記憶デバイスの所定範囲に格納する。これにより、1つの記憶デバイス160に障害が発生した場合のデータ消失を防ぐことが出来る。
 ストレージコントローラ170は、ホスト計算機と接続するためのフロントエンドパッケージ(FEPK)100、記憶デバイス160と接続するためのバックエンドパッケージ(BEPK)140、キャッシュメモリを搭載するキャッシュメモリパッケージ(CMPK)130、内部処理を行うマイクロプロセッサを搭載するマイクロプロセッサパッケージ(MPPK)120、及びそれらを接続する内部ネットワーク150を有する。図1に示すように、本例のストレージ装置10は、複数のFEPK100、複数のBEPK140、複数のCMPK130、そして複数のMPPK120を含む。
 各FEPK100は、ホスト計算機30と接続を行うためのインタフェース(I/F)101、ストレージ装置10内のデータ転送を行うための転送回路102、データを一時的に格納しておくBuffer103を基板上に有する。インタフェース101は複数のポートを含むことができ、各ポートはホスト計算機30等のSAN40に接続された機器と接続することができる。インタフェース101は、ホスト計算機30とストレージ装置10との間の通信に用いられるプロトコル、例えばFibre Channel(FC)、iSCSI(internet SCSI)、あるいはFibre Channel Over Ethernet(FCoE)を、内部ネットワーク150で用いられるプロトコル、例えばPCI-Expressに変換する。
 各BEPK140は、記憶デバイス160と接続するためのインタフェース(I/F)141、ストレージ装置10内のデータ転送を行うための転送回路142、データを一時的に格納しておくBuffer143を基板上に有する。インタフェース141は複数のポートを含むことができ、各ポートが記憶デバイス160と接続される。インタフェース141は、記憶デバイス160との通信に用いられるプロトコル、例えばFCを、内部ネットワーク150で用いられるプロトコルに変換する。
 各CMPK130は、ホスト計算機30から読み書きされるユーザデータを一時的に格納するキャッシュメモリ(CM)131及び1または複数のMPPK120が扱う制御情報を格納する共有メモリ(SM)132を基板上に有する。異なるボリュームを担当する複数のMPPK120(のマイクロプロセッサ)が、共有メモリ132にアクセスすることができる。MPPK120が扱うデータやプログラムは、ストレージ装置10内の不揮発メモリまたは記憶デバイス160からロードされる。キャッシュメモリ131と共有メモリ132とは、別の基板上(パッケージ内)に実装されていてもよい。
 各MPPK120は、1以上のマイクロプロセッサ(プロセッサと略記することもある)121、ローカルメモリ(LM)122及びそれらを接続するバス123を有する。本例は、複数のマイクロプロセッサ121が実装されている。マイクロプロセッサ121の数は1つでも良い。また、少なくとも以下で説明する本発明の実施例の処理を理解する範囲においては、複数のマイクロプロセッサ121が実質的に1つのプロセッサであると理解して良い。ローカルメモリ122は、マイクロプロセッサ121が実行するプログラム及びマイクロプロセッサ121が使用する制御情報を格納する。
 図2は、実施例1に係る記憶デバイス160の一例である、フラッシュストレージの構成例を示す図である。
 フラッシュストレージ160bは、パッケージプロセッサ161とパッケージメモリ162、キャッシュメモリ163、バス転送装置164、ストレージコントローラ170からのライトデータを格納する記憶媒体である1以上のフラッシュメモリ165を含む。また、ストレージコントローラ170(内のBEPK140のインタフェース141)等の外部装置と接続するためのポート(非図示)も含まれている。
 パッケージメモリ162は、パッケージプロセッサ161が実行するプログラム及びパッケージプロセッサ161が使用する制御情報を格納する。キャッシュメモリ163はストレージコントローラ170から読み書きされるユーザデータを一時的に格納する。
 本発明の実施例1に係るフラッシュストレージ160bは、以下で説明するコンペアライト処理機能をサポートする。コンペアライト処理機能とは、詳細は後述するが、データライト時に、ライトデータ(新データ)と当該新データの更新前データ(旧データ)の内容を比較し、新データと旧データとで内容が異なる部分のみを、記憶デバイスに格納する機能である。以下では、コンペアライト処理機能をサポートするフラッシュストレージ160bを、従来からあるSSDやHDDのようにコンペアライト処理機能をサポートしていない記憶デバイスと区別して呼ぶ場合には、「フラッシュストレージ160b」あるいは「記憶デバイス(フラッシュストレージ)160b」と呼ぶ。また、コンペアライト処理機能をサポートするフラッシュストレージ160bとその他の記憶デバイス(コンペアライト処理機能をサポートしていない記憶デバイス)と区別せずに呼ぶ場合には、「記憶デバイス160」と呼ぶ。
 なお、フラッシュストレージ160bの構成は、図2を用いて説明した構成に限定されるわけではなく、たとえばSSDに、本明細書の各実施例で説明する各機能を実装してもよい。
 図3Aは、実施例1に係るストレージコントローラ170のLM122が格納しているプログラム及び制御情報の例を示している。LM122は、まとめ書き処理プログラム1220、入出力処理プログラム1221、キャッシュ管理プログラム1222、OS1223、およびコンペアライトサポート管理テーブル1224を格納している。コンペアライトサポート管理テーブル1224はSM132に格納してあっても良いし、CM131に格納してあっても良いし、あるいは記憶デバイス160に格納してあってもよい。
 図3Bは、実施例1に係るフラッシュストレージ160b内のパッケージメモリ162が格納しているプログラムの例を示している。パッケージメモリ162は、キャッシュ管理プログラム1620、入出力処理プログラム1621、およびコンペアライトプログラム1622を格納している。
 図4は、実施例1に係るコンペアライトサポート管理テーブルの構成例を示す図である。コンペアライトサポート管理テーブル1224は、ドライブIDカラム12240とコンペアライトサポート有無カラム12241を有する。
 ドライブIDカラム12240には、ストレージコントローラ170に接続された記憶デバイス160を個別に識別するための識別子が格納される。コンペアライトサポート有無カラム12241には、ドライブIDカラム12240に格納された識別子で特定される記憶デバイス160が、後述するコンペアライト処理機能をサポートした記憶デバイスか否かを表す情報が格納される。たとえばコンペアライト処理機能をサポートしている記憶デバイス160の場合は「サポート」、コンペアライト処理機能をサポートしていない記憶デバイス160の場合は「未サポート」が格納される。
 続いて図5を用いて、本発明の実施例1に係るストレージ装置10で実施される、フラッシュストレージ160bへのデータ格納処理の概要を説明する。
 ストレージ装置10とI/O要求を発行するホスト計算機30とがある。ストレージ装置10内にはCMPK130とフラッシュストレージ160bがある。CMPK130内のキャッシュメモリ131内にはホストからライトされた新データ1310やフラッシュストレージ160bから読み出してきた旧データ1311を格納する。
 フラッシュストレージ160bには、キャッシュメモリ163とフラッシュメモリ165があり、キャッシュメモリ163には、ストレージコントローラ170からライトされた新データ1630やフラッシュメモリから読み出してきた旧データ1631が一時的に格納される。
 ホスト計算機30はストレージ装置に対してライト要求(ライトコマンド)と当該ライト要求に伴うライトデータを送信する。ストレージ装置内のストレージコントローラ170は、ホスト計算機30からの複数のライトデータのうち、フラッシュストレージ160bの一定アドレス範囲(一定アドレス範囲とはたとえば、RAIDグループへのデータの分散格納の単位であるストライプ(あるいはストライプの整数倍)のサイズに相当する範囲、等である)に格納されるべきライトデータを、まとめてフラッシュストレージ160bにライトする(まとめ書き)。このため、一定アドレス範囲に更新部分が複数箇所存在する。図4において、キャッシュメモリ131内に存在する「新」と書かれたボックスが、更新部分を表している。なお、図4では更新箇所は2箇所となっているが、3箇所以上の更新箇所が含まれていてもよい。
 ストレージコントローラ170は、一定アドレス範囲内のうち、ホスト計算機30から更新のなかった領域のデータを補完するために、フラッシュストレージ160bから旧データ1311を読み出す。ストレージコントローラ170は、ホスト30からライトされた新データ1310と、フラッシュストレージ160bから読み出した旧データ1311とをマージして、フラッシュストレージ160bにコンペアライト要求(コンペアライト処理機能の実行を指示するコマンド)を発行する。コンペアライト要求には、通常のライト要求と同様、ライト対象データ(旧データ1311とマージされた新データ1310)の、フラッシュストレージ160b上の書き込み先アドレス範囲の情報が含まれる。またアドレス範囲の情報は、通常は先頭アドレスとデータ長から構成されるが、それ以外の情報(例えば先頭アドレスと終端アドレス)から構成されるようにしてもよい。
 フラッシュストレージ160bにライトされた新データ1630には、ホストライトによって更新された新データ1310の領域とフラッシュストレージ160bから読み出された旧データ1311の領域が存在する。コンペアライト要求を受けたフラッシュストレージ160bは、フラッシュストレージ160b内に格納されている旧データ1631とコンペアライト要求で受領した新データ1630を比較して、更新されている部分を特定する。
 データの比較単位は、ホスト計算機がストレージ装置10にアクセスする際の読み書きの最小単位(512バイトのセクタ)、フラッシュメモリ165の最小アクセス単位であるページ等があり得る(たとえばデータの比較単位がセクタである場合、新データと旧データが1単位(1セクタ)ごとに比較される。この場合、ある一単位(1セクタ)のデータ比較において、1単位(1セクタ)内の全データ(全ビット)が同一であれば、当該1単位のデータは同一と判断されるが、1単位内の1ビットでも異なるデータが存在する場合、当該1単位のデータは一致しないと判断される)。
 どのような比較単位を採用しても本発明は有効であるが、本発明の実施例に係る記憶デバイス(フラッシュストレージ)160では少なくとも、ストレージコントローラ170から1回のコンペアライト要求とともに送信されてくる、一定アドレス範囲のデータのサイズ(たとえば1ストライプ、あるいはストライプの整数倍)よりは小さいサイズの単位で比較を行うものとする。比較単位が、ホスト計算機がストレージ装置10にアクセスする際の読み書きの最小単位(1セクタ等)であれば、新データと旧データの異同の判定がきめ細かく行われるため、フラッシュメモリ165の書き換え回数の削減効果の向上が見込めるという利点がある。また、比較単位を、フラッシュストレージ160bが記憶媒体として用いているフラッシュメモリ165の読み書きの最小単位であるページ単位とすると、フラッシュストレージ160b内での記憶領域の管理が簡単化される利点がある。
 また、比較した結果により更新部分を特定するため、フラッシュストレージ160bで特定される更新されている部分と、ホスト計算機30が実際にライトした新データ1310は必ずしも一致するとは限らない。ホスト計算機30が実際にライトした新データ1310内に、旧データと同じ部分が含まれていることもあり得るため、フラッシュストレージ160bで特定される、更新されている部分のデータ量の方が、ホスト計算機30が実際にライトした新データ1310のデータ量より少なくなることもある。
 比較した結果、旧データ1631と新データ1630の値が異なる領域の新データ1630のみをフラッシュストレージ160b内のフラッシュメモリ165に格納する。これにより、ホスト計算機30が実際にライトした新データ1310のうち、旧データ1631(1311)と異なる部分のみがフラッシュメモリ165に格納されるので、フラッシュメモリ165に対するライト回数を削減することができる。
 なお、本発明の実施例に係るフラッシュストレージ160bは、コンペアライト要求の他に、従来のHDDやSSD等の記憶デバイスでサポートされているライトコマンド(つまり新データと旧データの比較を行わずに、単純に指定された新データを書き込む)もサポートしている。以下では、従来のHDDやSSD等の記憶デバイスがサポートしているライトコマンドのことを、「通常ライト要求」と呼ぶ。
 本発明の実施例に係るフラッシュストレージ160bは、ストレージコントローラ170から通常ライト要求を受領した場合には、従来の記憶デバイスで行われるライト処理と同様に、単純に指定された新データをフラッシュメモリ165に格納する処理を行う。そしてストレージコントローラ170からコンペアライト要求を受領した場合に限り、上で説明した処理、つまり旧データ1631と新データ1630の値が異なる領域の新データ1630のみをフラッシュストレージ160b内のフラッシュメモリ165に格納する処理を行う。
 図6は、ストレージコントローラ170のプロセッサ121が実行する、まとめ書きプログラム1220の処理を説明するフロー図である。まとめ書きプログラム1220は、適当な契機で一定のアドレス範囲内の更新部分を記憶デバイス160に格納するために動作する。以下で説明する各ステップの処理は、特に断りのない限り、プロセッサ121がまとめ書きプログラム1220を実行することによって行われるものである。
 また、以下の説明では、ストレージコントローラ170が、RAIDグループを構成している記憶デバイス160に対して、データ(及び当該データに対応するパリティ)のまとめ書き処理を行う場合の処理の流れを説明する。そして当該RAIDグループのRAIDタイプ(RAID技術におけるデータ冗長化方式)がRAID5の場合について中心に説明する。
 まず、ステップS100では更新箇所を含む一定アドレス範囲(以下、これをライト対象範囲、と呼ぶ)の旧データを記憶デバイス160からキャッシュメモリ131に読み込む。次に、ステップS101では冗長データ(パリティ)を作成するために、ステップS100で読み込んだデータに対応する旧パリティを、パリティを記憶する記憶デバイス160から読み込む。通常、ステップS100でアクセスする記憶デバイス160とステップS101でアクセスする記憶デバイス160(パリティを記憶する記憶デバイス)は異なる。また、旧パリティの格納されている(パリティを記憶する記憶デバイス内の)アドレス範囲は、旧パリティに対応する旧データの格納されている(データを記憶する記憶デバイス内の)アドレス範囲と同一である。ただし、RAIDグループのRAIDタイプによっては、旧パリティの格納されているアドレス範囲と旧データの格納されているアドレス範囲と異なる場合もあり、そのような場合でも本発明は有効である。
 次に、ステップS102ではステップS100で読み込んだ旧データ、ステップS101で読み込んだ旧パリティ、ホスト計算機30からライトされた更新部分である新データを用いて新パリティを生成する。新パリティを生成する方法はXOR演算を用いても良いし、他の冗長性が担保される演算方式を用いても良い。
 ステップS103では、ステップS100で読み込んだ旧データとホスト計算機30からライトされた更新データをマージして、記憶デバイス160に書き込むデータを生成する。次に、ステップS104ではライト方式判定を行う。ライト方式判定はたとえば、コンペアライト処理機能を利用することにより、フラッシュメモリ165の書き換え回数の削減効果が比較的高いと判断される場合に、コンペアライトを用いるライト方式が選択されるような判定を行うとよい。
 例えば、ライト対象の記憶デバイス160がコンペアライト処理機能をサポートしている記憶デバイスであり、かつ、今回のライト対象範囲中に、ライト対象となる連続領域が2箇所以上ある(つまりホスト計算機30から更新されていない部分を少なくとも1か所以上含んでいる)場合にコンペアライトを実施し、そうでない場合には通常ライトを実施する。コンペアライト処理機能がサポートされている記憶デバイスか否かを判定するには、コンペアライトサポート管理テーブル1224を参照すればよい。
 また、これ以外に、ストレージコントローラ170や記憶デバイス160の負荷状況や寿命などをライト方式判定の判定基準として用いても良い。負荷状況や寿命などを判定基準とするケースの一例を実施例3において説明する。
 ステップS105及びステップS106は、ステップS104においてコンペアライトを用いる(コンペアライト実施)と判定された場合に実行される。ステップS105では、コンペアライト要求を用いてステップ103で生成したライトデータを記憶デバイス160に転送する。ステップS106ではコンペアライト要求を用いてステップS102で生成した新パリティを記憶デバイス160に転送する。
 ステップS107はステップS104において通常ライトを実施と判定された場合に実行される。ステップS107では、通常ライト要求を用いてステップ103で生成したライトデータを記憶デバイス160に転送する。ステップS108では通常ライト要求を用いてステップS102で生成した新パリティを記憶デバイス160に転送する。
 図6では、RAIDグループのRAIDタイプがRAID5である場合を想定して説明したが、他のRAIDタイプ(例えばRAID1、RAID6など)でもよい。例えばRAID1の場合は、パリティ演算のための処理であるステップS101、ステップS102、ステップS106、ステップS108が不要となる代わりに、ステップS105(またはステップS107)が異なる記憶デバイス160に対して複数回実施される。RAID6の場合は、図6での処理に加えて、第二のパリティ(いわゆるQパリティ)の生成・更新のために必要となる処理が追加される。
 図7は、フラッシュストレージ160bのコンペアライトプログラム1622の処理を説明するフロー図である。コンペアライトプログラム1622はストレージコントローラ170からコンペアライト要求または通常ライト要求を受領した際に動作する。以下で説明する各ステップの処理は、特に断りのない限り、フラッシュストレージ160bのパッケージプロセッサ161がコンペアライトプログラム1622を実行することによって行われる。
 まず、ステップS110ではライトデータをキャッシュメモリ163に格納する。次にステップS111において、ストレージコントローラ170の要求方式を判定する。ストレージコントローラ170がコンペアライト要求を発行してきた場合にはステップS112を実施し、ストレージコントローラ170が通常ライト要求を発行してきた場合にはステップS115を実施する。
 次に、ステップS112ではステップS110で受領した新データに対応する旧データをフラッシュメモリ165からキャッシュメモリ163に読み出す。ステップS112で旧データを読み込む前にキャッシュメモリ上に旧データが存在する場合はフラッシュメモリから旧データを読み込む必要はない。
 次に、ステップS113ではコンペアライト要求時に受領した新データとステップS112で読み出した旧データを比較して、更新部分(新データと旧データの内容が異なっている部分)を特定する。比較単位は先に述べたとおり、様々な単位での比較が可能であるが、本発明の実施例に係るフラッシュストレージ160bでは、ストレージコントローラ170から1回のコンペアライト要求とともに送信されてくる、一定アドレス範囲のデータのサイズよりも小さいサイズ(セクタ、ページ等)毎に、新データと旧データの比較を行う。また、新データと旧データの比較は、パッケージプロセッサ161で実施してもよいし、あるいはフラッシュストレージ160b内にデータ比較専用のハードウェアを設け、パッケージプロセッサ161がこのデータ比較専用のハードウェアにデータ比較を行わせるようにしてもよい。最後にステップS114では、ステップS113で特定した更新部分のみをフラッシュメモリ165に格納する。
 ステップS115ではS110でストレージコントローラ170から受領したライトデータをそのままフラッシュメモリ165に格納する。
 なお、フラッシュストレージ160bのキャッシュメモリ163に読み込まれたデータ毎に、当該データを優先的にキャッシュメモリ163に残すように、外部から指定(優先キャッシュ指定)可能な機能を設け、フラッシュストレージ160bの処理負荷を軽減する方法を採ることもできる。このような機能をフラッシュストレージ160bに設けた場合、まとめ書きプログラム1220(を実行するプロセッサ121)は、図6のステップS100において旧データを読み込む際に(あるいはステップS101の旧パリティのリードの際に)、ステップS100(あるいはステップS101)でフラッシュストレージ160bのキャッシュメモリ163に読み上げられたデータを優先的に残すための指定(優先キャッシュ指定)を、フラッシュストレージ160bに対して指示するとよい。優先キャッシュ指定をすることで、ステップS112で旧データ/旧パリティをフラッシュメモリ165からキャッシュメモリ163に読み込む必要がなくなるため、フラッシュストレージ160bの処理負荷を軽減できる。また、優先キャッシュ指定はプロセッサ121が明示的に解除要求を発行しても良いし、ステップS113でフラッシュストレージ160bがキャッシュメモリ163に残した旧データを使用した後に、フラッシュストレージ160bが自発的に解除しても良い。
 ストレージコントローラ170に、コンペアライト要求の完了応答を返却するタイミングについては、フラッシュストレージ160bがストレージコントローラ170から受信したライトデータをキャッシュメモリ163に格納したステップS110の直後でもよいし、図7の処理が完了した後でもよい。
 上の説明では、図6のステップS104においてストレージコントローラ170がライト方式の判定をする例を示したが、フラッシュストレージ160bでライト方式を判定してもよい。例えば、ストレージコントローラ170のプロセッサ121は、図6のステップS104を行わず、無条件で通常ライト要求をフラッシュストレージ160bに対して発行する。ライト要求を受領したフラッシュストレージ160bは、ステップS111の要求方式判定の代わりに、ライト方式判定を行う。ライト方式判定の方法としては、例えば、フラッシュストレージ160bの負荷状態を管理しておき、負荷が所定の閾値より高い状態であれば通常ライト方式、負荷が低い(所定の閾値以下)状態であればコンペアライト方式にするという方法等が考えられる。
 本発明の実施例2について、図8~図11を用いて説明する。実施例2に係るストレージ装置10の構成は、図1を用いて説明した、実施例1に係るストレージ装置10と同じであるため、図示、説明を省略する。また実施例2に係る記憶デバイス160は、パリティ演算をアシストする機能を持つ点が、実施例1に係る記憶デバイス160と異なる。ただしそれ以外の点は実施例1において説明したものと同じである。パリティ演算をアシストする機能はパッケージプロセッサ161で実行されるプログラムによって実現されてもよいし、パリティ演算を行う専用のASIC等のハードウェアを実装する構成をとってもよい。実施例2は、パリティ演算をアシストする機能を持ったフラッシュストレージ160bを用いた構成について説明する。以下では、実施例1との差分のみを記載する。
 最初に、記憶デバイス160の持つ、パリティ演算をアシストする機能について概要を説明しておく。パリティ演算をアシストする機能は、たとえば米国特許出願公開第2013/0290773号明細書に開示されている技術であり、記憶デバイス160は、ライトデータと当該ライトデータの更新前データの排他的論理和(XOR)等を生成する機能、当該生成されたXOR演算結果を外部に送信する機能等を備える。
 パリティ演算をアシストする機能を有する記憶デバイス160を用いた、ストレージ装置10のパリティ生成方法の概要は以下の通りである。RAIDグループを構成している記憶デバイス160のデータを更新する場合、ストレージコントローラは更新データを新データ送信要求とともに、当該更新データの更新前データを格納している記憶デバイス160に対して送信する。記憶デバイス160は新データ送信要求を受信すると、更新データを記憶デバイス内に格納する。ただし更新データに対応する更新前データも、記憶デバイス内に保持しておく。これは後述する中間パリティの生成で必要になるためである。
 その後ストレージコントローラは当該記憶デバイス160に対して中間パリティリード要求を発行する。記憶デバイス160は中間パリティリード要求を受信すると、更新データと更新前データとから中間パリティを算出し、算出された中間パリティをストレージコントローラに返送する。中間パリティの算出方法にはたとえば、XOR演算が用いられる。
 ストレージコントローラ170はその中間パリティを、パリティを格納する記憶デバイス160に対して、中間パリティライト要求とともに送信する。パリティを格納する記憶デバイス160は中間パリティライト要求を受信すると、先の要求で受信している中間パリティと、更新前パリティとから、更新後パリティを生成して、自身の記憶デバイスに格納する。この時点では中間パリティ、更新前パリティは保持しておく。
 最後にストレージコントローラは、更新データを格納した記憶デバイス160とパリティを格納する記憶デバイス160に対して、パージ(コミット)要求を発行する。パリティを格納する記憶デバイス160はコミット要求を受信すると、先の要求で受信している中間パリティと、更新前パリティを破棄し、更新後パリティを正式なデータとして確定させる。また更新データを格納した記憶デバイス160は、更新前データを破棄し、更新後データを正式なデータとして確定させる。
 図8Aは、実施例2に係るストレージコントローラ170のLM122が格納しているプログラム及び制御情報の例を示す。LM122は、まとめ書き処理プログラム1220、入出力処理プログラム1221、キャッシュ管理プログラム1222、OS1223、およびコンペアライトサポート管理テーブル1224を格納している。コンペアライトサポート管理テーブル1224はSM132に格納してあっても良いし、CM131に格納してあっても良いし、記憶デバイス160に格納してあってもよい。
 図8Bは、実施例2に係るフラッシュストレージ160b内のパッケージメモリ162が格納しているプログラム及び制御情報の例を示す。パッケージメモリ162は、キャッシュ管理プログラム1620、入出力処理プログラム1621、中間パリティ読込処理プログラム1623、中間パリティ書込処理プログラム1624、および新データ書込処理プログラム1625を格納している。
 図9を用いて、実施例2の概要を説明する。以下の説明では、ストレージコントローラ170が、RAIDグループを構成している記憶デバイス160に対して、データ(及び当該データに対応するパリティ)のまとめ書き処理を行う場合の処理の流れを説明する。そして当該RAIDグループのRAIDタイプ(RAID技術におけるデータ冗長化方式)がRAID5、つまり1台の記憶デバイス160に対してXOR演算により生成されるパリティを格納する場合の例について中心に説明する。
 ストレージ装置10とI/Oを発行するホスト計算機30とがある。ストレージ装置10内には、キャッシュメモリ131と、Buffer143を含むストレージコントローラ170と、ユーザデータ(ホスト計算機30から受け付けたライトデータ)を格納する第一のフラッシュストレージ160bと、ユーザデータに対応するパリティを格納する第二のフラッシュストレージ160bがある。それぞれのフラッシュストレージ160bは、キャッシュメモリ163とフラッシュメモリ165を含む。ストレージコントローラ170のキャッシュメモリ131内には、ホストからライトされた新データ1310やフラッシュストレージ160bから読み出してきた旧データ1311を格納する。ストレージコントローラ170のBuffer143には、フラッシュストレージ160bから読み出された中間パリティ1430を格納する。
 フラッシュストレージ160bには、キャッシュメモリ163とフラッシュメモリ165があり、第一のフラッシュストレージ160bのキャッシュメモリ163にはホスト計算機30からライトされた新データ1630やフラッシュメモリから読み出してきた旧データ1631、旧データ1631と新データ1630から生成した中間パリティ1632を格納する。第二のフラッシュストレージ160bのキャッシュメモリ163には、ストレージコントローラ170から書き込まれる中間パリティ1633やフラッシュメモリから読み出した旧パリティ1634、中間パリティ1633と旧パリティ1634から生成した新パリティ1635を格納する。
 本発明の実施例2に係るフラッシュストレージ160bは、冒頭で説明したパリティ演算をアシストする機能(新データ送信要求、中間パリティリード要求、中間パリティライト要求、コミット要求)に加え、コンペア新データ送信要求、コンペア中間パリティライト要求というコマンドをサポートする。これらコマンドを受信したフラッシュストレージ160bの動作について、以下で説明していく。
 ホスト計算機30はストレージ装置10に対してライト要求と当該ライト要求に伴うライトデータを送信する。ストレージ装置10内のストレージコントローラ170は、一定アドレス範囲に格納されるべきライトデータを、まとめてフラッシュストレージ160bにライトする(まとめ書き)。このため、一定アドレス範囲に更新部分が複数箇所存在する。図9では更新箇所は2箇所となっているが、3箇所以上の更新箇所が含まれていてもよい。
 ストレージコントローラ170は、一定アドレス範囲内のうち、ホスト計算機30から更新のなかった領域のデータを補完するために、第一のフラッシュストレージ160bから旧データ1311を読み出し、キャッシュメモリ131に格納する。ストレージコントローラ170は、ホスト30からライトされた新データ1310と旧データ1311をマージして、第一のフラッシュストレージ160bにコンペア新データ送信要求をする。フラッシュストレージ160bにライトされた新データ1630には、ホストライトによって更新された新データ1310の領域と、フラッシュストレージ160bから読み出された旧データ1311の領域が混在している。またコンペア新データ送信要求には、実施例1で説明したコンペアライト要求と同様、ライト対象データのアドレス範囲の情報が含まれている。
 コンペア新データ送信要求を受けた第一のフラッシュストレージ160bは第一のフラッシュストレージ160b内に格納されている旧データ1631とコンペア新データ送信要求で受領した新データ1630を比較して、更新されている部分を特定する。データの比較単位は、実施例1と同じく、任意の単位を用いることができる。比較した結果により更新部分を特定するため、フラッシュストレージ160bで判断する更新部分とホスト計算機30が実際にライトした新データ1310は必ずしも一致するとは限らない。
 比較した結果、旧データ1631と新データ1630の値が異なる領域の新データ1630のみを、フラッシュストレージ160b内のフラッシュメモリ165に格納する。ホスト計算機30が実際にライトした新データ1310のうち、旧データ1631(1311)と異なる部分のみがフラッシュメモリ165に格納されるので、フラッシュメモリ165に対するライト回数を削減することができる。なお、後述するパージ(コミット)要求を受領するまでは、新データ1630だけでなく旧データ1631も有効データとしてフラッシュストレージ160b内に残しておく。これは中間パリティを生成するために、旧データ1631を必要とするからである。旧データ1631を残しておく場所は、フラッシュメモリ165でも良いし、キャッシュメモリ163でもよい。
 次に、ストレージコントローラ170は第一のフラッシュストレージ160bに中間パリティリード要求を発行し、第一のフラッシュストレージ160bから読み出した中間パリティ1430をBuffer143に格納する。ここでは、Buffer143に格納した例を示したが、第二のフラッシュストレージ160bに書き込むまで保持しておける領域であれば別の領域でもよい。
 中間パリティリード要求を受領した第一のフラッシュストレージ160bは新データ1630と旧データ1631から中間パリティ1632を生成し、中間パリティ1632をストレージコントローラ170へ転送する。ここでは、第一のフラッシュストレージ160bは中間パリティリード要求時に中間パリティ1632を生成する例について説明しているが、コンペア新データ送信時に生成する、あるいはストレージコントローラ170から来るコマンドとは非同期に(たとえばコンペア新データ送信要求が発行されてから中間パリティリードが行われるまでの間の任意の時期に)生成するようにしてもよい。
 次に、ストレージコントローラ170は第二のフラッシュストレージ160bに対して中間パリティ1430を書き込むためにコンペア中間パリティライト要求を発行する。コンペア中間パリティライト要求には、中間パリティ1430に対応する旧パリティのアドレス範囲の情報が含まれている。
 コンペア中間パリティライト要求を受領した第二のフラッシュストレージ160bは、第二のフラッシュストレージ160bに格納されている旧パリティ1634とストレージコントローラ170に書き込まれた中間パリティ1633から新パリティ1635を生成する。次に第二のフラッシュストレージ160bは、中間パリティ1633が“0”でない領域に対応する新パリティ1635のみをフラッシュメモリ165に格納する。この、中間パリティ1633が“0”でない領域に対応する新パリティ1635を特定する際の単位は、実施例1で述べたデータの比較単位と同様に、任意の単位(たとえばセクタ単位、ページ単位)である。たとえばセクタ単位で中間パリティ1633が“0”でない領域に対応する新パリティ1635を特定してよい。
 RAID5のパリティ演算ではXOR演算を用いており、XOR演算では値が同じ領域は0となる性質を利用することで更新部分を特定している。XOR演算以外のパリティ計算方法を利用するような場合には、第二のフラッシュストレージ160b内で生成した新パリティ1635と第二のフラッシュストレージ160b内に格納されている旧パリティ1634を比較することによって更新部分を特定してもよい。更新部分のみをフラッシュメモリ165に格納することでフラッシュメモリ165に対するライト回数を削減することができる。
 図10は、ストレージコントローラ170のまとめ書きプログラム1220の処理を説明するフロー図である。まとめ書きプログラム1220は、適当な契機で一定のアドレス範囲内の更新部分を記憶デバイス160に格納するために動作する。以下で説明する各ステップの処理は、特に断りのない限り、プロセッサ121がまとめ書きプログラム1220を実行することによって行われるものである。なお、各記憶デバイス160は、実施例2の冒頭で説明したパリティ演算をアシストする機能を有するが、コンペア新データライト要求等の、更新部分のみを格納する機能はフラッシュストレージ160bのみが有し、その他の記憶デバイス160は更新部分のみを格納する機能を有さない前提とする。
 まず、ステップS200では更新箇所を含む一定アドレス範囲の旧データを記憶デバイス160からキャッシュメモリ131に読み込む。次に、ステップS201ではデータライト方式判定を行う。データライト方式判定は、実施例1で説明した方法と同じ方法を用いることができる。
 ステップS202は、ステップS201でコンペア新データ送信要求を用いるべきと判定された場合に実行される。ステップS202では、ステップS200でキャッシュメモリ131に読み込んだ旧データと、ホストからライトされた新データとをマージして、旧データのマージされたデータを、コンペア新データ送信要求を発行することにより、データを格納する第一の記憶デバイス160にライトする。ステップS203は、ステップS201で通常の新データ送信要求を用いるべきと判定された場合に実行される。ステップS203では、ステップS200でキャッシュメモリ131に読み込んだ旧データと、ホストからライトされた新データをマージして、旧データのマージされたデータを、通常の新データ送信要求を発行することにより、データを格納する第一の記憶デバイス160にデータの書き込みを行う。
 ステップS204では、データを格納する第一の記憶デバイス160に中間パリティリード要求を発行し、中間パリティを読み込む。次にステップS205では、パリティライト方式判定を行う。ライト方式の判定方法はステップS201と同様に行い、コンペア中間パリティライト要求を用いるほうが適切と判定された場合は、ステップS206を実施し、そうでない場合はステップS207を実施する。
 ステップS206では、ステップS204で読み込んだ中間パリティを、パリティを格納する第二の記憶デバイス160に対してコンペア中間パリティライト要求とともに送信することで、パリティを格納する第二の記憶デバイス160にライトする。ステップS207では、ステップS204で読み込んだ中間パリティを格納する第二の記憶デバイス160に、通常の中間パリティライト要求とともに中間パリティを送信する。
 最後に、ステップS208では旧データを格納する第一の記憶デバイス160と旧パリティを格納する第二の記憶デバイス160に旧データ、旧パリティのコミット(パージ)要求を発行する。コミット(パージ)要求を受信した第一の記憶デバイス160は、旧データを破棄し、第二の記憶デバイス160は、中間パリティと旧パリティを破棄する。
 図10では、RAID5を想定して説明したが、他のRAIDタイプ(例えばRAID6など)でもよい。例えばRAID6の場合は、図10での処理に加えて第二のパリティを生成・更新するために必要な処理が追加される。
 図11は、フラッシュストレージ160bの中間パリティ書込プログラム1624を説明するフロー図である。中間パリティ書込プログラム1624はストレージコントローラ170から中間パリティライト要求(コンペア中間パリティライト要求または通常の中間パリティライト要求)を受領した際に動作する。以下で説明する各ステップの処理は、特に断りのない限り、フラッシュストレージ160bのパッケージプロセッサ161が中間パリティ書込プログラム1624を実行することによって行われる。
 まず、ステップS210ではライトデータ(正確には、中間パリティである)をキャッシュメモリ163に格納する。次にステップS211ではフラッシュメモリ165から旧パリティをキャッシュメモリ163に読み込む。
 次にステップS212では、ステップS211で読み込んだ旧パリティと、ステップS210でストレージコントローラ170から書き込まれた中間パリティから新パリティを生成する。図11ではライトされた範囲すべてのパリティを生成する方式を記載しているが、ステップS210の前にステップS214(後述)と同等の更新部分の特定を行い、更新部分のみ新パリティを生成するようにしてもよい。
 次に、ステップS213においてストレージコントローラ170の要求方式を判定する。ストレージコントローラ170がコンペア中間パリティライト要求を発行している場合はステップS214、S215を実施し、ストレージコントローラ170が通常の中間パリティライト要求を発行している場合はステップS216を実施する。
 ステップS214では、中間パリティの値を確認して“0以外”の値の領域を更新部分として特定する。これは、図9でも説明したとおりXOR演算の特性を利用して更新部分を特定するための処理であり、XOR演算以外の計算方法を利用する場合は、その方式に応じた更新部分特定方法を用いてもよい。また、中間パリティの値を確認するだけでは更新部分が判断できないのであれば、新パリティと旧パリティを比較して更新部分を特定してもよい。最後にステップS215で、ステップS214で特定した更新部分に対応する新データの領域のみをフラッシュメモリ165に格納し、処理を終了する。
 ステップS215では、作成した新パリティをそのままフラッシュメモリ165に格納して、処理を終了する。
 図10においてステップS200の旧データを読み込む際に、実施例1でも述べたように、ストレージコントローラ170からフラッシュストレージ160bに対して、フラッシュストレージ160bのキャッシュメモリ163に読み込んだデータを優先的に残すための指定(優先キャッシュ指定)をしてもよい。優先キャッシュ指定をすることで、ステップS202を受領したフラッシュストレージ160bで旧データをフラッシュメモリ165からキャッシュメモリ163に読み込む必要がなくなるため、フラッシュストレージ160bの処理負荷を軽減できる。また、優先キャッシュ指定はストレージコントローラ170が明示的に解除要求を発行しても良いし、フラッシュストレージ160bが、ステップS208のように一連の処理の終了と判断できるコマンド(パージ要求)の受領に同期して解除してもよいし、フラッシュストレージ160bで使用した後にフラッシュストレージ160bが解除しても良い。
 また、フラッシュストレージ160bがストレージコントローラ170に中間パリティライト要求の応答を返すタイミングは、キャッシュメモリ163にライトデータを格納するステップS210の直後でもよいし、一連の処理が終了した後でもよい。
 実施例2では、図10のステップS201やステップS205においてストレージコントローラ170がライト方式の判定をする例を示したが、フラッシュストレージ160bでライト方式を判定してもよい。例えば、図10のステップS201やステップS205を行わず、ストレージコントローラ170は通常のライト要求(新データ送信要求、中間パリティライト要求)を無条件に発行することで、フラッシュストレージ160bに対して新データや中間パリティの書き込みを指示する。ライト要求を受領したフラッシュストレージ160bは、ステップS213の要求方式判定に代えて、ライト方式の判定を行う。ライト方式の判定方法としては、例えば、フラッシュストレージ160bの負荷状態を管理しておき、負荷が高い状態では通常ライト方式、負荷が低い状態であればコンペアライト方式にする等がある。
 フラッシュストレージ160bでの新データ書込プログラム1625については、実施例1で説明したコンペアライトプログラム1622(図7)と同様である。ただし先に述べたとおり、新データ書込プログラム1625が実行されることにより、新データが格納された後も、中間パリティの作成が可能なように、旧データを破棄せずに管理しておく(旧データと新データとを対応付けて管理しておき、中間パリティリード要求が来た時に旧データと新データとを読み出し可能な状態にしておく)点が、コンペアライトプログラム1622で実行される処理とは異なる。そしてフラッシュストレージ160bがパージ(コミット)要求を受け付けた時に、旧データを破棄する(パリティを格納するフラッシュストレージ160bがパージ(コミット)要求を受け付けた時には、旧パリティ、中間パリティを削除する)。
 フラッシュストレージ160bが中間パリティリード要求、パージ(コミット)要求を受け付けた時の処理の流れは、たとえば米国特許出願公開第2013/0290773号明細書に開示されているものと同様であるので、ここでの説明は省略する。
 また、実施例2では更新部分をフラッシュストレージ160bで特定する例を説明したが、実施例4(後述)のようなストレージコントローラ170がbitmapなどの情報を用いて更新位置を指定する方式と組み合わせてもよい。
 本発明の実施例3について、図12~図15を用いて説明する。
 実施例3では、ライト方式を判定する際の判断基準として、実施例1や実施例2のように記憶デバイス160のコンペアライト処理機能のサポート有無や更新箇所の情報を用いるのではなく、システムの負荷状態やフラッシュストレージ160bの寿命といった情報を考慮して判定を行う例を示す。実施例3ではライト方式の判定およびライト方式判定の情報を保持しておくライト方式判定情報テーブル1225をストレージコントローラ170に保持している例を示しているが、同様の判定と情報をフラッシュストレージ160bで保持してフラッシュストレージ160bでライト方式の判定を行ってもよい。あるいは、ストレージコントローラ170とフラッシュストレージ160bの両方でライト方式の判定およびライト方式判定情報テーブル1225を保持して、ストレージコントローラ170とフラッシュストレージ160bがそれぞれ、ライト方式を判定してもよい。
 実施例3では実施例1と異なる部分のみ記載する。
 図12Aは、実施例3に係るストレージコントローラ170のLM122が格納しているプログラム及び制御情報の例を示す。LM122は、まとめ書き処理プログラム1220、入出力処理プログラム1221、キャッシュ管理プログラム1222、OS1223、およびライト方式判定情報テーブル1225を格納している。ライト方式判定情報テーブル1225はSM132に格納してあっても良いし、CM131に格納してあっても良いし、記憶デバイス160に格納してあってもよい。
 図12Bは、実施例3に係るフラッシュストレージ160b内のパッケージメモリ162が格納しているプログラム及び制御情報の例を示す。パッケージメモリ162は、キャッシュ管理プログラム1620、入出力処理プログラム1621、およびコンペアライトプログラム1622を格納している。
 図13Aは、実施例3に係るライト方式判定情報テーブル1225の構成例を示す。ライト方式判定情報テーブル1225は、プロセッサ情報エントリ12250とドライブ情報エントリ12252を有する。プロセッサ情報エントリ12250にはプロセッサの平均稼働率を格納する。ドライブ情報エントリ12252には、記憶デバイス160(ドライブ)の稼動情報などを格納する。ドライブ情報エントリ12252の詳細は図13Bを用いて説明する。
 実施例3では、プロセッサの平均稼働率をストレージ装置10で1つのみ保持しているが、それぞれのプロセッサの稼働率を管理して、処理を行うプロセッサに対応する情報を判定に用いてもよい。また、プロセッサ情報やドライブ情報以外にもキャッシュの情報やパスの情報などのストレージ装置10の状態を示すような情報を考慮してもよい。例えば、キャッシュ上にある記憶デバイス160に書き込まれていないデータ(ダーティデータ)の量をドライブ負荷の予測に用いることができる(ダーティデータ量が多い場合、ドライブ負荷が高いと判断する等)。また、ストレージコントローラ170と記憶デバイス160の間のパス負荷の情報を用いて、実施例4で後述するような更新部分のみを送るような方式の実施可否を判定することができる。
 図13Bは、ライト方式判定情報テーブル1225内のドライブ情報エントリ12252の構成例を示している。ドライブ情報エントリ12252は、ドライブIDカラム122520と寿命(残回数)カラム122521、稼働率カラム122522およびコンペアライトサポート有無カラム122523を有する。
 ドライブIDカラム122520は、ストレージコントローラ170に接続された記憶デバイス160を個別に識別するための識別子が格納される。寿命(残回数)カラム122521には、記憶デバイス160の寿命が格納される。フラッシュメモリを用いた記憶デバイス160はライト回数が定められており、記憶デバイス160の寿命(残回数)とは対象の記憶デバイスにライト可能(書き換え可能な)な残回数である。記憶デバイス160の寿命は記憶デバイス160から寿命に関する情報を定期的に取得してもよいし、ストレージ装置10に接続されたタイミングで記憶デバイス160から取得してその後はストレージコントローラでライト回数をカウントして、その情報に基づいて寿命(残回数)カラム122521に格納する値を決定するようにしてもよい。
 稼働率カラム122522は、記憶デバイス160の稼働率を格納する。記憶デバイス160の稼働率は、定期的に記憶デバイス160から取得してもよいし、ストレージコントローラ170が各記憶デバイス160に発行している入出力要求数(頻度)等に基づいて計算してもよい。コンペアライトサポート有無カラム122523は、コンペアライト処理をサポートした記憶デバイスか否かを格納する。コンペアライト処理をサポートしている記憶デバイス160の場合は「サポート」、コンペアライト処理をサポートしていない記憶デバイス160の場合は「未サポート」が格納される。ドライブ情報エントリには図13Bで示した情報以外にも、記憶デバイス160のページサイズなどのドライブの特性や状態を示す情報を用いてもよい。
 図14は、ストレージコントローラ170のまとめ書きプログラム1220を説明するフロー図である。まとめ書きプログラム1220は、適当な契機で一定のアドレス範囲内の更新部分を記憶デバイス160に格納するために動作する。以下で説明する各ステップの処理は、特に断りのない限り、プロセッサ121がまとめ書きプログラム1220を実行することによって行われるものである。
 まず、ステップS120では、ライト方式判定情報テーブル1225を用いてライト方式の判定を行う。ライト方式の判定の詳細については、以降で図15を用いて説明する。ライト方式判定でコンペアライトと判定した場合はステップS121を実施し、まとめライトと判定した場合はステップS122を実施し、個別ライトと判定した場合はステップS123を実施する。
 ステップS121は図6において、コンペアライトと判定した場合と同じ処理を実施する。ステップS122は図6において通常ライトと判定した場合と同じ処理を実施する。
 ステップS123では更新箇所を含む一定アドレス範囲の旧データを記憶デバイス160からキャッシュメモリ131に読み込む。次にステップS124では、旧データに対応する旧パリティを記憶デバイス160から読み込む。次に、ステップS125では新データ、旧データ、旧パリティから新パリティを生成する。次に、ステップS126では通常ライト指示で新データの更新箇所をそれぞれ個別に記憶デバイス160に書き込む。次に、ステップS127では通常ライト指示で更新箇所に対応するパリティをそれぞれ記憶デバイス160に書き込む。
 図15は、ストレージコントローラ170がライト方式を判定する基準の例を表形式(ライト方式判定基準表)で示した図である。
 ライト方式判定基準表には、判定条件カラム122530と判定結果カラム122540を含む。判定条件カラム122530には、各判定条件の組み合わせを表す。図15では判定条件カラム122530に、コンペアライトサポート有無122531、プロセッサ稼働率122532、Disk稼働率122533、Disk寿命122534、および更新箇所数122535を含む。
 コンペアライトサポート有無122531の条件では、ライト方式判定情報テーブル1225のコンペアライトサポートカラム122523の記憶デバイス160に対応するエントリを参照し、対象の記憶デバイス160がコンペアライトをサポートしている場合に「サポート」、コンペアライトをサポートしていない場合に「未サポート」と判定する。
 プロセッサ稼働率122532の条件では、ライト方式判定情報テーブル1225のプロセッサ情報12250を参照し、ストレージコントローラ170のMP121の稼働率がM%を超えているかどうかを判定する。
 Disk稼働率122533の条件では、ライト方式判定情報テーブル1225の稼働率カラム12252の記憶デバイス160に対応するエントリを参照し記憶デバイス160の稼働率がN%を超えているかどうかを判定する。Disk寿命122534の条件では、ライト方式判定情報テーブル1225の寿命122521カラムの記憶デバイス160に対応するエントリを参照し記憶デバイス160の寿命が残りX回より多くあるかどうかを判定する。
 更新箇所数122535の条件では、ライト範囲内に更新箇所がY箇所を超えるかどうかを判定する。ライト範囲内の更新箇所数とは、ライト範囲内に含まれアドレスが連続した更新部分の領域の数であり、更新箇所と更新箇所の間は未更新箇所によって分割される。例えば、図16の新データ1310の場合は2箇所となる。
 M%、N%、X回およびY箇所などの条件の閾値は、固定値で設定してもよいし、GUIなどの管理画面で設定方法を提供しストレージ管理者が設定してもよいし、他の条件との組み合わせで動的に変化してもよい。また、条件を判定するための閾値を複数用いてもよい。
 判定条件カラム122530の各条件において、他の条件によって判定結果122540が決まり、当該判定条件は関係ない場合には「-」を設定する。
 図15に記載した情報以外にも記憶デバイス160のキャッシュメモリ163にコンペアに用いる旧データが残っているか否かなどを用いてもよいし、ランダムライトのデータもしくはシーケンシャルライトのデータであるか否かを用いてもよいし、その他のライトデータに関連する情報を用いても良い。また、図15に記載の情報のすべてを判定に用いる以外に、図15に記載の情報の一部を判定に用いるようにしても良い。たとえばDisk稼働率122533とDisk寿命122534の両方を判定に用いるのではなく、Disk稼働率122533とDisk寿命122534の一方だけを判定に用いる方法を採っても良い。
 判定結果カラム122540には、各判定結果の組み合わせの場合に実施すべきライト方式を表す。ストレージコントローラ170が記憶デバイス160にコンペアライト指示でライトをすべき場合には、「まとめ書き(コンペアライト) 」を設定する。ストレージコントローラ170が記憶デバイス160に通常ライト指示でライトをすべき場合には、「まとめライト」を設定する。ストレージコントローラ170がライト範囲を更新箇所毎に分割して、各更新箇所をそれぞれ記憶デバイス160に通常ライト指示でライトをすべき場合には、個別ライトを設定する。
 本発明の実施例4について、図16~図19を用いて説明する。
 実施例4では、更新データ位置を特定する情報としてストレージコントローラ170がライトデータとともに更新位置を示すビットマップを通知する例を示す。本実施例では更新位置を指定する情報としてビットマップを用いるが、開始アドレスと終了アドレスを示す情報のリストでもよいし、更新位置を指定できる情報であれば他の情報でもよい。本実施例では、実施例1との差分のみを記載する。
 図16は、実施例4の概要の説明図である。ストレージ装置10とI/Oを発行するホスト計算機30とがある。ストレージ装置10内にはストレージコントローラ170とフラッシュストレージ160bがある。ストレージコントローラにはキャッシュメモリ131とLM122がある。
 キャッシュメモリ131にはホスト計算機30が書き込んだ新データ1310やフラッシュストレージ160bから読み出した旧データ1311を格納する。LM122には新データ1310の更新位置を示す更新ビットマップ1229を格納する。更新ビットマップ1229はキャッシュメモリ131に格納してもよいし共有メモリ132に格納してもよいし、ストレージコントローラ170がアクセス可能な領域であればどこに格納してもよい。
 フラッシュストレージ160bにはキャッシュメモリ163とパッケージメモリ162、およびフラッシュメモリ165がある。キャッシュメモリ163にはストレージコントローラ170から書き込まれる新データ1630やフラッシュメモリ165から読み出す旧データ1631を格納する。パッケージメモリ162にはストレージコントローラ170から新データ1630とともに転送される更新ビットマップ1629を格納する。更新ビットマップ1229はキャッシュメモリ163上に格納してもよいし、フラッシュストレージ160bのパッケージプロセッサ161からアクセス可能な領域であればどこに格納してもよい。
 ホスト計算機30はストレージ装置10に対してライト要求と当該ライト要求に伴うライトデータを送信する。ホスト計算機からライト要求を受信したストレージコントローラ170は、更新位置をLM122の更新ビットマップ1229に記録する。ストレージ装置10は通常、キャッシュメモリ131上の領域のうちフラッシュストレージ160bへ反映していないデータの格納されている領域を特定するための情報(ダーティビットマップ)を持っている。そしてストレージ装置10がホスト計算機30からのライトデータをキャッシュメモリ131に格納する際に、ライトデータの格納されたキャッシュメモリ131上領域に対応する、ダーティビットマップのビットをONにする。本実施例に係るストレージ装置10では、更新位置指定ライト時にダーティビットマップから更新ビットマップ1229を生成する。ただし別の実施態様として、ダーティビットマップをそのまま更新位置指定ビットマップ1229として利用するようにしてもよい。あるいは、ダーティビットとは無関係に更新位置指定ビットマップ1229を管理してもよい。
 ストレージ装置内のストレージコントローラ170は一定アドレス範囲に格納されるべきライトデータを、まとめてフラッシュストレージ160bにライトする(まとめ書き)。このため、一定アドレス範囲に更新部分が複数箇所存在する。図16では更新箇所は2箇所となっているが、3箇所以上の更新箇所が含まれていてもよい。
 ストレージコントローラ170は、一定アドレス範囲内のうち、ホスト計算機30から更新のなかった領域のデータを補完するために、フラッシュストレージ160bから旧データ1311を読み出す。ストレージコントローラ170はダーティビットマップから更新ビットマップ1229を生成する。ストレージコントローラ170はホスト30からライトされた新データ1310とフラッシュストレージ160bから読み出した旧データ1311をマージして、更新ビットマップ1229とともにフラッシュストレージ160bに更新位置指定ライト要求をする。フラッシュストレージ160bにライトされた新データ1630には、ストレージコントローラ170が新データ1310と旧データ1311をマージして転送しているため、ホストライトによって更新された新データ1310の領域とフラッシュストレージ160bから読み出された旧データ1311の領域がある。
 更新位置指定ライト要求を受けたフラッシュストレージ160bは、キャッシュメモリ163に新データ1630を、パッケージメモリ162に更新ビットマップ1629をそれぞれ格納する。フラッシュストレージ160bは更新ビットマップ1629を参照して新データ1630の更新箇所を特定し、新データ1630の更新箇所のみをフラッシュメモリ165に格納する。なお、更新位置指定ライト要求には、通常のライト要求と同様、ライト対象データの、フラッシュストレージ160b上の書き込み先アドレス範囲の情報も含まれており、フラッシュストレージ160bは正確には、更新ビットマップ1229と書き込み先アドレス範囲の情報とを用いて、新データ1630の更新位置(アドレス)を特定する。
 図16では、ホスト計算機30が更新した領域の間の未更新部分を補完する方法としてフラッシュストレージ160bから旧データを読み込む方法を説明したが、旧データを読み込む方法に代えて、ストレージコントローラ170がダミーデータを生成し、ホスト計算機30が更新した領域間の未更新部分をダミーデータにより補完する方法を採用してもよい。
 なお、ストレージ装置の中には、記憶デバイス160に格納するデータの各単位(512バイトのセクタ等)に対して、データの妥当性を確認するための保証コードを付す機能や、保証コードを用いたデータ検査を行う機能を有するものがある。実施例4に係るストレージ装置10において、フラッシュストレージ160bに保証コードを用いたデータ検査を行う機能が備えられている場合、ストレージコントローラ170が未更新部分のデータとしてダミーデータを生成する際に、ダミーデータの保証コードとして、意図的に誤った保証コードを生成、付加し、フラッシュストレージ160bにおいて、意図的に誤った保証コードの付加されているダミーデータが、記憶媒体(フラッシュメモリ165)に書き込まれないようにしてもよい。これにより、更新ビットマップ1229の内容が誤っていたような場合でも、フラッシュストレージ160bで未更新部分の書き込みが防止できる。フラッシュストレージ160bで未更新部分の書き込みを防止することで、更新ビットマップ1229が誤っていたような場合にダミーデータを上書きしてユーザデータを破壊することを防ぐことができる。
 また、ホスト計算機が更新した領域間の未更新部分を補完することなく、ストレージコントローラ170で新データ1310の未更新部分は除いて前詰めしたデータ(前詰めデータ)を生成し、更新ビットマップ1229とともにフラッシュストレージ160bに転送する方法でもよい(図20)。更新ビットマップ1229は前詰め前の新データ1310に対応した更新部分、未更新部分を示しているため、フラッシュストレージ160bはストレージコントローラ170から転送された更新ビットマップ1629を元に、前詰めデータから新データ1310と同じデータに展開(キャッシュメモリ163上に)することができる。展開後に発生する未更新部分についてはダミーデータで補完してもよいし、旧データをフラッシュメモリ165から読み出して補完してもよい。フラッシュストレージ160bは更新ビットマップ1629を参照して、展開したデータのうち更新部分のみをフラッシュメモリ165に格納する。更新ビットマップ1629を参照すれば展開後のアドレスがわかるため、前詰めデータを展開せずに更新ビットマップ1629を用いてアドレスを特定しながら直接フラッシュメモリ165に格納してもよい。ストレージコントローラ170とフラッシュストレージ160bの間で前詰めデータを転送することで、データの流量を抑え、ストレージコントローラ170とフラッシュストレージ160bの間のパスを効率的に利用することができる。
 前詰めデータを転送する方法と、実施例2のようにパリティ計算をフラッシュストレージ160bで実施する構成を組み合わせてもよい。前詰めデータを転送する方法とパリティ計算をフラッシュストレージ160bで実施する構成を組み合わせた場合、第一のフラッシュストレージ160bから中間パリティを読み出す際に第一の記憶デバイスが更新部分に対応する中間パリティのみを前詰めしたデータ(前詰め中間パリティ)と更新ビットマップをストレージコントローラに転送してもよい。この場合、ストレージコントローラ170は前詰め中間パリティと更新ビットマップを、旧パリティを格納する第二の記憶デバイスに対して転送する。
 図17Aは、実施例4に係るストレージコントローラ170のLM122が格納しているプログラム及び制御情報の例を示す。LM122は、まとめ書き処理プログラム1220、入出力処理プログラム1221、キャッシュ管理プログラム1222、OS1223、および更新位置指定ライトサポート管理テーブル1226を格納している。更新位置指定ライトサポート管理テーブル1226はSM132に格納してあっても良いし、CM131に格納してあっても良いし、フラッシュストレージ160bに格納してあってもよいし、ストレージコントローラ170がアクセス可能な領域であればよい。更新位置指定ライトサポート管理テーブル1226の詳細は、コンペアライトサポート管理テーブル1224(図4)と同様なテーブルであり、コンペアライトサポート有無を管理する代わりに、更新位置指定ライトのサポート有無を管理するために用いられる。
 図17Bは、実施例4に係るフラッシュストレージ160b内のパッケージメモリ162が格納しているプログラム及び制御情報の例を示す。パッケージメモリ162は、キャッシュ管理プログラム1620、入出力処理プログラム1621、および更新位置指定ライト処理プログラム1626を格納している。
 図18は、ストレージコントローラ170のまとめ書きプログラム1220によって行われる処理を説明するフロー図である。まとめ書きプログラム1220は、適当な契機で一定のアドレス範囲内の更新部分をフラッシュストレージ160bに格納するために動作する。以下で説明する各ステップの処理は、特に断りのない限り、プロセッサ121がまとめ書きプログラム1220を実行することによって行われる。
 まず、ステップS400では更新箇所を含む一定アドレス範囲の旧データを格納する第一のフラッシュストレージ160bからキャッシュメモリ131に読み込む。次に、ステップS401では冗長化データ(パリティデータ)を作成するためにステップS400で読み込んだデータに対応する旧パリティを格納する第二のフラッシュストレージ160bから読み込む。通常、ステップS400でアクセスする第一のフラッシュストレージ160bとステップS401でアクセスする第二のフラッシュストレージ160bは異なる。
 次に、ステップS402ではステップS400で読み込んだ旧データ、ステップS401で読み込んだ旧パリティ、ホスト計算機30からライトされた更新部分である新データを用いて新パリティを生成する。新パリティを生成する方法はXOR演算を用いても良いし、他の冗長性が担保される演算方式を用いても良い。
 次に、ステップS403ではダーティビットマップから更新ビットマップ1229を生成する。更新ビットマップ1229を生成するためには、ダーティビットマップの粒度からフラッシュストレージ160bに対応した更新ビットマップ1229の粒度に変換する必要がある。フラッシュストレージ160bに対応した更新ビットマップ1229の粒度は、ライト毎にフラッシュストレージ160bから取得してもよいし、フラッシュストレージ160bの種別毎に固定で決めてもよいし、更新位置指定ライト要求時に更新ビットマップ1229の粒度もフラッシュストレージ160bに通知してもよいし、ストレージコントローラ170とフラッシュストレージ160bで粒度の共有ができればよい。次に、ステップS404では更新位置指定ライト指示で更新位置指定ビットマップ1229と共に新データ1310を第一のフラッシュストレージ160bに書き込む。次に、ステップS405では、更新位置指定ライト指示で更新ビットマップ1229と新パリティを第二のフラッシュストレージ160bに格納する。
 図18のまとめ書き処理プログラム1220においても実施例1や実施例3のように、ライト範囲内の更新箇所数やストレージコントローラ170の負荷状況などに応じて通常のライトと切り替えてもよい。例えば、ストレージコントローラ170の負荷が高い場合には、更新ビットマップ1229を生成する処理を削減するために通常ライト処理を実施するとしてもよい。
 図18では、RAID5を想定して説明したが、他のRAIDタイプ(例えばRAID1、RAID6など)でもよい。例えばRAID1の場合は、パリティ演算のための処理であるステップS400、ステップS401、ステップS405が不要となる代わりに、ステップS404で異なる複数のフラッシュストレージ160bに対して新データの書き込みを実施すればよい。RAID6の場合は、図18での処理に加えて第二のパリティを生成・更新するために必要な処理が追加される。
 図19は、更新位置指定ライトプログラム1626によって行われる処理を説明するフロー図である。以下で説明する各ステップの処理は、特に断りのない限り、フラッシュストレージ160bのパッケージプロセッサ161が更新位置指定ライトプログラム1626を実行することによって行われる。まず、ステップS410では、ストレージコントローラ170から転送されたデータをキャッシュメモリ163に格納する。次にステップS411では、ストレージコントローラ170から転送される更新ビットマップ1629を、パッケージメモリ162に格納する。次に、ステップS412では、更新ビットマップ1629で指定された箇所のみフラッシュメモリ165に格納し、処理を終了する。
 また別の実施態様として、実施例1のように、ストレージコントローラの要求方式によって更新位置指定ライトと通常ライトを切り替えてもよい。
 また、実施例4と実施例1を組み合わせて、ストレージコントローラ170がビットマップで指定した領域のみを、フラッシュストレージ160bが旧データと比較するようにしてもよい。ストレージコントローラ170が比較する領域を指定することで、フラッシュストレージ160bが新データと旧データを比較する処理量を削減し、かつ、ホスト計算機30が旧データと同じデータを書き込んでいる場合にフラッシュストレージ160bへの書き込み量を削減することが可能となる。
 以上が、本発明の実施例に係るストレージ装置10、フラッシュストレージ160bの説明である。本発明の実施例に係るストレージ装置では、ストレージコントローラが、ホスト計算機から到来したライトデータ(新データ)とそうでないデータ(記憶デバイスから読み出された旧データ)とが混在した所定範囲(たとえばストライプの整数倍等)のデータを、コンペアライト要求とともに記憶デバイスに送信する。記憶デバイスでは、ストレージコントローラから送信されてきた所定範囲のデータに対応した旧データを記憶媒体から読み出して、ストレージコントローラから送信されてきた所定範囲(のデータと比較し、ストレージコントローラから送信されてきた所定範囲のデータのうち、旧データから変更されている部分のみを記憶媒体へと格納するため、記憶媒体の書き換え回数を削減することができる。
 また、所定範囲のデータの中には、ホスト計算機から到来した複数のライト要求によって書き込まれた複数のライトデータが含まれる。本発明の実施例に係るストレージ装置10では、この複数のライトデータを1回のコンペアライト要求で記憶デバイスに書き込み可能であるので、ストレージコントローラが記憶デバイスにコマンドを発行する際の処理オーバヘッドの削減と、記憶媒体の書き換え回数の削減とを両立することができる。
 さらに本発明の実施例に係るストレージ装置10では、キャッシュメモリ上のライトデータの格納状況、記憶デバイスの負荷状況等に応じて、コンペアライト要求を用いた記憶デバイスへの書き込みを実施するか、通常のライト要求を用いた記憶デバイスへの書き込みを実施するか、を判定するため、記憶デバイスでは不必要に多量のコンペアライト処理を行わずに済む。
10: ストレージシステム
20: 管理計算機
30: ホスト計算機
40: データネットワーク
170: ストレージコントローラ
100: FEPK
101: インタフェース
102: 転送回路
103: Buffer
120: MPPK
121: MP
122: LM
130: CMPK
131: CM
132: SM
140: BEPK
141:  インタフェース
142: 転送回路
143:  Buffer
144: FMPK
160a: 記憶デバイス
160b: フラッシュストレージ
161: パッケージプロセッサ
162: パッケージメモリ
163: キャッシュメモリ
164: バス転送装置
165: フラッシュメモリ

Claims (15)

  1.  1以上のプロセッサとキャッシュメモリを有するコントローラと、記憶媒体を有する1以上の記憶デバイスとを有するストレージシステムにおいて、
     前記プロセッサは、接続される計算機からのライトデータの格納範囲の指示を含むコマンドと前記ライトデータとを前記記憶デバイスに送信すると、
     前記記憶デバイスは、前記ライトデータのうち、前記記憶デバイスに格納されている前記ライトデータの更新前データと内容が異なる部分についてのみ、前記ライトデータを前記記憶媒体に格納する、
    ことを特徴とするストレージシステム。
  2.  前記プロセッサは、前記コマンドとして前記記憶デバイスに格納される更新前データと内容が異なる部分についてのみ前記記憶デバイスに格納することを指示するコンペアライト要求を前記記憶デバイスに送信し、
     前記記憶デバイスは、前記プロセッサから前記コンペアライト要求を受信した場合、前記ライトデータと、前記記憶デバイスの前記格納範囲に格納されている前記ライトデータの更新前データとを比較し、
     前記ライトデータのうち、前記更新前データと内容が異なる部分についてのみ、前記記憶媒体に格納する、
    ことを特徴とする、請求項1に記載のストレージシステム。
  3.  前記プロセッサは、前記コンペアライト要求に代えて、前記ライトデータを前記記憶デバイスに格納することを指示するライト要求を送信する場合があり、
     前記記憶デバイスは、前記プロセッサから前記ライト要求を受信した場合、前記受信したライトデータをすべて前記記憶媒体に格納する、
    ことを特徴とする、請求項2に記載のストレージシステム。
  4.  前記プロセッサは、前記計算機から受信したライトデータを前記キャッシュメモリに格納するよう構成されており、
     前記プロセッサは、前記格納範囲に、前記計算機から受信した前記ライトデータの格納されていない部分が含まれる場合、前記ライトデータを前記記憶デバイスに格納する際に、前記コンペアライト要求とともに前記ライトデータを送信する、
    ことを特徴とする、請求項3に記載のストレージシステム。
  5.  前記プロセッサは、前記記憶デバイスの負荷を監視しており、
     前記プロセッサは、前記ライトデータを前記記憶デバイスに格納する際に、前記記憶デバイスの負荷が所定の値より低い場合、前記コンペアライト要求を送信する、
    ことを特徴とする、請求項3に記載のストレージシステム。
  6.  前記記憶媒体は、書き換え回数に制限のある不揮発性メモリであり、
     前記プロセッサは、前記ライトデータを前記記憶デバイスに格納する際に、前記記憶デバイスの書き換え可能回数が所定値以上の場合、前記コンペアライト要求を送信する、
    ことを特徴とする、請求項3に記載のストレージシステム。
  7.  前記プロセッサは前記記憶デバイスから前記記憶デバイスの書き換え可能回数についての情報を取得して、前記取得した情報に基づいて、前記コンペアライト要求か前記ライト要求のいずれかを送信する、
    ことを特徴とする、請求項6に記載のストレージシステム。
  8.  前記ストレージシステムは複数の前記記憶デバイスを有し、前記複数の記憶デバイスのうち、(n+1)台の記憶デバイスでRAIDグループを構成しており、
     前記RAIDグループは、前記(n+1)台の記憶デバイスのうちのn台の記憶デバイスに格納されるデータから計算されるパリティを、前記n台以外の1台の前記記憶装置に格納するよう構成されており、
     前記プロセッサは、前記パリティの格納される前記記憶デバイスに対して、前記ライトデータと前記ライトデータの更新前データから生成される中間パリティとともに中間パリティライト要求を送信し、
     前記パリティの格納される前記記憶デバイスは、前記中間パリティライト要求を受信したことに応じて、
     前記パリティの格納される前記記憶デバイスに格納されている前記パリティと前記中間パリティとから更新後パリティを生成し、
     前記更新後パリティのうち、前記パリティと内容が異なる部分についてのみ、前記記憶媒体に格納する、
    ことを特徴とする、請求項1に記載のストレージシステム。
  9.  前記プロセッサは、前記n台の記憶デバイスのうち、前記ライトデータの格納された記憶デバイスに対して、前記ライトデータと前記ライトデータの更新前データから生成される中間パリティのリード要求を送信し、
     前記中間パリティのリード要求を受信した前記記憶デバイスは、前記記憶デバイスに格納されている前記ライトデータの更新前データと前記ライトデータとの排他的論理和を計算することで前記中間パリティを生成し、前記生成された前記中間パリティを前記プロセッサに返送する、
    ことを特徴とする、請求項8に記載のストレージシステム。
  10.  前記パリティの格納される前記記憶デバイスは、前記中間パリティライト要求を受信したことに応じて、
     前記パリティの格納される前記記憶デバイスに格納されている前記パリティと前記中間パリティとの排他的論理和を計算することによって更新後パリティを生成し、
     前記生成された更新後パリティのうち、値が0である範囲については、前記記憶媒体に格納しない、
    ことを特徴とする、請求項8に記載のストレージシステム。
  11.  前記プロセッサは、前記記憶デバイスに対して、前記ライトデータの格納範囲に加え、前記格納範囲内の複数の領域を特定可能な情報の指示を含むコマンドと前記格納範囲内の複数の領域に対応する前記ライトデータとを送信すると、
     前記記憶デバイスは、前記記憶デバイスの前記格納範囲内の前記複数の領域に格納されている前記更新前データのみを前記ライトデータと比較し、前記比較された前記更新前データと前記ライトデータとで内容が異なる部分についてのみ、前記記憶媒体に格納する、
    ことを特徴とする、請求項1に記載のストレージシステム。
  12.  前記プロセッサは、前記ストレージシステムに接続されたホスト計算機から受信したライトデータを前記キャッシュメモリに格納するよう構成されており、
     前記プロセッサは、前記記憶デバイスに対して、前記ライトデータの格納範囲に加え、前記格納範囲内の複数の領域を特定可能な情報の指示を含むコマンドを送信する時、前記前記格納範囲内の複数の領域以外の部分に対応するダミーデータを生成し、前記複数の領域に対応する前記ライトデータと前記ダミーデータとをマージしたデータを前記ライトデータとして送信する、
    ことを特徴とする、請求項11に記載のストレージシステム。
  13.  前記プロセッサは、前記記憶デバイスに対して、前記ライトデータの格納範囲に加え、前記格納範囲内の複数の領域を特定可能な情報の指示を含むコマンドを送信する時、前記ライトデータとして、前記格納範囲内の複数の領域に対応する前記ライトデータのみ送信する、
    ことを特徴とする、請求項11に記載のストレージシステム。
  14.  パッケージプロセッサと記憶媒体と外部装置に接続するためのポートを有する記憶デバイスであって、
     前記パッケージプロセッサは、前記外部装置から、ライトデータの格納範囲の指示を含むコンペアライト要求と前記ライトデータとを受信すると、
     前記記憶デバイスの前記格納範囲に格納されている、前記ライトデータの更新前データと前記ライトデータとを比較し、
     前記ライトデータのうち、前記更新前データと内容が異なる部分についてのみ、前記記憶媒体に格納する、
    ことを特徴とする記憶デバイス。
  15.  前記パッケージプロセッサは前記外部装置から、前記ライトデータの格納範囲に加え、前記格納範囲内の複数の領域を特定可能な情報の指示を含むコマンドと前記格納範囲内の複数の領域に対応する前記ライトデータとを受信すると、
     前記記憶デバイスの前記格納範囲内の前記複数の領域に格納されている前記更新前データのみを前記ライトデータと比較し、前記比較された前記更新前データと前記ライトデータとで内容が異なる部分についてのみ、前記記憶媒体に格納する、
    ことを特徴とする、請求項14に記載の記憶デバイス。
PCT/JP2014/060126 2014-04-07 2014-04-07 ストレージシステム WO2015155824A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2014/060126 WO2015155824A1 (ja) 2014-04-07 2014-04-07 ストレージシステム
US15/127,838 US20170097795A1 (en) 2014-04-07 2014-04-07 Storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/060126 WO2015155824A1 (ja) 2014-04-07 2014-04-07 ストレージシステム

Publications (1)

Publication Number Publication Date
WO2015155824A1 true WO2015155824A1 (ja) 2015-10-15

Family

ID=54287427

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/060126 WO2015155824A1 (ja) 2014-04-07 2014-04-07 ストレージシステム

Country Status (2)

Country Link
US (1) US20170097795A1 (ja)
WO (1) WO2015155824A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019026225A1 (ja) * 2017-08-03 2019-02-07 株式会社日立製作所 計算機及び制御方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107885671B (zh) * 2016-09-30 2021-09-14 华为技术有限公司 一种非易失性内存的持久化方法和计算设备
JP2023031010A (ja) * 2021-08-24 2023-03-08 キオクシア株式会社 不揮発性メモリおよびメモリシステム

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05282880A (ja) * 1992-01-10 1993-10-29 Toshiba Corp 半導体ディスク装置
JPH0764868A (ja) * 1993-08-24 1995-03-10 Melco:Kk 記憶更新装置
US20080082744A1 (en) * 2006-09-29 2008-04-03 Yutaka Nakagawa Storage system having data comparison function

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4612715B2 (ja) * 2008-09-05 2011-01-12 株式会社日立製作所 情報処理システム、データ更新方法およびデータ更新プログラム
US8271438B2 (en) * 2010-04-07 2012-09-18 Hitachi, Ltd. Asynchronous remote copy system and storage control method
WO2014102879A1 (en) * 2012-12-28 2014-07-03 Hitachi, Ltd. Data storage apparatus and control method thereof
US9329992B2 (en) * 2013-12-04 2016-05-03 Silicon Motion, Inc. Data storage device and flash memory control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05282880A (ja) * 1992-01-10 1993-10-29 Toshiba Corp 半導体ディスク装置
JPH0764868A (ja) * 1993-08-24 1995-03-10 Melco:Kk 記憶更新装置
US20080082744A1 (en) * 2006-09-29 2008-04-03 Yutaka Nakagawa Storage system having data comparison function
JP2008084270A (ja) * 2006-09-29 2008-04-10 Hitachi Ltd データ比較機能を有するストレージシステム

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019026225A1 (ja) * 2017-08-03 2019-02-07 株式会社日立製作所 計算機及び制御方法
US10929030B2 (en) 2017-08-03 2021-02-23 Hitachi, Ltd. Computer and control method

Also Published As

Publication number Publication date
US20170097795A1 (en) 2017-04-06

Similar Documents

Publication Publication Date Title
US9262265B2 (en) Storage system and storage control apparatus
US9519554B2 (en) Storage system with rebuild operations
JP6009095B2 (ja) ストレージシステム及び記憶制御方法
US20080082744A1 (en) Storage system having data comparison function
US10459638B2 (en) Computer system that generates group information and redundant code based on user data and changes the group information and redundant code based on transmission data, control method for computer system, and recording medium
US8381029B2 (en) Processing method, storage system, information processing apparatus, and computer-readable storage medium storing program
JP4684864B2 (ja) 記憶装置システム及び記憶制御方法
JP2007156597A (ja) ストレージ装置
JP2011065625A (ja) 大容量ディスクドライブの使用方法及び装置
US7984260B2 (en) Storage system provided with a plurality of controller modules
US9229660B2 (en) Storage system and method for controlling storage system
US20090248979A1 (en) Storage apparatus and control method for same
JP4884721B2 (ja) 記憶装置のフォーマットを不要としたストレージシステム及び記憶制御方法
US10664193B2 (en) Storage system for improved efficiency of parity generation and minimized processor load
US20100057978A1 (en) Storage system and data guarantee method
WO2014188479A1 (ja) ストレージ装置及びストレージ装置の制御方法
WO2015155824A1 (ja) ストレージシステム
US20180307427A1 (en) Storage control apparatus and storage control method
US8880939B2 (en) Storage subsystem and method for recovering data in storage subsystem
WO2016194979A1 (ja) ストレージシステム、ストレージ制御装置、ストレージ制御方法及びプログラム
JP5949816B2 (ja) キャッシュ制御装置及びその制御方法、ストレージ装置、並びにコンピュータ・プログラム
US11494089B2 (en) Distributed storage system, data control method and storage medium
WO2019043815A1 (ja) ストレージシステム
US20200334103A1 (en) Storage system, drive housing thereof, and parity calculation method
JP5691227B2 (ja) ストレージ装置及びその制御方法

Legal Events

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

Ref document number: 14888974

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15127838

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14888974

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP