[go: up one dir, main page]

WO2014071588A1 - Data replication method, storage controller and system - Google Patents

Data replication method, storage controller and system Download PDF

Info

Publication number
WO2014071588A1
WO2014071588A1 PCT/CN2012/084301 CN2012084301W WO2014071588A1 WO 2014071588 A1 WO2014071588 A1 WO 2014071588A1 CN 2012084301 W CN2012084301 W CN 2012084301W WO 2014071588 A1 WO2014071588 A1 WO 2014071588A1
Authority
WO
WIPO (PCT)
Prior art keywords
tag
period
receiving sub
controller
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2012/084301
Other languages
French (fr)
Chinese (zh)
Inventor
李熠斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201280003049.1A priority Critical patent/CN104025062B/en
Priority to PCT/CN2012/084301 priority patent/WO2014071588A1/en
Publication of WO2014071588A1 publication Critical patent/WO2014071588A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms

Definitions

  • Embodiments of the present invention relate to computer technologies, and in particular, to a data replication method and a storage controller and system. Background technique
  • a storage device-based replication solution is a data replication solution between storage devices. It is mainly used for disaster recovery, data migration and data backup, and remote transmission of data based on user purposes.
  • the end that sends data can be called: Production Center, and the end of receiving data is called: Disaster Recovery Center or Disaster Recovery Center.
  • a storage device-based replication scheme is suitable for sending data from a single storage device to other nodes, and is particularly useful for transmitting data from a clustered storage system to other nodes. When the data arrives at the same time, the data of the receiving end is the same as the data of the transmitting end, and the data of the receiving end and the transmitting end are consistent.
  • the cache-based replication scheme is based on a replication scheme of the storage device.
  • the flow is as follows:
  • the host sends a write input/output (Input/Output, hereinafter referred to as I/O) to the storage device A, and the storage device A opens the cache space to receive the write.
  • I/O the time that the buffer space receives write I/O is called the receive sub-period.
  • receive sub-period the time that the buffer space receives write I/O is called the receive sub-period.
  • all write I/Os with the same access address are merged into the last received write I/O.
  • the transmit sub-period is entered.
  • the transmit sub-period is the period in which the write I/O data is received for the receive sub-cycle.
  • a receiving sub-period and a transmitting sub-period form a complete buffering period for copying data to the storage device B.
  • the storage device A does not receive the write I/O sent by the host, but directly discards the write I/O sent by the host. , causing write I/O blocking, only copying the write I/O received in the receive sub-cycle to storage device B. Only after the end of the transmission sub-cycle, that is, after the write I/O received in the receive sub-cycle is completed, it enters the next receive sub-cycle and continues to receive the write I/O sent by the host.
  • the receiving sub-period can be shortened as much as possible, so that the transmission sub-period is also shortened, but the probability of writing I/O blocking is still relatively high.
  • Embodiments of the present invention provide a data replication method and a storage controller and system, which can reduce the probability of blocking I/O blocking.
  • an embodiment of the present invention provides a data replication method, including:
  • the tag controller When the tag controller receives the write I/O data sent by the host, it determines whether there is a currently received receive sub-period;
  • the label controller starts the receiving sub-period corresponding to the currently generated label, and identifies the write I/O data according to the label corresponding to the receiving sub-period;
  • the tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-period;
  • the tag controller copies the write I/O data of the tag identifier corresponding to the receiving sub-period to the destination end.
  • the method further includes: the label controller generates a label when the label generation time point arrives, and the labels generated by different label generation time points are different.
  • the method further includes: the label controller broadcasting, to the non-label controllers in the cluster storage system, the label The label starts the message.
  • an embodiment of the present invention further provides a data replication method, including:
  • the non-label controller When the non-label controller receives the write I/O data sent by the host, it determines whether there is a currently received receiving sub-period;
  • the non-label controller starts the receiving sub-period corresponding to the currently received label, and identifies the write I/O data according to the label corresponding to the receiving sub-period;
  • the non-label controller identifies the write I/O data according to the label corresponding to the receiving sub-period;
  • the non-tag controller copies the write I/O data of the tag identifier corresponding to the receiving sub-period to the destination end.
  • the non-label controller receives A label activation message broadcast by the label controller in the cluster storage system, the label activation message includes the label, and the labels broadcast by the label controller are different at different label generation time points.
  • the non-label controller stops identifying the write I/O data sent by the host according to the label corresponding to the end of the received sub-period.
  • an embodiment of the present invention provides a storage controller, including:
  • the determining module is configured to: when receiving the write I/O data sent by the host, determine whether there is a currently received receiving sub-period;
  • An identifier module configured to start a receiving sub-period corresponding to the currently generated label if the currently-used receiving sub-period does not exist, and identify the writing according to the label corresponding to the receiving sub-period
  • the identifier module is further configured to: if the receiving sub-period is currently activated, identify the write I/O data according to the label corresponding to the receiving sub-period;
  • a copying module configured to: when the receiving sub-period ends, copy the write I/O data of the label corresponding to the receiving sub-period to the destination end.
  • the method further includes: a label control module, configured to generate a label when a label generation time point arrives, and different labels generate time points to generate different labels.
  • the label control module is further configured to: broadcast, to each non-label controller in the cluster storage system, a label that includes the label to be started. Message.
  • the embodiment of the present invention further provides a storage controller, including:
  • the determining module is configured to: when receiving the write I/O data sent by the host, determine whether there is a currently received receiving sub-period;
  • An identifier module configured to: if a receiving sub-period is not currently activated, start a receiving sub-period corresponding to the currently received label, and identify the write I/O data according to the label corresponding to the receiving sub-period;
  • the identifier module is further configured to: if the receiving sub-period is currently activated, identify the write I/O data according to the label corresponding to the receiving sub-period;
  • a copying module configured to: when the receiving sub-period ends, copy the write I/O data of the label corresponding to the receiving sub-period to the destination end.
  • the method further includes: a label control module, configured to generate a label when a label generation time point arrives, and different labels generate time points to generate different labels.
  • the label control module is further configured to broadcast to each non-label controller in the cluster storage system, including the The tag's tag initiates the message.
  • the fifth aspect of the present invention provides a data replication system, including: the storage controller provided by the third aspect and the storage controller provided by the fourth aspect.
  • an embodiment of the present invention further provides a storage controller, including: a memory, a processor, a bus, and a communication interface; wherein the processor, the communication interface, and the memory are mutually completed by the bus Communication
  • the memory is used to store a program; the processor is configured to execute the program; and the program is configured to:
  • the receiving sub-period corresponding to the currently generated label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period.
  • the write I/O data is identified according to the label corresponding to the receiving sub-period;
  • the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.
  • the seventh aspect of the present invention further provides a storage controller, including:
  • a memory a processor, a bus, and a communication interface; wherein the processor, the communication interface, and the memory complete communication with each other through the bus;
  • the memory is used to store a program; the processor is configured to execute the program; and the program is configured to: When receiving the write I/O data sent by the host, it is determined whether there is a currently received receiving sub-period;
  • the receiving sub-period corresponding to the currently received label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period;
  • the write I/O data is identified according to the label corresponding to the receiving sub-period;
  • the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.
  • the storage controller when the storage controller receives the write I/O data sent by the host to the cache, if there is no initiated reception sub-period, the storage controller may start a new receiving sub-period corresponding to the currently generated label. And identifying the write I/O data sent by the current host according to the label corresponding to the receiving sub-period, and the storage controller only needs to determine whether there is a received receiving sub-period, and does not need to determine the status of the transmitting sub-period. If there is a received receiving sub-period, the write I/O data sent by the current host is directly identified according to the label corresponding to the receiving sub-period.
  • the corresponding transmit sub-cycle begins, that is, the write I/O data identified by the tag is copied to the destination.
  • the conditions for starting a new receive sub-cycle are: There is a newly generated tag and there is no received receive sub-cycle. Instead of starting the receive sub-cycle of the next buffer cycle after the end of the transmit sub-cycle of the previous buffer cycle. Therefore, the transmission sub-period of the previous buffer cycle can be performed simultaneously with the reception sub-cycle of the next buffer cycle, thereby reducing the probability of blocking the writing of I/O data.
  • FIG. 1A is a flowchart of a data replication method according to an embodiment of the present invention.
  • FIG. 1B is a schematic diagram of a cache cycle superposition in a data replication process according to an embodiment of the present invention
  • FIG. 2A is a flowchart of another data replication method according to an embodiment of the present invention.
  • FIG. 2B is a scenario diagram of a replica data of a cluster storage system according to an embodiment of the present invention
  • FIG. 2C is a schematic diagram of a startup label message sent by a label controller according to an embodiment of the present invention
  • FIG. 3 is a flowchart of still another data replication method according to an embodiment of the present invention
  • 4 is a flowchart of still another data replication method according to an embodiment of the present invention
  • FIG. 5A is a schematic structural diagram of a storage controller according to an embodiment of the present invention
  • FIG. 5B is a schematic structural diagram of another storage controller according to the embodiment.
  • FIG. 6A is a schematic structural diagram of still another storage controller according to the embodiment.
  • FIG. 6B is a schematic structural diagram of still another storage controller according to the embodiment.
  • FIG. 7 is a schematic structural diagram of still another storage controller according to the embodiment.
  • FIG. 8 is a schematic structural diagram of still another storage controller according to the embodiment. detailed description
  • FIG. 1 is a flowchart of a data replication method according to an embodiment of the present invention. This embodiment is applicable to a scenario in which a source end having a single storage controller copies data to a destination end. As shown in FIG. 1A, the method provided in this embodiment includes:
  • Step 11 When the tag controller receives the write I/O data sent by the host, it determines whether there is a received receive sub-cycle.
  • Step 12 If there is no received receiving sub-period, the tag controller starts the receiving sub-period corresponding to the currently generated tag, and identifies the write I/O data according to the tag corresponding to the receiving sub-period.
  • the receiving sub-period is a receiving sub-period corresponding to the currently generated label.
  • Step 13 If there is currently a received receiving sub-cycle, the tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-period.
  • the tag controller is a memory controller having a tag generation function.
  • the tag controller can generate tags when each tag generation time point arrives, and the tags generated at different tag generation time points are different.
  • the label controller periodically generates different labels.
  • the interval between the two adjacent label generation time points may be the same or different.
  • the interval between the two tag generation time points is called the tag generation cycle.
  • a tag can be a time tag represented by time.
  • the tag controller When the tag controller receives the write I/O data sent by the host, it first determines whether there is a currently received receive sub-cycle, for example, records each receive sub-cycle that is started, and clears at the end of a receive sub-period. The record of the receiving sub-period. If there is currently a received receiving sub-period, the label controller identifies the currently received write I/O data according to the label corresponding to the receiving sub-period; otherwise, the label controller starts the receiving sub-period corresponding to the currently generated label. A new receive sub-cycle is initiated and the currently received write I/O data is identified based on the currently generated tag. After the end of any one of the receiving sub-cycles, the transmission sub-period corresponding to the receiving sub-period is started.
  • a currently received receive sub-cycle for example, records each receive sub-cycle that is started, and clears at the end of a receive sub-period. The record of the receiving sub-period. If there is
  • the host first sends the write I/O data to the storage controller's cache, and then the storage controller copies the write I/O data from the cache to the storage array.
  • the start of the receive sub-cycle is to open a new buffer space in the memory for receiving write I / O data, the size of the cache space is set according to the duration of the receive sub-period, if the cache space is insufficient, the write I / O data will be in the receive sub-period Internal overflow, causing write I/O blocking.
  • the cache space used does not affect each other independently.
  • the tag controller If the tag controller generates the tag, if the write I/O data sent by the host is not received, the currently generated tag is discarded. If the write I/O data sent by the host is received, it is determined whether the currently activated device exists. The sub-period is received to determine whether to start the receiving sub-period corresponding to the currently generated tag. If there is currently a received receive sub-cycle, the tag controller also discards the currently generated tag.
  • the tag controller When the tag controller receives the write I/O data sent by the host, if there is no start receiving sub-period currently, and there is no newly generated tag, that is, the time point at which the tag is not currently generated, the new receiving sub-period cannot be started. Instead, directly discard the write I/O data sent by the host. After the storage controller discards the write I/O data sent by the host, the host resends the discarded write I/O data.
  • the tag generation frequency is increased, that is, the tag generation period is shortened and the host memory is large
  • the tag controller receives the write I/O data sent by the host, the following phenomenon is rare: There is no received receive sub-cycle. , there are no newly generated tags. Therefore, the technical solution provided by the present invention has the probability of discarding write I/O, that is, the probability of blocking write I/O, is extremely low in the data copying process.
  • Step 14 At the end of the receiving sub-period, the tag controller copies the write I/O data of the tag identifier corresponding to the receiving sub-period to the destination end.
  • the tag controller copies the write I/O of the tag identifier corresponding to the receiving sub-period to the destination end.
  • the tag controller will initiate multiple receive sub-cycles in sequence.
  • the tag controller will copy the write I/O of the tag identifier corresponding to the currently-received receiving sub-period to the destination.
  • the synchronous copy mode may be used, or the asynchronous copy mode may be used to copy the write I/O data to the destination end.
  • the receiving sub-period of each write I/O data is determined, according to the order in which the sending end sends the write I/O data, The received write I/O data is stored in the local storage device, thereby improving the effectiveness of receiving the write I/O data.
  • the sending sub-period corresponding to the label is started, that is, the write I/O data identified by the label in the cache is copied to the destination end.
  • the receiving sub-period corresponding to a tag and the transmitting sub-period corresponding to the tag constitute a complete buffering cycle.
  • a new receiving sub-period can be started as long as the condition for starting the new receiving sub-period is satisfied, and therefore, the transmission sub-period of one buffer period can be synchronized with the next buffer period.
  • the receiving sub-cycles are performed simultaneously, and multiple buffer periods are superimposed on each other, thereby reducing the probability of blocking writing of I/O data.
  • each receive sub-cycle There are two critical points for each receive sub-cycle: one is the time at which the receive sub-cycle starts, and the other is the time at which the receive sub-cycle ends.
  • the write I/O is very dense, if a write I/O arrives at the end of the receive sub-cycle and there is a newly generated tag, a new receive sub-cycle is started.
  • the amount of I/O data sent by the host is very large, so the number of cache cycles superimposed is higher.
  • the data amount of the label controller's buffer period is fixed, because all the write I/O data received in one receiving sub-period is sent to the destination. After the end, the transmission sub-period ends, that is, the corresponding buffer period ends, so the number of superimposed buffer periods does not always increase.
  • the duration of the receiving sub-period cannot be too short or too long. Receiving sub-period The shorter the duration, the faster the switching frequency of the receiving sub-period and the transmitting sub-period, and the less the received write I/O data and the transmitted write I/O data. When the replication is abnormally interrupted, the source and The data consistency at the destination is higher. However, the duration of the receiving sub-period cannot be too short, because the receiving sub-period is too short, the less the amount of write I/O data sent, and the frequent switching of the receiving sub-period and the transmitting sub-period consumes the computing resources of the controller. Therefore, the duration of the receiving sub-period cannot be too short or too long, and it is necessary to find an appropriate value in the middle. This depends on design and actual experimentation to explore.
  • the tag controller when the tag controller receives the write I/O data sent by the host to the cache, if there is no initiated receive sub-period, the tag controller can start the new corresponding corresponding tag. Receiving a sub-period, and identifying the write I/O data sent by the current host according to the label corresponding to the receiving sub-period. In the embodiment of the present invention, the label controller only needs to determine whether there is a received receiving sub-period, and does not need to Determine the status of the transmission sub-cycle. If there is a received receiving sub-period, the write I/O data sent by the current host is directly identified according to the label corresponding to the receiving sub-period.
  • the corresponding transmission sub-cycle begins, that is, the write I/O data identified according to the tag is copied to the destination.
  • the condition for starting the new receiving sub-period is: there is a newly generated label and there is no activated receiving sub-period.
  • the receive sub-cycle of the next cache cycle can be initiated. Therefore, in the method provided by the foregoing embodiment, the sending sub-period of the previous buffering period can be performed simultaneously with the receiving sub-period of the next buffering period, thereby reducing the probability of blocking the writing of the I/O data.
  • FIG. 2A is a flowchart of another data replication method according to an embodiment of the present invention. This embodiment is applicable to a scenario in which a source end of a cluster storage system copies data to a destination end.
  • the storage controller in the source cluster storage system includes a label controller and a non-label controller. In the source cluster storage system, one storage controller is selected as the label controller, and the others are non-label controllers.
  • the tag controller is the primary storage controller for the clustered storage system.
  • the method provided in this embodiment includes:
  • Step 20 The tag controller generates a tag when the tag generation time point arrives, and broadcasts a tag start message including the tag to each non-tag controller in the cluster storage system. Among them, the labels generated by different label generation time points are different.
  • Step 21 When the tag controller receives the write I/O data sent by the host, it determines whether the current storage is saved. In the receive sub-cycle that has been started.
  • Step 22 If there is no received receiving sub-cycle, the tag controller starts the receiving sub-period corresponding to the currently generated tag, and identifies the write I/O data according to the tag corresponding to the receiving sub-period.
  • the label controller may generate a label when each label generation time point arrives, and broadcast a label start message including the label to each non-label controller in the cluster storage system when generating the label, and different labels generate labels generated at time points. Not the same.
  • the source-side clustered storage system can include multiple storage controllers that manage different storage arrays.
  • the source can include one host or multiple hosts, and the host can send different write I/O data to different storage controllers.
  • Each storage controller at the source side copies the write I/O data received by itself to the storage system of the destination end.
  • the storage system at the destination end can also be a cluster storage system.
  • the source end may be a production center, and the destination end may be a disaster recovery center; the source end may also be a transmitting end in a data migration process, and the destination end may be a receiving end in a data migration process; the source end may also be a data end. Back up the source center of the system, and correspondingly, the destination is the backup center.
  • the tag controller After the tag controller generates a new tag, it broadcasts a tag initiation message including the tag to other storage controllers in the cluster storage system, that is, the non-label controller, that is, the tag startup message including the tag is broadcast in the local cluster storage system.
  • the tag start message broadcast by the tag controller to each non-tag controller point at a tag generation time point is the same, that is, the tag controller sends the tag to each non-tag controller at a tag generation time point. identical.
  • the tag controller sends a tag initiation message including the tag to each non-tag controller at a fixed frequency F.
  • Step 23 If there is currently a received receiving sub-period, the tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-period.
  • Step 24 At the end of the receiving sub-period, the label controller copies the write I/O of the label identifier corresponding to the receiving sub-period to the destination end.
  • the method of processing the write I/O data sent by the host in the cluster storage system is the same. The difference is that: when the label controller generates the label in the cluster storage system, the label controller is also broadcast to each non-label controller. Tag startup message. Steps 21 to 24 are the same as steps 11 to 14 and will not be described here.
  • the non-label controller After the non-label controller receives the label start message, it processes the write I/O sent to the host.
  • the method is similar to the tag controller, except that: The non-tag controller receives the write from the host.
  • the receiving sub-period corresponding to the label in the currently received label start message is started.
  • the label controller broadcasts the label start message including the label to each non-label controller, so as to cause each storage controller in the cluster storage system to locally initiate a new receiving sub-period to enable each storage controller to identify any one of the labels.
  • the data in the cluster storage system at the source is consistent with the data on the destination.
  • the duration of each receiving sub-period is set to a preset duration, and the duration of each receiving sub-period is equal.
  • the write I/O sent by the host is dense. The time when the label start message sent by the label controller reaches different non-label controllers may have a time difference.
  • Different storage controllers start the receive sub-period corresponding to the same label.
  • the time points are similar. Since the receiving sub-periods of the same label have the same duration, correspondingly, the time points at which the different storage controllers end the receiving sub-periods corresponding to the same label are similar, that is, the time points at which the transmitting sub-cycles corresponding to the same label are started are similar. Therefore, each storage controller copies the write I/O data of the same tag identifier to the destination end at a similar time, so that after the write I/O data corresponding to one tag is copied to the destination end, the source end of the cluster storage system is The data is consistent with the data at the destination.
  • different storage controllers may receive a large difference in the amount of write I/O data sent by the host to the cache, so that different storage controllers start the transmission sub-periods corresponding to the same label at different time points. After the transmission sub-period corresponding to one label is completed, the data in the cluster storage system at the transmitting end and the data in the receiving end can be consistent.
  • the present invention also provides the following technical solutions: The label controller at the end of a receiving sub-period, to each station The non-label controller broadcasts the stop identification message, and notifies each of the non-label controllers to stop writing I/O data sent by the host according to the label corresponding to the receiving sub-period, and starts to copy the cache identifier in the cache to the receiving end. Write I/O data.
  • the label controller periodically sends a label start message including a label to each non-label controller of the local cluster storage system.
  • the tag controller receives the write I/O data sent by the host to the cache, if there is no initiated receive sub-period, the new receive sub-period corresponding to the currently generated tag may be started, and corresponding to the receive sub-period according to the receive sub-period
  • the tag identifies the write I/O data sent by the current host. If there is a receiving sub-cycle that has been started, then The write I/O data sent by the current host is identified according to the label corresponding to the receiving sub-period.
  • Each non-label controller in the cluster storage system receives the write I/O data sent by the host to the cache.
  • the difference from the processing method of the label controller is that when the receiving sub-cycle does not exist, the current receiving is started.
  • the corresponding transmission sub-cycle begins, that is, the write I/O data identified by the tag is copied to the destination.
  • the condition for starting the new receiving sub-period is: the newly generated label exists and the non-existent activated Receive sub-period.
  • the sending sub-period of the previous buffering period can be performed simultaneously with the receiving sub-period of the next buffering period, thereby reducing the blocking write of the cluster storage system at the source end.
  • FIG. 3 is a flowchart of still another data replication method that is commonly provided in the embodiment of the present invention.
  • the execution body of this embodiment is a non-label controller in the cluster storage system at the source end. As shown in FIG. 3, the method provided in this embodiment includes:
  • Step 31 When the non-tag controller receives the write I/O data sent by the host, it determines whether there is a currently received receive sub-period.
  • Step 32 If there is no received receiving sub-period, the non-label controller starts the receiving sub-period corresponding to the currently received label, and identifies the write I/O data according to the label corresponding to the receiving the receiving sub-period. .
  • the label controller may generate a label when each label generation time point arrives, and broadcast a label start message including the label to each non-label controller in the cluster storage system when generating the label, and different labels generate labels generated at time points. Not the same.
  • the non-label controller processes the write I/O sent by the host similarly to the label controller. The difference is that when the non-label controller receives the write I/O data sent by the host. If it is determined that there is currently no receiving sub-period, the receiving sub-period corresponding to the label in the currently received label start message is started.
  • Step 33 If there is currently a received receiving sub-period, the non-tag controller identifies the write I/O data according to the label corresponding to the receiving sub-period.
  • the non-label controller When the non-label controller receives the label start message, if it does not receive the write issued by the host If the I/O data is sent, the label in the current label start message is discarded. If the write I/O data sent by the host is received, it is determined whether there is a currently received receiving sub-period, thereby determining whether to start the current label start message. The label corresponds to the receiving sub-period. If there is currently a received receive sub-cycle, the tag controller will also discard the currently generated tag.
  • Step 34 At the end of the receiving sub-period, the non-tag controller copies the write I/O of the tag identifier corresponding to the receiving sub-period to the destination end.
  • different storage controllers may receive a large difference in the amount of write I/O data sent by the host to the cache, so that different storage controllers start the transmission sub-periods corresponding to the same label at different time points.
  • the data in the cluster storage system at the source end is consistent with the data in the destination end, and the non-label controller receives the corresponding sub-cycle corresponding label broadcasted by the label controller.
  • the stop message is identified, the write I/O data sent by the host is determined according to the label corresponding to the end of the received sub-period.
  • the non-tag controller stops identifying the write I/O data sent by the host according to the label corresponding to the end of the receiving sub-period at the end of any one of the receiving sub-periods.
  • each non-label controller receives the write I/O data in the currently received receiving sub-period at the end of any one of the receiving sub-cycles or when receiving the identifier stop message sent by the label controller. number. By counting the number of write I/O data, it can be determined whether all the write I/O data received in the currently received receive sub-cycle is copied to the destination.
  • each non-label controller may also return a response message to the label controller after receiving the identifier stop message sent by the label controller, and the response message carries each receiving period in the receiving sub-period for the identifier stop message.
  • the tag controller To count the number of I/O data to be written, the tag controller counts the total number of write I/O data identified by all the storage controllers in the receiving sub-period for which the above-mentioned identification stop message is directed, thereby determining the cluster storage system. Whether to send all write I/O data in the receiving sub-period for which the above-mentioned identification stop message is directed to the destination.
  • the storage controller accesses the same set of write I/O data with the same address and writes the last received write I in the write I/O data set in any one of the receiving sub-periods. /O data.
  • FIG. 4 is a flowchart of still another data replication method according to an embodiment of the present invention. This embodiment is an execution process of each storage controller in a cache period. As shown in Figure 4, it includes:
  • Step 41 The tag controller generates a tag when each tag generation time point arrives, and The non-tag controller broadcasts a tag initiation message including the tag.
  • Step 42A When the tag controller receives the write I/O data sent by the host, it determines whether there is a currently received receiving sub-period. If there is no activated receiving sub-period, the receiving sub-period corresponding to the currently generated tag is started. And writing the I/O data according to the currently generated label, otherwise, identifying the write I/O data according to the label corresponding to the received receiving sub-cycle.
  • Step 42B When the non-tag controller receives the write I/O data sent by the host, it determines whether there is a received receiving sub-period currently. If there is no activated receiving sub-period, the currently received tag start message is started. The label corresponds to the receiving sub-period, and identifies the write I/O data according to the label in the currently-used label start message, otherwise, the write I/O data is identified according to the label corresponding to the activated receiving sub-period. .
  • the write I/O data sent by the host is relatively dense, and the receive sub-periods initiated in step 42A and step 42B can be regarded as the receive sub-periods corresponding to the same label.
  • Step 43 The tag controller broadcasts an identity stop message for the receiving sub-period to each non-tag controller at the end of a receiving sub-cycle initiated by step 42A.
  • Step 44 When the non-label controller receives the identifier stop message, it stops the write I/O data sent by the label corresponding to the label corresponding to the receiving sub-period for the identifier stop message.
  • Each storage controller receives the write I/O data sent by the host in the receiving sub-period.
  • the amount of write I/O data may be different. Some write I/O data volume will be 4, and correspondingly, the I/O data is written with the identifier. The time will be longer; some write I/O data will be small, and accordingly, the time to write I/O data with the identifier will be shorter. Therefore, in a receiving sub-period corresponding to a label, some storage controllers may have identified all the received write I/O data according to the above label, and some storage controllers may not have received the received label according to the label identifier. Partially write I/O data.
  • the data in the cluster storage system at the source end is consistent with the data at the destination end after the receiving sub-period corresponding to a label.
  • the label controller stops the message in the local cluster storage system.
  • each storage controller stops the label identifier corresponding to the receiving sub-period for the identifier stop message.
  • Write I/O data sent by the host At the same time, the transmission sub-period corresponding to the receiving sub-period for the identification stop message is entered, that is, the write I/O data marked by the label corresponding to the receiving sub-period is simultaneously copied to the destination end.
  • Step 45A The tag controller enters a sending sub-period corresponding to the receiving sub-period initiated by step 42A, and copies the write I/O data identified by the tag to the destination end.
  • Step 45B The non-tag controller enters the sending sub-period corresponding to the receiving sub-period initiated by step 42B, and copies the write I/O data identified by the tag to the destination end.
  • FIG. 5A is a schematic structural diagram of a storage controller according to an embodiment of the present invention.
  • the memory controller includes: a determining module 51, an identifying module 52, and a copying module 53.
  • the determining module 51 is configured to: when receiving the write I/O data sent by the host, determine whether there is currently a received receiving sub-period.
  • the identifier module 52 is configured to start a receiving sub-period corresponding to the currently generated label if the currently-used receiving sub-period does not exist, and identify the write I/O data according to the label corresponding to the receiving sub-period.
  • the identifier module 52 is further configured to: if the currently received receiving sub-period exists, identify the write I/O data according to the label corresponding to the receiving sub-period.
  • the copying module 53 is configured to: when the receiving sub-period ends, copy the write I/O data of the label identifier corresponding to the receiving sub-period to the destination end.
  • the above storage controller may further include a label control module 54.
  • the label control module is configured to generate labels when the label generation time point arrives, and the labels generated by different label generation time points are different.
  • the identification module starts the receiving sub-cycle, the receiving sub-period corresponding to the tag generated by the tag control module is started.
  • the determining module is further configured to discard the generated label if the write I/O data sent by the host is not generated when the label is generated.
  • the foregoing storage controller may further include: a tag control module.
  • the tag control module is further configured to broadcast, to each non-tag controller in the cluster storage system, a tag initiation message including the tag.
  • the identification module 52 initiates a reception sub-period based on the tag generated by the tag control module.
  • the label control module is further configured to: when the receiving sub-period ends, broadcast, to the non-label controllers, an identifier stop message for the end receiving sub-period corresponding label, where the identifier stop message is used to notify the Each non-label controller stops the label label corresponding to the receiving sub-period according to the end Know the write I/O data sent by the host.
  • the tag control module broadcasts an identification stop message for the end receiving sub-period corresponding tag to the non-tag controllers at the end of any one of the receiving sub-cycles.
  • FIG. 6A is not a schematic structural diagram of another storage controller provided by this embodiment.
  • the memory controller includes: a judging module 61, an identifying module 62, and a copying module 63.
  • the determining module 61 is configured to: when receiving the write I/O data sent by the host, determine whether there is currently a received receiving sub-period;
  • the identifier module 62 is configured to: if the receiving sub-period does not exist, start a receiving sub-period corresponding to the currently received label, and identify the write I/O data according to the label corresponding to the receiving sub-period;
  • the identifier module 62 is further configured to: if the currently received receiving sub-period exists, identify the write I/O data according to the label corresponding to the receiving sub-period;
  • the copying module 63 is configured to: when the receiving sub-period ends, copy the write I/O data of the label identifier corresponding to the receiving sub-period to the destination end.
  • the method further includes: a receiving module 64, configured to receive a label start message broadcast by the label controller in the cluster storage system, where the label start message includes the label, and different label generation time points
  • the tags broadcast by the tag controller are different.
  • the identification module 62 starts the receiving sub-period, the receiving sub-period corresponding to the tag received by the receiving module is started.
  • the identifier module 62 is further configured to: when the receiving sub-period ends, or when receiving the identifier stop message broadcasted by the label controller for the end receiving sub-period corresponding label, stop the The label corresponding to the receiving sub-cycle of the end identifies the write I/O data sent by the host.
  • the determining module 61 is further configured to: when the receiving module receives the label initiation message, if there is no write I/O data sent by the host, discarding the label startup message label.
  • FIG. 7 is a schematic structural diagram of still another storage controller according to the embodiment.
  • the storage controller provided in this embodiment is applicable to a single memory scenario, and is also applicable to a tag memory in a clustered presence system.
  • the storage controller provided in this embodiment is applicable to a non-tag memory in a cluster presence system.
  • the memory controller 700 shown in FIG. ⁇ includes: a memory 730, a processor 710, a bus 740, and a communication interface 720; wherein the processor, the communication interface, and the memory Communication with each other is accomplished through the bus.
  • the processor 710 may be a central processing unit CPU, or a specific integrated circuit ASIC ted Circuit ), or configured to implement the present invention.
  • the memory 730 is configured to store the program 732.
  • Memory 730 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • program 732 can include program code, the program code including computer operating instructions.
  • the processor is configured to execute the program 732.
  • the program is for:
  • the receiving sub-period corresponding to the currently generated label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period.
  • the write I/O data is identified according to the label corresponding to the receiving sub-period;
  • the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.
  • the program is also used to:
  • Tags are generated when the tag generation time point arrives, and tags generated by different tag generation time points are different.
  • the program is further configured to: broadcast, by using the communication interface, a label start message including the label to each non-tag controller in the cluster storage system.
  • the program is further configured to: pass the pass at the end of the receiving sub-period
  • the information interface broadcasts an identifier stop message for the end of the receiving sub-period corresponding label to the non-label controllers, where the identifier stop message is used to notify the non-label controllers to stop according to the end of the receiving sub-period.
  • the tag identifies the write I/O data sent by the host.
  • the program is further configured to: when the label is generated, if the write I/O data sent by the host is not generated, the generated label is discarded.
  • FIG. 8 is a schematic structural diagram of still another storage controller according to the embodiment.
  • the storage controller provided in this embodiment is applicable to a non-tag memory in a clustered presence system.
  • the memory controller 800 shown in FIG. 8 includes: a memory 830, a processor 810, a bus 840, and a communication interface 820; wherein the processor, the communication interface, the memory Communication with each other is accomplished through the bus.
  • Processor 810 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the memory 830 is configured to store the program 832.
  • Memory 830 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • program 832 can include program code, the program code including computer operating instructions.
  • the processor is configured to execute the program 832.
  • the program is for:
  • the receiving sub-period corresponding to the currently received label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period;
  • the write I/O data is identified according to the label corresponding to the receiving sub-period;
  • the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.
  • the program is further configured to: Receiving, by the communication interface, a label activation message broadcast by the label controller in the cluster storage system, the label activation message includes the label, and the label broadcast by the label controller is different at different label generation time points.
  • the program is further configured to: when the receiving sub-period ends, or when receiving, by the communication interface, the identifier stop message broadcasted by the label controller for the end receiving sub-period corresponding label And stopping to write the write I/O data sent by the host according to the label corresponding to the end of the receiving sub-period.
  • the program is further configured to: when the label initiation message is received by the communication interface, if there is no write I/O data sent by the host, discarding the label startup message label.

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)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Provided is a data replication method. The data replication method comprises: when receiving write I/O data delivered by a host, a label controller determining whether there is an existing receiving sub-cycle (11) that has started currently; if there is no existing receiving sub-cycle that has started currently, the label controller starting a receiving sub-cycle corresponding to a label generated currently and identifying the write I/O data (12) according to the label corresponding to the receiving sub-cycle; if there is an existing receiving sub-cycle that has started currently, identifying the I/O data (13) according to the label corresponding to the receiving sub-cycle; when the receiving sub-cycle ends, replicating the write I/O data identified by the label corresponding to the receiving sub-cycle to a destination end (14). When receiving the write I/O data delivered by the host, the label controller starts a new receiving sub-cycle if there is a newly generated label but no existing receiving sub-cycle that has started. Therefore, the data replication method solves a technical problem that the receiving sub-cycle of a next cache cycle can be started only when a sending sub-cycle of a previous cache cycle ends. Also provided is a storage controller and a system. The data replication method, storage controller and system can reduce a probability of write I/O data blocking.

Description

数据复制方法和存储控制器及系统  Data replication method and storage controller and system

技术领域 本发明实施例涉及计算机技术, 尤其涉及一种数据复制方法和存储控 制器及系统。 背景技术 TECHNICAL FIELD Embodiments of the present invention relate to computer technologies, and in particular, to a data replication method and a storage controller and system. Background technique

基于存储设备的复制方案是一种存储设备之间的数据复制方案, 主要 用于容灾, 数据迁移和数据备份以及基于用户目的的数据远程传输。 发送 数据的一端可以称为: 生产中心, 接收数据的一端称为: 灾备中心或容灾 中心。 基于存储设备的复制方案适用于从单个存储设备向其它节点发送数 据, 尤其适用于从集群存储系统向其它节点发送数据。 当到达一个时间点 时, 接收端的数据与发送端的数据相同, 那么视为接收端和发送端的数据 保持一致。  A storage device-based replication solution is a data replication solution between storage devices. It is mainly used for disaster recovery, data migration and data backup, and remote transmission of data based on user purposes. The end that sends data can be called: Production Center, and the end of receiving data is called: Disaster Recovery Center or Disaster Recovery Center. A storage device-based replication scheme is suitable for sending data from a single storage device to other nodes, and is particularly useful for transmitting data from a clustered storage system to other nodes. When the data arrives at the same time, the data of the receiving end is the same as the data of the transmitting end, and the data of the receiving end and the transmitting end are consistent.

基于緩存周期的复制方案是基于存储设备的一种复制方案, 其流程如 下: 主机发送写输入输出 (Input/Output, 以下简称 I/O )到存储设备 A, 存 储设备 A中开辟緩存空间接收写 I/O, 该緩存空间接收写 I/O的时间称为 接收子周期。 在接收子周期内, 所有访问地址相同的写 I/O被合并到最后 一次接收到的写 I/O。 当接收子周期结束后, 进入发送子周期。 发送子周 期为发送用于接收子周期接收到写 I/O数据的周期。 一个接收子周期和一 个发送子周期, 组成了一个完整向存储设备 B复制数据的緩存周期。 为了 使存储设备 B中数据与存储数据 A中数据保持一致性,在发送子周期内存 储设备 A不再接收主机下发的写 I/O, 而是直接丟弃主机下发的写 I/O, 导 致写 I/O阻塞, 只向存储设备 B复制在接收子周期接收到的写 I/O。 只有 发送子周期结束后, 也就是在接收子周期接收到的写 I/O发送完毕后, 才 进入下一个接收子周期, 继续接收主机下发的写 I/O。  The cache-based replication scheme is based on a replication scheme of the storage device. The flow is as follows: The host sends a write input/output (Input/Output, hereinafter referred to as I/O) to the storage device A, and the storage device A opens the cache space to receive the write. I/O, the time that the buffer space receives write I/O is called the receive sub-period. During the receive sub-cycle, all write I/Os with the same access address are merged into the last received write I/O. When the receiving sub-cycle ends, the transmission sub-period is entered. The transmit sub-period is the period in which the write I/O data is received for the receive sub-cycle. A receiving sub-period and a transmitting sub-period form a complete buffering period for copying data to the storage device B. In order to keep the data in the storage device B and the data in the storage data A consistent, the storage device A does not receive the write I/O sent by the host, but directly discards the write I/O sent by the host. , causing write I/O blocking, only copying the write I/O received in the receive sub-cycle to storage device B. Only after the end of the transmission sub-cycle, that is, after the write I/O received in the receive sub-cycle is completed, it enters the next receive sub-cycle and continues to receive the write I/O sent by the host.

为了提高数据一致性的粒度, 可以尽可能地缩短接收子周期, 这样发 送子周期也会缩短, 但是写 I/O阻塞的概率还是比较高。 发明内容 In order to improve the granularity of data consistency, the receiving sub-period can be shortened as much as possible, so that the transmission sub-period is also shortened, but the probability of writing I/O blocking is still relatively high. Summary of the invention

本发明实施例提供一种数据复制方法和存储控制器及系统, 可以降低 写 I/O发生阻塞的概率。  Embodiments of the present invention provide a data replication method and a storage controller and system, which can reduce the probability of blocking I/O blocking.

第一方面, 本发明实施例提供一种数据复制方法, 包括:  In a first aspect, an embodiment of the present invention provides a data replication method, including:

标签控制器接收主机下发的写 I/O数据时, 判断当前是否存在已启动 的接收子周期;  When the tag controller receives the write I/O data sent by the host, it determines whether there is a currently received receive sub-period;

若当前不存在已启动的接收子周期, 所述标签控制器启动当前生成的 标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据;  If the receiving sub-period does not exist, the label controller starts the receiving sub-period corresponding to the currently generated label, and identifies the write I/O data according to the label corresponding to the receiving sub-period;

若当前存在已启动的接收子周期, 所述标签控制器根据所述接收子周 期对应的标签标识所述写 I/O数据;  If there is currently a received receiving sub-period, the tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-period;

在所述接收子周期结束时, 所述标签控制器将所述接收子周期对应的 标签标识的所述写 I/O数据复制到目的端。  At the end of the receiving sub-period, the tag controller copies the write I/O data of the tag identifier corresponding to the receiving sub-period to the destination end.

结合第一方面, 在第一种可能的实现方式中, 还包括: 所述标签控制器 在标签生成时间点到达时生成标签, 不同的标签生成时间点生成的标签不 相同。  In conjunction with the first aspect, in a first possible implementation, the method further includes: the label controller generates a label when the label generation time point arrives, and the labels generated by different label generation time points are different.

结合第一方面, 或第一方面的第一种可能的实现方式, 在第二种可能 实现方式中, 还包括: 所述标签控制器向集群存储系统中各非标签控制器 广播包括所述标签的标签启动消息。  With reference to the first aspect, or the first possible implementation manner of the first aspect, in a second possible implementation manner, the method further includes: the label controller broadcasting, to the non-label controllers in the cluster storage system, the label The label starts the message.

第二方面, 本发明实施例还提供一种数据复制方法, 包括:  In a second aspect, an embodiment of the present invention further provides a data replication method, including:

非标签控制器接收主机下发的写 I/O数据时, 判断当前是否存在已启 动的接收子周期;  When the non-label controller receives the write I/O data sent by the host, it determines whether there is a currently received receiving sub-period;

若当前不存在已启动的接收子周期, 所述非标签控制器启动当前接收 的标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据;  If the receiving sub-period does not exist, the non-label controller starts the receiving sub-period corresponding to the currently received label, and identifies the write I/O data according to the label corresponding to the receiving sub-period;

若当前存在已启动的接收子周期, 所述非标签控制器根据所述接收子 周期对应的标签标识所述写 I/O数据;  If there is currently a received receiving sub-period, the non-label controller identifies the write I/O data according to the label corresponding to the receiving sub-period;

在所述接收子周期结束时, 所述非标签控制器将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。  At the end of the receiving sub-period, the non-tag controller copies the write I/O data of the tag identifier corresponding to the receiving sub-period to the destination end.

结合第二方面, 在第一种可能的实现方式中, 所述非标签控制器接收 集群存储系统中标签控制器广播的标签启动消息, 所述标签启动消息包括 所述标签, 并且不同的标签生成时间点所述标签控制器广播的标签不相 同。 With reference to the second aspect, in a first possible implementation manner, the non-label controller receives A label activation message broadcast by the label controller in the cluster storage system, the label activation message includes the label, and the labels broadcast by the label controller are different at different label generation time points.

结合第二方面, 或第二方面的第一种可能实现方式, 在第二种可能的 实现方式中, 在所述接收子周期结束时, 或, 接收到所述标签控制器广播 的针对结束的接收子周期对应标签的标识停止消息时, 所述非标签控制器 停止根据所述结束的接收子周期对应的标签标识所述主机下发的写 I/O数 据。  With reference to the second aspect, or the first possible implementation manner of the second aspect, in the second possible implementation manner, at the end of the receiving sub-period, or receiving the end of the label controller broadcast When receiving the identifier stop message of the sub-period corresponding to the label, the non-label controller stops identifying the write I/O data sent by the host according to the label corresponding to the end of the received sub-period.

第三方面, 本发明实施例提供一种存储控制器, 包括:  In a third aspect, an embodiment of the present invention provides a storage controller, including:

判断模块, 用于接收主机下发的写 I/O数据时, 判断当前是否存在已 启动的接收子周期;  The determining module is configured to: when receiving the write I/O data sent by the host, determine whether there is a currently received receiving sub-period;

标识模块, 用于若当前不存在已启动的接收子周期, 启动当前生成的 标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 An identifier module, configured to start a receiving sub-period corresponding to the currently generated label if the currently-used receiving sub-period does not exist, and identify the writing according to the label corresponding to the receiving sub-period

I/O数据; I/O data;

所述标识模块, 还用于若当前存在已启动的接收子周期, 根据所述接 收子周期对应的标签标识所述写 I/O数据;  The identifier module is further configured to: if the receiving sub-period is currently activated, identify the write I/O data according to the label corresponding to the receiving sub-period;

复制模块, 用于在所述接收子周期结束时, 将所述接收子周期对应的 标签标识的所述写 I/O数据复制到目的端。  And a copying module, configured to: when the receiving sub-period ends, copy the write I/O data of the label corresponding to the receiving sub-period to the destination end.

结合第三方面。在第一种可能的实现方式中,还包括: 标签控制模块, 用于在标签生成时间点到达时生成标签, 不同的标签生成时间点生成的标 签不相同。  Combine the third aspect. In a first possible implementation manner, the method further includes: a label control module, configured to generate a label when a label generation time point arrives, and different labels generate time points to generate different labels.

结合第三方面。 或第三方面的第一种可能的实现方式, 在第二种可能 的实现方式中, 所述标签控制模块, 还用于向集群存储系统中各非标签控 制器广播包括所述标签的标签启动消息。  Combine the third aspect. Or the first possible implementation manner of the third aspect, in a second possible implementation manner, the label control module is further configured to: broadcast, to each non-label controller in the cluster storage system, a label that includes the label to be started. Message.

第四方面, 本发明实施例还提供一种存储控制器, 包括:  In a fourth aspect, the embodiment of the present invention further provides a storage controller, including:

判断模块, 用于接收主机下发的写 I/O数据时, 判断当前是否存在已 启动的接收子周期;  The determining module is configured to: when receiving the write I/O data sent by the host, determine whether there is a currently received receiving sub-period;

标识模块, 用于若当前不存在已启动的接收子周期, 启动当前接收的 标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据; 所述标识模块, 还用于若当前存在已启动的接收子周期, 根据所述接 收子周期对应的标签标识所述写 I/O数据; An identifier module, configured to: if a receiving sub-period is not currently activated, start a receiving sub-period corresponding to the currently received label, and identify the write I/O data according to the label corresponding to the receiving sub-period; The identifier module is further configured to: if the receiving sub-period is currently activated, identify the write I/O data according to the label corresponding to the receiving sub-period;

复制模块, 用于在所述接收子周期结束时, 将所述接收子周期对应的 标签标识的所述写 I/O数据复制到目的端。  And a copying module, configured to: when the receiving sub-period ends, copy the write I/O data of the label corresponding to the receiving sub-period to the destination end.

结合第四方面, 在第一种可能的实现方式中,还包括: 标签控制模块, 用于在标签生成时间点到达时生成标签, 不同的标签生成时间点生成的标 签不相同。  With reference to the fourth aspect, in a first possible implementation, the method further includes: a label control module, configured to generate a label when a label generation time point arrives, and different labels generate time points to generate different labels.

结合第四方面, 或第四方面的第一种可能实现方式, 在第二种可能的 实现方式中, 所述标签控制模块, 还用于向集群存储系统中各非标签控制 器广播包括所述标签的标签启动消息。  With reference to the fourth aspect, or the first possible implementation manner of the fourth aspect, in a second possible implementation manner, the label control module is further configured to broadcast to each non-label controller in the cluster storage system, including the The tag's tag initiates the message.

第五方面, 本发明实施例提供一种数据复制系统, 包括: 第三方面提供 的存储控制器和第四方面提供的存储控制器。  The fifth aspect of the present invention provides a data replication system, including: the storage controller provided by the third aspect and the storage controller provided by the fourth aspect.

第六方面, 本发明实施例还提供一种存储控制器, 包括: 存储器、 处理 器、 总线以及通信接口; 其中所述处理器、 所述通信接口、 所述存储器通 过所述总线完成相互间的通信;  In a sixth aspect, an embodiment of the present invention further provides a storage controller, including: a memory, a processor, a bus, and a communication interface; wherein the processor, the communication interface, and the memory are mutually completed by the bus Communication

所述存储器, 用于存储程序; 所述处理器, 用于执行所述程序; 所述程序, 用于:  The memory is used to store a program; the processor is configured to execute the program; and the program is configured to:

接收主机下发的写 I/O数据时, 判断当前是否存在已启动的接收子周 期;  When receiving the write I/O data sent by the host, it is determined whether there is a currently received receiving sub-period;

若当前不存在已启动的接收子周期, 启动当前生成的标签对应的接收 子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据  If the received sub-period does not exist, the receiving sub-period corresponding to the currently generated label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period.

若当前存在已启动的接收子周期, 根据所述接收子周期对应的标签标 识所述写 I/O数据;  If there is currently a received receiving sub-period, the write I/O data is identified according to the label corresponding to the receiving sub-period;

在所述接收子周期结束时, 通过所述通信接口将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。  At the end of the receiving sub-period, the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.

第七方面, 本发明实施例还提供一种存储控制器, 包括:  The seventh aspect of the present invention further provides a storage controller, including:

存储器、 处理器、 总线以及通信接口; 其中所述处理器、 所述通信接 口、 所述存储器通过所述总线完成相互间的通信;  a memory, a processor, a bus, and a communication interface; wherein the processor, the communication interface, and the memory complete communication with each other through the bus;

所述存储器, 用于存储程序; 所述处理器, 用于执行所述程序; 所述程序, 用于: 接收主机下发的写 I/O数据时, 判断当前是否存在已启动的接收子周 期; The memory is used to store a program; the processor is configured to execute the program; and the program is configured to: When receiving the write I/O data sent by the host, it is determined whether there is a currently received receiving sub-period;

若当前不存在已启动的接收子周期, 启动当前接收的标签对应的接收 子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据;  If the receiving sub-period does not exist, the receiving sub-period corresponding to the currently received label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period;

若当前存在已启动的接收子周期, 根据所述接收子周期对应的标签标 识所述写 I/O数据;  If there is currently a received receiving sub-period, the write I/O data is identified according to the label corresponding to the receiving sub-period;

在所述接收子周期结束时, 通过所述通信接口将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。  At the end of the receiving sub-period, the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.

上述技术方案中 ,存储控制器接收到主机下发到緩存的写 I/O数据时、 如果不存在已启动的接收子周期, 存储控制器就可以启动当前生成的标签 对应的新的接收子周期, 并根据该接收子周期对应的标签标识当前主机下 发的写 I/O数据, 存储控制器只需要判断是否存在已启动的接收子周期, 而并不需要判断发送子周期的状态。 如果存在已启动的接收子周期, 则直 接根据该接收子周期对应的标签标识当前主机下发的写 I/O数据。 在任一 个接收子周期结束后, 相应的发送子周期开始, 即开始将根据该标签标识 的写 I/O数据复制到目的端。 接收到主机下发的写 I/O数据时, 启动新的 接收子周期的条件是: 存在新生成的标签且不存在已启动的接收子周期。 而不是在上一个緩存周期的发送子周期结束后, 才能启动下一个緩存周期 的接收子周期。 因此, 上一个緩存周期的发送子周期可以与下一个緩存周 期的接收子周期同时进行, 因此, 降低了阻塞写 I/O数据的概率。 附图说明  In the foregoing technical solution, when the storage controller receives the write I/O data sent by the host to the cache, if there is no initiated reception sub-period, the storage controller may start a new receiving sub-period corresponding to the currently generated label. And identifying the write I/O data sent by the current host according to the label corresponding to the receiving sub-period, and the storage controller only needs to determine whether there is a received receiving sub-period, and does not need to determine the status of the transmitting sub-period. If there is a received receiving sub-period, the write I/O data sent by the current host is directly identified according to the label corresponding to the receiving sub-period. After the end of any of the receive sub-cycles, the corresponding transmit sub-cycle begins, that is, the write I/O data identified by the tag is copied to the destination. When receiving write I/O data sent by the host, the conditions for starting a new receive sub-cycle are: There is a newly generated tag and there is no received receive sub-cycle. Instead of starting the receive sub-cycle of the next buffer cycle after the end of the transmit sub-cycle of the previous buffer cycle. Therefore, the transmission sub-period of the previous buffer cycle can be performed simultaneously with the reception sub-cycle of the next buffer cycle, thereby reducing the probability of blocking the writing of I/O data. DRAWINGS

图 1A为本发明实施例提供的一种数据复制方法流程图;  1A is a flowchart of a data replication method according to an embodiment of the present invention;

图 1B为本发明实施例提供的数据复制过程中一种緩存周期叠加示意 图;  FIG. 1B is a schematic diagram of a cache cycle superposition in a data replication process according to an embodiment of the present invention; FIG.

图 2A为本发明实施例提供的另一种数据复制方法流程图;  2A is a flowchart of another data replication method according to an embodiment of the present invention;

图 2B为本发明实施例提供的一种集群存储系统复制数据的场景图; 图 2C为本发明实施例提供的标签控制器发送的一种启动标签消息示 意图;  2B is a scenario diagram of a replica data of a cluster storage system according to an embodiment of the present invention; FIG. 2C is a schematic diagram of a startup label message sent by a label controller according to an embodiment of the present invention;

图 3为本发明实施例常提供的又一种数据复制方法流程图; 图 4为本发明实施例常提供的再一种数据复制方法流程图; 图 5A为本实施例提供的一种存储控制器结构示意图; FIG. 3 is a flowchart of still another data replication method according to an embodiment of the present invention; 4 is a flowchart of still another data replication method according to an embodiment of the present invention; FIG. 5A is a schematic structural diagram of a storage controller according to an embodiment of the present invention;

图 5B为本实施例提供的另一种存储控制器结构示意图;  FIG. 5B is a schematic structural diagram of another storage controller according to the embodiment; FIG.

图 6A为本实施例提供的又一种存储控制器结构示意图;  6A is a schematic structural diagram of still another storage controller according to the embodiment;

图 6B为本实施例提供的再一种存储控制器结构示意图;  FIG. 6B is a schematic structural diagram of still another storage controller according to the embodiment; FIG.

图 7为本实施例提供的再一种存储控制器结构示意图;  FIG. 7 is a schematic structural diagram of still another storage controller according to the embodiment;

图 8为本实施例提供的再一种存储控制器结构示意图。 具体实施方式  FIG. 8 is a schematic structural diagram of still another storage controller according to the embodiment. detailed description

图 1A为本发明实施例提供的一种数据复制方法流程图。 本实施例可 适用于具有单存储控制器的源端向目的端复制数据的场景。如图 1A所示, 本实施例提供的方法包括:  FIG. 1 is a flowchart of a data replication method according to an embodiment of the present invention. This embodiment is applicable to a scenario in which a source end having a single storage controller copies data to a destination end. As shown in FIG. 1A, the method provided in this embodiment includes:

步骤 11 : 标签控制器接收主机下发的写 I/O数据时, 判断当前是否存 在已启动的接收子周期。  Step 11: When the tag controller receives the write I/O data sent by the host, it determines whether there is a received receive sub-cycle.

步骤 12: 若当前不存在已启动的接收子周期, 所述标签控制器启动当 前生成的标签对应的接收子周期, 并根据所述接收子周期对应的标签标识 所述写 I/O数据。 其中, 所述接收子周期为当前生成的标签对应的接收子 周期。  Step 12: If there is no received receiving sub-period, the tag controller starts the receiving sub-period corresponding to the currently generated tag, and identifies the write I/O data according to the tag corresponding to the receiving sub-period. The receiving sub-period is a receiving sub-period corresponding to the currently generated label.

步骤 13: 若当前存在已启动的接收子周期, 所述标签控制器根据所述 接收子周期对应的标签标识所述写 I/O数据。  Step 13: If there is currently a received receiving sub-cycle, the tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-period.

本实施例中标签控制器为具有生成标签功能的存储控制器。 标签控制 器可以在每个标签生成时间点到达时生成标签, 不同的标签生成时间点生 成的标签不相同。 标签控制器周期性生成不同的标签, 相邻两个标签生成 时间点的间隔时长可以相同, 也可以不同。 两个标签生成时间点的间隔时 间称为标签生成周期。 标签可以是用时间表示的时间标签。  In this embodiment, the tag controller is a memory controller having a tag generation function. The tag controller can generate tags when each tag generation time point arrives, and the tags generated at different tag generation time points are different. The label controller periodically generates different labels. The interval between the two adjacent label generation time points may be the same or different. The interval between the two tag generation time points is called the tag generation cycle. A tag can be a time tag represented by time.

标签控制器接收到主机下发的写 I/O数据时, 先判断当前是否存在已 启动的接收子周期, 例如, 对启动的每一个接收子周期进行记录, 在一个 接收子周期结束时, 清除该接收子周期的记录。 如果当前存在已启动的接 收子周期, 标签控制器根据所述接收子周期对应的标签标识当前接收到的 写 I/O数据; 否则, 标签控制器启动当前生成的标签对应的接收子周期即 启动新的接收子周期, 并根据当前生成的标签标识当前接收到的写 I/O数 据。 在任一个接收子周期结束后, 启动该接收子周期对应的发送子周期。 When the tag controller receives the write I/O data sent by the host, it first determines whether there is a currently received receive sub-cycle, for example, records each receive sub-cycle that is started, and clears at the end of a receive sub-period. The record of the receiving sub-period. If there is currently a received receiving sub-period, the label controller identifies the currently received write I/O data according to the label corresponding to the receiving sub-period; otherwise, the label controller starts the receiving sub-period corresponding to the currently generated label. A new receive sub-cycle is initiated and the currently received write I/O data is identified based on the currently generated tag. After the end of any one of the receiving sub-cycles, the transmission sub-period corresponding to the receiving sub-period is started.

通常情况下, 主机先将写 I/O数据下发到存储控制器的緩存中, 之后 由存储控制器从緩存将写 I/O数据复制到存储阵列中。 启动接收子周期就 是在内存中开辟新的緩存空间用于接收写 I/O数据, 緩存空间的大小根据 接收子周期的时长设置, 如果緩存空间不足, 会使写 I/O数据在接收子周 期内溢出, 导致写 I/O阻塞。 不同的接收子周期, 使用的緩存空间相互独 立互不影响。  Normally, the host first sends the write I/O data to the storage controller's cache, and then the storage controller copies the write I/O data from the cache to the storage array. The start of the receive sub-cycle is to open a new buffer space in the memory for receiving write I / O data, the size of the cache space is set according to the duration of the receive sub-period, if the cache space is insufficient, the write I / O data will be in the receive sub-period Internal overflow, causing write I/O blocking. Different receiving sub-cycles, the cache space used does not affect each other independently.

标签控制器生成标签时, 如果没有接收到主机下发的写 I/O数据, 则 丟弃当前生成的标签; 如果接收到主机下发的写 I/O数据, 则判断当前是 否存在已启动的接收子周期, 从而确定是否启动当前生成的标签对应的接 收子周期。 如果当前存在已启动的接收子周期, 标签控制器也会丟弃当前 生成的标签。  If the tag controller generates the tag, if the write I/O data sent by the host is not received, the currently generated tag is discarded. If the write I/O data sent by the host is received, it is determined whether the currently activated device exists. The sub-period is received to determine whether to start the receiving sub-period corresponding to the currently generated tag. If there is currently a received receive sub-cycle, the tag controller also discards the currently generated tag.

从上述启动新的接收子周期的过程可以看出, 当前是否存在新生成的 标签是启动接收子周期的条件之一。 启动新的接收子周期需同时满足以下 三个条件: 接收到主机下发的写 I/O数据、 存在新生成的标签且不存在已 启动的接收子周期。  It can be seen from the above process of starting a new receiving sub-period that whether or not there is a newly generated tag is one of the conditions for starting the receiving sub-period. The following three conditions must be met to initiate a new receive sub-cycle: Receive I/O data sent by the host, Newly generated tags, and no received receive sub-cycles.

标签控制器接收主机下发的写 I/O数据时, 如果当前不存在已启动的 接收子周期, 当前也没有新生成的标签即当前不是生成标签的时间点, 则 不能启动新的接收子周期, 而是直接丟弃主机下发的写 I/O数据。 存储控 制器丟弃主机下发的写 I/O数据后,主机会重新下发被丟弃的写 I/O数据。 在标签生成频率提高即标签生成周期缩短且主机内存比较大的情况下, 标 签控制器接收到主机下发的写 I/O数据时, 极少可能出现以下现象: 不存 在已启动的接收子周期, 也不存在新生成的标签。 因而, 本发明提供的技 术方案在数据复制过程中,丟弃主机下发的写 I/O数据的概率即阻塞写 I/O 的概率极低。  When the tag controller receives the write I/O data sent by the host, if there is no start receiving sub-period currently, and there is no newly generated tag, that is, the time point at which the tag is not currently generated, the new receiving sub-period cannot be started. Instead, directly discard the write I/O data sent by the host. After the storage controller discards the write I/O data sent by the host, the host resends the discarded write I/O data. When the tag generation frequency is increased, that is, the tag generation period is shortened and the host memory is large, when the tag controller receives the write I/O data sent by the host, the following phenomenon is rare: There is no received receive sub-cycle. , there are no newly generated tags. Therefore, the technical solution provided by the present invention has the probability of discarding write I/O, that is, the probability of blocking write I/O, is extremely low in the data copying process.

步骤 14: 在所述接收子周期结束时, 所述标签控制器将所述接收子周 期对应的标签标识的写 I/O数据复制到目的端。  Step 14: At the end of the receiving sub-period, the tag controller copies the write I/O data of the tag identifier corresponding to the receiving sub-period to the destination end.

在所述接收子周期结束时, 所述标签控制器将所述接收子周期对应的 标签标识的写 I/O复制到目的端。标签控制器会依次启动多个接收子周期, 在任一个接收子周期结束时, 标签控制器都会将当前结束的接收子周期对 应的标签标识的写 I/O复制到目的端。 本发明实施例中, 可釆用同步复制 模式, 也可釆用异步复制模式, 将写 I/O数据复制到目的端。 目的端接收 到的写 I/O数据后, 根据每个写 I/O数据中的标签, 确定每个写 I/O数据 所在的接收子周期, 按照发送端发送写 I/O数据顺序, 在本地存储设备中 存储接收到的写 I/O数据, 从而提高接收到写 I/O数据的有效性。 At the end of the receiving sub-period, the tag controller copies the write I/O of the tag identifier corresponding to the receiving sub-period to the destination end. The tag controller will initiate multiple receive sub-cycles in sequence. At the end of any receiving sub-period, the tag controller will copy the write I/O of the tag identifier corresponding to the currently-received receiving sub-period to the destination. In the embodiment of the present invention, the synchronous copy mode may be used, or the asynchronous copy mode may be used to copy the write I/O data to the destination end. After the write I/O data received by the destination end, according to the label in each write I/O data, the receiving sub-period of each write I/O data is determined, according to the order in which the sending end sends the write I/O data, The received write I/O data is stored in the local storage device, thereby improving the effectiveness of receiving the write I/O data.

在任一个标签对应的接收子周期结束时, 启动该标签对应的发送子周 期, 即将緩存中根据该标签标识的写 I/O数据复制到目的端。 一个标签对 应的接收子周期和该标签对应的发送子周期组成了一个完整的緩存周期。 在将写 I/O数据复制到目的端的过程中, 只要满足以上启动新的接收子周 期的条件, 都可以启动新的接收子周期, 因此, 一个緩存周期的发送子周 期可以与下一个緩存周期的接收子周期同时进行, 实现多个緩存周期相互 叠加, 因此可降低阻塞写 I/O数据的概率。  At the end of the receiving sub-period corresponding to any label, the sending sub-period corresponding to the label is started, that is, the write I/O data identified by the label in the cache is copied to the destination end. The receiving sub-period corresponding to a tag and the transmitting sub-period corresponding to the tag constitute a complete buffering cycle. In the process of copying the write I/O data to the destination end, a new receiving sub-period can be started as long as the condition for starting the new receiving sub-period is satisfied, and therefore, the transmission sub-period of one buffer period can be synchronized with the next buffer period. The receiving sub-cycles are performed simultaneously, and multiple buffer periods are superimposed on each other, thereby reducing the probability of blocking writing of I/O data.

如图 1B所示, 在第一标签周期内, 启动了第一标签对应的第一个緩 存周期; 在第二标签周期, 启动了第二标签对应的第二个緩存周期; 在第 三标签周期内, 启动了第三标签对应的第三个緩存周期。 在第一个緩存周 期还没有结束时, 第二个緩存周期已启动, 同样, 第二緩存周期还没有结 束时, 第三个緩存周期已经启动, 多个緩存周期相互叠加。 需要说明是, 图 1B仅给出了一种可能情况, 并不代表在每个标签周期都会启动新的緩 存周期。 在实际应用中, 有可能间隔一个或几个标签周期后, 才会启动一 个新的緩存周期。 每个接收子周期有两个临界点: 一个是接收子周期启动 的时间点, 另一个是接收子周期结束的时间点。在写 I/O很密集的情况下, 如果在接收子周期结束的时间点上有写 I/O到达, 而且又存在新生成的标 签, 则会启动新的接收子周期。  As shown in FIG. 1B, in the first label period, the first buffer period corresponding to the first label is started; in the second label period, the second buffer period corresponding to the second label is activated; Within the third buffer period corresponding to the third label is started. When the first cache cycle has not ended, the second cache cycle has started. Similarly, when the second cache cycle has not ended, the third cache cycle has started, and multiple cache cycles are superimposed on each other. It should be noted that Figure 1B only shows a possible situation and does not mean that a new cache cycle will be initiated every tag cycle. In practical applications, it is possible to start a new buffer cycle after one or several tag cycles. There are two critical points for each receive sub-cycle: one is the time at which the receive sub-cycle starts, and the other is the time at which the receive sub-cycle ends. In the case where the write I/O is very dense, if a write I/O arrives at the end of the receive sub-cycle and there is a newly generated tag, a new receive sub-cycle is started.

主机下发写 I/O数据量非常大, 那么叠加的緩存周期数就越多。 在主 机下发写 I/O数据量正常且网络复制带宽正常的情况下, 标签控制器的緩 存周期的数据量是一定的, 由于一个接收子周期接收到的写 I/O数据全部 发送到目的端后, 发送子周期结束, 也就是对应的緩存周期结束, 因此, 叠加的緩存周期的数量不会一直增加。  The amount of I/O data sent by the host is very large, so the number of cache cycles superimposed is higher. When the amount of I/O data written by the host is normal and the network replication bandwidth is normal, the data amount of the label controller's buffer period is fixed, because all the write I/O data received in one receiving sub-period is sent to the destination. After the end, the transmission sub-period ends, that is, the corresponding buffer period ends, so the number of superimposed buffer periods does not always increase.

需要说明的是, 接收子周期的时长不能过短也不能过长。 接收子周期 的时长越短, 接收子周期和发送子周期两个子周期的切换频率就越快, 接 收的写 I/O数据和发送的写 I/O数据就越少, 当复制异常中断时, 源端和 目的端的数据一致性越高。 但是, 接收子周期的时长也不能太短, 因为接 收子周期太短, 发送的写 I/O数据量越少, 而且接收子周期与发送子周期 频繁切换会消耗控制器的计算资源。 所以接收子周期的时长不能过短也不 能过长,需要找到一个中间的合适值。这依赖于设计和实际的实验来探索。 It should be noted that the duration of the receiving sub-period cannot be too short or too long. Receiving sub-period The shorter the duration, the faster the switching frequency of the receiving sub-period and the transmitting sub-period, and the less the received write I/O data and the transmitted write I/O data. When the replication is abnormally interrupted, the source and The data consistency at the destination is higher. However, the duration of the receiving sub-period cannot be too short, because the receiving sub-period is too short, the less the amount of write I/O data sent, and the frequent switching of the receiving sub-period and the transmitting sub-period consumes the computing resources of the controller. Therefore, the duration of the receiving sub-period cannot be too short or too long, and it is necessary to find an appropriate value in the middle. This depends on design and actual experimentation to explore.

上述实施例提供的方法中, 标签控制器接收到主机下发到緩存的写 I/O 数据时、 如果不存在已启动的接收子周期, 标签控制器就可以启动当 前生成的标签对应的新的接收子周期, 并根据该接收子周期对应的标签标 识当前主机下发的写 I/O数据, 本发明实施例中, 标签控制器只需要判断 是否存在已启动的接收子周期, 而并不需要判断发送子周期的状态。 如果 存在已启动的接收子周期, 则直接根据该接收子周期对应的标签标识当前 主机下发的写 I/O数据。 在任一个接收子周期结束后, 相应的发送子周期 开始, 即开始将根据该标签标识的写 I/O数据复制到目的端。 上述实施例 提供的方法中, 接收到主机下发的写 I/O数据时, 启动新的接收子周期的 条件是: 存在新生成的标签且不存在已启动的接收子周期。 而不是在上一 个緩存周期的发送子周期结束后, 才能启动下一个緩存周期的接收子周 期。 因此, 上述实施例提供的方法中上一个緩存周期的发送子周期可以与 下一个緩存周期的接收子周期同时进行, 因此, 降低了阻塞写 I/O数据的 概率。  In the method provided by the foregoing embodiment, when the tag controller receives the write I/O data sent by the host to the cache, if there is no initiated receive sub-period, the tag controller can start the new corresponding corresponding tag. Receiving a sub-period, and identifying the write I/O data sent by the current host according to the label corresponding to the receiving sub-period. In the embodiment of the present invention, the label controller only needs to determine whether there is a received receiving sub-period, and does not need to Determine the status of the transmission sub-cycle. If there is a received receiving sub-period, the write I/O data sent by the current host is directly identified according to the label corresponding to the receiving sub-period. After the end of any of the receiving sub-cycles, the corresponding transmission sub-cycle begins, that is, the write I/O data identified according to the tag is copied to the destination. In the method provided by the foregoing embodiment, when the write I/O data sent by the host is received, the condition for starting the new receiving sub-period is: there is a newly generated label and there is no activated receiving sub-period. Instead of starting the transmit sub-period of the next cache cycle, the receive sub-cycle of the next cache cycle can be initiated. Therefore, in the method provided by the foregoing embodiment, the sending sub-period of the previous buffering period can be performed simultaneously with the receiving sub-period of the next buffering period, thereby reducing the probability of blocking the writing of the I/O data.

图 2A为本发明实施例提供的另一种数据复制方法流程图。 本实施例 适用于具有集群存储系统的源端向目的端复制数据的场景。 源端的集群存 储系统中存储控制器包括标签控制器和非标签控制器, 在源端的集群存储 系统中选择一个存储控制器作为标签控制器, 其它均为非标签控制器。 通 常情况下, 标签控制器为集群存储系统的主存储控制器。  2A is a flowchart of another data replication method according to an embodiment of the present invention. This embodiment is applicable to a scenario in which a source end of a cluster storage system copies data to a destination end. The storage controller in the source cluster storage system includes a label controller and a non-label controller. In the source cluster storage system, one storage controller is selected as the label controller, and the others are non-label controllers. Typically, the tag controller is the primary storage controller for the clustered storage system.

如图 2A所示, 本实施例提供的方法包括:  As shown in FIG. 2A, the method provided in this embodiment includes:

步骤 20: 所述标签控制器在标签生成时间点到达时生成标签, 并向集 群存储系统中各非标签控制器广播包括所述标签的标签启动消息。 其中, 不同的标签生成时间点生成的标签不相同。  Step 20: The tag controller generates a tag when the tag generation time point arrives, and broadcasts a tag start message including the tag to each non-tag controller in the cluster storage system. Among them, the labels generated by different label generation time points are different.

步骤 21 : 标签控制器接收主机下发的写 I/O数据时, 判断当前是否存 在已启动的接收子周期。 Step 21: When the tag controller receives the write I/O data sent by the host, it determines whether the current storage is saved. In the receive sub-cycle that has been started.

步骤 22: 若当前不存在已启动的接收子周期, 所述标签控制器启动当 前生成的标签对应的接收子周期, 并根据所述接收子周期对应的标签标识 所述写 I/O数据。  Step 22: If there is no received receiving sub-cycle, the tag controller starts the receiving sub-period corresponding to the currently generated tag, and identifies the write I/O data according to the tag corresponding to the receiving sub-period.

标签控制器可以在每个标签生成时间点到达时生成标签, 并在生成标 签时向集群存储系统中各非标签控制器广播包括所述标签的标签启动消 息, 不同的标签生成时间点生成的标签不相同。  The label controller may generate a label when each label generation time point arrives, and broadcast a label start message including the label to each non-label controller in the cluster storage system when generating the label, and different labels generate labels generated at time points. Not the same.

如 2B所示, 源端的集群存储系统可以包括多个管理不同存储阵列的 存储控制器。 源端可以包括一个主机或多个主机, 主机可以向不同的存储 控制器下发不同的写 I/O数据。 源端的每个存储控制器分别向目的端的存 储系统复制自己接收到的写 I/O数据。 目的端的存储系统也可以是集群存 储系统。 源端可以是生产中心, 相应地目的端可以是容灾中心; 源端也可 以是数据迁移过程中的发送端, 相应地目的端可以是数据迁移过程中的接 收端; 源端也可以是数据备份系统的源中心,相应地, 目的端是备份中心。  As shown in 2B, the source-side clustered storage system can include multiple storage controllers that manage different storage arrays. The source can include one host or multiple hosts, and the host can send different write I/O data to different storage controllers. Each storage controller at the source side copies the write I/O data received by itself to the storage system of the destination end. The storage system at the destination end can also be a cluster storage system. The source end may be a production center, and the destination end may be a disaster recovery center; the source end may also be a transmitting end in a data migration process, and the destination end may be a receiving end in a data migration process; the source end may also be a data end. Back up the source center of the system, and correspondingly, the destination is the backup center.

标签控制器生成新的标签后, 向集群存储系统中其它存储控制器即非 标签控制器广播包括该标签的标签启动消息, 即在本地集群存储系统中广 播包括该标签的标签启动消息。 标签控制器在一个标签生成时间点向每个 非标签控制器点广播的标签启动消息是相同的, 也就是, 标签控制器在一 个标签生成时间点向每个非标签控制器发送的标签均是相同的。 如图 2C 所示, 标签控制器以固定频率 F向各个非标签控制器发送包括标签的标签 启动消息。  After the tag controller generates a new tag, it broadcasts a tag initiation message including the tag to other storage controllers in the cluster storage system, that is, the non-label controller, that is, the tag startup message including the tag is broadcast in the local cluster storage system. The tag start message broadcast by the tag controller to each non-tag controller point at a tag generation time point is the same, that is, the tag controller sends the tag to each non-tag controller at a tag generation time point. identical. As shown in Figure 2C, the tag controller sends a tag initiation message including the tag to each non-tag controller at a fixed frequency F.

步骤 23: 若当前存在已启动的接收子周期, 所述标签控制器根据所述 接收子周期对应的标签标识所述写 I/O数据。  Step 23: If there is currently a received receiving sub-period, the tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-period.

步骤 24: 在所述接收子周期结束时, 所述标签控制器将所述接收子周 期对应的标签标识的写 I/O复制到目的端。  Step 24: At the end of the receiving sub-period, the label controller copies the write I/O of the label identifier corresponding to the receiving sub-period to the destination end.

集群存储系统中标签控制器处理接收到主机下发的写 I/O数据的方法 相同, 不同之处在于: 集群存储系统中标签控制器生成标签时, 还向各非 标签控制器广播包括标签的标签启动消息。 步骤 21至步骤 24步骤 11至 步骤 14相同, 在此不再赘述。  The method of processing the write I/O data sent by the host in the cluster storage system is the same. The difference is that: when the label controller generates the label in the cluster storage system, the label controller is also broadcast to each non-label controller. Tag startup message. Steps 21 to 24 are the same as steps 11 to 14 and will not be described here.

非标签控制器接收到标签启动消息后, 对主机下发的写 I/O的处理方 法与标签控制器类似, 不同之处在于: 非标签控制器接收到主机下发的写After the non-label controller receives the label start message, it processes the write I/O sent to the host. The method is similar to the tag controller, except that: The non-tag controller receives the write from the host.

I/O 数据时, 如果确定当前不存在接收子周期, 启动当前接收到的标签启 动消息中的标签对应的接收子周期。 In the case of I/O data, if it is determined that there is no receiving sub-period currently, the receiving sub-period corresponding to the label in the currently received label start message is started.

标签控制器向各非标签控制器广播包括标签的标签启动消息的目的 是, 促使集群存储系统中各存储控制器在本地同步启动新的接收子周期, 以使各存储控制器将任意一个标签标识的写 I/O 数据全部复制到目的端 后, 源端的集群存储系统中数据与目的端的数据保持一致。 为使管理简单 化, 在不同存储控制器中, 每个接收子周期的时长设为预设时长, 且每个 接收子周期的时长均相等。 通常情况下, 主机下发的写 I/O比较密集, 标 签控制器发送的标签启动消息到达不同的非标签控制器的时间点可能存 在时间差, 不同存储控制器启动同一个标签对应的接收子周期的时间点是 相近的。 由于同一个标签对应的接收子周期时长相等, 相应地, 不同存储 控制器结束同一个标签对应的接收子周期的时间点也相近, 也就是启动同 一个标签对应的发送子周期的时间点也相近, 因此, 各存储控制器复制同 一个标签标识的写 I/O数据到目的端的时间点相近, 从而使在一个标签对 应的写 I/O数据全部复制到目的端后, 源端的集群存储系统中数据与目的 端的数据可保持一致。  The label controller broadcasts the label start message including the label to each non-label controller, so as to cause each storage controller in the cluster storage system to locally initiate a new receiving sub-period to enable each storage controller to identify any one of the labels. After the write I/O data is copied to the destination, the data in the cluster storage system at the source is consistent with the data on the destination. In order to simplify management, in different memory controllers, the duration of each receiving sub-period is set to a preset duration, and the duration of each receiving sub-period is equal. Generally, the write I/O sent by the host is dense. The time when the label start message sent by the label controller reaches different non-label controllers may have a time difference. Different storage controllers start the receive sub-period corresponding to the same label. The time points are similar. Since the receiving sub-periods of the same label have the same duration, correspondingly, the time points at which the different storage controllers end the receiving sub-periods corresponding to the same label are similar, that is, the time points at which the transmitting sub-cycles corresponding to the same label are started are similar. Therefore, each storage controller copies the write I/O data of the same tag identifier to the destination end at a similar time, so that after the write I/O data corresponding to one tag is copied to the destination end, the source end of the cluster storage system is The data is consistent with the data at the destination.

可选地, 不同的存储控制器有可能接收到主机下发到緩存的写 I/O数 据量差别较大, 为了不同的存储控制器在相近的时间点启动同一个标签对 应的发送子周期, 进而使一个标签对应的发送子周期结束后, 发送端的集 群存储系统中数据与接收端的数据可保持一致, 本发明还提供了以下技术 方案: 标签控制器在一个接收子周期结束时, 向各所述非标签控制器广播 停止标识消息, 通知各所述非标签控制器停止根据该接收子周期对应的标 签标识主机下发的写 I/O数据, 开始向接收端复制緩存中用上述标签标识 的写 I/O数据。  Optionally, different storage controllers may receive a large difference in the amount of write I/O data sent by the host to the cache, so that different storage controllers start the transmission sub-periods corresponding to the same label at different time points. After the transmission sub-period corresponding to one label is completed, the data in the cluster storage system at the transmitting end and the data in the receiving end can be consistent. The present invention also provides the following technical solutions: The label controller at the end of a receiving sub-period, to each station The non-label controller broadcasts the stop identification message, and notifies each of the non-label controllers to stop writing I/O data sent by the host according to the label corresponding to the receiving sub-period, and starts to copy the cache identifier in the cache to the receiving end. Write I/O data.

上述实施例提供的方法中, 标签控制器周期性向本地集群存储系统的 各个非标签控制器发送包括标签的标签启动消息。 标签控制器接收到主机 下发到緩存的写 I/O数据时、 如果不存在已启动的接收子周期, 就可以启 动当前生成的标签对应的新的接收子周期, 并根据该接收子周期对应的标 签标识当前主机下发的写 I/O数据。 如果存在已启动的接收子周期, 则直 接根据该接收子周期对应的标签标识当前主机下发的写 I/O数据。 集群存 储系统中每个非标签控制器, 接收到主机下发到緩存的写 I/O数据时、 与 标签控制器的处理方法不同之处在于, 确定当前不存在接收子周期时, 启 动当前接收到的标签启动消息中的标签对应的接收子周期。 在任一个接收 子周期结束后,相应的发送子周期开始,即开始将根据该标签标识的写 I/O 数据复制到目的端。 上述实施例提供的方法中, 集群存储系统中每个存储 控制器接收到主机下发的写 I/O数据时, 启动新的接收子周期的条件是: 存在新生成的标签且不存在已启动的接收子周期。 而不是在上一个緩存周 期的发送子周期结束后, 才能启动下一个緩存周期的接收子周期。 因此, 上述实施例提供的方法中上一个緩存周期的发送子周期可以与下一个緩 存周期的接收子周期同时进行, 因此, 降低了源端的集群存储系统阻塞写In the method provided by the foregoing embodiment, the label controller periodically sends a label start message including a label to each non-label controller of the local cluster storage system. When the tag controller receives the write I/O data sent by the host to the cache, if there is no initiated receive sub-period, the new receive sub-period corresponding to the currently generated tag may be started, and corresponding to the receive sub-period according to the receive sub-period The tag identifies the write I/O data sent by the current host. If there is a receiving sub-cycle that has been started, then The write I/O data sent by the current host is identified according to the label corresponding to the receiving sub-period. Each non-label controller in the cluster storage system receives the write I/O data sent by the host to the cache. The difference from the processing method of the label controller is that when the receiving sub-cycle does not exist, the current receiving is started. The received sub-period corresponding to the tag in the tag start message. After the end of any of the receiving sub-cycles, the corresponding transmission sub-cycle begins, that is, the write I/O data identified by the tag is copied to the destination. In the method provided by the foregoing embodiment, when each storage controller in the cluster storage system receives the write I/O data sent by the host, the condition for starting the new receiving sub-period is: the newly generated label exists and the non-existent activated Receive sub-period. Instead of starting the receive sub-cycle of the next buffer cycle after the end of the transmit sub-cycle of the previous buffer cycle. Therefore, in the method provided by the foregoing embodiment, the sending sub-period of the previous buffering period can be performed simultaneously with the receiving sub-period of the next buffering period, thereby reducing the blocking write of the cluster storage system at the source end.

I/O数据的概率。 The probability of I/O data.

图 3为本发明实施例常提供的又一种数据复制方法流程图。 本实施例 的执行主体为源端的集群存储系统中非标签控制器。 如图 3所示, 本实施 例提供的方法包括:  FIG. 3 is a flowchart of still another data replication method that is commonly provided in the embodiment of the present invention. The execution body of this embodiment is a non-label controller in the cluster storage system at the source end. As shown in FIG. 3, the method provided in this embodiment includes:

步骤 31 : 所述非标签控制器接收主机下发的写 I/O数据时, 判断当前 是否存在已启动的接收子周期。  Step 31: When the non-tag controller receives the write I/O data sent by the host, it determines whether there is a currently received receive sub-period.

步骤 32: 若当前不存在已启动的接收子周期, 所述非标签控制器启动 当前接收的标签对应的接收子周期, 并根据启动所述接收子周期对应的标 签标识所述写 I/O数据。  Step 32: If there is no received receiving sub-period, the non-label controller starts the receiving sub-period corresponding to the currently received label, and identifies the write I/O data according to the label corresponding to the receiving the receiving sub-period. .

标签控制器可以在每个标签生成时间点到达时生成标签, 并在生成标 签时向集群存储系统中各非标签控制器广播包括所述标签的标签启动消 息, 不同的标签生成时间点生成的标签不相同。 非标签控制器接收到标签 启动消息后, 对主机下发的写 I/O的处理方法与标签控制器类似, 不同之 处在于, 非标签控制器接收到主机下发的写 I/O数据时, 如果确定当前不 存在接收子周期, 启动当前接收到的标签启动消息中的标签对应的接收子 周期。  The label controller may generate a label when each label generation time point arrives, and broadcast a label start message including the label to each non-label controller in the cluster storage system when generating the label, and different labels generate labels generated at time points. Not the same. After receiving the label start message, the non-label controller processes the write I/O sent by the host similarly to the label controller. The difference is that when the non-label controller receives the write I/O data sent by the host. If it is determined that there is currently no receiving sub-period, the receiving sub-period corresponding to the label in the currently received label start message is started.

步骤 33: 若当前存在已启动的接收子周期, 所述非标签控制器根据所 述接收子周期对应的标签标识所述写 I/O数据。  Step 33: If there is currently a received receiving sub-period, the non-tag controller identifies the write I/O data according to the label corresponding to the receiving sub-period.

非标签控制器接收到标签启动消息时, 如果没有接收到主机下发的写 I/O 数据, 则丟弃当前标签启动消息中的标签; 如果接收到主机下发的写 I/O 数据, 则判断当前是否存在已启动的接收子周期, 从而确定是否启动 当前标签启动消息中的标签对应的接收子周期。 如果当前存在已启动的接 收子周期, 标签控制器也会丟弃当前生成的标签。 When the non-label controller receives the label start message, if it does not receive the write issued by the host If the I/O data is sent, the label in the current label start message is discarded. If the write I/O data sent by the host is received, it is determined whether there is a currently received receiving sub-period, thereby determining whether to start the current label start message. The label corresponds to the receiving sub-period. If there is currently a received receive sub-cycle, the tag controller will also discard the currently generated tag.

步骤 34: 在所述接收子周期结束时, 所述非标签控制器将所述接收子 周期对应的标签标识的写 I/O复制到目的端。  Step 34: At the end of the receiving sub-period, the non-tag controller copies the write I/O of the tag identifier corresponding to the receiving sub-period to the destination end.

可选地, 不同的存储控制器有可能接收到主机下发到緩存的写 I/O数 据量差别较大, 为了不同的存储控制器在相近的时间点启动同一个标签对 应的发送子周期, 进而使任一个标签对应的发送子周期结束后, 源端的集 群存储系统中的数据与目的端中的数据保持一致, 非标签控制器接收到标 签控制器广播的针对结束的接收子周期对应标签的标识停止消息时, 停止 根据所述结束的接收子周期对应的标签标识所述主机下发的写 I/O数据。 或者, 非标签控制器在任意一个所述接收子周期结束时, 停止根据所述结 束的接收子周期对应的标签标识所述主机下发的写 I/O数据。  Optionally, different storage controllers may receive a large difference in the amount of write I/O data sent by the host to the cache, so that different storage controllers start the transmission sub-periods corresponding to the same label at different time points. After the transmission sub-period corresponding to any one of the labels is completed, the data in the cluster storage system at the source end is consistent with the data in the destination end, and the non-label controller receives the corresponding sub-cycle corresponding label broadcasted by the label controller. When the stop message is identified, the write I/O data sent by the host is determined according to the label corresponding to the end of the received sub-period. Alternatively, the non-tag controller stops identifying the write I/O data sent by the host according to the label corresponding to the end of the receiving sub-period at the end of any one of the receiving sub-periods.

可选地, 每个非标签控制器在任意一个接收子周期结束时, 或接收到 标签控制器发送的标识停止消息时, 统计在当前结束的接收子周期内接收 到写 I/O数据的个数。 通过统计的写 I/O数据的个数, 可确定是否将当前 结束的接收子周期内接收的所有写 I/O数据全部复制到目的端。 另外, 每 个非标签控制器也可在接收到标签控制器发送的标识停止消息后, 向标签 控制器返回响应消息, 在响应消息中携带各自在上述标识停止消息所针对 的接收子周期内接收到写 I/O数据的个数, 由标签控制器统计在上述标识 停止消息所针对的接收子周期内所有存储控制器所标识的写 I/O数据的总 个数, 从而可确定集群存储系统是否将上述标识停止消息所针对的接收子 周期内的所有写 I/O数据发送到目的端。  Optionally, each non-label controller receives the write I/O data in the currently received receiving sub-period at the end of any one of the receiving sub-cycles or when receiving the identifier stop message sent by the label controller. number. By counting the number of write I/O data, it can be determined whether all the write I/O data received in the currently received receive sub-cycle is copied to the destination. In addition, each non-label controller may also return a response message to the label controller after receiving the identifier stop message sent by the label controller, and the response message carries each receiving period in the receiving sub-period for the identifier stop message. To count the number of I/O data to be written, the tag controller counts the total number of write I/O data identified by all the storage controllers in the receiving sub-period for which the above-mentioned identification stop message is directed, thereby determining the cluster storage system. Whether to send all write I/O data in the receiving sub-period for which the above-mentioned identification stop message is directed to the destination.

可选地, 为提高数据复制效率, 在任意一个接收子周期内, 存储控制 器将访问地址相同的写 I/O数据集合并成所述写 I/O数据集合中最后一次 接收到的写 I/O数据。  Optionally, in order to improve data replication efficiency, the storage controller accesses the same set of write I/O data with the same address and writes the last received write I in the write I/O data set in any one of the receiving sub-periods. /O data.

图 4为本发明实施例提供的再一种数据复制方法流程图。 本实施例为 一个緩存周期内各存储控制器的执行过程。 如图 4所示, 包括:  FIG. 4 is a flowchart of still another data replication method according to an embodiment of the present invention. This embodiment is an execution process of each storage controller in a cache period. As shown in Figure 4, it includes:

步骤 41 : 标签控制器在每个标签生成时间点到达时生成标签, 并向各 非标签控制器广播包括所述标签的标签启动消息。 Step 41: The tag controller generates a tag when each tag generation time point arrives, and The non-tag controller broadcasts a tag initiation message including the tag.

步骤 42A: 标签控制器接收到主机下发的写 I/O数据时, 判断当前是 否存在已启动的接收子周期, 若不存在已启动的接收子周期, 启动当前生 成的标签对应的接收子周期, 根据当前生成的标签标识所述写 I/O数据, 否则, 根据已启动的接收子周期对应的标签标识所述写 I/O数据。  Step 42A: When the tag controller receives the write I/O data sent by the host, it determines whether there is a currently received receiving sub-period. If there is no activated receiving sub-period, the receiving sub-period corresponding to the currently generated tag is started. And writing the I/O data according to the currently generated label, otherwise, identifying the write I/O data according to the label corresponding to the received receiving sub-cycle.

步骤 42B: 非标签控制器接收到主机下发的写 I/O数据时, 判断当前 是否存在已启动的接收子周期, 若不存在已启动的接收子周期, 启动当前 接收到的标签启动消息中的标签对应的接收子周期, 并根据启动当前接收 到的标签启动消息中的标签标识所述写 I/O数据, 否则, 根据已启动的接 收子周期对应的标签标识所述写 I/O数据。  Step 42B: When the non-tag controller receives the write I/O data sent by the host, it determines whether there is a received receiving sub-period currently. If there is no activated receiving sub-period, the currently received tag start message is started. The label corresponds to the receiving sub-period, and identifies the write I/O data according to the label in the currently-used label start message, otherwise, the write I/O data is identified according to the label corresponding to the activated receiving sub-period. .

通过情况下,主机的下发的写 I/O数据比较密集,步骤 42A与步骤 42B 启动的接收子周期可视为同一个标签对应的接收子周期。  In this case, the write I/O data sent by the host is relatively dense, and the receive sub-periods initiated in step 42A and step 42B can be regarded as the receive sub-periods corresponding to the same label.

步骤 43: 标签控制器在步骤 42A启动的一个接收子周期结束时, 向 各非标签控制器广播针对所述接收子周期的标识停止消息。  Step 43: The tag controller broadcasts an identity stop message for the receiving sub-period to each non-tag controller at the end of a receiving sub-cycle initiated by step 42A.

步骤 44: 非标签控制器接收到标识停止消息时, 停止根据标识停止消 息所针对的接收子周期对应的标签标识主机下发的写 I/O数据。  Step 44: When the non-label controller receives the identifier stop message, it stops the write I/O data sent by the label corresponding to the label corresponding to the receiving sub-period for the identifier stop message.

每个存储控制器在接收子周期内接收到主机下发的写 I/O数据量可能 不相同, 有的写 I/O数据量会 4艮大, 相应地, 用标识写 I/O数据的时间会 较长; 有的写 I/O数据量会很小, 相应地, 用标识写 I/O数据的时间会较 短。 因此, 在一个标签对应的接收子周期内, 有的存储控制器可能已根据 上述标签标识了接收到的所有写 I/O数据, 而有的存储控制器可能还没有 根据上述标签标识接收到的部分写 I/O数据。 为了在一个标签对应的接收 子周期后, 源端的集群存储系统中数据与目的端的数据保持一致。 标签控 制器在一个标签对应的接收子周期结束后, 在本地集群存储系统广播标识 停止消息, 各存储控制器接收到标识停止消息后, 停止根据标识停止消息 所针对的接收子周期对应的标签标识主机下发的写 I/O数据。 同时进入标 识停止消息所针对的接收子周期对应的发送子周期, 即同时开始将所述接 收子周期对应的标签标识过的写 I/O数据复制到目的端。  Each storage controller receives the write I/O data sent by the host in the receiving sub-period. The amount of write I/O data may be different. Some write I/O data volume will be 4, and correspondingly, the I/O data is written with the identifier. The time will be longer; some write I/O data will be small, and accordingly, the time to write I/O data with the identifier will be shorter. Therefore, in a receiving sub-period corresponding to a label, some storage controllers may have identified all the received write I/O data according to the above label, and some storage controllers may not have received the received label according to the label identifier. Partially write I/O data. The data in the cluster storage system at the source end is consistent with the data at the destination end after the receiving sub-period corresponding to a label. After the labeling controller ends the receiving sub-period corresponding to the label, the label controller stops the message in the local cluster storage system. After receiving the identifier stop message, each storage controller stops the label identifier corresponding to the receiving sub-period for the identifier stop message. Write I/O data sent by the host. At the same time, the transmission sub-period corresponding to the receiving sub-period for the identification stop message is entered, that is, the write I/O data marked by the label corresponding to the receiving sub-period is simultaneously copied to the destination end.

步骤 45A:标签控制器进入步骤 42A启动的接收子周期对应的发送子 周期, 将上述标签标识的写 I/O数据复制到目的端。 步骤 45B: 非标签控制器进入步骤 42B启动的接收子周期对应的发送 子周期, 将上述标签标识的写 I/O数据复制到目的端。 Step 45A: The tag controller enters a sending sub-period corresponding to the receiving sub-period initiated by step 42A, and copies the write I/O data identified by the tag to the destination end. Step 45B: The non-tag controller enters the sending sub-period corresponding to the receiving sub-period initiated by step 42B, and copies the write I/O data identified by the tag to the destination end.

图 5A为本实施例提供的一种存储控制器结构示意图。 如图 5A所示, 该存储控制器包括: 判断模块 51、 标识模块 52和复制模块 53。  FIG. 5A is a schematic structural diagram of a storage controller according to an embodiment of the present invention. As shown in FIG. 5A, the memory controller includes: a determining module 51, an identifying module 52, and a copying module 53.

判断模块 51 , 用于接收主机下发的写 I/O数据时, 判断当前是否存在 已启动的接收子周期。  The determining module 51 is configured to: when receiving the write I/O data sent by the host, determine whether there is currently a received receiving sub-period.

标识模块 52, 用于若当前不存在已启动的接收子周期, 启动当前生成 的标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据。  The identifier module 52 is configured to start a receiving sub-period corresponding to the currently generated label if the currently-used receiving sub-period does not exist, and identify the write I/O data according to the label corresponding to the receiving sub-period.

所述标识模块 52, 还用于若当前存在已启动的接收子周期, 根据所述 接收子周期对应的标签标识所述写 I/O数据。  The identifier module 52 is further configured to: if the currently received receiving sub-period exists, identify the write I/O data according to the label corresponding to the receiving sub-period.

复制模块 53 , 用于在所述接收子周期结束时, 将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。  The copying module 53 is configured to: when the receiving sub-period ends, copy the write I/O data of the label identifier corresponding to the receiving sub-period to the destination end.

可选地, 如图 5B所示, 上述存储控制器还可包括标签控制模块 54。 标签控制模块, 用于在标签生成时间点到达时生成标签, 不同的标签生成 时间点生成的标签不相同。 标识模块启动接收子周期时, 启动与标签控制 模块生成的标签对应的接收子周期。  Optionally, as shown in FIG. 5B, the above storage controller may further include a label control module 54. The label control module is configured to generate labels when the label generation time point arrives, and the labels generated by different label generation time points are different. When the identification module starts the receiving sub-cycle, the receiving sub-period corresponding to the tag generated by the tag control module is started.

可选地, 所述判断模块, 还用于在生成标签时, 如果没有所述主机下 发的写 I/O数据, 丟弃所述生成的标签。  Optionally, the determining module is further configured to discard the generated label if the write I/O data sent by the host is not generated when the label is generated.

可选地, 为使上述存储控制器可适用于集群存储系统中的标签控制 器, 上述存储控制器还可包括: 标签控制模块。  Optionally, in order to make the foregoing storage controller applicable to a tag controller in the cluster storage system, the foregoing storage controller may further include: a tag control module.

所述标签控制模块, 还用于向集群存储系统中各非标签控制器广播包 括所述标签的标签启动消息。 标识模块 52根据标签控制模块生成的标签 启动接收子周期。  The tag control module is further configured to broadcast, to each non-tag controller in the cluster storage system, a tag initiation message including the tag. The identification module 52 initiates a reception sub-period based on the tag generated by the tag control module.

可选地, 为了使集群存储系统中不同的存储控制器在相近的时间点启 动同一个标签对应的发送子周期, 进而使一个标签对应的发送子周期结束 后, 源端的集群存储系统的数据与目的端的数据可保持一致。 上述标签控 制模块, 还用于在所述接收子周期结束时, 向所述各非标签控制器广播针 对结束的接收子周期对应标签的标识停止消息, 所述标识停止消息, 用于 通知所述各非标签控制器停止根据所述结束的接收子周期对应的标签标 识所述主机下发的写 I/O数据。标签控制模块在任一个接收子周期结束时, 向所述各非标签控制器广播针对结束的接收子周期对应标签的标识停止 消息。 Optionally, in order to enable different storage controllers in the cluster storage system to start the transmission sub-periods corresponding to the same label at a similar time point, and then, after the corresponding transmission sub-period of one label ends, the data of the cluster storage system at the source end is The data at the destination can be consistent. The label control module is further configured to: when the receiving sub-period ends, broadcast, to the non-label controllers, an identifier stop message for the end receiving sub-period corresponding label, where the identifier stop message is used to notify the Each non-label controller stops the label label corresponding to the receiving sub-period according to the end Know the write I/O data sent by the host. The tag control module broadcasts an identification stop message for the end receiving sub-period corresponding tag to the non-tag controllers at the end of any one of the receiving sub-cycles.

上述实施例可参见图 1A、 图 2A和图 4对应实施例的描述, 在此不再 图 6A为本实施例提供的又一种存储控制器结构示意图。 如图 6A所 示, 该存储控制器包括: 判断模块 61、 标识模块 62和复制模块 63。  For the foregoing embodiment, reference may be made to the description of the corresponding embodiment of FIG. 1A, FIG. 2A and FIG. 4, and FIG. 6A is not a schematic structural diagram of another storage controller provided by this embodiment. As shown in FIG. 6A, the memory controller includes: a judging module 61, an identifying module 62, and a copying module 63.

判断模块 61 , 用于接收主机下发的写 I/O数据时, 判断当前是否存在 已启动的接收子周期;  The determining module 61 is configured to: when receiving the write I/O data sent by the host, determine whether there is currently a received receiving sub-period;

标识模块 62, 用于若当前不存在已启动的接收子周期, 启动当前接收 的标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据;  The identifier module 62 is configured to: if the receiving sub-period does not exist, start a receiving sub-period corresponding to the currently received label, and identify the write I/O data according to the label corresponding to the receiving sub-period;

所述标识模块 62, 还用于若当前存在已启动的接收子周期, 根据所述 接收子周期对应的标签标识所述写 I/O数据;  The identifier module 62 is further configured to: if the currently received receiving sub-period exists, identify the write I/O data according to the label corresponding to the receiving sub-period;

复制模块 63 , 用于在所述接收子周期结束时, 将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。  The copying module 63 is configured to: when the receiving sub-period ends, copy the write I/O data of the label identifier corresponding to the receiving sub-period to the destination end.

可选地, 如图 6B所示, 还包括: 接收模块 64, 用于接收集群存储系 统中标签控制器广播的标签启动消息, 所述标签启动消息包括所述标签, 并且不同的标签生成时间点所述标签控制器广播的标签不相同。 标识模块 62启动接收子周期时, 启动与接收模块接收到的标签对应的接收子周期。  Optionally, as shown in FIG. 6B, the method further includes: a receiving module 64, configured to receive a label start message broadcast by the label controller in the cluster storage system, where the label start message includes the label, and different label generation time points The tags broadcast by the tag controller are different. When the identification module 62 starts the receiving sub-period, the receiving sub-period corresponding to the tag received by the receiving module is started.

可选地, 所述标识模块 62, 还用于在所述接收子周期结束时, 或, 接 收到所述标签控制器广播的针对结束的接收子周期对应标签的标识停止 消息时, 停止根据所述结束的接收子周期对应的标签标识所述主机下发的 写 I/O数据。  Optionally, the identifier module 62 is further configured to: when the receiving sub-period ends, or when receiving the identifier stop message broadcasted by the label controller for the end receiving sub-period corresponding label, stop the The label corresponding to the receiving sub-cycle of the end identifies the write I/O data sent by the host.

可选地, 所述判断模块 61 ,还用于在所述接收模块接收到所述标签启 动消息时, 如果没有所述主机下发的写 I/O数据, 丟弃所述标签启动消息 中的标签。  Optionally, the determining module 61 is further configured to: when the receiving module receives the label initiation message, if there is no write I/O data sent by the host, discarding the label startup message label.

上述实施例可参见图 3和图 4对应实施例的描述, 在此不再赘述。 本发明实施例还提供一种数据复制系统, 包括如图 5A和图 6A所示 的存储控制器, 或, 包括如图 5B和图 6B所示的存储控制器。 图 7为本实施例提供的再一种存储控制器结构示意图。 本实施例提供 的存储控制器适用于单存储器场景, 也适用于集群在座系统中标签存储 器。 本实施例提供的存储控制器适用于集群在座系统中非标签存储器。 如 图 Ί 所示的存储控制器 700 包括: 存储器(memory)730、 处理器 (processor)710、 总线 740以及通信接口 (Communications Interface)720; 其 中所述处理器、 所述通信接口、 所述存储器通过所述总线完成相互间的通 信。 For the foregoing embodiment, reference may be made to the description of the corresponding embodiments in FIG. 3 and FIG. 4, and details are not described herein again. The embodiment of the present invention further provides a data replication system, including the storage controller shown in FIG. 5A and FIG. 6A, or a storage controller as shown in FIG. 5B and FIG. 6B. FIG. 7 is a schematic structural diagram of still another storage controller according to the embodiment. The storage controller provided in this embodiment is applicable to a single memory scenario, and is also applicable to a tag memory in a clustered presence system. The storage controller provided in this embodiment is applicable to a non-tag memory in a cluster presence system. The memory controller 700 shown in FIG. 包括 includes: a memory 730, a processor 710, a bus 740, and a communication interface 720; wherein the processor, the communication interface, and the memory Communication with each other is accomplished through the bus.

处理器 710可能是一个中央处理器 CPU, 或者是特定集成电路 ASIC ted Circuit ) , 或者是被配置成实施本发明实

Figure imgf000019_0001
The processor 710 may be a central processing unit CPU, or a specific integrated circuit ASIC ted Circuit ), or configured to implement the present invention.
Figure imgf000019_0001

存储器 730 , 用于存放程序 732。存储器 730可能包含高速 RAM存储 器, 也可能还包括非易失性存储器 ( non- volatile memory ) , 例如至少一 个磁盘存储器。 具体地, 程序 732可以包括程序代码, 所述程序代码包括 计算机操作指令。  The memory 730 is configured to store the program 732. Memory 730 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory. In particular, program 732 can include program code, the program code including computer operating instructions.

所述处理器, 用于执行所述程序 732。  The processor is configured to execute the program 732.

所述程序, 用于:  The program is for:

接收主机下发的写 I/O数据时, 判断当前是否存在已启动的接收子周 期;  When receiving the write I/O data sent by the host, it is determined whether there is a currently received receiving sub-period;

若当前不存在已启动的接收子周期, 启动当前生成的标签对应的接收 子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据  If the received sub-period does not exist, the receiving sub-period corresponding to the currently generated label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period.

若当前存在已启动的接收子周期, 根据所述接收子周期对应的标签标 识所述写 I/O数据;  If there is currently a received receiving sub-period, the write I/O data is identified according to the label corresponding to the receiving sub-period;

在所述接收子周期结束时, 通过所述通信接口将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。  At the end of the receiving sub-period, the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.

所述程序, 还用于:  The program is also used to:

在标签生成时间点到达时生成标签, 不同的标签生成时间点生成的标 签不相同。  Tags are generated when the tag generation time point arrives, and tags generated by different tag generation time points are different.

可选地, 所述程序, 还用于: 通过所述通信接口向集群存储系统中各 非标签控制器广播包括所述标签的标签启动消息。  Optionally, the program is further configured to: broadcast, by using the communication interface, a label start message including the label to each non-tag controller in the cluster storage system.

可选地, 所述程序, 还用于: 在所述接收子周期结束时, 通过所述通 信接口向所述各非标签控制器广播针对结束的接收子周期对应标签的标 识停止消息, 所述标识停止消息, 用于通知所述各非标签控制器停止根据 所述结束的接收子周期对应的标签标识所述主机下发的写 I/O数据。 Optionally, the program is further configured to: pass the pass at the end of the receiving sub-period The information interface broadcasts an identifier stop message for the end of the receiving sub-period corresponding label to the non-label controllers, where the identifier stop message is used to notify the non-label controllers to stop according to the end of the receiving sub-period. The tag identifies the write I/O data sent by the host.

可选地, 所述程序, 还用于: 在生成标签时, 如果没有所述主机下发 的写 I/O数据, 丟弃所述生成的标签。  Optionally, the program is further configured to: when the label is generated, if the write I/O data sent by the host is not generated, the generated label is discarded.

上述实施例可参见图 1A、 图 2A和图 4对应实施例的描述, 在此不再 赘述。  For the foregoing embodiment, reference may be made to the description of the corresponding embodiment of FIG. 1A, FIG. 2A and FIG. 4, and details are not described herein again.

图 8为本实施例提供的再一种存储控制器结构示意图。 本实施例提供 的存储控制器适用于集群在座系统中非标签存储器。 如图 8所示的存储控 制器 800包括: 存储器 (memory)830、 处理器 (processor)810、 总线 840以 及通信接口(Communications Interface)820; 其中所述处理器、 所述通信接 口、 所述存储器通过所述总线完成相互间的通信。  FIG. 8 is a schematic structural diagram of still another storage controller according to the embodiment. The storage controller provided in this embodiment is applicable to a non-tag memory in a clustered presence system. The memory controller 800 shown in FIG. 8 includes: a memory 830, a processor 810, a bus 840, and a communication interface 820; wherein the processor, the communication interface, the memory Communication with each other is accomplished through the bus.

处理器 810可能是一个中央处理器 CPU, 或者是特定集成电路 ASIC ( Application Specific Integrated Circuit ) , 或者是被配置成实施本发明实 施例的一个或多个集成电路。  Processor 810 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.

存储器 830, 用于存放程序 832。存储器 830可能包含高速 RAM存储 器, 也可能还包括非易失性存储器 ( non- volatile memory ) , 例如至少一 个磁盘存储器。 具体地, 程序 832可以包括程序代码, 所述程序代码包括 计算机操作指令。  The memory 830 is configured to store the program 832. Memory 830 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory. In particular, program 832 can include program code, the program code including computer operating instructions.

所述处理器, 用于执行所述程序 832。  The processor is configured to execute the program 832.

所述程序, 用于:  The program is for:

接收主机下发的写 I/O数据时, 判断当前是否存在已启动的接收子周 期;  When receiving the write I/O data sent by the host, it is determined whether there is a currently received receiving sub-period;

若当前不存在已启动的接收子周期, 启动当前接收的标签对应的接收 子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据;  If the receiving sub-period does not exist, the receiving sub-period corresponding to the currently received label is started, and the write I/O data is identified according to the label corresponding to the receiving sub-period;

若当前存在已启动的接收子周期, 根据所述接收子周期对应的标签标 识所述写 I/O数据;  If there is currently a received receiving sub-period, the write I/O data is identified according to the label corresponding to the receiving sub-period;

在所述接收子周期结束时, 通过所述通信接口将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。  At the end of the receiving sub-period, the write I/O data of the tag identifier corresponding to the receiving sub-period is copied to the destination through the communication interface.

可选地, 所述程序, 还用于: 通过所述通信接口接收集群存储系统中标签控制器广播的标签启动 消息, 所述标签启动消息包括所述标签, 并且不同的标签生成时间点所述 标签控制器广播的标签不相同。 Optionally, the program is further configured to: Receiving, by the communication interface, a label activation message broadcast by the label controller in the cluster storage system, the label activation message includes the label, and the label broadcast by the label controller is different at different label generation time points.

可选地, 所述程序, 还用于: 在所述接收子周期结束时, 或, 通过所 述通信接口接收到所述标签控制器广播的针对结束的接收子周期对应标 签的标识停止消息时, 停止根据所述结束的接收子周期对应的标签标识所 述主机下发的写 I/O数据。  Optionally, the program is further configured to: when the receiving sub-period ends, or when receiving, by the communication interface, the identifier stop message broadcasted by the label controller for the end receiving sub-period corresponding label And stopping to write the write I/O data sent by the host according to the label corresponding to the end of the receiving sub-period.

可选地, 所述程序, 还用于: 在通过所述通信接口接收到所述标签启 动消息时, 如果没有所述主机下发的写 I/O数据, 丟弃所述标签启动消息 中的标签。  Optionally, the program is further configured to: when the label initiation message is received by the communication interface, if there is no write I/O data sent by the host, discarding the label startup message label.

上述实施例可参见图 3和图 4对应实施例的描述, 在此不再赘述。 本领域普通技术人员可以理解: 实现上述方法实施例的全部或部分步骤 可以通过程序指令相关的硬件来完成, 前述的程序可以存储于一计算机可读 取存储介质中, 该程序在执行时, 执行包括上述方法实施例的步骤; 而前述 的存储介质包括: ROM, RAM, 磁碟或者光盘等各种可以存储程序代码的介 质。  For the foregoing embodiment, reference may be made to the description of the corresponding embodiments in FIG. 3 and FIG. 4, and details are not described herein again. A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The method includes the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。  Finally, it should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting thereof; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims

权 利 要 求 书 claims 1、 一种数据复制方法, 其特征在于, 包括: 1. A data replication method, characterized by including: 标签控制器接收主机下发的写 I/O数据时, 判断当前是否存在已启动 的接收子周期; When the tag controller receives the write I/O data sent by the host, it determines whether there is currently a started receiving sub-cycle; 若当前不存在已启动的接收子周期, 所述标签控制器启动当前生成的 标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据; If there is currently no activated receiving sub-period, the tag controller starts the receiving sub-period corresponding to the currently generated tag, and identifies the write I/O data according to the tag corresponding to the receiving sub-period; 若当前存在已启动的接收子周期, 所述标签控制器根据所述接收子周 期对应的标签标识所述写 I/O数据; If there is currently a started receiving sub-cycle, the tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-cycle; 在所述接收子周期结束时, 所述标签控制器将所述接收子周期对应的 标签标识的所述写 I/O数据复制到目的端。 At the end of the receiving sub-period, the tag controller copies the write I/O data identified by the tag corresponding to the receiving sub-period to the destination. 2、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 所述标签控制器在标签生成时间点到达时生成标签, 不同的标签生成 时间点生成的标签不相同。 2. The method according to claim 1, characterized in that the method further includes: the tag controller generates a tag when the tag generation time point arrives, and the tags generated at different tag generation time points are different. 3、 根据权利要求 2所述的方法, 其特征在于, 所述方法还包括: 所述标签控制器向集群存储系统中各非标签控制器广播包括所述标 签的标签启动消息。 3. The method according to claim 2, characterized in that the method further includes: the tag controller broadcasting a tag startup message including the tag to each non-tag controller in the cluster storage system. 4、 根据权利要求 3所述的方法, 其特征在于, 所述方法还包括: 在所述接收子周期结束时, 所述标签控制器向所述各非标签控制器广 播针对结束的接收子周期对应标签的标识停止消息, 所述标识停止消息, 用于通知所述各非标签控制器停止根据所述结束的接收子周期对应的标 签标识所述主机下发的写 I/O数据。 4. The method according to claim 3, characterized in that, the method further includes: at the end of the receiving sub-period, the tag controller broadcasts the ending receiving sub-period to each non-tag controller. The identification stop message corresponding to the tag, the identification stop message, is used to notify each non-tag controller to stop writing I/O data issued by the host according to the tag identification corresponding to the completed receiving sub-period. 5、 根据权利要求 2、 3或 4所述的方法, 其特征在于, 所述方法还包 括: 5. The method according to claim 2, 3 or 4, characterized in that the method further includes: 在生成标签时, 如果没有所述主机下发的写 I/O数据, 所述标签控制 器丟弃所述生成的标签。 When generating a tag, if there is no write I/O data issued by the host, the tag controller discards the generated tag. 6、 一种数据复制方法, 其特征在于, 包括: 6. A data copying method, characterized by including: 非标签控制器接收主机下发的写 I/O数据时, 判断当前是否存在已启 动的接收子周期; When the non-tag controller receives the write I/O data sent by the host, it determines whether there is currently a started receiving sub-cycle; 若当前不存在已启动的接收子周期, 所述非标签控制器启动当前接收 的标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 If there is currently no started receiving sub-period, the non-tag controller starts the current receiving The tag corresponding to the receiving sub-period, and the write is identified according to the tag corresponding to the receiving sub-period I/O数据; I/O data; 若当前存在已启动的接收子周期, 所述非标签控制器根据所述接收子 周期对应的标签标识所述写 I/O数据; If there is currently a started receiving sub-cycle, the non-tag controller identifies the write I/O data according to the tag corresponding to the receiving sub-cycle; 在所述接收子周期结束时, 所述非标签控制器将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。 At the end of the receiving sub-period, the non-tag controller copies the write I/O data identified by the tag corresponding to the receiving sub-period to the destination. 7、 根据权利要求 6所述的方法, 其特征在于, 所述方法还包括: 所述非标签控制器接收集群存储系统中标签控制器广播的标签启动 消息, 所述标签启动消息包括所述标签, 并且不同的标签生成时间点所述 标签控制器广播的标签不相同。 7. The method according to claim 6, wherein the method further includes: the non-tag controller receiving a tag startup message broadcast by a tag controller in the cluster storage system, the tag startup message including the tag , and the tags broadcast by the tag controller are different at different tag generation time points. 8、 根据权利要求 7所述的方法, 其特征在于, 所述方法还包括: 在所述接收子周期结束时, 或, 接收到所述标签控制器广播的针对结 束的接收子周期对应标签的标识停止消息时, 所述非标签控制器停止根据 所述结束的接收子周期对应的标签标识所述主机下发的写 I/O数据。 8. The method according to claim 7, characterized in that, the method further includes: at the end of the receiving sub-period, or, receiving the tag corresponding to the ended receiving sub-period broadcast by the tag controller. When identifying a stop message, the non-tag controller stops identifying the write I/O data issued by the host according to the tag corresponding to the completed receiving sub-period. 9、 根据权利要求 7或 8所述的方法, 其特征在于, 所述方法还包括: 在接收到所述标签启动消息时,如果没有所述主机下发的写 I/O数据, 所述非标签控制器丟弃所述标签启动消息中的标签。 9. The method according to claim 7 or 8, characterized in that, the method further includes: when receiving the tag start message, if there is no write I/O data issued by the host, the non- The tag controller discards the tag in the tag start message. 10、 一种存储控制器, 其特征在于, 包括: 10. A storage controller, characterized in that it includes: 判断模块, 用于接收主机下发的写 I/O数据时, 判断当前是否存在已 启动的接收子周期; The judgment module is used to judge whether there is currently a started receiving sub-cycle when receiving the write I/O data sent by the host; 标识模块, 用于若当前不存在已启动的接收子周期, 启动当前生成的 标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据; An identification module, configured to start the receiving sub-period corresponding to the currently generated tag if there is currently no activated receiving sub-period, and identify the write I/O data according to the tag corresponding to the receiving sub-period; 所述标识模块, 还用于若当前存在已启动的接收子周期, 根据所述接 收子周期对应的标签标识所述写 I/O数据; The identification module is also used to identify the write I/O data according to the tag corresponding to the reception sub-period if there is currently a started receiving sub-period; 复制模块, 用于在所述接收子周期结束时, 将所述接收子周期对应的 标签标识的所述写 I/O数据复制到目的端。 A copy module, configured to copy the write I/O data identified by the tag corresponding to the receive sub-cycle to the destination end at the end of the receive sub-cycle. 11、 根据权利要求 10所述的控制器, 其特征在于, 还包括: 标签控制模块, 用于在标签生成时间点到达时生成标签, 不同的标签 生成时间点生成的标签不相同。 11. The controller according to claim 10, further comprising: a label control module, configured to generate labels when the label generation time point arrives, and different labels are generated at different label generation time points. 12、 根据权利要求 11 所述的控制器, 其特征在于, 所述标签控制模 块, 还用于向集群存储系统中各非标签控制器广播包括所述标签的标签启 动消息。 12. The controller according to claim 11, wherein the tag control module is further configured to broadcast a tag startup message including the tag to each non-tag controller in the cluster storage system. 13、 根据权利要求 12所述的控制器, 其特征在于, 所述标签控制模 块, 还用于在所述接收子周期结束时, 向所述各非标签控制器广播针对结 束的接收子周期对应标签的标识停止消息, 所述标识停止消息, 用于通知 所述各非标签控制器停止根据所述结束的接收子周期对应的标签标识所 述主机下发的写 I/O数据。 13. The controller according to claim 12, wherein the tag control module is further configured to broadcast to each non-tag controller a response to the end of the receiving sub-period when the receiving sub-period ends. The identification stop message of the tag is used to notify each non-tag controller to stop writing I/O data issued by the host according to the tag identification corresponding to the completed receiving sub-period. 14、 根据权利要求 11、 12或 13所述的控制器, 其特征在于, 所述判 断模块, 还用于在生成标签时, 如果没有所述主机下发的写 I/O数据, 丟 弃所述生成的标签。 14. The controller according to claim 11, 12 or 13, wherein the judgment module is also configured to discard all write I/O data if there is no write I/O data issued by the host when generating a label. Describe the generated tags. 15、 一种存储控制器, 其特征在于, 包括: 15. A storage controller, characterized in that it includes: 判断模块, 用于接收主机下发的写 I/O数据时, 判断当前是否存在已 启动的接收子周期; The judgment module is used to judge whether there is currently a started receiving sub-cycle when receiving the write I/O data sent by the host; 标识模块, 用于若当前不存在已启动的接收子周期, 启动当前接收的 标签对应的接收子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据; An identification module, configured to start a receiving sub-period corresponding to the currently received tag if there is currently no activated receiving sub-period, and identify the write I/O data according to the tag corresponding to the receiving sub-period; 所述标识模块, 还用于若当前存在已启动的接收子周期, 根据所述接 收子周期对应的标签标识所述写 I/O数据; The identification module is also used to identify the write I/O data according to the tag corresponding to the reception sub-period if there is currently a started receiving sub-period; 复制模块, 用于在所述接收子周期结束时, 将所述接收子周期对应的 标签标识的所述写 I/O数据复制到目的端。 A copy module, configured to copy the write I/O data identified by the tag corresponding to the receive sub-cycle to the destination end at the end of the receive sub-cycle. 16、 根据权利要求 15所述的控制器, 其特征在于, 还包括: 接收模块, 用于接收集群存储系统中标签控制器广播的标签启动;肖 息, 所述标签启动消息包括所述标签, 并且不同的标签生成时间点所述标 签控制器广播的标签不相同。 16. The controller according to claim 15, further comprising: a receiving module, configured to receive the tag startup broadcast by the tag controller in the cluster storage system; the tag startup message includes the tag, And the tags broadcast by the tag controller are different at different tag generation time points. 17、 根据权利要求 16所述的控制器, 其特征在于, 所述标识模块, 还用于在所述接收子周期结束时, 或, 接收到所述标签控制器广播的针对 结束的接收子周期对应标签的标识停止消息时, 停止根据所述结束的接收 子周期对应的标签标识所述主机下发的写 I/O数据。 17. The controller according to claim 16, wherein the identification module is further configured to receive the end of the receiving sub-period broadcast by the tag controller when the receiving sub-period ends, or When the identification of the corresponding tag stops the message, the write I/O data issued by the host according to the identification of the tag corresponding to the completed receiving sub-period is stopped. 18、 根据权利要求 16或 17所述的控制器, 其特征在于, 所述判断模 块, 还用于在所述接收模块接收到所述标签启动消息时, 如果没有所述主 机下发的写 I/O数据, 丟弃所述标签启动消息中的标签。 18. The controller according to claim 16 or 17, characterized in that the judgment mode The block is also configured to discard the tag in the tag startup message if there is no write I/O data sent by the host when the receiving module receives the tag startup message. 19、 一种存储控制器, 其特征在于, 包括: 存储器、 处理器、 总线以 及通信接口; 其中所述处理器、 所述通信接口、 所述存储器通过所述总线 完成相互间的通信; 19. A storage controller, characterized in that it includes: a memory, a processor, a bus, and a communication interface; wherein the processor, the communication interface, and the memory complete communication with each other through the bus; 所述存储器, 用于存储程序; 所述处理器, 用于执行所述程序; 所述程序, 用于: The memory is used to store programs; the processor is used to execute the program; the program is used to: 接收主机下发的写 I/O数据时, 判断当前是否存在已启动的接收子周 期; When receiving the write I/O data sent by the host, determine whether there is currently a started receiving sub-cycle; 若当前不存在已启动的接收子周期, 启动当前生成的标签对应的接收 子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据 If there is currently no started receiving sub-cycle, start the receiving sub-cycle corresponding to the currently generated tag, and write I/O data according to the tag identification corresponding to the receiving sub-period. 若当前存在已启动的接收子周期, 根据所述接收子周期对应的标签标 识所述写 I/O数据; If there is currently a started receiving sub-cycle, identify the write I/O data according to the tag corresponding to the receiving sub-cycle; 在所述接收子周期结束时, 通过所述通信接口将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。 At the end of the receiving sub-period, the write I/O data identified by the tag corresponding to the receiving sub-period is copied to the destination end through the communication interface. 20、 根据权利要求 19所述的控制器, 其特征在于, 所述程序, 还用 于: 20. The controller according to claim 19, characterized in that the program is also used to: 在标签生成时间点到达时生成标签, 不同的标签生成时间点生成的标 签不相同。 The label is generated when the label generation time point arrives. The labels generated at different label generation time points are different. 21、 根据权利要求 20所述的控制器, 其特征在于, 所述程序, 还用 于: 通过所述通信接口向集群存储系统中各非标签控制器广播包括所述标 签的标签启动消息。 21. The controller according to claim 20, wherein the program is further configured to: broadcast a tag startup message including the tag to each non-tag controller in the cluster storage system through the communication interface. 22、 根据权利要求 21 所述的控制器, 其特征在于, 所述程序, 还用 于: 22. The controller according to claim 21, characterized in that the program is also used to: 在所述接收子周期结束时, 通过所述通信接口向所述各非标签控制器 广播针对结束的接收子周期对应标签的标识停止消息, 所述标识停止消 息, 用于通知所述各非标签控制器停止根据所述结束的接收子周期对应的 标签标识所述主机下发的写 I/O数据。 At the end of the receiving sub-period, broadcast an identification stop message for the tag corresponding to the ended receiving sub-period to each non-tag controller through the communication interface, and the identification stop message is used to notify each non-tag The controller stops identifying the write I/O data sent by the host according to the tag corresponding to the completed receiving sub-cycle. 23、 根据权利要求 20、 21或 22所述的控制器, 其特征在于, 所述程 序, 还用于: 在生成标签时, 如果没有所述主机下发的写 I/O数据, 丟弃 所述生成的标签。 23. The controller according to claim 20, 21 or 22, characterized in that the program is also used to: when generating a tag, if there is no write I/O data issued by the host, discard it The generated tags. 24、 一种存储控制器, 其特征在于, 包括: 存储器、 处理器、 总线以 及通信接口; 其中所述处理器、 所述通信接口、 所述存储器通过所述总线 完成相互间的通信; 24. A storage controller, characterized in that it includes: a memory, a processor, a bus and a communication interface; wherein the processor, the communication interface and the memory complete communication with each other through the bus; 所述存储器, 用于存储程序; 所述处理器, 用于执行所述程序; 所述程序, 用于: The memory is used to store programs; the processor is used to execute the program; the program is used to: 接收主机下发的写 I/O数据时, 判断当前是否存在已启动的接收子周 期; When receiving the write I/O data sent by the host, determine whether there is currently a started receiving sub-cycle; 若当前不存在已启动的接收子周期, 启动当前接收的标签对应的接收 子周期, 并根据所述接收子周期对应的标签标识所述写 I/O数据; If there is currently no activated receiving sub-period, start the receiving sub-period corresponding to the currently received tag, and write the I/O data according to the tag identification corresponding to the receiving sub-period; 若当前存在已启动的接收子周期, 根据所述接收子周期对应的标签标 识所述写 I/O数据; If there is currently a started receiving sub-cycle, identify the write I/O data according to the tag corresponding to the receiving sub-cycle; 在所述接收子周期结束时, 通过所述通信接口将所述接收子周期对应 的标签标识的所述写 I/O数据复制到目的端。 At the end of the receiving sub-period, the write I/O data identified by the tag corresponding to the receiving sub-period is copied to the destination end through the communication interface. 25、 根据权利要求 24所述的控制器, 其特征在于, 所述程序, 还用 于: 25. The controller according to claim 24, characterized in that the program is also used to: 通过所述通信接口接收集群存储系统中标签控制器广播的标签启动 消息, 所述标签启动消息包括所述标签, 并且不同的标签生成时间点所述 标签控制器广播的标签不相同。 A tag startup message broadcast by a tag controller in the cluster storage system is received through the communication interface. The tag startup message includes the tag, and the tags broadcast by the tag controller are different at different tag generation time points. 26、 根据权利要求 25 所述的控制器, 其特征在于, 所述程序, 还用 于: 26. The controller according to claim 25, characterized in that the program is also used to: 在所述接收子周期结束时, 或, 通过所述通信接口接收到所述标签控 制器广播的针对结束的接收子周期对应标签的标识停止消息时, 停止根据 所述结束的接收子周期对应的标签标识所述主机下发的写 I/O数据。 When the receiving sub-period ends, or when the identification stop message broadcast by the tag controller for the tag corresponding to the ending receiving sub-period is received through the communication interface, stop corresponding to the receiving sub-period according to the ending. The label identifies the write I/O data issued by the host. 27、 根据权利要求 25或 26所述的控制器, 其特征在于, 所述程序, 还用于: 27. The controller according to claim 25 or 26, characterized in that the program is also used for: 在通过所述通信接口接收到所述标签启动消息时, 如果没有所述主机 下发的写 I/O数据, 丟弃所述标签启动消息中的标签。 When the tag startup message is received through the communication interface, if there is no write I/O data sent by the host, the tag in the tag startup message is discarded. 28、 一种数据复制系统, 其特征在于, 包括: 如权利要求 10至 14任 一项所述的存储控制器和权利要求 15至 18任一项所述的存储控制器。 28. A data replication system, characterized by comprising: the storage controller according to any one of claims 10 to 14 and the storage controller according to any one of claims 15 to 18.
PCT/CN2012/084301 2012-11-08 2012-11-08 Data replication method, storage controller and system Ceased WO2014071588A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201280003049.1A CN104025062B (en) 2012-11-08 2012-11-08 Data copy method and storage control and system
PCT/CN2012/084301 WO2014071588A1 (en) 2012-11-08 2012-11-08 Data replication method, storage controller and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/084301 WO2014071588A1 (en) 2012-11-08 2012-11-08 Data replication method, storage controller and system

Publications (1)

Publication Number Publication Date
WO2014071588A1 true WO2014071588A1 (en) 2014-05-15

Family

ID=50683926

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/084301 Ceased WO2014071588A1 (en) 2012-11-08 2012-11-08 Data replication method, storage controller and system

Country Status (2)

Country Link
CN (1) CN104025062B (en)
WO (1) WO2014071588A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7013380B2 (en) * 2003-06-02 2006-03-14 Hitachi, Ltd. Storage system control method, storage system, and storage apparatus
CN101814042A (en) * 2010-03-05 2010-08-25 成都市华为赛门铁克科技有限公司 Data asynchronous replication method and device thereof
CN102306115A (en) * 2011-05-20 2012-01-04 成都市华为赛门铁克科技有限公司 Asynchronous remote copying method, system and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060047715A1 (en) * 2004-08-27 2006-03-02 Archer Analytics, Inc. System and method for managing and analyzing data from an operational database
CN101635638B (en) * 2008-07-25 2012-10-17 中兴通讯股份有限公司 Disaster tolerance system and disaster tolerance method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7013380B2 (en) * 2003-06-02 2006-03-14 Hitachi, Ltd. Storage system control method, storage system, and storage apparatus
CN101814042A (en) * 2010-03-05 2010-08-25 成都市华为赛门铁克科技有限公司 Data asynchronous replication method and device thereof
CN102306115A (en) * 2011-05-20 2012-01-04 成都市华为赛门铁克科技有限公司 Asynchronous remote copying method, system and equipment

Also Published As

Publication number Publication date
CN104025062A (en) 2014-09-03
CN104025062B (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN110297801B (en) System and method for just-in-one transaction semantics of transaction system based on fault-tolerant FPGA
CN107402722B (en) A data migration method and storage device
CN103297268B (en) Based on the distributed data consistency maintenance system and method for P2P technology
CN103180852B (en) Distributed data processing method and apparatus
JP6353086B2 (en) Multi-database log with multi-item transaction support
CN107251486B (en) Method, device and system for expanding linkage
CN107077492A (en) The expansible transaction management based on daily record
TW200931250A (en) Memory controller for performing memory block initialization and copy
CN103023805A (en) MapReduce system
CN111124993B (en) Method, apparatus and program product for reducing cache data mirror latency in I/O processing
CN103945456A (en) LTE (long term evolution) base station user plane efficient UDP (user datagram protocol) data transmission optimization method based on Linux system
CN110071873A (en) A kind of method, apparatus and relevant device sending data
WO2020025049A1 (en) Data synchronization method and apparatus, database host, and storage medium
US10740159B2 (en) Synchronization object prioritization systems and methods
WO2019109299A1 (en) Memory access technique and computer system
CN110740145A (en) Message consumption method, device, storage medium and electronic device
CN112261142B (en) A data retransmission method, device and FPGA of an RDMA network
CN108924008A (en) A kind of dual controller data communications method, device, equipment and readable storage medium storing program for executing
CN120614328B (en) Data transmission method, system and switch suitable for distributed training
CN104317716B (en) Data transmission method and distributed node equipment between distributed node
US20160057068A1 (en) System and method for transmitting data embedded into control information
CN113572582B (en) Data transmission and retransmission control method and system, storage medium and electronic device
US10318362B2 (en) Information processing apparatus, information processing method, and non-transitory computer-readable storage medium
WO2014071588A1 (en) Data replication method, storage controller and system
CN111258937A (en) A kind of transmission method and system of circular linked list DMA

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12888124

Country of ref document: EP

Kind code of ref document: A1