CN107329698B - Data protection method and storage device - Google Patents

Data protection method and storage device Download PDF

Info

Publication number
CN107329698B
CN107329698B CN201710512447.0A CN201710512447A CN107329698B CN 107329698 B CN107329698 B CN 107329698B CN 201710512447 A CN201710512447 A CN 201710512447A CN 107329698 B CN107329698 B CN 107329698B
Authority
CN
China
Prior art keywords
storage unit
lun
lun storage
temporary
request
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.)
Active
Application number
CN201710512447.0A
Other languages
Chinese (zh)
Other versions
CN107329698A (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.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan 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 Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN201710512447.0A priority Critical patent/CN107329698B/en
Publication of CN107329698A publication Critical patent/CN107329698A/en
Application granted granted Critical
Publication of CN107329698B publication Critical patent/CN107329698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Abstract

The application provides a data protection method and a storage device, the method is applied to a slave LUN storage unit in a double-active storage system, the slave LUN storage unit is preconfigured as a Thin-LUN storage unit, after the double-active storage system receives a write IO request, a master LUN storage unit in the double-active storage system processes the write IO request, and the master LUN storage unit does not synchronize data in the write IO request to the slave LUN storage unit, the method comprises the following steps: when the main LUN storage unit or the storage equipment where the main LUN storage unit is located fails, the main LUN storage unit is converted into a temporary main LUN storage unit, and an automatic capacity expansion mechanism is started; when a write IO request is received, writing data carried in the write IO request into a local area, and not executing data synchronization; when the fault is recovered, the data synchronization between the LUN storage unit and the main LUN storage unit which is converted into the temporary slave LUN storage unit is triggered, and after the synchronization is completed, the storage space occupied by the LUN storage unit is released, so that the data protection is realized.

Description

Data protection method and storage device
Technical Field
The application relates to the field of computer communication, in particular to a double-active storage technology.
Background art a live-active storage technique is a data protection technique that may generally include a master LUN storage unit and a slave LUN storage unit in a live-active storage system. The master LUN storage unit and the slave LUN storage unit may be allocated to an application server, and the master LUN storage unit and the slave LUN storage unit are identified as the same LUN storage unit for the application server.
After receiving a write IO request issued by an application server, a master LUN storage unit in the dual active storage system may process the write IO request, write data carried in the write IO request into the master LUN storage unit, and synchronize the written data to a slave LUN storage unit.
When a main LUN storage unit fails or its storage device fails, how to continue IO request processing and data protection problems such as restoring data after the main LUN storage unit or its storage device returns to normal become problems to be solved urgently. In addition, the same data needs to be stored in two parts in the double-active storage system, so that the requirement on storage space is greatly increased, the quantity of hard disks, the loss of a disk cabinet and the like are increased, and meanwhile, the complexity of hardware maintenance is increased.
Disclosure of Invention
In view of this, the present application provides a data protection method and a storage device, so as to implement data protection by investing lower hardware cost.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, a data protection method is provided, which is applied to a slave logical unit number LUN storage unit in a dual active storage system, the dual active storage system further including a master LUN storage unit; after the double-active storage system receives the write IO request, a main LUN storage unit in the double-active storage system processes the write IO request, and the main LUN storage unit does not synchronize data in the write IO request to the slave LUN storage unit; the slave LUN storage unit is preconfigured as a Thin logical unit number Thin-LUN storage unit; the method comprises the following steps:
when the main LUN storage unit fails or the storage equipment where the main LUN storage unit is located fails, the main LUN storage unit is converted into a temporary main LUN storage unit, and an automatic capacity expansion mechanism is started;
when a write IO request is received, writing data carried in the write IO request into the LUN storage unit, and not executing data synchronization;
when the fault is recovered, triggering the data synchronization between the LUN storage unit and the main LUN storage unit which is converted into the temporary slave LUN storage unit, releasing the storage space occupied by the LUN storage unit after the synchronization is completed, converting the temporary master LUN storage unit into the slave LUN storage unit, and informing that the temporary slave LUN storage unit is converted into the main LUN storage unit.
According to a second aspect of the present application, a storage device is characterized in that the storage device comprises a processor and a storage medium, the processor calls machine executable instructions corresponding to data protection logic stored on the storage medium, and the processor is caused to execute the above data protection method.
The application provides a data protection method which can be applied to a double-active storage system. When a write IO request issued by an application server is received, a master LUN storage unit in the dual active storage system processes the write IO request, and data carried in the write IO request is not synchronized to a slave LUN storage unit.
The slave LUN storage unit in the double-active storage system is configured as a Thin-LUN storage unit, when the main LUN storage unit fails or the storage equipment where the main LUN storage unit is located fails, the slave LUN storage unit can be converted into a temporary main LUN storage unit, and an automatic capacity expansion mechanism is started. When a write IO request is received, the temporary main LUN storage unit can write the data carried in the write IO request into the LUN storage unit, and data synchronization is not executed; when the fault is recovered, the temporary main LUN storage unit can trigger the data synchronization between the main LUN storage unit and the main LUN storage unit which is converted into the temporary slave LUN storage unit, and after the data synchronization is completed, the storage space occupied by the main LUN storage unit is released, the main LUN storage unit is converted into the slave LUN storage unit from the temporary main LUN storage unit, and the temporary slave LUN storage unit is informed to be converted into the main LUN storage unit.
On one hand, when the main LUN storage unit or the storage device where the main LUN storage unit is located is normal, only one copy of data carried by the write IO request is stored in the active-active storage system, and in the process of synchronizing the data after the failure recovery of the main LUN storage unit or the storage device where the main LUN storage unit is located, the active-active storage system only stores two copies of data carried by the write IO request.
On the other hand, the slave LUN storage unit is configured as a Thin-LUN storage unit, and after the slave LUN storage unit becomes a temporary master LUN storage unit, an automatic capacity expansion mechanism may be started, and the storage capacity is expanded by applying for the storage space as needed, and after the temporary master LUN storage unit synchronizes the data written in the process from the failure of the master LUN storage unit or the storage device where the master LUN storage unit is located to the failure recovery to the temporary slave LUN storage unit, the occupied storage space of the temporary master LUN storage unit may be released. By adopting the mechanism, the requirement of the LUN storage unit on the storage space can be reduced as much as possible, the waste of the storage space is reduced, the utilization rate of the storage space is improved, and the data to be synchronized can be quickly found when the data is synchronized to the temporary slave LUN storage unit, so that the data synchronization efficiency is improved.
In the third aspect, for the IO read request, as long as the temporary slave LUN storage unit can be accessed, data can be read in real time, so that the problem that the space on the temporary master LUN storage unit where no data is written cannot be read, and data can only be read after the master LUN storage unit or the storage device where the master LUN storage unit is located recovers and data synchronization is completed is solved.
Drawings
FIG. 1 is a schematic diagram of a dual active storage system shown in an exemplary embodiment of the present application;
FIG. 2 is a flow chart illustrating a method of data protection according to an exemplary embodiment of the present application;
fig. 3 is a hardware structure diagram of a storage device in which a data protection apparatus is located according to an exemplary embodiment of the present application;
fig. 4 is a block diagram of a data protection device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Referring to FIG. 1, FIG. 1 is a schematic diagram of a dual active storage system in accordance with an exemplary embodiment of the present application.
A primary LUN storage unit and a secondary LUN storage unit may be included in the dual active storage system generally. The master LUN storage unit and the slave LUN storage unit may be respectively configured on different storage devices. The master LUN storage unit and the slave LUN storage unit may be allocated to an application server, and the master LUN storage unit and the slave LUN storage unit are identified as the same LUN storage unit for the application server.
After receiving a write IO request issued by an application server, a master LUN storage unit in the dual active storage system may process the write IO request, write data carried in the write IO request into the master LUN storage unit, and synchronize the written data to a slave LUN storage unit.
When the main LUN storage unit fails or the storage device where the main LUN storage unit is located fails, the slave LUN storage unit may continue to perform IO request processing, and after the main LUN storage unit is recovered to be normal or the storage device where the main LUN storage unit is located is recovered to be normal, the data stored in the slave LUN storage unit may be used to recover the data of the main LUN storage unit.
However, in the dual active storage system, the same data needs to be stored in two parts, which greatly increases the requirement for storage space, increases the number of hard disks, increases the loss of the disk cabinets, and the like. While increasing hardware cost, the complexity of hardware maintenance is also greatly increased. In addition, each write IO requires simultaneous writing to the master LUN storage unit and the slave LUN storage unit, and the response time of the write IO is determined by the slow one.
In view of the above, the present application provides a data protection method, which can be applied to a dual active storage system.
When a write IO request issued by an application server is received, a master LUN storage unit in the dual active storage system processes the write IO request, and data carried in the write IO request is not synchronized to a slave LUN storage unit.
The slave LUN storage unit in the double-active storage system is configured as a Thin-LUN storage unit, when the main LUN storage unit fails or the storage equipment where the main LUN storage unit is located fails, the slave LUN storage unit can be converted into a temporary main LUN storage unit, and an automatic capacity expansion mechanism is started. When a write IO request is received, the temporary main LUN storage unit can write the data carried in the write IO request into the LUN storage unit, and data synchronization is not executed; when the fault is recovered, the temporary main LUN storage unit can trigger the data synchronization between the main LUN storage unit and the main LUN storage unit which is converted into the temporary slave LUN storage unit, and after the data synchronization is completed, the storage space occupied by the main LUN storage unit is released, the main LUN storage unit is converted into the slave LUN storage unit from the temporary main LUN storage unit, and the temporary slave LUN storage unit is informed to be converted into the main LUN storage unit.
On one hand, when the main LUN storage unit or the storage device where the main LUN storage unit is located is normal, only one copy of data carried by the write IO request is stored in the active-active storage system, and in the process of synchronizing the data after the failure recovery of the main LUN storage unit or the storage device where the main LUN storage unit is located, the active-active storage system only stores two copies of data carried by the write IO request.
On the other hand, the slave LUN storage unit is configured as a Thin-LUN storage unit, and after the slave LUN storage unit is changed into a temporary master LUN storage unit, an automatic capacity expansion mechanism may be started, and the storage capacity is expanded by applying for a storage space as needed, and after the temporary master LUN storage unit synchronizes data written in the process from failure to failure recovery of the master LUN storage unit or the storage device where the master LUN storage unit is located to the temporary slave LUN storage unit, the occupied storage space of the temporary master LUN storage unit may be released. By adopting the mechanism, the requirement of the LUN storage unit on the storage space can be reduced as much as possible, the waste of the storage space is reduced, the utilization rate of the storage space is improved, and the data to be synchronized can be quickly found when the data is synchronized to the temporary slave LUN storage unit, so that the data synchronization efficiency is improved.
Fig. 2 is a flow chart illustrating a data protection method according to an exemplary embodiment of the present application. The method is applicable to a slave LUN storage unit in a dual active storage system, the dual active storage system further comprises a master LUN storage unit; after the double-active storage system receives the write IO request, a main LUN storage unit in the double-active storage system processes the write IO request, and the main LUN storage unit does not synchronize data in the write IO request to the slave LUN storage unit; the slave LUN-storage unit is preconfigured as a Thin-LUN-storage unit. The method may include steps 201 through 203.
Step 201: and when the main LUN storage unit fails or the storage equipment where the main LUN storage unit is located fails, the auxiliary LUN storage unit converts the main LUN storage unit into a temporary main LUN storage unit and starts an automatic capacity expansion mechanism.
The main LUN storage unit may be a LUN role of a dual active storage system in a normal state. And when the main LUN storage unit receives the write IO request, performing write processing on the write IO request. And after receiving the write IO request from the LUN storage unit, forwarding the write IO request to the main LUN storage unit, and processing the write IO request by the main LUN storage unit. Unlike the related art, after the write IO request processing is completed, the master LUN storage unit does not synchronize data in the write IO request to the slave LUN storage unit.
The slave LUN storage unit may be a LUN role of the dual active storage system in a normal state. The slave LUN storage unit does not process the IO request. And after receiving the IO request from the LUN storage unit, forwarding the IO request to the main LUN storage unit, and processing the IO request by the main LUN storage unit. Unlike the related art, since the master LUN storage unit does not synchronize data carried by the write IO request to the slave LUN storage unit, the slave LUN storage unit does not store the data carried by the corresponding write IO request.
In the data protection method provided by the application, the slave LUN storage unit is configured as a Thin-LUN storage unit in advance, and the storage space can be allocated according to the allocation mechanism of the storage space of the Thin-LUN storage unit. Moreover, when the dual active storage system works normally, the LUN storage unit does not store any data carried by the write IO request, so the initial capacity of the LUN storage unit may be small, and the automatic capacity expansion mechanism is closed. The optimal state is that the initial capacity of the slave LUN storage unit may be zero.
The temporary main LUN storage unit may be a LUN role in a dual active storage system in an abnormal state, for example, when a main LUN storage unit or a storage device thereof fails, the main LUN storage unit is converted into a temporary main LUN storage unit, and the temporary main LUN storage unit is temporarily replaced for performing a service process.
The temporary main LUN storage unit may process an IO request issued by an application server. And the temporary main LUN storage unit corresponds to a data synchronization identifier, and the temporary main LUN storage unit can determine whether to synchronize the written data according to the data synchronization identifier. For example, when the data sync is identified as 0, the temporary master LUN storage unit may not synchronize the written data to the temporary slave LUN storage unit, and when the data sync is identified as 1, the temporary master LUN storage unit may synchronize the written data to the temporary slave LUN storage unit.
The temporary slave LUN storage unit may generally be a LUN role in the dual active storage system in the abnormal state, and corresponds to the temporary master LUN storage unit. After receiving the IO request issued by the application server, the temporary slave LUN storage unit does not perform IO request processing, and the temporary slave LUN storage unit can forward the IO request to the temporary master LUN storage unit, and the temporary master LUN storage unit performs IO request processing.
It should be noted that, in this embodiment of the present application, when the dual active storage system works normally, the primary LUN storage unit in the dual active storage system processes the write IO request issued by the application server, and does not synchronize data carried in the write IO request to the secondary LUN storage unit. In other words, in this case, the data carried in the write IO request is single-ended written.
When the main LUN storage unit in the double-active storage system fails or the storage device where the main LUN storage unit is located fails, the auxiliary LUN storage unit can be changed into a temporary main LUN storage unit, the temporary main LUN storage unit processes a write IO request issued by the application server, and data carried by the write IO request is not synchronized to an opposite terminal. In other words, in this case, the data carried in the write IO request is also single-ended written.
When the main LUN storage unit or the storage device where the main LUN storage unit is located recovers due to a fault, the main LUN storage unit can be converted into a temporary slave LUN storage unit, after the fault is recovered until the temporary main LUN storage unit executes data synchronization to the temporary slave LUN storage unit, a write IO request issued by an application server is processed by the temporary main LUN storage unit, and the main LUN storage unit can synchronize data locally written in the fault to the temporary slave LUN storage unit and also synchronize data carried in the write IO request to the temporary slave LUN storage unit. In other words, in this case, the data carried in the write IO request is double-ended written.
In this embodiment of the present application, in a normal state of the dual active storage system, after the dual active storage system receives a write IO request issued by an application server, a master LUN storage unit in the dual active storage system processes the write IO request, and does not synchronize data carried in the write IO request to a slave LUN storage unit.
For example, after the primary LUN storage unit receives the write IO request, the primary LUN storage unit may write the data carried in the write IO request into the local, and not synchronize the data carried in the write IO request to the secondary LUN storage unit. And then returning a response message for successful writing of the write IO request to the application server.
After receiving the write IO request from the LUN storage unit, the write IO request may be forwarded to the primary LUN storage unit, and after the primary LUN storage unit writes the data carried in the write IO request into a local, the data carried in the write IO request is not written into the secondary LUN storage unit. The master LUN storage unit may return a response message to the slave LUN storage unit that the write IO request is successfully written to, the response message being returned by the slave LUN storage unit to the application server.
In this embodiment of the present application, when the primary LUN storage unit fails or the storage device where the primary LUN storage unit is located fails, the slave LUN in the dual active storage system may convert its role into a temporary primary LUN storage unit.
In an alternative implementation, for a scenario of a primary LUN storage unit failure: in general, a master LUN storage unit and a slave LUN storage unit in a dual active storage system may record a device identifier and a LUN identifier of a storage device where the other storage device is located. When the main LUN storage unit fails, the main LUN storage unit may send a notification instruction of role switching to the slave LUN storage unit according to the recorded device identifier and LUN identifier of the device where the slave LUN storage unit is located.
The slave LUN storage unit can convert the own LUN storage unit into the temporary master LUN storage unit upon receiving the notification instruction of the role conversion.
In another alternative implementation, for a scenario where the storage device in which the primary LUN storage unit is located fails: generally, a heartbeat message can be sent between the storage device where the main LUN storage unit is located and the storage device where the slave LUN storage unit is located to detect the operating state of the opposite storage device. When the storage device where the slave LUN storage unit is located detects a failure of the storage device where the master LUN storage unit is located through the heartbeat message, the storage device where the slave LUN storage unit is located may send a notification instruction of role switching to the slave LUN storage unit. The slave LUN storage unit can convert the own LUN storage unit into the temporary master LUN storage unit upon receiving the notification instruction of the role conversion.
For the purpose of converting the LUN storage unit from the LUN storage unit to the temporary main LUN storage unit, the role identification bits of the LUN storage unit can be configured in advance by developers. For example, a developer may set different values of the role identification bits for the primary LUN storage unit, the secondary LUN storage unit, the temporary primary LUN storage unit, and the temporary secondary LUN storage unit, respectively. When the slave LUN storage unit converts the local LUN storage unit into the temporary master LUN storage unit, the slave LUN storage unit can change the value of the corresponding role identification bit to the value of the corresponding role identification bit of the temporary master LUN storage unit.
Assume that the value of the role identification bit corresponding to the main LUN storage unit is 1, the value of the role identification bit corresponding to the slave LUN storage unit is 2, the value of the identification bit corresponding to the temporary main LUN storage unit is 3, and the value of the identification bit corresponding to the temporary slave LUN storage unit is 4.
When role conversion from the LUN storage unit to the temporary main LUN storage unit is performed, the slave LUN storage unit may change the value of the role identifier corresponding to the slave LUN storage unit to the value of the role identifier corresponding to the temporary main LUN storage unit, for example, the slave LUN storage unit may change the value of the role identifier from 2 to 3.
In this embodiment of the present application, after the slave LUN storage unit converts the current LUN storage unit into the temporary master LUN storage unit, the slave LUN storage unit may start the auto-expansion mechanism.
It should be noted that, according to the data protection method provided by the present application, the master LUN storage unit does not synchronize the written data with the slave LUN storage unit, so that the slave LUN storage unit is configured as a Thin-LUN storage unit in advance to avoid waste of storage space and improve the utilization rate of storage space. The initial capacity of the slave LUN storage unit may be a very small capacity value close to 0, and the optimal choice is that the initial capacity of the slave LUN storage unit is 0. In order to avoid performing automatic volume expansion processing when the initial storage capacity of the Thin-LUN storage unit is 0, the automatic volume expansion mechanism of the slave LUN storage unit is in an off state before the slave LUN storage unit is not converted into the temporary master LUN storage unit. After the slave LUN storage unit is converted into the temporary main LUN storage unit, the slave LUN storage unit can start an automatic capacity expansion mechanism and apply for a larger storage space at any time according to the written data volume.
The initial capacity previously allocated from the LUN storage unit may be set by a developer according to actual circumstances, and is not specifically limited herein.
Step 202: when receiving a write IO request, the temporary master LUN storage unit (original slave LUN storage unit) writes data carried in the write IO request into the LUN storage unit, and does not perform data synchronization.
In this embodiment of the present application, when the temporary main LUN storage unit (the slave LUN storage unit before role switching) receives a write IO request, data carried in the write IO request may be written into the temporary main LUN storage unit, and data synchronization is not performed.
In addition, the temporary main LUN storage unit can perform capacity expansion according to a capacity expansion mechanism of the Thin-LUN storage unit when the remaining capacity of the storage space of the temporary main LUN storage unit is less than or equal to a capacity expansion threshold, so that the purpose of applying for the storage space in real time and on demand is achieved.
Step 203: when the fault is recovered, the temporary main LUN storage unit (original slave LUN storage unit) can trigger the data synchronization between the main LUN storage unit and the main LUN storage unit which is converted into the temporary slave LUN storage unit, and after the synchronization is completed, the storage space occupied by the LUN storage unit is released, the temporary main LUN storage unit is converted into the slave LUN storage unit, and the temporary slave LUN storage unit is informed to be converted into the main LUN storage unit.
In the embodiment of the present application, at the time of failure recovery, the temporary master LUN storage unit (slave LUN storage unit before conversion) may trigger data synchronization between the own LUN storage unit and the master LUN storage unit converted into the temporary slave LUN storage unit.
In an alternative implementation, for a scenario of a primary LUN storage unit failure: the slave LUN storage unit may send a role switching notification to the master LUN storage unit after being switched to the temporary master LUN storage unit, and the master LUN storage unit may switch the master LUN storage unit to the temporary slave LUN storage unit after receiving the role switching notification.
After the main LUN storage unit is converted into the temporary slave LUN storage unit, if the temporary slave LUN storage unit receives a write IO request issued by the application server (for example, if a partial area access failure of the temporary slave LUN occurs, the temporary slave LUN storage unit may receive the write IO request issued by the application server), the write IO request may be forwarded to the temporary main LUN storage unit. The temporary main LUN storage unit may write the data carried by the write IO request to the local, and does not perform data synchronization. Then, the temporary master LUN storage unit returns the execution result of the write IO request to the temporary slave LUN storage unit, and the temporary slave LUN storage unit returns the execution result to the front-end application server.
In the embodiment of the present application, when the temporary slave LUN storage unit (the master LUN storage unit before the conversion) detects self failure recovery, a synchronization instruction may be sent to the temporary master LUN storage unit (the slave LUN storage unit before the conversion), and when the temporary master LUN storage unit receives the data synchronization instruction, the data stored in the temporary master LUN storage unit may be synchronized to the temporary slave LUN storage unit.
In another alternative implementation, for a scenario where the storage device in which the primary LUN storage unit is located fails: when the storage device where the temporary master LUN storage unit (slave LUN storage unit before conversion) is located detects that the storage device where the master LUN is located recovers from a failure, a role negotiation notification may be sent to the master LUN storage unit, and a negotiation rule is used with the master LUN storage unit to perform a negotiation of a dual-active role, so that the master LUN storage unit is converted into the temporary slave LUN storage unit after the negotiation.
The main LUN storage unit can send a data synchronization instruction to the temporary main LUN storage unit after being converted into the temporary slave LUN storage unit, and the temporary main LUN storage unit can synchronize the data stored in the temporary main LUN storage unit to the temporary slave LUN storage unit after receiving the data synchronization instruction.
It should be noted that, the synchronizing the data stored in the temporary master LUN storage unit to the temporary slave LUN storage unit may include: after the main LUN storage unit or the storage equipment where the main LUN storage unit is located fails, the data written by the temporary main LUN storage unit is synchronized to the temporary slave LUN storage unit. Further comprising: when the main LUN storage unit is restored or the storage device where the main LUN storage unit is located is restored, the temporary main LUN storage unit writes data carried by the currently received write IO request (including the write IO request received from the application server and the write IO request forwarded from the temporary LUN storage unit) locally, and synchronizes to the temporary slave LUN storage unit. The negotiation rule may generally include that, when a primary LUN storage unit or a temporary primary LUN storage unit is already present in the dual active storage system, the newly added LUN storage unit may be a secondary LUN storage unit or a temporary secondary LUN storage unit. Of course, the negotiation rule may be set by the developer, as long as the main LUN storage unit is converted into the temporary slave LUN storage unit, which is only an exemplary illustration of the negotiation rule and is not specifically limited.
In the embodiment of the present application, data synchronization between the temporary master LUN storage unit and the temporary slave LUN storage unit can be implemented based on the data synchronization identifier.
In the implementation, the temporary main LUN storage unit corresponds to a data synchronization identifier. The value of the data synchronization identifier can be a first preset value and a second preset value. The first preset value indicates that the written data is not subjected to synchronous processing; the second preset value indicates that the written data is to be synchronized.
After the slave LUN storage unit converts the LUN storage unit into the temporary main LUN storage unit, the data synchronization identifier corresponding to the temporary main LUN storage unit may be modified to the first preset value, so that the temporary main LUN storage unit does not perform data synchronization after the data write-in of the write IO request is performed.
After the failure is recovered, when the temporary master LUN storage unit (the slave LUN storage unit before conversion) receives a data synchronization instruction of the temporary master LUN storage unit (the master LUN storage unit before conversion), the temporary master LUN storage unit may modify the data synchronization identifier corresponding to the temporary master LUN storage unit to a second preset value, so that the temporary master LUN storage unit may synchronize the written data to the temporary slave LUN storage unit.
In the embodiment of the present application, after the data synchronization is completed, the temporary main LUN storage unit may release the storage space occupied by the temporary main LUN storage unit, and simultaneously, the automatic capacity expansion mechanism is turned off. The temporary master LUN storage unit is convertible to a slave LUN storage unit and notifies the temporary slave LUN storage unit to be converted to the master LUN storage unit.
It should be noted that the temporary master LUN storage unit releases the storage space occupied by the temporary master LUN storage unit and the master LUN storage unit in the normal active-active storage state does not perform data synchronization to the slave LUN storage unit, so that the slave LUN storage unit in the normal active-active storage state is always in a state without data storage, and on one hand, the state can reduce the waste of the storage space and improve the utilization rate of the storage space; on the other hand, when data synchronization is performed after the next time the slave LUN storage unit is converted into the temporary main LUN storage unit, the data to be synchronized can be quickly found, and the data synchronization efficiency is improved.
In a related mechanism, the slave LUN storage unit is usually a standard LUN storage unit, and when the master LUN storage unit or the storage device where the master LUN storage unit is located fails, the slave LUN storage unit may receive data carried by the write IO request to be written into the slave LUN storage unit, where the data is to-be-synchronized data.
Data difference bitmaps are usually mapped from LUN storage units, and when data to be synchronized is written, the data is marked as the data to be synchronized. When data synchronization is performed, the data to be synchronized needs to be found from the LUN storage unit through the difference bitmap, and then data synchronization is performed.
In the method provided by the application, when the dual active storage system is in a normal state, the primary LUN storage unit does not synchronize data with the secondary LUN storage unit, and the storage space occupied by the primary LUN storage unit is released after the temporary primary LUN storage unit is converted into the secondary LUN storage unit, so that the secondary LUN storage unit is always in a state without data storage, and in this state, after the secondary LUN is converted into the temporary primary LUN storage unit, all written data are to-be-synchronized data, so the secondary LUN storage unit does not need to be configured with a difference bitmap. Therefore, when data synchronization is performed, the temporary main LUN storage unit can directly read locally written data for synchronization, so that on one hand, when write IO is processed by the slave LUN, the difference bitmap does not need to be updated any more, the software complexity is simplified, the write IO processing efficiency is improved, on the other hand, the synchronization processing flow is simplified, and the data synchronization efficiency is greatly improved.
In this embodiment of the present application, after a slave LUN storage unit is converted into a temporary master LUN storage unit, and the master LUN storage unit is converted into a temporary slave LUN storage unit, if a temporary master LUN storage unit (an original slave LUN storage unit) receives an IO read request, it may be determined whether a logical address mapping record corresponding to a logical address field carried in the IO read request exists in the LUN storage unit.
And if the temporary main LUN storage unit has a logical address mapping record corresponding to the logical address field carried by the read IO request, reading the data corresponding to the read IO request through the logical address mapping record, and returning the read data to the application server.
If the temporary main LUN storage unit does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, returning a read error prompt message to the application server; or forwarding the read IO request to a temporary slave LUN storage unit. And the temporary slave LUN storage unit can read the data corresponding to the read IO request and return the data to the temporary master LUN storage unit, or when the data cannot be read, return a read error prompt message to the temporary master LUN storage unit. And the temporary main LUN storage unit sends the data or the reading error prompting message returned from the temporary slave LUN storage unit to an application server.
In an alternative implementation, for a scenario of a primary LUN storage unit failure:
1) failure of primary LUN storage unit not recovered: and if the temporary main LUN storage unit does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, forwarding the read IO request to the temporary slave LUN storage unit. And after receiving the read IO request from the LUN storage unit temporarily, reading data in the read IO request, if the data can be read (the main LUN has partial access failure, and the logical address field accessed by the read IO request has no failure), returning the read data to the temporary main LUN storage unit, and returning the read data to the application server by the temporary main LUN storage unit. If the data is not read from the LUN temporarily (the logical address field requested to be accessed by the read IO is failed), a prompt message of a read data error is returned to the temporary main LUN storage unit, and the temporary main LUN storage unit sends the read error prompt message to the application server.
2) Primary LUN storage unit failure recovery (i.e. during data synchronization): if the temporary main LUN storage unit does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, the read IO request may be forwarded to the temporary slave LUN storage unit. And the temporary slave LUN storage unit can read the data carried in the read IO request, return the read data to the temporary master LUN storage unit, and return the data to the application server by the temporary master LUN storage unit.
In another alternative implementation, for a scenario where the storage device in which the primary LUN storage unit is located fails:
1) the storage device where the main LUN storage unit is located fails and is not recovered: and if the temporary main LUN storage unit does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, returning a read error prompt message to the application server.
2) And (3) fault recovery of the storage equipment where the main LUN storage unit is located: if the temporary main LUN storage unit does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, the read IO request may be forwarded to the temporary slave LUN storage unit. And the temporary slave LUN storage unit can read the data carried in the read IO request, return the read data to the temporary master LUN storage unit, and return the data to the application server by the temporary master LUN storage unit.
In the embodiment of the present application, the temporary receiving of the IO request from the LUN storage unit may occur in three stages, namely, after the failure of the primary LUN storage unit, after the failure recovery of the primary LUN storage unit, and after the failure recovery of the storage device where the primary LUN storage unit is located.
When the slave LUN storage unit is converted into the temporary master LUN storage unit and the master LUN storage unit is converted into the temporary slave LUN storage unit, if the temporary slave LUN storage unit receives an IO reading request, the IO reading request is forwarded to the temporary master LUN storage unit, so that the temporary master LUN storage unit reads data carried by the IO request.
After receiving the data carried by the read IO request, the temporary main LUN storage unit may determine whether a logical address mapping record corresponding to the logical address field carried by the read IO request exists in the temporary main LUN storage unit.
And if the temporary main LUN storage unit has a logical address mapping record corresponding to the logical address field carried by the read IO request. The data corresponding to the read IO request can be read, the read data is returned to the temporary slave LUN storage unit, and the read data is returned to the application server from the temporary slave LUN storage unit.
If the temporary main LUN storage unit does not have a logical address mapping record corresponding to the logical address field carried by the read IO request, the read IO request carried by the read IO request may be returned to the temporary slave LUN storage unit.
The read IO request is temporarily received from the LUN storage unit, and after the read IO request is determined to be the read IO request received by the read IO request, data corresponding to the read IO request can be read, and if the data can be read, the read data is returned to the application server; and if the data cannot be read, returning a reading error prompt message to the application server.
After the temporary slave LUN storage unit receives the read IO request, a source identifier may be added to the read IO request to identify the read IO request temporarily received from the application server from the LUN storage unit. When the temporary slave LUN storage unit determines whether the read IO request is a read IO request received by the temporary slave LUN storage unit, the temporary slave LUN storage unit may determine whether the read IO request is a read IO request received by the temporary slave LUN storage unit through a source identifier in the read IO request.
In summary, the present application provides a data protection method, on one hand, when a main LUN storage unit or a storage device where the main LUN storage unit is located is normal, only one copy of data carried by a write IO request is stored in a dual active storage system, and in a process of synchronizing data after a failure of the main LUN storage unit or the storage device where the main LUN storage unit is located is recovered, the dual active storage system only stores data carried by two copies of the write IO request.
On the other hand, the slave LUN storage unit is configured as a Thin-LUN storage unit, and after the slave LUN storage unit is changed into a temporary master LUN storage unit, an automatic capacity expansion mechanism may be started, and the storage capacity is expanded by applying for a storage space as needed, and after the temporary master LUN storage unit synchronizes data written in the process from failure to failure recovery of the master LUN storage unit or the storage device where the master LUN storage unit is located to the temporary slave LUN storage unit, the occupied storage space of the temporary master LUN storage unit may be released. By adopting the mechanism, the requirement of the LUN storage unit on the storage space can be reduced as much as possible, the waste of the storage space is reduced, the utilization rate of the storage space is improved, and the data to be synchronized can be quickly found when the data is synchronized to the temporary slave LUN storage unit, so that the data synchronization efficiency is improved.
In the third aspect, for the IO read request, as long as the temporary slave LUN storage unit can be accessed, data can be read in real time, thereby solving the problem that the space where data is not written on the temporary master LUN storage unit cannot read data, and data can only be read after the master LUN storage unit or the storage device where the master LUN storage unit is located recovers and data synchronization is completed.
The method is described in detail below by using a specific example and combining two scenarios, namely, failure of the main LUN storage unit and failure of the storage device where the main LUN storage unit is located.
Assume that the primary LUN storage unit in the dual active storage system is LUN-A and the secondary LUN storage unit is LUN-B. LUN-A is configured on device A and LUN-B is configured on device B. LUN-B is pre-configured as a Thin-LUN storage unit. The LUN storage unit is configured with role identification bits, wherein the role identification bit value corresponding to the main LUN storage unit is 1, the role identification bit value corresponding to the slave LUN storage unit is 2, the identification bit value corresponding to the temporary main LUN storage unit is 3, and the identification bit value corresponding to the temporary slave LUN storage unit is 4. The temporary main LUN storage unit is configured with a data synchronization identification bit, wherein when the value of the data synchronization identification bit is 0, the written data is not subjected to synchronization processing, and when the value of the data synchronization identification bit is 1, the written data is subjected to synchronization processing.
When the double-active storage system is in A normal state, after the LUN-A receives the write IO request, the datA carried by the write IO request can be written into the local, and the written datA is not synchronized to the LUN-B. And after the writing is completed, returning a response message of successful writing to the application server.
After receiving the write IO request, the LUN-B may forward the write IO request to the LUN-A, and the LUN-A writes the datA carried in the write IO request into the LUN-A and does not synchronize the written datA to the LUN-B. And after the writing is finished, returning a response message of successful writing to the LUN-B, and returning the response message of successful writing to the application server by the LUN-B.
When A LUN-A failure or A device A failure occurs in A dual active storage system, the following operations may be performed.
1) For LUN-A failures
When LUN-A detects that it becomes A failure state, it can send role switch notification to LUN-B through the stored equipment ID of equipment B and LUN ID of LUN-B.
After receiving the role conversion notification, the LUN-B may change the value of the role identification bit corresponding to the LUN-B from 2 to 3, and simultaneously change the value of the data synchronization identification bit to 0, so that the LUN-B is converted from the slave LUN storage unit to the temporary master LUN storage unit. At the same time, LUN-B may enable an automatic capacity expansion mechanism.
And the LUN-B sends A role conversion notice to the LUN-A, and after receiving the role conversion notice, the LUN-A can change the value of the role identification bit corresponding to the LUN-A from 1 to 4, so that the LUN-A is converted from A main LUN storage unit to A temporary slave LUN storage unit.
After the LUN-B receives the write IO request, the LUN-B can write the datA carried by the write IO request, and does not synchronize the written datA to the LUN-A based on the datA synchronization identification bit 0.
If the LUN-A receives the write IO request, the write IO request can be forwarded to the LUN-B for execution, the LUN-B can write the datA carried by the write IO request, and the written datA is not synchronized to the LUN-A based on the datA synchronization identification bit 0. LUN-B may then return the result of the execution of the write command to LUN-A, which returns it to the front-end application server.
If the LUN-B receives the IO read request, it can be determined whether the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the IO read request. And if the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the read IO request, reading data corresponding to the read IO request and returning the data to the application server. And if the LUN-B does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, forwarding the read IO request to the LUN-A. And after receiving the read IO request, the LUN-A can read the datA corresponding to the read IO request, and if the logical address field accessed by the read IO request has no access fault, the LUN-A can read the datA corresponding to the read IO request, return the read datA to the LUN-B, and return the read datA to the application server by the LUN-B. If the logical address field accessed by the read IO request fails, a read error prompt message is returned to the LUN-B, and the LUN-B returns the read error prompt message to the application server.
If LUN-A receives the read IO request, LUN-A may forward the read IO request to LUN-B. After receiving the read IO request, the LUN-B can determine whether a logical address mapping record corresponding to the logical address field carried by the read IO request is stored in the LUN-B. And if the LUN-B stores the logical address mapping record corresponding to the logical address field carried by the read IO request, reading the datA corresponding to the read IO request, forwarding the read datA to the LUN-A, and returning the read datA to the application server by the LUN-A. And if the LUN-B does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, forwarding the read IO request to the LUN-A. And after receiving the read IO request, the LUN-A can read datA corresponding to the read IO request, and if the logical address field accessed by the read IO request has no access fault and the read IO request is received by the LUN-A from the application server, the LUN-A can read the datA corresponding to the read IO request and return the read datA to the application server. And if the logical address field accessed by the read IO request fails and the read IO request is received by the LUN-A from the application server, returning A read error prompt message to the application server.
When the LUN-A detects self fault recovery, A datA synchronization instruction can be sent to the LUN-B. After receiving the datA synchronization instruction, the LUN-B as the temporary master LUN storage unit may set the corresponding datA synchronization flag to 1, and then synchronize the written datA to the LUN-A as the slave LUN storage unit based on the datA synchronization flag 1.
In the synchronization process, if the LUN-B receives A write IO request, datA carried by the write IO request is written into the LUN, and the written datA is synchronized to the LUN-A. And the LUN-B returns a response message of successful writing to the application server.
And if the LUN-A receives the write IO request, forwarding the write IO request to the LUN-B. And the LUN-B writes the datA carried by the write IO request into the LUN and synchronizes the written datA to the LUN-A. And the LUN-A returns A response message of successful writing to the application server.
If the LUN-B receives the IO reading request, it can be determined whether the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the IO reading request. And if the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the read IO request, reading data corresponding to the read IO request and returning the data to the application server. And if the LUN-B does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, forwarding the read IO request to the LUN-A. And after receiving the read IO request, the LUN-A can read the datA corresponding to the read IO request and return the read datA to the LUN-B, and the LUN-B returns the read datA to the application server.
If LUN-A receives the read IO request, LUN-A may forward the read IO request to LUN-B. After receiving the IO reading request, the LUN-B may store a logical address mapping record corresponding to the logical address field carried by the IO reading request. And if the LUN-B stores the logical address mapping record corresponding to the logical address field carried by the read IO request, reading the datA corresponding to the read IO request, forwarding the read datA to the LUN-A, and returning the read datA to the application server by the LUN-A. And if the LUN-B does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, forwarding the read IO request to the LUN-A. And after receiving the read IO request, the LUN-A can read the datA corresponding to the read IO request, and if the read IO request is received by the LUN-A from the application server, the LUN-A can return the read datA to the application server. After the data synchronization is completed, the LUN-B can change the value of the corresponding role identification bit from 3 to 2 so as to convert the temporary main LUN storage unit into the auxiliary LUN storage unit, release the storage space occupied by the LUN-B and close the automatic capacity expansion mechanism.
The LUN-B can inform the LUN-A to perform role conversion, and the LUN-A can change the value of the role identification bit corresponding to the LUN-A from 4 to 1 after receiving the role conversion notice so as to convert the temporary slave LUN storage unit into the master LUN storage unit.
2) For device A failure
The device B can detect whether the device a is faulty or not through the heartbeat message with the device a. When the device B detects A failure of the device A, the device B may search for the LUN-B corresponding to the LUN-A through A locally recorded correspondence relationship, etc., of the slave LUN storage unit corresponding to the primary LUN storage unit in the device A. Device B may then send a role switch instruction to LUN-B.
After receiving the role conversion instruction, the LUN-B may change the value of the role identification bit corresponding to the LUN-B from 2 to 3, and simultaneously change the value of the data synchronization identification bit to 0, so that the LUN-B is converted from the slave LUN storage unit to the temporary master LUN storage unit. At the same time, LUN-B may enable an automatic capacity expansion mechanism.
After receiving the write IO request, the LUN-B can write the datA carried by the write IO request, and does not synchronize the written datA to the LUN-A based on the datA synchronization identification bit 0.
If the LUN-B receives the IO read request, it can be determined whether the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the IO read request. And if the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the read IO request, reading data corresponding to the read IO request and returning the data to the application server. And if the LUN-B does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, returning a read error prompt message to the application server.
When the device B detects that the device A recovers due to A failure, the LUN-B may perform role negotiation with the LUN-A, so that the LUN-A is A temporary slave LUN storage unit, and A value of A role identification bit corresponding to the LUN-A is set to 4. After the LUN-A negotiates as A temporary slave LUN storage unit, A datA synchronization instruction may be sent to LUN-B. After receiving the datA synchronization instruction, the LUN-B as the temporary main LUN storage unit may modify the corresponding datA synchronization flag to take A value of 1, and then synchronize the written datA to the LUN-A as the slave LUN storage unit based on the datA synchronization flag 1.
In the synchronization process, if the LUN-B receives A write IO request, datA carried by the write IO request is written into the LUN, and the written datA is synchronized to the LUN-A. And the LUN-B returns a response message of successful writing to the application server.
And if the LUN-A receives the write IO request, forwarding the write IO request to the LUN-B. And the LUN-B writes the datA carried by the write IO request into the LUN and synchronizes the written datA to the LUN-A. And the LUN-A returns A response message of successful writing to the application server.
If the LUN-B receives the IO reading request, it can be determined whether the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the IO reading request. And if the LUN-B stores a logical address mapping record corresponding to the logical address field carried by the read IO request, reading data corresponding to the read IO request and returning the data to the application server. And if the LUN-B does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, forwarding the read IO request to the LUN-A. And after receiving the read IO request, the LUN-A can read the datA corresponding to the read IO request and return the read datA to the LUN-B, and the LUN-B returns the read datA to the application server.
If LUN-A receives the read IO request, LUN-A may forward the read IO request to LUN-B. After receiving the IO reading request, the LUN-B may store a logical address mapping record corresponding to the logical address field carried by the IO reading request. And if the LUN-B stores the logical address mapping record corresponding to the logical address field carried by the read IO request, reading the datA corresponding to the read IO request, forwarding the read datA to the LUN-A, and returning the read datA to the application server by the LUN-A. And if the LUN-B does not store the logical address mapping record corresponding to the logical address field carried by the read IO request, forwarding the read IO request to the LUN-A. And after receiving the read IO request, the LUN-A can read the datA corresponding to the read IO request, and if the read IO request is received by the LUN-A from the application server, the LUN-A can return the read datA to the application server.
After the data synchronization is completed, the LUN-B can change the value of the corresponding role identification bit from 3 to 2 so as to convert the temporary main LUN storage unit into the auxiliary LUN storage unit, release the storage space occupied by the LUN-B and close the automatic capacity expansion mechanism.
The LUN-B can inform the LUN-A to perform role conversion, and the LUN-A can change the value of the role identification bit corresponding to the LUN-A from 4 to 1 after receiving the role conversion notice so as to convert the temporary slave LUN storage unit into the master LUN storage unit.
Corresponding to the embodiment of the data protection method, the application also provides an embodiment of a data protection device.
The embodiment of the data protection device can be applied to the storage equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading a corresponding computer program instruction in the nonvolatile memory into the memory through the processor of the storage device where the device is located to operate. From a hardware aspect, as shown in fig. 3, the present application is a hardware structure diagram of a storage device where the data protection apparatus is located, except for the processor, the memory, the network interface, and the storage medium shown in fig. 3, the storage device where the apparatus is located in the embodiment may also include other hardware according to an actual function of the storage device, which is not described again.
The processor of the storage device may call machine-executable instructions stored in the storage medium corresponding to the data protection logic to perform the data protection method.
Referring to fig. 4, fig. 4 is a block diagram of a data protection device according to an exemplary embodiment of the present application. The device is applied to a slave logic unit number LUN storage unit in a double-active storage system, and the double-active storage system also comprises a master LUN storage unit; after the double-active storage system receives the write IO request, a main LUN storage unit in the double-active storage system processes the write IO request, and the main LUN storage unit does not synchronize data in the write IO request to the slave LUN storage unit; the slave LUN storage unit is preconfigured as a Thin logical unit number Thin-LUN storage unit.
Functionally divided, the data protection logic may be the data protection device, and may include a conversion unit 401, a writing unit 402, and a synchronization unit 403.
The conversion unit 401 is configured to, when the main LUN storage unit fails or a storage device where the main LUN storage unit is located fails, convert the LUN storage unit into a temporary main LUN storage unit, and start an automatic capacity expansion mechanism;
a writing unit 402, configured to, when receiving a write IO request, write data carried in the write IO request into the LUN storage unit, and not perform data synchronization;
a synchronizing unit 403, configured to trigger data synchronization between the local LUN storage unit and the main LUN storage unit that is converted into the temporary slave LUN storage unit when a failure is recovered, and release the storage space occupied by the local LUN storage unit after the synchronization is completed, convert the local LUN storage unit from the temporary main LUN storage unit into the slave LUN storage unit, and notify that the temporary slave LUN storage unit is converted into the main LUN storage unit.
In an alternative implementation manner, the initial capacity of the slave LUN storage unit is zero, and the automatic capacity expansion mechanism is in an off state;
the apparatus further includes a shutdown unit 404, configured to shutdown the automatic volume expansion mechanism after the LUN storage unit is converted from the temporary master LUN storage unit to the slave LUN storage unit.
In another optional implementation manner, when the primary LUN storage unit fails, the primary LUN storage unit converts the primary LUN storage unit into a temporary slave LUN storage unit when receiving a role conversion notification sent by the temporary primary LUN storage unit.
In another optional implementation manner, when the storage device where the primary LUN storage unit is located fails, after the failure of the storage device where the primary LUN storage unit is located is recovered, the primary LUN storage unit is converted into a temporary secondary LUN storage unit based on a role negotiation result with the temporary primary LUN storage unit.
In another optional implementation manner, the temporary main LUN storage unit corresponds to a data synchronization identifier;
the device further comprises:
a modifying unit 405, configured to modify the value of the data synchronization identifier to a first preset value after the LUN storage unit is converted into a temporary main LUN storage unit; the first preset value indicates that the written data is not subjected to synchronous processing;
the synchronizing unit 403 is specifically configured to receive a synchronizing instruction sent by the main LUN storage unit after the failure of the main LUN storage unit or the storage device where the main LUN storage unit is located is recovered; modifying the data synchronization identification into a second preset value; the second preset value represents that the written data are subjected to synchronous processing; and triggering data synchronization between the LUN storage unit and the main LUN storage unit converted into the temporary slave LUN storage unit according to the second preset value.
In another optional implementation manner, after the current LUN storage unit is a temporary master LUN storage unit and the master LUN storage unit is converted into a temporary slave LUN storage unit, if the temporary slave LUN storage unit receives a write IO request, the write IO request is forwarded to the temporary master LUN storage unit, and the temporary master LUN storage unit performs write IO request processing and does not perform data synchronization.
In another optional implementation manner, the system further includes a reading unit 406, configured to determine, after the current LUN storage unit is a temporary master LUN storage unit and the master LUN storage unit is converted into a temporary slave LUN storage unit, if a read IO request is received, whether a logical address mapping record corresponding to a logical address field carried in the read IO request exists in the current LUN storage unit; if so, reading the data corresponding to the read IO request through the logical address mapping record, and returning the read data to the application server.
In another alternative implementation manner, the reading unit 406 is further configured to return a read error notification message to the application server if the read error notification message is not: or forwarding the read IO request to the temporary slave LUN storage unit, so that the temporary slave LUN storage unit reads the data corresponding to the read IO request and returns the data to the temporary master LUN storage unit, or when the data cannot be read, returning a read error prompt message to the temporary master LUN storage unit; and sending the data or the read error prompt message returned from the LUN storage unit to an application server.
In another optional implementation manner, when the LUN storage unit is a temporary master LUN storage unit and the master LUN storage unit has been converted into a temporary slave LUN storage unit, if the temporary slave LUN storage unit receives an IO read request, the temporary slave LUN storage unit forwards the IO read request to the temporary master LUN storage unit, so that the temporary master LUN storage unit reads data carried by the IO read request; if the temporary main LUN storage unit does not read the data carried by the read IO request, the temporary slave LUN storage unit receives the read IO request forwarded by the temporary main LUN storage unit and locally reads the data corresponding to the read IO request, if the data is read, the data is returned to the application server, and if the data is not read, a read error prompt message is returned to the application server.
In another optional implementation manner, the reading unit 406 is further configured to, if the temporary main LUN storage unit reads the data carried in the read IO request, return the read data to an application server.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (11)

1. A data protection method is applied to a slave LUN storage unit in a dual active storage system, wherein the dual active storage system further comprises a master LUN storage unit; after the double-active storage system receives the write IO request, a main LUN storage unit in the double-active storage system processes the write IO request, and the main LUN storage unit does not synchronize data in the write IO request to the slave LUN storage unit; the slave LUN storage unit is preconfigured as a Thin logical unit number Thin-LUN storage unit; the method comprises the following steps:
when the main LUN storage unit fails or the storage equipment where the main LUN storage unit is located fails, the main LUN storage unit is converted into a temporary main LUN storage unit, and an automatic capacity expansion mechanism is started;
when a write IO request is received, writing data carried in the write IO request into the LUN storage unit, and not executing data synchronization;
when the fault is recovered, triggering the data synchronization between the LUN storage unit and the main LUN storage unit which is converted into the temporary slave LUN storage unit, releasing the storage space occupied by the LUN storage unit after the synchronization is completed, converting the temporary master LUN storage unit into the slave LUN storage unit, and informing that the temporary slave LUN storage unit is converted into the main LUN storage unit.
2. The method according to claim 1, wherein the initial capacity of the slave LUN storage unit is zero and the automatic volume expansion mechanism is an off state;
the method further comprises the following steps:
and after the LUN storage unit is converted from the temporary main LUN storage unit to the auxiliary LUN storage unit, closing the automatic capacity expansion mechanism.
3. The method according to claim 1, wherein upon failure of the primary LUN storage unit, upon receiving a role switch notification sent by the temporary primary LUN storage unit, switches the primary LUN storage unit to a temporary secondary LUN storage unit.
4. The method according to claim 1, wherein the primary LUN storage unit converts the primary LUN storage unit into a temporary secondary LUN storage unit based on a role negotiation result with the temporary primary LUN storage unit after the failure of the storage device in which the primary LUN storage unit is located is recovered.
5. The method according to claim 1, wherein the temporary primary LUN storage unit corresponds to a data synchronization identifier;
the method further comprises the following steps:
after the LUN storage unit is converted into a temporary main LUN storage unit, modifying the value of the data synchronization identifier into a first preset value; the first preset value indicates that the written data is not subjected to synchronous processing;
when the fault is recovered, triggering data synchronization between the local LUN storage unit and the main LUN storage unit converted into the temporary slave LUN storage unit includes:
receiving a synchronization instruction sent by the main LUN storage unit after the main LUN storage unit or the storage equipment where the main LUN storage unit is located recovers from the fault;
modifying the data synchronization identification into a second preset value; the second preset value represents that the written data are subjected to synchronous processing;
and triggering data synchronization between the LUN storage unit and the main LUN storage unit converted into the temporary slave LUN storage unit according to the second preset value.
6. The method of claim 1, further comprising:
when the LUN storage unit is a temporary main LUN storage unit and the main LUN storage unit is converted into a temporary slave LUN storage unit, if the temporary slave LUN storage unit receives a write IO request, the write IO request is forwarded to the temporary main LUN storage unit, the temporary main LUN storage unit processes the write IO request, and data synchronization is not performed.
7. The method of claim 1, further comprising:
when the LUN storage unit is a temporary main LUN storage unit and the main LUN storage unit is converted into a temporary slave LUN storage unit, if an IO reading request is received, whether a logical address mapping record corresponding to a logical address field carried by the IO reading request exists in the LUN storage unit is judged;
if so, reading the data corresponding to the read IO request through the logical address mapping record, and returning the read data to the application server.
8. The method of claim 7, further comprising:
if not, a read error prompt message is returned to the application server, or,
forwarding the read IO request to a temporary slave LUN storage unit so that the temporary slave LUN storage unit reads data corresponding to the read IO request and returns the data to a temporary master LUN storage unit or returns a read error prompt message to the temporary master LUN storage unit when the data cannot be read;
and sending the data or the read error prompt message returned from the LUN storage unit to an application server.
9. The method of claim 1, further comprising:
when the LUN storage unit is a temporary main LUN storage unit and the main LUN storage unit is converted into a temporary slave LUN storage unit, if the temporary slave LUN storage unit receives an IO reading request, the temporary slave LUN storage unit forwards the IO reading request to the temporary main LUN storage unit so that the temporary main LUN storage unit reads data carried by the IO reading request;
if the temporary main LUN storage unit does not read the data carried by the read IO request, the temporary slave LUN storage unit receives the read IO request forwarded by the temporary main LUN storage unit and locally reads the data corresponding to the read IO request, if the data is read, the data is returned to the application server, and if the data is not read, a read error prompt message is returned to the application server.
10. The method of claim 9, further comprising:
and if the temporary main LUN storage unit reads the data carried by the read IO request, returning the read data to the temporary slave LUN storage unit, and returning the data to the application server by the temporary slave LUN storage unit.
11. A storage device, comprising a processor and a storage medium, the processor invoking machine executable instructions corresponding to data protection logic stored on the storage medium, the processor being caused to perform the method of any one of claims 1 to 10.
CN201710512447.0A 2017-06-29 2017-06-29 Data protection method and storage device Active CN107329698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710512447.0A CN107329698B (en) 2017-06-29 2017-06-29 Data protection method and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710512447.0A CN107329698B (en) 2017-06-29 2017-06-29 Data protection method and storage device

Publications (2)

Publication Number Publication Date
CN107329698A CN107329698A (en) 2017-11-07
CN107329698B true CN107329698B (en) 2020-08-11

Family

ID=60198152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710512447.0A Active CN107329698B (en) 2017-06-29 2017-06-29 Data protection method and storage device

Country Status (1)

Country Link
CN (1) CN107329698B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103827843A (en) * 2013-11-28 2014-05-28 华为技术有限公司 Method, device, and system for writing data
CN104102554A (en) * 2013-04-07 2014-10-15 杭州信核数据科技有限公司 Data backup method and data backup device
CN105677252A (en) * 2016-01-06 2016-06-15 华为技术有限公司 Data reading method, data processing method and related storage device
CN106133676A (en) * 2014-04-21 2016-11-16 株式会社日立制作所 Storage system
US9582559B1 (en) * 2012-06-29 2017-02-28 EMC IP Holding Company LLC Multi-site storage system with replicated file system synchronization utilizing virtual block storage appliances
CN106843749A (en) * 2016-12-14 2017-06-13 华为技术有限公司 Write request processing method, device and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6230707B2 (en) * 2014-06-26 2017-11-15 株式会社日立製作所 Storage system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9582559B1 (en) * 2012-06-29 2017-02-28 EMC IP Holding Company LLC Multi-site storage system with replicated file system synchronization utilizing virtual block storage appliances
CN104102554A (en) * 2013-04-07 2014-10-15 杭州信核数据科技有限公司 Data backup method and data backup device
CN103827843A (en) * 2013-11-28 2014-05-28 华为技术有限公司 Method, device, and system for writing data
CN106133676A (en) * 2014-04-21 2016-11-16 株式会社日立制作所 Storage system
CN105677252A (en) * 2016-01-06 2016-06-15 华为技术有限公司 Data reading method, data processing method and related storage device
CN106843749A (en) * 2016-12-14 2017-06-13 华为技术有限公司 Write request processing method, device and equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《A reliability optimization method for RAID-structured storage systems based on active data migration》;Yin Yang等;《journal of Systems and Software》;20130228;全文 *
《基于数据同步的集群系统不间断服务的设计与实现》;陈东江;《中国优秀硕士学位论文全文数据库 信息科技辑》;20150515;全文 *

Also Published As

Publication number Publication date
CN107329698A (en) 2017-11-07

Similar Documents

Publication Publication Date Title
CN107329859B (en) Data protection method and storage device
EP3620905B1 (en) Method and device for identifying osd sub-health, and data storage system
US20200233762A1 (en) Method and Apparatus for Redundancy in Active-Active Cluster System
CN202798798U (en) High availability system based on cloud computing technology
EP3474516B1 (en) Data processing method and device
WO2021136422A1 (en) State management method, master and backup application server switching method, and electronic device
CN106776130B (en) Log recovery method, storage device and storage node
CN106919473B (en) Data disaster backup system and service processing method
CN107402722B (en) Data migration method and storage device
CN108345617B (en) Data synchronization method and device and electronic equipment
CN102890716B (en) The data back up method of distributed file system and distributed file system
CN104778102A (en) Master-slave switching method and system
US9525733B2 (en) Method and system for data synchronization
CN109491609B (en) Cache data processing method, device and equipment and readable storage medium
CN105159795A (en) Data synchronization method, apparatus and system
CN105049258B (en) The data transmission method of network disaster tolerance system
CN106603279A (en) Disaster tolerance method and disaster tolerance system
JP2009080569A (en) Data synchronous system, method and program, and server
CN106873902B (en) File storage system, data scheduling method and data node
CN102457400B (en) Method for preventing split brain phenomenon from occurring on distributed replicated block device (DRBD) resource
CN105159846A (en) Method for supporting dual-control switching of virtualized disk and storage system
CN107329698B (en) Data protection method and storage device
CN107181608B (en) Method for recovering service and improving performance and operation and maintenance management system
CN108984602B (en) Database control method and database system
EP4002811A1 (en) Data synchronization method and apparatus

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