CN106909307B - Method and device for managing double-active storage array - Google Patents
Method and device for managing double-active storage array Download PDFInfo
- Publication number
- CN106909307B CN106909307B CN201510968100.8A CN201510968100A CN106909307B CN 106909307 B CN106909307 B CN 106909307B CN 201510968100 A CN201510968100 A CN 201510968100A CN 106909307 B CN106909307 B CN 106909307B
- Authority
- CN
- China
- Prior art keywords
- storage array
- host
- storage
- active
- arbitration
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Hardware Redundancy (AREA)
Abstract
本发明涉及一种管理双活存储阵列的方法和装置,方法包括:统计第一存储阵列接收主机发送的数据的总量。接收第二存储阵列发送的第二存储阵列接收主机发送的数据的总量。确定第一存储阵列接收主机发送的数据的总量小于第二存储阵列接收主机发送的数据的总量。确定第一存储阵列和第二存储阵列之间的链路发生故障时,延迟一段时间向仲裁服务器发送仲裁请求,仲裁服务器分别与第一存储阵列、第二存储阵列连接。接收仲裁服务器发送的仲裁结果。在确定第二存储阵列与仲裁服务器连接断开的情况下,通过存储阵列确定接收数据数据的存储阵列。在脑裂时存储阵列将指定接收主机数据总量多的存储阵列接收主机数据。
The present invention relates to a method and device for managing a dual-active storage array. The method includes: counting the total amount of data sent by a host received by a first storage array. Receive the total amount of data sent by the second storage array receiving host from the second storage array. It is determined that the total amount of data sent by the host received by the first storage array is smaller than the total amount of data sent by the host received by the second storage array. When it is determined that the link between the first storage array and the second storage array is faulty, an arbitration request is sent to the arbitration server after a period of delay, and the arbitration server is respectively connected to the first storage array and the second storage array. Receive the arbitration result sent by the arbitration server. When it is determined that the second storage array is disconnected from the arbitration server, the storage array that receives the data data is determined through the storage array. During split-brain, the storage array will designate the storage array with the most total host data to receive host data.
Description
技术领域technical field
本发明涉及存储器技术领域,尤其涉及一种管理双活存储阵列的方法及 装置。The present invention relates to the technical field of memory, and in particular, to a method and device for managing a dual-active storage array.
背景技术Background technique
随着各行业数字化进程的推进,数据逐渐成为企事业单位的运营核心。 用户对承载数据的存储系统的稳定性要求也越来越高,这包括存储数据可靠 性和业务延续性,越来越多的企业把应用、数据、系统进行集中处理,数据 大集中的同时也面临风险。虽然不少存储厂商能够向用户提供稳定性极高的 存储设备,但还是无法防止自然灾难等突发事件。With the advancement of digitalization in various industries, data has gradually become the core of the operation of enterprises and institutions. Users have higher and higher requirements for the stability of storage systems that carry data, including the reliability of stored data and business continuity. More and more enterprises are processing applications, data, and systems in a centralized manner. at risk. Although many storage manufacturers can provide users with highly stable storage devices, they cannot prevent emergencies such as natural disasters.
灾难性的突发事件发生时如何保障企业核心业务的在线性,即核心业务 7*24小时的业不间断运行,成为企业关注的首要问题。突发事件造成的非计 划宕机的事件不可避免,数据中心断电等不可抗逆因素对生产系统造成不可 恢复的毁坏。为了保证数据存储的可靠性以及业务的延续性双活技术应运而 生,双活技术能够保证在一定的故障模式范围内最大程度保证业务的连续性。When a catastrophic emergency occurs, how to ensure the online linearity of the core business of the enterprise, that is, the uninterrupted operation of the core business 7*24 hours, has become the primary concern of the enterprise. Unplanned downtime caused by emergencies is inevitable, and irreversible factors such as data center power outages cause irreversible damage to production systems. In order to ensure the reliability of data storage and business continuity, the active-active technology emerged as the times require. The active-active technology can ensure the continuity of services to the greatest extent within a certain range of failure modes.
双活技术是面向应用访问的,其要求实现为跨设备/数据中心的存储提供 无中断访问响应,在系统容错范围内的故障模型下其IO归零时间不能导致业 务中断。因此,双活技术的核心诉求:存储访问视图一致性(主机从任何一 个控制器的端口访问双活LUN(逻辑单元号,logical unit number),其访 问的权限和数据都是一致的)和故障后业务切换时延不能导致业务中断。Active-active technology is oriented to application access. It requires that it provides uninterrupted access response for storage across devices/data centers. Under the fault model within the system's fault tolerance range, its IO reset time cannot cause service interruption. Therefore, the core requirements of the active-active technology are: storage access view consistency (a host accesses an active-active LUN (logical unit number, logical unit number) from the port of any controller, and its access rights and data are consistent) and faults The post-service switching delay cannot cause service interruption.
由于双活LUN部署在两个阵列上,要求当两个双活阵列出现脑裂时只能有 一个阵列上的LUN提供业务。Since active-active LUNs are deployed on two arrays, only one LUN on one array is required to provide services when a split-brain occurs between the two active-active arrays.
现有技术中,通常引入第三方仲裁机制:当出现脑裂时两端存储器分别 向仲裁服务器提交仲裁,仲裁获胜的LUN允许主机访问、仲裁失败的LUN不允 许访问。In the prior art, a third-party arbitration mechanism is usually introduced: when a split-brain occurs, the storages at both ends submit arbitration to the arbitration server respectively, the LUN that wins the arbitration is allowed to be accessed by the host, and the LUN that fails the arbitration is not allowed to access.
但现有技术中,仲裁方案对仲裁服务器的可靠性要求非常高,一旦仲裁 服务器出现故障或者仲裁服务器和两个存储器间链路出现故障的情况下,再 出现双活阵列脑裂会导致两台双活阵列提交仲裁失败都不能提供访问从而导 致主机断业务。However, in the prior art, the arbitration scheme has very high requirements on the reliability of the arbitration server. Once the arbitration server fails or the link between the arbitration server and the two storages fails, the split-brain of the active-active array will result in two The active-active array fails to provide access even if it fails to submit arbitration, resulting in service interruption of the host.
发明内容SUMMARY OF THE INVENTION
本申请描述了一种管理双活存储阵列的方法。通过所述方法,使双活阵 列中的存储阵列脑裂后,通过所述方法,尽量避免更换接收主机发送的数据 的存储阵列的目的。This application describes a method for managing an active-active storage array. With the method, after the storage array in the active-active array is split-brained, the method avoids as much as possible the purpose of replacing the storage array that receives data sent by the host.
一方面,本申请的实施例提供一种管理双活存储阵列的方法。该方法包 括统计双活阵列中的第一存储阵列接收主机数据的总量,并接收双活阵列中 的第二存储阵列统计的接收主机数据的总量。对第一存储阵列和第二存储阵 列接收主机数据总量的多少进行比较。当第一存储阵列和第二存储阵列之间 的链路断开时,接收主机数据总量多的存储阵列继续接收主机发送的数据。 所述方法通过使接收主机数据多的存储阵列继续接收主机发送的数据,而接 收主机数据多的存储阵列通常为当前正在接收主机数据的存储阵列。由此达 到既可使存储系统连接正常,又可避免更换接收主机发送的数据的存储阵列 的目的。In one aspect, an embodiment of the present application provides a method for managing a dual-active storage array. The method includes counting the total amount of host data received by the first storage array in the active-active array, and receiving the total amount of received host data counted by the second storage array in the active-active array. A comparison is made of how much of the total amount of host data received by the first storage array and the second storage array. When the link between the first storage array and the second storage array is disconnected, the storage array that receives the most data from the host continues to receive the data sent by the host. In the method, the storage array that receives more host data continues to receive data sent by the host, and the storage array that receives more host data is usually the storage array that is currently receiving host data. In this way, the storage system can be connected normally, and the replacement of the storage array that receives the data sent by the host can be avoided.
在一个可能的设计中,第一存储阵列和第二存储阵列还分别与仲裁服务 器连接。当第一存储阵列和第二存储阵列之间的链路断开时,分别向仲裁服 务器发送仲裁请求,通过仲裁请求确定接收主机的数据。接收主机数据总量 多的存储阵列在检测到与仲裁服务器断开时立即发送,接收主机数据总量少 的存储阵列在检测到与仲裁服务器断开后延迟一个预设的时间发送仲裁请 求。仲裁服务器根据收到仲裁请求的先后顺序确定接收主机数据的存储阵列。 先发送到仲裁服务器仲裁请求的存储阵列获得接收主机数据,后发送到仲裁 服务器仲裁请求的存储阵列不接收主机发送的数据。由此达到接收主机数据 多的存储阵列优先接收主机数据少的存储阵列一定时间获得继续接收主机数 据,当接收主机数据多的存储阵列在优先时间内不能获得接收主机数据,再 由接收主机数据少的存储阵列接收主机数据。避免了接收主机数据多的存储 阵列在故障而不能接收主机数据时,接收主机数据少的存储阵列也不能接收 主机数据。In one possible design, the first storage array and the second storage array are also each connected to an arbiter server. When the link between the first storage array and the second storage array is disconnected, an arbitration request is respectively sent to the arbitration server, and the data of the receiving host is determined through the arbitration request. Storage arrays that receive a large amount of host data will send the arbitration request immediately after detecting that they are disconnected from the arbitration server. Storage arrays that receive a small amount of host data will send the arbitration request after a preset time delay after detecting that they are disconnected from the arbitration server. The arbitration server determines the storage array that receives the host data according to the sequence of receiving the arbitration request. The storage array that first sends the arbitration request to the arbitration server obtains the data of the receiving host, and then the storage array that sends the arbitration request to the arbitration server does not receive the data sent by the host. In this way, the storage array that receives more host data will preferentially receive the storage array with less host data to continue to receive host data for a certain period of time. The storage array receives host data. This avoids that when the storage array that receives more host data fails and cannot receive host data, the storage array that receives less host data also cannot receive host data.
在一个可能的设计中,延迟一段预设的时间可以是延迟3秒至10秒钟的 任意一个时间。若延迟的时间过短,则不能达到使接收主机数据多的存储阵 列优先的目的。若延迟的时间过长,则影响系统接收主机数据的连续性。In one possible design, the delay for a preset period of time may be any time from 3 seconds to 10 seconds. If the delay time is too short, the purpose of giving priority to the storage array receiving more host data cannot be achieved. If the delay time is too long, the continuity of the system receiving host data will be affected.
在一个可能的设计中,延迟一段预设的时间可以是延迟5秒。所述时间 既能够有效的保证接收主机数据多的存储阵列优先的目的,又不影响系统接 收主机数据的连续性。In one possible design, the delay for a preset period of time may be a delay of 5 seconds. The time can not only effectively ensure the priority of the storage array that receives more host data, but also does not affect the continuity of the system receiving host data.
另一方面,本申请的实施例提供一种管理双活存储阵列的方法。该方法 包括统计双活阵列中的第一存储阵列接收主机数据的总量,并接收双活阵列 中的第二存储阵列统计的接收主机数据的总量。确定第一存储阵列接收主机 数据的总量大于第二存储阵列接收主机数据总量。当第一存储阵列与仲裁服 务器之间的通信故障时,并且第二存储阵列仲裁服务器之间的通信故障时, 当第一存储阵列和第二存储阵列之间的链路发送故障时,接收主机数据总量 多的第一存储阵列继续接收数据发送的数据。从而保证第一存储阵列在与仲 裁服务器连接断开和第二存储阵列与仲裁服务器之间的连接断开时,第一存 储阵列和第二存储阵列之间的链路断开时,存储阵列能够自己做出判断。接 收主机数据多的存储阵列继续接收主机发送的数据,接收主机数据少的存储 阵列不接收主机发送的数据。避免了接收主机数据多的存储阵列在故障而不 能接收主机数据时,接收主机数据少的存储阵列也不能接收主机数据。On the other hand, an embodiment of the present application provides a method for managing an active-active storage array. The method includes counting the total amount of host data received by the first storage array in the active-active array, and receiving the total amount of received host data counted by the second storage array in the active-active array. It is determined that the total amount of host data received by the first storage array is greater than the total amount of host data received by the second storage array. When the communication between the first storage array and the arbiter server fails, and the communication between the second storage array arbiter server fails, when the link transmission between the first storage array and the second storage array fails, the receiving host The first storage array with a large amount of data continues to receive the data sent by the data. This ensures that when the first storage array is disconnected from the arbiter server and the connection between the second storage array and the arbiter server is disconnected, when the link between the first storage array and the second storage array is disconnected, the storage array can Judge for yourself. The storage array that receives more data from the host continues to receive the data sent by the host, and the storage array that receives less data from the host does not receive the data sent by the host. It is avoided that when the storage array that receives more host data fails and cannot receive host data, the storage array that receives less host data also cannot receive host data.
再一方面,本申请的实施例提供一种双活存储阵列中的存储阵列。该存 储阵列包括用于执行在一方面的方法中包括的任意一种实施方式。In another aspect, embodiments of the present application provide a storage array in a dual-active storage array. The storage array includes methods for performing any one of the embodiments included in the methods of an aspect.
又一方面,本申请的实施例提供一种双活存储阵列中的存储阵列。该存 储阵列包括用于执行另一方面方法中包括的实施方式。In yet another aspect, embodiments of the present application provide a storage array in a dual-active storage array. The storage array includes embodiments for performing the methods included in another aspect.
再另一方面,本申请的实施例提供一种双活存储阵列中的存储阵列。存储 阵列包括处理器,存储器,通信接口和总线。其中,处理器、存储器和通信 接口通过总线通信。通信接口用于与第二存储阵列和主机通信。存储器用于 存储程序。当装置运行时,处理器用于执行存储器存储的程序,以执行上述 方法。In yet another aspect, embodiments of the present application provide a storage array in a dual-active storage array. A storage array includes processors, memory, communication interfaces, and buses. Among them, the processor, memory and communication interface communicate through the bus. The communication interface is used to communicate with the second storage array and the host. Memory is used to store programs. When the apparatus is in operation, the processor is configured to execute a program stored in the memory to perform the above-described method.
再又一方面,本申请的实施例提供一种管理双活存储阵列的方法。该方 法包括确定当前第一存储阵列是否接收主机发送的数据。若存储阵列前正在 接收主机发送的数据,则在第一存储阵列和第二存储阵列之间的链路断开后, 继续接收主机发送的数据。若存储阵列当前没有接收主机发送的数据,则在 第一存储阵列和第二存储阵列之间的链路断开后,不接收主机发送的数据。 通过采用所述方面,直接确定接收主机数据的存储阵列继续接收主机发送的 数据,从而避免了其它的方法和设备,使系统的效率更高。也避免了切换接 收主机数据的存储阵列的麻烦。In yet another aspect, an embodiment of the present application provides a method for managing an active-active storage array. The method includes determining whether the current first storage array receives data sent by the host. If the storage array is currently receiving data sent by the host, after the link between the first storage array and the second storage array is disconnected, it continues to receive data sent by the host. If the storage array does not currently receive the data sent by the host, after the link between the first storage array and the second storage array is disconnected, the data sent by the host will not be received. By adopting the aspect, it is directly determined that the storage array that receives the host data continues to receive the data sent by the host, thereby avoiding other methods and devices, and making the system more efficient. It also avoids the hassle of switching storage arrays that receive host data.
本申请提供了一种管理双活存储阵列的方法和装置。从而尽量避免在存 储阵列之间的连接断开时,不更换接收主机数据的存储阵列。The present application provides a method and apparatus for managing an active-active storage array. This minimizes the need to replace the storage array receiving host data when the connection between the storage arrays is disconnected.
附图说明Description of drawings
图1为本发明实施例的一种双活存储阵列的连接关系图;FIG. 1 is a connection diagram of a dual-active storage array according to an embodiment of the present invention;
图2为本发明实施例提供的一种管理双活存储阵列的方法流程图;FIG. 2 is a flowchart of a method for managing a dual-active storage array provided by an embodiment of the present invention;
图3为本发明实施例提供的一种双活存储阵列仲裁服务器故障后的系统 连接图;Fig. 3 is a system connection diagram after a failure of a dual-active storage array arbitration server provided by an embodiment of the present invention;
图4为本发明实施提供的一种双活阵列仲裁服务器连接断开后的系统连 接图;Fig. 4 is the system connection diagram after the disconnection of a kind of active-active array arbitration server connection provided by the implementation of the present invention;
图5为本法明实施例提供的一种管理双活存储阵列和仲裁服务器连接中 断后管理双活阵列的方法流程图;5 is a flowchart of a method for managing an active-active storage array after the connection between the active-active storage array and the arbitration server is interrupted, provided by an embodiment of the present invention;
图6为本发明实施例提供的一种管理双活存储阵列流程图;FIG. 6 is a flowchart of managing a dual-active storage array according to an embodiment of the present invention;
图7为本发明实施例提供的一种管理双活阵列存储阵列的结构图;FIG. 7 is a structural diagram of a storage array for managing active-active arrays according to an embodiment of the present invention;
图8为本发明实施例提供的一种仲裁服务器故障后的管理双活存储阵列 的结构图;8 is a structural diagram of a management active-active storage array after an arbitration server failure according to an embodiment of the present invention;
图9为本发明实施例提供的一种存储阵列设备示意图。FIG. 9 is a schematic diagram of a storage array device according to an embodiment of the present invention.
具体实施方式Detailed ways
下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solutions of the present invention will be further described in detail below through the accompanying drawings and embodiments.
在本发明的实施例应用于存储系统中,所述存储系统包括两个存储阵列 和一个主机,并且,两个存储阵列都能接受主机发送的数据。所述两个存储 阵列还相互连接,从而在一个存储阵列接收主机数据时,另一个存储阵列对 接收主机数据的存储阵列接收的主机数据进行备份。当接收主机数据的存储 阵列与主机链路故障时,备份的存储阵列能够代替当前正在接收主机数据的 存储阵列继续接收主机发送的数据。当两个存储阵列之间的链路断开时即为 脑裂。When the embodiment of the present invention is applied to a storage system, the storage system includes two storage arrays and one host, and both storage arrays can accept data sent by the host. The two storage arrays are also connected to each other so that when one storage array receives host data, the other storage array backs up the host data received by the storage array that receives the host data. When the link between the storage array receiving host data and the host fails, the backup storage array can continue to receive data sent by the host instead of the storage array currently receiving host data. A split-brain occurs when the link between two storage arrays goes down.
需要注意的是,在本发明的实施例中,所述主机可以是一个集群,集群 中包括多个设备,集群中的任意一个设备都能够向任意一个存储阵列发送数 据。例如,主机包括第一设备和第二设备,与主机连接的包括第一存储阵列 和第二存储阵列。当第一存储阵列接收主机发送的数据时,数据由第一设备 发送。当第二存储阵列接收主机发送的数据时,数据由第二设备发送。It should be noted that, in this embodiment of the present invention, the host may be a cluster, the cluster includes multiple devices, and any device in the cluster can send data to any storage array. For example, the host includes a first device and a second device, and connected to the host includes a first storage array and a second storage array. When the first storage array receives data sent by the host, the data is sent by the first device. When the second storage array receives data sent by the host, the data is sent by the second device.
下面,结合图1对本发明上述的装置作出更直观的解释。图1为本发明 实施例的一种双活存储阵列的连接关系图。如图1所示,存储阵列中包括主 机104、仲裁服务器103、第一存储阵列101和第二存储阵列102。第一存储 阵列101和第二存储阵列102分别包括存储介质和存储控制器,存储介质用 于存储主机104发送的数据。存储控制器包括控制器和存储单元,存储单元 用于存储控制器的控制指令,控制器用于执行存储单元存储的各种操作指令, 以完成对数据的各种操作。Below, a more intuitive explanation will be given to the above-mentioned device of the present invention with reference to FIG. 1 . FIG. 1 is a connection diagram of a dual-active storage array according to an embodiment of the present invention. As shown in FIG. 1 , the storage array includes a
主机104用于对第一存储阵列101或第二存储阵列102发出输入输出 (input/output,简称IO)请求。The
仲裁服务器103用于对主机104与第一存储阵列101进行IO操作或主机 104与第二存储阵列102进行IO操作进行仲裁。The
第一存储阵列101和第二存储阵列102分别与主机104连接,并且能够 接收主机104发送的IO请求。在本发明的实施例中,当存储系统开始工作时, 将第一存储阵列和第二存储阵列中的一个设置为主存储阵列,直接接收主机 104发送的IO请求。另一个设置为备份存储阵列,用于对主存储阵列接收主 机数据的内容进行备份。在另一种可能出现的情况中,一个存储阵列设置为 主存储阵列,主要接收主机104发送的IO请求。另一个存储阵列为副存储阵 列,用于接收主机104发送的部分IO请求,主存储阵列和副存储阵列相互备 份。本发明实施例主要针对上述的第一种使用情况进行讨论,但本发明实施 例中用到的控制方法、设备也同样适用于第二种使用情况。The
在一个例子中,第一存储阵列101和第二存储阵列102采用差异化配置。 一个存储阵列的处理能力较强,另一个存储阵列的处理能力较弱。该双活阵 列工作时,处理能力较强的存储阵列为主存储阵列,处理能力较弱的存储阵 列为副存储阵列。In one example, the
第一存储阵列101和第二存储阵列102之间包括有内部连接,内部连接 能够获取对方存储阵列的连接状态,以及用于为对方存储阵列的内容进行备 份。An internal connection is included between the
仲裁服务器103分别与第一存储阵列101和第二存储阵列102连接,从 而使各个存储阵列能够向仲裁服务器103发送仲裁文件,以及仲裁服务器103 将仲裁结果发送给各个存储阵列。The
第一存储阵列101和第二存储阵列102与主机104连接时还各自实时统 计接收主机数据的总量。第一存储阵列101和第二存储阵列102之间还可以 对接收主机数据的总量进行对比,数据比较的方法可以是在任意设备上的, 本发明在此不作限定。例如,第一存储阵列101或第二存储阵列102将统计 的接收主机数据的总量发送至主存储阵列,在主存储阵列上对接收主机数据 的总量进行对比,第一存储阵列和第二存储阵列还分别保存各个的对比结果。When the
在一个例子中,在第一存储阵列上进行接收主机数据总量的对比,第二 存储阵列将把统计的接收主机数据的总量发送至主存储阵列。第一存储阵列 将接收第二存储阵列发送的第二存储阵列接收主机数据的总量。例如,第一 存储阵列为开始时接收主机数据的存储阵列,因此,第一存储阵列接收主机 数据总量大于第二存储阵列接收主机数据的总量。In one example, the comparison of the total amount of received host data is performed on the first storage array, and the second storage array will send the counted total amount of received host data to the primary storage array. The first storage array will receive the total amount of host data that the second storage array will receive from the second storage array. For example, the first storage array is a storage array that initially receives host data, so the total amount of host data received by the first storage array is greater than the total amount of host data received by the second storage array.
本领域技术人员知道,也可以在第二存储阵列中进行接收主机数据总量 的对比,将对比结果发送到第一存储阵列。更可以两个存储阵列相互发送接 收主机数据总量的统计结果,在两个存储阵列中分别进行对比,并将对比结 果发送至对方。Those skilled in the art know that the comparison of the total amount of received host data can also be performed in the second storage array, and the comparison result is sent to the first storage array. In addition, the two storage arrays can send and receive the statistical results of the total host data to each other, compare the two storage arrays respectively, and send the comparison results to each other.
在本发明的实施例中,第一存储阵列和第二存储阵列每隔一定时间进行 一次对比。第一存储阵列和第二存储阵列对对比的结果进行更新。In the embodiment of the present invention, the first storage array and the second storage array are compared at regular intervals. The first storage array and the second storage array update the comparison result.
当第一存储阵列101和第二存储阵列102之间的连接断开时即为脑裂。 脑裂时,各自存储阵列不能获取对方存储阵列接收主机数据的情况,因此, 需要通过仲裁服务器对各个存储阵列接收主机数据情况进行仲裁。通过仲裁 服务器确定哪个存储阵列接收主机的数据。A split brain occurs when the connection between the
各个存储阵列向仲裁服务器103发送仲裁请求,以用于获得仲裁结果。 接收主机数据的总量多的存储阵列实时向仲裁服务器103提交仲裁请求,接 收主机数据的总量少的存储阵列延迟一段预设的时间向仲裁服务器103提交 仲裁请求。于是,根据本发明实施例前述假设的接收主机数据总量,第一存 储阵列101在脑裂时立即向仲裁服务器103中发送仲裁请求,第二存储阵列102在脑裂后的的一个预设的时间段后发送仲裁请求。Each storage array sends an arbitration request to the
在一个例子中,接收主机数据的总量少的存储阵列将在检测到脑裂后的3 秒至10秒钟内向仲裁服务器发送仲裁请求。在一个更具体的例子中,接收主 机数据总量少的存储阵列将延迟时间5秒向仲裁服务器发送仲裁请求。In one example, a storage array that receives a small amount of host data will send an arbitration request to the arbitration server within 3 seconds to 10 seconds after a split brain is detected. In a more specific example, a storage array with a small amount of data from the receiving host will send an arbitration request to the arbitration server with a delay of 5 seconds.
仲裁服务器103将根据仲裁请求及仲裁原则进行仲裁,并将仲裁结果发 送给第一存储阵列和第二存储阵列。在本发明的实施例中,仲裁原则可以是 先到先得,即:仲裁服务器103先收到哪个存储阵列发送的仲裁请求,就判 定哪个存储阵列获胜,该存储阵列接收主机发送的数据。在通常请求下,实 时发送仲裁请求的存储阵列将仲裁获胜,从而使该存储阵列继续接收主机发 送的数据。The
当一个双活阵列出现脑裂时,存储系统中设定主存储阵列在开始工作时 接收主机发送的数据。当主存储阵列与仲裁服务器103没有故障的情况下, 主存储阵列将仲裁获胜,主存储阵列将继续接收主机发送的数据。主存储阵 列仲裁获胜,从而使脑裂时接收主机数据的存储阵列仲裁获胜,不需要做接 收主机的存储阵列的切换。于是,第一存储阵列101将继续与主机连接,从 而达到不需要更换存储阵列的效果。When a split-brain occurs in an active-active array, the storage system is configured to set the primary storage array to receive data sent by the host when it starts working. When the main storage array and the
在本发明的实施例中,上述对第一存储阵列和第二存储阵列接收主机数 据的总量进行对比,优先使接收主机数据总量多的存储阵列获得继续接收主 机发送的数据只是本发明实施例的其中一种具体实施方法,不能用于对本发 明的限定。In the embodiment of the present invention, the total amount of host data received by the first storage array and the second storage array is compared above, and the storage array that receives more host data is given priority to continue to receive the data sent by the host, which is only the implementation of the present invention. One of the specific implementation methods in the example cannot be used to limit the present invention.
在一个例子中,还可以采用一种直接仲裁的方法,当脑裂时,其中一个 正在接收主机发送的数据的存储阵列继续接收主机发送的数据,从而避免了 脑裂时切换接收主机数据的存储阵列可能造成的影响。In an example, a direct arbitration method can also be used. When split brain occurs, one of the storage arrays that is receiving the data sent by the host continues to receive the data sent by the host, thereby avoiding switching the storage that receives the host data when split brain occurs. possible effects of the array.
图2为本发明实施例提供的一种管理双活存储阵列的方法流程图。所述 方法应用于存储系统中,存储系统包括第一存储阵列、第二存储阵列、仲裁 服务器和主机。第一存储阵列和第二存储阵列能够接收主机发送的数据。第一存储阵列和第二存储阵列连接,从而对对方存储阵列的数据进行备份以及 获取对方存储阵列接收主机数据的状态和接收主机数据的总量。第一存储阵 列和第二存储阵列还分别与仲裁服务器连接,从而在第一存储阵列和第二存 储阵列连接断开时通过仲裁服务器仲裁确定哪个存储阵列接收主机发送的数据。所述方法的执行主体为第一存储阵列。如图2所示,所述方法包括:FIG. 2 is a flowchart of a method for managing a dual-active storage array according to an embodiment of the present invention. The method is applied to a storage system, and the storage system includes a first storage array, a second storage array, an arbitration server and a host. The first storage array and the second storage array can receive data sent by the host. The first storage array is connected to the second storage array, so as to back up the data of the other storage array and obtain the state of the host data received by the other storage array and the total amount of the host data received. The first storage array and the second storage array are also respectively connected with the arbitration server, so that when the first storage array and the second storage array are disconnected, the arbitration server arbitrates to determine which storage array receives the data sent by the host. The execution body of the method is the first storage array. As shown in Figure 2, the method includes:
S201,统计接收主机发送的数据的总量。S201, the total amount of data sent by the receiving host is counted.
第一存储阵列实时统计接收主机数据的总量,并将统计结果记录在存储 阵列中。The first storage array counts the total amount of received host data in real time, and records the statistical results in the storage array.
S202,接收第二存储阵列统计的接收主机数据的总量。S202: Receive the total amount of received host data counted by the second storage array.
第二存储阵列实时统计接收主机发送的数据的总量,并将统计结果记录 在存储阵列内。其中一个存储阵列中设置对比模块,对比模块所在存储阵列 将获得对方存储阵列接收主机发送的数据的总量。在本发明的实施例中,对 比模块设置在第一存储阵列。第二存储阵列还将统计的接收主机数据的总量 发送给第一存储阵列。The second storage array counts the total amount of data sent by the receiving host in real time, and records the statistical result in the storage array. A comparison module is set in one of the storage arrays, and the storage array where the comparison module is located will obtain the total amount of data sent from the host by the other storage array. In the embodiment of the present invention, the comparison module is arranged in the first storage array. The second storage array also sends the counted total amount of received host data to the first storage array.
在一个例子中,对比模块可以设置在第二存储阵列中,第一存储阵列将 统计的接收主机数据的总量发送到第二存储阵列。对比模块也可以同时设置 在第一存储阵列和第二存储阵列中,第一存储阵列和第二存储阵列相互发送 各个统计的接收主机数据的总量。第一存储阵列和第二存储阵列相互发送统 计的结果。In one example, the comparison module may be disposed in the second storage array, and the first storage array sends the total amount of the received host data to the second storage array. The comparison module can also be arranged in the first storage array and the second storage array at the same time, and the first storage array and the second storage array send each statistical total amount of the received host data. The first storage array and the second storage array send statistical results to each other.
S203,确定第一存储阵列接收主机发送的数据的总量小于第二存储阵列。S203. Determine that the total amount of data sent by the host received by the first storage array is smaller than that of the second storage array.
对比单元是将各个存储阵列接收主机数据的总量进行对比,并将比较的 结果分别发送到第一存储阵列和第二存储阵列。在一个例子中,第一存储阵 列和第二存储阵列还分别对第一存储阵列和第二存储阵列接收主机数据总量 对比的结果进行存储,从而在需要时,确定自身存储阵列接收主机数据的总 量是否大于对方存储阵列。The comparison unit compares the total amount of host data received by each storage array, and sends the comparison results to the first storage array and the second storage array respectively. In one example, the first storage array and the second storage array also store the results of comparing the total amount of host data received by the first storage array and the second storage array, respectively, so as to determine the amount of host data received by their own storage arrays when necessary. Whether the total amount is greater than that of the other storage array.
在一个例子中,第一存储阵列和第二存储阵列对接收主机数据总量对比 结果的存储是通过标记完成。根据对比结果,相对于另一存储阵列,接收主 机数据总量多的存储阵列将将被标记为优先站点,接收主机数据总量少的存 储阵列将被标记为非优先站点。通过优先站点和非优先站点确定自身存储阵 列与对方存储阵列接收数据的多少。In one example, the first storage array and the second storage array store the comparison result of the total amount of received host data by marking. According to the comparison results, compared to another storage array, the storage array that receives more host data will be marked as a priority site, and the storage array that receives less host data will be marked as a non-priority site. Determine the amount of data received by the own storage array and the other storage array through the priority site and the non-priority site.
在本发明的实施例中,对接收主机数据总量多少的对比是持续的,所述 持续可以是固定时间进行一次对比。存储阵列将根据每次对比的结果进行标 记。In the embodiment of the present invention, the comparison of the total amount of the received host data is continuous, and the duration may be a fixed time to perform a comparison. The storage array will be marked based on the results of each comparison.
在本发明的实施例中,假设对比单元确定第一存储阵列接收主机的数据 少,第二存储阵列接收主机的数据多。In the embodiment of the present invention, it is assumed that the comparison unit determines that the first storage array receives less data from the host, and the second storage array receives more data from the host.
S204,第一存储阵列和第二存储阵列脑裂时,第一存储阵列延迟一段预 设的时间向仲裁服务器发送仲裁请求。S204, when the first storage array and the second storage array are split-brained, the first storage array sends an arbitration request to the arbitration server after a preset period of time.
当第一存储阵列和第二存储阵列之间的链路发送故障时即第一存储阵列 和第二存储阵列脑裂。此时,第一存储阵列和第二存储阵列分别需要向仲裁 服务器发送仲裁请求。由于存储阵列之间第一存储阵列接收主机数据的总量 少,第二存储阵列接收主机数据的总量多,因此,第二存储阵列将实时向仲 裁服务器发送仲裁请求,第一存储阵列将延迟一段预设的时间向仲裁服务器 发送仲裁请求。在本发明的实施例中,预设的延迟时间可以是3秒至10秒的 任意时长。When the link transmission between the first storage array and the second storage array fails, the first storage array and the second storage array are split-brained. At this time, the first storage array and the second storage array need to send arbitration requests to the arbitration server respectively. Because the total amount of host data received by the first storage array is small, and the total amount of host data received by the second storage array is large, the second storage array will send an arbitration request to the arbitration server in real time, and the first storage array will delay Send an arbitration request to the arbitration server for a preset period of time. In the embodiment of the present invention, the preset delay time may be any length from 3 seconds to 10 seconds.
在一个例子中,预设的延迟时间是5秒。In one example, the preset delay time is 5 seconds.
S205,接收所述仲裁服务器发送的仲裁结果。S205: Receive the arbitration result sent by the arbitration server.
仲裁服务器将根据仲裁请求及仲裁原则作出仲裁结果。优选的,仲裁原 则可以是先到先得,即:仲裁服务器先收到哪个存储阵列发送的仲裁请求, 就判定哪个存储阵列获胜。The arbitration server will make the arbitration result according to the arbitration request and arbitration principle. Preferably, the arbitration principle may be first-come, first-served, that is, the arbitration server first receives the arbitration request sent by which storage array, and determines which storage array wins.
由于第一存储阵列延迟一段预设的时间向仲裁服务器发送仲裁请求,当 第二存储阵列与仲裁服务器之间的链路不发生故障时,仲裁服务器将首先收 到第二存储阵列发送的仲裁请求。第一存储阵列收到的仲裁结果指示由第二 存储阵列继续接收主机发送的数据。根据仲裁结果,第一存储阵列将不接收 主机发送的数据,第二存储阵列将接收主机发送的数据。Since the first storage array delays sending the arbitration request to the arbitration server for a preset time, when the link between the second storage array and the arbitration server does not fail, the arbitration server will first receive the arbitration request sent by the second storage array . The arbitration result received by the first storage array indicates that the second storage array continues to receive the data sent by the host. According to the arbitration result, the first storage array will not receive the data sent by the host, and the second storage array will receive the data sent by the host.
图3为本发明实施例提供的一种双活存储阵列仲裁服务器故障后的系统 连接图。图4为本发明实施提供的一种双活存储阵列仲裁服务器连接断开后 的系统连接图。如图3和图4所示,包括括主机104、仲裁服务器103、第一 存储阵列101和第二存储阵列102。仲裁服务器分别与第一存储阵列以及第二 存储阵列连接。第一存储阵列和第二存储阵列均和至少一个主机连接,并且 所述第一存储阵列和第二存储阵列都能够接收主机的数据。Fig. 3 is a system connection diagram after a failure of a dual-active storage array arbitration server according to an embodiment of the present invention. Fig. 4 is a system connection diagram after disconnection of the arbitration server of a dual-active storage array provided by the implementation of the present invention. As shown in FIG. 3 and FIG. 4 , it includes a
第一存储阵列101和第二存储阵列102各自实时统计接收主机发送的数 据的总量。第一存储阵列101或第二存储阵列102中的一个还可以对接收主 机发送的数据的总量进行对比,例如,第一存储阵列101可以对接收主机发 送的数据的总量进行对比。第二存储阵列102将把实时统计的接收主机数据 的总量发送至第一存储阵列101中,从而通过对比确定第一存储阵列和第二 存储阵列接收数据的多少。在本实施例中,假定第一存储阵列101接收主机 的数据的总量多,第二存储阵列102接收主机发送的数据的总量少。Each of the
在存储阵列进行工作的过程中,还将与仲裁服务器103进行通信,保证 存储阵列与仲裁服务器103的连接正常,以便需要仲裁服务器103仲裁时仲 裁服务器103能够接受仲裁请求以及向存储阵列发送仲裁结果。During the working process of the storage array, it will also communicate with the
若其中的某一个存储阵列,例如,第一存储阵列101检测到与仲裁服务器 103连接断开后,第一存储阵列101将判定当前双活阵列通过哪个主体确定接 收主机数据的存储阵列。If one of the storage arrays, for example, after the
如当前接收主机数据的存储阵列通过仲裁服务器确定,则第一存储阵列 101将发送消息至第二存储阵列102,以使第二存储阵列102检测(例如采用 心跳机制检测)第二存储阵列是否与仲裁服务器103断开。若第二存储阵列 102与仲裁服务器103断开(包括如3和图4所示的情况),则第二存储阵列 102将向第一存储阵列101发送查询结果。在本发明的实施例中,第二存储阵 列向第一存储阵列返回的查询结果确定第二存储阵列与仲裁服务器链路故 障。当第一存储阵列确定第一存储阵列101与第二存储阵列102都与仲裁服 务器103断开,第一存储阵列101将与第二存储阵列102协商。将接收主机 数据的存储阵列通过仲裁服务器确定改为通过存储阵列确定。协商结果将分 别发送至第一存储阵列101和第二存储阵列102,第一存储阵列101和第二存 储阵列102将根据协商结果进行切换。If the storage array currently receiving the host data is determined by the arbitration server, the
如当前接收主机数据由存储阵列确定,则将确定第一存储阵列101接收 主机数据的总量是否为最多,若第一存储阵列101接收主机数据总量最多则 第一存储阵列接收主机数据,若第一存储阵列101不是接收主机数据最多的 存储阵列,则不接收主机数据。由于本实施例中,由于提前假定第一存储阵 列101接收主机数据总量为最多,因此,第一存储阵列101将接收主机发送 的数据。If the currently received host data is determined by the storage array, it will be determined whether the total amount of host data received by the
若第二存储阵列102与仲裁服务器103连接正常,则不发生任何操作(如 图1所示连接结构),接收主机数据的存储阵列将继续接收主机发送的数据。If the connection between the
若第一存储阵列和第二存储阵列发生脑裂时,与仲裁服务器103连接正 常的存储阵列将发送仲裁文件至仲裁服务器103中。与仲裁服务器103连接 断开的存储阵列将不能发送仲裁请求至仲裁服务器103中,从而与仲裁服务 器103连接正常的存储阵列将接收主机发送的数据。If a split brain occurs between the first storage array and the second storage array, the storage array that is normally connected to the
上述通过第一存储阵列101进行协商等,仅为本发明实施例的具体实现 方式,不用于对本发明实施例的限定。在本发明的上述实施例中,也可以设 置为通过第二存储阵列102进行协商。The foregoing negotiation through the
为了让双活阵列与仲裁服务器的连接断开表述的更清楚,图5为本法明 实施例提供的一种管理双活存储阵列和仲裁服务器连接中断后管理双活阵列 的方法流程图。所述方法应用于存储系统中,包括第一存储阵列、第二存储 阵列、仲裁服务器和主机。第一存储阵列和第二存储阵列能够接收主机发送 的数据。第一存储阵列和第二存储阵列相互连接,从而对对方存储阵列的数 据进行备份以及获取对方存储阵列接收主机数据的状态。第一存储阵列和第 二存储阵列还分别与仲裁服务器连接,从而在第一存储阵列和第二存储阵列 连接断开时通过仲裁服务器仲裁确定哪个存储阵列接收主机的数据。所述方 法的执行主体为第一存储阵列。如图5所示,所示方法具体包括:In order to make the description of the disconnection between the active-active storage array and the arbitration server clearer, FIG. 5 is a flowchart of a method for managing the active-active storage array after the connection between the active-active storage array and the arbitration server is interrupted, provided by this embodiment of the present invention. The method is applied to a storage system, including a first storage array, a second storage array, an arbitration server and a host. The first storage array and the second storage array are capable of receiving data sent by the host. The first storage array and the second storage array are connected to each other, so as to back up the data of the other storage array and obtain the status of the data received from the host by the other storage array. The first storage array and the second storage array are also respectively connected to the arbitration server, so that when the first storage array and the second storage array are disconnected, the arbitration server arbitrates to determine which storage array receives the data of the host. The execution body of the method is the first storage array. As shown in Figure 5, the shown method specifically includes:
S501,统计第一存储阵列接收主机发送的数据的总量。S501: Count the total amount of data sent by the host received by the first storage array.
第一存储阵列实时统计接收主机数据的总量,并将统计结果记录在存储 阵列中。The first storage array counts the total amount of received host data in real time, and records the statistical results in the storage array.
S502,接收第二存储阵列统计的接收主机数据的总量。S502: Receive the total amount of received host data counted by the second storage array.
第二存储阵列实时统计接收主机数据的总量,并将统计结果记录在存储 阵列内。其中一个存储阵列中设置对比模块,对比模块将获得存储阵列的接 收主机数据的总量。在一个例子中,对比模块设置在第一存储阵列。第二存 储阵列还将统计的接收主机数据的总量发送给第一存储阵列。The second storage array counts the total amount of received host data in real time, and records the statistical results in the storage array. A comparison module is set in one of the storage arrays, and the comparison module will obtain the total amount of host data received by the storage array. In one example, the comparison module is provided in the first storage array. The second storage array also sends the total amount of received host data to the first storage array.
S503,确定所述第一存储阵列接收所述主机发送的数据的总量大于所述 第二存储阵列接收所述主机发送的数据的总量。S503: Determine that the total amount of data sent by the host received by the first storage array is greater than the total amount of data sent by the host received by the second storage array.
对比单元是将各个存储阵列接收主机数据的总量进行对比,并将比较的 结果分别发送到第一存储阵列和第二存储阵列。在一个例子中,第一存储阵 列和第二存储阵列还分别对第一存储阵列和第二存储阵列接收主机数据总量 对比的结果进行存储,从而在需要时,确定自身存储阵列接收主机数据的总 量是否比对方存储阵列多。The comparison unit compares the total amount of host data received by each storage array, and sends the comparison results to the first storage array and the second storage array respectively. In one example, the first storage array and the second storage array also store the results of comparing the total amount of host data received by the first storage array and the second storage array, respectively, so as to determine the amount of host data received by their own storage arrays when necessary. Whether the total amount is more than the other storage array.
在本发明的实施例中,假设对比单元确定第一存储阵列接收主机的数据 总量多,第二存储阵列接收主机的数据总量少。In the embodiment of the present invention, it is assumed that the comparison unit determines that the first storage array receives a large amount of data from the host, and the second storage array receives a small amount of data from the host.
S504,第一存储阵列和第二存储阵列与仲裁服务器之间通信发生故障, 且第一存储阵列与第二存储阵列之间链路发生故障时,继续接收所述主机发 送的数据。S504, when the communication between the first storage array and the second storage array and the arbitration server fails, and the link between the first storage array and the second storage array fails, continue to receive the data sent by the host.
当第一存储阵列检测到与仲裁服务器连接断开后,第一存储阵列将判定 当前双活阵列中接收主机数据的存储阵列由谁确定。After the first storage array detects that it is disconnected from the arbiter server, the first storage array will determine who determines the storage array that receives the host data in the current active-active array.
如当前接收主机数据的存储阵列由仲裁服务器确定,则发送验证消息至 第二存储阵列,使第二存储阵列检测(例如采用心跳机制检测)是否与仲裁 服务器连接断开。若第二存储阵列向第一存储阵列返回与仲裁服务器连接正 常,则不产生任何操作。当前正在接收主机数据的存储阵列将继续接收主机 发送的数据。If the storage array currently receiving host data is determined by the arbitration server, a verification message is sent to the second storage array, so that the second storage array detects (for example, using a heartbeat mechanism) whether the connection with the arbitration server is disconnected. If the second storage array returns to the first storage array that the connection with the arbiter server is normal, no operation is performed. A storage array that is currently receiving data from the host will continue to receive data from the host.
此时,若存储阵列中的第一存储阵列和第二存储阵列链路断开时,与仲 裁服务器连接正常的存储阵列将发送仲裁请求至仲裁服务器,而与仲裁服务 器连接断开的存储阵列将不能发送仲裁请求至仲裁服务器,仲裁服务器将根 据接收的仲裁请求发出仲裁结果。仲裁结果指示,与仲裁服务器连接正常的 存储阵列将接收主机发送的数据。At this time, if the link between the first storage array and the second storage array in the storage array is disconnected, the storage array that is normally connected to the quorum server will send an arbitration request to the quorum server, while the storage array that is disconnected from the quorum server will send an arbitration request to the quorum server. The arbitration request cannot be sent to the arbitration server, and the arbitration server will issue the arbitration result according to the received arbitration request. The quorum result indicates that the storage array that is properly connected to the quorum server will receive the data sent by the host.
若第一存储阵列获取第二存储阵列与仲裁服务器连接断开的消息后,第 一存储阵列将和第二存储阵列协商,将确定接收主机发送数据的存储阵列由 仲裁服务器确定修改为由存储阵列确定。协商结果将分别发送至第一存储阵 列101和第二存储阵列102,第一存储阵列101和第二存储阵列102将根据协 商结果进行切换。If the first storage array receives the message that the second storage array is disconnected from the arbitration server, the first storage array will negotiate with the second storage array, and the storage array determined to receive the data sent by the host will be changed by the arbitration server to the storage array determined by the storage array. Sure. The negotiation result will be sent to the
如当前接收主机数据由存储阵列确定,则将确定第一存储阵列101接收 主机数据的总量是否为最多,若第一存储阵列101接收主机数据总量最多则 第一存储阵列接收主机数据,若第一存储阵列101不是接收主机数据最多的 存储阵列,则不接收主机数据。由于本实施例中,由于提前假定第一存储阵 列101接收主机数据总量为最多,因此,第一存储阵列101将接收主机发送 的数据。If the currently received host data is determined by the storage array, it will be determined whether the total amount of host data received by the
下面,通过一个具体的例子对本发明实施例管理双活存储阵列进行详细 的说明。图6为本发明实施例提供的一种管理双活存储阵列流程图。如图6 所示,该方法流程以存储阵列中的主存储阵列为执行主体。本发明实施例的 流程是以在图1所示的硬件结构作为整体进行执行为基础,包括第一存储阵 列、第二存储阵列、仲裁服务器和主机,其中各个部分的功能与图1所示相 同。此处将主存储阵列定义为第一存储阵列(也可以为定义为第二存储阵列, 在此不作限定),主存储阵列还用于对第一存储阵列和第二存储阵列接收主 机数据时长进行对比,并对对比结果进行保存。在通常情况下,双活阵列在 刚开始进行工作时设定主存储阵列接收主机发送的数据,另一个存储阵列用 于备份。In the following, the management of the active-active storage array according to the embodiment of the present invention will be described in detail through a specific example. FIG. 6 is a flowchart of managing a dual-active storage array according to an embodiment of the present invention. As shown in Figure 6, the method process takes the main storage array in the storage array as the execution body. The process of the embodiment of the present invention is based on the hardware structure shown in FIG. 1 as a whole, including a first storage array, a second storage array, an arbitration server, and a host, and the functions of each part are the same as those shown in FIG. 1 . . Here, the main storage array is defined as the first storage array (it may also be defined as the second storage array, which is not limited here), and the main storage array is also used to perform the first storage array and the second storage array for receiving host data. Compare and save the comparison results. Under normal circumstances, when the active-active array starts working, the primary storage array is set to receive the data sent by the host, and the other storage array is used for backup.
当存储系统开始工作时,执行步骤601。When the storage system starts to work,
主存储阵列将定时统计接收主机数据的总量。The main storage array will periodically count the total amount of received host data.
主存储阵列将循环的统计接收主机数据的总量并进行更新,在主存储阵 列统计接收主机数据的数据的总量后,将执行步骤602。The main storage array will cyclically count and update the total amount of data received from the host. After the main storage array has counted the total amount of data received from the host, step 602 will be executed.
第一存储阵列101接收第二存储阵列102统计的接收主机数据总量,第 一存储阵列对第一存储阵列和第二存储阵列统计的与主机发送的数据的总量 进行对比。The
在本发明的具体实施例中,由于第一存储阵列设定为刚开始工作时的业 务接管存储阵列,因此第一存储阵列接收主机数据总量比第二存储阵列接收 主机数据的总量多。In a specific embodiment of the present invention, since the first storage array is set to take over the storage array when the business first starts to work, the total amount of host data received by the first storage array is greater than that of the second storage array.
在存储阵列进行工作的过程中,还将与仲裁服务器103进行通信,保证 存储阵列与仲裁服务器的连接正常,以便需要仲裁服务器仲裁时仲裁服务器 能够接受仲裁请求以及向存储阵列发送仲裁结果。During the working process of the storage array, it will also communicate with the
当主存储阵列检测到与仲裁服务器连接正常,则执行步骤613。若主存储 阵列检测到与仲裁服务器连接断开,则执行步骤604。When the main storage array detects that the connection with the arbitration server is normal,
主存储阵列进行工作的过程中,第一存储阵列和第二存储阵列之间还将 随时保持通信,以判定第一存储阵列和第二存储阵列之间的连接是否断开。During the working process of the main storage array, communication between the first storage array and the second storage array will be maintained at any time to determine whether the connection between the first storage array and the second storage array is disconnected.
若检测到第一存储阵列和第二存储阵列之间的连接正常时,即不脑裂时, 不发生脑裂,则执行663步骤,不进行其它操作。If it is detected that the connection between the first storage array and the second storage array is normal, that is, when there is no split-brain, no split-brain occurs, then step 663 is performed, and no other operations are performed.
若第一存储阵列和第二存储阵列之间发生脑裂,则执行623步骤。If a split brain occurs between the first storage array and the second storage array,
判断当前存储阵列接收主机数据总量是否为最多,若当前存储阵列接收 主机数据最多,则执行643步骤。Determine whether the current storage array receives the most host data in total, and if the current storage array receives the most host data, perform
立即向仲裁服务器发送仲裁请求。Immediately send an arbitration request to the arbitration server.
若当前存储阵列为接收主机发送的数据不为最多,则执行633步骤。If the current storage array does not receive the most data sent by the host, perform
延迟一段预设的时间向仲裁服务器发送仲裁请求。Delays sending an arbitration request to the arbitration server for a preset period of time.
当执行完成633或643步骤后,则执行653步骤,获取仲裁服务器发出 的仲裁结果,根据仲裁结果确定接收主机发送的数据的存储阵列。After
在本发明的实施例中,仲裁服务器的仲裁原则是先到先得,于是接收主 机发送的数据总量多的存储阵列仲裁获胜,继续接收主机发送的数据。In the embodiment of the present invention, the arbitration principle of the arbitration server is first-come, first-served, so the storage array that receives the most data sent by the host wins the arbitration and continues to receive the data sent by the host.
在执行604步骤中,将判断存储阵列当前由谁确定接收主机发送的数据 的存储阵列。第一存储阵列将向第二存储阵列发送确定消息,第二存储阵列 根据确定消息对第二存储阵列的接收主机发送数据的存储阵列由谁确定进行 查询。第二存储阵列在验证完成后向第一存储阵列返回验证结果。若由存储 阵列确定接收主机数据的存储阵列,则执行614步骤。若由仲裁服务器确定 当前存储阵列接收主机发送的数据的存储阵列,则执行605步骤。In executing
在执行614步骤的过程中,将判断当前存储阵列是否为接收主机数据最 多的存储阵列。若当前存储阵列为接收主机数据最多的存储阵列,则执行624 步骤。若当前存储阵列不为接收主机数据最多的存储阵列,则执行634步骤。In the process of executing
在执行624步骤中,当前存储阵列将接收主机发送的数据。In performing
在执行634步骤中,当前存储阵列将不接收主机发送的数据,当前存储 阵列将用于对接收主机发送的数据的存储阵列进行备份,从而在接收主机数 据的存储阵列故障时,能够无缝切换至当前备份的存储阵列。In
在执行605步骤的过程中,第一存储阵列将向第二存储阵列发送验证消 息,以确定第二存储阵列当前是否与仲裁服务器连接正常。若第二存储阵列 与仲裁服务器连接正常,则执行615步骤。若第二存储阵列与仲裁服务器连 接断开,则执行606步骤。During the execution of
在执行615步骤中,先判定第一存储阵列与第二存储阵列是否连接断开。In executing
若第一存储阵列与第二存储阵列连接正常,则执行645步骤。不进行其 它操作。If the connection between the first storage array and the second storage array is normal, step 645 is performed. No other operations are performed.
若第一存储阵列与第二存储阵列连接断开,则执行625步骤。If the first storage array is disconnected from the second storage array,
与仲裁服务器连接的存储阵列将发送仲裁请求至仲裁服务器中。仲裁服 务器根据接收的仲裁请求进行仲裁。由于第一存储阵列与仲裁服务器连接断 开,此时仲裁服务器只能接收到第二存储阵列发送的仲裁请求。The storage array connected to the quorum server will send the quorum request to the quorum server. The arbitration server conducts arbitration according to the received arbitration request. Since the first storage array is disconnected from the arbitration server, the arbitration server can only receive the arbitration request sent by the second storage array at this time.
在发送仲裁请求后,执行635步骤。After the arbitration request is sent,
获取仲裁结果,根据仲裁结果确定接收主机数据的存储阵列。由于仲裁 服务器只能收到第二存储阵列发送的仲裁请求,从而第二存储阵列将获得接 收主机发送的数据。Obtain the arbitration result, and determine the storage array that receives the host data according to the arbitration result. Since the arbitration server can only receive the arbitration request sent by the second storage array, the second storage array will obtain the data sent by the receiving host.
在执行606步骤前,第二存储阵列与仲裁服务器连接断开,并将该结果 返回至第一存储阵列。Before executing
从而在606步骤中,第一存储阵列将根据返回结果,与第二存储阵列协 商将由仲裁服务器确定接收主机数据的存储阵列改为由存储阵列确定接收主 机数据的存储阵列。第一存储阵列和第二存储阵列将根据协商结果进行更换。Therefore, in
当存储阵列切换为由存储阵列确定接收主机的数据的存储阵列后,将执 行607步骤。After the storage array is switched to the storage array determined by the storage array to receive the data of the host, step 607 will be executed.
若当前存储阵列接收主机数据为最多,则执行609步骤。若当前存储阵 列接收主机数据不为最多,则执行608步骤。If the current storage array receives the most host data,
在执行624步骤中,当前存储阵列将接收主机发送的数据。In performing
在执行634步骤中,当前存储阵列将不接收主机发送的数据,当前存储 阵列将用于对接收主机数据的存储阵列备份,当接收主机发送的数据的存储 阵列故障时能够无缝切换至当前备份的存储阵列。In
在本发明的具体实施例中,还包括一种双活阵列中存储阵列的结构图, 所述存储阵列可以是图1所示的101或102。下面以存储阵列101为例进行详 细的说明。图7为本发明实施例提供的一种双活阵列存储阵列的结构图,如 图7所示,包括统计单元711、处理单元712、接收单元713。In a specific embodiment of the present invention, a structure diagram of a storage array in an active-active array is also included, and the storage array may be 101 or 102 shown in FIG. 1 . The following takes the
统计单元711,用于统计所述第一存储阵列接收所述主机发送的数据的总 量;以及,用于接收所述第二存储阵列发送的所述第二存储阵列接收所述主 机发送的数据的总量。A counting unit 711, configured to count the total amount of data sent by the first storage array and received by the host; and configured to receive data sent by the second storage array and received by the second storage array from the host total amount.
处理单元712,用于确定所述第一存储阵列接收所述主机发送的数据的总 量小于所述第二存储阵列接收所述主机发送的数据的总量;确定所述第一存 储阵列和所述第二存储阵列之间的链路发生故障时,延迟一段预设的时间段 向仲裁服务器发送仲裁请求,所述仲裁服务器分别与所述第一存储阵列、所 述第二存储阵列连接。The processing unit 712 is configured to determine that the total amount of data received by the first storage array and sent by the host is less than the total amount of data received by the second storage array and sent by the host; When a link between the second storage arrays fails, the arbitration request is sent to an arbitration server after a preset time period, and the arbitration server is respectively connected to the first storage array and the second storage array.
接收单元713,用于接收所述仲裁服务器发送的仲裁结果,所述仲裁结果 用于指示由所述第二存储阵列继续接受所述主机发送的数据。The receiving unit 713 is configured to receive an arbitration result sent by the arbitration server, where the arbitration result is used to instruct the second storage array to continue to accept the data sent by the host.
本发明实施例中的中的统计单元可以通过方法步骤中的S201、S202执 行,处理单元可以通过方法步骤中的S202、S203执行,接收单元可以通过方 法步骤中的S205执行。The statistical unit in the embodiment of the present invention may be executed through S201 and S202 in the method steps, the processing unit may be executed through S202 and S203 in the method steps, and the receiving unit may be executed through S205 in the method steps.
在本发明的实施例中,还包括图1所示的一种双活阵列仲裁单元故障的 存储阵列中,所述存储阵列的结构图。下面以第一存储阵列101为例进行说 明。图8为本发明实施例提供的一种仲裁服务器故障后的管理双活存储阵列 的结构图,如图8所示:所示存储阵列用于发出查询命令。包括统计单元811 和处理单元812。In the embodiment of the present invention, it also includes a structure diagram of the storage array in a storage array in which a dual-active array arbitration unit failure is shown in FIG. 1 . The
统计单元811,用于统计所述第一存储阵列接收所述主机发送的数据的总 量。以及,接收所述第二存储阵列发送的所述第二存储阵列接收所述主机发 送的数据的总量。A
处理单元813,用于确定所述第一存储阵列接收所述主机发送的数据的总 量大于所述第二存储阵列接收所述主机发送的数据的总量。以及,在所述第 一存储阵列与所述仲裁服务器之间的通信发生故障和第二存储阵列与所述仲 裁服务器之间的通信发生故障时,当所述第一存储阵列与所述第二存储阵列 之间的链路发生故障时,继续接收所述主机发送的数据。The processing unit 813 is configured to determine that the total amount of data sent by the host received by the first storage array is greater than the total amount of data sent by the host received by the second storage array. and, when the communication between the first storage array and the arbiter server fails and the communication between the second storage array and the arbiter server fails, when the first storage array and the second storage array fail When the link between the storage arrays fails, the data sent by the host continues to be received.
本发明实施例中的中的统计单元可以通过方法步骤中的S501执行,处理 单元可以通过方法步骤中的S502执行。The statistical unit in the embodiment of the present invention may be executed by S501 in the method step, and the processing unit may be executed by S502 in the method step.
图9为本发明实施例提供的一种存储阵列设备示意图。FIG. 9 is a schematic diagram of a storage array device according to an embodiment of the present invention.
如图9所示,所述设备包括:处理器901、存储器902、通信接口903和总 线904。其中,处理器901、存储器902和通信接口903通过总线904实现彼 此之间的通信连接。As shown in FIG. 9 , the device includes: a
处理器901可以采用通用的中央处理器(Central Processing Unit,CPU), 微处理器,应用专用集成电路(Application Specific Integrated Circuit, ASIC),或者一个或多个集成电路,用于执行相关程序,以实现前述本发明 方法实施例所提供的技术方案。The
存储器902可以是只读存储器(Read Only Memory,ROM),静态存储设 备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存 储器902可以存储操作系统和其他应用程序。在通过软件或者固件来实现本发 明实施例提供的技术方案时,用于实现本发明前述方法实施例提供的任一可 选技术方案的程序代码保存在存储器902中,并由处理器901来执行。通信接 口903用以与其他交换机或控制服务器通信。The
总线904可包括一通路,在设备各个部件(例如处理器901、存储器902和 通信接口903)之间传送信息。The
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的 各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来 实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能 一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来 执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每 个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为 超出本发明的范围。Professionals should be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods of implementing the described functionality for each particular application, but such implementations should not be considered beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理 器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器 (RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、 寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式 的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein may be implemented in hardware, a software module executed by a processor, or a combination of the two. A software module can be placed in random access memory (RAM), internal memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other device in the art. in any other known form of storage medium.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行 了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而 已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做 的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The specific embodiments described above further describe the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above descriptions are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510968100.8A CN106909307B (en) | 2015-12-22 | 2015-12-22 | Method and device for managing double-active storage array |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510968100.8A CN106909307B (en) | 2015-12-22 | 2015-12-22 | Method and device for managing double-active storage array |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106909307A CN106909307A (en) | 2017-06-30 |
| CN106909307B true CN106909307B (en) | 2020-01-03 |
Family
ID=59200727
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510968100.8A Active CN106909307B (en) | 2015-12-22 | 2015-12-22 | Method and device for managing double-active storage array |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106909307B (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107634846A (en) * | 2017-07-24 | 2018-01-26 | 杭州沃趣科技股份有限公司 | A kind of implementation of the dual-active system based on consistency algorithm |
| CN107995021A (en) * | 2017-10-20 | 2018-05-04 | 杭州沃趣科技股份有限公司 | A kind of implementation of the dual-active system based on priority |
| CN109964208B (en) | 2017-10-25 | 2021-07-09 | 华为技术有限公司 | A dual-active storage system and address allocation method |
| CN112612653B (en) * | 2018-08-31 | 2025-07-01 | 成都华为技术有限公司 | A business recovery method, device, arbitration server and storage system |
| CN112860480B (en) * | 2020-09-11 | 2022-09-09 | 华为技术有限公司 | A dual-active storage system and method for processing data |
| CN117614805B (en) * | 2023-11-21 | 2024-06-14 | 杭州沃趣科技股份有限公司 | Data processing system for monitoring state of data center |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6401150B1 (en) * | 1995-06-06 | 2002-06-04 | Apple Computer, Inc. | Centralized queue in network printing systems |
| CN103593266A (en) * | 2013-11-12 | 2014-02-19 | 浪潮(北京)电子信息产业有限公司 | ot standby method based on arbitration disk mechanism |
| CN104407814A (en) * | 2014-11-21 | 2015-03-11 | 华为技术有限公司 | Method and device for data double writing |
| CN105095125A (en) * | 2015-07-08 | 2015-11-25 | 北京飞杰信息技术有限公司 | Highly available double-control storage system and operation method thereof based on quorum disc |
-
2015
- 2015-12-22 CN CN201510968100.8A patent/CN106909307B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6401150B1 (en) * | 1995-06-06 | 2002-06-04 | Apple Computer, Inc. | Centralized queue in network printing systems |
| CN103593266A (en) * | 2013-11-12 | 2014-02-19 | 浪潮(北京)电子信息产业有限公司 | ot standby method based on arbitration disk mechanism |
| CN104407814A (en) * | 2014-11-21 | 2015-03-11 | 华为技术有限公司 | Method and device for data double writing |
| CN105095125A (en) * | 2015-07-08 | 2015-11-25 | 北京飞杰信息技术有限公司 | Highly available double-control storage system and operation method thereof based on quorum disc |
Non-Patent Citations (1)
| Title |
|---|
| 基于集群的HDFS高可用性研究和实现;黄懋;《中国优秀硕士学位论文全文数据库》;20150315;16-49页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106909307A (en) | 2017-06-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9430011B2 (en) | Systems and methods for determining the state of health of a capacitor module | |
| CN106909307B (en) | Method and device for managing double-active storage array | |
| US10642704B2 (en) | Storage controller failover system | |
| EP2306318B1 (en) | Enhanced solid-state drive management in high availability and virtualization contexts | |
| US8566635B2 (en) | Methods and systems for improved storage replication management and service continuance in a computing enterprise | |
| US9148479B1 (en) | Systems and methods for efficiently determining the health of nodes within computer clusters | |
| US20060259815A1 (en) | Systems and methods for ensuring high availability | |
| US10445295B1 (en) | Task-based framework for synchronization of event handling between nodes in an active/active data storage system | |
| US20130007504A1 (en) | High availability data storage systems and methods | |
| TWI529624B (en) | Method and system of fault tolerance for multiple servers | |
| EP2518627A2 (en) | Partial fault processing method in computer system | |
| US9575855B2 (en) | Storage apparatus and failure location identifying method | |
| US10055268B2 (en) | Detecting high availability readiness of a distributed computing system | |
| CN103257908A (en) | Software and hardware cooperative multi-controller disk array designing method | |
| CN112462920B (en) | Method, device, server and storage medium for power control | |
| WO2017107110A1 (en) | Service take-over method and storage device, and service take-over apparatus | |
| CN114189429B (en) | Monitoring system, method, device and medium for server cluster faults | |
| CN110780811A (en) | Data protection method, device and storage medium | |
| US8423162B2 (en) | Control method for information processing system, information processing system, and program | |
| CN112612653B (en) | A business recovery method, device, arbitration server and storage system | |
| CN204406385U (en) | The management devices of computer system | |
| US10089202B1 (en) | Providing data high availability to a set of host computers via automatic failover | |
| US20240364582A1 (en) | Systems and methods for fail-over witness sled operations | |
| CN111309132A (en) | A method for server multi-level power supply redundancy | |
| CN114490712B (en) | PostgreSQL database service status determination system and method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |
