CN116521083A - Storage method, device and medium for distributed storage cluster data - Google Patents

Storage method, device and medium for distributed storage cluster data Download PDF

Info

Publication number
CN116521083A
CN116521083A CN202310501757.8A CN202310501757A CN116521083A CN 116521083 A CN116521083 A CN 116521083A CN 202310501757 A CN202310501757 A CN 202310501757A CN 116521083 A CN116521083 A CN 116521083A
Authority
CN
China
Prior art keywords
data
data set
node
copy
cluster
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.)
Pending
Application number
CN202310501757.8A
Other languages
Chinese (zh)
Inventor
董俊明
乔波波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Jinan data Technology Co ltd
Original Assignee
Inspur Jinan data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Jinan data Technology Co ltd filed Critical Inspur Jinan data Technology Co ltd
Priority to CN202310501757.8A priority Critical patent/CN116521083A/en
Publication of CN116521083A publication Critical patent/CN116521083A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a storage method, a storage device and a storage medium for distributed storage cluster data, which are suitable for the technical field of data storage. Acquiring distributed storage cluster data and corresponding copy data; dividing distributed storage cluster data and duplicate data according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set duplicate slices; the plurality of data set slices and the plurality of data set replica slices are cross-distributed in at least two different racks according to a data replica distribution rule. According to the method, the data slicing rule is used for slicing storage, so that the problem that the space of the whole data disk of the distributed cluster is damaged due to the fact that the storage space of the existing main node is small is solved, and the uniformity of the data storage of the cluster is improved. The data is stored by the frame mutual exclusion principle of the data copy distribution rule, so that the data security risk brought by the failure of one node or the frame where the data is located is reduced, and the data security and the cluster stability are improved.

Description

Storage method, device and medium for distributed storage cluster data
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method, an apparatus, and a medium for storing distributed storage cluster data.
Background
In the current distributed storage cluster environment, massive performance monitoring data can be generated in a daily production environment, and each slave node of the cluster generates the performance monitoring data, reports the performance monitoring data to a master node and stores the performance monitoring data. Because the storage mode of the main node is single-node storage, if the main node fails, the performance monitoring data is exposed to the risk of data loss.
In addition, the distributed storage clusters have more nodes and larger generated cache data, so that the space occupied by the main nodes of the clusters is larger, similar to the wooden barrel principle, the storage space of the nodes is limited, and if only the reported nodes cache the data, the rest free storage space is smaller, and the space of the whole data of the distributed clusters is damaged when serious. In order to solve the problem of limited storage space, data is usually deleted periodically, and the deleted data cannot be recovered and retrieved after deletion because the data storage amount is effective and the deleted data is not backed up, so that great hidden danger exists for the data security and the storage equilibrium of the cluster.
Therefore, how to ensure data security and storage balance of clusters is a need for a solution by those skilled in the art.
Disclosure of Invention
The invention aims to provide a storage method, a storage device and a storage medium for distributed storage cluster data, which avoid the problem that the space of the whole data of the distributed cluster is damaged due to the fact that the storage space of a main node is small in the prior art, and improve the balance of the storage of the cluster data, the safety of the data and the stability of the cluster.
In order to solve the technical problem, the present invention provides a method for storing distributed storage cluster data, including:
acquiring the distributed storage cluster data and corresponding copy data;
dividing the distributed storage cluster data and the copy data respectively according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set copy slices;
and the plurality of data set slices and the plurality of data set copy slices are distributed in at least two different racks in a crossing way according to a data copy distribution rule.
Preferably, the process for establishing the data slicing rule includes:
acquiring the node number and the data set size of the distributed storage cluster;
Reserving nodes of the distributed storage cluster according to the preset number to serve as standby nodes;
and determining the number of data set slices according to the relation among the data set scale, the number of standby nodes and the number of nodes.
Preferably, the data set slices and the data set copy slices are cross-distributed in at least two different racks according to a data copy distribution rule, including:
the data set slices and the same data set corresponding to the data set copy slices are distributed on all nodes of the distributed storage cluster in a crossing mode;
and according to a mutual exclusion principle, the nodes after the cross distribution of the plurality of data set slices and the plurality of data set copy slice pairs are distributed in a cross mode on at least two different racks, wherein at least one node is contained in each rack.
Preferably, the cluster information table of the distributed storage cluster at least comprises node topology distribution information, data set information and copy distribution information;
the node topology distribution information at least comprises a rack position number, a rack name, a node number and a node name;
the data set information at least comprises a data set name, a data set number, a data set classification time and a data set scale;
The copy distribution information at least comprises a backup data set number, a backup data set scale, a copy slicing scale, a slice number, a slicing number, a backup node number and a frame number.
Preferably, the copy distribution information further comprises slice pointer information for pointing to a next slice and a last slice position of the dataset for data combination from the dataset slice and/or the dataset copy slice.
Preferably, the data set information table further includes a data set check value;
dividing the distributed storage cluster data and the duplicate data according to the data slicing rule and the data set check value, and distributing the slice numbers of the duplicate distribution information to obtain a plurality of data set slices and a plurality of data set duplicate slices.
Preferably, the method further comprises:
sending heartbeat data to each node according to preset time;
if each node fails to receive the heartbeat data, recording the node which fails to receive the heartbeat as an abnormal node;
starting a data set dynamic recovery mechanism, and recording the abnormal nodes into a node abnormal recording table, wherein the node abnormal recording table at least comprises an abnormal node number, a frame number where the abnormal nodes are located, a offline time and progress information of the abnormal nodes.
Preferably, the establishment procedure of the data set dynamic recovery mechanism includes:
acquiring a slice list corresponding to the abnormal node in the copy distribution table;
determining a data set copy slice corresponding to the abnormal node according to the data slicing rule and the data copy distribution rule;
and backing up the copy slices of the data set corresponding to the abnormal node to a standby node, and updating the copy distribution table and the progress information of the abnormal node.
Preferably, when the cluster information changes, the method further includes:
and when the cluster information changes, reconstructing the distributed storage cluster data according to the designated time or a manual mode.
In order to solve the technical problem, the present invention further provides a storage device for storing cluster data in a distributed manner, including:
the first acquisition module is used for acquiring the distributed storage cluster data and the corresponding copy data;
the first dividing module is used for dividing the distributed storage cluster data and the copy data respectively according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set copy slices;
And the first cross distribution module is used for cross distributing the plurality of data set slices and the plurality of data set copy slices to at least two different racks according to a data copy distribution rule.
Preferably, the process for establishing the data slicing rule of the partitioning module includes:
the second acquisition module is used for acquiring the node number and the data set size of the distributed storage cluster;
the reservation module is used for reserving the nodes of the distributed storage cluster as standby nodes according to the preset number;
and the first determining module is used for determining the number of the data set slices according to the relation among the data set scale, the number of the standby nodes and the number of the nodes.
Preferably, the first cross distribution module includes:
the second cross distribution module is used for cross distributing the same data set corresponding to the plurality of data set slices and the plurality of data set copy slices to each node of the distributed storage cluster;
and the third cross distribution module is used for cross distributing the nodes after cross distribution according to a mutual exclusion principle, a plurality of data set slices and a plurality of data set copy slice pairs in at least two different racks, wherein the racks contain at least one node.
Preferably, the cluster information table of the distributed storage clusters in the partitioning module at least comprises node topology distribution information, data set information and copy distribution information;
the node topology distribution information at least comprises a rack position number, a rack name, a node number and a node name;
the data set information at least comprises a data set name, a data set number, a data set classification time and a data set scale;
the copy distribution information at least comprises a backup data set number, a backup data set scale, a copy slicing scale, a slice number, a slicing number, a backup node number and a frame number.
Preferably, the method further comprises a pointing module, and the copy distribution information further comprises slice pointer information for pointing to a next slice and a last slice position of the data set so as to perform data combination according to the data set slice and/or the data set copy slice.
Preferably, the data set information table further comprises a data set check value;
dividing the distributed storage cluster data and the duplicate data according to the data slicing rule and the data set check value, and distributing the slice numbers of the duplicate distribution information to obtain a plurality of data set slices and a plurality of data set duplicate slices.
Preferably, the method further comprises:
the sending module is used for sending heartbeat data to each node according to preset time;
the recording module is used for recording the node which receives the heartbeat failure as an abnormal node if each node fails to receive the heartbeat data;
the starting module is used for starting a data set dynamic recovery mechanism and recording the abnormal nodes into a node abnormal recording table, wherein the node abnormal recording table at least comprises an abnormal node number, a frame number where the abnormal node is located, the off-line time and the progress information of the abnormal node.
Preferably, the starting module includes:
the third acquisition module is used for acquiring a slice list corresponding to the abnormal node in the duplicate distribution table;
the second determining module is used for determining the data set copy slice corresponding to the abnormal node according to the data slicing rule and the data copy distribution rule;
and the backup module is used for backing up the copy slices of the data set corresponding to the abnormal node to the standby node and updating the copy distribution table and the progress information of the abnormal node.
Preferably, the system further comprises a reconstruction module;
and the reconstruction module is used for reconstructing the distributed storage cluster data according to the appointed time or a manual mode when the cluster information changes.
In order to solve the technical problem, the present invention further provides a storage device for storing cluster data in a distributed manner, including:
a memory for storing a computer program;
a processor for implementing the steps of the storage method of distributed storage cluster data as described above when executing the computer program.
To solve the above technical problem, the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the steps of the storage method for distributed storage cluster data as described above.
The invention provides a storage method of distributed storage cluster data, which comprises the following steps: acquiring distributed storage cluster data and corresponding copy data; dividing distributed storage cluster data and duplicate data according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set duplicate slices; the plurality of data set slices and the plurality of data set replica slices are cross-distributed in at least two different racks according to a data replica distribution rule. According to the method, the data slicing rule is used for slicing storage, so that the problem that the space of the whole data disk of the distributed cluster is damaged due to the fact that the storage space of the existing main node is small is solved, and the uniformity of the data storage of the cluster is improved. The data is stored by the frame mutual exclusion principle of the data copy distribution rule, so that the data security risk brought by the failure of one node or the frame where the data is located is reduced, and the data security and the cluster stability are improved.
In addition, the invention also provides a storage device and a medium for the distributed storage cluster data, which have the same beneficial effects as the storage method for the distributed storage cluster data.
Drawings
For a clearer description of embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flowchart of a method for storing distributed storage cluster data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a performance monitoring data copy management module according to an embodiment of the present invention;
FIG. 3 is a schematic cross distribution diagram of a data copy distribution rule according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a topology upgrade module for performance monitoring data according to an embodiment of the present invention;
FIG. 5 is a block diagram of a storage device for storing cluster data in a distributed manner according to an embodiment of the present invention;
FIG. 6 is a block diagram of another storage device for storing cluster data in a distributed manner according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of data slice distribution storage according to an embodiment of the present invention;
fig. 8 is a schematic diagram of cluster dynamic sensing, recovery and reconstruction according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
The core of the invention is to provide a storage method, a device and a medium for distributed storage cluster data, which avoid the problem of space damage of the whole data of the distributed cluster caused by small storage space of only a main node, and improve the balance of the data storage of the cluster, the safety of the data and the stability of the cluster.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description.
It should be noted that, the clustered distributed storage has a redundant distributed storage function, which disperses data to a plurality of physical servers, and presents a unified resource to a user, and its components include a management server (master), a metadata backup server (mateloger), a data storage server group (chunk server), and a client server group (client). The distributed storage is based on distributed data software and a standard server, and has high expansion (based on standard hardware and a distributed architecture, thousands of nodes/BE level expansion), yi Yunwei (unified management of various types of storage such as blocks, objects, files and the like) and online blocks (the standard hardware is supplied in a collection mode, and single purchase is not needed). Distributed refers to a unique type of system architecture consisting of a set of computer nodes that communicate over a network and coordinate work to accomplish a common task. Distributed systems have emerged to perform computing, storage tasks with inexpensive, common machines that a single computer cannot perform, with the purpose of using more machines to process more data.
In order to improve fault tolerance, the physical storage medium is divided and isolated, a disk is used as a minimum storage unit to form a storage server, a storage node is generally a storage server, a plurality of servers form a rack, and the relations are abstracted into a model to be described as a physical model of the distributed file system. Such partitioning and isolation can increase the reliability of the system, while also simplifying operation and maintenance operations.
In the existing distributed storage clusters, larger data cache can be generated within one day of node clusters with different scales, so that the storage space of a main node is occupied, in addition, data are transferred and stored regularly, and additional FTP server resources are required to be occupied when the data are stored in additional file transfer protocol (File Transfer Protocol, FTP) servers; for the storage mode of large-granularity storage, the time interval of data storage needs to be enlarged, which can cause partial key data to be missed or not recorded. The storage method of the distributed storage cluster data can solve the technical problems.
Fig. 1 is a flowchart of a method for storing distributed storage cluster data according to an embodiment of the present invention, where, as shown in fig. 1, the method includes:
S11: acquiring distributed storage cluster data and corresponding copy data;
s12: dividing distributed storage cluster data and duplicate data according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set duplicate slices;
s13: the plurality of data set slices and the plurality of data set replica slices are cross-distributed in at least two different racks according to a data replica distribution rule.
Specifically, the obtaining of the distributed storage cluster data is mainly the cache data on each node of the distributed storage system, and may be obtaining the cache data according to a time interval, or may be obtaining the cache data at any time, which is not limited herein. The replica data is data that is replicated from the distributed storage cluster data.
And dividing the distributed storage cluster data and the copy data according to a cluster information table and a data slicing rule of the distributed storage cluster data to obtain a plurality of data set slices and a plurality of data set copy slices. The cluster information table mainly records node data information, data set information, copy data information and the like of each node in the distributed storage cluster.
As one embodiment, the cluster information table of the distributed storage cluster includes at least node topology distribution information, data set information, and copy distribution information;
The node topology distribution information at least comprises a rack position number, a rack name, a node number and a node name;
the data set information at least comprises a data set name, a data set number, a data set classification time and a data set scale;
the copy distribution information at least comprises a backup data set number, a backup data set scale, a copy slicing scale, a slice number, a slicing number, a backup node number and a frame number.
Specifically, there are hundreds or even thousands of nodes in the large-scale storage cluster, the nodes are distributed on different racks, a node topology distribution table corresponding to the node topology distribution information records the rack position number, the rack name, the node number, the node name and the like of the nodes, the node information of the cluster is collected regularly by the cluster, and the node topology distribution table is updated, such as newly added nodes, node faults, node position changes and the like, so as to identify the updated and changed nodes.
And the data set information table corresponding to the data set information is used for classifying and managing the performance monitoring data of the cluster according to different time intervals (such as month), wherein the data of each month is called a data set, and the data set information table comprises a data set name, a data set number, data set classifying time, data set size, a data set check value (such as md5 value) and remark information.
The copy distribution table corresponding to the copy distribution information is used for recording copy data of the data set and information of the slices, and comprises a backup data set number, a backup data set scale, a copy slicing scale, a slice number, a slicing number, a backup node number and a frame number where the backup node number is located.
The performance monitoring data copy management module corresponding to the cluster information table of the distributed storage cluster includes three corresponding tables, and fig. 2 is a schematic diagram of the performance monitoring data copy management module provided by the embodiment of the present invention, where as shown in fig. 2, the performance monitoring data copy management module includes a data set information table, a node topology distribution table and a copy distribution table.
In order to ensure the security of the copy and the storage balance, the distributed storage cluster data and the copy data are sliced and then stored in different nodes and racks. The storage process adopts the cross mutual exclusion, and for the storage mode of two kinds of data, the distributed storage cluster data and the copy data can be sliced, the sliced distributed storage cluster data is stored to each node and the corresponding rack, and then the sliced copy data is stored to each node and the corresponding rack. Or the distributed storage cluster data and the copy data which are firstly planned and sliced are stored to specific nodes and racks, and then the distributed storage cluster data and the copy data are stored according to the planned paths. In order to avoid that two kinds of data are repeatedly stored in the same node or the same rack, the node cannot be combined and restored through the duplicate data after the node is prevented from being failed.
The data slicing rule is a rule for slicing and storing distributed storage cluster data and copy data based on a cluster information table, and the corresponding copy data can be one type of backup for the distributed storage cluster data or can be multiple types of backup data.
As one embodiment, the process of establishing the data slicing rule includes:
acquiring the node number and the data set size of a distributed storage cluster;
reserving nodes of the distributed storage cluster according to the preset number to serve as standby nodes;
and determining the number of the data set slices according to the relation among the data set scale, the number of the standby nodes and the number of the nodes.
Specifically, the number of nodes and the data set size of the distributed storage level group are obtained, the number of the nodes is n, the size of the data set size is m, the nodes of the distributed storage level group are reserved according to the preset number to serve as standby nodes, the number of data set slices is determined according to the relation among the data set size, the number of the standby nodes and the number of the nodes, the preset number can be one or more, distributed storage cluster data are divided according to a cluster information table and a data slicing rule of the distributed storage level group to obtain a plurality of corresponding data set slices, and the copy data are divided according to the cluster information table and the data slicing rule of the distributed storage level group to obtain a plurality of corresponding data set copy slices.
For example, if the preset number is 1, the node number is 4, and the data set size is 10, the number of slices is 3.3333 … … obtained by the data set size/(the node number-1), and the number of slices is 4, that is, the number of slices of the data set slices is 4, and correspondingly, the number of slices of the data set copy is 4.
According to the data copy distribution rule, a plurality of data set slices and a plurality of data set copy slices are distributed on at least two different frames in a crossing mode, in order to enable each copy slice of a data set to be distributed on different nodes, if the whole storage cluster comprises a plurality of frames, a mutual exclusion principle is adopted, and two copies of the same data set slice are not located on the same frame as far as possible, so that the integrity of the data set data can be guaranteed when the frames fail.
As one embodiment, the cross distribution of the plurality of data set slices and the plurality of data set replica slices in at least two different racks according to a data replica distribution rule comprises:
the method comprises the steps of cross-distributing a plurality of data set slices and the same data set corresponding to a plurality of data set copy slices at each node of a distributed storage cluster;
according to the mutual exclusion principle, the nodes after the cross distribution of the plurality of data set slices and the plurality of data set copy slice pairs are distributed in at least two different racks in a cross mode, and at least one node is contained in each rack.
Specifically, in the cross distribution process, since the rack includes a plurality of nodes, the cross distribution in different racks includes cross distribution in different nodes, and the cross distribution process in the data copy distribution rule provided in this embodiment is not only cross-distributed in different nodes, but also cross-distributed in different racks, so as to prevent the nodes or the racks from failing, and ensure that the data set data can find the corresponding backup data to realize the completeness of the data.
Fig. 3 is a cross distribution schematic diagram of a data copy distribution rule provided by the embodiment of the present invention, as shown in fig. 3, a distributed storage cluster 1 includes a plurality of racks, each rack includes a plurality of nodes, there are 9 nodes in the corresponding graph, one node is reserved as a standby node, the number of nodes participating in slicing is 8, the slice size is 1000M/8=125m, a data set copy M1 is divided into 8 parts, a data set copy M2 is divided into 8 parts, the same copy data cannot be contained in one node, for example, nodes 1, 2 and 3 in the rack 1, the corresponding copy data of which are different in the data (M1-1, M2-4) of the node 1, the data (M1-2, M2-5) of the node 2, and the data (M1-3, M2-7) of the node 3.
The storage method of the distributed storage cluster data provided by the embodiment of the invention comprises the following steps: acquiring distributed storage cluster data and corresponding copy data; dividing distributed storage cluster data and duplicate data according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set duplicate slices; the plurality of data set slices and the plurality of data set replica slices are cross-distributed in at least two different racks according to a data replica distribution rule. According to the method, the data slicing rule is used for slicing storage, so that the problem that the space of the whole data disk of the distributed cluster is damaged due to the fact that the storage space of the existing main node is small is solved, and the uniformity of the data storage of the cluster is improved. The data is stored by the frame mutual exclusion principle of the data copy distribution rule, so that the data security risk brought by the failure of one node or the frame where the data is located is reduced, and the data security and the cluster stability are improved.
On the basis of the above embodiment, the copy distribution information further comprises slice pointer information for pointing to a next slice and a last slice position of the dataset for data combination from the dataset slice and/or the dataset copy slice.
Specifically, if a node fails, when the duplicate data stored on each node needs to be combined, because the data slices are stored in the storage process, the data needs to be combined according to the content of the slice mark in the combination process so as to be convenient for the integrity and the sequence of the slice data, and in this embodiment, the slice pointer information is utilized to point to the position of the next slice and the last slice of the data set so as to be convenient for data combination according to the data set slice and/or the data set duplicate slice.
The combining process can be a data set slice, a data set copy slice or a combination of the two slices.
On the basis of the above embodiment, the data set information table further includes a data set check value;
dividing distributed storage cluster data and duplicate data according to a data slicing rule and a data set check value, and distributing slice numbers of duplicate distribution information to obtain a plurality of data set slices and a plurality of data set duplicate slices.
Specifically, the data set check value is set to verify whether the data set is complete in the data combination process, for example, the data set is divided into 5 slices, a whole data set has a check value, the 5 slices respectively correspond to the check values, only the check values of all the 5 slices after combination are compared with the check value of the data set, if the check values are the same, the current 5 slices are determined, if the check values are different, the data combination of the slices is determined to be incorrect, or the number of the slices is determined to be incorrect.
A flag bit may be set with respect to the data set check value, or a data block MD5 value may be set, and a slice label may be assigned to determine the integrity of the data set based on the data block MD5 value.
On the basis of the embodiment, after the data fragments are stored in all nodes in the cluster in a scattered manner according to the distribution rule of the data copies, an information copy record table is generated after the complete position distribution, and the data are synchronized to the corresponding nodes according to the distribution position.
As an embodiment, fig. 4 is a schematic diagram of a performance monitoring data topology updating module according to an embodiment of the present invention, where, as shown in fig. 4, the performance monitoring data topology updating module provides functions of node sensing, data dynamic recovery, and data reconstruction of a data set, and includes a node anomaly record table. The method further comprises:
sending heartbeat data to each node according to the preset time;
if each node fails to receive the heartbeat data, recording the node which fails to receive the heartbeat as an abnormal node;
starting a data set dynamic recovery mechanism, and recording the abnormal nodes into a node abnormal recording table, wherein the node abnormal recording table at least comprises an abnormal node number, a frame number where the abnormal nodes are located, a offline time and progress information of the abnormal nodes.
Specifically, in the node sensing process, heartbeat data is sent to each node according to preset time, and if each node fails to receive the heartbeat data, the node is indicated to be offline or to have a fault. The setting of the preset time can be set according to actual conditions, for example, 1 ping per 1 second, two continuous pings are carried out, as one monitoring, if the pings fail, a node abnormality is recorded, if three continuous abnormalities are carried out, the node is declared to be objectively offline, if the node is identified to be objectively offline, the data backup of the node is considered to be lost, the heartbeat data receiving failure is considered, and the node which fails to receive the heartbeat is recorded as an abnormal node.
And starting a data set dynamic recovery mechanism, and recording objective offline information of the node into a node exception record table, wherein the record table comprises a constant node number (node ID), a frame number where the abnormal node is located, offline time and progress information (whether processed or not) of the abnormal node.
For the data set dynamic recovery mechanism, as an embodiment, the establishment procedure of the data set dynamic recovery mechanism includes:
acquiring a slice list corresponding to an abnormal node in a copy distribution table;
determining a data set copy slice corresponding to the abnormal node according to the data slicing rule and the data copy distribution rule;
And backing up the copy slices of the data set corresponding to the abnormal node to the standby node, and updating the copy distribution table and the progress information of the abnormal node.
Specifically, the node actively receives the objective offline message or reads the node exception record table in the above embodiment at regular time, and it should be noted that the node exception record table is read by a timing method to prevent the message from being lost. If the node is abnormal and is not processed, a slice list corresponding to the abnormal node in the copy distribution table is obtained, slice information of the corresponding data set copy slices is obtained from other nodes in the cluster according to the two rules of the embodiment, the information is synchronously backed up to a standby node, the slice information in the copy distribution table is updated, and whether the offline node in the node abnormal record table is processed or not is set to be processed after the slice backup is completed.
As an embodiment, when the cluster information changes, the method further includes:
and when the cluster information changes, reconstructing the distributed storage cluster data according to the designated time or a manual mode.
Specifically, the data reconstruction is to re-slice all the data sets already stored, allocate positions and store. When the user recognizes that the cluster topology changes, the performance monitoring data set can be manually stored in a reconstruction mode, in addition, the cluster can periodically scan the node topology distribution table (the periodic time interval and the reconstruction time point can be configured), when the cluster topology is recognized to change, the data of the data set is automatically reconstructed, and the node state of the node topology distribution table is changed after the reconstruction is completed.
When a node fails, a standby node needs to be reserved, and meanwhile, when a node is newly added into the cluster, the cluster performance resources are prevented from being occupied by immediate reconstruction, so that the cluster data set is reconstructed by adopting a periodic reconstruction or manual mode.
The invention further discloses a storage device of the distributed storage cluster data corresponding to the method, and fig. 5 is a structural diagram of the storage device of the distributed storage cluster data provided by the embodiment of the invention.
As shown in fig. 5, the storage apparatus for storing cluster data in a distributed manner includes:
a first obtaining module 11, configured to obtain distributed storage cluster data and corresponding copy data;
a first dividing module 12, configured to divide the distributed storage cluster data and the replica data according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set replica slices, respectively;
a first cross distribution module 13, configured to cross-distribute the plurality of data set slices and the plurality of data set replica slices in at least two different racks according to a data replica distribution rule.
As one embodiment, the process of establishing the data slicing rule of the partitioning module includes:
the second acquisition module is used for acquiring the node number and the data set size of the distributed storage cluster;
the reservation module is used for reserving nodes of the distributed storage cluster according to the preset number to serve as standby nodes;
and the first determining module is used for determining the number of the data set slices according to the relation among the data set scale, the number of the standby nodes and the number of the nodes.
As an embodiment, the first cross distribution module includes:
the second cross distribution module is used for cross distributing the same data set corresponding to the plurality of data set slices and the plurality of data set copy slices to each node of the distributed storage cluster;
and the third cross distribution module is used for cross distributing all nodes after cross distribution according to a mutual exclusion principle, a plurality of data set slices and a plurality of data set copy slice pairs in at least two different racks, wherein at least one node is contained in the racks.
As one embodiment, the cluster information table of the distributed storage clusters in the partitioning module at least includes node topology distribution information, data set information, and copy distribution information;
the node topology distribution information at least comprises a rack position number, a rack name, a node number and a node name;
The data set information at least comprises a data set name, a data set number, a data set classification time and a data set scale;
the copy distribution information at least comprises a backup data set number, a backup data set scale, a copy slicing scale, a slice number, a slicing number, a backup node number and a frame number.
As an embodiment, the method further comprises a pointing module, the copy distribution information further comprises slice pointer information for pointing to a next slice and a last slice position of the dataset for data combination according to the dataset slice and/or the dataset copy slice.
As an embodiment, the data set information table further comprises a verification module, and the data set information table further comprises a data set verification value;
dividing distributed storage cluster data and duplicate data according to a data slicing rule and a data set check value, and distributing slice numbers of duplicate distribution information to obtain a plurality of data set slices and a plurality of data set duplicate slices.
As an embodiment, further comprising:
the sending module is used for sending the heartbeat data to each node according to the preset time;
the recording module is used for recording the node which fails to receive the heartbeat as an abnormal node if each node fails to receive the heartbeat data;
The starting module is used for starting a data set dynamic recovery mechanism and recording the abnormal nodes into a node abnormal recording table, wherein the node abnormal recording table at least comprises an abnormal node number, a frame number where the abnormal node is located, the offline time and the progress information of the abnormal node.
As one embodiment, the start-up module comprises:
the third acquisition module is used for acquiring a slice list corresponding to the abnormal node in the duplicate distribution table;
the second determining module is used for determining the data set copy slice corresponding to the abnormal node according to the data slicing rule and the data copy distribution rule;
and the backup module is used for backing up the data set copy slices corresponding to the abnormal nodes to the standby nodes and updating the copy distribution table and the progress information of the abnormal nodes.
As an embodiment, the device further comprises a reconstruction module;
and the reconstruction module is used for reconstructing the distributed storage cluster data according to the designated time or a manual mode when the cluster information changes.
Since the embodiments of the device portion correspond to the above embodiments, the embodiments of the device portion are described with reference to the embodiments of the method portion, and are not described herein.
For the description of the storage device for distributed storage cluster data provided by the present invention, refer to the above method embodiment, and the present invention is not described herein again, and has the same beneficial effects as the above method for storing distributed storage cluster data.
Fig. 6 is a block diagram of another storage device for storing cluster data in a distributed manner according to an embodiment of the present invention, as shown in fig. 6, where the device includes:
a memory 21 for storing a computer program;
a processor 22 for implementing the steps of a storage method of distributed storage cluster data when executing a computer program.
The storage device for the distributed storage cluster data provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
Processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like, among others. The processor 22 may be implemented in hardware in at least one of a digital signal processor (Digital Signal Processor, DSP), a Field programmable gate array (Field-Programmable Gate Array, FPGA), a programmable logic array (Programmable Logic Array, PLA). The processor 22 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a central processor (Central Processing Unit, CPU), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 22 may be integrated with an image processor (Graphics Processing Unit, GPU) for use in responsible for rendering and rendering of content required for display by the display screen. In some embodiments, the processor 22 may also include an artificial intelligence (Artificial Intelligence, AI) processor for processing computing operations related to machine learning.
Memory 21 may include one or more computer-readable storage media, which may be non-transitory. Memory 21 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 21 is at least used for storing a computer program 211, where the computer program, after being loaded and executed by the processor 22, can implement the relevant steps of the storage method for distributed storage cluster data disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may further include an operating system 212, data 213, and the like, and the storage manner may be transient storage or permanent storage. The operating system 212 may include Windows, unix, linux, among other things. The data 213 may include, but is not limited to, data involved in the storage method of the distributed storage cluster data, and the like.
In some embodiments, the storage device for storing cluster data in a distributed manner may further include a display screen 23, an input/output interface 24, a communication interface 25, a power supply 26, and a communication bus 27.
Those skilled in the art will appreciate that the structure shown in fig. 6 is not limiting of a storage device for distributed storage of cluster data and may include more or fewer components than shown.
The processor 22 implements the storage method of distributed storage cluster data provided in any of the embodiments described above by calling instructions stored in the memory 21.
For the description of the storage device for distributed storage cluster data provided by the present invention, refer to the above method embodiment, and the present invention is not described herein again, and has the same beneficial effects as the above method for storing distributed storage cluster data.
Further, the present invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by the processor 22 implements the steps of the storage method for distributed storage cluster data as described above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present invention, or a part contributing to the related art or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium, performing all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
For the introduction of a computer readable storage medium provided by the present invention, please refer to the above method embodiment, the present invention is not described herein, and the method has the same advantages as the above method for storing distributed storage cluster data.
As an embodiment, fig. 7 is a schematic diagram of data slice distribution storage provided by the embodiment of the present invention, as shown in fig. 7, data slicing is performed on cluster data according to a data set information table and a node topology distribution table, slice position allocation is required for the sliced data, and meanwhile, a table of a copy distribution table is updated, and after completion, a data set and a copy are stored. Fig. 8 is a schematic diagram of dynamic cluster sensing, restoration and reconstruction, where as shown in fig. 8, a node senses and detects a data storage state of each node, and when an abnormality exists, the data storage state is recorded in a node abnormality record table, and at the same time, a data set is dynamically restored, and performance monitoring data reconstruct the data set. The performance monitoring data is subjected to the functions of slice decentralized storage and dynamic recovery of the data set, so that the balance of cluster data storage is improved, the safety of the cluster performance monitoring data is improved, and the stability of the cluster is effectively improved.
The above describes the storage method of the distributed storage cluster data, the storage device of the distributed storage cluster data and the medium provided by the invention in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (12)

1. A storage method for distributed storage cluster data, comprising:
acquiring the distributed storage cluster data and corresponding copy data;
dividing the distributed storage cluster data and the copy data respectively according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set copy slices;
and the plurality of data set slices and the plurality of data set copy slices are distributed in at least two different racks in a crossing way according to a data copy distribution rule.
2. The method for storing distributed storage cluster data according to claim 1, wherein the process of establishing the data slicing rule includes:
acquiring the node number and the data set size of the distributed storage cluster;
reserving nodes of the distributed storage cluster according to the preset number to serve as standby nodes;
and determining the number of data set slices according to the relation among the data set scale, the number of standby nodes and the number of nodes.
3. The method of claim 1, wherein the cross-distributing the plurality of data set slices and the plurality of data set replica slices according to the data replica distribution rule in at least two different racks comprises:
The data set slices and the same data set corresponding to the data set copy slices are distributed on all nodes of the distributed storage cluster in a crossing mode;
and according to a mutual exclusion principle, the nodes after the cross distribution of the plurality of data set slices and the plurality of data set copy slice pairs are distributed in a cross mode on at least two different racks, wherein at least one node is contained in each rack.
4. The method for storing distributed storage cluster data according to claim 1, wherein the cluster information table of the distributed storage cluster includes at least node topology distribution information, data set information, and replica distribution information;
the node topology distribution information at least comprises a rack position number, a rack name, a node number and a node name;
the data set information at least comprises a data set name, a data set number, a data set classification time and a data set scale;
the copy distribution information at least comprises a backup data set number, a backup data set scale, a copy slicing scale, a slice number, a slicing number, a backup node number and a frame number.
5. The method of claim 4, wherein the replica distribution information further comprises slice pointer information for pointing to a next slice and a last slice position of a dataset for data combining according to the dataset slice and/or the dataset replica slice.
6. The method of claim 4, wherein the data set information table further comprises a data set check value;
dividing the distributed storage cluster data and the duplicate data according to the data slicing rule and the data set check value, and distributing the slice numbers of the duplicate distribution information to obtain a plurality of data set slices and a plurality of data set duplicate slices.
7. The storage method of distributed storage cluster data according to any one of claims 1 to 6, further comprising:
sending heartbeat data to each node according to preset time;
if each node fails to receive the heartbeat data, recording the node which fails to receive the heartbeat as an abnormal node;
starting a data set dynamic recovery mechanism, and recording the abnormal nodes into a node abnormal recording table, wherein the node abnormal recording table at least comprises an abnormal node number, a frame number where the abnormal nodes are located, a offline time and progress information of the abnormal nodes.
8. The method for storing distributed storage cluster data according to claim 7, wherein the process of establishing the data set dynamic recovery mechanism comprises:
Acquiring a slice list corresponding to the abnormal node in the copy distribution table;
determining a data set copy slice corresponding to the abnormal node according to the data slicing rule and the data copy distribution rule;
and backing up the copy slices of the data set corresponding to the abnormal node to a standby node, and updating the copy distribution table and the progress information of the abnormal node.
9. The method for storing distributed storage cluster data according to claim 7, further comprising, when the cluster information changes:
and when the cluster information changes, reconstructing the distributed storage cluster data according to the designated time or a manual mode.
10. A storage device for distributed storage of clustered data, comprising:
the acquisition module is used for acquiring the distributed storage cluster data and the corresponding copy data;
the dividing module is used for dividing the distributed storage cluster data and the copy data respectively according to a cluster information table and a data slicing rule of the distributed storage cluster to obtain a plurality of data set slices and a plurality of data set copy slices;
and the cross distribution module is used for cross distributing the plurality of data set slices and the plurality of data set copy slices to at least two different racks according to a data copy distribution rule.
11. A storage device for distributed storage of clustered data, comprising:
a memory for storing a computer program;
processor for implementing the steps of the storage method of distributed storage cluster data according to any of claims 1 to 9 when executing said computer program.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method of storing distributed storage cluster data according to any of claims 1 to 9.
CN202310501757.8A 2023-04-28 2023-04-28 Storage method, device and medium for distributed storage cluster data Pending CN116521083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310501757.8A CN116521083A (en) 2023-04-28 2023-04-28 Storage method, device and medium for distributed storage cluster data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310501757.8A CN116521083A (en) 2023-04-28 2023-04-28 Storage method, device and medium for distributed storage cluster data

Publications (1)

Publication Number Publication Date
CN116521083A true CN116521083A (en) 2023-08-01

Family

ID=87395618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310501757.8A Pending CN116521083A (en) 2023-04-28 2023-04-28 Storage method, device and medium for distributed storage cluster data

Country Status (1)

Country Link
CN (1) CN116521083A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932555A (en) * 2023-08-14 2023-10-24 合芯科技有限公司 Target object slice position determining method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932555A (en) * 2023-08-14 2023-10-24 合芯科技有限公司 Target object slice position determining method, device, equipment and storage medium
CN116932555B (en) * 2023-08-14 2024-04-30 合芯科技有限公司 Target object slice position determining method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2019154394A1 (en) Distributed database cluster system, data synchronization method and storage medium
US7992037B2 (en) Scalable secondary storage systems and methods
DE112019002584T5 (en) SWITCHING BETWEEN BROKER SERVICES FOR A STORAGE SYSTEM
US9361592B2 (en) Automated defect and optimization discovery
EP2330519A1 (en) Distributed file system and data block consistency managing method thereof
CN108763578B (en) Index file updating method and server
US10726042B2 (en) Replication control using eventually consistent meta-data
CN109669929A (en) Method for storing real-time data and system based on distributed parallel database
US11436089B2 (en) Identifying database backup copy chaining
US11494271B2 (en) Dynamically updating database archive log dependency and backup copy recoverability
CN116521083A (en) Storage method, device and medium for distributed storage cluster data
CN109726211B (en) Distributed time sequence database
US11966297B2 (en) Identifying database archive log dependency and backup copy recoverability
CN106855869B (en) Method, device and system for realizing high availability of database
CN116389233B (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN113821362B (en) Data copying method and device
CN112256201B (en) Distributed block storage system and volume information management method thereof
US9202167B1 (en) Automated defect identification and resolution
CN117349384B (en) Database synchronization method, system and equipment
CN117931769A (en) Data migration method, device, computer equipment and storage medium
CN114816855A (en) HDFS system data processing method, device and medium
CN117331886A (en) Method and device for smoothly migrating Hadoop data to object storage
CN116775596A (en) Data migration method and device, server and storage medium
CN117851099A (en) Fault processing method of k8s cluster, computing equipment and cluster
CN117667515A (en) Backup management method and device for main and standby clusters, computer equipment and storage medium

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