CN112751693B - Data processing method and device of distributed storage system and electronic equipment - Google Patents
Data processing method and device of distributed storage system and electronic equipment Download PDFInfo
- Publication number
- CN112751693B CN112751693B CN201911051737.5A CN201911051737A CN112751693B CN 112751693 B CN112751693 B CN 112751693B CN 201911051737 A CN201911051737 A CN 201911051737A CN 112751693 B CN112751693 B CN 112751693B
- Authority
- CN
- China
- Prior art keywords
- control server
- request
- data
- server
- copy information
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/202—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
- G06F11/2023—Failover techniques
- G06F11/2028—Failover techniques eliminating a faulty processor or activating a spare
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
- G06F11/0757—Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/202—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
- G06F11/2038—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant with a single idle spare processing component
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/202—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
- G06F11/2048—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant where the redundant components share neither address space nor persistent storage
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2056—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
- G06F11/2082—Data synchronisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2097—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements maintaining the standby controller/processing unit updated
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Databases & Information Systems (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Multi Processors (AREA)
- Hardware Redundancy (AREA)
Abstract
Description
技术领域technical field
本发明涉及分布式存储技术领域,更具体地,涉及一种分布式存储系统的数据处理方法、一种分布式存储系统的数据处理装置、一种电子设备及一种分布式存储系统。The present invention relates to the technical field of distributed storage, and more particularly, to a data processing method of a distributed storage system, a data processing device of a distributed storage system, an electronic device and a distributed storage system.
背景技术Background technique
分布式存储是将数据分散存储在多台独立的设备上的存储方案。分布式网络存储系统采用可扩展的系统结构,利用多台存储服务器分担存储负荷,它不但提高了系统的可靠性、可用性和存取效率,还易于扩展。Distributed storage is a storage solution in which data is distributed and stored on multiple independent devices. The distributed network storage system adopts an extensible system structure and uses multiple storage servers to share the storage load. It not only improves the reliability, availability and access efficiency of the system, but also is easy to expand.
在分布式存储系统中,通常由专门的控制服务器来协调数据在多台数据服务器上的存储。控制服务器中存储有用于描述数据属性的元数据,可以实现存储位置记录、历史数据记录、资源查找等功能。为了提高系统的可靠性,控制服务器的数目通常为多个,由其中的主控制服务器提供控制服务,从控制服务器作为备份。In a distributed storage system, a dedicated control server usually coordinates the storage of data on multiple data servers. The control server stores metadata for describing data attributes, which can realize functions such as storage location records, historical data records, and resource search. In order to improve the reliability of the system, the number of control servers is usually more than one, the master control server among them provides control services, and the slave control server acts as a backup.
主控制服务器和从控制服务器可以通过数据同步的方式保持元数据的一致性。但是,如果在数据同步过程中出现主控制服务器死机等情况,会导致部分元数据更新信息丢失,影响分布式存储系统的运行。The master control server and the slave control server can maintain the consistency of metadata by means of data synchronization. However, if the main control server crashes during the data synchronization process, some metadata update information will be lost, affecting the operation of the distributed storage system.
发明内容SUMMARY OF THE INVENTION
本发明的一个目的是提供一种分布式存储系统数据处理的新技术方案。An object of the present invention is to provide a new technical solution for data processing in a distributed storage system.
根据本发明的第一方面,提供了一种分布式存储系统的数据处理方法,由所述分布式存储系统的从控制服务器实施,包括:According to a first aspect of the present invention, a data processing method for a distributed storage system is provided, which is implemented by a slave control server of the distributed storage system, including:
分别向每一存储服务器发送获取数据副本信息的第一请求;Send a first request for obtaining data copy information to each storage server respectively;
根据每一所述存储服务器响应于所述第一请求返回的所述数据副本信息,更新用于反映所述数据副本信息和存储服务器对应关系的映射数据。According to the data copy information returned by each of the storage servers in response to the first request, the mapping data used to reflect the corresponding relationship between the data copy information and the storage server is updated.
可选地,所述方法还包括:Optionally, the method further includes:
检测所述主控制服务器是否处于不可用状态;Detecting whether the main control server is in an unavailable state;
所述分别向每一存储服务器发送获取数据副本信息的请求,包括:The sending a request for obtaining data copy information to each storage server respectively includes:
在所述主控制服务器处于不可用状态的情况下,分别向每一存储服务器发送获取数据副本信息的第一请求。In the case that the master control server is in an unavailable state, a first request for acquiring data copy information is respectively sent to each storage server.
可选地,所述方法还包括:Optionally, the method further includes:
基于更新后的所述映射数据,取代所述主控制服务器为所述分布式存储系统提供控制服务。Based on the updated mapping data, the control service is provided for the distributed storage system in place of the main control server.
可选地,所述分别向每一存储服务器发送获取数据副本信息的第一请求,还包括:Optionally, the sending the first request for obtaining the data copy information to each storage server, further comprising:
按照设定的时间,定期向每一存储服务器发送获取数据副本信息的第一请求。According to the set time, a first request for obtaining data copy information is periodically sent to each storage server.
可选地,所述根据每一所述存储服务器响应于所述第一请求返回的所述数据副本信息,更新用于反映所述数据副本信息和存储服务器对应关系的映射数据,包括:Optionally, according to the data copy information returned by each of the storage servers in response to the first request, updating the mapping data used to reflect the correspondence between the data copy information and the storage server includes:
根据每一所述存储服务器响应于所述第一请求返回的所述数据副本信息,对当前的所述映射数据进行修改,以得到更新后的所述映射数据。According to the data copy information returned by each of the storage servers in response to the first request, the current mapping data is modified to obtain the updated mapping data.
根据本发明的第二方面,提供了一种分布式存储系统的数据处理方法,由所述分布式存储系统中的存储服务器实施,包括:According to a second aspect of the present invention, a data processing method for a distributed storage system is provided, which is implemented by a storage server in the distributed storage system, including:
接收从控制服务器发送的获取数据副本信息的第一请求;receiving a first request for obtaining data copy information sent from the control server;
响应于所述第一请求,向所述从控制服务器发送自身存储的数据副本信息。In response to the first request, the self-stored data copy information is sent to the slave control server.
根据本发明的第三方面,提供了一种分布式存储系统的数据处理装置,设置于所述分布式存储系统的从控制服务器,包括:According to a third aspect of the present invention, a data processing device of a distributed storage system is provided, which is arranged on a slave control server of the distributed storage system, including:
请求发送模块,用于分别向每一存储服务器发送获取数据副本信息的第一请求;a request sending module, configured to send a first request for obtaining data copy information to each storage server respectively;
数据更新模块,用于根据每一所述存储服务器响应于所述第一请求返回的所述数据副本信息,更新用于反映所述数据副本信息和存储服务器对应关系的映射数据。A data update module, configured to update the mapping data used to reflect the corresponding relationship between the data copy information and the storage server according to the data copy information returned by each of the storage servers in response to the first request.
可选地,所述装置还包括检测模块,所述检测模块用于:Optionally, the device further includes a detection module, and the detection module is used for:
检测所述主控制服务器是否处于不可用状态;Detecting whether the main control server is in an unavailable state;
所述请求发送模块在分别向每一存储服务器发送获取数据副本信息的请求时,用于:When the request sending module sends a request for obtaining data copy information to each storage server respectively, it is used for:
在所述主控制服务器处于不可用状态的情况下,分别向每一存储服务器发送获取数据副本信息的第一请求。In the case that the master control server is in an unavailable state, a first request for acquiring data copy information is respectively sent to each storage server.
可选地,所述装置还包括服务提供模块,所述服务提供模块用于:Optionally, the apparatus further includes a service providing module, and the service providing module is used for:
基于更新后的所述映射数据,取代所述主控制服务器为所述分布式存储系统提供控制服务。Based on the updated mapping data, the control service is provided for the distributed storage system in place of the main control server.
可选地,所述请求发送模块在分别向每一存储服务器发送获取数据副本信息的第一请求时,还用于:Optionally, when the request sending module sends the first request for obtaining the data copy information to each storage server, it is further configured to:
按照设定的时间,定期向每一存储服务器发送获取数据副本信息的第一请求。According to the set time, a first request for obtaining data copy information is periodically sent to each storage server.
可选地,所述数据更新模块在根据每一所述存储服务器响应于所述第一请求返回的所述数据副本信息,更新用于反映所述数据副本信息和存储服务器对应关系的映射数据时,用于:Optionally, when the data update module updates the mapping data used to reflect the corresponding relationship between the data copy information and the storage server according to the data copy information returned by each of the storage servers in response to the first request , for:
根据每一所述存储服务器响应于所述第一请求返回的所述数据副本信息,对当前的所述映射数据进行修改,以得到更新后的所述映射数据。According to the data copy information returned by each of the storage servers in response to the first request, the current mapping data is modified to obtain the updated mapping data.
根据本发明的第四方面,提供了一种分布式存储系统的数据处理装置,设置于所述分布式存储系统中的存储服务器,包括:According to a fourth aspect of the present invention, a data processing device of a distributed storage system is provided, and the storage server disposed in the distributed storage system includes:
请求接收模块,用于接收从控制服务器发送的获取数据副本信息的第一请求;a request receiving module, configured to receive a first request for obtaining data copy information sent from the control server;
数据发送模块,用于响应于所述第一请求,向所述从控制服务器发送自身存储的数据副本信息。A data sending module, configured to send the self-stored data copy information to the slave control server in response to the first request.
根据本发明的第五方面,提供了一种电子设备,包括处理器和存储器,所述存储器存储有能够被所述处理器执行的机器可执行指令,所述处理器执行所述机器可执行指令以实现本发明第一方面或者第二方面所述的分布式存储系统的数据处理方法。According to a fifth aspect of the present invention, there is provided an electronic device comprising a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions In order to realize the data processing method of the distributed storage system described in the first aspect or the second aspect of the present invention.
根据本发明的第六方面,提供了一种分布式存储系统,包括主控制服务器、实施本发明第一方面所述方法的从控制服务器和实施本发明第二方面所述方法的存储服务器,其中,所述存储服务器分别与所述主控制服务器、所述从控制服务器通信连接。According to a sixth aspect of the present invention, a distributed storage system is provided, comprising a master control server, a slave control server implementing the method of the first aspect of the present invention, and a storage server implementing the method of the second aspect of the present invention, wherein , the storage server is respectively connected to the master control server and the slave control server.
本发明一个实施例中的分布式存储系统的数据处理方法,无需主从控制服务器之间进行元数据同步,避免了因同步过程中主控制服务器故障导致元数据丢失而无法同步主、从控制服务器中的元数据,有利于提高分布式存储系统的可靠性。The data processing method of a distributed storage system in an embodiment of the present invention does not require metadata synchronization between the master and slave control servers, and avoids failure to synchronize the master and slave control servers due to metadata loss caused by the failure of the master control server during the synchronization process The metadata in the system is beneficial to improve the reliability of the distributed storage system.
通过以下参照附图对本发明的示例性实施例的详细描述,本发明的其它特征及其优点将会变得清楚。Other features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings.
附图说明Description of drawings
被结合在说明书中并构成说明书的一部分的附图示出了本发明的实施例,并且连同其说明一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention.
图1示出了可用于实现本发明的实施例的分布式存储系统的硬件配置示意图。FIG. 1 shows a schematic diagram of a hardware configuration of a distributed storage system that can be used to implement embodiments of the present invention.
图2示出了可用于实现本发明实施例的服务器的结构示意图。FIG. 2 shows a schematic structural diagram of a server that can be used to implement an embodiment of the present invention.
图3示出了根据本发明实施例的分布式存储系统的数据处理方法的流程图。FIG. 3 shows a flowchart of a data processing method of a distributed storage system according to an embodiment of the present invention.
图4示出了根据本发明实施例的分布存储系统的数据处理方法实施的具体例子的流程图。FIG. 4 shows a flowchart of a specific example of the implementation of the data processing method of the distributed storage system according to the embodiment of the present invention.
具体实施方式Detailed ways
现在将参照附图来详细描述本发明的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本发明的范围。Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the invention unless specifically stated otherwise.
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本发明及其应用或使用的任何限制。The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,技术、方法和设备应当被视为说明书的一部分。Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, techniques, methods, and apparatus should be considered part of the specification.
在这里示出和讨论的所有例子中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它例子可以具有不同的值。In all examples shown and discussed herein, any specific values should be construed as illustrative only and not limiting. Accordingly, other instances of the exemplary embodiment may have different values.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further discussion in subsequent figures.
<硬件配置><Hardware configuration>
图1示出了可用于实现本发明实施例的分布式存储系统的结构示意图。FIG. 1 shows a schematic structural diagram of a distributed storage system that can be used to implement an embodiment of the present invention.
如图1所示,分布式存储系统100包括用户代理服务器1000、存储服务器2001、存储服务器2002、存储服务器2003、以及控制服务器3001、控制服务器3002。其中,存储服务器和控制服务器的数目均可以为多个(两个以上)。在本发明实施例中,存储服务器、控制服务器、用户代理服务器的数量均为示例性的,本发明对此不做限制。As shown in FIG. 1 , the distributed storage system 100 includes a
本实施例中,分布式存储系统以数据块(Block)为基本单元存储目标数据。例如,将目标文件分解为多个数据块,并将每一数据块的多个副本分别存储在相互独立的多个存储服务器中。在一个例子中,每个数据块对应于三个数据块副本,其中一个数据块副本为主副本,其他两个数据块副本为从副本。主副本所在的存储服务器优先处理针对目标文件的读写请求,从副本所在的存储服务器起到备份作用。In this embodiment, the distributed storage system uses a data block (Block) as a basic unit to store target data. For example, the target file is decomposed into multiple data blocks, and multiple copies of each data block are stored in multiple independent storage servers. In one example, each data block corresponds to three data block replicas, one of which is the master replica, and the other two data block replicas are slave replicas. The storage server where the primary replica is located preferentially handles read and write requests for target files, and the storage server where the secondary replica is located plays a backup role.
存储服务器2001、存储服务器2002和存储服务器2003用于存储目标数据,例如存储目标数据对应的数据块副本。The
控制服务器3001和控制服务器3002用于管理元数据,例如管理反映目标文件对应的数据块副本和存储服务器对应关系的映射数据。其中一个控制服务器作为主控制服务器,为分布式存储系统提供控制服务,另外一个控制服务器作为从控制服务器,用于备份主控制服务器中的数据。本实施例中,控制服务器3001为主控制服务器,控制服务器3002为从控制服务器。主从控制服务器的角色可以相互转换,在主控制服务器出现故障时,从控制服务器可以取代主控制服务器为分布式存储系统提供控制服务。The control server 3001 and the control server 3002 are used to manage metadata, for example, to manage mapping data reflecting the corresponding relationship between the copy of the data block corresponding to the target file and the storage server. One of the control servers serves as the master control server, providing control services for the distributed storage system, and the other control server serves as the slave control server for backing up data in the master control server. In this embodiment, the control server 3001 is the master control server, and the control server 3002 is the slave control server. The roles of the master and slave control servers can be converted to each other. When the master control server fails, the slave control server can replace the master control server to provide control services for the distributed storage system.
用户代理服务器1000用于接收用户端发送的针对目标数据的数据读写请求,并将该数据读写请求转发至控制服务器。The
主控制服务器3001接收到用户代理服务器1000发送的数据读写请求后,可以根据自身存储的元数据,查询目标数据对应的数据块副本所在的存储服务器,并向用户代理服务器返回处理该数据读写请求的存储服务器的标识信息。用户代理服务器1000根据该标识信息与对应的存储服务器交互,完成对目标数据的读写操作。After receiving the data read/write request sent by the
用户代理服务器1000、存储服务器2001、存储服务器2002、存储服务器2003、控制服务器3001、控制服务器3002之间可以通过有线网络或者无线网络进行通信。The
用户代理服务器1000、存储服务器2001、存储服务器2002、存储服务器2003、控制服务器3001、控制服务器3002都具有如图2所示的服务器1100的硬件配置。如图2所示,服务器1100可以包括处理器1110、存储器1120、接口装置1130、通信装置1140、显示装置1150和输入装置1160。处理器1110例如可以是中央处理器CPU等。存储器1120例如包括ROM(只读存储器)、RAM(随机存取存储器)、诸如硬盘的非易失性存储器等。接口装置1130例如包括USB接口、串行接口等。通信装置1140例如能够进行有线或无线通信。显示装置1150例如是液晶显示屏。输入装置1160例如可以包括触摸屏、键盘等。The
应用于本说明书的实施例中,服务器1100的存储器1120用于存储指令,该指令用于控制处理器1110进行操作以支持实现根据本说明书任意实施例的方法。技术人员可以根据本说明书所公开方案设计指令。指令如何控制处理器进行操作,这是本领域公知,故在此不再详细描述。Applied to the embodiments of this specification, the memory 1120 of the server 1100 is used to store instructions for controlling the processor 1110 to operate to support implementing the method according to any embodiment of this specification. A skilled person can design instructions according to the solutions disclosed in this specification. How the instruction controls the processor to operate is well known in the art, so it will not be described in detail here.
本领域技术人员应当理解,尽管在图2中示出了服务器1100的多个装置,但是,本说明书实施例的服务器1100可以仅涉及其中的部分装置,例如,只涉及处理器1110、存储器1120和通信装置1140。Those skilled in the art should understand that although a plurality of devices of the server 1100 are shown in FIG. 2 , the server 1100 in this embodiment of the present specification may only involve some of the devices, for example, only the processor 1110 , the memory 1120 and the
图1所示的分布式存储系统100仅是解释性的,并且决不是为了要限制本说明书、其应用或用途。The distributed storage system 100 shown in FIG. 1 is illustrative only and is in no way intended to limit this specification, its application, or uses.
<方法实施例><Method Example>
本实施例提供了一种分布式存储系统的数据处理方法,该方法例如由图1中的从控制服务器3002实施。如图2所示,该方法包括以下步骤S1100-S1200。This embodiment provides a data processing method for a distributed storage system, and the method is implemented by, for example, the slave control server 3002 in FIG. 1 . As shown in FIG. 2, the method includes the following steps S1100-S1200.
在步骤S1100中,分别向每一存储服务器发送获取数据副本信息的第一请求。In step S1100, a first request for obtaining data copy information is respectively sent to each storage server.
本实施例中,控制服务器用于管理元数据,例如管理反映目标文件对应的数据块副本和存储服务器对应关系的映射数据。其中,主控制服务器为分布式存储系统提供控制服务,从控制服务器起到备份作用。In this embodiment, the control server is used to manage metadata, for example, to manage mapping data reflecting the correspondence between the copy of the data block corresponding to the target file and the storage server. Among them, the master control server provides control services for the distributed storage system, and the slave control server plays a backup role.
本实施例中,分布式存储系统以数据块为基本单元存储目标数据。例如,将目标文件分解为多个数据块,并将每一数据块的多个副本分别存储在相互独立的多个存储服务器中。在一个例子中,每个数据块对应于三个数据块副本,其中一个数据块副本为主副本,其他两个数据块副本为从副本,例如,三个副本分部为A、B、C,分别存储到编号为1、2、3的存储服务器中。In this embodiment, the distributed storage system uses data blocks as basic units to store target data. For example, the target file is decomposed into multiple data blocks, and multiple copies of each data block are stored in multiple independent storage servers. In an example, each data block corresponds to three data block copies, one of which is the master copy, and the other two data block copies are slave copies. For example, the three copies are divided into A, B, and C. They are stored in the storage servers numbered 1, 2, and 3 respectively.
本实施例中,从控制服务器向每一存储服务器发送获取数据副本信息的第一请求,以获取每一存储服务器中所存储的数据块副本的信息。在本步骤一实施方式中,主副本所在的存储服务器可以优先响应第一请求。In this embodiment, a first request for obtaining data copy information is sent from the control server to each storage server, so as to obtain the information of the data block copy stored in each storage server. In an implementation manner of this step, the storage server where the primary copy is located may respond to the first request preferentially.
在一个实施例中,本发明实施例的方法还可以包括检测主控制服务器是否处于不可用状态的步骤。示例性地,从控制服务器可以向主控制服务器发送状态询问请求(例如,通过心跳交互的方式),如主控制服务器无响应,则可以确定主控制服务器当前为不可用状态。在此基础上,步骤S1100进一步包括:在主控制服务器处于不可用状态的情况下,分别向每一存储服务器发送获取数据副本信息的第一请求。In one embodiment, the method of the embodiment of the present invention may further include the step of detecting whether the main control server is in an unavailable state. Exemplarily, the slave control server may send a status query request to the master control server (for example, through heartbeat interaction), and if the master control server does not respond, it may be determined that the master control server is currently in an unavailable state. On this basis, step S1100 further includes: in the case that the main control server is in an unavailable state, sending a first request for acquiring data copy information to each storage server respectively.
本实施例中,主控制服务器处于不可用状态,例如包括主控制服务器出现死机故障、主控制服务器与外界通信中断等情况。容易理解,主控制服务器处于不可用状态,意味着主控制服务器不能正常为分布式存储系统提供控制服务。In this embodiment, the main control server is in an unavailable state, for example, the main control server crashes, and the communication between the main control server and the outside world is interrupted. It is easy to understand that the main control server is in an unavailable state, which means that the main control server cannot normally provide control services for the distributed storage system.
在一个实施例中,从控制服务器检测主控制服务器是否处于不可用状态的步骤可以包括:接收监听设备(例如,zookeeper)发送的关于主控制服务器是否处于不可用状态的通知;根据该通知,确定主控制服务器是否处于不可用状态。在一个例子中,监听设备通过接收主控制服务器定期发送的心跳包来获取主控制服务器的活动状态。示例性地,监听设备(例如,zookeeper)可以定期与控制服务器(主控制服务器、从控制服务器)进行心跳,如果在预设时间段内没有收到主控制服务器的心跳,则可以确定主控制服务器处于不可用状态,进而向从控制服务器发送通知。从控制服务器可以根据监听设备的通知确定主控制服务器处于不可用状态。In one embodiment, the step of detecting from the control server whether the master control server is in an unavailable state may include: receiving a notification sent by a monitoring device (eg, zookeeper) about whether the master control server is in an unavailable state; according to the notification, determining Whether the master control server is in an unavailable state. In one example, the monitoring device obtains the active state of the master control server by receiving heartbeat packets periodically sent by the master control server. Exemplarily, the monitoring device (for example, zookeeper) may periodically perform heartbeat with the control server (master control server, slave control server), and if the heartbeat from the master control server is not received within a preset time period, the master control server may be determined. is in an unavailable state, which in turn sends a notification to the slave control server. The slave control server may determine that the master control server is in an unavailable state according to the notification of the monitoring device.
本实施例中,监听设备用于对主控制服务器的活动状态进行监听。监听设备可以是额外的实体设备,也可以是从控制服务器自身,例如,从控制服务器中通过自身的专门进程来监听主控制服务器的活动状态。In this embodiment, the monitoring device is used to monitor the activity state of the main control server. The monitoring device may be an additional physical device, or may be the slave control server itself, for example, the slave control server monitors the active state of the master control server through its own special process.
本实施例中,监听设备可以在检测到主控制服务器由可用状态变为不可用状态的情况下,向从控制服务器发送相应的通知。从控制服务器根据该通知确定主控制服务器处于不可用状态。In this embodiment, the monitoring device may send a corresponding notification to the slave control server when detecting that the master control server changes from an available state to an unavailable state. The slave control server determines that the master control server is in an unavailable state according to the notification.
在另一个实施例中,从控制服务器检测主控制服务器是否处于不可用状态的步骤包括:从控制服务器可以向主控制服务器进行心跳,如果在预设时间段内(例如,1min)未收到主控制服务器的心跳,则可以确定主控制服务器是处于不可用状态的。In another embodiment, the step of detecting whether the master control server is in an unavailable state from the slave control server includes: the slave control server may perform a heartbeat to the master control server, and if no master control server is received within a preset time period (for example, 1 min) The heartbeat of the control server can determine that the main control server is in an unavailable state.
在步骤S1200中,根据每一存储服务器响应于第一请求返回的数据副本信息,更新用于反映数据副本信息和存储服务器对应关系的映射数据。In step S1200, according to the data copy information returned by each storage server in response to the first request, the mapping data used to reflect the correspondence between the data copy information and the storage server is updated.
本实施例中,从控制服务器中存储有反映数据副本与存储服务器对应关系的映射数据。In this embodiment, the slave control server stores mapping data reflecting the corresponding relationship between the data copy and the storage server.
本实施例中,每一存储服务器响应于从控制服务器发送的第一请求,向从控制服务器发送自身存储的数据副本信息。从控制服务器接收每一存储服务器发送自身存储的数据副本信息。并根据接收到的数据副本信息,建立数据副本信息与其所在的存储服务器之间的对应关系(映射关系),对映射数据(或者对应关系)表进行更新。其中,映射数据表或者对应关系表中可以包括一条以上的数据副本信息与其所在的存储服务器之间的对应关系(或映射数据)。In this embodiment, in response to the first request sent by the slave control server, each storage server sends the data copy information stored by itself to the slave control server. Received from the control server each storage server sends its own stored data copy information. And according to the received data copy information, a corresponding relationship (mapping relationship) between the data copy information and the storage server where it is located is established, and the mapping data (or corresponding relationship) table is updated. The mapping data table or the corresponding relationship table may include the corresponding relationship (or mapping data) between more than one piece of data copy information and the storage server where it is located.
通过执行步骤S1200,从控制服务器可获得数据副本与存储服务器之间最新的对应关系。By executing step S1200, the latest correspondence between the data copy and the storage server can be obtained from the control server.
本实施例中的分布式存储系统的数据处理方法,无需主从控制服务器之间进行元数据同步,避免了因同步过程中主控制服务器故障导致元数据丢失而无法同步主、从控制服务器中的元数据,有利于提高分布式存储系统的可靠性。The data processing method of the distributed storage system in this embodiment does not require metadata synchronization between the master and slave control servers, and avoids failure to synchronize the master and slave control servers due to metadata loss caused by the failure of the master control server during the synchronization process. Metadata is beneficial to improve the reliability of distributed storage systems.
在一个实施例中,分布式存储系统的数据处理方法还包括:在确定主控制服务器处于不可用状态时,从控制服务器可以基于更新后的映射数据,取代主控制服务器为分布式存储系统提供控制服务。主控制服务器可能因为掉电、宕机或者意外重启等而处于不可用状态。从控制服务器检测到主控制服务器不可用时,在更新其存储的映射数据后,及时取代主控制服务器为分布式存储系统提供控制服务。保证分布式存储系统的正常运行,为分布式存储系统的数据存储安全提供保证。In one embodiment, the data processing method of the distributed storage system further includes: when it is determined that the master control server is in an unavailable state, the slave control server may replace the master control server to provide control for the distributed storage system based on the updated mapping data Serve. The main control server may be unavailable due to power failure, downtime, or unexpected restart. When the slave control server detects that the master control server is unavailable, after updating its stored mapping data, it replaces the master control server in time to provide control services for the distributed storage system. Ensure the normal operation of the distributed storage system and provide guarantee for the data storage security of the distributed storage system.
本实施例中,主控制服务器为分布式存储系统提供控制服务的过程例如是:主控制服务器接收到用户代理服务器发送的针对目标数据的数据读取请求,根据自身存储的映射数据查询目标数据对应的数据块副本所在的存储服务器,并向用户代理服务器返回处理该数据读写请求的存储服务器的标识信息,以供用户代理服务器根据该标识信息与对应的存储服务器交互,完成对目标数据的读写操作。In this embodiment, the process for the main control server to provide control services for the distributed storage system is, for example: the main control server receives a data read request for the target data sent by the user agent server, and queries the corresponding target data according to the mapping data stored by itself. The storage server where the copy of the data block is located, and returns the identification information of the storage server that processes the data read and write request to the user agent server, so that the user agent server can interact with the corresponding storage server according to the identification information to complete the reading of the target data. write operation.
本实施例中,主从控制服务器的角色可以相互转换,在主控制服务器处于不可用状态的情况下,从控制服务器可以取代主控制服务器为分布式存储系统提供控制服务。In this embodiment, the roles of the master and slave control servers can be converted to each other, and when the master control server is in an unavailable state, the slave control server can replace the master control server to provide control services for the distributed storage system.
本实施例中,从控制服务器可自动取代主控制服务器为分布式存储系统提供控制服务(即自动切换),也可以响应于人工操作取代主控制服务器为分布式存储系统提供控制服务(即手动切换)。在本申请实施例中,以自动切换为优选实施例,从而保证数据存储的安全性和及时性,避免数据丢失。In this embodiment, the slave control server can automatically replace the master control server to provide control services for the distributed storage system (ie, automatic switching), or can replace the master control server to provide control services for the distributed storage system in response to manual operations (ie, manual switching) ). In the embodiments of the present application, automatic switching is the preferred embodiment, so as to ensure the security and timeliness of data storage and avoid data loss.
本实施例中,从控制服务器根据更新后的映射数据为分布式存储系统提供控制服务,能够保证分布式存储系统的正常运行。In this embodiment, the slave control server provides a control service for the distributed storage system according to the updated mapping data, which can ensure the normal operation of the distributed storage system.
根据本发明实施例,前述步骤S1100可以实现为根据设定的时间,定期分别向每一存储服务器发送获取数据副本信息的第一请求(以下称为定期请求)。According to an embodiment of the present invention, the foregoing step S1100 may be implemented as periodically sending a first request (hereinafter referred to as a periodic request) for obtaining data copy information to each storage server according to a set time.
在一个实施例中,从控制服务器以设定的时间定期向每一存储服务器发送获取数据副本信息的第一请求。在另一些实施例中,可以为在主控制服务器不可用的状态下,从控制服务器按照设定的时间定期向每个存储服务器发送第一请求。示例性地,设定的时间1s至1min中的任意时长,例如可以为5s、10s、15s、20s、25s等,在本申请中不对此进行限制,可以根据技术人员的经验值进行预设置In one embodiment, the slave control server periodically sends a first request for obtaining data copy information to each storage server at a set time. In other embodiments, when the master control server is unavailable, the slave control server periodically sends the first request to each storage server according to a set time. Exemplarily, the set time is any length from 1s to 1min, for example, it can be 5s, 10s, 15s, 20s, 25s, etc., which is not limited in this application, and can be preset according to the experience value of technicians.
通过定期获取数据副本信息以及定期更新映射数据,可以减少每次更新需要处理的数据量,尤其有利于从控制服务器在主控制服务器处于不可用状态时快速更新映射数据,提高主从切换速度。By regularly obtaining data copy information and regularly updating mapping data, the amount of data that needs to be processed for each update can be reduced, which is especially beneficial for the slave control server to quickly update the mapping data when the master control server is unavailable, improving the master-slave switching speed.
在一个实施例中,前述步骤S1100可以实现为在初始启动阶段,分别向每一存储服务器发送获取数据副本信息的请求(以下称为初始请求)。In one embodiment, the foregoing step S1100 may be implemented as, in the initial startup phase, sending a request for obtaining data copy information (hereinafter referred to as an initial request) to each storage server respectively.
本实施例中,从控制服务器在初始启动阶段向每一存储服务器发送获取数据副本信息的第一请求(在之后的叙述中,可以称之为初始请求)。容易理解,初始请求区别于从控制服务器在主控制服务器处于不可用状态的情况下发送的请求,以及从控制服务器定期发送的请求。In this embodiment, the slave control server sends a first request (which may be referred to as an initial request in the following description) to each storage server to obtain data copy information in the initial startup phase. It is easy to understand that the initial request is different from the request sent by the slave control server when the master control server is unavailable, and the request sent by the slave control server periodically.
进而执行步骤S1200,即根据每一存储服务器响应于初始请求返回的数据副本信息,建立反映数据副本和存储服务器对应关系的映射数据。Then, step S1200 is executed, that is, according to the data copy information returned by each storage server in response to the initial request, mapping data reflecting the corresponding relationship between the data copy and the storage server is established.
本实施例中,每一存储服务器响应于初始请求,向从控制服务器发送自身存储的数据副本信息。从控制服务器接收每一存储服务器发送自身存储的数据副本信息,建立反映数据副本和存储服务器对应关系的映射数据。In this embodiment, in response to the initial request, each storage server sends the data copy information stored by itself to the slave control server. The data copy information sent by each storage server to be stored by itself is received from the control server, and the mapping data reflecting the corresponding relationship between the data copy and the storage server is established.
从控制服务器在初始启动阶段新建反映数据副本和存储服务器对应关系的映射数据,可以为后续更新映射数据建立基础。The mapping data reflecting the corresponding relationship between the data copy and the storage server is newly created from the control server in the initial startup phase, which can establish a basis for the subsequent updating of the mapping data.
在一个实施例中,从控制服务器更新自身存储的映射数据的过程包括:对自身存储的当前的映射数据进行修改,获得更新后的映射数据。In one embodiment, the process of updating the self-stored mapping data from the control server includes: modifying the self-stored current mapping data to obtain updated mapping data.
本实施例中,从控制服务基于自身存储的当前的映射数据进行数据更新,可以降低每次更新需要处理的数据量,有利于提高更新速度。In this embodiment, the slave control service performs data update based on the current mapping data stored by itself, which can reduce the amount of data that needs to be processed for each update, which is beneficial to improve the update speed.
在一个实施例中,反映数据副本和存储服务器对应关系的映射数据存储于从控制服务器的内存中。如此,有利于提高对映射数据的读写速度,进而提高数据更新速度。In one embodiment, the mapping data reflecting the corresponding relationship between the data copy and the storage server is stored in the memory of the slave control server. In this way, it is beneficial to improve the reading and writing speed of the mapped data, thereby improving the data updating speed.
前述方法实施例中,针对从控制服务器主动向存储服务器发送第一请求、在主控制服务器处于不可用状态下,向存储服务器发送第一请求、在从控制服务器初始启动阶段(即启动运行时)向存储服务器发送第一请求三种状态下的实施方法和对应的技术效果。在分布式存储系统的实际运行过程中,全周期可以包括从控制服务器初始启动阶段、从控制服务器正常工作阶段以及检测到主控制服务器处于不可用状态等。以及,全周期中不同的状态下,从控制服务器对数据的处理的作用可能有一定差异。In the foregoing method embodiments, the slave control server actively sends the first request to the storage server, when the master control server is in an unavailable state, sends the first request to the storage server, and at the initial startup stage of the slave control server (that is, when the operation is started) The implementation method and corresponding technical effect in three states of the first request are sent to the storage server. In the actual operation process of the distributed storage system, the full cycle may include the initial startup phase of the slave control server, the normal working phase of the slave control server, and the detection that the master control server is in an unavailable state, and the like. And, in different states in the whole cycle, the role of the slave control server in data processing may be different to some extent.
下面将基于分布式存储系统的实际运行过程可能出现的系统状态,对本发明提供的另一实施例进行描述:Another embodiment provided by the present invention will be described below based on the system states that may occur during the actual operation of the distributed storage system:
阶段(1):在从控制服务器的初始启动阶段,向每个存储服务器发送第二请求获取数据副本信息,并基于此阶段得到的数据副本信息来创建初始映射数据;Stage (1): In the initial startup stage from the control server, a second request is sent to each storage server to obtain data copy information, and initial mapping data is created based on the data copy information obtained at this stage;
阶段(2):在从控制服务器的正常工作阶段,可以定期发送第三请求获取数据副本信息,用来定期更新映射数据;Stage (2): In the normal working stage of the slave control server, a third request can be sent periodically to obtain data copy information, which is used to update the mapping data regularly;
阶段(3):在主控制服务器处于不可用状态的情况下,从控制服务器发送第四请求,获取当前的数据副本信息并更新映射数据,进而可以基于最新的映射数据替代主控制服务器提供服务。Stage (3): When the main control server is in an unavailable state, a fourth request is sent from the control server to obtain the current data copy information and update the mapping data, and then the main control server can be replaced based on the latest mapping data to provide services.
其中,本发明中的第一请求、第二请求、第三请求和第四请求,是为了区别从控制服务器在不同阶段(或者不同状态下)发出的读取请求,但第一请求、第二请求、第三请求和第四请求操作方法和实现原理都是一致的。或者说,第一请求在控制服务器的不同状态下分别表现为第二请求、第三请求和第四请求。Among them, the first request, the second request, the third request and the fourth request in the present invention are to distinguish the read requests sent from the control server in different stages (or different states), but the first request, the second request and the second request The operation methods and implementation principles of the request, the third request, and the fourth request are the same. In other words, the first request is respectively expressed as the second request, the third request and the fourth request in different states of the control server.
总体而言,从控制服务器从启动时起,其全生命周期中均可以通过与存储服务器的交互,不断更新其存储的映射数据,且采用前述实施例分阶段进行,与在例如处于不可用状态时再去更新映射数据的实施例相比较,其须更新的数据相对较少,因此数据更新速度更快。In general, from the start of the control server, the mapping data stored in the control server can be continuously updated through the interaction with the storage server in its entire life cycle, and the above-mentioned embodiment is used in stages. Compared with the embodiment in which the mapping data is updated every time, the data to be updated is relatively less, so the data update speed is faster.
图4示出了本实施例中分布式存储系统的数据处理方法实施的具体例子。如图4所示,从控制服务器通过自身的监听进程监听主控制服务器的心跳,从而检测主控服务器的活动状态,即执行步骤S101。此外,从控制服务器还定期向存储服务器发送获取数据副本信息的第三请求,存储服务器响应于该第三请求向从控制服务器发送自身存储的数据副本的信息,即执行步骤S102。从控制服务器根据存储服务器发送的数据副本信息,定期更新自身内存中存储的反映数据副本和存储服务器对应关系的映射数据,即执行步骤S103。假设主控制服务器在运行过程中出现了死机故障,这时从控制服务器可能无法在预设时间内监听到主控制服务器的,可以确定主控制服务器处于不可用状态,即执行步骤S104。之后,从控制服务器分别向每个存储服务器发送获取副本信息的第四请求,即执行步骤S105。每个存储服务器响应于该第四请求向从控制服务器发送自身存储的数据副本的信息,即执行步骤S106。从控制服务器根据存储服务器发送的数据副本信息,对最近一次定期更新所获得数据进行修正,获得更新后的映射数据,即执行步骤S107。最后,从控制服务器自动取代主控制服务器为分布式存储系统提供控制服务,即执行步骤S108。FIG. 4 shows a specific example of the implementation of the data processing method of the distributed storage system in this embodiment. As shown in FIG. 4 , the slave control server monitors the heartbeat of the master control server through its own monitoring process, so as to detect the active state of the master control server, that is, step S101 is performed. In addition, the slave control server also periodically sends a third request for obtaining data copy information to the storage server, and the storage server sends the data copy information stored by itself to the slave control server in response to the third request, that is, step S102 is performed. According to the data copy information sent by the storage server, the slave control server periodically updates the mapping data stored in its own memory reflecting the corresponding relationship between the data copy and the storage server, that is, step S103 is executed. Assuming that the master control server crashes during operation, and the slave control server may not be able to monitor the master control server within the preset time, it can be determined that the master control server is in an unavailable state, that is, step S104 is performed. After that, the control server sends a fourth request for acquiring replica information to each storage server respectively, that is, step S105 is executed. In response to the fourth request, each storage server sends the information of the data copy stored by itself to the slave control server, that is, step S106 is executed. According to the data copy information sent by the storage server, the slave control server corrects the data obtained by the latest regular update, and obtains the updated mapping data, that is, step S107 is executed. Finally, the slave control server automatically replaces the master control server to provide control services for the distributed storage system, that is, step S108 is performed.
本实施例还提供另一种分布式存储系统的数据处理方法,该方法例如由图1所示的任意的存储服务器实施。该方法包括:接收从控制服务器发送的获取数据副本信息的请求;响应于获取数据副本信息的请求,向从控制服务器发送自身对应的数据副本信息。This embodiment also provides another data processing method for a distributed storage system, and the method is implemented by, for example, any storage server shown in FIG. 1 . The method includes: receiving a request for acquiring data copy information sent from a control server; and in response to the request for acquiring data copy information, sending self-corresponding data copy information to the slave control server.
该方法的具体实施方式可参见前文对分布式存储系统的数据处理方法的描述,此处不再赘述。For the specific implementation of the method, reference may be made to the foregoing description of the data processing method of the distributed storage system, which will not be repeated here.
<装置实施例><Apparatus Example>
本实施例提供一种分布式存储系统的数据处理装置,应用于分布式存储系统的从控制服务器,包括请求发送模块和数据更新模块。This embodiment provides a data processing device of a distributed storage system, which is applied to a slave control server of a distributed storage system, and includes a request sending module and a data updating module.
请求发送模块,用于分别向每一存储服务器发送获取数据副本信息的请求。The request sending module is configured to send a request for obtaining data copy information to each storage server respectively.
数据更新模块,用于根据每一存储服务器响应于第一请求返回的数据副本信息,更新用于反映数据副本信息和存储服务器对应关系的映射数据。The data update module is configured to update the mapping data used to reflect the corresponding relationship between the data copy information and the storage server according to the data copy information returned by each storage server in response to the first request.
可选地,本发明的分布式存储系统的数据处理装置还可以包括:检测模块:用于检测主控制服务器是否处于不可用状态。进一步地,请求发送模块设置为在主控制服务器处于不可用状态的情况下,分别向每一存储服务器发送获取数据副本信息的第一请求。Optionally, the data processing apparatus of the distributed storage system of the present invention may further include: a detection module: used to detect whether the main control server is in an unavailable state. Further, the request sending module is configured to send a first request for acquiring data copy information to each storage server respectively when the main control server is in an unavailable state.
可选地,装置还包括服务提供模块,服务提供模块用于:基于更新后的映射数据,取代主控制服务器为分布式存储系统提供控制服务。Optionally, the apparatus further includes a service providing module, and the service providing module is configured to: replace the main control server with a control service for the distributed storage system based on the updated mapping data.
可选地,请求发送模块还可以设置为:按照设定的时间,定期向每一存储服务器发送获取数据副本信息的请求。Optionally, the request sending module may also be configured to: periodically send a request for obtaining data copy information to each storage server according to a set time.
可选地,数据更新模块可以设置为根据每一存储服务器响应于第一请求返回的数据副本信息,对现有的映射数据进行修改,获得更新后的映射数据。Optionally, the data updating module may be configured to modify the existing mapping data according to the data copy information returned by each storage server in response to the first request to obtain updated mapping data.
本实施例还提供另外一种分布式存储系统的数据处理装置,应用于分布式存储系统中的存储服务器,包括请求接收模块和数据发送模块。This embodiment also provides another data processing device of a distributed storage system, which is applied to a storage server in a distributed storage system, and includes a request receiving module and a data sending module.
请求接收模块,用于接收从控制服务器发送的获取数据副本信息的请求。The request receiving module is used for receiving the request for obtaining the data copy information sent from the control server.
数据发送模块,用于响应于获取数据副本信息的请求,向从控制服务器发送自身对应的数据副本信息。The data sending module is used for sending the corresponding data copy information to the slave control server in response to the request for obtaining the data copy information.
<电子设备实施例><Example of electronic device>
本实施例提供一种电子设备,包括处理器和存储器,存储器存储有能够被处理器执行的机器可执行指令,处理器执行机器可执行指令以实现本发明方法实施例描述的分布式存储系统的数据处理方法。This embodiment provides an electronic device, including a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the distributed storage system described in the method embodiments of the present invention. data processing method.
<系统实施例><System Example>
本实施例提供一种分布式存储系统,包括主控制服务器、实施本发明方式实施例描述的第一种方法的从控制服务器和实施本发明方法实施例描述的第二种方法的存储服务器,其中,存储服务器分别与主控制服务器、从控制服务器通信连接。This embodiment provides a distributed storage system, including a master control server, a slave control server that implements the first method described in the embodiments of the present invention, and a storage server that implements the second method described in the method embodiments of the present invention, wherein , the storage server is respectively connected to the master control server and the slave control server.
<计算机可读存储介质实施例><Computer-readable storage medium embodiment>
本实施例提供一种机器可读存储介质,机器可读存储介质存储有机器可执行指令,机器可执行指令在被处理器调用和执行时,机器可执行指令促使处理器实现本发明方法实施例描述的分布式存储系统的数据处理方法。This embodiment provides a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the method embodiments of the present invention. A data processing method for a distributed storage system is described.
本发明可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本发明的各个方面的计算机可读程序指令。The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present invention.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本发明操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本发明的各个方面。The computer program instructions for carrying out the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code written in any combination, programming languages including object-oriented programming languages - such as Smalltalk, C++, etc., and conventional procedural programming languages - such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present invention.
这里参照根据本发明实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本发明的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本发明的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executables for implementing the specified logical function(s) instruction. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation in hardware, implementation in software, and implementation in a combination of software and hardware are all equivalent.
以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。本发明的范围由所附权利要求来限定。Various embodiments of the present invention have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.
Claims (9)
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911051737.5A CN112751693B (en) | 2019-10-31 | 2019-10-31 | Data processing method and device of distributed storage system and electronic equipment |
| PCT/CN2020/119346 WO2021082868A1 (en) | 2019-10-31 | 2020-09-30 | Data managmenet method for distributed storage system, apparatus, and electronic device |
| US17/772,939 US11966305B2 (en) | 2019-10-31 | 2020-09-30 | Data processing method for distributed storage system, apparatus, and electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911051737.5A CN112751693B (en) | 2019-10-31 | 2019-10-31 | Data processing method and device of distributed storage system and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN112751693A CN112751693A (en) | 2021-05-04 |
| CN112751693B true CN112751693B (en) | 2022-09-06 |
Family
ID=75641530
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911051737.5A Active CN112751693B (en) | 2019-10-31 | 2019-10-31 | Data processing method and device of distributed storage system and electronic equipment |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US11966305B2 (en) |
| CN (1) | CN112751693B (en) |
| WO (1) | WO2021082868A1 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP2902883A1 (en) | 2005-05-04 | 2015-08-05 | Hillcrest Laboratories, Inc. | Method and system for scrolling in user interfaces |
| CN115373896B (en) * | 2022-06-23 | 2023-05-09 | 北京志凌海纳科技有限公司 | Distributed block storage-based duplicate data recovery method and system |
| CN117354328A (en) * | 2023-09-22 | 2024-01-05 | 智卫有限公司 | A system and method for managing distributed storage systems |
Family Cites Families (23)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6732289B1 (en) * | 2000-08-31 | 2004-05-04 | Sun Microsystems, Inc. | Fault tolerant data storage system |
| US7437608B2 (en) * | 2004-11-15 | 2008-10-14 | International Business Machines Corporation | Reassigning storage volumes from a failed processing system to a surviving processing system |
| CN101697494B (en) | 2009-10-30 | 2012-12-12 | 福建星网锐捷网络有限公司 | Backup method, equipment and system |
| US8812900B2 (en) * | 2011-06-30 | 2014-08-19 | International Business Machines Corporation | Managing storage providers in a clustered appliance environment |
| US8793467B2 (en) * | 2011-09-30 | 2014-07-29 | Pure Storage, Inc. | Variable length encoding in a storage system |
| US8996467B2 (en) * | 2011-12-29 | 2015-03-31 | Druva Inc. | Distributed scalable deduplicated data backup system |
| CN103577500B (en) | 2012-08-10 | 2018-07-27 | 腾讯科技(深圳)有限公司 | Distributed file system carries out the method and the distributed file system of data processing |
| US11086898B2 (en) * | 2013-03-13 | 2021-08-10 | Amazon Technologies, Inc. | Token-based admission control for replicated writes |
| CN103384211B (en) * | 2013-06-28 | 2017-02-08 | 百度在线网络技术(北京)有限公司 | Data manipulation method with fault tolerance and distributed type data storage system |
| JP2015035020A (en) | 2013-08-07 | 2015-02-19 | 富士通株式会社 | Storage system, storage control device and control program |
| US9336134B2 (en) * | 2013-11-12 | 2016-05-10 | Skyera, Llc | Apparatus and method for accessing a non-volatile memory blade using multiple controllers in a non-volatile memory based storage device |
| US9274901B2 (en) * | 2013-11-20 | 2016-03-01 | Avago Technologies General Ip (Singapore) Pte. Ltd. | I/O request mirroring in a clustered storage system |
| US9933946B2 (en) * | 2014-09-15 | 2018-04-03 | Hewlett Packard Enterprise Development Lp | Fibre channel storage array methods for port management |
| US10552058B1 (en) * | 2015-07-17 | 2020-02-04 | Radian Memory Systems, Inc. | Techniques for delegating data processing to a cooperative memory controller |
| US10069688B2 (en) * | 2016-03-07 | 2018-09-04 | International Business Machines Corporation | Dynamically assigning, by functional domain, separate pairs of servers to primary and backup service processor modes within a grouping of servers |
| US10372561B1 (en) * | 2017-06-12 | 2019-08-06 | Amazon Technologies, Inc. | Block storage relocation on failure |
| US10268408B2 (en) * | 2017-08-28 | 2019-04-23 | Vmware, Inc. | Flexible efficient runtime placement of data across multiple disks |
| CN109672544B (en) * | 2017-10-13 | 2020-12-11 | 杭州海康威视系统技术有限公司 | A data processing method, device and distributed storage system |
| US10621059B2 (en) * | 2017-12-19 | 2020-04-14 | International Business Machines Corporation | Site recovery solution in a multi-tier storage environment |
| CN108173971A (en) | 2018-02-05 | 2018-06-15 | 江苏物联网研究发展中心 | A kind of MooseFS high availability methods and system based on active-standby switch |
| CN109284069A (en) | 2018-08-23 | 2019-01-29 | 郑州云海信息技术有限公司 | A distributed storage system and method for storing backup data |
| CN109684412A (en) * | 2018-12-25 | 2019-04-26 | 成都虚谷伟业科技有限公司 | A kind of distributed data base system |
| KR20210121503A (en) * | 2020-03-30 | 2021-10-08 | 에스케이하이닉스 주식회사 | Electronic Apparatus, and Data Storage Apparatus and Operation Method Therefor |
-
2019
- 2019-10-31 CN CN201911051737.5A patent/CN112751693B/en active Active
-
2020
- 2020-09-30 WO PCT/CN2020/119346 patent/WO2021082868A1/en not_active Ceased
- 2020-09-30 US US17/772,939 patent/US11966305B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| CN112751693A (en) | 2021-05-04 |
| US20230033754A1 (en) | 2023-02-02 |
| WO2021082868A1 (en) | 2021-05-06 |
| US11966305B2 (en) | 2024-04-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11297126B2 (en) | System and method for image file generation and management | |
| CN109976667B (en) | Mirror image management method, device and system | |
| JP5976840B2 (en) | N-way synchronization of desktop images | |
| US9268655B2 (en) | Interface for resolving synchronization conflicts of application states | |
| US10097659B1 (en) | High performance geographically distributed data storage, retrieval and update | |
| US10019452B2 (en) | Topology aware distributed storage system | |
| US10628380B2 (en) | Enabling data replication processes between heterogeneous storage systems | |
| US10430217B2 (en) | High availability using dynamic quorum-based arbitration | |
| US10572350B1 (en) | System and method for improved application consistency in a distributed environment | |
| US9753718B1 (en) | Non-disruptive upgrade including rollback capabilities for a distributed file system operating within a cluster of nodes | |
| US9792150B1 (en) | Detecting site change for migrated virtual machines | |
| US9747291B1 (en) | Non-disruptive upgrade configuration translator | |
| JP2020506456A (en) | Optimization of content storage by stubbing | |
| CN112751693B (en) | Data processing method and device of distributed storage system and electronic equipment | |
| WO2018192478A1 (en) | Cloud management platform, virtual machine management method, system thereof | |
| US10958720B2 (en) | Methods, apparatuses and systems for cloud based disaster recovery | |
| US11212175B2 (en) | Configuration management for cloud storage system and method | |
| CN111782147B (en) | Method and device for cluster expansion and contraction | |
| CN111258954B (en) | Data migration method, device, equipment and storage medium | |
| US10127270B1 (en) | Transaction processing using a key-value store | |
| CN111752960B (en) | Data processing method and device | |
| US11271999B2 (en) | Flexible associativity in multitenant clustered environments | |
| CN112069137A (en) | Method and device for generating information, electronic equipment and computer readable storage medium | |
| US11334455B2 (en) | Systems and methods for repairing a data store of a mirror node | |
| US10776036B2 (en) | System and method for efficient restore |
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 |