CN106843749A - Write request processing method, device and equipment - Google Patents

Write request processing method, device and equipment Download PDF

Info

Publication number
CN106843749A
CN106843749A CN201611155528.1A CN201611155528A CN106843749A CN 106843749 A CN106843749 A CN 106843749A CN 201611155528 A CN201611155528 A CN 201611155528A CN 106843749 A CN106843749 A CN 106843749A
Authority
CN
China
Prior art keywords
storage device
terminal
address
write
target service
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
Application number
CN201611155528.1A
Other languages
Chinese (zh)
Other versions
CN106843749B (en
Inventor
曾永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611155528.1A priority Critical patent/CN106843749B/en
Publication of CN106843749A publication Critical patent/CN106843749A/en
Priority to PCT/CN2017/096052 priority patent/WO2018107772A1/en
Application granted granted Critical
Publication of CN106843749B publication Critical patent/CN106843749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

Landscapes

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

Abstract

This application discloses a kind of write request processing method, device and equipment, belong to field of data storage.The method includes:First terminal sends write request respectively to the first storage device and the second storage device, when all or part of address in the corresponding logical address of write request has been locked or will be locked, storage device sends refusal respond to first terminal, the refusal respond is used to indicate said write to ask all or part of address in corresponding logical address to be locked or will be locked, first terminal is asked to second terminal forwarding said write, so that second terminal is after the locking of all or part of address is released from, said write is sent respectively to the first storage device and the second storage device to ask, so as to while avoiding the address of write request from conflicting with the address generation of other write requests or data synchronization request, greatly improve the process performance at Backup Data center.

Description

Write request processing method, device and equipment
Technical field
The application is related to field of data storage, more particularly to a kind of write request processing method, device and equipment.
Background technology
With the key business that continuing to develop for information technology, the information system based on data center undertake in every profession and trade Also it is more and more more, once data center's collapse or error, will cause the loss of significant data.In order to improve the safety of data Property, current information system would generally set primary data center and Backup Data center to carry out the preservation and backup of data, together When in order to improve hardware utilization, the two data centers can simultaneously processing business request, such as write request, read requests And data synchronization request etc..It is above-mentioned at the same processing business request active and standby Liang Ge data centers be commonly referred to as in dual-active data The heart.
Data center when processing business is asked, it is necessary to do specific treatment to write request, with avoid write request with Address conflict between write request, or write request and data synchronization request.In the related art, dual-active data center pair The processing mode of write request is as follows:
Dual-active data center is based on same group of logical address and provides Business Processing service, and sets lock clothes in primary data center Business device.When terminal-pair certain logical address initiation in primary data center or Backup Data center writes, serviced to lock first Device sends locking request, to ask to lock the logical address, if the logical address is currently at unlocked state, locks The server locks logical address simultaneously returns to lock notification to terminal.After the terminal receives lock notification, in two data The storage device of the heart sends write request respectively, is write in the logical address by each comfortable request of the storage device of Liang Ge data centers Enter identical data.
In actual applications, in order to reach preferable preparedness effect, primary data center and Backup Data center are generally on ground On reason position relatively far apart, in such scheme, before the terminal in Backup Data center writes data every time, it is required for elder generation Locking request is sent to lock server and receive the lock notification of return, and the locking request and lock notification are across in data The heart is transmitted, and causes the terminal in Backup Data center higher to the time delay received lock notification from locking request is sent, right The process performance influence at Backup Data center is larger.
The content of the invention
In order to improve the process performance at the Backup Data center in dual-active data center, embodiments herein provides one Plant write request processing method, device and equipment.
A kind of first aspect, there is provided write request processing method, the method is used to include the first data center and second In the storage system of data center, the first data center includes the first storage device, and the second data center sets comprising the second storage Standby, the first data center and/or the second data center also include at least two terminals, and the method is by least two terminal First terminal is performed, and the method includes:
First terminal sends write request respectively to first storage device and second storage device, the write request For indicating the first storage device and the second storage device that identical number is write in the same logical address of respective memory space According to;First terminal receives the refusal respond that storage device is returned, and the storage device is that the first storage device or the second storage set Standby, the refusal respond is used to indicate all or part of address in the corresponding logical address of the write request to be locked or will It is locked;First terminal forwards the write request to the second terminal for triggering all or part of address locking so that second eventually End sends this respectively after the locking of all or part of address is released to first storage device and second storage device Write request.
The method that this programme is provided, asks when first terminal sends write-in to the first storage device and the second storage device simultaneously When asking, if second terminal is triggered or will trigger first storage device and the second storage device to should write request Logical address is locked, then write request is transmitted to second terminal by the first terminal, by second terminal in write request correspondence Logical address unlock after, the write request is sent to the first storage device and the second storage device is processed, appoint Terminal in meaning storage device all need not all across data center requests address lockings, backup before write request is sent every time When terminal in data center sends write request, also just in the absence of from send locking request to receive lock notification when Prolong, so that while avoiding the address of write request from conflicting with the address generation of other write requests or data synchronization request, Greatly improve the process performance at Backup Data center.
Optionally, methods described includes:First terminal forwards the first write request to second terminal, specifically includes:First Terminal obtains the mark of the second terminal carried in the refusal respond, first terminal according to the mark of second terminal, to second eventually The first write request of end forwarding.
A kind of second aspect, there is provided write request processing method, the method is used to include the first data center and second In the storage system of data center, the first data center includes the first storage device, and the second data center sets comprising the second storage Standby, the first data center and/or the second data center also include at least two terminals, and the method is by the first storage device and second Any storage device in storage device is performed, and the method includes:
Storage device receives the write request that the first terminal at least two terminal sends;When write request correspondence Logical address in all or part of address when being locked or will be locked, storage device sends to first terminal to be refused Response so that first terminal forwards the write request to second terminal, second terminal is triggering locking at least two terminal The terminal of all or part of address;Storage device receives second terminal and is sent out after the locking of all or part of address is released from The write request for sending.
Optionally, when all or part of address in the corresponding logical address of the write request has been locked or will be locked Regularly, storage device sends refusal respond to first terminal, specifically includes:Storage device detects the memory space pair of storage device In the logical address answered, whether the address being locked includes all or part of address;If testing result has been locked for this Address include all or part of address, then storage device sends the refusal respond to first terminal.
During the program is by detecting the corresponding logical address of the memory space of storage device, whether the address being locked wraps Containing all or part of address, specify that write request and current locked address produce the condition of conflict so that storage sets The standby write request for clearly determining to produce conflict, and refusal respond is generated to the write request.
Optionally, when all or part of address in the corresponding logical address of the write request has been locked or will be locked Regularly, storage device sends refusal respond to first terminal, specifically includes:If testing result is locked address not including All or part of address, then storage device detect whether to receive the target service request of second terminal transmission, target industry Identical address is included in the corresponding logical address of business request logical address corresponding with the write request;If testing result is reception Asked to the target service, then storage device obtains the priority of the write request and target service request;When the target industry When the priority of business request is higher than the priority of the write request, storage device sends the refusal respond to first terminal.
In the program, storage device asks corresponding logical address corresponding with the write request by detecting target service Identical address is included in logical address, and in the case where there is identical address, by the priority of target service request come really It is fixed which target service request preferentially performed so that the Backup Data center in distributed dual-active storage system is reducing time delay On the basis of, can be carried according to the of a relatively high target service request of different priority determination mode flexible approach priority System Priority high responds the ability of more important task.
Optionally, the target service is asked for asking to ask to write data in corresponding logical address in target service, And target service asks corresponding logical address to include all or part of address;Or, the target service is asked for asking Target service is asked another in data syn-chronization to the first storage device and the second storage device in corresponding logical address Storage device, and target service asks corresponding logical address to include all or part of address.
Optionally, when the priority of target service request is higher than the priority of write request, storage device processes target Service request, and processing during the target service asks, locks in the memory space of storage device to should target industry The logical address of business request.
In the program, storage device has locked the corresponding logical address of the service request when processing business is asked so that The service request can not be appropriately carried out by other operation interferences.
Optionally, storage device sends target service request to corresponding backup storage device and locking indicates letter Breath, the locking configured information is used to indicate the backup storage device during target service request is processed, and locks this standby In the memory space of part storage device to should target service request logical address.
In the program, storage device asks and locks to refer to by sending the target service to corresponding backup storage device Show information so that when breaking down, backup storage device can accurately inherit the locking to logical address to storage device.
Optionally, the storage device sends refusal respond to first terminal, including:Storage device is returned to first terminal and wrapped The refusal respond of mark containing second terminal.
The third aspect, there is provided a kind of terminal, the terminal includes:Processor and communication interface, the communication interface are matched somebody with somebody It is set to and is controlled by the processor;The processor is for realizing what the alternative of above-mentioned first aspect and first aspect was provided Write request processing method.
Fourth aspect, there is provided a kind of storage device, the equipment includes:Processor and communication interface, the communication interface quilt It is configured to be controlled by the processor;Processor in the equipment is used to realizing any one of above-mentioned second aspect and second aspect The write request processing method that alternative is provided.
5th aspect, there is provided a kind of write request processing unit, the device includes Unit at least one, and this at least one Unit is for realizing the write request processing method that the alternative of above-mentioned first aspect and first aspect is provided;Or, should Unit at least one is for realizing the write request that any one alternative of above-mentioned second aspect or second aspect is provided Processing method.
6th aspect, there is provided a kind of computer-readable recording medium, the computer-readable recording medium storage have for The executable program of the write request processing method that the alternative of above-mentioned first aspect and first aspect is provided is realized, or Person, the computer-readable recording medium storage has any one alternative for realizing above-mentioned second aspect or second aspect The executable program of the write request processing method for being provided.
Brief description of the drawings
Fig. 1 is the Organization Chart of the storage system involved by the application;
Fig. 2 is the structural representation of the memory control apparatus that the exemplary embodiment of the application one is provided;
Fig. 3 is the structural representation of the memory control apparatus that the exemplary embodiment of the application one is provided;
Fig. 4 is the flow chart of the write request processing method that the exemplary embodiment of the application one is provided;
Fig. 5 is the schematic diagram of the logical address conflict that embodiment illustrated in fig. 4 is related to;
Fig. 6 is a kind of write request treatment schematic diagram that embodiment illustrated in fig. 4 is related to;
Fig. 7 is another write request treatment schematic diagram that embodiment illustrated in fig. 4 is related to;
Fig. 8 is a kind of block diagram of write request processing unit that the exemplary embodiment of the application one is provided;
Fig. 9 is a kind of block diagram of write request processing unit that the exemplary embodiment of the application one is provided.
Specific embodiment
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with accompanying drawing to the application embodiment party Formula is described in further detail.
Fig. 1 is the Organization Chart of the storage system involved by the embodiment of the present application.The storage system includes the first data center 100 and second data center 110, composition dual-active data center of 100 and second data center of the first data center 110.
Optionally, the first data center 100 and the second data center 110 in embodiments herein can be according to numbers Distinguished according to the actual geographic region where center, such as Beijing data center and Shanghai Data center.First data center 100 are communicated by the network interface 116 in the data center 110 of network interface 106 and second, and the network interface is wired network The cable socket of network, the cable can be optical fiber, twisted-pair feeder or coaxial cable.
Optionally, the first data center 100 in this application and when implementing of the second data center 110, all may be used So that including physical server, the physical server can be used for being deposited for the first data center 100 or the second data center 110 provide Storage, calculating and Internet resources.Mainly realized by using the store function in the physical server in embodiments herein. For physical server, can be classified according to above-mentioned functions.Such as, for providing the physical services calculated with Internet resources Device can be referred to as calculate node, and in a data center, several calculate nodes can constitute calculate node cluster.For The physical server for providing storage resource can be referred to as storage device, and several storage devices can constitute memory node collection Group, such as the first data center 100 in Fig. 1 includes the first storage device 102a and the 3rd storage device 102b, the second number Include the second storage device 112a and the 4th storage device 112b according to center.Wherein, in order to improve the peace of stored data Quan Xing, can select one of storage device as main storage device, and set another or several storage devices with The primary storage node preserves same data, i.e., as the copy of the main storage device, backup is can be described as the copy of backup Storage device.Such as the 3rd storage device 102b in Fig. 1 is the copy of the first storage device 102a, the 4th storage device 112b It is the copy of the second storage device 112a.
Also at least include two terminals in first data center 100 and the second data center 110.This storage system specifically sets When putting above-mentioned two terminal, at least two terminal can be arranged in the first data center 100;Can also be by this at least Two terminals are arranged in the second data center 110;Can also be in first data center 100 and second data center It is each in 110 that at least one terminal is set.
As shown in figure 1, including at least one terminal of terminal 104, the second data center in the first data center 100 At least one terminal comprising second terminal 114 in 110.Above-mentioned terminal 104 and terminal 114 can be in the first data Storage device in the data center 110 of the heart 100 or second is initiated including write request, read requests or data synchronization request etc. Service request.Specifically, terminal 104 can carry out leading to across data center by the data center 110 of network interface 106 and second Letter, while can also be by the storage device in the data cable inside the first data center 100 and the first data center 100 (such as the first storage device 102a) communicated in data center.Similarly, terminal 114 can be by network interface 116 and One data center 100 carries out across data center communication, while also can be by the data cable inside the second data center 110 and the Storage device (such as the second storage device 112a) in two data centers 110 communicated in data center.
It should be noted that terminal 104 and terminal 114 in this storage system and other operate in Liang Ge data centers In terminal can be actual hardware device, such as general purpose computing device, or virtual software application, such as transport Row client on a computing device, the client can be virtual machine, software virtual machine or database software etc..
Wherein, in the storage system shown in Fig. 1, the first storage device 102a and the second storage device 112a can be matched somebody with somebody A virtual memory cell across data center is set to, the memory cell is referred to as dual-active volume.For the use using the storage system For family, it can need the data of storage to write dual-active volume, and need not pay close attention to which number is the data be especially stored in According in the physical storage device at center.For the storage system, when there is data to write dual-active volume, the first storage device 102a and the second storage device 112a are being written locally identical data respectively according to identical logical address.
Wherein, each storage device in Fig. 1 can all include storage management software, and storage management software can be to the storage Physical memory chips in equipment are managed, such as whether corresponding data address is locked in judging physical memory chips It is fixed.Above-mentioned storage device can be network connection formula storage (Network Attached Storage, NAS) equipment, can be with It is storage network (Storage Area Network, SAN) equipment, for example, the storage device can be SAN equipment, the SAN sets Standby memory space specifically can represent that the LUN is a storage array by logic unit (Logical Unit Number, LUN) The logic magnetic disc that form shows, may operate on one or more LUN of the SAN equipment per station terminal.The SAN equipment The storage management software read-write operation that can control to the LUN, it is also possible to the information to the LUN is managed.
In addition, in a kind of implementation of embodiments herein, when the storage system is embodied as dual-active data storage During system, the first data center 100 and the second data center 110 can disaster tolerance data center each other, when in one of data The heart breaks down after the terminal for causing it to service is stopped, and another data center works on and records different information. After the data center for breaking down resumes work, the data center for recording different information is poor to it as disaster tolerance data center Amount synchronizing information, makes the information stored in the data center after resuming work consistent with the information stored in disaster tolerance data center.
Fig. 2 is refer to, it illustrates the structural representation of the terminal of the exemplary embodiment offer of the application.The end End 20 can be the terminal in the data center shown in above-mentioned Fig. 1, or, when terminal shown in above-mentioned Fig. 1 is that virtual software should Used time, the terminal 20 can also be the computer equipment of the terminal shown in the above-mentioned Fig. 1 of operation.
The terminal 20 can include:Processor 21 and communication interface 24.
Processor 21 can include one or more than one processing unit, and the processing unit can be CPU (English:Central processing unit, CPU) or network processing unit (English:Network processor, NP) Deng.
Communication interface 24 can include local interface and network interface, wherein, local interface is used to connect and the terminal Storage device or other terminals in same data center, network interface are used to connect the storage in other data centers Equipment or data center.
Alternatively, the terminal 20 can also include memory 23, and processor 21 by bus and memory 23 and can lead to Letter interface 24 is connected.Memory 23 can be used to store software program, and the software program can be performed by processor 21.Additionally, should All kinds of business datums or user data can also be stored in memory 23.
Alternatively, the terminal 20 can also include output equipment 25 and input equipment 27.Output equipment 25 and input set Standby 27 are connected with processor 21.Output equipment 25 can be for display information display, play sound power amplifying device or Person's printer etc., output equipment 25 can also include o controller, be used to provide output to display screen, power amplifying device or beat Print machine.Input equipment 27 can be for the such as mouse of user input information, keyboard, electronic touch pen or contact panel it The equipment of class, input equipment 27 can also include o controller for receiving and processing from mouse, keyboard, electronic touch The input of the equipment such as pen or contact panel.
Fig. 3 is refer to, the structural representation of the storage device provided it illustrates one exemplary embodiment of the application.Should Storage device 30 can be any one equipment in each storage device shown in above-mentioned Fig. 1.
The equipment 30 can include:Processor 31 and communication interface 34.
Processor 31 can include one or more than one processing unit, and the processing unit can be CPU (English:Central processing unit, CPU) or network processing unit (English:Network processor, NP) Deng.
Communication interface 34 can include local interface and network interface, wherein, local interface is used to connect and the storage Equipment is in storage device or other terminals in same data center, during network interface is used to connect other data centers Storage device or data center.
The storage device 30 can also include memory 33, and processor 31 can be connect by bus with memory 33 and communication Mouth 34 is connected.Memory 33 can be used to store software program, and the software program can be performed by processor 31.Additionally, the storage All kinds of business datums or user data can also be stored in device 33.
Fig. 4 is refer to, the flow of the write request processing method provided it illustrates one exemplary embodiment of the application Figure.The method can be used in the storage system shown in Fig. 1.As shown in figure 4, the date storage method can include:
Step 401, first terminal generation write request.
Wherein, the first terminal can be terminal 104 in the storage system shown in Fig. 1, terminal 114 or other do not show Any terminal for going out, the i.e. first terminal can be the first data center terminal, or the second data center in end End.In the embodiment of the present application, first terminal firstly generates a write request when needing to initiate data write-in.
The step can be as shown in Figure 2 terminal in processor realize.
Step 402, first terminal is distinguished according to data-storage system view to the first storage device and the second storage device Send write request.
Wherein, first storage device can be the first storage device 102a in the storage system shown in Fig. 1, and second deposits Storage equipment can be the second storage device 112a in the second storage device, the write request be used to indicating the first storage device and Second storage device writes identical data in the same logical address of respective memory space.
In the embodiment of the present application, the first storage device and the second storage device constitute a dual-active volume.The first terminal After generation write request, it can respectively send the write request to the first storage device and the second storage device.The write request In can include data and logical address to be written to be written.
The step can be as shown in Figure 2 terminal in processor control communication interface realize.
Step 403, storage device receives the write request that first terminal sends.
Storage device in the step can be that any one storage in the first storage device and the second storage device sets It is standby.During embodiments herein is realized, the first storage device and the second storage device can respectively perform step 403.I.e. step 403 can be the first storage device receive the first terminal transmission write request and the second storage device connect Receive two steps arranged side by side of the write request of first terminal transmission.
The step can be as shown in Figure 3 storage device in processor control communication interface realize.
Step 404, when all or part of address in the corresponding logical address of the write request has been locked or will be by During locking, storage device sends refusal respond to the first terminal.
In the embodiment of the present application, when in storage device some logical address be written into data, or, enter During row data syn-chronization (such as, by logical address same in the data syn-chronization in the logical address to other storage devices), Storage device can lock the logical address, wherein, the mode that storage device locks the logical address is properly termed as optimistic lock. The optimism is locked for locking the corresponding memory space of specified logical address, and causes the corresponding memory space of the specified logical address It is only capable of being read and write by the terminal for possessing optimism lock, and forbids the write operation of other terminal-pairs logical address.
Storage device (illustrate only illustrating for the first storage device angle, in actual applications, second deposits in Fig. 4 Storage equipment also performs identical step simultaneously) receive write request after, the corresponding logical address of the write request can be detected In part or all of address whether be locked or will be locked, if so, then storage device refuses the write request, And send refusal respond to first terminal.
Optionally, in the embodiment of the present application, when all or part of address in the corresponding logical address of the write request When being locked or will be locked, storage device can also obtain the second terminal of triggering locking all or part of address Mark, and the mark carrying of the second terminal is sent to first terminal in refusal respond.
Wherein, the second terminal can be the terminal that same data center is in first terminal, or, the second terminal It can also be the terminal that different data centers is in from first terminal.
The step can be as shown in Figure 3 storage device in processor control communication interface realize.
As shown in figure 4, in the mode a kind of in the cards of the embodiment of the present application, storage device is in detection write request When whether all or part of address in corresponding logical address has been locked, step 404a and step 404b can be performed.
Step 404a, storage device is detected in the corresponding logical address of the memory space of the storage device, has been locked Whether address includes all or part of address of the corresponding logical address of the write request.
The step can be as shown in Figure 3 storage device in processor realize.
Step 404b, if the address that testing result is this to be locked includes all or part of address, storage device Refusal respond is sent to first terminal.
In the embodiment of the present application, storage device receive the first terminal transmission write request before, if The target service request and start to process target service request of second terminal transmission are received, then storage device can be in treatment The target service is asked corresponding logical address locking by the target service during asking, i.e., in the start to process target industry The target service asks corresponding logical address locking when business is asked, and when treatment completes target service request, will be to this Target service asks the latch-release of corresponding logical address.Storage device process the target service ask during, if Receive the write request of first terminal transmission, and target service asks that corresponding logical address is corresponding with the write request to patrol Identical address (i.e. above-mentioned location in whole or in part) is included in volume address, that is, is meaned between the logical address of the two requests In the presence of conflict, now, storage device sends the refusal respond of the mark comprising second terminal to first terminal.
The situation of above-mentioned logical address conflict can be divided into three kinds:The first is the corresponding logical address of write request and mesh The corresponding logical address of mark service request is overlapped, and second is that the corresponding logical address of write request asks correspondence by target service Logical address be completely covered, the third is the corresponding logical address of write request and the target service corresponding logical address of request Alternate covering.For details, reference can be made to Fig. 5, it illustrates the invention relates to logical address conflict schematic diagram.
Overlap refers to that the corresponding logical address of two or more requests is identical.Such as the overlap schematic diagram in Fig. 5 Shown in 510, it is assumed that the LBA value of the corresponding logical address 511 of write request is 0x1000 to 0x1004, and target service request is right The LBA value of the logical address 512 answered equally is 0x1000 to 0x1004, then the corresponding logical address 511 of write request and mesh The corresponding logical address 512 of mark service request is overlapped.
Covering refers to that the corresponding logical address of a write request in two write requests is contained in another write request In corresponding logical address, such as being completely covered shown in schematic diagram 520 in Fig. 5, it is assumed that the corresponding logical address 522 of write request LBA value be 0x1000 to 0x1002, and target service ask the LBA value of corresponding logical address 521 be 0x1001 extremely 0x1004, then target service ask the corresponding logical address 522 of corresponding logical address 521 covering write request.
Alternate covering refers in the presence of one section of logical address, and the logical address is respectively the corresponding logical address of two service requests A part, and also there are different parts, the alternate covering in such as Fig. 5 between the corresponding logical address of the two service requests Shown in schematic diagram 530, it is assumed that the LBA value of the corresponding logical address 531 of write request is 0x1000 to 0x1004, and target service The LBA value for asking corresponding logical address 532 is 0x1003 to 0x1006, then the corresponding logical address 531 of write request and mesh The corresponding alternate covering of logical address 532 of mark service request, the LBA value of cross section is 0x1003 to 0x1004.
Optionally, in the embodiment of the present application, target service request can be used for asking asking right in the target service Data are write in the logical address answered.
Or, target service request can be used for request by the storage device, and target service request is corresponding Another storage device in data syn-chronization to the first storage device and the second storage device in logical address.For example, to hold As a example by the storage device of the row step is the first storage device, the second storage device in the second data center breaks down simultaneously After recovery, second terminal sends data synchronization request in background synchronization to the first storage device, and the data synchronization request is used for During the second storage device is broken down in request, the variance data write in the first storage device is synchronized to the second storage and sets It is standby.
The step can be as shown in Figure 3 storage device in processor control communication interface realize.
Optionally, when step 404a is performed, if detecting, the address being locked please not comprising the write-in for storage device All or part of address of corresponding logical address is asked, then storage device can further detect that write request is corresponding logically When whether all or part of address in location will be locked, that is, perform step 404c, step 404d and step 404e.
Step 404c, storage device detects whether to receive the target service request of second terminal transmission.
In the embodiment of the present application, storage device is also possible to while receiving the write request and the of first terminal transmission The target service request that two terminals send, and there is conflict in write request and the logical address of target service request, it is impossible to Process simultaneously, now, storage device needs to perform step 404c, to determine which is first processed asks.
The step can be as shown in Figure 3 storage device in processor realize.
Step 404d, if testing result is to receive target service request, the storage device obtains the write request The priority asked with the target service.
In the embodiment of the present application, the priority for service request that storage device is received can include the industry The priority of the business corresponding type of service of request, send the terminal of the service request where data center priority and hair Give the service request terminal priority at least one.
Optionally, respective priority can be carried in the write request and target service request, storage device directly from The priority of write request and target service request is parsed in write request and the target service request for receiving.
Or, storage device can also obtain write request and target service request type of service, send terminal and The information such as the data center where sending terminal, and it is each according to the information inquiry for the getting write request and target service request From priority.
The step can be as shown in Figure 3 storage device in processor realize.
Storage device is not received by target service request when completion step 404c is performed if detecting, stores Equipment can perform subsequent step 409.
Step 404e, when the priority of target service request is higher than the priority of write request, storage device is to described First terminal sends refusal respond.Optionally, the mark of the second terminal is included in the refusal respond.Now, the present invention is real Applying example will perform step 405.
Get after write request and target service ask respective priority, storage device can compare write request and Target service asks the height of respective priority, when the priority of target service request is higher than the priority of write request, Storage device asks priority treatment target service, and sends refusal respond to first terminal;When the priority of write request is high When the priority of target service request, the priority treatment write request is performed subsequent step 409 by storage device.
Optionally, when the priority of service request is comprising two or more priority, storage device can be by Compare the various priority of write request and target service request successively according to predetermined order, until determining write request and mesh Untill the height of the priority for marking service request.
Such as, it is somebody's turn to do with priority of the priority of service request comprising the corresponding type of service of above-mentioned service request, transmission As a example by the priority of the priority of the data center where the terminal of service request and the terminal for sending the service request, storage After equipment gets write request and the respective priority of target service request, the type of service of comparison write request is excellent first The priority of first level and the type of service of target service request, if the priority of the type of service of target service request is higher than write-in (such as, target service request is data synchronization request to the priority of the type of service of request, and the priority of data syn-chronization is higher than The priority of write-in), then storage device determines the priority of the priority higher than write request of target service request;If target industry Be engaged in request type of service priority less than write request type of service priority (such as, target service request be several The priority of write-in is less than according to the priority of synchronization request, and data syn-chronization), then storage device determines the excellent of target service request Priority of the first level less than write request.If the priority and the type of service of write request of the type of service of target service request Priority (such as, target service request be also a write request), then where storage device further compares first terminal Data center priority and second terminal where data center priority height, if the data where first terminal The priority at center higher than the priority of the data center where second terminal height (such as, it is assumed that first terminal is in the One data center, second terminal is in the second data center, and the priority of the first data center is higher than the second data center Priority), it is determined that priority of the priority of write request higher than target service request;If in the data where first terminal The priority of the heart less than the priority of the data center where second terminal height (such as, it is assumed that first terminal is in first Data center, second terminal is in the second data center, and the priority of the first data center is excellent less than the second data center First level), it is determined that priority of the priority of write request less than target service request;If the data center where first terminal Priority it is identical with the priority of the data center where second terminal (such as, it is assumed that at first terminal and second terminal In same first data center), then storage device further compares the priority of first terminal and second terminal, if first is whole The priority at end is higher than the priority of second terminal, then storage device determines that the priority of write request is asked higher than target service Priority, if priority of the priority of first terminal less than second terminal, storage device determines the preferential of write request Priority of the level less than target service request.Optionally, in the embodiment of the present application, the difference in same data center Different priority can be set between terminal.
The step can be as shown in Figure 3 storage device in processor control communication interface realize.
When the priority of target service request is higher than the priority of write request, storage device processes target service please Ask, and during treatment target service is asked, correspondence target service request patrols in the memory space of locking storage device Collect address.Wherein, storage device processes target service request, and during treatment target service is asked, lock onto target industry The step of logical address asked of being engaged in, the processor in storage device that can be as shown in Figure 3 controls communication interface to realize.
Optionally, storage device asks and releases to ask corresponding logical address to target service having processed target service Locking after, can also to second terminal send target service request treatment complete response, with indicate the second terminal should Target service request has processed completion, and the locking of the partially or entirely location in write request has been released.
Optionally, the storage device can also by the target service ask and locking configured information to be sent to its corresponding In backup storage device, wherein, the locking configured information is used to indicate backup storage device in the mistake for the treatment of target service request Cheng Zhong, locks the logical address of correspondence target service request in the memory space of backup storage device.It is complete in storage device processes After asking and release and ask the locking of corresponding logical address to the target service into the target service, storage device will be to second Terminal sends the response for indicating the target service to ask treatment to complete, to indicate second terminal target service request treatment It has been completed that, the response purpose for returning to second terminal is that the sender for asking target service can determine asking for itself Ask and have been carried out completing, to ensure that the treatment that target service is asked meets distributed strong consistency replication protocol.Accordingly, Two terminals are after knowing that storage device performs completion target service request, it is believed that the target service asks corresponding logic Address has unlocked.
Wherein, distributed strong consistency replication protocol is to ensure the data of each copy data in dual-active data center Uniformity and the agreement that introduces.The invention relates to dual-active data center support the agreement.The agreement specific requirement is double When specified data update operation completion, the data centers of two preservation data are intended to ensure to specify data to update at live data center Success.Also, the distributed strong consistency replicates and requires preserving when the copy for specifying data breaks down, it is necessary in the generation Data and other in the copy of failure each preserve data recovery in the copy of the specified data to after consistent, just allow by The copy that failure occurred is put into Business Processing again.
Step 405, the first terminal receives the refusal respond that storage device is returned.
In embodiments herein, any one storage in the first storage device or the second storage device is received During the refusal respond that equipment sends, first terminal can be considered as the first storage device and the second storage device all have issued refusal and ring Should.
Wherein, when the first terminal receives the refusal respond that storage device is returned, the first terminal can obtain this and refuse The mark of the second terminal that lost art is carried in answering.
The step can be as shown in Figure 2 terminal in processor control communication interface realize.
Step 406, first terminal forwards the write request to second terminal.
Optionally, first terminal can obtain the mark of the second terminal carried in refusal respond, and according to second terminal Mark forward the write request to second terminal.
The step can be as shown in Figure 2 terminal in processor control communication interface realize.
Step 407, second terminal receives the write request of first terminal forwarding.
The step can be as shown in Figure 2 terminal in processor control communication interface realize.
Step 408, second terminal after the locking of all or part of address is released from, to first storage device and should Second storage device sends the write request respectively.
Optionally, when the storage system involved by the embodiment of the present application is run, if receiving the in second terminal While the write request of one terminal forwarding, the write request of other terminals forwarding is also have received, then second terminal can be with root Priority according to the terminal for sending write request determines which write request first sent.
The step can be as shown in Figure 2 terminal in processor control communication interface realize.
Accordingly, storage device receives the write request.Storage device continues to monitor and is somebody's turn to do after the write request is received Whether the partially or entirely location in the logical address of write request is locked or will be locked, if the write request Partially or entirely location in logical address is locked or will be locked, then return to refusal respond to second terminal, otherwise The storage device will perform step 409.
The storage device receives the action of write request, can be by being embodied as the first storage device or the second storage device Processor in memory control apparatus controls communication interface to realize.
Step 409, storage device writes the data of write request instruction according to the corresponding logical address of the write request.
It should be strongly noted that when step 409 is by constituting what two storage devices that dual-active is rolled up together were performed, at this Can be considered as the identity logic of the first storage device and the second storage device in respective memory space in application illustrated embodiment Identical data is write in address.The first storage device and the second storage device store completion the identical data after, step 409 are considered as and perform completion.
The step can be as shown in Figure 3 storage device in processor realize.
Step 410, storage device lock in the memory space of the storage device to should write request logical address.
The step can be as shown in Figure 3 storage device in processor realize.
Step 411, storage device sends the write request and locking configured information to corresponding backup storage device, should Locking configured information is used to indicate the backup storage device during the write request is processed, and locks the backup storage device Memory space in should write request logical address.
Optionally, the loss of data of storage in the storage device is caused to prevent storage device from hindering for some reason, in the storage When equipment writes data according to write request, the storage device sends the write request and lock to corresponding backup storage device Determine configured information.
Optionally, the storage device sends the service request for processing and (such as writes to corresponding backup storage device Enter request or target service request) when, it is also possible to locking configured information is not sent, is being received and is being processed by backup storage device During the service request, automatically by the corresponding logical address locking of the service request.
Optionally, replicated according to distributed strong consistency and required, backup storage device completes the treatment to service request When, treatment successfully response will be returned to the terminal for sending the service request.
The step can be as shown in Figure 3 storage device in processor control communication interface realize.
Below, write example by two specific data and introduce two write request processing streams that the application can be realized Journey.
In the data write-in case that the application can be realized, by taking the framework of the storage system shown in Fig. 1 as an example, please With reference to Fig. 6, it illustrates the invention relates to a kind of write request process schematic diagram, as shown in fig. 6, notebook data writes Case can be divided into following steps to realize.
1) first terminal in the first data center generates write request 1 when the instruction of write-in data is received.
2) first terminal gets the corresponding logical address of write request 1 according to storage system view, and this is write Request 1 is separately sent to be processed in the first storage device and the second storage device.Write when the first storage device receives this After entering request 1, the corresponding logical address of write request 1 is locked, and according to the instruction write-in number of the write request 1 According to;Meanwhile, after the second storage device receives write request 1, lock is also carried out to the corresponding logical address of write request 1 It is fixed, and according to the instruction write-in data of the write request 1.Because the 3rd storage device is the alternate device of the first storage device, 4th storage device is the alternate device of the second messaging device, thus the 3rd storage device locked with the first storage device it is identical Logical address and be written with data according to identical write request 1, similarly, the 4th storage device also perform and second storage Equipment identical is operated.
3) second terminal generates another write request 2, the write request 2 of second terminal generation and first terminal generation The corresponding logical address of write request 1 it is partly or entirely identical.
4) write request 2 of generation is sent respectively to the first storage device and the second storage device by second terminal.
5) after the first storage device and the second storage device receive write request 2, two storage devices all will inspection It is whether identical with the corresponding logical address of write request 2 that the second terminal sends in the logical address that survey has been locked.By The write request 1 that the write request 2 and first terminal sent in the second terminal send is partly or entirely identical, so first Storage device and the second storage device will all generate refusal respond, and the refusal respond is fed back into second terminal.Meanwhile, it is above-mentioned Two storage devices add the mark of first terminal in the refusal respond of generation.
6) second terminal obtains the mark of the first terminal in the refusal respond after refusal respond is received, and will write Request 2 is transmitted to the first terminal.
7) first terminal is after the write request 2 that second terminal forwarding comes is received, in discharging it into task queue, First terminal receives the first storage device and the second storage device has performed the completion response sent after write request 1.
8) first terminal is to the user feedback completed response of write request 1.
9) write request 2 is sent respectively to the first storage device and the second storage device by first terminal.
Optionally, the request that can also be sent as terminal using back-end data synchronization request in this example, the first storage sets Standby and the second storage device will lock identical logical address, and difference is only that one of storage device locking logically Data in location are that, for being read data, and the logical address of another storage device locking is for writing data.
In another data that the application can be realized write-in case, the application can by way of data vernier come Data are avoided to write and back-end data synchronization between because of the conflict of the identical generation of logical address.According to the storage system shown in Fig. 1 Framework, refer to Fig. 7, it illustrates the invention relates to another write request process schematic diagram.As shown in fig. 7, The processing procedure is specific as follows:
1) first terminal initiates back-end data synchronization.
When first terminal initiates background synchronization, first terminal indicate the first storage device with data vernier currently and dual-active The position of the logical address alignment of volume space is starting point, on the basis of the granule size of data vernier, reads data to be synchronized. For example, when vernier granularity is 1MB, logic of the first storage device locking from the 1MB of current data vernier position alignment Address, and the data in the 1MB are read, while the 3rd storage device locks the same corresponding logical addresses of 1MB.
2) the 1MB data is activations that the first storage device will read are to first terminal.
3) first terminal sends write request 1 to the second storage device in the second data center, and the write request 1 is used for Same logical address in asking the 1MB data to write the second storage device, after the second storage device receives the 1MB data, The corresponding logical address of 1MB data will be locked, and the 1MB data are written to the corresponding logic in second storage device In address, while the 4th storage device locks the same corresponding logical addresses of 1MB, and the 1MB data are written to the 4th In corresponding logical address in storage device.
4) second terminal generation write request 2.
5) be separately sent to the write request 2 in first storage device and the second storage device by second terminal.First deposits Storage equipment and the second storage device detect respectively the corresponding logical address of write request 2 whether with current 1MB lock logic Address is identical, if entirely different, directly performs the write request 2.
6) when the corresponding logical address of write request 2 is identical or complete with the logical address part that current 1MB is locked Identical, the first storage device and the second storage device obtain the mark that triggering locks the first terminal of the logical address, and will take The refusal respond of the mark with the first terminal returns to second terminal.
7) second terminal forwards the write request 2 after the refusal respond is received to the first terminal.
8) after the second storage device is completed to write the 1MB data and relieves the locking of the corresponding logical addresses of the 1MB, will The locking of the corresponding logical addresses of the 1MB is released, and write-in successfully response is returned to the first terminal.
9) first terminal sends the write request that second terminal is forwarded to the first storage device and the second storage device respectively 2。
First storage device and the second storage device are processed after the write request 2 for receiving above-mentioned second terminal forwarding The write request 2 that second terminal forwarding comes.
Optionally, in the synchronous case of above-mentioned back-end data, because a hyposynchronous data volume may be larger, for example 10GB data, if this directly is carried out into data syn-chronization for the data interlock of 10GB, can be to other needs in the storage system Business to data segment read-write is impacted.In order to avoid above-mentioned influence, the application is utilized when back-end data synchronization is carried out The mode of data vernier is updated to needing synchronous data.Synchronous data can be needed to be divided into during specific execution some Segment length is the data segment of vernier length, the logical address corresponding to each section of vernier is locked successively and is synchronized, when synchronous complete Into after a data segment, the storage device for reading and writing both sides will all release the corresponding logical address of the data segment, and will follow the number closely Locked according to the logical address in the corresponding read-write both sides storage device of next data segment of section, carry out the synchronous work of the data segment Make.
It should be noted that need synchronous data segment can be in dual-active volume space continued presence, or Discontinuous presence.For example, a length of 1MB of data vernier is, it is necessary to the data of synchronization are 3MB, the dual-active currently alignd with vernier Volume space position is starting point, and the synchronous data of the needs are respectively in the dual-active volume space position where 3MB, 5MB and 7MB Put.Then data vernier being detected respectively in 1MB and 2MB, it can be moved after being not detected by needing synchronous data To the position of 3MB, because the data of the position need synchronization, so the data indicate the first storage device and the second storage to set Back-up does not lock the logical address, and carries out the data syn-chronization work of the position.After the data of the synchronous complete 3MB positions, Data vernier will be received and complete the corresponding of synchronization to the first storage device and the second storage device respectively, and data vernier will be examined afterwards Survey detects 4MB, 5MB ... after the data to be synchronized of its determination 3MB length set in advance are all synchronously completed successively, ties Beam works asynchronously, and returns to synchronous successfully response to the terminal for initiating the synchronous working.
In sum, a kind of write request processing method shown in the embodiment of the present application, data are obtained by first terminal Write request, and write request is sent according to data-storage system view respectively to the first storage device and the second storage device, After first storage device and the second storage device are respectively received the write request, patrol each Autonomous test write request is corresponding Whether all or part of address collected in address has been locked or will lock;When testing result is for negative, will each lock The corresponding logical address of the write request simultaneously performs the write request, while being set to back up the first storage device and the second storage Data in standby, may also indicate that the 3rd messaging device is performed and are deposited with the identical operation of the first storage device, and instruction the 4th Storage equipment is performed and the identical operation of the second storage device;When testing result for certainly when, to sending the write request First terminal return with trigger the corresponding all or part of logical address locking of the write request or will lock second eventually , be forwarded to the write request in the second terminal by the first terminal by the mark at end, and second terminal detects the write request After corresponding logical address unlocks, the write request is sent respectively to the first storage device and the second storage device, referred to Show that the two storage devices perform the write request.In this application, because the terminal in any storage device all need not be All across data center requests address lockings before sending write request every time, the terminal in Backup Data center sends write request When, also just in the absence of from locking request to the time delay received lock notification is sent, so as in the address for avoiding write request While conflict with the address generation of other write requests or data synchronization request, the place at Backup Data center is greatly improved Rationality energy.
Further, since the embodiment of the present application detects the corresponding logical address of Current Write Request by portion in storage device Point or all locking when, then row detection lock the logical address terminal mark, by by the Current Write Request forward It is distributed double reducing to the terminal for locking the logical address so that produce the request of write-in conflict to be changed into serial process On the basis of the time delay of storage system living, it is ensured that the free of errors write request of execution logic address conflict.
Following is the device embodiment of the application, can be used for performing the present processes embodiment.For the application's The details not disclosed in device embodiment, refer to the present processes embodiment.
Fig. 8 is a kind of block diagram of write request processing unit that embodiments herein is provided, the write request Processing unit can by the part for being implemented in combination with turning into write request processing equipment of hardware circuit or hardware and software or All.The write request processing unit can include:Write request transmitting element 801, refusal respond receives correspondence 802 and forwarding Unit 803.
Write request transmitting element 801, for performing and the same or similar step of above-mentioned steps 402.
Refusal respond receiving unit 802, for the same or similar step in the part in execution and above-mentioned steps 405.
Retransmission unit 803, for performing and the same or similar step of above-mentioned steps 406.
Fig. 9 is the block diagram of another write request processing unit that embodiments herein is provided, and the write-in please Ask processing unit can by hardware circuit or hardware and software be implemented in combination with turn into some or all of of storage device.Should Write request processing unit can include:Write request receiving unit 901, refusal respond transmitting element 902, treatment lock cell 903 indicate transmitting element 904 with locking.
Write request receiving unit 901, for execution and the same or similar step of above-mentioned steps 403, and for holding Row storage device receives write request.
Refusal respond transmitting element 902, for performing and above-mentioned steps 404 (including step 404a, 404b, 404c, 404d And 404e) same or similar step.
Treatment lock cell 903, for performing with above-mentioned steps 404, storage device processes target service is asked, and During treatment target service is asked, same or similar step the step of the logical address of lock onto target service request, or Person, for the same or similar step of above-mentioned steps 409 and 410.
Locking indicates transmitting element 904, for performing and the same or similar step of above-mentioned steps 411.
It should be noted that:The write request processing unit that above-described embodiment is provided in data storage, only with above-mentioned each The division of functional module is carried out for example, in practical application, as needed can distribute by different work(above-mentioned functions Can module complete, will the internal structure of equipment be divided into different functional modules, to complete whole described above or portion Divide function.In addition, the write request processing unit that above-described embodiment is provided belongs to the embodiment of the method for write request processing method In same design, it implements process and refers to embodiment of the method, repeats no more here.
Above-mentioned embodiments herein sequence number is for illustration only, and the quality of embodiment is not represented.
One of ordinary skill in the art will appreciate that realizing all or part of step of the above-described embodiment by computing device Can be completed by hardware, it is also possible to control the hardware of correlation to complete by instructing, described instruction can be stored in one Plant in computer-readable recording medium, computer-readable recording medium mentioned above can be read-only storage, disk or light Disk etc..
The above, a kind of specific embodiment that only the application can be realized, but the application protection domain not Be confined to this, any one skilled in the art in the technical scope that the application is disclosed, the change that can be readily occurred in Change or replace, should all cover within the protection domain of the application.Therefore, the protection domain of the application should be with claim Protection domain is defined.

Claims (27)

1. a kind of terminal, it is characterised in that described in for the storage system including the first data center and the second data center First data center includes the first storage device, and second data center includes the second storage device, in first data The heart and/or second data center also comprising the terminal at least two terminals, the terminal include processor and Communication interface, the communication interface is configured as being controlled by the processor,
The processor, for being sent out respectively to first storage device and second storage device by the communication interface Write request is sent, said write is asked for indicating first storage device and second storage device in respective storage Identical data is write in the same logical address in space;
The processor, for receiving the refusal respond that storage device is returned by the communication interface, the storage device is First storage device or second storage device, the refusal respond are used to indicate said write to ask corresponding patrolling The all or part of address collected in address has been locked or will be locked;
The processor, for forwarding said write to ask to second terminal by the communication interface so that described second eventually Distinguish to first storage device and second storage device after the locking of all or part of address is released from end Said write request is sent, the second terminal is triggering locking all or part of address at least two terminal Terminal.
2. terminal according to claim 1, it is characterised in that
The processor, is additionally operable to obtain the mark of the second terminal carried in the refusal respond, according to described second The mark of terminal, first write request is forwarded by the communication interface to the second terminal.
3. a kind of storage device, it is characterised in that in for the storage system including the first data center and the second data center, First data center includes the first storage device, and second data center includes the second storage device, first number At least two terminals are also included according to center and/or second data center, the equipment is first storage device and institute Any storage device in the second storage device is stated, the equipment includes processor and communication interface, and the communication interface is matched somebody with somebody It is set to and is controlled by the processor,
The processor, the write-in that the first terminal for being received by the communication interface at least two terminal is sent Request;
The processor, for when all or part of address in the corresponding logical address of said write request has been locked or is When will be locked, refusal respond be sent to the first terminal by the communication interface so that the first terminal is to second Terminal forwarding said write request, the second terminal is triggered described in locking whole or in part at least two terminal The terminal of location;
The processor, for receiving locking of the second terminal in all or part of address by the communication interface The said write request sent after being released from.
4. equipment according to claim 3, it is characterised in that sent to the first terminal by the communication interface During refusal respond, the processor specifically for,
Detect in the corresponding logical address of memory space of the storage device, whether the address being locked includes the whole Or partial address;
If testing result is the address being locked includes all or part of address, by the communication interface to The first terminal sends the refusal respond.
5. equipment according to claim 4, it is characterised in that sent to the first terminal by the communication interface During refusal respond, the processor is additionally operable to
If the address being locked does not include all or part of address, detect whether to receive the second terminal The target service request of transmission, the target service asks corresponding logical address and the said write corresponding logical address of request In include identical address;
If testing result is to receive the target service request, obtaining said write by the communication interface asks and institute State the priority of target service request;
When the priority of target service request is higher than the priority that said write is asked, by the communication interface to institute State first terminal and send the refusal respond.
6. equipment according to claim 5, it is characterised in that
The target service is asked for asking to ask to write data in corresponding logical address in the target service, and described Target service asks corresponding logical address to write data in including all or part of address;
Or,
The target service is asked for asking the data syn-chronization in the corresponding logical address of target service request to institute Another storage device in the first storage device and second storage device is stated, and the target service asks corresponding logic Address includes all or part of address.
7. equipment according to claim 5, it is characterised in that
The processor, is additionally operable to when the priority of target service request is higher than the priority that said write is asked, institute Target service request is stated, and during the target service request is processed, in the memory space of the locking storage device The logical address of the correspondence target service request.
8. according to any described equipment of claim 3 to 7, it is characterised in that
The processor, is additionally operable to send the target service request to corresponding backup storage device by the communication interface And configured information is locked, the locking configured information is used to indicate the backup storage device to be asked in the treatment target service During asking, the logical address of the correspondence target service request in the memory space of the backup storage device is locked.
9. according to any described equipment of claim 3 to 7, it is characterised in that
The processor, is additionally operable to return to the mark for including the second terminal to the first terminal by the communication interface The refusal respond known.
10. a kind of write request processing unit, it is characterised in that for depositing including the first data center and the second data center In storage system, first data center includes the first storage device, and second data center includes the second storage device, institute The first data center and/or second data center are stated also comprising at least two terminals, described device be applied to it is described at least In a terminal in two terminals, described device includes:
Write request transmitting element, please for sending write-in respectively to first storage device and second storage device Ask, said write is asked for indicating first storage device and second storage device in the phase of respective memory space With writing identical data in logical address;
Refusal respond receiving unit, the refusal respond for receiving storage device return, the storage device is described first to deposit Storage equipment or second storage device, during the refusal respond is used to indicating said write to ask corresponding logical address All or part of address has been locked or will be locked;
Retransmission unit, for being asked to second terminal forwarding said write so that the second terminal is in all or part After the locking of address is released from, said write is sent respectively to first storage device and second storage device and is asked, The second terminal is the terminal of triggering locking all or part of address at least two terminal.
11. devices according to claim 10, it is characterised in that
The retransmission unit, is additionally operable to obtain the mark of the second terminal carried in the refusal respond, according to described the The mark of two terminals, first write request is forwarded to the second terminal.
12. a kind of write request processing units, it is characterised in that for depositing including the first data center and the second data center In storage system, first data center includes the first storage device, and second data center includes the second storage device, institute The first data center and/or second data center are stated also comprising at least two terminals, described device is applied to described first In any storage device in storage device and second storage device, described device includes:
Write request receiving unit, the write request for receiving the transmission of the first terminal at least two terminal;
Refusal respond transmitting element, is locked for all or part of address in asking corresponding logical address when said write When determining or will be locked, refusal respond is sent to the first terminal so that the first terminal forwards institute to second terminal Write request is stated, the second terminal is the terminal of triggering locking all or part of address at least two terminal;
Said write request reception unit, is additionally operable to receive locking of the second terminal in all or part of address and is solved The said write request sent after removing.
13. devices according to claim 12, it is characterised in that the refusal respond transmitting element, specifically for
Detect in the corresponding logical address of memory space of the storage device, whether the address being locked includes the whole Or partial address;
If testing result is the address being locked includes all or part of address, sent to the first terminal The refusal respond.
14. devices according to claim 13, it is characterised in that the refusal respond transmitting element, are additionally operable to
If testing result is the address being locked does not include all or part of address, detect whether to receive institute The target service request of second terminal transmission is stated, the target service asks corresponding logical address corresponding with said write request Logical address in include identical address;
If testing result obtains said write request with target service request to receive the target service request Priority;
When the priority of target service request is higher than the priority that said write is asked, institute is sent to the first terminal State refusal respond.
15. devices according to claim 14, it is characterised in that
The target service is asked for asking to ask to write data in corresponding logical address in the target service, and described Target service asks corresponding logical address to write data in including all or part of address;
Or,
The target service is asked for asking the data syn-chronization in the corresponding logical address of target service request to institute Another storage device in the first storage device and second storage device is stated, and the target service asks corresponding logic Address includes all or part of address.
16. devices according to claim 14, it is characterised in that described device also includes:
Treatment lock cell, for when the priority that the target service is asked is higher than the priority that said write is asked, locating The target service request is managed, and during the target service request is processed, the storage for locking the storage device is empty Between the target service request of middle correspondence logical address.
17. according to any described device of claim 12 to 16, it is characterised in that described device also includes:
Locking indicates transmitting element, is indicated for sending the target service request and locking to corresponding backup storage device Information, the locking configured information is used to indicating the backup storage device processing during the target service asks, Lock the logical address of the correspondence target service request in the memory space of the backup storage device.
18. according to any described device of claim 12 to 16, it is characterised in that
The refusal respond transmitting element, includes described in the mark of the second terminal for being returned to the first terminal Refusal respond.
19. a kind of write request processing methods, it is characterised in that for depositing including the first data center and the second data center In storage system, first data center includes the first storage device, and second data center includes the second storage device, institute The first data center and/or second data center are stated also comprising at least two terminals, methods described is by described at least two First terminal in terminal is performed, and methods described includes:
The first terminal sends write request, said write respectively to first storage device and second storage device Ask for indicating first storage device and second storage device in the same logical address of respective memory space Middle write-in identical data;
The first terminal receives the refusal respond that storage device is returned, the storage device be first storage device or Second storage device, all or part that the refusal respond is used in indicating said write to ask corresponding logical address Address has been locked or will be locked;
The first terminal to second terminal forwarding said write ask so that the second terminal it is described whole or in part After the locking of location is released from, said write is sent respectively to first storage device and second storage device and is asked, institute State the terminal that second terminal is triggering locking all or part of address at least two terminal.
20. methods according to claim 19, it is characterised in that the first terminal is described to second terminal forwarding First write request, including:
The first terminal obtains the mark of the second terminal carried in the refusal respond;
The first terminal forwards first write request according to the mark of the second terminal to the second terminal.
21. a kind of write request processing methods, it is characterised in that for depositing including the first data center and the second data center In storage system, first data center includes the first storage device, and second data center includes the second storage device, institute The first data center and/or second data center are stated also comprising at least two terminals, methods described is stored by described first Any storage device in equipment and second storage device is performed, and methods described includes:
The storage device receives the write request that the first terminal at least two terminal sends;
It is described when said write asks all or part of address in corresponding logical address to be locked or will be locked Storage device sends refusal respond to the first terminal so that the first terminal please to second terminal forwarding said write Ask, the second terminal is the terminal of triggering locking all or part of address at least two terminal;
Described in the storage device reception second terminal sends after the locking of all or part of address is released from Write request.
22. methods according to claim 21, it is characterised in that complete in said write asks corresponding logical address When portion or partial address have been locked or will be locked, the storage device sends refusal respond, bag to the first terminal Include:
The storage device detects in the corresponding logical address of memory space of the storage device that whether is the address being locked Comprising all or part of address;
If testing result is the address being locked includes all or part of address, the storage device is to described First terminal sends the refusal respond.
23. methods according to claim 22, it is characterised in that complete in said write asks corresponding logical address When portion or partial address have been locked or will be locked, the storage device sends refusal respond to the first terminal, also Including:
If testing result is the address being locked not comprising all or part of address, the storage device detection Whether receive the target service request that the second terminal sends, the target service ask corresponding logical address with it is described Identical address is included in the corresponding logical address of write request;
If testing result is to receive the target service request, the storage device obtains said write request and the mesh Mark the priority of service request;
When target service request priority higher than said write request priority when, the storage device is to described the One terminal sends the refusal respond.
24. methods according to claim 23, it is characterised in that
The target service is asked for asking to ask to write data in corresponding logical address in the target service, and described Target service asks corresponding logical address to include all or part of address;
Or,
The target service is asked for asking the data syn-chronization in the corresponding logical address of target service request to institute Another storage device in the first storage device and second storage device is stated, and the target service asks corresponding logic Address includes all or part of address.
25. methods according to claim 23, it is characterised in that methods described also includes:
When the priority of target service request is higher than the priority that said write is asked, described in the storage device processes Target service is asked, and during the target service request is processed, it is right in the memory space of the locking storage device Answer the logical address of the target service request.
26. according to any described method of claim 21 to 25, it is characterised in that methods described also includes:
The storage device sends the target service request and locking configured information to corresponding backup storage device, described Locking configured information is used to indicate the backup storage device during the target service request is processed, and locks described standby The logical address of the correspondence target service request in the memory space of part storage device.
27. according to any described method of claim 21 to 25, it is characterised in that the storage device is to the first terminal Refusal respond is sent, including:
The storage device returns to the refusal respond of the mark for including the second terminal to the first terminal.
CN201611155528.1A 2016-12-14 2016-12-14 Write request processing method, device and equipment Active CN106843749B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611155528.1A CN106843749B (en) 2016-12-14 2016-12-14 Write request processing method, device and equipment
PCT/CN2017/096052 WO2018107772A1 (en) 2016-12-14 2017-08-04 Method, device and apparatus for processing write request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611155528.1A CN106843749B (en) 2016-12-14 2016-12-14 Write request processing method, device and equipment

Publications (2)

Publication Number Publication Date
CN106843749A true CN106843749A (en) 2017-06-13
CN106843749B CN106843749B (en) 2020-01-21

Family

ID=59139496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611155528.1A Active CN106843749B (en) 2016-12-14 2016-12-14 Write request processing method, device and equipment

Country Status (2)

Country Link
CN (1) CN106843749B (en)
WO (1) WO2018107772A1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329701A (en) * 2017-06-29 2017-11-07 郑州云海信息技术有限公司 Creation method, the apparatus and system of dual-active volume in a kind of storage system
CN107329698A (en) * 2017-06-29 2017-11-07 杭州宏杉科技股份有限公司 A kind of data guard method and storage device
CN107643961A (en) * 2017-09-26 2018-01-30 郑州云海信息技术有限公司 Common volume turns method of data synchronization, system, device and the storage medium of mirrored volume
WO2018107772A1 (en) * 2016-12-14 2018-06-21 华为技术有限公司 Method, device and apparatus for processing write request
CN109240601A (en) * 2018-07-24 2019-01-18 中国建设银行股份有限公司 Memory space processing method, equipment and the storage medium of cloud storage
CN109842685A (en) * 2019-02-14 2019-06-04 视联动力信息技术股份有限公司 A kind of method of data synchronization and device
CN109918208A (en) * 2019-02-28 2019-06-21 新华三技术有限公司成都分公司 A kind of I/O operation processing method and processing device
CN109976672A (en) * 2019-03-22 2019-07-05 深信服科技股份有限公司 A kind of read/write conflict optimization method, device, electronic equipment and readable storage medium storing program for executing
CN110209641A (en) * 2018-02-12 2019-09-06 杭州宏杉科技股份有限公司 A kind of trunking service processing method and device applied in more controlled storage systems
CN110519313A (en) * 2018-05-21 2019-11-29 视联动力信息技术股份有限公司 A kind of resource synchronization method and device based on view networking
CN110519312A (en) * 2018-05-21 2019-11-29 视联动力信息技术股份有限公司 A kind of resource synchronization method and device based on view networking
CN113268483A (en) * 2021-05-24 2021-08-17 北京金山云网络技术有限公司 Request processing method and device, electronic equipment and storage medium
WO2021175221A1 (en) * 2020-03-06 2021-09-10 华为技术有限公司 Data processing method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084200A (en) * 2020-08-24 2020-12-15 中国银联股份有限公司 Data read-write processing method, data center, disaster recovery system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103245A1 (en) * 2002-11-21 2004-05-27 Hitachi Global Storage Technologies Nertherlands B.V. Data storage apparatus and method for managing buffer memory
CN102971732A (en) * 2010-07-02 2013-03-13 华为技术有限公司 System architecture for integrated hierarchical query processing for key/value stores
CN103827843A (en) * 2013-11-28 2014-05-28 华为技术有限公司 Method, device, and system for writing data
CN105068771A (en) * 2015-09-17 2015-11-18 浪潮(北京)电子信息产业有限公司 Unified storage method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101562761B (en) * 2009-05-18 2012-02-01 杭州华三通信技术有限公司 Method and system for backup storage in optical network
US20130007368A1 (en) * 2011-06-29 2013-01-03 Lsi Corporation Methods and systems for improved miorroring of data between storage controllers using bidirectional communications
KR102116702B1 (en) * 2013-09-27 2020-05-29 삼성전자 주식회사 Apparatus and method for data mirroring control
CN106843749B (en) * 2016-12-14 2020-01-21 华为技术有限公司 Write request processing method, device and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103245A1 (en) * 2002-11-21 2004-05-27 Hitachi Global Storage Technologies Nertherlands B.V. Data storage apparatus and method for managing buffer memory
CN102971732A (en) * 2010-07-02 2013-03-13 华为技术有限公司 System architecture for integrated hierarchical query processing for key/value stores
CN103827843A (en) * 2013-11-28 2014-05-28 华为技术有限公司 Method, device, and system for writing data
CN105068771A (en) * 2015-09-17 2015-11-18 浪潮(北京)电子信息产业有限公司 Unified storage method and system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018107772A1 (en) * 2016-12-14 2018-06-21 华为技术有限公司 Method, device and apparatus for processing write request
CN107329698A (en) * 2017-06-29 2017-11-07 杭州宏杉科技股份有限公司 A kind of data guard method and storage device
CN107329701A (en) * 2017-06-29 2017-11-07 郑州云海信息技术有限公司 Creation method, the apparatus and system of dual-active volume in a kind of storage system
CN107329698B (en) * 2017-06-29 2020-08-11 杭州宏杉科技股份有限公司 Data protection method and storage device
CN107643961A (en) * 2017-09-26 2018-01-30 郑州云海信息技术有限公司 Common volume turns method of data synchronization, system, device and the storage medium of mirrored volume
CN110209641A (en) * 2018-02-12 2019-09-06 杭州宏杉科技股份有限公司 A kind of trunking service processing method and device applied in more controlled storage systems
CN110519312A (en) * 2018-05-21 2019-11-29 视联动力信息技术股份有限公司 A kind of resource synchronization method and device based on view networking
CN110519313A (en) * 2018-05-21 2019-11-29 视联动力信息技术股份有限公司 A kind of resource synchronization method and device based on view networking
CN109240601A (en) * 2018-07-24 2019-01-18 中国建设银行股份有限公司 Memory space processing method, equipment and the storage medium of cloud storage
CN109240601B (en) * 2018-07-24 2021-08-27 中国建设银行股份有限公司 Storage space processing method and device for cloud storage and storage medium
CN109842685A (en) * 2019-02-14 2019-06-04 视联动力信息技术股份有限公司 A kind of method of data synchronization and device
CN109918208A (en) * 2019-02-28 2019-06-21 新华三技术有限公司成都分公司 A kind of I/O operation processing method and processing device
CN109976672A (en) * 2019-03-22 2019-07-05 深信服科技股份有限公司 A kind of read/write conflict optimization method, device, electronic equipment and readable storage medium storing program for executing
CN109976672B (en) * 2019-03-22 2022-02-22 深信服科技股份有限公司 Read-write conflict optimization method and device, electronic equipment and readable storage medium
WO2021175221A1 (en) * 2020-03-06 2021-09-10 华为技术有限公司 Data processing method and device
EP4102349A4 (en) * 2020-03-06 2023-07-19 Huawei Technologies Co., Ltd. Data processing method and device
US11960720B2 (en) 2020-03-06 2024-04-16 Huawei Technologies Co., Ltd. Data processing method and device
CN113268483A (en) * 2021-05-24 2021-08-17 北京金山云网络技术有限公司 Request processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2018107772A1 (en) 2018-06-21
CN106843749B (en) 2020-01-21

Similar Documents

Publication Publication Date Title
CN106843749A (en) Write request processing method, device and equipment
CN109951331B (en) Method, device and computing cluster for sending information
US20180013856A1 (en) Automatic data request recovery after session failure
US9984140B1 (en) Lease based leader election system
CN110807064B (en) Data recovery device in RAC distributed database cluster system
EP2877942B1 (en) Automatic transaction retry after session failure
CN105426275B (en) The method and device of disaster tolerance in dual-active group system
US20200272620A1 (en) Transaction processing at non-relational databases
US9189348B2 (en) High availability database management system and database management method using same
WO2020134199A1 (en) Method and apparatus for implementing data consistency, and server and terminal
JP2008225753A (en) Computer system, access control method and management computer
WO2020232859A1 (en) Distributed storage system, data writing method, device, and storage medium
WO2012171349A1 (en) Method, apparatus and system for implementing distributed auto-incrementing counting
CN108833164B (en) Server control method, device, electronic equipment and storage medium
JP2006012004A (en) Hot standby system
US11281446B2 (en) Updating method, terminal and electronic device
US11281550B2 (en) Disaster recovery specific configurations, management, and application
WO2018157605A1 (en) Message transmission method and device in cluster file system
EP3896571B1 (en) Data backup method, apparatus and system
CN110096237A (en) Replica processes method and node, storage system, server, readable medium
CN111737063B (en) Disk lock arbitration method, device, equipment and medium for double-control brain fracture
US11669516B2 (en) Fault tolerance for transaction mirroring
US11669501B2 (en) Address mirroring of a file system journal
CN110309224A (en) A kind of data copy method and device
US20220035772A1 (en) System and method for mirroring a file system journal

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