CN111176559A - Data writing method and device and double-active system - Google Patents
Data writing method and device and double-active system Download PDFInfo
- Publication number
- CN111176559A CN111176559A CN201911272697.7A CN201911272697A CN111176559A CN 111176559 A CN111176559 A CN 111176559A CN 201911272697 A CN201911272697 A CN 201911272697A CN 111176559 A CN111176559 A CN 111176559A
- Authority
- CN
- China
- Prior art keywords
- storage controller
- write operation
- operation command
- data
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0815—Cache consistency protocols
- G06F12/0837—Cache consistency protocols with software control, e.g. non-cacheable data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error 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
- G06F11/2017—Error 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 where memory access, memory control or I/O control functionality is redundant
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error 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
- G06F11/2053—Error 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 where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2089—Redundant storage control functionality
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a data writing method and device and a dual-active system, and belongs to the technical field of data storage. The method comprises the following steps: sending a first write operation command to a second storage controller; receiving a return message sent by the second storage controller; sending a forward write command to a second storage controller; receiving a forwarding write command sent by the second storage controller when the second storage controller determines to stop writing data to the second position according to the second write operation command and starts to write data to the second position according to the forwarding write command; and writing data to the first position according to the forwarding write command. The invention solves the problem of low data writing efficiency, improves the data writing efficiency, and is used for writing data.
Description
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a data writing method and apparatus, and a dual active system.
Background
A dual active system is a common data storage system, and includes a first storage controller and a second storage controller, each of which may be provided with a storage array, and each of which may include a plurality of storage locations. The host connected with the dual active system can send a write operation command containing a target storage position to the dual active system according to needs, so that the first storage controller and the second storage controller in the dual active system can write data to the target storage position on each storage controller according to the write operation command, and when the first storage controller fails, the host can acquire the data from the target storage position of the second storage controller.
For example, the target storage location on the first storage controller is a first location and the target storage location on the second storage controller is a second location. The host may send the write operation command to the first storage controller, and if the first storage controller is not writing data to the first location according to a certain write operation command at this time, the first storage controller may lock the first location and send the write operation command to the second storage controller, so that the first storage controller cannot write data to the first location according to other write operation commands at this time. In order to prevent the second memory controller from writing data to the second location according to other write operation commands when writing data to the second location according to the write operation command, after the second memory controller receives the write operation command, the second memory controller may trigger an action of locking the second location, so that the second memory controller cannot write data to the second location according to other write operation commands at this time. After the locking is completed, the second memory controller may send locking information indicating that the locking of the second location was successful to the first memory controller. Then, the first and second memory controllers may write data to the first and second locations, respectively, according to the write operation command. After the second storage controller finishes writing data to the second location, the second storage controller may send an end message to the first storage controller to indicate that the writing data is completely executed. After the first storage controller receives the end message and finishes writing data into the first position, the first storage controller can release the lock at the first position and send an unlocking command to the second storage controller, and the second storage controller can release the lock at the second position after receiving the unlocking command. Optionally, the Lock at the second location may be a Distributed Lock Management (DLM) Lock.
In the process of writing data in the dual active system, the first position and the second position need to be locked and unlocked, and in the process of locking and unlocking, the first storage controller and the second storage controller need to be communicated for many times, so that the time consumed by writing data in the dual active system is long, and the efficiency of writing data is low.
Disclosure of Invention
In order to solve the problem of low data writing efficiency, the invention provides a data writing method and device and a dual active system. The technical scheme is as follows:
in a first aspect, a data writing method is provided, which is used for a first storage controller in a dual active system, where the dual active system further includes a second storage controller, and the method includes:
sending a first write operation command to a second storage controller, wherein the first write operation command is sent to the first storage controller by a host, the first write operation command is used for indicating that data is written in a target storage position, the target storage position in the first storage controller is a first position, and the target storage position in the second storage controller is a second position;
receiving a return message sent by the second storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to a second write operation command when receiving the first write operation command, and the return message is generated and sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than the priority of the first storage controller;
sending a forwarding write command to the second storage controller, wherein the operation indicated by the first forwarding write command is the same as the operation indicated by the write operation command;
receiving the forwarding write command sent by the second storage controller when determining to stop writing data to the second location according to the second write operation command and start writing data to the second location according to the forwarding write command;
and writing data into the first position according to the forwarding write command.
After the first storage controller sends the first write operation command to the second storage controller, the first storage controller receives a return message sent by the second storage controller to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller writes data to the second position according to the second write operation command, and then the first storage controller sends a forwarding write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first position and the second position according to the forwarding write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
With reference to the first aspect, in a first implementable manner of the first aspect, before the sending of the first write operation command to the second storage controller, the method further includes:
receiving the first write operation command sent by a host;
judging whether the first storage controller writes data into the first position according to a third write operation command;
the sending the first write operation command to the second storage controller includes:
and if the first storage controller is not writing data to the first position according to a third write operation command, writing data to the first position according to the first write operation command, and sending the first write operation command to the second storage controller.
After the first storage controller receives a first write operation command sent by the host, if the first storage controller is writing data to the first location according to a third write operation command at this time, the first storage controller needs to wait for the first storage controller to write data to the first location according to the third write operation command, and then write data to the first location according to the first write operation command, so that the first storage controller sequentially processes the write operation commands received by the first storage controller according to a certain sequence.
With reference to the first implementable manner of the first aspect, in a second implementable manner of the first aspect, before the sending of the forward write command to the second storage controller, the method further includes:
and stopping writing data into the first position according to the first write operation command.
With reference to the first implementable manner or the second implementable manner of the first aspect, in a third implementable manner of the first aspect, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the determining whether the first storage controller is writing data to the first location according to a third write operation command, where a storage location where the write operation recording module is writing data is in a storage controller, includes:
judging whether the first position is recorded in a write operation recording module on the first storage controller;
if the first position is recorded in a write operation recording module on the first storage controller, determining that the first storage controller is writing data to the first position according to a third write operation command;
and if the first position is not recorded in the write operation recording module on the first storage controller, determining that the first storage controller is not writing data to the first position according to a third write operation command.
In a second aspect, a data writing method is provided for a second storage controller in a dual active system, the dual active system further including a first storage controller, the method including:
receiving a first write operation command sent by a first storage controller, wherein the first write operation command is sent by the first storage controller to a second storage controller after receiving the first write operation command sent by a host, the first write operation command is used for indicating that data is written in a target storage position, and the target storage position in the second storage controller is a second position;
when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than that of the first storage controller, sending a return message to the first storage controller, wherein the return message is used for indicating that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command;
receiving a forwarding write command sent by the first storage controller, wherein the operation indicated by the forwarding write command is the same as the operation indicated by the write operation command;
and when the second storage controller stops writing data into the second position according to the second write operation command, writing data into the second position according to the forwarding write command, and sending the forwarding write command to the first storage controller.
The second storage controller receives the first write operation command sent by the first storage controller, sends a return message to the first storage controller when the second storage controller is writing data to a second position according to the second write operation command and the priority of the second storage controller is higher than that of the first storage controller, then receives a forwarding write command sent by the first storage controller, writes data to the second position according to the forwarding write command when the second storage controller stops writing data to the second position according to the second write operation command, and sends the forwarding write command to the first storage controller. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
With reference to the second aspect, in a first implementable manner of the second aspect, the method further includes:
and when the second storage controller is writing data to the second position according to the second write operation command, the priority of the second storage controller is lower than that of the first storage controller, and the second storage controller stops writing data to the second position according to the second write operation command, writing data to the second position according to the first write operation command.
If the second storage controller writes data to the second location according to the second write operation command when receiving the first write operation sent by the first storage controller, and the second storage controller determines that the priority of the first storage controller is higher than that of the second storage controller, the second storage controller may write data to the second location according to the first write operation command after the writing of the data to the second location according to the second write operation command is completed, thereby ensuring that the second storage controller processes the write operation command received by the second storage controller in order.
With reference to the second aspect or the first implementable manner of the first aspect, in a second implementable manner of the second aspect, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the storage position where the data is being written in the storage controller where the write operation recording module is located,
when the second storage controller is writing data to the second location according to the second write operation command, the second location is recorded in a write operation recording module on the second storage controller;
when the second storage controller is not writing data to the second location according to the second write operation command, the second location is not recorded in the write operation recording module on the second storage controller.
In a third aspect, a data writing apparatus is provided, which is used for a first storage controller in a dual active system, the dual active system further includes a second storage controller, and the data writing apparatus includes:
a first sending module, configured to send a first write operation command to a second storage controller, where the first write operation command is sent to the first storage controller by a host, the first write operation command is used to indicate that data is written in a target storage location, the target storage location in the first storage controller is a first location, and the target storage location in the second storage controller is a second location;
a first receiving module, configured to receive a return message sent by the second storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to a second write operation command when receiving the first write operation command, and the return message is generated and sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than the priority of the first storage controller;
a second sending module, configured to send a forwarding write command to the second storage controller, where an operation indicated by the first forwarding write command is the same as an operation indicated by the write operation command;
a second receiving module, configured to receive the forwarding write command sent by the second storage controller when it is determined that the writing of data to the second location according to the second write operation command is stopped and the writing of data to the second location according to the forwarding write command is started;
and the writing module is used for writing data into the first position according to the forwarding writing command.
With reference to the third aspect, in a first implementable manner of the third aspect, the data writing apparatus further includes:
the fourth receiving module is used for receiving the first write operation command sent by the host;
the judging module is used for judging whether the first storage controller writes data into the first position according to a third write operation command;
the first sending module is further configured to:
when the first storage controller is not writing data to the first position according to a third write operation command, writing data to the first position according to the first write operation command, and sending the first write operation command to the second storage controller.
With reference to the first implementable manner of the third aspect, in a second implementable manner of the third aspect, the data writing apparatus further includes:
and the stopping module is used for stopping writing data into the first position according to the first write operation command.
With reference to the first implementable manner or the second implementable manner of the third aspect, in a third implementable manner of the third aspect, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the storage controller in which the write operation recording module is located is a storage location in which data is being written, and the determining module is further configured to:
judging whether the first position is recorded in a write operation recording module on the first storage controller;
when the first position is recorded in a write operation recording module on the first storage controller, determining that the first storage controller is writing data to the first position according to a third write operation command;
when the first position is not recorded in the write operation recording module on the first storage controller, determining that the first storage controller is not writing data to the first position according to a third write operation command.
In a fourth aspect, a data writing apparatus is provided for a second storage controller in a dual active system, the dual active system further including a first storage controller, the data writing apparatus including:
a first receiving module, configured to receive a first write operation command sent by a first storage controller, where the first write operation command is sent by the first storage controller to a second storage controller after receiving the first write operation command sent by a host, the first write operation command is used to instruct to write data in a target storage location, and the target storage location in the second storage controller is a second location;
a sending module, configured to send a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and a priority of the second storage controller is higher than a priority of the first storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command;
a second receiving module, configured to receive a forwarding write command sent by the first storage controller, where an operation indicated by the forwarding write command is the same as an operation indicated by the write operation command;
and the first writing module is used for writing data into the second position according to the forwarding writing command and sending the forwarding writing command to the first storage controller when the second storage controller stops writing data into the second position according to the second writing operation command.
With reference to the fourth aspect, in a first implementable manner of the fourth aspect, the data writing apparatus further includes:
and a second writing module, configured to write data to the second location according to the first write operation command when the second storage controller is writing data to the second location according to the second write operation command, where a priority of the second storage controller is lower than a priority of the first storage controller, and the second storage controller stops writing data to the second location according to the second write operation command.
With reference to the fourth aspect or the first implementable manner of the first aspect, in a second implementable manner of the fourth aspect, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the storage position where the data is being written in the storage controller where the write operation recording module is located,
when the second storage controller is writing data to the second location according to the second write operation command, the second location is recorded in a write operation recording module on the second storage controller;
when the second storage controller is not writing data to the second location according to the second write operation command, the second location is not recorded in the write operation recording module on the second storage controller.
In a fifth aspect, a dual active system is provided, the dual active system comprising a first storage controller and a second storage controller,
the first storage controller is the data writing device in any one of the third aspect and the third aspect;
the second storage controller is the data writing device according to the fourth aspect or any one of the realizable manners of the fourth aspect.
In a sixth aspect, there is provided a data writing apparatus comprising: at least one processor, at least one network interface, a memory, and at least one communication bus, the processor to execute a program stored in the memory, the program comprising:
sending a first write operation command to a second storage controller, wherein the first write operation command is sent to the first storage controller by a host, the first write operation command is used for indicating that data is written in a target storage position, the target storage position in the first storage controller is a first position, and the target storage position in the second storage controller is a second position;
receiving a return message sent by the second storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to a second write operation command when receiving the first write operation command, and the return message is generated and sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than the priority of the first storage controller;
sending a forwarding write command to the second storage controller, wherein the operation indicated by the first forwarding write command is the same as the operation indicated by the write operation command;
receiving the forwarding write command sent by the second storage controller when determining to stop writing data to the second location according to the second write operation command and start writing data to the second location according to the forwarding write command;
and writing data into the first position according to the forwarding write command.
With reference to the sixth aspect, in a first implementable manner of the sixth aspect, before the sending of the first write operation command to the second storage controller, the program further includes:
receiving the first write operation command sent by a host;
judging whether the first storage controller writes data into the first position according to a third write operation command;
the sending the first write operation command to the second storage controller includes:
and if the first storage controller is not writing data to the first position according to a third write operation command, writing data to the first position according to the first write operation command, and sending the first write operation command to the second storage controller.
With reference to the first implementable manner of the sixth aspect, in a second implementable manner of the sixth aspect, before the sending of the forward write command to the second storage controller, the program further includes:
and stopping writing data into the first position according to the first write operation command.
With reference to the first implementable manner or the second implementable manner of the sixth aspect, in a third implementable manner of the sixth aspect, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the determining whether the first storage controller is writing data to the first location according to a third write operation command, where a storage location where the write operation recording module is writing data is in a storage controller, includes:
judging whether the first position is recorded in a write operation recording module on the first storage controller;
if the first position is recorded in a write operation recording module on the first storage controller, determining that the first storage controller is writing data to the first position according to a third write operation command;
and if the first position is not recorded in the write operation recording module on the first storage controller, determining that the first storage controller is not writing data to the first position according to a third write operation command.
In a seventh aspect, there is provided a data writing apparatus, comprising: at least one processor, at least one network interface, a memory, and at least one communication bus, the processor to execute a program stored in the memory, the program comprising:
receiving a first write operation command sent by a first storage controller, wherein the first write operation command is sent by the first storage controller to a second storage controller after receiving the first write operation command sent by a host, the first write operation command is used for indicating that data is written in a target storage position, and the target storage position in the second storage controller is a second position;
when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than that of the first storage controller, sending a return message to the first storage controller, wherein the return message is used for indicating that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command;
receiving a forwarding write command sent by the first storage controller, wherein the operation indicated by the forwarding write command is the same as the operation indicated by the write operation command;
and when the second storage controller stops writing data into the second position according to the second write operation command, writing data into the second position according to the forwarding write command, and sending the forwarding write command to the first storage controller.
With reference to the seventh aspect, in a first implementable manner of the seventh aspect, the program further includes:
and when the second storage controller is writing data to the second position according to the second write operation command, the priority of the second storage controller is lower than that of the first storage controller, and the second storage controller stops writing data to the second position according to the second write operation command, writing data to the second position according to the first write operation command.
With reference to the seventh aspect or the first implementable manner of the first aspect, in a second implementable manner of the seventh aspect, each storage controller is provided with a write operation recording module, where the write operation recording module is configured to record: the storage position where the data is being written in the storage controller where the write operation recording module is located,
when the second storage controller is writing data to the second location according to the second write operation command, the second location is recorded in a write operation recording module on the second storage controller;
when the second storage controller is not writing data to the second location according to the second write operation command, the second location is not recorded in the write operation recording module on the second storage controller.
In an eighth aspect, a dual active system is provided, the dual active system comprising a first storage controller and a second storage controller,
the first storage controller is the data writing device in any one of the realizable manners of the sixth aspect or the sixth aspect;
the second storage controller is the data writing device in any one of the realizable manners of the seventh aspect or the seventh aspect.
The invention provides a data writing method and device and a double-active system.A first storage controller receives a return message sent to the first storage controller when a second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller after sending a first writing operation command to the second storage controller and the second storage controller writes data to a second position according to the second writing operation command, and then the first storage controller sends a forwarding writing command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first position and the second position according to the forwarding writing command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a data writing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for writing data according to an embodiment of the present invention;
FIG. 3 is a flowchart of another data writing method according to an embodiment of the present invention;
FIG. 4-1 is a flowchart of a method of writing data according to another embodiment of the present invention;
FIG. 4-2 is a flowchart of a method for writing data according to an embodiment of the present invention;
4-3 are flow charts of another method for writing data according to embodiments of the present invention;
FIG. 5-1 is a schematic structural diagram of a data writing apparatus according to an embodiment of the present invention;
FIG. 5-2 is a schematic structural diagram of another data writing apparatus according to an embodiment of the present invention;
FIG. 5-3 is a schematic structural diagram of another data writing apparatus according to an embodiment of the present invention;
FIG. 6-1 is a schematic structural diagram of another data writing apparatus according to an embodiment of the present invention;
FIG. 6-2 is a schematic structural diagram of a data writing apparatus according to another embodiment of the present invention;
FIG. 7 is a schematic structural diagram of another data writing apparatus according to another embodiment of the present invention;
FIG. 8 is a schematic structural diagram of another data writing apparatus according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a dual-active system according to an embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a schematic view of an application scenario of a data writing method according to an embodiment of the present invention, for example, the application scenario may include a dual active system 0 and a host 1, where the dual active system 0 includes a first storage controller 01 and a second storage controller 02, each storage controller may be provided with a plurality of storage locations, and optionally, each storage controller may be provided with a storage array, and the storage array may include a plurality of storage blocks arranged in an array, where the plurality of storage locations are storage addresses of the plurality of storage blocks.
The host 1 may establish a connection with the first storage controller 01 and the second storage controller 02 in the dual active system 0, and the host 1 may send a write operation command including a target storage location to the first storage controller 01 in the dual active system 0 as needed, so that the first storage controller 01 and the second storage controller 02 in the dual active system 0 write data to the target storage location on each storage controller according to the write operation command, and when the first storage controller 01 fails, the host 1 may obtain data from the target storage location of the second storage controller 02.
Illustratively, the target storage location on the first storage controller 01 is a first location and the target storage location on the second storage controller 02 is a second location. The host 1 may send the write operation command to the first storage controller 01, and if the first storage controller 01 is not writing data to the first location according to a certain write operation command at this time, the first storage controller 01 may lock the first location and send the write operation command to the second storage controller 02, so that the first storage controller cannot write data to the first location according to other write operation commands at this time. In order to prevent the second memory controller 02 from writing data to the second location according to another write operation command when writing data to the second location according to the write operation command, after the second memory controller 02 receives the write operation command, the second memory controller 02 may trigger an operation of locking the second location, so that the second memory controller 02 cannot write data to the second location according to another write operation command at this time. After the completion of writing data to the second location, the second storage controller 02 may send an end message indicating that the writing of data is completed to the first storage controller 01. After the first memory controller 01 receives the end message and finishes writing data into the first location, the lock at the first location may be released, and an unlock command may be sent to the second memory controller 02, and after receiving the unlock command, the second memory controller 02 may release the lock at the second location. Alternatively, the locks in the first and second positions may be DLM locks.
In the process of writing data in the dual active system 0, locking and unlocking are required to be performed on the first position and the second position, and in the process of locking and unlocking, the first storage controller 01 and the second storage controller 02 need to be communicated for many times, so that the time consumed by writing data in the dual active system 0 is long, and the efficiency of writing data is low.
As shown in fig. 2, an embodiment of the present invention provides a data writing method, where the data writing method may be used for a first storage controller 01 in a dual active system 0 shown in fig. 1, where the dual active system 0 may further include a second storage controller 02, and the data writing method may include:
And step 204, receiving a forwarding write command sent by the second storage controller when determining to stop writing data to the second location according to the second write operation command and start writing data to the second location according to the forwarding write command.
And step 205, writing data to the first position according to the forwarding write command.
In summary, in the data writing method provided in the embodiment of the present invention, after the first storage controller sends the first write operation command to the second storage controller, the first storage controller receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the first storage controller sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
Optionally, before step 201, the data writing method may further include:
receiving a first write operation command sent by a host;
judging whether the first storage controller writes data into the first position according to the third write operation command;
sending a first write operation command to a second storage controller, comprising:
and if the first storage controller is not writing data to the first position according to the third write operation command, writing the data to the first position according to the first write operation command, and sending the first write operation command to the second storage controller.
Optionally, before step 203, the data writing method may further include:
and stopping writing the data to the first position according to the first write operation command.
Optionally, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the determining whether the first storage controller is writing data to the first location according to the third write operation command at the storage location where the write operation recording module is located, may include:
judging whether a first position is recorded in a write operation recording module on a first storage controller;
if the first position is recorded in the write operation recording module on the first storage controller, determining that the first storage controller is writing data to the first position according to a third write operation command;
and if the first position is not recorded in the write operation recording module on the first storage controller, determining that the first storage controller is not writing data to the first position according to the third write operation command.
In summary, in the data writing method provided in the embodiment of the present invention, after the first storage controller sends the first write operation command to the second storage controller, the first storage controller receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the first storage controller sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
As shown in fig. 3, another data writing method provided in an embodiment of the present invention may be used for the second storage controller 02 in the dual active system 0 shown in fig. 1, where the dual active system 0 may further include a first storage controller 01, and the data writing method may include:
And 304, when the second storage controller stops writing data to the second position according to the second write operation command, writing data to the second position according to the forwarding write command, and sending the forwarding write command to the first storage controller.
In summary, in the data writing method provided in the embodiment of the present invention, the second storage controller receives the first write operation command sent by the first storage controller, sends a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, then receives the forward write command sent by the first storage controller, and writes data to the second location according to the forward write command and sends the forward write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
Optionally, the data writing method may further include:
and when the second storage controller is writing data to the second position according to the second write operation command, the priority of the second storage controller is lower than that of the first storage controller, and the second storage controller stops writing data to the second position according to the second write operation command, writing data to the second position according to the first write operation command.
Optionally, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the storage location where the data is being written in the storage controller where the write operation recording module is located,
when the second storage controller is writing data to the second location according to the second write operation command, the second location is recorded in a write operation recording module on the second storage controller;
when the second storage controller is not writing data to the second location according to the second write operation command, the second location is not recorded in the write operation recording module on the second storage controller.
In summary, in the data writing method provided in the embodiment of the present invention, the second storage controller receives the first write operation command sent by the first storage controller, sends a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, then receives the forward write command sent by the first storage controller, and writes data to the second location according to the forward write command and sends the forward write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
If the second storage controller writes data to the second location according to the second write operation command when receiving the first write operation sent by the first storage controller, and the second storage controller determines that the priority of the first storage controller is higher than that of the second storage controller, the second storage controller may write data to the second location according to the first write operation command after the writing of the data to the second location according to the second write operation command is completed, thereby ensuring that the second storage controller processes the write operation command received by the second storage controller in order.
As shown in fig. 4-1, an embodiment of the present invention provides yet another data writing method, which may be used in a dual active system 0 as shown in fig. 1, where the dual active system 0 may include a first storage controller 01 and a second storage controller 02, and the data writing method may include:
in step 401, the first storage controller receives a first write operation command sent by a host. Step 402 is performed.
By way of example, the host may be host 1 in fig. 1, and when the host needs to write data into the dual active system, the host may generate a first write operation command containing a target storage location, that is, the first write operation command is used to instruct to write data in the target storage location. Specifically, the target storage location may store data, and the first write operation command generated by the host may be to modify the data in the target storage location; the target storage location may not store data, and the first write operation command generated by the host may be to store data in the target storage location. After the host generates the first write operation command, the host may send the first write operation command to the dual active system.
For example, a plurality of storage locations may be disposed on each of the first storage controller and the second storage controller, the target storage location in the first storage controller being a first location, and the target storage location in the second storage controller being a second location. Optionally, the first memory controller and the second memory controller may be respectively provided with a memory array, each memory array may include a plurality of memory blocks arranged in an array, each memory block corresponds to a memory address, and one memory address is a memory location.
In step 402, the first memory controller determines whether the first memory controller is writing data to the first location according to the third write operation command. If the first memory controller is writing data to the first location according to the third write operation command, go to step 403; if the first memory controller is not writing data to the first location according to the third write operation command, step 404 is performed.
Optionally, each storage controller may be provided with a write operation recording module, and the write operation recording module may be configured to record: and writing the storage position of the data in the storage controller in which the writing operation recording module is positioned. Further, the write operation recording module may further record a write operation command corresponding to the storage location where the data is being written, for example, the write operation recording module may include an input or output (In/Out; abbreviated as I/O) pool, and the I/O pool may be used to record the write operation command corresponding to the storage location where the data is being written. When the first storage controller determines whether the first storage controller is writing data to the first location according to the third write operation command, the first storage controller may query a location recorded in a write operation recording module on the first storage controller, and determine whether the first location is recorded in the write operation recording module on the first storage controller. And if the first position is not recorded in the write operation recording module on the first storage controller, determining that the first storage controller is not writing data to the first position according to the third write operation command.
It should be noted that, if the first memory controller is writing data to the first location according to the third write operation command, the first memory controller may determine that the time when the first memory controller receives the third write operation command is earlier than the time when the first write operation command is received. The operation indicated by the third write operation command may be the same as the operation indicated by the first write operation command, and the operation indicated by the third write operation command may also be different from the operation indicated by the first write operation command.
In step 403, the first storage controller determines whether the first storage controller stops writing data to the first location according to the third write operation command. If the first memory controller stops writing data to the first location according to the third write operation command, go to step 404; if the first memory controller does not stop writing data to the first location according to the third write operation command, step 403 is performed.
Specifically, the first storage controller may determine whether to stop writing data to the first location according to the third write operation command by querying whether the first location is recorded in the write operation recording module on the first storage controller in real time. If the first memory controller does not stop writing data to the first location according to the third write operation command, step 403 is repeatedly executed until it is detected that the first memory controller stops writing data to the first location according to the third write operation command.
It should be noted that, after the data is completely written to the first location according to the third write operation command, the first memory controller may stop writing the data to the first location according to the third write operation command. The first storage controller may also stop writing data to the first location according to the third write operation command after receiving the return message sent by the second storage controller.
In step 404, the first memory controller writes data to the first location according to the first write operation command. Step 405 is performed.
If the first memory controller is not writing data to the first location according to the third write operation command, or the first memory controller stops writing data to the first location according to the third write operation command, the first memory controller may write data to the first location according to the first write operation command at this time. When the first storage controller writes data to the first location according to the first write operation command, the write operation recording module on the first storage controller may record the first location and the first write operation command corresponding to the first location.
After the first storage controller receives a first write operation command sent by the host, if the first storage controller is writing data to the first location according to a third write operation command at this time, the first storage controller needs to wait for the first storage controller to write data to the first location according to the third write operation command, and then write data to the first location according to the first write operation command, so that the first storage controller sequentially processes the write operation commands received by the first storage controller according to a certain sequence.
In step 405, the first memory controller sends a first write command to the second memory controller. Step 406 is performed.
The first memory controller may send the first write operation command to the second memory controller while the first memory controller writes data to the first location according to the first write operation command.
In step 406, the second storage controller determines whether the second storage controller is writing data to the second location according to the second write operation command. If the second storage controller is writing data to the second location according to the second write operation command, go to step 407; if the second storage controller is not writing data to the second location according to the second write operation command, step 408 is performed.
After receiving the first write operation command sent by the first storage controller, the second storage controller may determine whether the second storage controller is writing data to the second location according to the second write operation command.
When the second storage controller determines whether the second storage controller is writing data to the second location according to the second write operation command, the second storage controller may query a location recorded in a write operation recording module on the second storage controller, and determine whether the second location is recorded in the write operation recording module on the second storage controller, and if the second location is recorded in the write operation recording module on the second storage controller, the second storage controller may determine that the second storage controller is writing data to the second location according to the second write operation command. And if the second position is not recorded in the write operation recording module on the second storage controller, determining that the second storage controller is not writing data to the second position according to the second write operation command.
It should be noted that, if the second memory controller is writing data to the first location according to the second write operation command, the first memory controller may determine that the second memory controller receives the second write operation command earlier than the first write operation command. The operation indicated by the second write operation command may be the same as the operation indicated by the first write operation command, and the operation indicated by the second write operation command may also be different from the operation indicated by the first write operation command.
And step 407, the second storage controller controls the first storage controller and the second storage controller according to the priorities of the first storage controller and the second storage controller, and writes data to the first location and the second location respectively according to the first write operation command.
Optionally, the priorities of the first storage controller and the second storage controller may be preset, and a priority list may be stored in both the first storage controller and the second storage controller, where the priority list is used to record the priorities of the first storage controller and the second storage controller. If the priority list is shown in table 1, the first memory controller has a higher priority than the second memory controller, and if the priority list is shown in table 2, the second memory controller has a higher priority than the first memory controller. The second storage controller may query the priority list to determine a priority order of the first storage controller and the second storage controller.
TABLE 1
Storage controller | Priority level |
First memory controller | Height of |
Second storage controller | Is low in |
TABLE 2
Storage controller | Priority level |
First memory controller | Is low in |
Second storage controller | Height of |
In one aspect, after querying the priority list, if the second storage controller has a higher priority than the first storage controller, as shown in fig. 4-2, step 407 may include:
When the second storage controller receives the first write operation command sent by the first storage controller and determines that the second storage controller is writing data to the second location according to the second write operation, the second storage controller may generate a return message for instructing the second storage controller to write data to the second location according to the second write operation command when receiving the first write operation command sent by the first storage controller and send the generated return message to the first storage controller.
The first storage controller may stop writing data to the first location according to the first write operation command after receiving a return message sent by the second storage controller to indicate that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command. When the first storage controller stops writing data to the first location according to the first write operation command, the write operation recording module on the first storage controller may delete the first location recorded in the write operation recording module and the first write operation command corresponding to the first location.
The first storage controller may generate a forwarding write command according to the first write operation command, and send the forwarding write command to the second storage controller, where an operation indicated by the forwarding write command is the same as an operation indicated by the first write operation command, and specifically, when the forwarding write command is generated according to the first write operation command, only a format of the first write operation command may be modified, and content of the first write operation command is not modified.
Optionally, after the first storage controller generates a forwarding write command according to the first write operation command, the first write operation command may also be deleted. Specifically, the first storage controller may generate deletion information for instructing to delete the first write operation command, delete the first write operation command in the first storage controller according to the deletion information, and send the instruction information to the second storage controller, so that the second storage controller deletes the first write operation command on the second storage controller. Optionally, the first storage controller may delete the first location recorded in the I/O pool on the first storage controller and the first write operation command corresponding to the first location, and the second storage controller may delete the second location recorded in the I/O pool on the second storage controller and the first write operation command corresponding to the second location.
Specifically, the second storage controller may determine whether the second storage controller stops writing data to the second location according to the second write operation command by querying whether the second location is recorded in the write operation recording module on the second storage controller in real time. If the second position is recorded in the write operation recording module on the second storage controller, determining that the second storage controller is writing data to the second position according to a third write operation command; and if the second position is not recorded in the write operation recording module on the second storage controller, determining that the second storage controller is not writing data to the second position according to the third write operation command.
If the second storage controller does not stop writing data to the second location according to the second write operation command, step 4074a is repeatedly executed until it is detected that the second storage controller stops writing data to the second location according to the second write operation command. It should be noted that, after the data writing to the second location according to the second write operation command is completed, the second memory controller may stop writing the data to the second location according to the second write operation command. When the second storage controller stops writing data to the second location according to the second write operation command, the write operation recording module on the second storage controller may delete the second location recorded in the write operation recording module and the second write operation command corresponding to the second location.
If the second storage controller is not writing data to the second location according to the second write operation command, the second storage controller may write data to the second location according to the forward write command.
Step 4076a, the second storage controller sends a forward write command to the first storage controller. Step 4077a is performed.
The second storage controller may send the forward write command to the first storage controller while the second storage controller may write data to the second location according to the forward write command.
Step 4077a, the first storage controller writes data to the first location according to the forward write command.
Since, in step 404, the first memory controller has written data to the first location in accordance with the first write operation command, and stops writing data to the first location in accordance with the first write operation command in step 4072a, so, in step 4077a, if the forward write command is used to indicate that data is to be stored to the target storage location, the first memory controller, upon receiving the forwarded write command, may detect whether data is stored at a first location on the first memory controller, and determines whether the data stored in the first location is the same as the data to be stored indicated by the forwarded write command, if the data stored in the first location is the same as the data that needs to be stored as indicated by the forwarded write command, determining that the first storage controller finishes writing the data to the first position according to the forwarding write command, and stopping writing the data to the first position according to the forwarding write command. If the data stored in the first position is the same as a part of the data needing to be stored and indicated by the forwarding write command, the data can be continuously written into the first position according to the forwarding write command until the data stored in the first position is completely the same as the data needing to be stored and indicated by the forwarding write command, and then the writing of the data into the first position according to the forwarding write command is stopped.
Since, in step 404, the first memory controller has written data to the first location in accordance with the first write operation command, and stops writing data to the first location in accordance with the first write operation command in step 4072a, so, in step 4077a, if the forward write command is used to indicate a modification to data on the target storage location, the first storage controller, after receiving the forwarding write command, may determine whether the data stored at the first location is the same as the data obtained by modifying the data at the first location according to the forwarding write command, if the data stored at the first location is the same as the data modified from the data at the first location in accordance with the forward write command, determining that the first storage controller finishes writing the data to the first position according to the forwarding write command, and stopping writing the data to the first position according to the forwarding write command. If the data stored in the first location is the same as a part of the data obtained by modifying the data in the first location according to the forwarding write command, the data can be continuously written into the first location according to the forwarding write command until the data stored in the first location is completely the same as the data obtained by modifying the data in the first location according to the forwarding write command, and then the writing of the data into the first location according to the forwarding write command is stopped.
Optionally, after receiving the forwarding write command, the first storage controller may also directly write data to the first location according to the forwarding write command, and it is not necessary to detect whether the data stored in the first location is the same as the data that needs to be stored and indicated by the forwarding write command (or the data obtained by modifying the data in the first location according to the forwarding write command). When writing data to the first location according to the forwarding write command, if the data W indicated by the forwarding write command has already been written to the first location, in step 4077a, when writing the data W indicated by the forwarding write command, the data W indicated by the forwarding write command written in step 4077a may be overwritten on the data W already written to the first location.
It should be noted that, in step 4075a, after the second storage controller finishes writing data to the second location according to the forwarding write command, the write operation recording module on the second storage controller may delete the second location recorded in the write operation recording module and the forwarding write command corresponding to the second location, generate a finish message for instructing the second storage controller to finish writing data to the second location according to the forwarding write command, and send the finish message to the first storage controller. After receiving the completion message sent by the second storage controller, the first storage controller may determine whether the first storage controller completes writing data to the first location according to the forwarding write command, and after determining whether the first storage controller completes writing data to the first location according to the forwarding write command, the write operation recording module on the first storage controller may delete the first location recorded in the write operation recording module and the forwarding write command corresponding to the first location, generate a notification message for instructing the dual active system to complete writing data to the target storage location according to the first write operation command, and then send the notification message to the host.
On the other hand, if the second storage controller has a lower priority than the first storage controller, as shown in fig. 4-3, step 407 may include:
Specifically, the second storage controller may determine whether the second storage controller stops writing data to the second location according to the second write operation command by querying whether the second location is recorded in the write operation recording module on the second storage controller in real time. If the second position is recorded in the write operation recording module on the second storage controller, determining that the second storage controller is writing data to the second position according to a third write operation command; and if the second position is not recorded in the write operation recording module on the second storage controller, determining that the second storage controller is not writing data to the second position according to the third write operation command.
If the second storage controller does not stop writing data to the second location according to the second write operation command, step 4074a is repeatedly executed until it is detected that the second storage controller stops writing data to the second location according to the second write operation command. It should be noted that, after the writing of the data to the second location according to the second write operation command is completed, the second storage controller may stop writing the data to the second location according to the second write operation command, and the write operation recording module on the second storage controller may delete the second location recorded in the write operation recording module and the second write operation command corresponding to the second location.
If the second storage controller is not writing data to the second location according to the second write operation command, the second storage controller may write data to the second location according to the forward write command and send the forward write command to the first storage controller. If the second storage controller writes data to the second location according to the second write operation command when receiving the first write operation sent by the first storage controller, and the second storage controller determines that the priority of the first storage controller is higher than that of the second storage controller, the second storage controller may write data to the second location according to the first write operation command after the writing of the data to the second location according to the second write operation command is completed, thereby ensuring that the second storage controller processes the write operation command received by the second storage controller in order.
It should be noted that, after the second storage controller finishes writing data to the second location according to the first write operation command, the write operation recording module on the second storage controller may delete the second location recorded in the write operation recording module and the first write operation command corresponding to the second location, generate a finish message for instructing the second storage controller to finish writing data to the second location according to the first write operation command, and send the finish message to the first storage controller. After receiving the completion message sent by the second storage controller, the first storage controller may determine whether the first storage controller completes writing data to the first location according to the first write operation command, and after determining whether the first storage controller completes writing data to the first location according to the first write operation command, the write operation recording module on the first storage controller may delete the first location recorded in the write operation recording module and the first write operation command corresponding to the first location, generate a notification message for instructing the dual active system to complete writing data to the target storage location according to the first write operation command, and then send the notification message to the host.
In step 408, the second memory controller writes data to the second location according to the first write operation command.
If the second storage controller is not writing data to the second location according to the second write operation command, the second storage controller may write data to the second location according to the forward write command and send the forward write command to the first storage controller.
It should be noted that, after the second storage controller finishes writing data to the second location according to the first write operation command, the write operation recording module on the second storage controller may delete the second location recorded in the write operation recording module and the first write operation command corresponding to the second location, generate a finish message for instructing the second storage controller to finish writing data to the second location according to the first write operation command, and send the finish message to the first storage controller. After receiving the completion message sent by the second storage controller, the first storage controller may determine whether the first storage controller completes writing data to the first location according to the first write operation command, and after determining whether the first storage controller completes writing data to the first location according to the first write operation command, the write operation recording module on the first storage controller may delete the first location recorded in the write operation recording module and the first write operation command corresponding to the first location, generate a notification message for instructing the dual active system to complete writing data to the target storage location according to the first write operation command, and then send the notification message to the host.
Optionally, the write operation recording module in the embodiment of the present invention may further include a copy PAIR (PAIR in english) and an I/O pool, where the I/O pool may be configured to record a write operation command corresponding to a storage location where data is being written, the copy PAIR may query contents recorded in the I/O pool, and the copy PAIR may further manage the contents recorded in the I/O pool, that is, delete a certain storage location recorded in the I/O pool and the write operation command corresponding to the storage location, or control the I/O record a certain storage location and the write operation command corresponding to the storage location. In the embodiment of the present invention, the storage address of each storage block in the storage array set on each storage controller may be a Logical Unit Number (LUN), and the storage location recorded in the I/O pool may also be a LUN of a certain storage block.
For example, the priority of the first storage controller and the priority of the second storage controller in the embodiment of the present invention may be characterized in the following two ways, such as: the priority of the first storage controller and the priority of the second storage controller, or the priority of the storage location on the first storage controller and the priority of the storage location on the second storage controller, where the storage location on the storage controller may be a location corresponding to a Logical Unit Number (LUN) in the storage array. It should be noted that the priority of the first storage controller and the priority of the second storage controller may also be characterized in other ways, which is not limited in this embodiment of the present invention.
In summary, in the data writing method provided in the embodiment of the present invention, after the first storage controller sends the first write operation command to the second storage controller, the first storage controller receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the first storage controller sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
If the second storage controller writes data to the second location according to the second write operation command when receiving the first write operation sent by the first storage controller, and the second storage controller determines that the priority of the first storage controller is higher than that of the second storage controller, the second storage controller may write data to the second location according to the first write operation command after the writing of the data to the second location according to the second write operation command is completed, thereby ensuring that the second storage controller processes the write operation command received by the second storage controller in order.
As shown in fig. 5-1, an embodiment of the present invention provides a data writing apparatus 50, where the data writing apparatus 50 may be used for a first storage controller 01 in a dual active system 0 shown in fig. 1, the dual active system 0 may further include a second storage controller 02, and the data writing apparatus 50 may include:
the first sending module 501 is configured to send a first write operation command to the second storage controller, where the first write operation command is sent to the first storage controller by the host, the first write operation command is used to instruct to write data in a target storage location, the target storage location in the first storage controller is a first location, and the target storage location in the second storage controller is a second location.
The first receiving module 502 is configured to receive a return message sent by the second storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command, and the return message is generated and sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than the priority of the first storage controller.
A second sending module 503, configured to send a forwarding write command to the second storage controller, where an operation indicated by the first forwarding write command is the same as an operation indicated by the write operation command.
A second receiving module 504, configured to receive a forwarding write command sent by the second storage controller when it is determined to stop writing data to the second location according to the second write operation command and start writing data to the second location according to the forwarding write command.
And a writing module 505, configured to write data to the first location according to the forward write command.
In summary, in the data writing device provided in the embodiment of the present invention, after the first sending module sends the first write operation command to the second storage controller, the first receiving module receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the second sending module sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
As shown in fig. 5-2, another data writing apparatus 50 is provided in an embodiment of the present invention, where the data writing apparatus 50 may be used for a first storage controller 01 in a dual active system 0 shown in fig. 1, the dual active system 0 may further include a second storage controller 02, and the data writing apparatus 50 may include:
the first sending module 501 is configured to send a first write operation command to the second storage controller, where the first write operation command is sent to the first storage controller by the host, the first write operation command is used to instruct to write data in a target storage location, the target storage location in the first storage controller is a first location, and the target storage location in the second storage controller is a second location.
The first receiving module 502 is configured to receive a return message sent by the second storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command, and the return message is generated and sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than the priority of the first storage controller.
A second sending module 503, configured to send a forwarding write command to the second storage controller, where an operation indicated by the first forwarding write command is the same as an operation indicated by the write operation command.
A second receiving module 504, configured to receive a forwarding write command sent by the second storage controller when it is determined to stop writing data to the second location according to the second write operation command and start writing data to the second location according to the forwarding write command.
And a writing module 505, configured to write data to the first location according to the forward write command.
A fourth receiving module 506, configured to receive the first write operation command sent by the host.
The determining module 507 is configured to determine whether the first memory controller is writing data to the first location according to the third write operation command.
In summary, in the data writing device provided in the embodiment of the present invention, after the first sending module sends the first write operation command to the second storage controller, the first receiving module receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the second sending module sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
The first sending module 501 may also be configured to:
and when the first storage controller is not writing data to the first position according to the third write operation command, writing the data to the first position according to the first write operation command, and sending the first write operation command to the second storage controller.
As shown in fig. 5 to 3, an embodiment of the present invention provides another data writing apparatus 50, where the data writing apparatus 50 may be used for a first storage controller 01 in a dual active system 0 shown in fig. 1, the dual active system 0 may further include a second storage controller 02, and the data writing apparatus 50 may include:
the first sending module 501 is configured to send a first write operation command to the second storage controller, where the first write operation command is sent to the first storage controller by the host, the first write operation command is used to instruct to write data in a target storage location, the target storage location in the first storage controller is a first location, and the target storage location in the second storage controller is a second location.
The first receiving module 502 is configured to receive a return message sent by the second storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command, and the return message is generated and sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than the priority of the first storage controller.
A second sending module 503, configured to send a forwarding write command to the second storage controller, where an operation indicated by the first forwarding write command is the same as an operation indicated by the write operation command.
A second receiving module 504, configured to receive a forwarding write command sent by the second storage controller when it is determined to stop writing data to the second location according to the second write operation command and start writing data to the second location according to the forwarding write command.
And a writing module 505, configured to write data to the first location according to the forward write command.
A fourth receiving module 506, configured to receive the first write operation command sent by the host.
The determining module 507 is configured to determine whether the first memory controller is writing data to the first location according to the third write operation command.
A stopping module 508 for stopping writing data to the first location according to the first write operation command.
In summary, in the data writing device provided in the embodiment of the present invention, after the first sending module sends the first write operation command to the second storage controller, the first receiving module receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the second sending module sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
Optionally, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the determining module 507 may further be configured to:
judging whether a first position is recorded in a write operation recording module on a first storage controller;
when a first position is recorded in a write operation recording module on the first storage controller, determining that the first storage controller is writing data to the first position according to a third write operation command;
and when the first position is not recorded in the writing operation recording module on the first storage controller, determining that the first storage controller is not writing data to the first position according to the third writing operation command.
As shown in fig. 6-1, another data writing apparatus 60 according to an embodiment of the present invention is provided, where the data writing apparatus 60 may be used in a second storage controller 02 in a dual active system 0 as shown in fig. 1, the dual active system 0 may further include a first storage controller 01, and the data writing apparatus 60 may include:
the first receiving module 601 is configured to receive a first write operation command sent by a first storage controller, where the first write operation command is sent by the first storage controller to a second storage controller after receiving the first write operation command sent by a host, the first write operation command is used to instruct to write data in a target storage location, and the target storage location in the second storage controller is a second location.
A sending module 602, configured to send a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command.
The second receiving module 603 is configured to receive a forwarding write command sent by the first memory controller, where an operation indicated by the forwarding write command is the same as an operation indicated by the write operation command.
The first write module 604 is configured to write data to the second location according to the forwarding write command and send the forwarding write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command.
In summary, in the data writing device according to the embodiment of the present invention, the first receiving module receives the first write operation command sent by the first storage controller, the sending module sends a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, then the second receiving module receives the forward write command sent by the first storage controller, and the first writing module writes data to the second location according to the forward write command and sends the forward write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
As shown in fig. 6-2, another embodiment of the present invention provides a data writing apparatus 60, where the data writing apparatus 60 may be used for the second storage controller 02 in the dual active system 0 shown in fig. 1, the dual active system 0 may further include a first storage controller 01, and the data writing apparatus 60 may include:
the first receiving module 601 is configured to receive a first write operation command sent by a first storage controller, where the first write operation command is sent by the first storage controller to a second storage controller after receiving the first write operation command sent by a host, the first write operation command is used to instruct to write data in a target storage location, and the target storage location in the second storage controller is a second location.
A sending module 602, configured to send a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command.
The second receiving module 603 is configured to receive a forwarding write command sent by the first memory controller, where an operation indicated by the forwarding write command is the same as an operation indicated by the write operation command.
The first write module 604 is configured to write data to the second location according to the forwarding write command and send the forwarding write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command.
A second write module 605, configured to write data to the second location according to the first write operation command when the second storage controller is writing data to the second location according to the second write operation command, the priority of the second storage controller is lower than the priority of the first storage controller, and the second storage controller stops writing data to the second location according to the second write operation command.
In summary, in the data writing device according to the embodiment of the present invention, the first receiving module receives the first write operation command sent by the first storage controller, the sending module sends a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, then the second receiving module receives the forward write command sent by the first storage controller, and the first writing module writes data to the second location according to the forward write command and sends the forward write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
If the second storage controller receives a first write operation sent by the first storage controller, the second storage controller writes data to the second location according to a second write operation command, and the priority of the first storage controller is higher than that of the second storage controller, the second write module may write data to the second location according to the first write operation command after the data is written to the second location according to the second write operation command, so as to ensure that the second storage controller processes the write operation command received by the second storage controller in order.
Optionally, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the storage location where the data is being written in the storage controller where the write operation recording module is located,
when the second storage controller writes data to the second position according to the second write operation command, the second position is recorded in a write operation recording module on the second storage controller;
when the second storage controller is not writing data to the second position according to the second write operation command, the second position is not recorded in the write operation recording module on the second storage controller.
In summary, in the data writing device according to the embodiment of the present invention, the first receiving module receives the first write operation command sent by the first storage controller, the sending module sends a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, then the second receiving module receives the forward write command sent by the first storage controller, and the first writing module writes data to the second location according to the forward write command and sends the forward write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
As shown in fig. 7, another data writing apparatus according to another embodiment of the present invention may include at least one processor 701 (e.g., a CPU), at least one network interface 702 or other communication interfaces, a memory 703, and at least one communication bus 704, which are used to implement connection communication between these apparatuses. The processor 701 is configured to execute executable modules, such as computer programs, stored in the memory 703. The Memory 703 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the data writing device and at least one other network element is realized through at least one network interface 702 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
In some embodiments, the memory 703 stores a program 7031, the program 7031 being executable by the processor 701, the program 7031 comprising:
sending a first write operation command to a second storage controller, wherein the first write operation command is sent to the first storage controller by a host, the first write operation command is used for indicating that data is written in a target storage position, the target storage position in the first storage controller is a first position, and the target storage position in the second storage controller is a second position;
receiving a return message sent by the second storage controller, where the return message is used to indicate that the second storage controller is writing data to the second location according to a second write operation command when receiving the first write operation command, and the return message is generated and sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than the priority of the first storage controller;
sending a forwarding write command to the second storage controller, wherein the operation indicated by the first forwarding write command is the same as the operation indicated by the write operation command;
receiving the forwarding write command sent by the second storage controller when determining to stop writing data to the second location according to the second write operation command and start writing data to the second location according to the forwarding write command;
and writing data into the first position according to the forwarding write command.
Optionally, before the sending the first write operation command to the second storage controller, the program 7031 may further include:
receiving the first write operation command sent by a host;
judging whether the first storage controller writes data into the first position according to a third write operation command;
the sending the first write operation command to the second storage controller includes:
and if the first storage controller is not writing data to the first position according to a third write operation command, writing data to the first position according to the first write operation command, and sending the first write operation command to the second storage controller.
Optionally, before the sending the forward write command to the second storage controller, the method further includes:
and stopping writing data into the first position according to the first write operation command.
Optionally, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the determining whether the first storage controller is writing data to the first location according to a third write operation command, where a storage location where the write operation recording module is writing data is in a storage controller, includes:
judging whether the first position is recorded in a write operation recording module on the first storage controller;
if the first position is recorded in a write operation recording module on the first storage controller, determining that the first storage controller is writing data to the first position according to a third write operation command;
and if the first position is not recorded in the write operation recording module on the first storage controller, determining that the first storage controller is not writing data to the first position according to a third write operation command.
In summary, in the data writing device provided in the embodiment of the present invention, after the first storage controller sends the first write operation command to the second storage controller, the first storage controller receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the first storage controller sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
As shown in fig. 8, another embodiment of the present invention provides another data writing apparatus, which may include at least one processor 801 (e.g., a CPU), at least one network interface 802 or other communication interface, a memory 803, and at least one communication bus 804, for implementing connection communication between these apparatuses. The processor 801 is used to execute executable modules, such as computer programs, stored in the memory 803. The Memory 803 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The data writing device is communicatively connected to at least one other network element through at least one network interface 802 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like may be used.
In some embodiments, the memory 803 stores a program 8031, which program 8031 may be executed by the processor 801, this program 8031 including:
receiving a first write operation command sent by a first storage controller, wherein the first write operation command is sent by the first storage controller to a second storage controller after receiving the first write operation command sent by a host, the first write operation command is used for indicating that data is written in a target storage position, and the target storage position in the second storage controller is a second position;
when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than that of the first storage controller, sending a return message to the first storage controller, wherein the return message is used for indicating that the second storage controller is writing data to the second location according to the second write operation command when receiving the first write operation command;
receiving a forwarding write command sent by the first storage controller, wherein the operation indicated by the forwarding write command is the same as the operation indicated by the write operation command;
and when the second storage controller stops writing data into the second position according to the second write operation command, writing data into the second position according to the forwarding write command, and sending the forwarding write command to the first storage controller.
Optionally, the program 8031 may further include: and when the second storage controller is writing data to the second position according to the second write operation command, the priority of the second storage controller is lower than that of the first storage controller, and the second storage controller stops writing data to the second position according to the second write operation command, writing data to the second position according to the first write operation command.
Optionally, each storage controller is provided with a write operation recording module, and the write operation recording module is configured to record: the storage position where the data is being written in the storage controller where the write operation recording module is located,
when the second storage controller is writing data to the second location according to the second write operation command, the second location is recorded in a write operation recording module on the second storage controller;
when the second storage controller is not writing data to the second location according to the second write operation command, the second location is not recorded in the write operation recording module on the second storage controller.
In summary, in the data writing apparatus provided in the embodiment of the present invention, the second storage controller receives the first write operation command sent by the first storage controller, sends a return message to the first storage controller when the second storage controller is writing data to the second location according to the second write operation command and the priority of the second storage controller is higher than the priority of the first storage controller, then receives the forward write command sent by the first storage controller, and writes data to the second location according to the forward write command and sends the forward write command to the first storage controller when the second storage controller stops writing data to the second location according to the second write operation command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
As shown in fig. 9, an embodiment of the present invention provides a dual active system 90, and the dual active system 90 may include a first storage controller 901 and a second storage controller 902.
In one aspect, the first storage controller 901 may be the data writing apparatus 50 shown in FIG. 5-1, FIG. 5-2 or FIG. 5-3; the second memory controller 902 may be the data writing apparatus 60 shown in fig. 6-1 or fig. 6-2.
On the other hand, the first storage controller 901 may be a data writing device shown in fig. 7; the second memory controller 902 may be a data writing apparatus shown in fig. 8.
In summary, in the dual active system provided in the embodiment of the present invention, after the first storage controller sends the first write operation command to the second storage controller, the first storage controller receives a return message sent to the first storage controller when the second storage controller determines that the priority of the second storage controller is higher than that of the first storage controller and the second storage controller is writing data to the second location according to the second write operation command, and then the first storage controller sends the forward write command to the second storage controller, so that the first storage controller and the second storage controller respectively write data to the first location and the second location according to the forward write command. In the embodiment of the invention, the data is written into the second position in sequence according to the priority sequence of the first storage controller and the second storage controller, so that the second storage controller is prevented from writing the data into the same storage position according to two write operation commands at the same time, and the second position is not required to be locked, therefore, the communication times between the first storage controller and the second storage controller are reduced, the time consumed by data writing in a dual-active system is shortened, and the data writing efficiency is improved.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the data writing device and the dual active system described above may refer to the corresponding processes in the foregoing data writing method embodiments, and are not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
In the embodiments provided in the present application, it should be understood that the disclosed dual active system, data writing apparatus and data writing method may be implemented in other ways. For example, the above-described embodiments of the data writing apparatus are merely illustrative, and for example, the division of the unit in the data writing apparatus is only a logical division, and there may be other divisions when the data writing apparatus is actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (8)
1. A data writing method is applied to a dual active system, wherein the dual active system comprises a first storage controller and a second storage controller;
the first storage controller receives a first write operation command sent by a host, wherein the first write operation command is used for indicating that data is written in a target storage position;
the first storage controller forwards the first write operation command to the second storage controller;
the second storage controller receives the first write operation command;
the second storage controller determines that the second storage controller has received a second write operation command and that the second storage controller has a higher priority than the first storage controller, the second write operation command being used to instruct writing of data in the target storage location;
when the second storage controller determines that the second storage controller has received a second write operation command and that the second storage controller has a priority higher than the priority of the first storage controller, the second storage controller does not execute the first write operation command.
2. The method of claim 1, further comprising:
the second storage controller sends a return message to the first storage controller, wherein the return message is used for indicating the second storage controller not to execute the first write operation command;
based on the return message, the first storage controller stops executing the first write operation command.
3. The method of claim 1, further comprising:
the second storage controller forwards the second write operation command to the first storage controller;
the first storage controller receives the second write operation command, determines that the first storage controller has received the first write operation command, and has a lower priority than the second storage controller;
the first storage controller executes the second write operation command.
4. The method of claim 3, further comprising, after the first memory controller executes the second write operation command:
the first storage controller sends the first write operation command to the second controller;
the second storage controller receives and executes the first write operation command.
5. A dual-active system, comprising a first storage controller and a second storage controller;
the first storage controller is used for receiving a first write operation command sent by a host, wherein the first write operation command is used for indicating that data is written in a target storage position; forwarding the first write operation command to the second storage controller;
the second storage controller is used for receiving the first write operation command; determining that the second storage controller has received a second write operation command and that the second storage controller has a higher priority than the first storage controller, the second write operation command indicating that data is to be written in the target storage location; when the second storage controller determines that the second storage controller has received a second write operation command and that the second storage controller has a priority higher than the priority of the first storage controller, the second storage controller does not execute the first write operation command.
6. The method of claim 5,
the second storage controller is further configured to send a return message to the first storage controller, where the return message is used to instruct the second storage controller not to execute the first write operation command;
the first storage controller is further configured to stop executing the first write operation command based on the return message.
7. The method of claim 5,
the second storage controller is further used for forwarding the second write operation command to the first storage controller;
the first storage controller is further configured to receive the second write operation command, determine that the first storage controller has received the first write operation command, and the priority of the first storage controller is lower than the priority of the second storage controller; and executing the second write operation command.
8. The method of claim 5,
the first controller is further used for sending the first write operation command to the second controller after the first storage controller executes the second write operation command;
the second storage controller is further used for receiving and executing the first write operation command.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911272697.7A CN111176559B (en) | 2015-12-04 | 2015-12-04 | Data writing method and device and dual-activity system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911272697.7A CN111176559B (en) | 2015-12-04 | 2015-12-04 | Data writing method and device and dual-activity system |
CN201510885958.8A CN106844234B (en) | 2015-12-04 | 2015-12-04 | Data writing method and device and double-active system |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510885958.8A Division CN106844234B (en) | 2015-12-04 | 2015-12-04 | Data writing method and device and double-active system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111176559A true CN111176559A (en) | 2020-05-19 |
CN111176559B CN111176559B (en) | 2023-07-11 |
Family
ID=59150511
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911272697.7A Active CN111176559B (en) | 2015-12-04 | 2015-12-04 | Data writing method and device and dual-activity system |
CN201510885958.8A Active CN106844234B (en) | 2015-12-04 | 2015-12-04 | Data writing method and device and double-active system |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510885958.8A Active CN106844234B (en) | 2015-12-04 | 2015-12-04 | Data writing method and device and double-active system |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN111176559B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108663971A (en) * | 2018-06-01 | 2018-10-16 | 北京汉能光伏投资有限公司 | Order retransmission method and device, solar energy system and central controller |
CN110881277A (en) * | 2018-07-04 | 2020-03-13 | 华为技术有限公司 | Data storage method, device and related equipment |
CN109445992A (en) * | 2018-11-01 | 2019-03-08 | 郑州云海信息技术有限公司 | A kind of dual-active System data management method and relevant apparatus |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1206147A (en) * | 1989-05-17 | 1999-01-27 | 国际商业机器公司 | Apparatus for submitting fault-tolerant environmental and system structure in data processing system |
EP1400893A2 (en) * | 2002-09-18 | 2004-03-24 | Hitachi, Ltd. | Storage system and control method |
JP2005071100A (en) * | 2003-08-25 | 2005-03-17 | Fujitsu Ltd | Storage controller and its control method |
US20070168629A1 (en) * | 2006-01-13 | 2007-07-19 | Hitachi, Ltd. | Storage controller and data management method |
CN101464781A (en) * | 2008-12-31 | 2009-06-24 | 成都市华为赛门铁克科技有限公司 | Port control method and apparatus, and solid state disk |
CN101719052A (en) * | 2009-12-22 | 2010-06-02 | 成都市华为赛门铁克科技有限公司 | Method, device and system for writing data |
CN102331977A (en) * | 2011-09-07 | 2012-01-25 | 上海交通大学 | Memory controller, processor system and memory access control method |
CN103530066A (en) * | 2013-09-16 | 2014-01-22 | 华为技术有限公司 | Data storage method, device and system |
CN103562872A (en) * | 2011-06-01 | 2014-02-05 | 国际商业机器公司 | Resource allocation for a plurality of resources for a dual activity system |
CN103680594A (en) * | 2012-08-29 | 2014-03-26 | 三星电子株式会社 | Memory device for reducing a write fail, a system including the same, and a method thereof |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101497074B1 (en) * | 2008-06-17 | 2015-03-05 | 삼성전자주식회사 | Non-volatile memory system and data manage method thereof |
US8862816B2 (en) * | 2010-01-28 | 2014-10-14 | International Business Machines Corporation | Mirroring multiple writeable storage arrays |
CN103513956B (en) * | 2012-06-26 | 2016-04-06 | 阿里巴巴集团控股有限公司 | A kind of method of processor processes data and device |
US20150261446A1 (en) * | 2014-03-12 | 2015-09-17 | Futurewei Technologies, Inc. | Ddr4-onfi ssd 1-to-n bus adaptation and expansion controller |
CN104407814B (en) * | 2014-11-21 | 2017-10-17 | 华为技术有限公司 | Double method and apparatus for writing data |
-
2015
- 2015-12-04 CN CN201911272697.7A patent/CN111176559B/en active Active
- 2015-12-04 CN CN201510885958.8A patent/CN106844234B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1206147A (en) * | 1989-05-17 | 1999-01-27 | 国际商业机器公司 | Apparatus for submitting fault-tolerant environmental and system structure in data processing system |
EP1400893A2 (en) * | 2002-09-18 | 2004-03-24 | Hitachi, Ltd. | Storage system and control method |
JP2005071100A (en) * | 2003-08-25 | 2005-03-17 | Fujitsu Ltd | Storage controller and its control method |
US20070168629A1 (en) * | 2006-01-13 | 2007-07-19 | Hitachi, Ltd. | Storage controller and data management method |
CN101464781A (en) * | 2008-12-31 | 2009-06-24 | 成都市华为赛门铁克科技有限公司 | Port control method and apparatus, and solid state disk |
CN101719052A (en) * | 2009-12-22 | 2010-06-02 | 成都市华为赛门铁克科技有限公司 | Method, device and system for writing data |
CN103562872A (en) * | 2011-06-01 | 2014-02-05 | 国际商业机器公司 | Resource allocation for a plurality of resources for a dual activity system |
CN102331977A (en) * | 2011-09-07 | 2012-01-25 | 上海交通大学 | Memory controller, processor system and memory access control method |
CN103680594A (en) * | 2012-08-29 | 2014-03-26 | 三星电子株式会社 | Memory device for reducing a write fail, a system including the same, and a method thereof |
CN103530066A (en) * | 2013-09-16 | 2014-01-22 | 华为技术有限公司 | Data storage method, device and system |
Non-Patent Citations (2)
Title |
---|
GHAZANFAR ALI等: "Software-Defined Data Center", 《ZTE COMMUNICATIONS》 * |
李静梅等: "基于FPGA的信号存储控制器的设计", 《应用科技》 * |
Also Published As
Publication number | Publication date |
---|---|
CN106844234A (en) | 2017-06-13 |
CN106844234B (en) | 2020-01-03 |
CN111176559B (en) | 2023-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9135190B1 (en) | Multi-profile memory controller for computing devices | |
US7418563B2 (en) | Method for controlling storage device controller, storage device controller, and program | |
CN106527974B (en) | A kind of method that writing data, equipment and system | |
US20180260145A1 (en) | Internal system namespace exposed through control memory buffer | |
US20160350192A1 (en) | Storage system transactions | |
US10496608B2 (en) | Synchronizing changes in a file system which are initiated by a storage device and a host device | |
CN106844234B (en) | Data writing method and device and double-active system | |
US20150149741A1 (en) | Storage System and Control Method Thereof | |
US10664193B2 (en) | Storage system for improved efficiency of parity generation and minimized processor load | |
CN109213429B (en) | Storage management method and device | |
US20160266808A1 (en) | Information processing device, information processing method, and recording medium | |
CN105389268A (en) | Data storage system and operating method thereof | |
US8886597B2 (en) | Synchronizing changes in a file system which are initiated by a storage device and a host device | |
US20170003890A1 (en) | Device, program, recording medium, and method for extending service life of memory | |
JP5673396B2 (en) | Information processing system, information processing program, and information processing method | |
CN105335441B (en) | Distributed file system based on local area network | |
CN107203339B (en) | Data storage method and device | |
CN112445412A (en) | Data storage method and device | |
US9235349B2 (en) | Data duplication system, data duplication method, and program thereof | |
US7039659B2 (en) | Method and apparatus for making differential independent data copies in a data processing system | |
KR20190069134A (en) | Apparatus and method for file sharing between applications | |
US20080082533A1 (en) | Persistent locks/resources for concurrency control | |
CN106557385B (en) | Data snapshot method and storage device | |
CN110390969B (en) | Method and system for realizing atomic writing | |
US9703497B2 (en) | Storage system and storage control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |