WO2019170004A1 - Data storage system, method and device - Google Patents

Data storage system, method and device Download PDF

Info

Publication number
WO2019170004A1
WO2019170004A1 PCT/CN2019/075696 CN2019075696W WO2019170004A1 WO 2019170004 A1 WO2019170004 A1 WO 2019170004A1 CN 2019075696 W CN2019075696 W CN 2019075696W WO 2019170004 A1 WO2019170004 A1 WO 2019170004A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage
data
type
node
storage node
Prior art date
Application number
PCT/CN2019/075696
Other languages
French (fr)
Chinese (zh)
Inventor
汪渭春
王伟
林鹏
Original Assignee
杭州海康威视系统技术有限公司
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 杭州海康威视系统技术有限公司 filed Critical 杭州海康威视系统技术有限公司
Publication of WO2019170004A1 publication Critical patent/WO2019170004A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • 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
    • 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
    • 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]

Definitions

  • the present application relates to the field of data storage technologies, and in particular, to a data storage system, method, and apparatus.
  • cloud storage systems based on cloud storage technologies have emerged. Compared with traditional storage systems, cloud storage systems are scalable and have improved storage. effectiveness.
  • Each storage node included in the cloud storage system has two types of network ports: a service network port and a data network port.
  • the service network port is used to receive data that needs to be stored. For example, the monitoring data of each monitoring device in the monitoring network.
  • the data network port is used for data transmission between devices in the storage system.
  • both the service network port and the data network port are connected by electrical ports, wherein the electrical port can be an ordinary network cable interface or a coaxial cable interface, and the 100 Mbps Ethernet electrical port and the Gigabit Ethernet can be selected according to requirements. Electric port and so on.
  • a storage node S in the cloud storage system After a storage node S in the cloud storage system receives the data to be stored through the service network port, considering a load balancing factor, etc., a part of the data can be stored locally, and then the other data is sent to other storage nodes through the data network port. storage.
  • the storage node S When the storage node S stores its local data to other storage nodes, the local data of the storage node S needs to be transmitted to other storage nodes through the network, and then the other storage nodes write the received data to other storage nodes. Local storage. Although the storage node S can store its local data to other storage nodes in the above manner, the storage node S needs to transmit its local data to other storage nodes through the data network port, that is, the electrical port. There is a data delay in this process, resulting in inefficient data storage.
  • the present application provides a data storage system, method and apparatus to solve the problem of data transmission delay, resulting in low data storage efficiency.
  • the specific technical solutions are as follows:
  • the embodiment of the present application provides a data storage system, where the storage system includes at least two storage nodes, and each storage node is connected through a SAS network;
  • a target storage node configured to acquire data to be stored, perform slice processing on the data to be stored to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type storage node And storing the first type of storage location of the slice data, and writing the obtained slice data to the acquired first type of storage location through the SAS network.
  • the target storage node acquires the first type of storage location for storing the slice data in the determined first type of storage node, including:
  • the target storage node is configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: The location of the determined first type of storage node for storing slice data.
  • the target storage node is configured to determine a first type of storage node for storing the obtained slice data, including:
  • the target storage node is configured to determine a first type of storage node for storing the obtained slice data according to at least one of the following information:
  • the storage system further includes a management node
  • the target storage node is configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes: a correspondence relationship between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored; sending the generated storage index to the management node;
  • the management node is configured to receive and store a storage index sent by the target storage node.
  • the management node is further configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system as the second type of storage node; a stored storage index, determining slice data corresponding to the data to be read and a second type of storage location of each slice data, and sending the second type of storage location to the second type storage node;
  • the second type of storage node is configured to receive the second type of storage location sent by the management node, read slice data from the second type of storage location, and perform restoration processing on the read slice data. Obtaining the data to be read, and sending the data to be read to the target client.
  • the management node is configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a storage node included in the storage system, to reconstruct the fault.
  • a storage node storing data in the location as a storage node of the third type;
  • the third type of storage node is configured to reconstruct data stored in the fault location, obtain reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated data. storage location.
  • the management node is specifically configured to acquire a fault location in the fault storage node, and determine, according to a local storage index, data corresponding to the fault location, and data corresponding to the fault location. Slicing data, and obtaining a storage location corresponding to each determined slice data, and transmitting the obtained storage location to a third type of storage node, wherein the third type of storage node is: a data amount of data stored according to the fault location And a storage node selected from the storage node included in the storage system for reconstructing data stored in the fault location;
  • the third type storage node is configured to receive a storage location sent by the management node, read corresponding slice data from the received storage location, and perform reconfiguration processing on the read slice data to obtain a weight Constructing data, allocating a storage location for the reconstructed data, and writing the reconstructed data to the allocated storage location.
  • the embodiment of the present application provides a data storage system, where the storage system includes: a slicing server, at least two storage nodes, and each storage node is connected through a SAS network;
  • the slice server is configured to acquire data to be stored, perform slice processing on the data to be stored, and obtain slice data; determine, from the at least two storage nodes, a target storage node that receives the slice data, and obtain the obtained Sending slice data to the target storage node;
  • the target storage node is configured to receive the slice data sent by the slice server, determine a first type of storage node used to store the slice data, and acquire the determined first type storage node for storing The first type of storage location of the slice data is written to the acquired first type of storage location by the SAS network.
  • the target storage node acquires a first type of storage location for storing slice data in the determined first type of storage node, including:
  • the target storage node is configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: The location of the determined first type of storage node for storing slice data.
  • the target storage node is configured to determine a first type of storage node for storing slice data, including:
  • the target storage node is configured to determine a first type of storage node for storing slice data according to at least one of the following information:
  • the storage system further includes a first management node
  • the target storage node is configured to generate a storage index of each of the received slice data, where the storage index record of the slice data includes a correspondence between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the data to be stored and each slice data obtained by the slice processing; sending the generated storage index to the first management node;
  • the first management node is configured to receive and store a storage index sent by the target storage node.
  • the first management node is further configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system as the second type of storage node; Determining, according to the locally stored storage index, the slice data corresponding to the data to be read and the second type of storage location of each slice data, and sending the second type of storage location to the second type storage node;
  • the second type of storage node is configured to receive the second type of storage location sent by the first management node, read slice data from the second type of storage location, and perform the read slice data.
  • the restoration process is performed to obtain the data to be read, and the data to be read is sent to the target client.
  • the first management node is configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a storage node included in the storage system for reconfiguring a storage node storing data stored in the fault location as a storage node of the third type;
  • the third type of storage node is configured to reconstruct data stored in the fault location, obtain reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated data. storage location.
  • the first management node is specifically configured to acquire a fault location in the fault storage node, determine, according to a local storage index, data corresponding to the fault location, and data stored in the fault location. Corresponding slice data, and obtaining a storage location corresponding to each determined slice data, and sending the obtained storage location to a third type storage node, wherein the third type storage node is: storing data according to the fault location a quantity of data, from a storage node included in the storage system, a storage node selected to reconstruct data stored in the fault location;
  • the storage node of the third type is configured to receive a storage location sent by the first management node, read corresponding slice data from the received storage location, and perform reconstruction processing on the read slice data. Reconstructed data is obtained, a storage location is allocated for the reconstructed data, and the reconstructed data is written to the allocated storage location.
  • the storage system further includes a second management node
  • Determining, by the slice server, a target storage node that receives the slice data from the at least two storage nodes including:
  • the slice server is configured to send a second storage request to the second management node
  • the second management node is configured to receive the second storage request sent by the slice server, determine a target storage node from the storage nodes included in the storage system, and send the identifier of the determined target storage node To the slicing server;
  • the slice server is configured to receive the identifier sent by the second management node, and determine the target storage node corresponding to the identifier.
  • the second management node determines the target storage node from the storage nodes included in the storage system, including:
  • the second management node is configured to determine a target storage node from the storage nodes included in the storage system according to at least one of the following information:
  • the embodiment of the present application provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node is connected through a SAS network;
  • the method includes:
  • the obtained slice data is written into the acquired first type of storage location through the SAS network.
  • the step of obtaining the first type of storage location for storing the slice data in the determined first type of storage node includes:
  • the step of determining a first type of storage node for storing the obtained slice data includes:
  • a first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
  • the storage system further includes: a management node; after the step of writing the obtained slice data to the acquired first type storage location by using the SAS network, the method further includes:
  • the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, the data to be stored, and the to-be-stored data Corresponding relationship between each slice data obtained by slicing the data;
  • the generated storage index is sent to the management node.
  • the embodiment of the present application provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes and a slicing server, and each storage node is connected through a SAS network. ;
  • the method includes:
  • the slice data is written to the acquired first type of storage location through the SAS network.
  • the step of acquiring the first type of storage location for storing the slice data in the determined first type of storage node includes:
  • the step of determining a first type of storage node for storing slice data comprising:
  • a first type of storage node for storing slice data is determined according to at least one of the following information:
  • the storage system further includes a management node
  • the method further includes:
  • the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, the data to be stored, and the Corresponding relationship between each slice data obtained by slice processing of the data to be stored;
  • the generated storage index is sent to the management node.
  • the embodiment of the present application provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node is connected through a SAS network;
  • the device includes:
  • a first acquiring module configured to acquire data to be stored
  • a slice processing module configured to slice the data to be stored to obtain slice data
  • a first determining module configured to determine a first type of storage node for storing the obtained slice data
  • a second acquiring module configured to acquire, in the determined first type of storage node, a first type of storage location for storing the slice data
  • a first writing module configured to write the obtained slice data to the acquired first type of storage location through the SAS network.
  • the second obtaining module includes:
  • a first sending submodule configured to send a first storage request to the determined first type of storage node
  • a first receiving submodule configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined storage of slice data allocated by the first type of storage node s position.
  • the first determining module is specifically configured to:
  • a first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
  • the storage system further includes a management node
  • the device also includes:
  • a first generation module configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, Corresponding relationship between the data to be stored and each slice data obtained by slicing the data to be stored;
  • the first sending module is configured to send the generated storage index to the management node.
  • the embodiment of the present application provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes and a slicing server, and each storage node is connected through a SAS network. ;
  • the device includes:
  • a receiving module configured to receive the slice data sent by the slice server, where the slice data is: the data obtained by the slice server to slice the processed data;
  • a second determining module configured to determine a first type of storage node for storing the slice data
  • a third acquiring module configured to acquire, in the determined first type of storage node, a first type of storage location for storing the slice data
  • a second writing module configured to write the slice data to the acquired first type of storage location through the SAS network.
  • the third obtaining module includes:
  • a second sending submodule configured to send a first storage request to the determined first type of storage node
  • a second receiving submodule configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined storage of slice data allocated by the first type of storage node s position.
  • the second determining module is specifically configured to:
  • a first type of storage node for storing slice data is determined according to at least one of the following information:
  • the storage system further includes a management node
  • the device also includes:
  • a second generation module configured to generate a storage index of each of the received slice data, where the storage index record of the slice data includes: a correspondence between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored;
  • a second sending module configured to send the generated storage index to the management node.
  • an embodiment of the present application provides an electronic device, including a processor and a memory;
  • a memory for storing a computer program
  • the processor when executed to execute a program stored on the memory, implements one of the data storage method steps described in any of the above.
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, implements one of the foregoing data. Store method steps.
  • the storage system includes at least two storage nodes, and each storage node is connected through a SAS network, and the target storage node is configured to acquire data to be stored, and perform slice processing on the stored data to obtain slice data. Determining a first type of storage node for storing the obtained slice data, and acquiring a first type of storage location for storing slice data in the determined first type of storage node, and writing the obtained slice data through a SAS network The first type of storage location obtained. After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • FIG. 1 is a schematic diagram of a first structure of a data storage system according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a second structure of a data storage system according to an embodiment of the present application.
  • FIG. 3 is a first flowchart of a data storage method according to an embodiment of the present application.
  • FIG. 4 is a second flowchart of a data storage method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a first structure of a data storage device according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of a second structure of a data storage device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the embodiment of the present application provides a data storage system, method, and device, where the storage system includes at least two storage nodes, and each storage node Connected through a SAS network, the target storage node is a storage node that acquires data to be stored;
  • a target storage node configured to acquire data to be stored, perform slice processing on the stored data to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type of storage node for use in The first type of storage location of the sliced data is stored, and the obtained sliced data is written into the acquired first type of storage location through the SAS network.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • a data storage system provided by an embodiment of the present application is first introduced.
  • the storage system 100 includes: at least two storage nodes 110, each storage node 110 is connected through a SAS network, and the target storage node is configured to acquire data to be stored. Storage node.
  • a target storage node configured to acquire data to be stored, perform slice processing on the stored data to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type of storage node for use in The first type of storage location of the sliced data is stored, and the obtained sliced data is written into the acquired first type of storage location through the SAS network.
  • the storage system 100 and the target storage node are respectively described below.
  • the storage system 100 First, the storage system 100
  • the storage system 100 can include at least two storage nodes 110.
  • each storage node may include multiple hard disks, and the hard disks are used to store corresponding data.
  • the storage node can store the data on different hard disks separately, and can also store the data on the same hard disk.
  • Each storage node in the storage system 100 is interconnected.
  • the interconnection may be interconnected through a SAS network, and each storage node includes at least a SAS interface.
  • SAS Serial Attached SCSI
  • SCSI Small Computer System Interface
  • SCSI Small Computer System Interface
  • SCSI Small Computer System Interface
  • SCSI can be used for computers and hard disks. Interface standard between devices such as floppy drives, optical drives, printers, and scanners.
  • each storage node to connect through the SAS network can be connected by means of a SAS switch.
  • Each storage node in the storage system is connected to the SAS switch, so that the storage nodes can be connected to each other through the SAS switch.
  • Storage nodes can be connected to SAS switches through their respective SAS interfaces.
  • the manner in which the storage nodes are connected through the SAS network may include other methods in addition to the manner of the above-mentioned SAS switch, which is not limited herein.
  • each storage node can perform write operations and read operations on each hard disk that is seen. That is to say, each storage node can see all the hard disks of the storage system 100, and each storage node can directly write data to the hard disk that can be seen, or can read data from the hard disk that can be seen.
  • the storage system includes a storage node A, a storage node B, and a storage node C, and the storage node A, the storage node B, and the storage node C are connected by a SAS network, and the storage node A includes a hard disk A1, a hard disk A2, and a storage node.
  • B includes the hard disk B1 and the hard disk B2.
  • the storage node C includes the hard disk C1 and the hard disk C2. Then, for the storage node A, the hard disk B1, the hard disk B2, the hard disk C1, and the hard disk C2 can be seen, and the data can be directly written to the hard disk.
  • the respective stored data may be read from the hard disk B1, the hard disk B2, the hard disk C1, and the hard disk C2.
  • each storage node is connected by a SAS network, and each storage node can perform read and write operations, thereby solving the problem of mutual exclusion between storage nodes.
  • a target storage node configured to acquire data to be stored, perform slice processing on the stored data to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type of storage node for use in The first type of storage location of the sliced data is stored, and the obtained sliced data is written into the acquired first type of storage location through the SAS network.
  • the first step is to acquire data to be stored.
  • the storage system 100 may further include an access node.
  • the manner in which the target storage node obtains the data to be stored may be: the target storage node receives the data to be stored sent by the access node in the storage system.
  • the access node is connected to the client external to the storage system 100, and is configured to receive data sent by the client.
  • the access node may be connected to the monitoring device for receiving video data sent by the monitoring device.
  • the access node in the storage system is configured to receive data to be stored sent by the client, and after receiving the data to be stored, the access node may send the to-be-stored data to the storage node, where the storage node is the target.
  • the access node may select a target storage node for receiving data to be stored from at least two storage nodes included in the storage system by using a preset policy, and the policy may be customized.
  • the access node receives the data to be stored and the data to be stored sent by the target storage node and the access node can be implemented through the service network port.
  • the service network port is used to receive service data, and the service data may be from the outside of the storage system. Storing data.
  • the service data may be the video data of the monitoring device, and the monitoring device sends the video data to the access node in the storage system through the service network port.
  • the video data is the data to be stored, and the access node receives the received data.
  • the video data is sent to the target storage node through its own service network port, so that the target storage node can obtain the video data to be stored.
  • the target storage node After acquiring the data to be stored, the target storage node performs slice processing on the stored data to obtain slice data.
  • the target storage node may perform data processing on the data by using Erasure Coding (EC).
  • EC Erasure Coding
  • a preset number N pieces of data can be obtained, and according to the obtained N pieces of data, a preset number of M pieces can be obtained. From the sum of the data slice and the test slice M + N, is the number of slice data obtained.
  • the type of the erasure code in the erasure code technology may include multiple types, and N and M may be determined by the type of the erasure code. In different erasure code types, N and M may be different.
  • an RS (Reed-Solomon) code is an erasure code commonly used in a storage system.
  • the N code of the RS code is 5, and M is 3.
  • the data is sliced by using the RS code, and 5 pieces of data can be obtained. 3 test pieces, and the final slice data obtained is 8.
  • the obtained M check slices can function as a fault tolerance.
  • the N pieces of data can be restored by the reconstruction algorithm in the erasure code technique. Therefore, the erasure code technology can play a role of fault tolerance for the slice data, improving the reliability of the data storage.
  • the slice data obtained by the erasure code technique includes five data slices and three check slices, wherein the five data slices are: data slice A, data slice B, data slice C, and data slice D.
  • data piece E, three check pieces are: test piece A, test piece B, test piece C.
  • the manner in which the target storage node performs the slicing process is not limited to the erasure code technique in the above embodiment, and may be other types of slice processing, which is not limited herein.
  • a first type of storage node for storing the obtained slice data is determined, and a first type of storage location for storing slice data in the determined first type of storage node is obtained.
  • the target storage node may determine, according to the number of slice data and the data volume of each slice data, a first type of storage node for storing slice data, and obtain the determined first type of storage node for storing slice data.
  • the first type of storage location may be determined, according to the number of slice data and the data volume of each slice data, a first type of storage node for storing slice data, and obtain the determined first type of storage node for storing slice data. The first type of storage location.
  • the number of the first type of storage nodes may be determined.
  • the manner of determining the number of the first type of storage nodes may be in various manners.
  • the number of the first type of storage nodes is the same as the number of the slice data. For example, when the number of slice data obtained by the target storage node is eight, the number of the first type of storage nodes determined is also eight. .
  • one slice data corresponds to one first type storage node, that is, only one slice data is stored in each of the determined first type storage nodes, and is stored in each first type storage node.
  • the slice data is not the same.
  • the slice data obtained by the target storage node includes: slice data A, slice data B, and slice data C
  • the determined three first type storage nodes for storing the slice data are: the first type storage node 1, The first type storage node 2 and the first type storage node 3, and the target storage node assigns the slice data A to the first type storage node 1, the slice data B to the first type storage node 2, and distributes the slice data C
  • the first type of storage node 1 stores slice data A
  • the first type of storage node 2 stores slice data B
  • the first type of storage node 3 stores slice data C.
  • the number of storage nodes of the first type is smaller than the number of slice data.
  • at least one storage node of the first type of storage nodes that are determined needs to store more than one slice. data.
  • the first type of storage nodes that need to store more than one slice data may be determined according to the storage state of each storage node.
  • the storage state may include the remaining storage space of the storage node, load pressure, and the like.
  • the number of slice data is four
  • the number of the first type of storage nodes determined is three, namely: a first type storage node 1, a first type storage node 2, and a first type storage node 3, and Among the three first type storage nodes, compared with the first type storage node 2 and the first type storage node 3, the remaining storage space of the first type storage node 1 is larger, and the load pressure is smaller, therefore, the first can be determined.
  • One type of storage node 1 stores two of the slice data.
  • the determined number of storage nodes may be selected from the storage system 100 according to a preset policy, and the selected storage node is the first type of storage node.
  • the preset policy may be customized. Specifically, the manner of selecting a storage node according to the preset policy is described in detail in the following embodiments, and details are not described herein.
  • the amount of data of each slice data may also be considered, and the remaining storage space of the selected first type of storage node is at least greater than the data amount of the corresponding stored slice data.
  • the target storage node determines the first type of storage node
  • the first type of storage location for storing the slice data in the determined first type of storage node may be obtained.
  • the storage location may be a hard disk in the storage node, and different storage locations are different hard disks. When there are multiple partitions in each hard disk, the storage location may also be a partition specifically referring to the hard disks in the storage node.
  • the storage node includes the hard disk 1 and the hard disk 2, and the data is stored in the hard disk 1.
  • the storage location of the data may refer to the hard disk 1.
  • the storage location of the data refers to the partition 1 of the hard disk 1.
  • the storage node may include multiple hard disks, and the storage state of each hard disk is different. After determining the storage node of the first type, the storage state of each hard disk in the storage node of the first type may be selected to store the slice data.
  • the hard disk is the first type of storage location.
  • the storage state of the hard disk may be the remaining storage space, the load pressure, etc.
  • the storage state may be selected according to only one of the storage states, and may also be selected according to multiple storage states of the hard disk. It is not limited here.
  • the hard disk with the largest remaining storage space is selected from the first type of storage nodes as the hard disk storing the slice data only according to the remaining storage space.
  • the hard disk with the largest remaining storage space and the lowest load pressure can be selected from the first type of storage nodes as the hard disk storing the slice data.
  • the first type of storage location for storing the slice data in the first type of storage node may be determined by the first type of storage node itself, or may be specified by the target storage node, and then applied to the corresponding first type of storage node. This part is described in detail in the following embodiments and will not be described in detail herein.
  • the obtained slice data is written into the acquired first type storage location through the SAS network.
  • each storage node may be connected through a SAS network. Therefore, the target storage node can know the storage location in each of the other storage nodes in the storage system 100, the target storage node can read the corresponding data from the other storage nodes, and can also write the data to the storage location in the other storage nodes. .
  • the target storage node may directly write the slice data into the corresponding first type storage location.
  • the target storage node obtains the slice data A, and determines that the slice data A corresponds to the first type storage location A of the first type storage node A, and the target storage node can directly write the slice data A through the SAS network.
  • the first type of storage node A is stored in location A.
  • the storage system includes at least two storage nodes, and each storage node is connected through a SAS network, and the target storage node is configured to acquire data to be stored, and perform slice processing on the stored data to obtain slice data. Determining a first type of storage node for storing the obtained slice data, and acquiring a first type of storage location for storing slice data in the determined first type of storage node, and writing the obtained slice data through a SAS network The first type of storage location obtained. After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • the first type of storage location may be determined by the first type of storage node itself.
  • the target storage node may send the first storage request to the determined first type of storage node.
  • the first type of storage node may allocate a corresponding storage location according to the first storage request, where the storage location is the first type of storage location, and the first type of storage node stores the allocated first category. The location is sent to the target storage node.
  • the first storage request sent by the target storage node may include any one or more of data type, data volume, data identifier, and the like of the slice data to be stored.
  • the data type may include video data, image data, and the like.
  • the amount of data reflects the size of the storage space occupied by the slice data, and the storage node allocates the corresponding storage space according to the data amount of the slice data.
  • the data identification can be used to verify the slice data to ensure that the slice data is written to the correct storage location.
  • the target storage node may be configured to determine, according to at least one of the following information, a first type of storage node used to store the obtained slice data: a storage node that has been allocated by the target storage node, and a storage system The survival state of each storage node, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
  • the target storage node determines the first type of storage node based on the storage node that has been allocated by the target storage node.
  • the target storage node can record the identity of each of the determined first type of storage nodes.
  • the first implementation manner is a centralized policy, that is, when the target storage node determines the first type of storage node, the storage node that is the same as the storage node of the first type determined last time may be selected.
  • the storage system 100 includes: a storage node 1, a storage node 2, a storage node 3, a storage node 4, and a storage node 5.
  • the last determined first type of storage node recorded by the target storage node is the storage node 1 and the storage. Node 2, then, when the target storage node determines the first type of storage node this time, the storage node 1 and the storage node 2 are still selected as the first type of storage node.
  • the first type of storage node determined last time fails, the storage space is full, etc.
  • the first type of storage node determined last time can no longer be used as the first type of storage node, but can pass the target.
  • the storage node determines the other basis of the first type of storage node to re-determine the first type of storage node.
  • the second implementation manner is a decentralized strategy, that is, when the target storage node determines the first type of storage node, the storage node different from the previously determined first type storage node may be selected. It can be divided into two cases: in the first case, a storage node different from the first type of storage node determined last time can be selected; in the second case, it can be selected differently from the first type of storage node determined many times before. Storage node.
  • the target storage node when determining the first type of storage node, may select a storage node different from the first type of storage node determined last time. That is to say, the determined first type of storage node may be different from the first type of storage node determined last time.
  • the storage system 100 includes: a storage node 1, a storage node 2, a storage node 3, a storage node 4, and a storage node 5.
  • the last determined storage node recorded by the target storage node is a storage node 1 and a storage node 2, Then, when the target storage node determines the first type of storage node, the storage node 3, the storage node 4, and the storage node 5 may be selected as the storage node of the first type.
  • the target storage node may select a storage node different from the first type of storage node determined a plurality of times before. Among them, the number of times before can be customized.
  • the target storage node may employ a rotation policy when determining the first type of storage nodes.
  • An order sorting table for each storage node included in the storage system 100 may be preset, and the sorting table records the sorting of the identifiers corresponding to the storage nodes included in the storage system 100, and the sorting rules may be customized.
  • the identifier may be allocated according to the identifier sorting table, and the identifier of the first type of storage node determined each time is: the first type of storage node determined last time Identifies the next identity in the identity sort table.
  • the first type of storage node may be re-determined.
  • the target storage node determines the first type of storage node according to the survival state of each storage node in the storage system.
  • the survival state of the storage node is: a fault state or an intact state of the storage node.
  • the storage node can periodically report the survival status of the storage node to the target storage node.
  • the storage state of each storage node can also be known in real time. In this way, when the target storage node determines the first type of storage node, the failed storage node can be eliminated in time, and only the target storage node is determined from the intact storage node. In this way, the efficiency of slicing data storage can be improved.
  • the target storage node determines the first type of storage node based on: the remaining storage space of each storage node in the storage system.
  • the remaining storage space of each storage node may be sorted, and for a storage node with a large remaining storage space, it may be preferentially determined as the first type of storage node.
  • the target storage node may update the order of the remaining storage spaces of each storage node after each determination of the storage node of the first type, and the obtained new remaining storage space sorting may be used as the next determination of the first type of storage.
  • the basis of the node In this way, the remaining storage space of each storage node in the storage system 100 can be equalized.
  • the target storage node determines the basis of the first type of storage node as: the load pressure of each storage node in the storage system.
  • the load pressure of each storage node included in the storage system 100 may be sorted, and for a storage node with a small load pressure, it may be preferentially determined as the first type of storage node. In this way, the target storage node may update the load pressure order of each storage node after each determination of the storage node of the first type, and the obtained new load pressure ordering may be used as the basis for determining the first type of storage node next time. . In this way, the load pressure of each storage node in the storage system 100 can be equalized.
  • the basis of the first type of storage node may be separately determined as the target storage node, and any two, three or four combinations may be used as the basis for the target storage node to determine the first type of storage node. There is no limit here.
  • the storage system may further include a management node, where the management node in the storage system may be one or multiple.
  • the collection of the plurality of management nodes is a management cluster. Therefore, it can be considered that the storage system includes a management cluster, and the management cluster includes a plurality of management nodes.
  • the target storage node and the management node in this embodiment are respectively introduced below.
  • the correspondence between the obtained slice data and the data to be stored may be recorded. Relationship, the correspondence is a correspondence relationship of storage index records of one slice data.
  • the slice data obtained by the target storage node after the data A is sliced includes: slice data 1, slice data 2, and slice data 3.
  • the correspondence relationship of the target storage node records includes: data A corresponds to slice data 1, and data A and The slice data 2 corresponds, and the data A corresponds to the slice data 3.
  • the target storage node After the target storage node writes the received slice data to the corresponding first type storage location through the SAS network, the corresponding relationship between each slice data and the first type of storage location stored by the slice data may be recorded.
  • the relationship is also another correspondence of the storage index records of one slice of data.
  • the slice data obtained by the target storage node includes: slice data A, slice data B, and slice data C, wherein the storage index 1 of the slice data A is the slice data A corresponding to the storage location A, and the storage index 2 of the slice data B
  • the storage index 3 of the slice data C corresponds to the storage location C
  • the storage index generated by the target storage node includes the storage index 1, the storage index 2, and the storage index 3.
  • the storage index generated by the target storage node includes: a storage index corresponding to each slice data obtained by the target storage node.
  • a management node may be selected from the management cluster according to a preset policy, and used to receive and store the storage index sent by the target storage node.
  • the preset policy may be: determining, according to at least one of the following information, a management node for receiving and storing a storage index sent by the target storage node: the allocated management node, and the survival status of each management node in the management cluster. Manage the load pressure of each management node in the cluster.
  • the policy for determining the management node is similar to the policy for determining the storage node of the first type in the foregoing embodiment, and may refer to the basis of the first embodiment, the second base, and the fourth base in the foregoing embodiments, and details are not described herein again.
  • the management node can more accurately and quickly query the storage location of storing the slice data in the storage system through the stored storage index, thereby improving data processing efficiency.
  • the management node and the second type storage node in the embodiment are respectively introduced below.
  • the management node can also be used to receive a read request from the target client for the data to be read.
  • the target client may be a device external to the storage system that sends a read request, for example, a client device such as a computer, a mobile phone, or a tablet.
  • the data to be read may be data stored in the storage system.
  • the management node selects the second type of storage node according to a preset policy.
  • the second type storage node may be selected from the storage nodes included in the storage system according to at least one of the following information: The storage node allocated by the node, the surviving state of each storage node in the storage system, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
  • the policy for the management node to select the second type of storage node is similar to the strategy for determining the storage node of the first type in the foregoing embodiment, and may refer to the basis of the foregoing embodiment, the second, the third, and the fourth, and will not be described herein. .
  • the management node may determine the slice data corresponding to the data to be read and the second type of storage location of each slice data according to the locally stored storage index.
  • the management node may query the obtained slice data of the data to be read according to the locally stored storage index, including: slice data A, slice data B, and slice data C, and may query and obtain a storage location corresponding to each slice data: slice data.
  • A is stored in the storage location A
  • the slice data B is stored in the storage location B
  • the slice data C is stored in the storage location C.
  • the storage location A, the storage location B, and the storage location C are the second type of storage location.
  • the storage nodes included in the storage system 100 are connected by a SAS network, and the second type of storage nodes can read data from other storage nodes in the storage system.
  • the second type of storage node after receiving the second type of storage location sent by the management node, the second type of storage node can read the stored slice data from the second type of storage location.
  • the second type of storage location sent by the management node includes a storage location A, a storage location B, and a storage location C, wherein the storage location A stores slice data A, the storage location B stores slice data B, and the storage location C stores slice Data C, then, for the second type of storage node, the slice data A is read from the storage location A, the slice data B is read from the storage location B, and the slice data C is read from the storage location C.
  • the second type of storage node can perform data restoration processing on the read slice data to obtain data to be read required by the target client.
  • the second type of storage node performing data restoration processing may be an erasure code technique, and the number of slice data read by the second type storage node may be N+M, where N is data.
  • the number of slices, M is the number of slices.
  • the number of slice data read by the second type of storage node may be less than N+M and greater than or equal to N, because the fault tolerance characteristic of the erasure code technology itself can restore the slice data to N+M, and then perform data restoration. Processing to obtain data to be read.
  • the management node and the third type storage node in the embodiment are respectively introduced below.
  • the management node can perform overall management on the storage nodes included in the storage system 100, and can obtain state information of each storage node in real time.
  • the status information of the storage node may include at least one of failure information of the storage node, remaining storage space information, and hard disk status information included in the storage node.
  • the first type of obtaining may be that each storage node actively sends its own state information to the management node, where the storage node may send according to a preset frequency, and the preset frequency may be customized. For example, in order to ensure that the state information of each storage node acquired by the management node is real-time, the frequency of the transmission may be set higher; in addition, when the storage node is in a sudden state such as a failure or a storage is full, the storage node may immediately Send the information of the emergency to the management node.
  • the management node actively obtains the state information of each storage node from each storage node in the storage system.
  • the manner in which the management node obtains the state information of the storage node is not limited to the above two types, and may also include other acquisition modes, which are not limited herein.
  • the management node may obtain the fault information of the faulty storage node.
  • the storage node fault may be a storage location fault in the storage node, causing the data stored in the storage location to be damaged. Can't read.
  • the fault information may include the data amount of the data stored in the fault location, and the fault information may further include at least one of the following information: a data type of the data stored in the fault location, data identifier information, and the like.
  • the management node acquires the fault location in the fault storage node, determines the data corresponding to the fault location according to the local storage index, and the slice data corresponding to the data stored in the fault location, and obtains the determined slice data. Corresponding storage location, the obtained storage location is sent to the third type of storage node.
  • the fault location acquired by the management node may be: after the faulty storage node that identifies the fault identifies the fault location, the fault location is reported to the management node.
  • the management node may determine, according to the correspondence between the slice data in the locally stored storage index and the first type of storage location corresponding to the slice data, the data corresponding to the fault location may be determined; Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored, thereby determining the slice data corresponding to the data stored in the fault location; and finally corresponding to the slice data according to the slice data in the storage index.
  • the storage locations corresponding to the determined slice data can be obtained.
  • the determined storage location is sent to a third type of storage node.
  • the management node may select the third type of storage node from the storage nodes included in the storage system according to the data amount of the data stored in the fault location. In order to facilitate the reconstruction process and to store the reconstructed data, the available storage space of the third type of storage node is larger than the data amount of the data stored by the faulty location.
  • the third type of storage node may be selected according to a preset policy, and the third type of storage node may be selected from the storage nodes included in the storage system according to at least one of the following information: The storage node allocated by the node, the surviving state of each storage node in the storage system, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
  • the policy of selecting the storage node of the third type is similar to the policy of determining the storage node of the first type in the foregoing embodiment, and may refer to the basis of the foregoing embodiment according to the first, the second, the third and the fourth, and will not be described herein. .
  • the selected third type of storage node may perform reconstruction processing on the data, and the reconstruction processing may be an erasure coding technique.
  • the third type of storage node may perform reconstruction processing on the data stored in the fault location, and an implementation manner of the reconstruction processing may be stored in the fault location by using erasure code technology.
  • the data is reconstructed, and then the reconstructed data is obtained, and the obtained reconstructed data is the original data stored in the fault location.
  • the data stored in the fault location is data A
  • the reconstructed data obtained by the reconstruction process by the erasure code technique is data A.
  • the third type storage node receives the storage location sent by the management node, reads the corresponding slice data from the received storage location, and reconstructs the read slice data to obtain the reconstructed data. .
  • the corresponding storage location may be allocated for the reconstructed data.
  • the first allocation mode the storage location allocated by the storage node of the third type is a storage location in a storage node, so that the reconstructed data can be directly stored to the allocated storage location.
  • the remaining storage space of the allocated storage location is larger than the amount of data of the reconstructed data.
  • the third type of storage node may allocate a storage location for the data A, and the remaining space of the storage location is greater than 10M. In this way, data A can be written directly to the storage location.
  • the second allocation method can allocate multiple storage locations for the reconstructed data and perform slice storage on the reconstructed data.
  • the reconstructed data may be first sliced to obtain slice data, and each slice data is separately written into the allocated storage location.
  • the third type of storage node may perform slice processing by means of erasure coding technology.
  • the storage location allocated for the reconstruction data may be the hard disk of the storage node of the third type of storage node or the hard disk of other storage nodes of the storage system 100. This is not limited here.
  • the storage system 100 includes: a slicing server 120, at least two storage nodes 110, and each storage node 110 is connected through a SAS network;
  • the slice server 120 is configured to acquire data to be stored, perform slice processing on the stored data, and obtain slice data; determine, from at least two storage nodes, a target storage node that receives the slice data, and send the obtained slice data to the target storage node;
  • a target storage node configured to receive slice data sent by the slice server 120, determine a first type of storage node for storing slice data, and obtain a first type of storage location for storing slice data in the determined first type of storage node. And the received slice data is written into the first type of storage location obtained by the SAS network.
  • the slice data obtained by the target storage node in the embodiment is sent by the slice server 120, and after the target storage node receives the slice data, the operation performed by the target storage node in the embodiment corresponding to FIG. 1 is performed.
  • the operation performed by the target storage node in the embodiment corresponding to FIG. 1 is performed.
  • the slice server 120 is configured to acquire data to be stored, perform slice processing on the stored data, and obtain slice data; determine a target storage node that receives the slice data from the at least two storage nodes, and send the obtained slice data to the target storage node.
  • the data to be stored is obtained, and the data to be stored is sliced to obtain slice data.
  • the target storage node is used to obtain the data to be stored, and the data to be sliced is processed to obtain the slice data, and details are not described herein.
  • the target storage node that receives the slice data is determined from the at least two storage nodes, and the obtained slice data is sent to the target storage node.
  • the storage system 100 further includes a second management node.
  • the slice server 120 may send a second storage request to the second management node, where the second storage request is a request by the slice server 120 to allocate the storage node to the second management node.
  • the second storage request may carry related information of the slice data, for example, the number of slice data obtained by the slice server 120, the size of the slice data, and the like.
  • the second management node receives the second storage request sent by the slicing server 120, and determines the target storage node from the storage nodes included in the storage system according to the second storage request.
  • the second management node may determine, from the storage nodes included in the storage system, a target storage node according to at least one of the following information: a storage node that has been allocated by the second management node, and each storage in the storage system. The surviving state of the node, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
  • the implementation manner is similar to the policy for determining the storage node of the first type in the implementation manner corresponding to the foregoing embodiment of FIG. 1, and may refer to the basis of the foregoing, the second, the third, and the fourth according to the foregoing embodiments, and details are not described herein again.
  • the second management node After determining the target storage node, the second management node sends the determined identifier of the target storage node to the slice server 120.
  • the identifier may be at least one of an IP (Internet Protocol) address, a MAC (Media Access Control) address, a code, and the like.
  • the slice server 120 After receiving the identifier sent by the second management node, the slice server 120 can determine the target storage node corresponding to the identifier, and send the obtained slice data to the target storage node.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • the target storage node obtains the first type of storage location for storing the slice data in the determined first type of storage node, and may include:
  • a target storage node configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined first The location allocated by the class storage node to store the slice data.
  • the target storage node is configured to determine a first type of storage node for storing slice data, and may include:
  • a target storage node configured to determine, according to at least one of the following information, a first type of storage node for storing slice data: a storage node that has been allocated by the target storage node, a survival state of each storage node in the storage system, and storage The remaining storage space of each storage node in the system, and the load pressure of each storage node in the storage system.
  • the storage system may further include a first management node, where the first management node and the second management node may be the same management node, and may be different management nodes, which are not limited herein.
  • a storage node for generating a obtained storage index of each slice data wherein the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, and data to be stored Corresponding relationship with each slice data obtained by slicing the data to be stored; and transmitting the generated storage index to the first management node.
  • the first management node is configured to receive and store a storage index sent by the target storage node.
  • the first management node may further be configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system.
  • a second type of storage node according to the locally stored storage index, the slice data corresponding to the data to be read and the second type storage location of each slice data are determined, and the second type storage location is sent to the second type storage node.
  • the second type of storage node may be configured to receive the second type of storage location sent by the first management node, read the slice data from the second type of storage location, and perform the reduction processing on the read slice data to obtain a to-be-read Data and send the data to be read to the target client.
  • the first management node may be further configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a storage location node included in the storage system for reconstructing the fault location.
  • the third type of storage node can also be used to reconstruct the data stored in the fault location, obtain the reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated storage location.
  • the first management node is specifically configured to acquire a fault location in the fault storage node, determine, according to the local storage index, data corresponding to the fault location, and store the fault location.
  • the third type of storage node may be configured to receive a storage location sent by the first management node, read corresponding slice data from the received storage location, and reconstruct the processed slice data to obtain a reconstruction. Data, allocate storage locations for reconstructed data, and write reconstructed data to the allocated storage locations.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • the embodiment of the present application further provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node passes through a SAS network. connection;
  • the method includes the following steps:
  • the step of acquiring the first type of storage location (S304) for storing the slice data in the determined first type of storage node may include the following steps:
  • the first type of storage location is: the determined location of the first type of storage node for storing slice data.
  • the step of determining a first type of storage node (S303) for storing the obtained slice data may include the following steps:
  • a first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
  • the storage system may further include a management node
  • the method may further include the following steps:
  • the storage index record of one slice data includes a correspondence relationship between the slice type data and the first type of storage location corresponding to the slice data, and the data to be stored and the data to be stored are sliced Processing the corresponding relationship of each slice data;
  • the generated storage index is sent to the management node.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • the embodiment of the present application further provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes, a slicing server, and each storage node.
  • the target storage node is: a storage node that receives the slice data in the storage node included in the storage system;
  • the method includes the following steps:
  • S401 Receive slice data sent by the slice server, where the slice data is: data obtained by slice processing the slice data to be stored by the slice server;
  • S402. Determine a first type of storage node for storing slice data.
  • the step of acquiring the first type of storage location (S403) for storing the slice data in the determined first type of storage node may include the following steps:
  • the first type of storage location is: the determined location of the first type of storage node for storing slice data.
  • the step of determining a first type of storage node (S402) for storing slice data may include the following steps:
  • a first type of storage node for storing slice data is determined according to at least one of the following information:
  • the storage system further includes a management node
  • the method may further include the following steps:
  • the storage index record of one slice data includes a correspondence relationship between the slice type data and the first type of storage location corresponding to the slice data, and the data to be stored and the data to be stored are sliced Processing the corresponding relationship of each slice data;
  • the generated storage index is sent to the management node.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • the embodiment of the present application further provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node passes through a SAS network. Connection, the target storage node is a storage node having data to be stored;
  • the device includes:
  • the first obtaining module 510 is configured to acquire data to be stored.
  • the slice processing module 520 is configured to perform slice processing on the data to be stored to obtain slice data.
  • a first determining module 530 configured to determine a first type of storage node for storing the obtained slice data
  • a second obtaining module 540 configured to acquire a first type of storage location for storing slice data in the determined first type of storage node
  • the first writing module 550 is configured to write the obtained slice data into the acquired first type of storage location through the SAS network.
  • the second obtaining module 540 may include:
  • a first sending submodule configured to send a first storage request to the determined first type of storage node
  • a first receiving submodule configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined location of the first type of storage node for storing slice data .
  • the first determining module 530 is specifically configured to:
  • a first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
  • the storage system may further include a management node; the device may further include:
  • a first generation module configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes a correspondence between the slice type data and the first type of storage location corresponding to the slice data, and a data to be stored Corresponding relationship with each slice data obtained by slicing the data to be stored;
  • the first sending module is configured to send the generated storage index to the management node.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • the embodiment of the present application further provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes, a slicing server, and each storage node.
  • the target storage node is: a storage node that receives the slice data in the storage node included in the storage system;
  • the device includes:
  • the receiving module 610 is configured to receive the slice data sent by the slice server, where the slice data is: the data obtained by the slice server to slice the data to be stored;
  • a second determining module 620 configured to determine a first type of storage node for storing slice data
  • a third obtaining module 630 configured to acquire a first type of storage location for storing slice data in the determined first type of storage node
  • the second writing module 640 is configured to write the obtained slice data to the acquired first type of storage location through the SAS network.
  • the third obtaining module 630 may include:
  • a second sending submodule configured to send a first storage request to the determined first type of storage node
  • a second receiving submodule configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined location of the first type of storage node for storing slice data .
  • the second determining module 620 is specifically configured to:
  • a first type of storage node for storing slice data is determined according to at least one of the following information:
  • the storage system may further include a management node; the device may further include:
  • a second generation module configured to generate a storage index of each slice data obtained, where the storage index record of one slice data includes a correspondence between the slice data and a first type of storage location corresponding to the slice data, and a data to be stored Corresponding relationship with each slice data obtained by slicing the data to be stored;
  • a second sending module configured to send the generated storage index to the management node.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • the embodiment of the present application further provides an electronic device, as shown in FIG. 7, including a processor 710 and a memory 720;
  • a memory 720 configured to store a computer program
  • the processor 710 is configured to perform the following steps when executing the program stored on the memory 720:
  • the obtained slice data is written into the acquired first type of storage location through the SAS network.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • An electronic device provided by an embodiment of the present application may further perform a data storage method according to any one of the foregoing embodiments.
  • a data storage method may be performed according to any one of the foregoing embodiments.
  • a computer readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the above-described FIG. 3 and FIG. A data storage method according to any of the corresponding embodiments.
  • the embodiment of the present application further provides an electronic device, which can implement the following steps:
  • the obtained slice data is written into the acquired first type of storage location through the SAS network.
  • the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
  • An electronic device provided by an embodiment of the present application may further perform a data storage method according to any one of the foregoing embodiments.
  • a data storage method may be performed according to any one of the foregoing embodiments.
  • FIG. 4 A data storage method according to any of the corresponding embodiments.
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the above electronic device and other devices.
  • the memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
  • RAM random access memory
  • NVM non-volatile memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration.
  • CPU central processing unit
  • NP network processor
  • DSP digital signal processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array

Landscapes

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

Abstract

Provided are a data storage system, method and device. The storage system comprises storage nodes, wherein the storage nodes are connected via an SAS network; and a target storage node is used for acquiring data to be stored, and carrying out slice processing on the data to be stored to obtain slice data, and is also used for determining a first-type storage node for storing the obtained slice data, acquiring a first-type storage position, in the determined first-type storage node, for storing the slice data, and writing, via the SAS network, the obtained slice data into the acquired first-type storage position. By means of the technical solution provided in the embodiments of the present application, after slice processing is carried out on data to be stored, a target storage node can directly write slice data obtained by means of slice processing into a corresponding storage position respectively, thereby avoiding the occurrence of a transmission delay caused by data transmission, and thus improving the data storage efficiency.

Description

一种数据存储系统、方法及装置Data storage system, method and device
本申请要求于2018年03月09日提交中国专利局、申请号为201810193323.5发明名称为“一种数据存储系统、方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201101193323.5, entitled "A Data Storage System, Method, and Apparatus", filed on March 9, 2018, the entire contents of in.
技术领域Technical field
本申请涉及数据存储技术领域,特别是涉及一种数据存储系统、方法及装置。The present application relates to the field of data storage technologies, and in particular, to a data storage system, method, and apparatus.
背景技术Background technique
随着计算机应用规模越来越大,对存储空间的需求也与日俱增,由此出现了基于云存储技术的云存储系统,相对于传统存储系统,云存储系统具有可扩展性,并且提高了存储的效率。With the increasing scale of computer applications, the demand for storage space is increasing day by day. As a result, cloud storage systems based on cloud storage technologies have emerged. Compared with traditional storage systems, cloud storage systems are scalable and have improved storage. effectiveness.
云存储系统所包括的各存储节点均具备两种类型的网口:业务网口和数据网口,业务网口用于接收所需存储的数据,比如,在监控网络中各监控设备的录像数据;数据网口用于存储系统中的各设备之间的数据传输。并且,无论是业务网口还是数据网口,均采用电口连接,其中,电口可以是普通的网线接口或者同轴电缆接口,并且可以根据需求选用百兆以太网电口、千兆以太网电口等。Each storage node included in the cloud storage system has two types of network ports: a service network port and a data network port. The service network port is used to receive data that needs to be stored. For example, the monitoring data of each monitoring device in the monitoring network. The data network port is used for data transmission between devices in the storage system. Moreover, both the service network port and the data network port are connected by electrical ports, wherein the electrical port can be an ordinary network cable interface or a coaxial cable interface, and the 100 Mbps Ethernet electrical port and the Gigabit Ethernet can be selected according to requirements. Electric port and so on.
云存储系统中的一台存储节点S通过业务网口接收需要存储的数据后,考虑到负载均衡等因素,可以将一部分数据存储在本地,然后将其他数据通过数据网口发送至其他存储节点进行存储。After a storage node S in the cloud storage system receives the data to be stored through the service network port, considering a load balancing factor, etc., a part of the data can be stored locally, and then the other data is sent to other storage nodes through the data network port. storage.
上述存储节点S将其本地的数据存储到其他的存储节点时,需先将存储节点S本地的数据通过网络传输至其他存储节点,然后由其他存储节点将所接收到的数据写入其他存储节点的本地存储。虽然应用上述方式存储节点S能够将其本地的数据存储至其他存储节点,但是由于上述存储过程中存储节点S需要通过数据网口,也就是电口,将其本地的数据的传输至其他存储节点,这一过程存在数据延迟,导致数据存储效率低。When the storage node S stores its local data to other storage nodes, the local data of the storage node S needs to be transmitted to other storage nodes through the network, and then the other storage nodes write the received data to other storage nodes. Local storage. Although the storage node S can store its local data to other storage nodes in the above manner, the storage node S needs to transmit its local data to other storage nodes through the data network port, that is, the electrical port. There is a data delay in this process, resulting in inefficient data storage.
发明内容Summary of the invention
本申请提供了一种数据存储系统、方法及装置,以解决数据传输延迟, 导致数据存储效率低的问题。具体技术方案如下:The present application provides a data storage system, method and apparatus to solve the problem of data transmission delay, resulting in low data storage efficiency. The specific technical solutions are as follows:
第一方面,本申请实施例提供了一种数据存储系统,所述存储系统包括至少两个存储节点,各存储节点之间通过SAS网络连接;In a first aspect, the embodiment of the present application provides a data storage system, where the storage system includes at least two storage nodes, and each storage node is connected through a SAS network;
目标存储节点,用于获取待存储数据,对所述待存储数据进行切片处理得到切片数据;确定用于存储所得到的切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置,将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置。a target storage node, configured to acquire data to be stored, perform slice processing on the data to be stored to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type storage node And storing the first type of storage location of the slice data, and writing the obtained slice data to the acquired first type of storage location through the SAS network.
可选地,所述目标存储节点,获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置,包括:Optionally, the target storage node acquires the first type of storage location for storing the slice data in the determined first type of storage node, including:
所述目标存储节点,用于向所确定的第一类存储节点发送第一存储请求;接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。The target storage node is configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: The location of the determined first type of storage node for storing slice data.
可选地,所述目标存储节点,用于确定用于存储所得到的切片数据的第一类存储节点,包括:Optionally, the target storage node is configured to determine a first type of storage node for storing the obtained slice data, including:
所述目标存储节点,用于根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:The target storage node is configured to determine a first type of storage node for storing the obtained slice data according to at least one of the following information:
已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,所述存储系统还包括管理节点;Optionally, the storage system further includes a management node;
所述目标存储节点,用于生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;将所生成的存储索引发送至所述管理节点;The target storage node is configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes: a correspondence relationship between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored; sending the generated storage index to the management node;
所述管理节点,用于接收并存储所述目标存储节点发送的存储索引。The management node is configured to receive and store a storage index sent by the target storage node.
可选地,所述管理节点,还用于接收目标客户端针对待读取数据的读取请求,并从所述存储系统包括的存储节点中选择存储节点,作为第二类存储节点;根据本地存储的存储索引,确定所述待读取数据对应的切片数据以及各个切片数据的第二类存储位置,并将所述第二类存储位置发送至所述第二类存储节点;Optionally, the management node is further configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system as the second type of storage node; a stored storage index, determining slice data corresponding to the data to be read and a second type of storage location of each slice data, and sending the second type of storage location to the second type storage node;
所述第二类存储节点,用于接收所述管理节点发送的所述第二类存储位置,从所述第二类存储位置中读取切片数据,将所读取到的切片数据进行还原处理,得到所述待读取数据,并将所述待读取数据发送至所述目标客户端。The second type of storage node is configured to receive the second type of storage location sent by the management node, read slice data from the second type of storage location, and perform restoration processing on the read slice data. Obtaining the data to be read, and sending the data to be read to the target client.
可选地,所述管理节点,用于获得故障存储节点的故障位置中所存储数据的数据量,根据所述数据量,从所述存储系统包括的存储节点中选择用于重构所述故障位置所存储数据的存储节点,作为第三类存储节点;Optionally, the management node is configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a storage node included in the storage system, to reconstruct the fault. a storage node storing data in the location as a storage node of the third type;
所述第三类存储节点,用于对所述故障位置所存储的数据进行重构,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入所分配的存储位置。The third type of storage node is configured to reconstruct data stored in the fault location, obtain reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated data. storage location.
可选地,所述管理节点,具体用于获取所述故障存储节点中的故障位置;根据本地的存储索引,确定所述故障位置对应存储的数据,以及所述故障位置所存储的数据对应的切片数据,并获得所确定的各切片数据对应的存储位置,将所获得的存储位置发送至第三类存储节点,所述第三类存储节点为:根据所述故障位置所存储数据的数据量,从所述存储系统包括的存储节点中,所选择的用于重构所述故障位置所存储数据的存储节点;Optionally, the management node is specifically configured to acquire a fault location in the fault storage node, and determine, according to a local storage index, data corresponding to the fault location, and data corresponding to the fault location. Slicing data, and obtaining a storage location corresponding to each determined slice data, and transmitting the obtained storage location to a third type of storage node, wherein the third type of storage node is: a data amount of data stored according to the fault location And a storage node selected from the storage node included in the storage system for reconstructing data stored in the fault location;
所述第三类存储节点,用于接收所述管理节点发送的存储位置,从所接收到的存储位置中读取对应的切片数据,将所读取到的切片数据进行重构处理,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入所分配的存储位置。The third type storage node is configured to receive a storage location sent by the management node, read corresponding slice data from the received storage location, and perform reconfiguration processing on the read slice data to obtain a weight Constructing data, allocating a storage location for the reconstructed data, and writing the reconstructed data to the allocated storage location.
第二方面,本申请实施例提供了一种数据存储系统,所述存储系统包括:切片服务器、至少两个存储节点,各存储节点之间通过SAS网络连接;In a second aspect, the embodiment of the present application provides a data storage system, where the storage system includes: a slicing server, at least two storage nodes, and each storage node is connected through a SAS network;
所述切片服务器,用于获取待存储数据,对所述待存储数据进行切片处理,得到切片数据;从所述至少两个存储节点中确定接收所述切片数据的目 标存储节点,将所得到的切片数据发送至所述目标存储节点;The slice server is configured to acquire data to be stored, perform slice processing on the data to be stored, and obtain slice data; determine, from the at least two storage nodes, a target storage node that receives the slice data, and obtain the obtained Sending slice data to the target storage node;
所述目标存储节点,用于接收所述切片服务器发送的所述切片数据,确定用于存储所述切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置,将所述切片数据通过所述SAS网络写入所获取的第一类存储位置。The target storage node is configured to receive the slice data sent by the slice server, determine a first type of storage node used to store the slice data, and acquire the determined first type storage node for storing The first type of storage location of the slice data is written to the acquired first type of storage location by the SAS network.
可选地,所述目标存储节点,获取所确定第一类存储节点中用于存储切片数据的第一类存储位置,包括:Optionally, the target storage node acquires a first type of storage location for storing slice data in the determined first type of storage node, including:
所述目标存储节点,用于向所确定的第一类存储节点发送第一存储请求;接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。The target storage node is configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: The location of the determined first type of storage node for storing slice data.
可选地,所述目标存储节点,用于确定用于存储切片数据的第一类存储节点,包括:Optionally, the target storage node is configured to determine a first type of storage node for storing slice data, including:
所述目标存储节点,用于根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:The target storage node is configured to determine a first type of storage node for storing slice data according to at least one of the following information:
已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,所述存储系统还包括第一管理节点;Optionally, the storage system further includes a first management node;
所述目标存储节点,用于生成所接收的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;将所生成的存储索引发送至所述第一管理节点;The target storage node is configured to generate a storage index of each of the received slice data, where the storage index record of the slice data includes a correspondence between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the data to be stored and each slice data obtained by the slice processing; sending the generated storage index to the first management node;
所述第一管理节点,用于接收并存储所述目标存储节点发送的存储索引。The first management node is configured to receive and store a storage index sent by the target storage node.
可选地,所述第一管理节点,还用于接收目标客户端针对待读取数据的读取请求,并从所述存储系统包括的存储节点中选择存储节点,作为第二类 存储节点;根据本地存储的存储索引,确定所述待读取数据对应的切片数据以及各个切片数据的第二类存储位置,并将所述第二类存储位置发送至所述第二类存储节点;Optionally, the first management node is further configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system as the second type of storage node; Determining, according to the locally stored storage index, the slice data corresponding to the data to be read and the second type of storage location of each slice data, and sending the second type of storage location to the second type storage node;
所述第二类存储节点,用于接收所述第一管理节点发送的所述第二类存储位置,从所述第二类存储位置中读取切片数据,将所读取到的切片数据进行还原处理,得到所述待读取数据,并将所述待读取数据发送至所述目标客户端。The second type of storage node is configured to receive the second type of storage location sent by the first management node, read slice data from the second type of storage location, and perform the read slice data. The restoration process is performed to obtain the data to be read, and the data to be read is sent to the target client.
可选地,所述第一管理节点,用于获得故障存储节点的故障位置中所存储数据的数据量,根据所述数据量,从所述存储系统包括的存储节点中选择用于重构所述故障位置所存储数据的存储节点,作为第三类存储节点;Optionally, the first management node is configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a storage node included in the storage system for reconfiguring a storage node storing data stored in the fault location as a storage node of the third type;
所述第三类存储节点,用于对所述故障位置所存储的数据进行重构,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入所分配的存储位置。The third type of storage node is configured to reconstruct data stored in the fault location, obtain reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated data. storage location.
可选地,所述第一管理节点,具体用于获取所述故障存储节点中的故障位置;根据本地的存储索引,确定所述故障位置对应存储的数据,以及所述故障位置所存储的数据对应的切片数据,并获得所确定的各切片数据对应的存储位置,将所获得的存储位置发送至第三类存储节点,所述第三类存储节点为:根据所述故障位置所存储数据的数据量,从所述存储系统包括的存储节点中,所选择的用于重构所述故障位置所存储数据的存储节点;Optionally, the first management node is specifically configured to acquire a fault location in the fault storage node, determine, according to a local storage index, data corresponding to the fault location, and data stored in the fault location. Corresponding slice data, and obtaining a storage location corresponding to each determined slice data, and sending the obtained storage location to a third type storage node, wherein the third type storage node is: storing data according to the fault location a quantity of data, from a storage node included in the storage system, a storage node selected to reconstruct data stored in the fault location;
所述第三类存储节点,用于接收所述第一管理节点发送的存储位置,从所接收到的存储位置中读取对应的切片数据,将所读取到的切片数据进行重构处理,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入所分配的存储位置。The storage node of the third type is configured to receive a storage location sent by the first management node, read corresponding slice data from the received storage location, and perform reconstruction processing on the read slice data. Reconstructed data is obtained, a storage location is allocated for the reconstructed data, and the reconstructed data is written to the allocated storage location.
可选地,所述存储系统还包括第二管理节点;Optionally, the storage system further includes a second management node;
所述切片服务器,从所述至少两个存储节点中确定接收所述切片数据的目标存储节点,包括:Determining, by the slice server, a target storage node that receives the slice data from the at least two storage nodes, including:
所述切片服务器,用于向所述第二管理节点发送第二存储请求;The slice server is configured to send a second storage request to the second management node;
所述第二管理节点,用于接收所述切片服务器发送的所述第二存储请求,从所述存储系统所包括的存储节点中确定目标存储节点,并将所确定的目标存储节点的标识发送至所述切片服务器;The second management node is configured to receive the second storage request sent by the slice server, determine a target storage node from the storage nodes included in the storage system, and send the identifier of the determined target storage node To the slicing server;
所述切片服务器,用于接收所述第二管理节点发送的所述标识,并确定所述标识对应的所述目标存储节点。The slice server is configured to receive the identifier sent by the second management node, and determine the target storage node corresponding to the identifier.
可选地,所述第二管理节点,从所述存储系统所包括的存储节点中确定目标存储节点,包括:Optionally, the second management node determines the target storage node from the storage nodes included in the storage system, including:
所述第二管理节点,用于根据以下信息中的至少一种,从所述存储系统所包括的存储节点中确定目标存储节点:The second management node is configured to determine a target storage node from the storage nodes included in the storage system according to at least one of the following information:
已被所述第二管理节点分配过的存储节点;a storage node that has been allocated by the second management node;
所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
第三方面,本申请实施例提供了一种数据存储方法,应用于存储系统中的目标存储节点,所述存储系统包括至少两个存储节点,各存储节点之间通过SAS网络连接;In a third aspect, the embodiment of the present application provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node is connected through a SAS network;
所述方法包括:The method includes:
获取待存储数据;Obtain data to be stored;
对所述待存储数据进行切片处理,得到切片数据;And performing slice processing on the data to be stored to obtain slice data;
确定用于存储所得到的切片数据的第一类存储节点;Determining a first type of storage node for storing the obtained slice data;
获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置;Obtaining, in the determined first type of storage node, a first type of storage location for storing the slice data;
将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置。The obtained slice data is written into the acquired first type of storage location through the SAS network.
可选地,所述获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置的步骤,包括:Optionally, the step of obtaining the first type of storage location for storing the slice data in the determined first type of storage node includes:
向所确定的第一类存储节点发送第一存储请求;Sending a first storage request to the determined first type of storage node;
接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。Receiving the determined first type of storage location sent by the first type of storage node, where the first type of storage location is: a location allocated by the first type of storage node for storing slice data.
可选地,所述确定用于存储所得到的切片数据的第一类存储节点的步骤,包括:Optionally, the step of determining a first type of storage node for storing the obtained slice data includes:
根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:A first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,所述存储系统还包括管理节点;所述将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置的步骤之后,还包括:Optionally, the storage system further includes: a management node; after the step of writing the obtained slice data to the acquired first type storage location by using the SAS network, the method further includes:
生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;Generating a storage index of each of the obtained slice data, wherein the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, the data to be stored, and the to-be-stored data Corresponding relationship between each slice data obtained by slicing the data;
将所生成的存储索引发送至所述管理节点。The generated storage index is sent to the management node.
第四方面,本申请实施例提供了一种数据存储方法,应用于存储系统中的目标存储节点,所述存储系统包括:至少两个存储节点、切片服务器,各存储节点之间通过SAS网络连接;In a fourth aspect, the embodiment of the present application provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes and a slicing server, and each storage node is connected through a SAS network. ;
所述方法包括:The method includes:
接收所述切片服务器发送的切片数据,所述切片数据为:所述切片服务器对待存储数据进行切片处理得到的数据;Receiving, by the slice server, slice data sent by the slice server, where the slice server performs slice processing on the data to be stored;
确定用于存储所述切片数据的第一类存储节点;Determining a first type of storage node for storing the slice data;
获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位 置;Obtaining, in the determined first type of storage node, a first type of storage location for storing the slice data;
将所述切片数据通过所述SAS网络写入所获取的第一类存储位置。The slice data is written to the acquired first type of storage location through the SAS network.
可选地,所述获取所确定第一类存储节点中用于存储切片数据的第一类存储位置的步骤,包括:Optionally, the step of acquiring the first type of storage location for storing the slice data in the determined first type of storage node includes:
向所确定的第一类存储节点发送第一存储请求;Sending a first storage request to the determined first type of storage node;
接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。Receiving the determined first type of storage location sent by the first type of storage node, where the first type of storage location is: a location allocated by the first type of storage node for storing slice data.
可选地,所述确定用于存储切片数据的第一类存储节点的步骤,包括:Optionally, the step of determining a first type of storage node for storing slice data, comprising:
根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:A first type of storage node for storing slice data is determined according to at least one of the following information:
已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,所述存储系统还包括管理节点;Optionally, the storage system further includes a management node;
所述将所述切片数据通过所述SAS网络写入所获取的第一类存储位置的步骤之后,还包括:After the step of writing the slice data to the acquired first type of storage location through the SAS network, the method further includes:
生成所接收到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;Generating a storage index of each of the received slice data, wherein the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, the data to be stored, and the Corresponding relationship between each slice data obtained by slice processing of the data to be stored;
将所生成的存储索引发送至所述管理节点。The generated storage index is sent to the management node.
第五方面,本申请实施例提供了一种数据存储装置,应用于存储系统中的目标存储节点,所述存储系统包括至少两个存储节点,各存储节点之间通过SAS网络连接;In a fifth aspect, the embodiment of the present application provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node is connected through a SAS network;
所述装置包括:The device includes:
第一获取模块,用于获取待存储数据;a first acquiring module, configured to acquire data to be stored;
切片处理模块,用于对所述待存储数据进行切片处理,得到切片数据;a slice processing module, configured to slice the data to be stored to obtain slice data;
第一确定模块,用于确定用于存储所得到的切片数据的第一类存储节点;a first determining module, configured to determine a first type of storage node for storing the obtained slice data;
第二获取模块,用于获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置;a second acquiring module, configured to acquire, in the determined first type of storage node, a first type of storage location for storing the slice data;
第一写入模块,用于将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置。And a first writing module, configured to write the obtained slice data to the acquired first type of storage location through the SAS network.
可选地,所述第二获取模块包括:Optionally, the second obtaining module includes:
第一发送子模块,用于向所确定的第一类存储节点发送第一存储请求;a first sending submodule, configured to send a first storage request to the determined first type of storage node;
第一接收子模块,用于接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。a first receiving submodule, configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined storage of slice data allocated by the first type of storage node s position.
可选地,所述第一确定模块具体用于:Optionally, the first determining module is specifically configured to:
根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:A first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,所述存储系统还包括管理节点;Optionally, the storage system further includes a management node;
所述装置还包括:The device also includes:
第一生成模块,用于生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;a first generation module, configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, Corresponding relationship between the data to be stored and each slice data obtained by slicing the data to be stored;
第一发送模块,用于将所生成的存储索引发送至所述管理节点。The first sending module is configured to send the generated storage index to the management node.
第六方面,本申请实施例提供了一种数据存储装置,应用于存储系统中的目标存储节点,所述存储系统包括:至少两个存储节点、切片服务器,各存储节点之间通过SAS网络连接;In a sixth aspect, the embodiment of the present application provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes and a slicing server, and each storage node is connected through a SAS network. ;
所述装置包括:The device includes:
接收模块,用于接收所述切片服务器发送的切片数据,所述切片数据为:所述切片服务器对待存储数据进行切片处理得到的数据;a receiving module, configured to receive the slice data sent by the slice server, where the slice data is: the data obtained by the slice server to slice the processed data;
第二确定模块,用于确定用于存储所述切片数据的第一类存储节点;a second determining module, configured to determine a first type of storage node for storing the slice data;
第三获取模块,用于获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置;a third acquiring module, configured to acquire, in the determined first type of storage node, a first type of storage location for storing the slice data;
第二写入模块,用于将所述切片数据通过所述SAS网络写入所获取的第一类存储位置。And a second writing module, configured to write the slice data to the acquired first type of storage location through the SAS network.
可选地,所述第三获取模块包括:Optionally, the third obtaining module includes:
第二发送子模块,用于向所确定的第一类存储节点发送第一存储请求;a second sending submodule, configured to send a first storage request to the determined first type of storage node;
第二接收子模块,用于接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。a second receiving submodule, configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined storage of slice data allocated by the first type of storage node s position.
可选地,所述第二确定模块具体用于:Optionally, the second determining module is specifically configured to:
根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:A first type of storage node for storing slice data is determined according to at least one of the following information:
已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,所述存储系统还包括管理节点;Optionally, the storage system further includes a management node;
所述装置还包括:The device also includes:
第二生成模块,用于生成所接收到的每一切片数据的存储索引,其中, 一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;a second generation module, configured to generate a storage index of each of the received slice data, where the storage index record of the slice data includes: a correspondence between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored;
第二发送模块,用于将所生成的存储索引发送至所述管理节点。And a second sending module, configured to send the generated storage index to the management node.
第七方面,本申请实施例提供了一种电子设备,包括处理器和存储器;In a seventh aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
存储器,用于存放计算机程序;a memory for storing a computer program;
处理器,用于执行存储器上所存放的程序时,实现上述任一所述的一种数据存储方法步骤。The processor, when executed to execute a program stored on the memory, implements one of the data storage method steps described in any of the above.
第八方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一所述的一种数据存储方法步骤。In an eighth aspect, the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores a computer program, and when the computer program is executed by the processor, implements one of the foregoing data. Store method steps.
本申请实施例提供的技术方案中,存储系统中包括至少两个存储节点,各存储节点之间通过SAS网络连接,目标存储节点用于获取待存储数据,对待存储数据进行切片处理得到切片数据;确定用于存储所得到的切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。In the technical solution provided by the embodiment of the present application, the storage system includes at least two storage nodes, and each storage node is connected through a SAS network, and the target storage node is configured to acquire data to be stored, and perform slice processing on the stored data to obtain slice data. Determining a first type of storage node for storing the obtained slice data, and acquiring a first type of storage location for storing slice data in the determined first type of storage node, and writing the obtained slice data through a SAS network The first type of storage location obtained. After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
附图说明DRAWINGS
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.
图1为本申请实施例提供的一种数据存储系统的第一种结构示意图;1 is a schematic diagram of a first structure of a data storage system according to an embodiment of the present application;
图2为本申请实施例提供的一种数据存储系统的第二种结构示意图;2 is a schematic diagram of a second structure of a data storage system according to an embodiment of the present application;
图3为本申请实施例提供的一种数据存储方法的第一种流程图;FIG. 3 is a first flowchart of a data storage method according to an embodiment of the present application;
图4为本申请实施例提供的一种数据存储方法的第二种流程图;FIG. 4 is a second flowchart of a data storage method according to an embodiment of the present application;
图5为本申请实施例提供的一种数据存储装置的第一种结构示意图;FIG. 5 is a schematic diagram of a first structure of a data storage device according to an embodiment of the present disclosure;
图6为本申请实施例提供的一种数据存储装置的第二种结构示意图;FIG. 6 is a schematic diagram of a second structure of a data storage device according to an embodiment of the present disclosure;
图7为本申请实施例提供的一种电子设备的一种结构示意图。FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本发明的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本发明进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The present invention will be further described in detail below with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
为了避免因为数据传输而导致的传输延迟,进而可以提高数据存储效率,本申请实施例提供了一种数据存储系统、方法及装置,其中,该存储系统包括至少两个存储节点,各存储节点之间通过SAS网络连接,目标存储节点为获取待存储数据的存储节点;In order to avoid the transmission delay caused by the data transmission, the data storage efficiency can be improved. The embodiment of the present application provides a data storage system, method, and device, where the storage system includes at least two storage nodes, and each storage node Connected through a SAS network, the target storage node is a storage node that acquires data to be stored;
目标存储节点,用于获取待存储数据,对待存储数据进行切片处理得到切片数据;确定用于存储所得到的切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。a target storage node, configured to acquire data to be stored, perform slice processing on the stored data to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type of storage node for use in The first type of storage location of the sliced data is stored, and the obtained sliced data is written into the acquired first type of storage location through the SAS network.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
下面首先对本申请实施例提供的一种数据存储系统进行介绍。A data storage system provided by an embodiment of the present application is first introduced.
本申请实施例提供的一种数据存储系统,如图1所示,该存储系统100包括:至少两个存储节点110,各存储节点110之间通过SAS网络连接,目标存储节点为获取待存储数据的存储节点。A data storage system is provided in the embodiment of the present application. As shown in FIG. 1 , the storage system 100 includes: at least two storage nodes 110, each storage node 110 is connected through a SAS network, and the target storage node is configured to acquire data to be stored. Storage node.
目标存储节点,用于获取待存储数据,对待存储数据进行切片处理得到切片数据;确定用于存储所得到的切片数据的第一类存储节点,并获取所确 定的第一类存储节点中用于存储切片数据的第一类存储位置,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。a target storage node, configured to acquire data to be stored, perform slice processing on the stored data to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type of storage node for use in The first type of storage location of the sliced data is stored, and the obtained sliced data is written into the acquired first type of storage location through the SAS network.
下面对存储系统100和目标存储节点分别进行介绍。The storage system 100 and the target storage node are respectively described below.
一、存储系统100First, the storage system 100
存储系统100中可以包括:至少两个存储节点110。The storage system 100 can include at least two storage nodes 110.
对于存储系统100中所包括的存储节点,每一存储节点中可以包括多个硬盘,硬盘用来存储相应的数据。数据在存储节点中进行存储时,该存储节点可以将数据分别存储在不同的硬盘中,还可以将数据存储在同一硬盘中。For the storage nodes included in the storage system 100, each storage node may include multiple hard disks, and the hard disks are used to store corresponding data. When the data is stored in the storage node, the storage node can store the data on different hard disks separately, and can also store the data on the same hard disk.
存储系统100中的各存储节点之间是互联的,互联的方式可以是通过SAS网络互联,每一存储节点均至少包括SAS接口。Each storage node in the storage system 100 is interconnected. The interconnection may be interconnected through a SAS network, and each storage node includes at least a SAS interface.
其中,SAS(Serial Attached SCSI)即为串行连接SCSI接口,其中,SCSI(Small Computer System Interface)即为小型计算机系统接口,是一种通用接口标准,例如,SCSI可以是用于计算机和硬盘、软驱、光驱、打印机、扫描仪等设备之间的接口标准。Among them, SAS (Serial Attached SCSI) is a serial connection SCSI interface. Among them, SCSI (Small Computer System Interface) is a small computer system interface, which is a general interface standard. For example, SCSI can be used for computers and hard disks. Interface standard between devices such as floppy drives, optical drives, printers, and scanners.
各存储节点通过SAS网络连接的一种方式可以是以SAS交换机的方式进行连接,存储系统中每一存储节点均与SAS交换机相连接,这样,各存储节点便可以通过SAS交换机相互连接。存储节点可以是通过各自的SAS接口与SAS交换机相连接的。各存储节点通过SAS网络连接的方式除了上述以SAS交换机的方式以外,还可以包括其他方式,在此不作限定。One way for each storage node to connect through the SAS network can be connected by means of a SAS switch. Each storage node in the storage system is connected to the SAS switch, so that the storage nodes can be connected to each other through the SAS switch. Storage nodes can be connected to SAS switches through their respective SAS interfaces. The manner in which the storage nodes are connected through the SAS network may include other methods in addition to the manner of the above-mentioned SAS switch, which is not limited herein.
存储系统100中的存储节点通过SAS网络连接的情况下,各存储节点相互之间是可见的,即对于每一个存储节点来说,都可以看到存储系统100中其他存储节点所包括的硬盘,此处的看到可以理解为:每一存储节点可以对所看到的每一硬盘进行写入操作和读取操作。也就是说,每一个存储节点均可以看到存储系统100的所有硬盘,每一存储节点可以将数据直接写入可看到的硬盘上,也可以从可看到的硬盘上读取数据。In the case where the storage nodes in the storage system 100 are connected through the SAS network, the storage nodes are visible to each other, that is, for each storage node, the hard disks included in other storage nodes in the storage system 100 can be seen. Seen here can be understood as: each storage node can perform write operations and read operations on each hard disk that is seen. That is to say, each storage node can see all the hard disks of the storage system 100, and each storage node can directly write data to the hard disk that can be seen, or can read data from the hard disk that can be seen.
例如,存储系统中包括存储节点A、存储节点B和存储节点C,并且,存储节点A、存储节点B和存储节点C之间通过SAS网络连接,存储节点A包括硬 盘A1、硬盘A2,存储节点B包括硬盘B1、硬盘B2,存储节点C包括硬盘C1、硬盘C2,那么,对于存储节点A来说,可以看到硬盘B1、硬盘B2、硬盘C1和硬盘C2,可以将数据直接写入到硬盘B1、硬盘B2、硬盘C1和硬盘C2中的任一个硬盘中,也可以从硬盘B1、硬盘B2、硬盘C1和硬盘C2中读取各自所存储的数据。For example, the storage system includes a storage node A, a storage node B, and a storage node C, and the storage node A, the storage node B, and the storage node C are connected by a SAS network, and the storage node A includes a hard disk A1, a hard disk A2, and a storage node. B includes the hard disk B1 and the hard disk B2. The storage node C includes the hard disk C1 and the hard disk C2. Then, for the storage node A, the hard disk B1, the hard disk B2, the hard disk C1, and the hard disk C2 can be seen, and the data can be directly written to the hard disk. In each of the B1, the hard disk B2, the hard disk C1, and the hard disk C2, the respective stored data may be read from the hard disk B1, the hard disk B2, the hard disk C1, and the hard disk C2.
在存储系统100中,各存储节点之间通过SAS网络的方式连接,各存储节点之间可以进行读写操作,进而可以解决存储节点之间写互斥的问题。In the storage system 100, each storage node is connected by a SAS network, and each storage node can perform read and write operations, thereby solving the problem of mutual exclusion between storage nodes.
二、目标存储节点Second, the target storage node
目标存储节点,用于获取待存储数据,对待存储数据进行切片处理得到切片数据;确定用于存储所得到的切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。a target storage node, configured to acquire data to be stored, perform slice processing on the stored data to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type of storage node for use in The first type of storage location of the sliced data is stored, and the obtained sliced data is written into the acquired first type of storage location through the SAS network.
下面对目标存储节点所执行的各步骤分别进行说明。The steps performed by the target storage node are described separately below.
第一步骤,获取待存储数据。The first step is to acquire data to be stored.
其中,存储系统100还可以包括接入节点,目标存储节点获取待存储数据的方式可以是:目标存储节点接收存储系统中接入节点发送的待存储数据。其中,接入节点与存储系统100外部的客户端相连接,用于接收客户端发送的数据,例如,接入节点可以与监控设备相连接,用于接收监控设备发送的视频数据。The storage system 100 may further include an access node. The manner in which the target storage node obtains the data to be stored may be: the target storage node receives the data to be stored sent by the access node in the storage system. The access node is connected to the client external to the storage system 100, and is configured to receive data sent by the client. For example, the access node may be connected to the monitoring device for receiving video data sent by the monitoring device.
一种实现方式,存储系统中的接入节点用于接收客户端发送的待存储数据,接入节点在接收到待存储数据后,可以将待存储数据发送给存储节点,该存储节点即为目标存储节点。其中,接入节点可以通过预设的策略从存储系统所包括的至少两个存储节点中选择一个用于接收待存储数据的目标存储节点,该策略可以是自定义设定的。In an implementation manner, the access node in the storage system is configured to receive data to be stored sent by the client, and after receiving the data to be stored, the access node may send the to-be-stored data to the storage node, where the storage node is the target. Storage node. The access node may select a target storage node for receiving data to be stored from at least two storage nodes included in the storage system by using a preset policy, and the policy may be customized.
其中,接入节点接收待存储数据以及目标存储节点接收接入节点发送的待存储数据均可以通过业务网口实现,业务网口用于接收业务数据,业务数据可以是来自于存储系统外部的待存储数据。The access node receives the data to be stored and the data to be stored sent by the target storage node and the access node can be implemented through the service network port. The service network port is used to receive service data, and the service data may be from the outside of the storage system. Storing data.
例如,业务数据可以是监控设备的视频数据,监控设备将视频数据通过业务网口发送至存储系统中的接入节点,此时,视频数据即为待存储数据,接入节点再将所接收到的视频数据通过自身的业务网口发送至目标存储节点,这样,目标存储节点便可以获取到待存储的视频数据。For example, the service data may be the video data of the monitoring device, and the monitoring device sends the video data to the access node in the storage system through the service network port. At this time, the video data is the data to be stored, and the access node receives the received data. The video data is sent to the target storage node through its own service network port, so that the target storage node can obtain the video data to be stored.
第二步骤,目标存储节点在获取待存储数据后,对待存储数据进行切片处理得到切片数据。In the second step, after acquiring the data to be stored, the target storage node performs slice processing on the stored data to obtain slice data.
一种实施方式中,目标存储节点可以通过纠删码技术(Erasure Coding,简称EC)对数据进行切片处理。In an implementation manner, the target storage node may perform data processing on the data by using Erasure Coding (EC).
通过纠删码技术对待存储数据进行切片处理,可以得到预设数量N个数据片,并且,根据所得到的N个数据片,可以得到预设数量M个检验片。由数据片与检验片之和M+N,即为所得到的切片数据的数量。其中,纠删码技术中纠删码的类型可以包括多种,N和M可以是由纠删码的类型所决定的,不同的纠删码类型中N和M可以是不相同的。By performing the slicing process on the stored data by the erasure code technique, a preset number N pieces of data can be obtained, and according to the obtained N pieces of data, a preset number of M pieces can be obtained. From the sum of the data slice and the test slice M + N, is the number of slice data obtained. The type of the erasure code in the erasure code technology may include multiple types, and N and M may be determined by the type of the erasure code. In different erasure code types, N and M may be different.
例如,RS(Reed-Solomon)码是存储系统较为常用的一种纠删码,RS码所对应的N为5,M为3,利用RS码对待存储数据进行切片处理,可以得到5个数据片,3个检验片,最后所得到的切片数据为8个。For example, an RS (Reed-Solomon) code is an erasure code commonly used in a storage system. The N code of the RS code is 5, and M is 3. The data is sliced by using the RS code, and 5 pieces of data can be obtained. 3 test pieces, and the final slice data obtained is 8.
对于利用纠删码技术进行切片,所得到的M个校验片可以起到容错的作用。在所得到的M+N个切片数据中,当其中存在错误的切片数据的数量小于或者等于M个时,均可以通过纠删码技术中的重构算法将N个数据片进行恢复。因此,通过纠删码技术可以对切片数据起到容错的作用,提高了数据存储的可靠性。For the slice using the erasure code technique, the obtained M check slices can function as a fault tolerance. In the obtained M+N slice data, when the number of slice data in which there is an error is less than or equal to M, the N pieces of data can be restored by the reconstruction algorithm in the erasure code technique. Therefore, the erasure code technology can play a role of fault tolerance for the slice data, improving the reliability of the data storage.
例如,通过纠删码技术进行切片所得到的切片数据包括5个数据片和3个校验片,其中,5个数据片分别为:数据片A、数据片B、数据片C、数据片D、数据片E,3个校验片分别为:检验片A、检验片B、检验片C。当数据片A、数据片B和校验片A出现错误时,可以通过纠删码技术中的重构算法将数据片A、数据片B、数据片C、数据片D、数据片E进行恢复。For example, the slice data obtained by the erasure code technique includes five data slices and three check slices, wherein the five data slices are: data slice A, data slice B, data slice C, and data slice D. , data piece E, three check pieces are: test piece A, test piece B, test piece C. When there is an error in the data slice A, the data slice B, and the check slice A, the data slice A, the data slice B, the data slice C, the data slice D, and the data slice E can be restored by the reconstruction algorithm in the erasure code technique. .
目标存储节点在进行切片处理的方式不仅限于上述实施方式中的纠删码技术,还可以是其他方式的切片处理,在此不做限定。The manner in which the target storage node performs the slicing process is not limited to the erasure code technique in the above embodiment, and may be other types of slice processing, which is not limited herein.
第三步骤,确定用于存储所得到切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置。In a third step, a first type of storage node for storing the obtained slice data is determined, and a first type of storage location for storing slice data in the determined first type of storage node is obtained.
其中,目标存储节点可以根据切片数据的数量以及各切片数据的数据量,确定用于存储切片数据的第一类存储节点,并且,获取到所确定的第一类存储节点中用于存储切片数据的第一类存储位置。The target storage node may determine, according to the number of slice data and the data volume of each slice data, a first type of storage node for storing slice data, and obtain the determined first type of storage node for storing slice data. The first type of storage location.
目标存储节点在确定第一类存储节点时,首先,可以确定第一类存储节点的数量,其中,确定第一类存储节点的数量的方式可以有多种方式。When the target storage node determines the first type of storage node, first, the number of the first type of storage nodes may be determined. The manner of determining the number of the first type of storage nodes may be in various manners.
第一种方式,可以确定第一类存储节点的数量与切片数据的数量相同,例如,当目标存储节点所得到的切片数据是8个时,则确定的第一类存储节点的数量也是8个。In the first manner, it can be determined that the number of the first type of storage nodes is the same as the number of the slice data. For example, when the number of slice data obtained by the target storage node is eight, the number of the first type of storage nodes determined is also eight. .
在该第一种方式中,可以认为,一个切片数据对应一个第一类存储节点,即所确定出的每一个第一类存储节点中仅存储一个切片数据,各第一类存储节点中所存储的切片数据不相同。In the first mode, it can be considered that one slice data corresponds to one first type storage node, that is, only one slice data is stored in each of the determined first type storage nodes, and is stored in each first type storage node. The slice data is not the same.
例如,目标存储节点所得到的切片数据包括:切片数据A、切片数据B和切片数据C,所确定的用于存储切片数据的3个第一类存储节点分别为:第一类存储节点1、第一类存储节点2和第一类存储节点3,并且,目标存储节点将切片数据A分配给第一类存储节点1,将切片数据B分配给第一类存储节点2,将切片数据C分配给第一类存储节点3,那么,第一类存储节点1存储切片数据A,第一类存储节点2存储切片数据B,第一类存储节点3存储切片数据C。For example, the slice data obtained by the target storage node includes: slice data A, slice data B, and slice data C, and the determined three first type storage nodes for storing the slice data are: the first type storage node 1, The first type storage node 2 and the first type storage node 3, and the target storage node assigns the slice data A to the first type storage node 1, the slice data B to the first type storage node 2, and distributes the slice data C To the first type of storage node 3, then the first type of storage node 1 stores slice data A, the first type of storage node 2 stores slice data B, and the first type of storage node 3 stores slice data C.
第二种方式,可以确定第一类存储节点的数量小于切片数据的数量,这种方式中,所确定出的第一类存储节点中的至少一个第一类存储节点需要存储多于一个的切片数据。其中,需要存储多于一个的切片数据的第一类存储节点可以根据各存储节点的存储状态所确定。存储状态可以包括存储节点的剩余存储空间、负载压力等。In a second manner, it may be determined that the number of storage nodes of the first type is smaller than the number of slice data. In this manner, at least one storage node of the first type of storage nodes that are determined needs to store more than one slice. data. Wherein, the first type of storage nodes that need to store more than one slice data may be determined according to the storage state of each storage node. The storage state may include the remaining storage space of the storage node, load pressure, and the like.
例如,切片数据的数量为4个,而所确定的第一类存储节点的数量为3个,分别为:第一类存储节点1、第一类存储节点2和第一类存储节点3,而3个第一类存储节点中,相比于第一类存储节点2和第一类存储节点3,第一类存储节点1的剩余存储空间更大,并且负载压力更小,因此,可以确定第一类存储 节点1存储其中的2个切片数据。For example, the number of slice data is four, and the number of the first type of storage nodes determined is three, namely: a first type storage node 1, a first type storage node 2, and a first type storage node 3, and Among the three first type storage nodes, compared with the first type storage node 2 and the first type storage node 3, the remaining storage space of the first type storage node 1 is larger, and the load pressure is smaller, therefore, the first can be determined. One type of storage node 1 stores two of the slice data.
在目标存储节点确定第一类存储节点的数量之后,可以根据预设的策略从存储系统100中选取所确定数量的存储节点,所选取的存储节点即为第一类存储节点。其中,预设的策略可以是自定义设定的,具体地,根据预设的策略选取存储节点的方式在下面的实施方式中进行详细介绍,在此不再详述。After the target storage node determines the number of the first type of storage nodes, the determined number of storage nodes may be selected from the storage system 100 according to a preset policy, and the selected storage node is the first type of storage node. The preset policy may be customized. Specifically, the manner of selecting a storage node according to the preset policy is described in detail in the following embodiments, and details are not described herein.
另外,在选取第一类存储节点时,还可以考虑每一切片数据的数据量,所选取的第一类存储节点的剩余存储空间至少大于对应存储的切片数据的数据量。In addition, when selecting the first type of storage node, the amount of data of each slice data may also be considered, and the remaining storage space of the selected first type of storage node is at least greater than the data amount of the corresponding stored slice data.
目标存储节点在确定出第一类存储节点之后,可以获取所确定第一类存储节点中用于存储切片数据的第一类存储位置。After the target storage node determines the first type of storage node, the first type of storage location for storing the slice data in the determined first type of storage node may be obtained.
其中,存储位置可以是存储节点中的硬盘,不同的存储位置即为不同的硬盘。当每个硬盘中有多个分区时,存储位置还可以是具体指存储节点中硬盘的分区。The storage location may be a hard disk in the storage node, and different storage locations are different hard disks. When there are multiple partitions in each hard disk, the storage location may also be a partition specifically referring to the hard disks in the storage node.
例如,存储节点中包括硬盘1和硬盘2,数据存储在硬盘1中,此时,数据的存储位置可以是指硬盘1,当硬盘1包括分区1和分区2,数据具体存储在硬盘1的分区1中,此时,数据的存储位置是指硬盘1的分区1。For example, the storage node includes the hard disk 1 and the hard disk 2, and the data is stored in the hard disk 1. At this time, the storage location of the data may refer to the hard disk 1. When the hard disk 1 includes the partition 1 and the partition 2, the data is specifically stored in the partition of the hard disk 1. In this case, at this time, the storage location of the data refers to the partition 1 of the hard disk 1.
存储节点中可以包括多个硬盘,每个硬盘的存储状态是不一样的,在确定第一类存储节点之后,可以根据第一类存储节点中各硬盘的存储状态,选取用于存储切片数据的硬盘,即为第一类存储位置。The storage node may include multiple hard disks, and the storage state of each hard disk is different. After determining the storage node of the first type, the storage state of each hard disk in the storage node of the first type may be selected to store the slice data. The hard disk is the first type of storage location.
其中,硬盘的存储状态可以是剩余存储空间、负载压力等,在选取用于存储切片数据的硬盘时,可以仅根据其中的一种存储状态进行选取,还可以结合硬盘的多种存储状态进行选取,在此不作限定。The storage state of the hard disk may be the remaining storage space, the load pressure, etc. When the hard disk for storing the slice data is selected, the storage state may be selected according to only one of the storage states, and may also be selected according to multiple storage states of the hard disk. It is not limited here.
例如,仅根据剩余存储空间,从第一类存储节点中选取剩余存储空间最大的硬盘,作为存储切片数据的硬盘。同时考虑剩余存储空间和负载压力的情况下,可以从第一类存储节点中选取剩余存储空间最大、负载压力最小的硬盘,作为存储切片数据的硬盘。For example, the hard disk with the largest remaining storage space is selected from the first type of storage nodes as the hard disk storing the slice data only according to the remaining storage space. Considering the remaining storage space and load pressure, the hard disk with the largest remaining storage space and the lowest load pressure can be selected from the first type of storage nodes as the hard disk storing the slice data.
另外,第一类存储节点中用于存储切片数据的第一类存储位置可以由第 一类存储节点自身进行确定,还可以由目标存储节点指定,再向对应的第一类存储节点申请。该部分在下面的实施方式中进行详细介绍,在此不再详述。In addition, the first type of storage location for storing the slice data in the first type of storage node may be determined by the first type of storage node itself, or may be specified by the target storage node, and then applied to the corresponding first type of storage node. This part is described in detail in the following embodiments and will not be described in detail herein.
第四步骤,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。In the fourth step, the obtained slice data is written into the acquired first type storage location through the SAS network.
在该存储系统100中,各存储节点之间可以是通过SAS网络相连接的。因此,目标存储节点可以知道存储系统100中其他各存储节点中的存储位置,目标存储节点可以从其他各存储节点中读取相应的数据,还可以将数据写入其他各存储节点中的存储位置。In the storage system 100, each storage node may be connected through a SAS network. Therefore, the target storage node can know the storage location in each of the other storage nodes in the storage system 100, the target storage node can read the corresponding data from the other storage nodes, and can also write the data to the storage location in the other storage nodes. .
因此,目标存储节点在获取到切片数据以及各切片数据对应的第一类存储位置后,可以直接将切片数据写入对应的第一类存储位置。Therefore, after acquiring the slice data and the first type of storage location corresponding to each slice data, the target storage node may directly write the slice data into the corresponding first type storage location.
例如,目标存储节点得到切片数据A,并且确定该切片数据A对应存储在第一类存储节点A的第一类存储位置A,则目标存储节点可以通过SAS网络,将切片数据A直接写入第一类存储节点A的第一类存储位置A中。For example, the target storage node obtains the slice data A, and determines that the slice data A corresponds to the first type storage location A of the first type storage node A, and the target storage node can directly write the slice data A through the SAS network. The first type of storage node A is stored in location A.
本申请实施例提供的技术方案中,存储系统中包括至少两个存储节点,各存储节点之间通过SAS网络连接,目标存储节点用于获取待存储数据,对待存储数据进行切片处理得到切片数据;确定用于存储所得到的切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。In the technical solution provided by the embodiment of the present application, the storage system includes at least two storage nodes, and each storage node is connected through a SAS network, and the target storage node is configured to acquire data to be stored, and perform slice processing on the stored data to obtain slice data. Determining a first type of storage node for storing the obtained slice data, and acquiring a first type of storage location for storing slice data in the determined first type of storage node, and writing the obtained slice data through a SAS network The first type of storage location obtained. After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
一种实施方式中,第一类存储位置可以由第一类存储节点自身所确定。In one embodiment, the first type of storage location may be determined by the first type of storage node itself.
目标存储节点在确定第一类存储节点之后,目标存储节点可以向所确定的第一类存储节点发送第一存储请求。第一类存储节点接收到第一存储请求后,可以根据第一存储请求分配对应的存储位置,该存储位置即为第一类存储位置,第一类存储节点再将所分配的第一类存储位置发送至目标存储节点。After the target storage node determines the first type of storage node, the target storage node may send the first storage request to the determined first type of storage node. After receiving the first storage request, the first type of storage node may allocate a corresponding storage location according to the first storage request, where the storage location is the first type of storage location, and the first type of storage node stores the allocated first category. The location is sent to the target storage node.
目标存储节点发送的第一存储请求中可以包括待存储的切片数据的数据类型、数据量、数据标识等信息中的任一种或多种。The first storage request sent by the target storage node may include any one or more of data type, data volume, data identifier, and the like of the slice data to be stored.
其中,数据类型可以包括视频数据、图像数据等类型。数据量反映出切片数据所占存储空间的大小,存储节点根据切片数据的数据量分配相应的存储空间。数据标识可以用来对切片数据进行校验,以确保切片数据写入到正确的存储位置。The data type may include video data, image data, and the like. The amount of data reflects the size of the storage space occupied by the slice data, and the storage node allocates the corresponding storage space according to the data amount of the slice data. The data identification can be used to verify the slice data to ensure that the slice data is written to the correct storage location.
一种实施方式中,目标存储节点,可以用于根据以下信息中的至少一种,确定用于存储所得到切片数据的第一类存储节点:已被目标存储节点分配过的存储节点、存储系统中各存储节点的存活状态、存储系统中各存储节点的剩余存储空间、存储系统中各存储节点的负载压力。In an embodiment, the target storage node may be configured to determine, according to at least one of the following information, a first type of storage node used to store the obtained slice data: a storage node that has been allocated by the target storage node, and a storage system The survival state of each storage node, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
下面分别对上述四种所根据的信息进行介绍。The following four types of information are introduced separately.
一、目标存储节点确定第一类存储节点的依据为:已被目标存储节点分配过的存储节点。1. The target storage node determines the first type of storage node based on the storage node that has been allocated by the target storage node.
目标存储节点可以记录每一次所确定的第一类存储节点的标识。The target storage node can record the identity of each of the determined first type of storage nodes.
第一种实现方式,为集中策略,即,目标存储节点在确定第一类存储节点时,可以选取与上一次所确定的第一类存储节点相同的存储节点。The first implementation manner is a centralized policy, that is, when the target storage node determines the first type of storage node, the storage node that is the same as the storage node of the first type determined last time may be selected.
例如,存储系统100中包括:存储节点1、存储节点2、存储节点3、存储节点4、存储节点5,目标存储节点所记录的上一次所确定的第一类存储节点为存储节点1和存储节点2,那么,目标存储节点在本次确定第一类存储节点时,仍然选取存储节点1和存储节点2作为第一类存储节点。For example, the storage system 100 includes: a storage node 1, a storage node 2, a storage node 3, a storage node 4, and a storage node 5. The last determined first type of storage node recorded by the target storage node is the storage node 1 and the storage. Node 2, then, when the target storage node determines the first type of storage node this time, the storage node 1 and the storage node 2 are still selected as the first type of storage node.
当上一次所确定出的第一类存储节点出现故障、存储空间已满等情况时,则不能再将上一次所确定出的第一类存储节点再作为第一类存储节点,而可以通过目标存储节点确定第一类存储节点的其他依据重新确定第一类存储节点。When the first type of storage node determined last time fails, the storage space is full, etc., the first type of storage node determined last time can no longer be used as the first type of storage node, but can pass the target. The storage node determines the other basis of the first type of storage node to re-determine the first type of storage node.
第二种实现方式,为分散策略,即,目标存储节点在确定第一类存储节点时,可以选取与之前所确定的第一类存储节点不同的存储节点。可以分为两种情况:第一种情况,可以选取与上一次所确定的第一类存储节点不同的存储节点;第二种情况,可以选取与之前多次所确定的第一类存储节点不同的存储节点。The second implementation manner is a decentralized strategy, that is, when the target storage node determines the first type of storage node, the storage node different from the previously determined first type storage node may be selected. It can be divided into two cases: in the first case, a storage node different from the first type of storage node determined last time can be selected; in the second case, it can be selected differently from the first type of storage node determined many times before. Storage node.
下面就上述两种情况分别进行说明介绍。The following two cases are described separately.
第一种情况,目标存储节点在确定第一类存储节点时,可以选取与上一次所确定的第一类存储节点不同的存储节点。也就是说,所确定的第一类存储节点只要与上一次所确定的第一类存储节点不同即可。In the first case, when determining the first type of storage node, the target storage node may select a storage node different from the first type of storage node determined last time. That is to say, the determined first type of storage node may be different from the first type of storage node determined last time.
例如,存储系统100中包括:存储节点1、存储节点2、存储节点3、存储节点4、存储节点5,目标存储节点所记录的上一次所确定的存储节点为存储节点1和存储节点2,那么,目标存储节点在本次确定第一类存储节点时,可以从存储节点3、存储节点4以及存储节点5中选取存储节点作为第一类存储节点。For example, the storage system 100 includes: a storage node 1, a storage node 2, a storage node 3, a storage node 4, and a storage node 5. The last determined storage node recorded by the target storage node is a storage node 1 and a storage node 2, Then, when the target storage node determines the first type of storage node, the storage node 3, the storage node 4, and the storage node 5 may be selected as the storage node of the first type.
第二种情况,目标存储节点在确定第一类存储节点时,可以选取与之前多次所确定的第一类存储节点不同的存储节点。其中,之前多次的次数可以是自定义设定的。In the second case, when determining the first type of storage node, the target storage node may select a storage node different from the first type of storage node determined a plurality of times before. Among them, the number of times before can be customized.
为了使得切片数据在存储系统100所包含的存储节点中的存储是分散的,目标存储节点在确定第一类存储节点时可以采用轮转策略。In order to make the storage of the slice data in the storage nodes included in the storage system 100 distributed, the target storage node may employ a rotation policy when determining the first type of storage nodes.
可以预先设定针对存储系统100所包含各存储节点的标识排序表,该标识排序表中记录存储系统100所包含的存储节点所对应标识的排序,排序的规则可以自定义设定。目标存储节点在每一次确定第一类存储节点时,均可以按照该标识排序表进行分配,每一次所确定的第一类存储节点的标识为:上一次所确定的第一类存储节点所对应标识在该标识排序表中的下一标识。An order sorting table for each storage node included in the storage system 100 may be preset, and the sorting table records the sorting of the identifiers corresponding to the storage nodes included in the storage system 100, and the sorting rules may be customized. Each time the target storage node determines the first type of storage node, the identifier may be allocated according to the identifier sorting table, and the identifier of the first type of storage node determined each time is: the first type of storage node determined last time Identifies the next identity in the identity sort table.
当所确定的第一类存储节点的剩余存储空间不足以存储切片数据时,可以重新确定第一类存储节点。When the determined remaining storage space of the first type of storage node is insufficient to store the slice data, the first type of storage node may be re-determined.
二、目标存储节点确定第一类存储节点的依据为:存储系统中各存储节点的存活状态。2. The target storage node determines the first type of storage node according to the survival state of each storage node in the storage system.
其中,存储节点的存活状态为:存储节点的故障状态或者完好状态。The survival state of the storage node is: a fault state or an intact state of the storage node.
存储节点可以定时向目标存储节点上报各自的存活状态,对于目标存储节点来说,也可以实时了解各存储节点的存活状态。这样,目标存储节点在确定第一类存储节点时,可以及时地排除故障的存储节点,而仅从完好的存 储节点中确定目标存储节点。这样,可以提高切片数据存储的效率。The storage node can periodically report the survival status of the storage node to the target storage node. For the target storage node, the storage state of each storage node can also be known in real time. In this way, when the target storage node determines the first type of storage node, the failed storage node can be eliminated in time, and only the target storage node is determined from the intact storage node. In this way, the efficiency of slicing data storage can be improved.
三、目标存储节点确定第一类存储节点的依据为:存储系统中各存储节点的剩余存储空间。3. The target storage node determines the first type of storage node based on: the remaining storage space of each storage node in the storage system.
可以针对各存储节点的剩余存储空间进行排序,对于剩余存储空间较大的存储节点,可以优先将其确定为第一类存储节点。这样,目标存储节点可以在每进行一次第一类存储节点的确定之后,对各存储节点的剩余存储空间的排序进行更新,所得到的新的剩余存储空间排序可以作为下一次确定第一类存储节点的依据。这样,可以均衡存储系统100中的各存储节点的剩余存储空间。The remaining storage space of each storage node may be sorted, and for a storage node with a large remaining storage space, it may be preferentially determined as the first type of storage node. In this way, the target storage node may update the order of the remaining storage spaces of each storage node after each determination of the storage node of the first type, and the obtained new remaining storage space sorting may be used as the next determination of the first type of storage. The basis of the node. In this way, the remaining storage space of each storage node in the storage system 100 can be equalized.
四、目标存储节点确定第一类存储节点的依据为:存储系统中各存储节点的负载压力。4. The target storage node determines the basis of the first type of storage node as: the load pressure of each storage node in the storage system.
可以针对存储系统100中所包含的各存储节点的负载压力进行排序,对于负载压力小的存储节点,可以优先将其确定为第一类存储节点。这样,目标存储节点可以在每进行一次第一类存储节点的确定之后,对各存储节点的负载压力排序进行更新,所得到的新的负载压力排序可以作为下一次确定第一类存储节点的依据。这样,可以均衡存储系统100中的各存储节点的负载压力。The load pressure of each storage node included in the storage system 100 may be sorted, and for a storage node with a small load pressure, it may be preferentially determined as the first type of storage node. In this way, the target storage node may update the load pressure order of each storage node after each determination of the storage node of the first type, and the obtained new load pressure ordering may be used as the basis for determining the first type of storage node next time. . In this way, the load pressure of each storage node in the storage system 100 can be equalized.
对于上述四种信息,可以分别单独地作为目标存储节点确定第一类存储节点的依据,还可以将任意两种、三种或者四种组合作为目标存储节点确定第一类存储节点的依据。在此不做限定。For the above four types of information, the basis of the first type of storage node may be separately determined as the target storage node, and any two, three or four combinations may be used as the basis for the target storage node to determine the first type of storage node. There is no limit here.
一种实施方式中,存储系统中还可以包括管理节点,其中,存储系统中的管理节点可以是一个,还可以是多个。在存储系统中包括多个管理节点的情况下,多个管理节点的集合即为一个管理集群,因此,可以认为,存储系统中包括管理集群,管理集群中包括多个管理节点。In an implementation manner, the storage system may further include a management node, where the management node in the storage system may be one or multiple. In a case where a plurality of management nodes are included in the storage system, the collection of the plurality of management nodes is a management cluster. Therefore, it can be considered that the storage system includes a management cluster, and the management cluster includes a plurality of management nodes.
下面对该实施方式中的目标存储节点和管理节点分别进行介绍。The target storage node and the management node in this embodiment are respectively introduced below.
一、目标存储节点First, the target storage node
在上述图1对应的实施例的基础上,该实施方式中,目标存储节点在对待存储数据进行切片处理得到各切片数据之后,可以记录所得到的各切片数据 与该待存储数据之间的对应关系,该对应关系即为一个切片数据的存储索引记录的一种对应关系。On the basis of the embodiment corresponding to FIG. 1 above, in the embodiment, after the target storage node performs the slice processing on the data to be stored to obtain each slice data, the correspondence between the obtained slice data and the data to be stored may be recorded. Relationship, the correspondence is a correspondence relationship of storage index records of one slice data.
例如,目标存储节点将数据A经过切片处理得到的切片数据包括:切片数据1、切片数据2和切片数据3,则目标存储节点记录的对应关系包括:数据A与切片数据1对应,数据A与切片数据2对应,数据A与切片数据3对应。For example, the slice data obtained by the target storage node after the data A is sliced includes: slice data 1, slice data 2, and slice data 3. The correspondence relationship of the target storage node records includes: data A corresponds to slice data 1, and data A and The slice data 2 corresponds, and the data A corresponds to the slice data 3.
目标存储节点在将所接收到的切片数据通过SAS网络分别写入对应的第一类存储位置后,可以记录每一切片数据与该切片数据所存储的第一类存储位置的对应关系,该对应关系也为一个切片数据的存储索引记录的另一种对应关系。After the target storage node writes the received slice data to the corresponding first type storage location through the SAS network, the corresponding relationship between each slice data and the first type of storage location stored by the slice data may be recorded. The relationship is also another correspondence of the storage index records of one slice of data.
例如,目标存储节点所得到的切片数据包括:切片数据A、切片数据B和切片数据C,其中,切片数据A的存储索引1为切片数据A对应于存储位置A,切片数据B的存储索引2为切片数据B对应于存储位置B,切片数据C的存储索引3为切片数据C对应于存储位置C,那么,目标存储节点所生成的存储索引包括存储索引1、存储索引2和存储索引3。For example, the slice data obtained by the target storage node includes: slice data A, slice data B, and slice data C, wherein the storage index 1 of the slice data A is the slice data A corresponding to the storage location A, and the storage index 2 of the slice data B The storage index 3 of the slice data C corresponds to the storage location C, and the storage index generated by the target storage node includes the storage index 1, the storage index 2, and the storage index 3.
这样,目标存储节点所生成的存储索引包括:该目标存储节点所得到的每一切片数据各自对应的存储索引。In this way, the storage index generated by the target storage node includes: a storage index corresponding to each slice data obtained by the target storage node.
二、管理节点Second, the management node
存储系统中包括管理集群时,可以从管理集群中根据预设的策略选取一个管理节点,用于接收并存储目标存储节点发送的存储索引。When the management system includes the management cluster, a management node may be selected from the management cluster according to a preset policy, and used to receive and store the storage index sent by the target storage node.
其中,预设的策略可以为根据以下信息中的至少一种,确定用于接收并存储目标存储节点发送的存储索引的管理节点:已分配过的管理节点、管理集群中各管理节点的存活状态、管理集群中各管理节点的负载压力。The preset policy may be: determining, according to at least one of the following information, a management node for receiving and storing a storage index sent by the target storage node: the allocated management node, and the survival status of each management node in the management cluster. Manage the load pressure of each management node in the cluster.
用于确定管理节点的策略与上述实施方式中确定第一类存储节点的策略类似,可以对应参考上述实施方式中的依据一、依据二和依据四,在此不再赘述。The policy for determining the management node is similar to the policy for determining the storage node of the first type in the foregoing embodiment, and may refer to the basis of the first embodiment, the second base, and the fourth base in the foregoing embodiments, and details are not described herein again.
通过该实施方式,管理节点可以通过所存储的存储索引,更准确快速地查询在存储系统中存储各切片数据的存储位置,进而可以提高数据处理效率。With this embodiment, the management node can more accurately and quickly query the storage location of storing the slice data in the storage system through the stored storage index, thereby improving data processing efficiency.
一种实施方式中,在上述实施方式的基础上,下面对该实施方式中的管理节点和第二类存储节点分别进行介绍。In one embodiment, based on the above embodiments, the management node and the second type storage node in the embodiment are respectively introduced below.
一、管理节点First, the management node
管理节点还可以用于接收目标客户端针对待读取数据的读取请求。The management node can also be used to receive a read request from the target client for the data to be read.
其中,目标客户端可以是存储系统外部的、发送读取请求的设备,例如,计算机、手机、平板等客户端设备。待读取数据可以是该存储系统中所存储的数据。The target client may be a device external to the storage system that sends a read request, for example, a client device such as a computer, a mobile phone, or a tablet. The data to be read may be data stored in the storage system.
管理节点选取第二类存储节点可以是根据预设的策略,一种实现方式,可以根据以下信息中的至少一种,从存储系统所包括的存储节点中选择第二类存储节点:已被管理节点分配过的存储节点、存储系统中各存储节点的存活状态、存储系统中各存储节点的剩余存储空间、存储系统中各存储节点的负载压力。The management node selects the second type of storage node according to a preset policy. In an implementation manner, the second type storage node may be selected from the storage nodes included in the storage system according to at least one of the following information: The storage node allocated by the node, the surviving state of each storage node in the storage system, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
管理节点选取第二类存储节点的策略与上述实施方式中确定第一类存储节点的策略类似,可以对应参考上述实施方式中的依据一、依据二、依据三和依据四,在此不再赘述。The policy for the management node to select the second type of storage node is similar to the strategy for determining the storage node of the first type in the foregoing embodiment, and may refer to the basis of the foregoing embodiment, the second, the third, and the fourth, and will not be described herein. .
管理节点可以根据本地存储的存储索引,确定待读取数据对应的切片数据以及各个切片数据的第二类存储位置。The management node may determine the slice data corresponding to the data to be read and the second type of storage location of each slice data according to the locally stored storage index.
例如,管理节点根据本地存储的存储索引,可以查询得到待读取数据的切片数据包括:切片数据A、切片数据B、切片数据C,并且可以查询得到各切片数据对应存储的存储位置:切片数据A存储在存储位置A、切片数据B存储在存储位置B、切片数据C存储在存储位置C,那么,存储位置A、存储位置B和存储位置C为第二类存储位置。For example, the management node may query the obtained slice data of the data to be read according to the locally stored storage index, including: slice data A, slice data B, and slice data C, and may query and obtain a storage location corresponding to each slice data: slice data. A is stored in the storage location A, the slice data B is stored in the storage location B, and the slice data C is stored in the storage location C. Then, the storage location A, the storage location B, and the storage location C are the second type of storage location.
二、第二类存储节点Second, the second type of storage node
存储系统100中所包括的存储节点之间通过SAS网络相连接,第二类存储节点可以从存储系统中其他的存储节点中读取数据。由此,在该实施方式中,第二类存储节点在接收到管理节点发送的第二类存储位置后,可以从第二类存储位置中读取存储的切片数据。The storage nodes included in the storage system 100 are connected by a SAS network, and the second type of storage nodes can read data from other storage nodes in the storage system. Thus, in this embodiment, after receiving the second type of storage location sent by the management node, the second type of storage node can read the stored slice data from the second type of storage location.
例如,管理节点发送的第二类存储位置包括存储位置A、存储位置B和存储位置C,其中,存储位置A中存储切片数据A,存储位置B中存储切片数据B,存储位置C中存储切片数据C,那么,对于第二类存储节点来说,分别从存储位置A中读取切片数据A,从存储位置B中读取切片数据B,从存储位置C中读取切片数据C。For example, the second type of storage location sent by the management node includes a storage location A, a storage location B, and a storage location C, wherein the storage location A stores slice data A, the storage location B stores slice data B, and the storage location C stores slice Data C, then, for the second type of storage node, the slice data A is read from the storage location A, the slice data B is read from the storage location B, and the slice data C is read from the storage location C.
第二类存储节点可以将所读取到的切片数据进行数据还原处理,得到目标客户端所需的待读取数据。The second type of storage node can perform data restoration processing on the read slice data to obtain data to be read required by the target client.
其中,第二类存储节点进行数据还原处理可以是通过纠删码技术,通过纠删码技术,第二类存储节点所读取到的切片数据的数量可以是N+M,其中,N为数据片的数量,M为校验片的数量。The second type of storage node performing data restoration processing may be an erasure code technique, and the number of slice data read by the second type storage node may be N+M, where N is data. The number of slices, M is the number of slices.
第二类存储节点所读取到的切片数据的数量可以小于N+M、且大于或等于N,因为纠删码技术自身的容错特性可以将切片数据恢复到N+M个,再进行数据还原处理,得到待读取数据。The number of slice data read by the second type of storage node may be less than N+M and greater than or equal to N, because the fault tolerance characteristic of the erasure code technology itself can restore the slice data to N+M, and then perform data restoration. Processing to obtain data to be read.
一种实施方式中,在上述实施方式的基础上,下面对该实施方式中的管理节点和第三类存储节点分别进行介绍。In one embodiment, based on the above embodiments, the management node and the third type storage node in the embodiment are respectively introduced below.
一、管理节点First, the management node
管理节点可以对存储系统100中所包括的存储节点进行统筹管理,可以实时获取各存储节点的状态信息。其中,存储节点的状态信息可以包括:存储节点的故障信息、剩余存储空间信息、存储节点所包括的硬盘状态信息等信息中的至少一种。The management node can perform overall management on the storage nodes included in the storage system 100, and can obtain state information of each storage node in real time. The status information of the storage node may include at least one of failure information of the storage node, remaining storage space information, and hard disk status information included in the storage node.
获取存储节点的状态信息的方式可以有多种。There are many ways to obtain the status information of a storage node.
第一种获取方式,可以是各存储节点主动将自身的状态信息发送给管理节点,其中,存储节点可以根据预设的频率发送,预设的频率可以是自定义的。例如,为了保证管理节点获取到的各存储节点的状态信息是具有实时性的,可以将发送的频率设置的高一些;另外,存储节点在发生故障、存储已满等突发状况时,可以立刻将突发状况的信息发送至管理节点。The first type of obtaining may be that each storage node actively sends its own state information to the management node, where the storage node may send according to a preset frequency, and the preset frequency may be customized. For example, in order to ensure that the state information of each storage node acquired by the management node is real-time, the frequency of the transmission may be set higher; in addition, when the storage node is in a sudden state such as a failure or a storage is full, the storage node may immediately Send the information of the emergency to the management node.
第二种获取方式,可以是管理节点主动从存储系统中的各存储节点获取 各存储节点的状态信息。In the second method, the management node actively obtains the state information of each storage node from each storage node in the storage system.
管理节点获取存储节点的状态信息的方式不仅限于上述两种,还可以包括其他获取方式,在此不做限定。The manner in which the management node obtains the state information of the storage node is not limited to the above two types, and may also include other acquisition modes, which are not limited herein.
根据上述中的任一种获取方式,管理节点可以获取到故障存储节点的故障信息,在该实施方式中,存储节点故障可以是存储节点中的存储位置故障,导致存储位置中所存储的数据损坏而不能读取。According to any one of the foregoing manners, the management node may obtain the fault information of the faulty storage node. In this embodiment, the storage node fault may be a storage location fault in the storage node, causing the data stored in the storage location to be damaged. Can't read.
其中,故障信息可以包括故障位置中所存储数据的数据量,故障信息还可以包括以下信息中的至少一种:故障位置中所存储数据的数据类型、数据标识信息等。The fault information may include the data amount of the data stored in the fault location, and the fault information may further include at least one of the following information: a data type of the data stored in the fault location, data identifier information, and the like.
一种实现方式,管理节点获取故障存储节点中的故障位置;根据本地的存储索引,确定故障位置对应存储的数据,以及故障位置所存储的数据对应的切片数据,并获得所确定的各切片数据对应的存储位置,将所获得的存储位置发送至第三类存储节点。In an implementation manner, the management node acquires the fault location in the fault storage node, determines the data corresponding to the fault location according to the local storage index, and the slice data corresponding to the data stored in the fault location, and obtains the determined slice data. Corresponding storage location, the obtained storage location is sent to the third type of storage node.
具体地,管理节点获取的故障位置可以是:发生故障的故障存储节点识别到故障位置后,再将所识别的故障位置上报给管理节点。管理节点在获取到故障位置后,根据本地存储的存储索引中的切片数据与该切片数据对应的第一类存储位置的对应关系,可以确定故障位置对应存储的数据;再根据存储索引中的待存储数据与该待存储数据经切片处理得到的各切片数据的对应关系,进而可以确定出故障位置所存储的数据对应的切片数据;最后再根据存储索引中的切片数据与该切片数据对应的第一类存储位置的对应关系,可以获得所确定的各切片数据对应的存储位置。将所确定的存储位置发送至第三类存储节点。Specifically, the fault location acquired by the management node may be: after the faulty storage node that identifies the fault identifies the fault location, the fault location is reported to the management node. After obtaining the fault location, the management node may determine, according to the correspondence between the slice data in the locally stored storage index and the first type of storage location corresponding to the slice data, the data corresponding to the fault location may be determined; Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored, thereby determining the slice data corresponding to the data stored in the fault location; and finally corresponding to the slice data according to the slice data in the storage index. For a correspondence of storage locations, the storage locations corresponding to the determined slice data can be obtained. The determined storage location is sent to a third type of storage node.
管理节点可以根据故障位置所存储数据的数据量,从存储系统所包括的存储节点中选择第三类存储节点。为了便于进行重构处理以及可以对重构得到的数据进行存储,第三类存储节点的可用存储空间大于该故障位子所存储数据的数据量。其中,选择第三类存储节点可以是根据预设的策略,一种实现方式,可以根据以下信息中的至少一种,从存储系统所包括的存储节点中选择第三类存储节点:已被管理节点分配过的存储节点、存储系统中各存储 节点的存活状态、存储系统中各存储节点的剩余存储空间、存储系统中各存储节点的负载压力。The management node may select the third type of storage node from the storage nodes included in the storage system according to the data amount of the data stored in the fault location. In order to facilitate the reconstruction process and to store the reconstructed data, the available storage space of the third type of storage node is larger than the data amount of the data stored by the faulty location. The third type of storage node may be selected according to a preset policy, and the third type of storage node may be selected from the storage nodes included in the storage system according to at least one of the following information: The storage node allocated by the node, the surviving state of each storage node in the storage system, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
管理节点选取第三类存储节点的策略与上述实施方式中确定第一类存储节点的策略类似,可以对应参考上述实施方式中的依据一、依据二、依据三和依据四,在此不再赘述。The policy of selecting the storage node of the third type is similar to the policy of determining the storage node of the first type in the foregoing embodiment, and may refer to the basis of the foregoing embodiment according to the first, the second, the third and the fourth, and will not be described herein. .
所选取的第三类存储节点可以对数据进行重构处理,重构处理的方式可以是纠删码技术。The selected third type of storage node may perform reconstruction processing on the data, and the reconstruction processing may be an erasure coding technique.
二、第三类存储节点Second, the third type of storage node
为了恢复故障位置中所存储的数据,第三类存储节点可以对故障位置中所存储数据进行重构处理,重构处理的一种实现方式,可以是通过纠删码技术对故障位置中所存储数据进行重构处理,进而可以得到重构数据,所得到的重构数据即为故障位置中所存储的原始数据。In order to recover the data stored in the fault location, the third type of storage node may perform reconstruction processing on the data stored in the fault location, and an implementation manner of the reconstruction processing may be stored in the fault location by using erasure code technology. The data is reconstructed, and then the reconstructed data is obtained, and the obtained reconstructed data is the original data stored in the fault location.
例如,故障位置中所存储的数据为数据A,在通过纠删码技术进行重构处理所得到的重构数据,即为数据A。For example, the data stored in the fault location is data A, and the reconstructed data obtained by the reconstruction process by the erasure code technique is data A.
一种实现方式,第三类存储节点接收管理节点发送的存储位置,从所接收到的存储位置中读取对应的切片数据,将所读取到的切片数据进行重构处理,得到重构数据。In an implementation manner, the third type storage node receives the storage location sent by the management node, reads the corresponding slice data from the received storage location, and reconstructs the read slice data to obtain the reconstructed data. .
在第三类存储节点得到重构数据之后,可以为重构数据分配对应的存储位置。其中,第一种分配方式,第三类存储节点所分配的存储位置为一个存储节点中的一个存储位置,这样就可以将重构数据直接存储至所分配的存储位置。所分配的存储位置的剩余存储空间大于重构数据的数据量。After the third type of storage node obtains the reconstructed data, the corresponding storage location may be allocated for the reconstructed data. The first allocation mode, the storage location allocated by the storage node of the third type is a storage location in a storage node, so that the reconstructed data can be directly stored to the allocated storage location. The remaining storage space of the allocated storage location is larger than the amount of data of the reconstructed data.
例如,第三类存储节点所得到的重构数据为数据A,且数据A的数据量为10M,那么,第三类存储节点可以为数据A分配一个存储位置,该存储位置的剩余空间大于10M,这样,可以将数据A直接写入该存储位置。For example, if the reconstructed data obtained by the third type of storage node is data A, and the data amount of the data A is 10M, then the third type of storage node may allocate a storage location for the data A, and the remaining space of the storage location is greater than 10M. In this way, data A can be written directly to the storage location.
第二种分配方式,可以为重构数据分配多个存储位置,对重构数据进行分片存储。这种分配方式中,可以先对重构数据进行切片处理,得到切片数据,再将各切片数据分别写入所分配的存储位置中。第三类存储节点进行切 片处理的方式可以是通过纠删码技术进行切片。The second allocation method can allocate multiple storage locations for the reconstructed data and perform slice storage on the reconstructed data. In this allocation method, the reconstructed data may be first sliced to obtain slice data, and each slice data is separately written into the allocated storage location. The third type of storage node may perform slice processing by means of erasure coding technology.
对于上述两种分配方式,为重构数据所分配的存储位置既可以是第三类存储节点自身的硬盘,还可以是存储系统100中其他存储节点中的硬盘。在此不作限定。For the above two modes of distribution, the storage location allocated for the reconstruction data may be the hard disk of the storage node of the third type of storage node or the hard disk of other storage nodes of the storage system 100. This is not limited here.
通过该实施方式,即使存储系统所包括存储节点中的存储位置故障,也可以将故障位置中的数据进行恢复重建,重建数据后存储至其他未故障的硬盘中。这样,避免了因为存储位置故障而导致数据丢失的问题,进而可以提高所存储数据的可靠性。With this embodiment, even if the storage location in the storage node included in the storage system fails, the data in the fault location can be restored and reconstructed, and the data is reconstructed and stored in other non-faulty hard disks. In this way, the problem of data loss due to a storage location failure is avoided, and the reliability of the stored data can be improved.
本申请实施例提供的一种数据存储系统,如图2所示,该存储系统100包括:切片服务器120、至少两个存储节点110,各存储节点110之间通过SAS网络连接;As shown in FIG. 2, the storage system 100 includes: a slicing server 120, at least two storage nodes 110, and each storage node 110 is connected through a SAS network;
切片服务器120,用于获取待存储数据,对待存储数据进行切片处理,得到切片数据;从至少两个存储节点中确定接收切片数据的目标存储节点,将所得到的切片数据发送至目标存储节点;The slice server 120 is configured to acquire data to be stored, perform slice processing on the stored data, and obtain slice data; determine, from at least two storage nodes, a target storage node that receives the slice data, and send the obtained slice data to the target storage node;
目标存储节点,用于接收切片服务器120发送的切片数据,确定用于存储切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置,将所接收到的切片数据通过SAS网络写入所获取的第一类存储位置。a target storage node, configured to receive slice data sent by the slice server 120, determine a first type of storage node for storing slice data, and obtain a first type of storage location for storing slice data in the determined first type of storage node. And the received slice data is written into the first type of storage location obtained by the SAS network.
其中,本实施例中目标存储节点所得到的切片数据是由切片服务器120发送的,目标存储节点在接收到切片数据之后,所执行的操作与图1对应的实施例中目标存储节点所执行的操作相同,具体可以参见上述图1所对应的实施例中目标存储节点的说明部分,在此不再赘述。The slice data obtained by the target storage node in the embodiment is sent by the slice server 120, and after the target storage node receives the slice data, the operation performed by the target storage node in the embodiment corresponding to FIG. 1 is performed. For details, refer to the description of the target storage node in the embodiment corresponding to FIG. 1 above, and details are not described herein again.
针对于切片服务器120Targeting the slicing server 120
切片服务器120,用于获取待存储数据,对待存储数据进行切片处理,得到切片数据;从至少两个存储节点中确定接收切片数据的目标存储节点,将所得到的切片数据发送至目标存储节点。The slice server 120 is configured to acquire data to be stored, perform slice processing on the stored data, and obtain slice data; determine a target storage node that receives the slice data from the at least two storage nodes, and send the obtained slice data to the target storage node.
下面对切片服务器120所执行的各步骤分别进行说明。The respective steps performed by the slicing server 120 will be described below.
第一步骤,获取待存储数据,对待存储数据进行切片处理,得到切片数据。In the first step, the data to be stored is obtained, and the data to be stored is sliced to obtain slice data.
该步骤可以参见上述图1对应的实施例中目标存储节点用于获取待存储数据,对待存储数据进行切片处理,得到切片数据的说明,在此不再赘述。For the step, refer to the description of the embodiment in FIG. 1 that the target storage node is used to obtain the data to be stored, and the data to be sliced is processed to obtain the slice data, and details are not described herein.
第二步骤,从至少两个存储节点中确定接收切片数据的目标存储节点,将所得到的切片数据发送至目标存储节点。In a second step, the target storage node that receives the slice data is determined from the at least two storage nodes, and the obtained slice data is sent to the target storage node.
一种实施方式中,存储系统100还包括第二管理节点。切片数据在对待存储数据进行切片处理得到切片数据之后,切片服务器120可以向第二管理节点发送第二存储请求,第二存储请求是切片服务器120向第二管理节点请求分配存储节点的请求。第二存储请求中可以携带切片数据的相关信息,例如,切片服务器120所得到的切片数据的数量、切片数据的大小等。In one embodiment, the storage system 100 further includes a second management node. After the slice data is sliced to obtain the slice data, the slice server 120 may send a second storage request to the second management node, where the second storage request is a request by the slice server 120 to allocate the storage node to the second management node. The second storage request may carry related information of the slice data, for example, the number of slice data obtained by the slice server 120, the size of the slice data, and the like.
第二管理节点接收切片服务器120发送的第二存储请求,根据第二存储请求从存储系统所包括的存储节点中确定目标存储节点。The second management node receives the second storage request sent by the slicing server 120, and determines the target storage node from the storage nodes included in the storage system according to the second storage request.
一种实现方式,第二管理节点可以根据以下信息中的至少一种,从存储系统所包括的存储节点中确定目标存储节点:已被第二管理节点分配过的存储节点、存储系统中各存储节点的存活状态、存储系统中各存储节点的剩余存储空间、存储系统中各存储节点的负载压力。In an implementation manner, the second management node may determine, from the storage nodes included in the storage system, a target storage node according to at least one of the following information: a storage node that has been allocated by the second management node, and each storage in the storage system. The surviving state of the node, the remaining storage space of each storage node in the storage system, and the load pressure of each storage node in the storage system.
该实现方式与上述图1对应的实施方式中确定第一类存储节点的策略类似,可以对应参考上述实施方式中的依据一、依据二、依据三和依据四,在此不再赘述。The implementation manner is similar to the policy for determining the storage node of the first type in the implementation manner corresponding to the foregoing embodiment of FIG. 1, and may refer to the basis of the foregoing, the second, the third, and the fourth according to the foregoing embodiments, and details are not described herein again.
第二管理节点在确定出目标存储节点后,将所确定的目标存储节点的标识发送至切片服务器120。其中,标识可以是IP(Internet Protocol,互联网协议)地址、MAC(Media Access Control,媒体访问控制)地址、编码等中的至少一种。After determining the target storage node, the second management node sends the determined identifier of the target storage node to the slice server 120. The identifier may be at least one of an IP (Internet Protocol) address, a MAC (Media Access Control) address, a code, and the like.
切片服务器120在接收到第二管理节点发送的标识后,便可以确定出标识所对应的目标存储节点,将所得到的切片数据发送至目标存储节点After receiving the identifier sent by the second management node, the slice server 120 can determine the target storage node corresponding to the identifier, and send the obtained slice data to the target storage node.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目 标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
一种实施方式中,目标存储节点,获取所确定第一类存储节点中用于存储切片数据的第一类存储位置,可以包括:In one embodiment, the target storage node obtains the first type of storage location for storing the slice data in the determined first type of storage node, and may include:
目标存储节点,用于向所确定的第一类存储节点发送第一存储请求;接收所确定的第一类存储节点发送的第一类存储位置,第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。And a target storage node, configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined first The location allocated by the class storage node to store the slice data.
本实施例中的实施方式与上述图1对应的实施方式相同,可以参见上述实施方式,在此不再赘述。The embodiment in this embodiment is the same as the embodiment corresponding to FIG. 1 above, and may be referred to the foregoing embodiment, and details are not described herein again.
一种实施方式中,目标存储节点,用于确定用于存储切片数据的第一类存储节点,可以包括:In an embodiment, the target storage node is configured to determine a first type of storage node for storing slice data, and may include:
目标存储节点,用于根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:已被目标存储节点分配过的存储节点,存储系统中各存储节点的存活状态,存储系统中各存储节点的剩余存储空间,存储系统中各存储节点的负载压力。a target storage node, configured to determine, according to at least one of the following information, a first type of storage node for storing slice data: a storage node that has been allocated by the target storage node, a survival state of each storage node in the storage system, and storage The remaining storage space of each storage node in the system, and the load pressure of each storage node in the storage system.
本实施例中的实施方式与上述图1对应的实施方式相同,可以参见上述实施方式,在此不再赘述。The embodiment in this embodiment is the same as the embodiment corresponding to FIG. 1 above, and may be referred to the foregoing embodiment, and details are not described herein again.
一种实施方式中,存储系统还可以包括第一管理节点,该第一管理节点与上述第二管理节点可以是同一管理节点,还可以是不同的管理节点,在此不作限定。目标存储节点,用于生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、待存储数据与该待存储数据经切片处理得到的各切片数据的对应关系;将所生成的存储索引发送至第一管理节点。In an embodiment, the storage system may further include a first management node, where the first management node and the second management node may be the same management node, and may be different management nodes, which are not limited herein. a storage node for generating a obtained storage index of each slice data, wherein the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, and data to be stored Corresponding relationship with each slice data obtained by slicing the data to be stored; and transmitting the generated storage index to the first management node.
第一管理节点,用于接收并存储目标存储节点发送的存储索引。The first management node is configured to receive and store a storage index sent by the target storage node.
本实施例中的实施方式与上述图1对应的实施方式相同,可以参见上述实施方式,在此不再赘述。The embodiment in this embodiment is the same as the embodiment corresponding to FIG. 1 above, and may be referred to the foregoing embodiment, and details are not described herein again.
一种实施方式中,在上述实施方式的基础上,第一管理节点,还可以用 于接收目标客户端针对待读取数据的读取请求,并从存储系统包括的存储节点中选择存储节点,作为第二类存储节点;根据本地存储的存储索引,确定待读取数据对应的切片数据以及各个切片数据的第二类存储位置,并将第二类存储位置发送至第二类存储节点。In an implementation manner, on the basis of the foregoing implementation manner, the first management node may further be configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system. As a second type of storage node, according to the locally stored storage index, the slice data corresponding to the data to be read and the second type storage location of each slice data are determined, and the second type storage location is sent to the second type storage node.
第二类存储节点,可以用于接收第一管理节点发送的第二类存储位置,从第二类存储位置中读取切片数据,将所读取到的切片数据进行还原处理,得到待读取数据,并将待读取数据发送至目标客户端。The second type of storage node may be configured to receive the second type of storage location sent by the first management node, read the slice data from the second type of storage location, and perform the reduction processing on the read slice data to obtain a to-be-read Data and send the data to be read to the target client.
本实施例中的实施方式与上述图1对应的实施方式相同,可以参见上述实施方式,在此不再赘述。The embodiment in this embodiment is the same as the embodiment corresponding to FIG. 1 above, and may be referred to the foregoing embodiment, and details are not described herein again.
一种实施方式中,第一管理节点,还可以用于获得故障存储节点的故障位置中所存储数据的数据量,根据数据量,从存储系统包括的存储节点中选择用于重构故障位置所存储数据的存储节点,作为第三类存储节点。In an embodiment, the first management node may be further configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a storage location node included in the storage system for reconstructing the fault location. A storage node that stores data as a third type of storage node.
第三类存储节点,还可以用于对故障位置所存储的数据进行重构,得到重构数据,为重构数据分配存储位置,并将重构数据写入所分配的存储位置。The third type of storage node can also be used to reconstruct the data stored in the fault location, obtain the reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated storage location.
本实施例中的实施方式与上述图1对应的实施方式相同,可以参见上述实施方式,在此不再赘述。The embodiment in this embodiment is the same as the embodiment corresponding to FIG. 1 above, and may be referred to the foregoing embodiment, and details are not described herein again.
一种实施方式中,在上述实施方式的基础上,第一管理节点,具体用于获取故障存储节点中的故障位置;根据本地的存储索引,确定故障位置对应存储的数据,以及故障位置所存储的数据对应的切片数据,并获得所确定的各切片数据对应的存储位置,将所获得的存储位置发送至第三类存储节点,第三类存储节点为:根据故障位置所存储数据的数据量,从存储系统包括的存储节点中,所选择的用于重构故障位置所存储数据的存储节点。In an implementation manner, on the basis of the foregoing implementation manner, the first management node is specifically configured to acquire a fault location in the fault storage node, determine, according to the local storage index, data corresponding to the fault location, and store the fault location. Data corresponding to the slice data, and obtain the storage location corresponding to each slice data, and send the obtained storage location to the third type storage node, and the third type of storage node is: the data volume of the data stored according to the fault location And a storage node selected from the storage node included in the storage system for reconstructing data stored in the fault location.
第三类存储节点,可以用于接收第一管理节点发送的存储位置,从所接收到的存储位置中读取对应的切片数据,将所读取到的切片数据进行重构处理,得到重构数据,为重构数据分配存储位置,并将重构数据写入所分配的存储位置。The third type of storage node may be configured to receive a storage location sent by the first management node, read corresponding slice data from the received storage location, and reconstruct the processed slice data to obtain a reconstruction. Data, allocate storage locations for reconstructed data, and write reconstructed data to the allocated storage locations.
本实施例中的实施方式与上述图1对应的实施方式中的一种实现方式相同,可以参见上述实施方式中的一种实现方式,在此不再赘述。The implementation in this embodiment is the same as the implementation in the foregoing embodiment, and may be referred to an implementation in the foregoing embodiment, and details are not described herein.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
相应于上述图1对应的系统实施例,本申请实施例还提供一种数据存储方法,应用于存储系统中的目标存储节点,存储系统包括至少两个存储节点,各存储节点之间通过SAS网络连接;Corresponding to the system embodiment corresponding to FIG. 1 above, the embodiment of the present application further provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node passes through a SAS network. connection;
如图3所示,该方法包括如下步骤:As shown in FIG. 3, the method includes the following steps:
S301,获取待存储数据;S301. Acquire data to be stored.
S302,对待存储数据进行切片处理,得到切片数据;S302, performing slice processing on the stored data to obtain slice data;
S303,确定用于存储所得到的切片数据的第一类存储节点;S303. Determine a first type of storage node used to store the obtained slice data.
S304,获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置;S304. Acquire a first type of storage location for storing slice data in the determined first type of storage node.
S305,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。S305. Write the obtained slice data to the acquired first type storage location through the SAS network.
可选地,一种实施方式中,获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置(S304)的步骤,可以包括如下步骤:Optionally, in an implementation manner, the step of acquiring the first type of storage location (S304) for storing the slice data in the determined first type of storage node may include the following steps:
向所确定的第一类存储节点发送第一存储请求;Sending a first storage request to the determined first type of storage node;
接收所确定的第一类存储节点发送的第一类存储位置,第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。Receiving the determined first type of storage location sent by the first type of storage node, the first type of storage location is: the determined location of the first type of storage node for storing slice data.
可选地,一种实施方式中,确定用于存储所得到的切片数据的第一类存储节点(S303)的步骤,可以包括如下步骤:Optionally, in an implementation manner, the step of determining a first type of storage node (S303) for storing the obtained slice data may include the following steps:
根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:A first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
已被目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
存储系统中各存储节点的存活状态;The survival status of each storage node in the storage system;
存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,一种实施方式中,存储系统还可以包括管理节点;Optionally, in an implementation manner, the storage system may further include a management node;
将所得到的切片数据通过SAS网络写入所获取的第一类存储位置(S305)的步骤之后,还可以包括如下步骤:After the step of writing the obtained slice data to the acquired first type storage location (S305) through the SAS network, the method may further include the following steps:
生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括该切片数据与该切片数据对应的第一类存储位置的对应关系和待存储数据与该待存储数据经切片处理得到的各切片数据的对应关系;Generating a storage index of each slice data obtained, wherein the storage index record of one slice data includes a correspondence relationship between the slice type data and the first type of storage location corresponding to the slice data, and the data to be stored and the data to be stored are sliced Processing the corresponding relationship of each slice data;
将所生成的存储索引发送至管理节点。The generated storage index is sent to the management node.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
相应于上述图2对应的系统实施例,本申请实施例还提供一种数据存储方法,应用于存储系统中的目标存储节点,存储系统包括:至少两个存储节点、切片服务器,各存储节点之间通过SAS网络连接,目标存储节点为:存储系统所包括的存储节点中接收切片数据的存储节点;Corresponding to the system embodiment corresponding to FIG. 2 above, the embodiment of the present application further provides a data storage method, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes, a slicing server, and each storage node. Connected through the SAS network, the target storage node is: a storage node that receives the slice data in the storage node included in the storage system;
如图4所示,该方法包括如下步骤:As shown in FIG. 4, the method includes the following steps:
S401,接收切片服务器发送的切片数据,切片数据为:切片服务器对待存储数据进行切片处理得到的数据;S401: Receive slice data sent by the slice server, where the slice data is: data obtained by slice processing the slice data to be stored by the slice server;
S402,确定用于存储切片数据的第一类存储节点;S402. Determine a first type of storage node for storing slice data.
S403,获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置;S403. Acquire a first type of storage location for storing slice data in the determined first type of storage node.
S404,将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。S404. Write the obtained slice data to the acquired first type storage location through the SAS network.
可选地,一种实施方式中,获取所确定第一类存储节点中用于存储切片数据的第一类存储位置(S403)的步骤,可以包括如下步骤:Optionally, in an implementation manner, the step of acquiring the first type of storage location (S403) for storing the slice data in the determined first type of storage node may include the following steps:
向所确定的第一类存储节点发送第一存储请求;Sending a first storage request to the determined first type of storage node;
接收所确定的第一类存储节点发送的第一类存储位置,第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。Receiving the determined first type of storage location sent by the first type of storage node, the first type of storage location is: the determined location of the first type of storage node for storing slice data.
可选地,一种实施方式中,确定用于存储切片数据的第一类存储节点(S402)的步骤,可以包括如下步骤:Optionally, in an implementation manner, the step of determining a first type of storage node (S402) for storing slice data may include the following steps:
根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:A first type of storage node for storing slice data is determined according to at least one of the following information:
已被目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
存储系统中各存储节点的存活状态;The survival status of each storage node in the storage system;
存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,一种实施方式中,存储系统还包括管理节点;Optionally, in an implementation manner, the storage system further includes a management node;
将所得到的切片数据通过SAS网络写入所获取的第一类存储位置(S404)的步骤之后,还可以包括如下步骤:After the step of writing the obtained slice data to the acquired first type storage location (S404) through the SAS network, the method may further include the following steps:
生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括该切片数据与该切片数据对应的第一类存储位置的对应关系和待存储数据与该待存储数据经切片处理得到的各切片数据的对应关系;Generating a storage index of each slice data obtained, wherein the storage index record of one slice data includes a correspondence relationship between the slice type data and the first type of storage location corresponding to the slice data, and the data to be stored and the data to be stored are sliced Processing the corresponding relationship of each slice data;
将所生成的存储索引发送至管理节点。The generated storage index is sent to the management node.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
相应于上述图3对应的方法实施例,本申请实施例还提供一种数据存储装置,应用于存储系统中的目标存储节点,存储系统包括至少两个存储节点,各存储节点之间通过SAS网络连接,目标存储节点为存在待存储数据的存储节点;Corresponding to the method embodiment corresponding to FIG. 3 above, the embodiment of the present application further provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes at least two storage nodes, and each storage node passes through a SAS network. Connection, the target storage node is a storage node having data to be stored;
如图5所示,该装置包括:As shown in Figure 5, the device includes:
第一获取模块510,用于获取待存储数据;The first obtaining module 510 is configured to acquire data to be stored.
切片处理模块520,用于对待存储数据进行切片处理,得到切片数据;The slice processing module 520 is configured to perform slice processing on the data to be stored to obtain slice data.
第一确定模块530,用于确定用于存储所得到的切片数据的第一类存储节点;a first determining module 530, configured to determine a first type of storage node for storing the obtained slice data;
第二获取模块540,用于获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置;a second obtaining module 540, configured to acquire a first type of storage location for storing slice data in the determined first type of storage node;
第一写入模块550,用于将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。The first writing module 550 is configured to write the obtained slice data into the acquired first type of storage location through the SAS network.
可选地,一种实施方式中,第二获取模块540可以包括:Optionally, in an implementation manner, the second obtaining module 540 may include:
第一发送子模块,用于向所确定的第一类存储节点发送第一存储请求;a first sending submodule, configured to send a first storage request to the determined first type of storage node;
第一接收子模块,用于接收所确定的第一类存储节点发送的第一类存储位置,第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。a first receiving submodule, configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined location of the first type of storage node for storing slice data .
可选地,一种实施方式中,第一确定模块530具体用于:Optionally, in an implementation manner, the first determining module 530 is specifically configured to:
根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:A first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
已被目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
存储系统中各存储节点的存活状态;The survival status of each storage node in the storage system;
存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,一种实施方式中,存储系统还可以包括管理节点;装置还可以包括:Optionally, in an implementation manner, the storage system may further include a management node; the device may further include:
第一生成模块,用于生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括该切片数据与该切片数据对应的第一类存储 位置的对应关系和待存储数据与该待存储数据经切片处理得到的各切片数据的对应关系;a first generation module, configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes a correspondence between the slice type data and the first type of storage location corresponding to the slice data, and a data to be stored Corresponding relationship with each slice data obtained by slicing the data to be stored;
第一发送模块,用于将所生成的存储索引发送至管理节点。The first sending module is configured to send the generated storage index to the management node.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
相应于上述图4对应的方法实施例,本申请实施例还提供一种数据存储装置,应用于存储系统中的目标存储节点,存储系统包括:至少两个存储节点、切片服务器,各存储节点之间通过SAS网络连接,目标存储节点为:存储系统所包括的存储节点中接收切片数据的存储节点;Corresponding to the method embodiment corresponding to FIG. 4 above, the embodiment of the present application further provides a data storage device, which is applied to a target storage node in a storage system, where the storage system includes: at least two storage nodes, a slicing server, and each storage node. Connected through the SAS network, the target storage node is: a storage node that receives the slice data in the storage node included in the storage system;
如图6所示,该装置包括:As shown in Figure 6, the device includes:
接收模块610,用于接收切片服务器发送的切片数据,切片数据为:切片服务器对待存储数据进行切片处理得到的数据;The receiving module 610 is configured to receive the slice data sent by the slice server, where the slice data is: the data obtained by the slice server to slice the data to be stored;
第二确定模块620,用于确定用于存储切片数据的第一类存储节点;a second determining module 620, configured to determine a first type of storage node for storing slice data;
第三获取模块630,用于获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置;a third obtaining module 630, configured to acquire a first type of storage location for storing slice data in the determined first type of storage node;
第二写入模块640,用于将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。The second writing module 640 is configured to write the obtained slice data to the acquired first type of storage location through the SAS network.
可选地,一种实施方式中,第三获取模块630可以包括:Optionally, in an implementation manner, the third obtaining module 630 may include:
第二发送子模块,用于向所确定的第一类存储节点发送第一存储请求;a second sending submodule, configured to send a first storage request to the determined first type of storage node;
第二接收子模块,用于接收所确定的第一类存储节点发送的第一类存储位置,第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。a second receiving submodule, configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined location of the first type of storage node for storing slice data .
可选地,一种实施方式中,第二确定模块620具体用于:Optionally, in an implementation manner, the second determining module 620 is specifically configured to:
根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:A first type of storage node for storing slice data is determined according to at least one of the following information:
已被目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
存储系统中各存储节点的存活状态;The survival status of each storage node in the storage system;
存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
可选地,一种实施方式中,存储系统还可以包括管理节点;装置还可以包括:Optionally, in an implementation manner, the storage system may further include a management node; the device may further include:
第二生成模块,用于生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括该切片数据与该切片数据对应的第一类存储位置的对应关系和待存储数据与该待存储数据经切片处理得到的各切片数据的对应关系;a second generation module, configured to generate a storage index of each slice data obtained, where the storage index record of one slice data includes a correspondence between the slice data and a first type of storage location corresponding to the slice data, and a data to be stored Corresponding relationship with each slice data obtained by slicing the data to be stored;
第二发送模块,用于将所生成的存储索引发送至管理节点。And a second sending module, configured to send the generated storage index to the management node.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
本申请实施例还提供了一种电子设备,如图7所示,包括处理器710和存储器720;The embodiment of the present application further provides an electronic device, as shown in FIG. 7, including a processor 710 and a memory 720;
存储器720,用于存放计算机程序;a memory 720, configured to store a computer program;
处理器710,用于执行存储器720上所存放的程序时,实现如下步骤:The processor 710 is configured to perform the following steps when executing the program stored on the memory 720:
获取待存储数据;Obtain data to be stored;
对待存储数据进行切片处理,得到切片数据;Slice the processed data to obtain the sliced data;
确定用于存储所得到的切片数据的第一类存储节点;Determining a first type of storage node for storing the obtained slice data;
获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置;Obtaining a first type of storage location for storing slice data in the determined first type of storage node;
将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。The obtained slice data is written into the acquired first type of storage location through the SAS network.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目 标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
本申请实施例提供的一种电子设备还可以执行上述实施例中任一所述的一种数据存储方法。具体见图3以及图3所对应的实施例,这里不再赘述。An electronic device provided by an embodiment of the present application may further perform a data storage method according to any one of the foregoing embodiments. For details, refer to the embodiments corresponding to FIG. 3 and FIG. 3, and details are not described herein again.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述图3以及图3所对应的实施例中任一所述的一种数据存储方法。In still another embodiment provided by the present application, there is provided a computer readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the above-described FIG. 3 and FIG. A data storage method according to any of the corresponding embodiments.
本申请实施例还提供一种电子设备,可以实现如下步骤:The embodiment of the present application further provides an electronic device, which can implement the following steps:
接收切片服务器发送的切片数据,切片数据为:切片服务器对待存储数据进行切片处理得到的数据;Receiving slice data sent by the slice server, where the slice data is: data obtained by slicing the data to be stored by the slice server;
确定用于存储切片数据的第一类存储节点;Determining a first type of storage node for storing slice data;
获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置;Obtaining a first type of storage location for storing slice data in the determined first type of storage node;
将所得到的切片数据通过SAS网络写入所获取的第一类存储位置。The obtained slice data is written into the acquired first type of storage location through the SAS network.
通过本申请实施例提供的技术方案,将待存储数据进行切片处理后,目标存储节点可以分别将切片处理所得到的切片数据直接写入对应的存储位置,这样,避免了因为数据传输而导致的传输延迟,进而提高了数据存储效率。After the data to be stored is sliced, the target storage node can directly write the slice data obtained by the slice processing to the corresponding storage location, so as to avoid the data transmission. Transmission delay, which in turn increases data storage efficiency.
本申请实施例提供的一种电子设备还可以执行上述实施例中任一所述的一种数据存储方法。具体见图4以及图4所对应的实施例,这里不再赘述。An electronic device provided by an embodiment of the present application may further perform a data storage method according to any one of the foregoing embodiments. For details, refer to the embodiments corresponding to FIG. 4 and FIG. 4, and details are not described herein again.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述图4以及图4所对应的实施例中任一所述的一种数据存储方法。In still another embodiment provided by the present application, there is provided a computer readable storage medium having instructions stored therein, when executed on a computer, causing the computer to perform the above-described FIG. 4 and FIG. 4 A data storage method according to any of the corresponding embodiments.
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the above electronic device and other devices.
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include a random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; or may be a digital signal processing (DSP), dedicated integration. Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this context, relational terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply such entities or operations. There is any such actual relationship or order between them. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional elements in the process, method, item, or device that comprises the element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于方法实施例、装置实施例而言,由于其基本相似于系统实施例,所以描述的比较简单,相关之处参见系统实施例的部分说明即可。The various embodiments in the present specification are described in a related manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the method embodiment and the device embodiment, since it is basically similar to the system embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the system embodiment.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are made within the spirit and principles of the present invention, should be included in the present invention. Within the scope of protection.

Claims (36)

  1. 一种数据存储系统,其特征在于,所述存储系统包括至少两个存储节点,各存储节点之间通过串行连接小型计算机系统接口SAS网络连接;A data storage system, characterized in that the storage system comprises at least two storage nodes, and each storage node is connected by a serial connection small computer system interface SAS network;
    目标存储节点,用于获取待存储数据,对所述待存储数据进行切片处理得到切片数据;确定用于存储所得到的切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置,将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置。a target storage node, configured to acquire data to be stored, perform slice processing on the data to be stored to obtain slice data, determine a first type of storage node for storing the obtained slice data, and obtain the determined first type storage node And storing the first type of storage location of the slice data, and writing the obtained slice data to the acquired first type of storage location through the SAS network.
  2. 根据权利要求1所述的存储系统,其特征在于,所述目标存储节点,获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置,包括:The storage system according to claim 1, wherein the target storage node acquires the first type of storage location for storing slice data in the determined first type of storage node, including:
    所述目标存储节点,用于向所确定的第一类存储节点发送第一存储请求;接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。The target storage node is configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: The location of the determined first type of storage node for storing slice data.
  3. 根据权利要求1所述的存储系统,其特征在于,所述目标存储节点,用于确定用于存储所得到的切片数据的第一类存储节点,包括:The storage system according to claim 1, wherein the target storage node is configured to determine a first type of storage node for storing the obtained slice data, including:
    所述目标存储节点,用于根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:The target storage node is configured to determine a first type of storage node for storing the obtained slice data according to at least one of the following information:
    已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
    所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
    所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
    所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
  4. 根据权利要求1所述的存储系统,其特征在于,所述存储系统还包括管理节点;The storage system according to claim 1, wherein the storage system further comprises a management node;
    所述目标存储节点,用于生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;将所生成的存储索引发送至所述管理节点;The target storage node is configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes: a correspondence relationship between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored; sending the generated storage index to the management node;
    所述管理节点,用于接收并存储所述目标存储节点发送的存储索引。The management node is configured to receive and store a storage index sent by the target storage node.
  5. 根据权利要求4所述的存储系统,其特征在于,A storage system according to claim 4, wherein
    所述管理节点,还用于接收目标客户端针对待读取数据的读取请求,并从所述存储系统包括的存储节点中选择存储节点,作为第二类存储节点;根据本地存储的存储索引,确定所述待读取数据对应的切片数据以及各个切片数据的第二类存储位置,并将所述第二类存储位置发送至所述第二类存储节点;The management node is further configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system as the second type storage node; according to the locally stored storage index Determining the slice data corresponding to the data to be read and the second type of storage location of each slice data, and sending the second type of storage location to the second type of storage node;
    所述第二类存储节点,用于接收所述管理节点发送的所述第二类存储位置,从所述第二类存储位置中读取切片数据,将所读取到的切片数据进行还原处理,得到所述待读取数据,并将所述待读取数据发送至所述目标客户端。The second type of storage node is configured to receive the second type of storage location sent by the management node, read slice data from the second type of storage location, and perform restoration processing on the read slice data. Obtaining the data to be read, and sending the data to be read to the target client.
  6. 根据权利要求4所述的存储系统,其特征在于,A storage system according to claim 4, wherein
    所述管理节点,用于获得故障存储节点的故障位置中所存储数据的数据量,根据所述数据量,从所述存储系统包括的存储节点中选择用于重构所述故障位置所存储数据的存储节点,作为第三类存储节点;The management node is configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a data used to reconstruct the fault location from the storage nodes included in the storage system. Storage node, as a third type of storage node;
    所述第三类存储节点,用于对所述故障位置所存储的数据进行重构,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入所分配的存储位置。The third type of storage node is configured to reconstruct data stored in the fault location, obtain reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated data. storage location.
  7. 根据权利要求6所述的存储系统,其特征在于,A storage system according to claim 6 wherein:
    所述管理节点,具体用于获取所述故障存储节点中的故障位置;根据本地的存储索引,确定所述故障位置对应存储的数据,以及所述故障位置所存储的数据对应的切片数据,并获得所确定的各切片数据对应的存储位置,将所获得的存储位置发送至第三类存储节点,所述第三类存储节点为:根据所述故障位置所存储数据的数据量,从所述存储系统包括的存储节点中,所选择的用于重构所述故障位置所存储数据的存储节点;The management node is specifically configured to acquire a fault location in the fault storage node, and determine, according to a local storage index, data corresponding to the fault location, and slice data corresponding to the data stored in the fault location, and Obtaining a storage location corresponding to each determined slice data, and transmitting the obtained storage location to a third type of storage node, wherein the third type of storage node is: according to the data amount of the data stored in the fault location, from the a storage node selected by the storage system for reconstructing data stored in the fault location;
    所述第三类存储节点,用于接收所述管理节点发送的存储位置,从所接收到的存储位置中读取对应的切片数据,将所读取到的切片数据进行重构处理,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入 所分配的存储位置。The third type storage node is configured to receive a storage location sent by the management node, read corresponding slice data from the received storage location, and perform reconfiguration processing on the read slice data to obtain a weight Constructing data, allocating a storage location for the reconstructed data, and writing the reconstructed data to the allocated storage location.
  8. 一种数据存储系统,其特征在于,所述存储系统包括:切片服务器、至少两个存储节点,各存储节点之间通过串行连接小型计算机系统接口SAS网络连接;A data storage system, characterized in that: the storage system comprises: a slicing server, at least two storage nodes, and each storage node is connected by a serial connection small computer system interface SAS network;
    所述切片服务器,用于获取待存储数据,对所述待存储数据进行切片处理,得到切片数据;从所述至少两个存储节点中确定接收所述切片数据的目标存储节点,将所得到的切片数据发送至所述目标存储节点;The slice server is configured to acquire data to be stored, perform slice processing on the data to be stored, and obtain slice data; determine, from the at least two storage nodes, a target storage node that receives the slice data, and obtain the obtained Sending slice data to the target storage node;
    所述目标存储节点,用于接收所述切片服务器发送的所述切片数据,确定用于存储所述切片数据的第一类存储节点,并获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置,将所述切片数据通过所述SAS网络写入所获取的第一类存储位置。The target storage node is configured to receive the slice data sent by the slice server, determine a first type of storage node used to store the slice data, and acquire the determined first type storage node for storing The first type of storage location of the slice data is written to the acquired first type of storage location by the SAS network.
  9. 根据权利要求8所述的存储系统,其特征在于,所述目标存储节点,获取所确定第一类存储节点中用于存储切片数据的第一类存储位置,包括:The storage system according to claim 8, wherein the target storage node acquires a first type of storage location for storing slice data in the determined first type of storage node, including:
    所述目标存储节点,用于向所确定的第一类存储节点发送第一存储请求;接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。The target storage node is configured to send a first storage request to the determined first type of storage node, and receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: The location of the determined first type of storage node for storing slice data.
  10. 根据权利要求8所述的存储系统,其特征在于,所述目标存储节点,用于确定用于存储切片数据的第一类存储节点,包括:The storage system according to claim 8, wherein the target storage node is configured to determine a first type of storage node for storing slice data, including:
    所述目标存储节点,用于根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:The target storage node is configured to determine a first type of storage node for storing slice data according to at least one of the following information:
    已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
    所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
    所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
    所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
  11. 根据权利要求8所述的存储系统,其特征在于,所述存储系统还包括 第一管理节点;The storage system according to claim 8, wherein the storage system further comprises a first management node;
    所述目标存储节点,用于生成所接收的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;将所生成的存储索引发送至所述第一管理节点;The target storage node is configured to generate a storage index of each of the received slice data, where the storage index record of the slice data includes: a correspondence between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored; sending the generated storage index to the first management node;
    所述第一管理节点,用于接收并存储所述目标存储节点发送的存储索引。The first management node is configured to receive and store a storage index sent by the target storage node.
  12. 根据权利要求11所述的存储系统,其特征在于,A storage system according to claim 11 wherein:
    所述第一管理节点,还用于接收目标客户端针对待读取数据的读取请求,并从所述存储系统包括的存储节点中选择存储节点,作为第二类存储节点;根据本地存储的存储索引,确定所述待读取数据对应的切片数据以及各个切片数据的第二类存储位置,并将所述第二类存储位置发送至所述第二类存储节点;The first management node is further configured to receive a read request of the target client for the data to be read, and select a storage node from the storage nodes included in the storage system as the second type storage node; Storing an index, determining slice data corresponding to the data to be read and a second type of storage location of each slice data, and sending the second type of storage location to the second type of storage node;
    所述第二类存储节点,用于接收所述第一管理节点发送的所述第二类存储位置,从所述第二类存储位置中读取切片数据,将所读取到的切片数据进行还原处理,得到所述待读取数据,并将所述待读取数据发送至所述目标客户端。The second type of storage node is configured to receive the second type of storage location sent by the first management node, read slice data from the second type of storage location, and perform the read slice data. The restoration process is performed to obtain the data to be read, and the data to be read is sent to the target client.
  13. 根据权利要求11所述的存储系统,其特征在于,A storage system according to claim 11 wherein:
    所述第一管理节点,用于获得故障存储节点的故障位置中所存储数据的数据量,根据所述数据量,从所述存储系统包括的存储节点中选择用于重构所述故障位置所存储数据的存储节点,作为第三类存储节点;The first management node is configured to obtain a data amount of data stored in a fault location of the fault storage node, and select, according to the data volume, a storage node included in the storage system for reconstructing the fault location a storage node that stores data as a third type of storage node;
    所述第三类存储节点,用于对所述故障位置所存储的数据进行重构,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入所分配的存储位置。The third type of storage node is configured to reconstruct data stored in the fault location, obtain reconstructed data, allocate a storage location for the reconstructed data, and write the reconstructed data to the allocated data. storage location.
  14. 根据权利要求13所述的存储系统,其特征在于,A storage system according to claim 13 wherein:
    所述第一管理节点,具体用于获取所述故障存储节点中的故障位置;根据本地的存储索引,确定所述故障位置对应存储的数据,以及所述故障位置所存储的数据对应的切片数据,并获得所确定的各切片数据对应的存储位置, 将所获得的存储位置发送至第三类存储节点,所述第三类存储节点为:根据所述故障位置所存储数据的数据量,从所述存储系统包括的存储节点中,所选择的用于重构所述故障位置所存储数据的存储节点;The first management node is specifically configured to acquire a fault location in the fault storage node, and determine, according to a local storage index, data corresponding to the fault location, and slice data corresponding to the data stored in the fault location. And obtaining the determined storage location corresponding to each slice data, and sending the obtained storage location to the third type storage node, wherein the third type storage node is: according to the data amount of the data stored in the fault location, a storage node selected by the storage system for reconstructing data stored in the fault location;
    所述第三类存储节点,用于接收所述第一管理节点发送的存储位置,从所接收到的存储位置中读取对应的切片数据,将所读取到的切片数据进行重构处理,得到重构数据,为所述重构数据分配存储位置,并将所述重构数据写入所分配的存储位置。The storage node of the third type is configured to receive a storage location sent by the first management node, read corresponding slice data from the received storage location, and perform reconstruction processing on the read slice data. Reconstructed data is obtained, a storage location is allocated for the reconstructed data, and the reconstructed data is written to the allocated storage location.
  15. 根据权利要求8所述的存储系统,其特征在于,所述存储系统还包括第二管理节点;The storage system according to claim 8, wherein the storage system further comprises a second management node;
    所述切片服务器,从所述至少两个存储节点中确定接收所述切片数据的目标存储节点,包括:Determining, by the slice server, a target storage node that receives the slice data from the at least two storage nodes, including:
    所述切片服务器,用于向所述第二管理节点发送第二存储请求;The slice server is configured to send a second storage request to the second management node;
    所述第二管理节点,用于接收所述切片服务器发送的所述第二存储请求,从所述存储系统所包括的存储节点中确定目标存储节点,并将所确定的目标存储节点的标识发送至所述切片服务器;The second management node is configured to receive the second storage request sent by the slice server, determine a target storage node from the storage nodes included in the storage system, and send the identifier of the determined target storage node To the slicing server;
    所述切片服务器,用于接收所述第二管理节点发送的所述标识,并确定所述标识对应的所述目标存储节点。The slice server is configured to receive the identifier sent by the second management node, and determine the target storage node corresponding to the identifier.
  16. 根据权利要求15所述的存储系统,其特征在于,所述第二管理节点,从所述存储系统所包括的存储节点中确定目标存储节点,包括:The storage system according to claim 15, wherein the second management node determines the target storage node from the storage nodes included in the storage system, including:
    所述第二管理节点,用于根据以下信息中的至少一种,从所述存储系统所包括的存储节点中确定目标存储节点:The second management node is configured to determine a target storage node from the storage nodes included in the storage system according to at least one of the following information:
    已被所述第二管理节点分配过的存储节点;a storage node that has been allocated by the second management node;
    所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
    所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
    所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
  17. 一种数据存储方法,其特征在于,应用于存储系统中的目标存储节点,所述存储系统包括至少两个存储节点,各存储节点之间通过串行连接小型计算机系统接口SAS网络连接;A data storage method, which is applied to a target storage node in a storage system, the storage system includes at least two storage nodes, and each storage node is connected by a serial connection small computer system interface SAS network;
    所述方法包括:The method includes:
    获取待存储数据;Obtain data to be stored;
    对所述待存储数据进行切片处理,得到切片数据;And performing slice processing on the data to be stored to obtain slice data;
    确定用于存储所得到的切片数据的第一类存储节点;Determining a first type of storage node for storing the obtained slice data;
    获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置;Obtaining, in the determined first type of storage node, a first type of storage location for storing the slice data;
    将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置。The obtained slice data is written into the acquired first type of storage location through the SAS network.
  18. 根据权利要求17所述的方法,其特征在于,所述获取所确定的第一类存储节点中用于存储切片数据的第一类存储位置的步骤,包括:The method according to claim 17, wherein the step of acquiring the first type of storage location for storing slice data in the determined first type of storage node comprises:
    向所确定的第一类存储节点发送第一存储请求;Sending a first storage request to the determined first type of storage node;
    接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。Receiving the determined first type of storage location sent by the first type of storage node, where the first type of storage location is: a location allocated by the first type of storage node for storing slice data.
  19. 根据权利要求17所述的方法,其特征在于,所述确定用于存储所得到的切片数据的第一类存储节点的步骤,包括:The method according to claim 17, wherein said step of determining a first type of storage node for storing the obtained slice data comprises:
    根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:A first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
    已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
    所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
    所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
    所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
  20. 根据权利要求17所述的方法,其特征在于,所述存储系统还包括管理节点;The method of claim 17, wherein the storage system further comprises a management node;
    所述将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置的步骤之后,还包括:After the step of writing the obtained slice data to the acquired first type storage location through the SAS network, the method further includes:
    生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;Generating a storage index of each of the obtained slice data, wherein the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, the data to be stored, and the to-be-stored data Corresponding relationship between each slice data obtained by slicing the data;
    将所生成的存储索引发送至所述管理节点。The generated storage index is sent to the management node.
  21. 一种数据存储方法,其特征在于,应用于存储系统中的目标存储节点,所述存储系统包括:至少两个存储节点、切片服务器,各存储节点之间通过串行连接小型计算机系统接口SAS网络连接;A data storage method is characterized in that it is applied to a target storage node in a storage system, the storage system includes: at least two storage nodes, a slicing server, and each storage node is connected to a small computer system interface SAS network through a serial connection connection;
    所述方法包括:The method includes:
    接收所述切片服务器发送的切片数据,所述切片数据为:所述切片服务器对待存储数据进行切片处理得到的数据;Receiving, by the slice server, slice data sent by the slice server, where the slice server performs slice processing on the data to be stored;
    确定用于存储所述切片数据的第一类存储节点;Determining a first type of storage node for storing the slice data;
    获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置;Obtaining, in the determined first type of storage node, a first type of storage location for storing the slice data;
    将所述切片数据通过所述SAS网络写入所获取的第一类存储位置。The slice data is written to the acquired first type of storage location through the SAS network.
  22. 根据权利要求21所述的方法,其特征在于,所述获取所确定第一类存储节点中用于存储切片数据的第一类存储位置的步骤,包括:The method according to claim 21, wherein the step of acquiring the first type of storage location for storing the slice data in the determined first type of storage node comprises:
    向所确定的第一类存储节点发送第一存储请求;Sending a first storage request to the determined first type of storage node;
    接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。Receiving the determined first type of storage location sent by the first type of storage node, where the first type of storage location is: a location allocated by the first type of storage node for storing slice data.
  23. 根据权利要求21所述的方法,其特征在于,所述确定用于存储切片数据的第一类存储节点的步骤,包括:The method according to claim 21, wherein the step of determining a first type of storage node for storing slice data comprises:
    根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:A first type of storage node for storing slice data is determined according to at least one of the following information:
    已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
    所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
    所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
    所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
  24. 根据权利要求21所述的方法,其特征在于,所述存储系统还包括管理节点;The method of claim 21, wherein the storage system further comprises a management node;
    所述将所述切片数据通过所述SAS网络写入所获取的第一类存储位置的步骤之后,还包括:After the step of writing the slice data to the acquired first type of storage location through the SAS network, the method further includes:
    生成所接收到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;Generating a storage index of each of the received slice data, wherein the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, the data to be stored, and the Corresponding relationship between each slice data obtained by slice processing of the data to be stored;
    将所生成的存储索引发送至所述管理节点。The generated storage index is sent to the management node.
  25. 一种数据存储装置,其特征在于,应用于存储系统中的目标存储节点,所述存储系统包括至少两个存储节点,各存储节点之间通过串行连接小型计算机系统接口SAS网络连接;A data storage device, which is applied to a target storage node in a storage system, the storage system includes at least two storage nodes, and each storage node is connected by a serial connection small computer system interface SAS network;
    所述装置包括:The device includes:
    第一获取模块,用于获取待存储数据;a first acquiring module, configured to acquire data to be stored;
    切片处理模块,用于对所述待存储数据进行切片处理,得到切片数据;a slice processing module, configured to slice the data to be stored to obtain slice data;
    第一确定模块,用于确定用于存储所得到的切片数据的第一类存储节点;a first determining module, configured to determine a first type of storage node for storing the obtained slice data;
    第二获取模块,用于获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置;a second acquiring module, configured to acquire, in the determined first type of storage node, a first type of storage location for storing the slice data;
    第一写入模块,用于将所得到的切片数据通过所述SAS网络写入所获取的第一类存储位置。And a first writing module, configured to write the obtained slice data to the acquired first type of storage location through the SAS network.
  26. 根据权利要求25所述的装置,其特征在于,所述第二获取模块包括:The device according to claim 25, wherein the second obtaining module comprises:
    第一发送子模块,用于向所确定的第一类存储节点发送第一存储请求;a first sending submodule, configured to send a first storage request to the determined first type of storage node;
    第一接收子模块,用于接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。a first receiving submodule, configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined storage of slice data allocated by the first type of storage node s position.
  27. 根据权利要求25所述的装置,其特征在于,所述第一确定模块具体用于:The device according to claim 25, wherein the first determining module is specifically configured to:
    根据以下信息中的至少一种,确定用于存储所得到的切片数据的第一类存储节点:A first type of storage node for storing the obtained slice data is determined according to at least one of the following information:
    已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
    所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
    所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
    所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
  28. 根据权利要求25所述的装置,其特征在于,所述存储系统还包括管理节点;The apparatus according to claim 25, wherein said storage system further comprises a management node;
    所述装置还包括:The device also includes:
    第一生成模块,用于生成所得到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的各切片数据的对应关系;a first generation module, configured to generate a storage index of each of the obtained slice data, where the storage index record of the slice data includes: a correspondence between the slice data and a first type of storage location corresponding to the slice data, Corresponding relationship between the data to be stored and each slice data obtained by slicing the data to be stored;
    第一发送模块,用于将所生成的存储索引发送至所述管理节点。The first sending module is configured to send the generated storage index to the management node.
  29. 一种数据存储装置,其特征在于,应用于存储系统中的目标存储节点,所述存储系统包括:至少两个存储节点、切片服务器,各存储节点之间通过串行连接小型计算机系统接口SAS网络连接;A data storage device is characterized in that it is applied to a target storage node in a storage system, the storage system includes: at least two storage nodes, a slicing server, and each storage node is connected to a small computer system interface SAS network through a serial connection connection;
    所述装置包括:The device includes:
    接收模块,用于接收所述切片服务器发送的切片数据,所述切片数据为:所述切片服务器对待存储数据进行切片处理得到的数据;a receiving module, configured to receive the slice data sent by the slice server, where the slice data is: the data obtained by the slice server to slice the processed data;
    第二确定模块,用于确定用于存储所述切片数据的第一类存储节点;a second determining module, configured to determine a first type of storage node for storing the slice data;
    第三获取模块,用于获取所确定的第一类存储节点中用于存储所述切片数据的第一类存储位置;a third acquiring module, configured to acquire, in the determined first type of storage node, a first type of storage location for storing the slice data;
    第二写入模块,用于将所述切片数据通过所述SAS网络写入所获取的第一类存储位置。And a second writing module, configured to write the slice data to the acquired first type of storage location through the SAS network.
  30. 根据权利要求29所述的装置,其特征在于,所述第三获取模块包括:The device according to claim 29, wherein the third obtaining module comprises:
    第二发送子模块,用于向所确定的第一类存储节点发送第一存储请求;a second sending submodule, configured to send a first storage request to the determined first type of storage node;
    第二接收子模块,用于接收所确定的第一类存储节点发送的第一类存储位置,所述第一类存储位置为:所确定的第一类存储节点所分配的用于存储切片数据的位置。a second receiving submodule, configured to receive the first type of storage location sent by the determined first type of storage node, where the first type of storage location is: the determined storage of slice data allocated by the first type of storage node s position.
  31. 根据权利要求29所述的装置,其特征在于,所述第二确定模块具体用于:The device according to claim 29, wherein the second determining module is specifically configured to:
    根据以下信息中的至少一种,确定用于存储切片数据的第一类存储节点:A first type of storage node for storing slice data is determined according to at least one of the following information:
    已被所述目标存储节点分配过的存储节点;a storage node that has been allocated by the target storage node;
    所述存储系统中各存储节点的存活状态;a survival state of each storage node in the storage system;
    所述存储系统中各存储节点的剩余存储空间;The remaining storage space of each storage node in the storage system;
    所述存储系统中各存储节点的负载压力。The load pressure of each storage node in the storage system.
  32. 根据权利要求29所述的装置,其特征在于,所述存储系统还包括管理节点;The apparatus according to claim 29, wherein said storage system further comprises a management node;
    所述装置还包括:The device also includes:
    第二生成模块,用于生成所接收到的每一切片数据的存储索引,其中,一个切片数据的存储索引记录包括:该切片数据与该切片数据对应的第一类存储位置的对应关系、所述待存储数据与所述待存储数据经切片处理得到的 各切片数据的对应关系;a second generation module, configured to generate a storage index of each of the received slice data, where the storage index record of the slice data includes: a correspondence between the slice data and the first type of storage location corresponding to the slice data, Corresponding relationship between the stored data and each slice data obtained by the slice processing of the data to be stored;
    第二发送模块,用于将所生成的存储索引发送至所述管理节点。And a second sending module, configured to send the generated storage index to the management node.
  33. 一种电子设备,其特征在于,包括处理器和存储器;An electronic device, comprising: a processor and a memory;
    存储器,用于存放计算机程序;a memory for storing a computer program;
    处理器,用于执行存储器上所存放的程序时,实现权利要求17-20任一所述的方法步骤。The processor, when executed to execute a program stored on the memory, implements the method steps of any of claims 17-20.
  34. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求17-20任一所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps of any one of claims 17-20.
  35. 一种电子设备,其特征在于,包括处理器和存储器;An electronic device, comprising: a processor and a memory;
    存储器,用于存放计算机程序;a memory for storing a computer program;
    处理器,用于执行存储器上所存放的程序时,实现权利要求21-24任一所述的方法步骤。The processor, when executed to execute a program stored on the memory, implements the method steps of any of claims 21-24.
  36. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求21-24任一所述的方法步骤。A computer readable storage medium, wherein the computer readable storage medium stores a computer program, the computer program being executed by a processor to implement the method steps of any one of claims 21-24.
PCT/CN2019/075696 2018-03-09 2019-02-21 Data storage system, method and device WO2019170004A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810193323.5 2018-03-09
CN201810193323.5A CN110244904B (en) 2018-03-09 2018-03-09 Data storage system, method and device

Publications (1)

Publication Number Publication Date
WO2019170004A1 true WO2019170004A1 (en) 2019-09-12

Family

ID=67845508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/075696 WO2019170004A1 (en) 2018-03-09 2019-02-21 Data storage system, method and device

Country Status (2)

Country Link
CN (1) CN110244904B (en)
WO (1) WO2019170004A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404980B (en) * 2019-09-29 2023-04-18 杭州海康威视系统技术有限公司 Data storage method and object storage system
CN111399761B (en) * 2019-11-19 2023-06-30 杭州海康威视系统技术有限公司 Storage resource allocation method, device and equipment, and storage medium
CN112486421B (en) * 2020-12-16 2024-05-28 上海达梦数据库有限公司 Data storage method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080201335A1 (en) * 2007-02-20 2008-08-21 Nec Laboratories America, Inc. Method and Apparatus for Storing Data in a Peer to Peer Network
CN102752402A (en) * 2012-07-20 2012-10-24 广东威创视讯科技股份有限公司 Cloud storage method and cloud storage system
CN105025053A (en) * 2014-04-24 2015-11-04 苏宁云商集团股份有限公司 Distributed file upload method based on cloud storage technology and system
CN105872031A (en) * 2016-03-26 2016-08-17 天津书生云科技有限公司 Storage system
CN106657356A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Data writing method and device for cloud storage system, and cloud storage system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7356728B2 (en) * 2004-06-24 2008-04-08 Dell Products L.P. Redundant cluster network
KR100623553B1 (en) * 2004-12-15 2006-10-16 한국정보보호진흥원 A system and a method for detecting intrusion based on distributed storage device
CN102279777B (en) * 2011-08-18 2014-09-03 华为数字技术(成都)有限公司 Method and device for processing data redundancy and distributed storage system
CN102663005B (en) * 2012-03-19 2014-03-26 杭州海康威视数字技术股份有限公司 Mass video file storage system based on cloud computation, analysis method and system thereof
WO2015057240A1 (en) * 2013-10-18 2015-04-23 Hitachi Data Systems Engineering UK Limited Target-driven independent data integrity and redundancy recovery in a shared-nothing distributed storage system
CN105138280B (en) * 2015-07-31 2018-10-19 成都华为技术有限公司 Method for writing data, apparatus and system
CN206178763U (en) * 2016-08-31 2017-05-17 金友兵 A data storage device with high availability

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080201335A1 (en) * 2007-02-20 2008-08-21 Nec Laboratories America, Inc. Method and Apparatus for Storing Data in a Peer to Peer Network
CN102752402A (en) * 2012-07-20 2012-10-24 广东威创视讯科技股份有限公司 Cloud storage method and cloud storage system
CN105025053A (en) * 2014-04-24 2015-11-04 苏宁云商集团股份有限公司 Distributed file upload method based on cloud storage technology and system
CN105872031A (en) * 2016-03-26 2016-08-17 天津书生云科技有限公司 Storage system
CN106657356A (en) * 2016-12-29 2017-05-10 郑州云海信息技术有限公司 Data writing method and device for cloud storage system, and cloud storage system

Also Published As

Publication number Publication date
CN110244904B (en) 2020-08-28
CN110244904A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
US10942828B2 (en) Method for storing data shards, apparatus, and system
CN108139941B (en) Dynamic resource allocation based on network flow control
WO2019170004A1 (en) Data storage system, method and device
CN106210147B (en) Load balancing method and device based on polling
US20210075665A1 (en) Implementing switchover operations between computing nodes
US20190220379A1 (en) Troubleshooting Method, Apparatus, and Device
US20060129615A1 (en) Performing scheduled backups of a backup node associated with a plurality of agent nodes
US20090024823A1 (en) Overlayed separate dma mapping of adapters
JP2005301975A (en) Heartbeat apparatus via remote mirroring link on multi-site and its use method
CN110096220B (en) Distributed storage system, data processing method and storage node
WO2018058941A1 (en) Method for detecting communication status of cluster system, and gateway cluster
US9525729B2 (en) Remote monitoring pool management
CN108696581A (en) Caching method, device, computer equipment and the storage medium of distributed information
CN109873714B (en) Cloud computing node configuration updating method and terminal equipment
WO2018024139A1 (en) Hard disk management method and system
US11886309B2 (en) Cell-based storage system with failure isolation
CN108512753B (en) Method and device for transmitting messages in cluster file system
US9952951B2 (en) Preserving coredump data during switchover operation
US10200462B2 (en) Memory system including plurality of server nodes sharing storage array and operating method of memory system
EP3188029A1 (en) Management and dispatching apparatus, system, and method based on sas
US20080250421A1 (en) Data Processing System And Method
US20090300436A1 (en) Synchronizing device error information among nodes
CN115378853B (en) Network monitoring method, device and equipment
CN107491270B (en) Resource access method and device of multi-control storage system
WO2019170133A1 (en) Data storage method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19764270

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19764270

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19764270

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19.03.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19764270

Country of ref document: EP

Kind code of ref document: A1