Information determination method, first storage server and storage medium

文档序号:1952031 发布日期:2021-12-10 浏览:3次 中文

阅读说明:本技术 一种信息确定方法、第一存储服务器及存储介质 (Information determination method, first storage server and storage medium ) 是由 韦新伟 张天旭 于 2021-08-16 设计创作,主要内容包括:本申请实施例公开了一种信息确定方法,该方法包括:接收信息处理设备发送的用于确定存储待处理数据的目标磁盘的处理请求;基于处理请求,获取机架的第一运行参数、机架的存储服务器的第二运行参数、存储服务器的磁盘的第三运行参数;其中,第一存储服务器是从多个存储服务器中确定的用于管理存储服务器的;基于第一运行参数、第二运行参数和第三运行参数,从磁盘中确定目标磁盘;发送目标磁盘所在的第二存储服务器的标识以及目标磁盘的位置至信息处理设备。本申请实施例同时还公开了一种第一存储服务器及存储介质。(The embodiment of the application discloses an information determination method, which comprises the following steps: receiving a processing request sent by information processing equipment and used for determining a target disk for storing data to be processed; acquiring a first operating parameter of the rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of storage servers for managing the storage servers; determining a target disk from the disks based on the first operating parameter, the second operating parameter and the third operating parameter; and sending the identification of the second storage server where the target disk is located and the position of the target disk to the information processing equipment. The embodiment of the application also discloses a first storage server and a storage medium.)

1. An information determination method applied to a first storage server is characterized by comprising the following steps:

receiving a processing request sent by information processing equipment and used for determining a target disk for storing data to be processed;

acquiring a first operating parameter of a rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of the storage servers for managing the storage servers;

determining the target disk from the disks based on the first operating parameter, the second operating parameter, and the third operating parameter;

and sending the identification of the second storage server where the target disk is located and the position of the target disk to the information processing equipment.

2. The method of claim 1, wherein determining the target disk from the disks based on the first operating parameter, the second operating parameter, and a third operating parameter comprises:

determining a disk to be selected from the disks based on the first operating parameter and the second operating parameter;

and determining the target disk from the disks to be selected based on the third operating parameter.

3. The method of claim 2, wherein determining the candidate disks from the disks based on the first operating parameter and the second operating parameter comprises:

determining a target rack from the racks based on the first operating parameter of each of the racks;

determining a second storage server from the storage servers of each of the target racks based on a second operating parameter of each of the storage servers;

and determining that the disk in the second storage server is the disk to be selected.

4. The method of claim 3, wherein said determining a target rack from said racks based on the first operating parameter for each of said racks comprises:

determining a first remaining storage capacity for each of the racks based on a first operating parameter for each of the racks;

determining at least three of the target racks from a plurality of racks based on the first remaining storage capacity.

5. The method of claim 4, wherein determining the second storage server from the storage servers of each of the target racks based on the second operating parameter of each of the storage servers comprises:

determining a second remaining storage capacity of each storage server in each of the target racks based on a second operating parameter of each storage server;

for each of the target racks, determining the second storage server from the storage servers in the target rack based on the second remaining storage capacity.

6. The method of claim 5, wherein the determining the target disk from the candidate disks based on the third operating parameter comprises:

determining a third remaining storage capacity of the disks in each of the second storage servers based on the third operating parameter;

for each second storage server, determining the target disk from disks in the second storage server based on the third remaining storage capacity.

7. The method of claim 6, wherein determining at least three of the target racks from a plurality of racks based on the first remaining storage capacity comprises:

determining at least any three racks from among the plurality of racks as the target rack in a case where the first remaining storage capacity ratios determined based on the first remaining storage capacities are the same;

correspondingly, the determining, for each of the target racks, the second storage server from the storage servers in the target rack based on the second remaining storage capacity includes:

for each of the target racks, determining any storage server from among the storage servers in the target rack as the second storage server if a second remaining storage capacity ratio determined based on the second remaining storage capacity of each storage server in each of the target racks is the same;

correspondingly, the determining, for each of the second storage servers, the target disk from the disks in the second storage server based on the third remaining storage capacity includes:

and for each second storage server, determining any disk from the disks in the second storage server as the target disk under the condition that a third remaining storage capacity ratio determined based on a third remaining storage capacity of the disk in each second storage server is the same.

8. The method of claim 1, wherein after determining the target disk from the disks based on the first operating parameter, the second operating parameter, and a third operating parameter, the method further comprises:

determining a fourth remaining storage capacity of the target rack, a fifth remaining storage capacity of the second storage server and a sixth remaining storage capacity of the target disk based on the third remaining storage capacity of the target disk and the size of the data to be processed;

updating a first operating parameter of the target rack based on the fourth remaining storage capacity;

updating a second operating parameter of the second storage server based on the fifth remaining storage capacity;

updating a third operational parameter of the target disk based on the sixth remaining storage capacity.

9. A first storage server, the first storage server comprising: a processor, a memory, and a communication bus;

the communication bus is used for realizing communication connection between the processor and the memory;

the processor is used for executing the information determination program stored in the memory to realize the following steps:

receiving a processing request sent by information processing equipment and used for determining a target disk for storing data to be processed;

acquiring a first operating parameter of a rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of the storage servers for managing the storage servers;

determining the target disk from the disks based on the first operating parameter, the second operating parameter, and a third operating parameter;

and sending the identification of the second storage server where the target disk is located and the position of the target disk to the information processing equipment.

10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the information determination method according to any one of claims 1 to 8.

Technical Field

The present application relates to information determination technologies in the field of information determination, and in particular, to an information determination method, a first storage server, and a storage medium.

Background

With the rapid development of the internet, higher demands are made on distributed storage. In the existing distributed storage system, a hash algorithm and a Controlled Replication distributed hash (CRUSH) algorithm are mainly used to determine a target disk storing data to be processed according to the number of disks, but the load in the distributed storage system is unbalanced due to the current mode of determining the target disk, which easily causes resource waste.

Disclosure of Invention

In order to solve the above technical problem, an information determining method, a first storage server, and a storage medium are desired in the embodiments of the present application, so as to solve the problem of load imbalance caused by determining a target disk in a distributed storage system, and improve load balance.

An information determination method is applied to a first storage server, and comprises the following steps:

receiving a processing request sent by information processing equipment and used for determining a target disk for storing data to be processed;

acquiring a first operating parameter of a rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of the storage servers for managing the storage servers;

determining the target disk from the disks based on the first operating parameter, the second operating parameter, and a third operating parameter;

and sending the identification of the second storage server where the target disk is located and the position of the target disk to the information processing equipment.

In the foregoing solution, the determining the target disk from the disks based on the first operating parameter, the second operating parameter, and the third operating parameter includes:

determining a disk to be selected from the disks based on the first operating parameter and the second operating parameter;

and determining the target disk from the disks to be selected based on the third operating parameter.

In the foregoing solution, the determining a disk to be selected from the disks based on the first operating parameter and the second operating parameter includes:

determining a target rack from the racks based on the first operating parameter of each of the racks;

determining a second storage server from the storage servers of each of the target racks based on a second operating parameter of each of the storage servers;

and determining that the disk in the second storage server is the disk to be selected.

In the foregoing solution, the determining a target rack from the racks based on the first operating parameter of each rack includes:

determining a first remaining storage capacity for each of the racks based on a first operating parameter for each of the racks;

determining at least three of the target racks from a plurality of racks based on the first remaining storage capacity.

In the above solution, the determining the second storage server from the storage servers of each target rack based on the second operating parameter of each storage server includes:

determining a second remaining storage capacity of each storage server in each of the target racks based on a second operating parameter of each storage server;

for each of the target racks, determining the second storage server from the storage servers in the target rack based on the second remaining storage capacity.

In the foregoing solution, the determining the target disk from the disks to be selected based on the third operating parameter includes:

determining a third remaining storage capacity of the disks in each of the second storage servers based on the third operating parameter;

for each second storage server, determining the target disk from disks in the second storage server based on the third remaining storage capacity.

In the foregoing solution, the determining at least three target racks from a plurality of racks based on the first remaining storage capacity includes:

in a case where the first remaining storage capacity ratio determined based on the first remaining storage capacity is the same, at least any three racks are determined as the target rack from among the plurality of racks.

In the above solution, the determining, for each of the target racks, the second storage server from the storage servers in the target rack based on the second remaining storage capacity includes:

for each of the target racks, determining any storage server from among the storage servers in the target rack as the second storage server if a second remaining storage capacity ratio determined based on the second remaining storage capacity of each storage server in each of the target racks is the same.

In the foregoing solution, the determining, for each second storage server, the target disk from the disks in the second storage server based on the third remaining storage capacity includes:

and for each second storage server, determining any disk from the disks in the second storage server as the target disk under the condition that a third remaining storage capacity ratio determined based on a third remaining storage capacity of the disk in each second storage server is the same.

In the foregoing solution, after determining the target disk from the disks based on the first operating parameter, the second operating parameter, and the third operating parameter, the method further includes:

determining a fourth remaining storage capacity of the target rack, a fifth remaining storage capacity of the second storage server and a sixth remaining storage capacity of the target disk based on the third remaining storage capacity of the target disk and the size of the data to be processed;

updating a first operating parameter of the target rack based on the fourth remaining storage capacity;

updating a second operating parameter of the second storage server based on the fifth remaining storage capacity;

updating a third operational parameter of the target disk based on the sixth remaining storage capacity.

A first storage server, the first storage server comprising: a processor, a memory, and a communication bus;

the communication bus is used for realizing communication connection between the processor and the memory;

the processor is used for executing the information determination program stored in the memory to realize the following steps:

receiving a processing request sent by information processing equipment and used for determining a target disk for storing data to be processed;

acquiring a first operating parameter of a rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of the storage servers for managing the storage servers;

determining the target disk from the disks based on the first operating parameter, the second operating parameter, and a third operating parameter;

and sending the identification of the second storage server where the target disk is located and the position of the target disk to the information processing equipment.

A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of the above-described information determination method.

The information determining method, the first storage server and the storage medium provided by the embodiment of the application receive a processing request sent by information processing equipment and used for determining a target disk for storing data to be processed; acquiring a first operating parameter of the rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of storage servers for managing the storage servers; determining a target disk from the disks based on the first operating parameter, the second operating parameter and the third operating parameter; the identification of the second storage server where the target disk is located and the position of the target disk are sent to the information processing equipment, so that the target disk is determined by considering respective running states of the rack in the distributed storage system, the storage server of the rack and the disk in the storage server, the problems of capacity unbalance and load unbalance of the disk caused when the target disk is determined in the distributed storage system in the related technology are solved, and the load and the balance and reliability of the capacity are improved.

Drawings

Fig. 1 is a schematic flowchart of an information determining method according to an embodiment of the present application;

fig. 2 is a schematic diagram of an information processing framework of an information determining method according to an embodiment of the present application;

fig. 3 is a schematic flowchart of an information determining method according to an embodiment of the present application;

fig. 4 is a schematic diagram of a cluster structure of an information determination method provided in an embodiment of the present application;

fig. 5 is a schematic diagram of a cluster structure of an information determination method provided in an embodiment of the present application;

fig. 6 is a schematic structural diagram of a first storage server according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.

An embodiment of the present application provides an information determining method, which is applied to a first storage server, and as shown in fig. 1, the method includes the following steps:

step 101, receiving a processing request sent by an information processing device for determining a target disk storing data to be processed.

In the embodiment of the present application, the information processing apparatus may be an apparatus having information processing and storing functions; the processing request may be a request generated by the information processing apparatus from the data to be processed. The first storage server is used for managing the storage servers and is determined from the plurality of storage servers, the corresponding relations among the disks, the storage servers and the racks are stored in the first storage server, and the storage server where each disk is located and the rack corresponding to the storage server can be determined according to the corresponding relations.

In a possible implementation manner, the processing request initiated by the virtual machine created on the information processing device according to the data to be processed may be; in another possible implementation, it may be a processing request initiated by a client on the information processing device according to the data to be processed.

When a virtual machine created on the information processing device accesses a disk in a first storage server, the virtual machine needs to access the disk in the first storage server according to an Interface and an Application Programming Interface (API) calculated and stored on the first storage server; when the client on the information processing device accesses the disk in the first storage server, the client can directly access the disk in the first storage server by modifying the interface parameters of the client. In one possible implementation, the interface for computation and storage may be referred to as a SCSI target frame, TCT for short.

As shown in fig. 2, two ways of accessing the disk of the first storage server are given, the first way: a virtual machine created on the information processing device can access a disk in the first storage server through a computing and storage interface and an application program interface; the second mode is as follows: the client on the information processing device may also modify its own interface parameters to access the disk in the first storage server.

It should be noted that, as shown in fig. 2, the number of the first storage servers may be three, any one of the three first storage servers may be used as a main storage server, the main storage server receives a processing request of the information processing apparatus, and processes the processing request, and the main storage server may implement data synchronization with partitions of the disks in the other two first storage servers through a raft protocol.

And 102, acquiring a first operating parameter of the rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request.

The first operation parameter represents the operation state of a rack, and the rack is a cabinet for storing the storage server; the second operating parameter characterizes an operating state of a storage server of the rack; the third operational parameter characterizes an operational state of a disk of the storage server. The first operating parameter includes, but is not limited to, a remaining storage capacity of the rack and an operating number of storage servers in the rack; the second operational parameter includes, but is not limited to, a remaining storage capacity of the storage servers of the rack and an operational number of disks in the storage servers; the third operational parameter includes, but is not limited to, the remaining storage capacity of the disk of the storage server and the number of partitions in the disk.

In this embodiment of the application, the first operating parameter, the second operating parameter, and the third operating parameter may be that the rack, a storage server of the rack, and a disk of the storage server are actively reported to the first storage server according to a preset period; the first storage server may also generate an acquisition instruction for the processing request after receiving the processing request, and send the acquisition instruction to the rack, the storage server, and the disk, respectively, so that the rack, the storage server, and the disk send their own operating parameters to the first storage server based on the acquisition instruction.

And 103, determining a target disk from the disks based on the first operating parameter, the second operating parameter and the third operating parameter.

In this embodiment of the application, the first storage server may filter the rack, the storage servers in the rack, and the disks in the storage servers according to the first operating parameter, the second operating parameter, and the third operating parameter, and may finally determine the target disk. Therefore, the target disk is determined by considering the respective running states of the rack in the distributed storage system, the storage server of the rack and the disk in the storage server, the problems of capacity unbalance and load unbalance of each disk in the distributed storage system in the related technology are solved, and the load, the capacity balance and the reliability are improved.

It should be noted that, when a certain target disk fails, only a target disk needs to be determined again, and data of the failed disk is migrated to the newly determined target disk; instead of determining the target disk by adopting a hash algorithm and a CRUSH algorithm as in the related art, when the target disk fails, data in a plurality of disks in the cluster need to be changed to realize data migration in the failed disk, so that the data migration amount when the target disk fails is reduced, and the data recovery rate is improved.

And step 104, sending the identification of the second storage server where the target disk is located and the position of the target disk to the information processing device.

The second storage server is determined from a plurality of storage servers, and the second storage server may be the same as or different from the first storage server.

In this embodiment of the application, the first storage server may determine, according to a correspondence between the disk, the storage server, and the rack, an identifier of the second storage server where the target disk is located and a position of the target disk in the second storage server, and send the identifier of the second storage server where the target disk is located and the position of the target disk in the second storage server to the information processing apparatus, so that the information processing apparatus stores the data to be processed in the target disk in the second storage server.

In a feasible implementation manner, if the number of the target disks is multiple, the information processing apparatus may send the data to be processed to the second storage server where each target disk is located based on the identifier of each second storage server where each target disk is located and the position of each target disk, so that each second storage server stores the data to be processed in its own target disk.

In another possible implementation manner, if the number of the target disks is multiple, the first storage server may send the identifier of the second storage server where each target disk is located and the location of the second storage server where each target disk is located to the information processing apparatus, the information processing apparatus may randomly select one target disk from the multiple target disks as the primary disk, and send a storage request to the second storage server where the primary disk is located, wherein, the storage request comprises the data to be processed, the position of the primary disk, the identification of the second storage server where the primary disk is located, the identification of the second storage server where other target disks except the primary disk are located in the target disk, and the positions of other target disks, and the second storage server stores the data to be processed to the main disk, and the second storage server where the main disk is located can synchronize the data to be processed to other target disks through a raft protocol. The primary disk may be determined by the first storage server from the three target disks, and the notification information may be sent to the information processing apparatus.

The information determining method provided by the embodiment of the application receives a processing request which is sent by information processing equipment and used for determining a target disk for storing data to be processed; acquiring a first operating parameter of the rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of storage servers for managing the storage servers; determining a target disk from the disks based on the first operating parameter, the second operating parameter and the third operating parameter; the identification of the second storage server where the target disk is located and the position of the target disk are sent to the information processing equipment, so that the target disk is determined by considering respective running states of the rack in the distributed storage system, the storage server of the rack and the disk in the storage server, the problems of capacity unbalance and load unbalance of the disk caused when the target disk is determined in the distributed storage system in the related technology are solved, and the load and the balance and reliability of the capacity are improved.

Based on the foregoing embodiments, an embodiment of the present application provides an information determining method, which is shown in fig. 3 and includes the following steps:

step 201, a first storage server receives a processing request sent by an information processing device for determining a target disk for storing data to be processed.

Step 202, the first storage server obtains a first operating parameter of the rack, a second operating parameter of the storage server of the rack, and a third operating parameter of the disk of the storage server based on the processing request.

Wherein the first storage server is determined from the plurality of storage servers for managing the storage servers.

And step 203, the first storage server determines a disk to be selected from the disks based on the first operating parameter and the second operating parameter.

In this embodiment of the application, the racks and the storage servers of the racks may be sequentially screened according to the first operating parameter and the second operating parameter, the target rack and the second storage server in the target rack are determined from the screening, and the disk to be selected is determined from the plurality of disks based on the second storage server. The number of the disks to be selected is multiple.

Wherein, the step 203 can be realized by the steps a1-a 3:

a1, the first storage server determines a target rack from the racks based on the first operating parameter for each rack.

Wherein, the frame is the rack that is used for depositing storage server.

In this embodiment of the application, the plurality of racks may be screened based on the first operating parameter of each rack to obtain the target rack.

In one possible implementation, the storage performance of each rack may be determined based on the first operating parameter of each rack, and the plurality of racks may be screened to determine the target rack based on the storage performance of each rack.

Wherein, the step a1 can be realized by b1-b 2:

b1, the first storage server determines a first remaining storage capacity for each rack based on the first operating parameter for each rack.

Wherein the first remaining storage capacity refers to a sum of remaining storage capacities of disks of the storage server in the rack.

In an embodiment of the present application, a first operating parameter of each rack may be analyzed to determine a first remaining storage capacity of the first rack from the first operating parameter.

In one possible implementation, as shown in FIG. 4, a cluster of a distributed storage system has four racks, each rack having two storage servers, each storage server having three disks; the first remaining storage capacity of each rack refers to the sum of the remaining storage capacities of the six disks corresponding to the two storage servers in each rack.

b2, the first storage server determines at least three target racks from the plurality of racks based on the first remaining storage capacity.

In this embodiment, the first remaining storage capacity ratio of each rack may be calculated based on the first remaining storage capacity of each rack, the first remaining storage capacity ratios may be sorted from large to small, and the rack with the first remaining storage capacity ratio sorted three times as the target rack may be determined from the plurality of racks. The first remaining storage capacity ratio is a ratio of the first remaining storage capacity to the storage capacity of the rack, the storage capacity of the rack is a sum of capacities of all disks of all storage servers of the rack, and the storage capacity of each rack is pre-stored in the first storage server.

Wherein, b2 can be realized by b 21:

b21, when the first remaining storage capacity ratio determined based on the first remaining storage capacity is the same, the first storage server determines at least any three racks as target racks from the plurality of racks.

In a case where it is determined that the first remaining storage capacity ratio of each of the racks is the same, at least three of the plurality of racks may be arbitrarily selected as target racks for subsequent determination of target disks based on the target racks.

It should be noted that, under the condition that the first remaining storage capacity ratio is the same, any three racks are randomly determined as target racks, so that the distribution of clusters in the distributed storage system is fully utilized, the randomness of determining the target racks is ensured, and further, the load balance in the distributed storage system can be realized.

a2, the first storage server determines a second storage server from the storage servers of each target rack based on the second operating parameter of each storage server.

In this embodiment, the second operating parameter of the storage server of the target rack may be determined from the second operating parameter of each storage server, the storage servers of the target rack are filtered based on the second operating parameter of the storage server of the target rack, and the second storage server is determined from the storage servers of the target rack.

Wherein, the step a2 can be realized by the steps b1-b 2:

b1, the first storage server determines a second remaining storage capacity of each storage server in each destination rack based on the second operating parameter of each storage server.

Wherein the second remaining storage capacity refers to the remaining storage capacity of the disks of each storage server in the target rack.

In this embodiment, the second operating parameter of the storage server in the target rack may be determined from the second operating parameter of each storage server, and the second operating parameter of the storage server in the target rack may be analyzed to determine the second remaining storage capacity of each storage server in the target rack.

In one possible implementation, as shown in fig. 4, if any determined target rack is rack 1, the second remaining storage capacity is the sum of the remaining storage capacities of the three disks under the storage server 1, and the sum of the remaining storage capacities of the three disks under the storage server 2.

b2, the first storage server determines, for each target rack, a second storage server from the storage servers in the target rack based on the second remaining storage capacity.

In the embodiment of the application, a second remaining storage capacity ratio of the storage servers in each target rack is calculated based on the second remaining storage capacity, the second remaining storage capacity ratios of the storage servers in the target racks are sorted from large to small for each target rack, and the storage server with the largest second remaining storage capacity ratio is determined from the storage servers of each target rack as the second storage server.

The second remaining storage capacity ratio is a ratio of a second remaining storage capacity of a certain storage server of the target rack to the storage capacity of the storage server, and the storage capacity of the storage server of the target rack is the sum of the capacities of the disks of the storage server.

Wherein, b2 can be realized by b 22:

b22, the first storage server determines any storage server as the second storage server from the storage servers in the target rack under the condition that the second remaining storage capacity ratio determined based on the second remaining storage capacity of each storage server in each target rack is the same for each target rack.

In this embodiment, for any target rack, if the second remaining storage capacity ratios of each storage server in the target rack are the same, any storage server in the storage servers of the target rack may be used as the second storage server.

It should be noted that, under the condition that the second remaining storage capacity ratio is the same, randomly determining any storage server of the target rack as the second storage server ensures the randomness of determining the second storage server, and further, can implement load balancing in the distributed storage system.

a3, the first storage server determines that the disk in the second storage server is the disk to be selected.

In this embodiment, all the disks in the second storage server may be taken as candidate disks.

And step 204, the first storage server determines a target disk from the disks to be selected based on the third operation parameter.

In this embodiment of the application, the multiple disks to be selected may be screened based on the third operating parameter, so as to obtain the target disk.

In a feasible implementation manner, according to the third operation parameter, Input/Output Per Second (IOPS) Output of the disk to be selected, throughput of the disk to be selected, and remaining storage capacity of the disk may be determined, and the multiple disks to be selected are screened based on at least one of the IOPS of the disk to be selected, the throughput of the disk, and the remaining storage capacity of the disk to be selected, so as to obtain the target disk.

Wherein step 204 can be realized by the following steps c1-c 2:

c1, the first storage server determining a third remaining storage capacity of the disks in each second storage server based on the third operational parameter.

In this embodiment of the application, the third operating parameter of the disk in each second storage server may be determined from the third operating parameters, and the third operating parameter of the disk in each second storage server may be analyzed to determine the third remaining storage capacity of the disk in each second storage server.

In a possible implementation manner, as shown in fig. 4, if any one of the second storage servers is the storage server 1, the third remaining storage capacity refers to the remaining storage capacity of the disk 1, the remaining storage capacity of the disk 2, and the remaining storage capacity of the disk 3.

c2, the first storage server determines a target disk from the disks in the second storage server based on the third remaining storage capacity for each second storage server.

In this embodiment of the application, the third remaining storage capacity ratio of each disk in the second storage server may be determined according to the third remaining storage capacity, and a disk corresponding to the maximum third remaining storage capacity ratio may be taken as the target disk.

In a possible implementation manner, if the storage server 1 is a second storage server, the third remaining storage capacity ratio of the disk 1, the third remaining storage capacity ratio of the disk 2, and the third remaining storage capacity ratio of the disk 3 may be calculated, the three third remaining storage capacity ratios are sorted from large to small, a maximum third remaining storage capacity ratio is determined from the three third remaining storage capacity ratios, and a disk corresponding to the maximum third remaining storage capacity ratio is used as a target disk.

It should be noted that the number of the target disks, the number of the second storage servers, and the number of the target racks correspond to each other; in one possible implementation, the number of the target disks, the number of the second storage servers, and the number of the target racks are all 3; the target rack of the second storage server where each target disk is located is different from the target racks of the second storage servers where other target disks are located.

Wherein, step c2 can be further implemented by c 22:

c22, the first storage server determines any disk as the target disk from the disks in the second storage server when the third remaining storage capacity ratio determined based on the third remaining storage capacity of the disk in each second storage server is the same for each second storage server.

In this embodiment, if the third remaining storage capacity ratios of each disk of the second storage server are the same, any disk in the second storage server is taken as the target disk.

It should be noted that, under the condition that the third remaining storage capacity ratio is the same, randomly selecting any disk in the second storage server as the target disk, so as to ensure randomness of the target disk, further implement load balancing in the distributed storage system, and when any target disk fails, fully utilize bandwidth of the disks in the cluster to implement failure recovery.

Step 205, the first storage server determines a fourth remaining storage capacity of the target rack, a fifth remaining storage capacity of the second storage server, and a sixth remaining storage capacity of the target disk based on the third remaining storage capacity of the target disk and the size of the data to be processed.

In this embodiment of the application, a sixth remaining storage capacity in the target disk may be calculated according to the third remaining storage capacity of the target disk and the size of the data to be processed, and based on the sixth remaining storage capacity in the target disk, a fifth remaining storage capacity of a second storage server where the target disk is located and a fourth remaining storage capacity of a target rack where the second storage server is located may be determined. And the sixth storage capacity is the size obtained by subtracting the data to be processed from the third residual storage capacity.

And step 206, the first storage server updates the first operation parameter of the target rack based on the fourth residual storage capacity.

The first operating parameter of the target rack may further include a first remaining storage capacity of the target rack.

In the embodiment of the present application, the first remaining storage capacity of the target rack may be updated based on the fourth remaining storage capacity, and the first remaining storage ratio of the target rack may be updated based on the first remaining storage capacity.

And step 207, the first storage server updates the second operation parameter of the second storage server based on the fifth residual storage capacity.

And the second operation parameter of the second storage server comprises a second residual storage capacity of the second storage server.

In the embodiment of the present application, the second remaining storage capacity of the second storage server may be updated based on the fifth remaining storage capacity, and the second remaining storage capacity ratio of the second storage server may be updated based on the second remaining storage capacity.

And step 208, the first storage server updates the third operation parameter of the target disk based on the sixth residual storage capacity.

In the embodiment of the present application, the third remaining storage capacity of the target disk may be updated based on the sixth remaining storage capacity, and the third remaining storage capacity ratio of the second storage server may be updated based on the third remaining storage capacity.

In a possible implementation manner, as shown in fig. 5, if the number of target disks to be determined is three, one rack may be determined from the four racks as a first target rack according to the first remaining storage capacity of the four racks, if the selected first target rack is the rack 1, a second storage server may be determined from the storage server 1 and the storage server 2 according to the second remaining storage capacity ratio of the storage server 1 corresponding to the rack 1 and the second remaining storage capacity ratio of the storage server 2, if the second storage server is the storage server 1, a disk with the largest third remaining storage capacity ratio may be determined as the first target disk according to the third remaining storage capacity ratio of the disk 1 corresponding to the storage server 1, the third remaining storage capacity ratio of the disk 2, and the third remaining storage capacity ratio of the disk 3, and updating the first remaining storage capacity ratio, the second remaining storage capacity ratio and the third remaining storage capacity ratio according to the size of the data to be processed carried in the processing request and the third remaining storage capacity of the target disk, then determining a second target rack from other racks except the first target rack, determining a second storage server in a storage server of the second target rack, then determining a second target disk in a disk corresponding to the second storage server of the second target rack, determining a third target rack from other racks except the first target rack and the second target rack, and determining a third target disk in the same way as the first target disk and the second target disk. Similarly, after each target disk is determined, the third remaining storage capacity ratio of the target disk, the second remaining storage capacity ratio of the second storage server where the target disk is located, and the first remaining storage capacity ratio of the target rack where the second storage server is located need to be updated. Host in fig. 4 refers to a storage server.

The number of partitions in the cluster may be determined by the size of the partitions, the size of the disks, and the number of disks. In one possible implementation, if the size of the partition in the cluster is set to 100G, the number of disks is 3, and the size of the disk is 2T, the number of partitions allocated in the cluster may be 2 × 1024 × 3/100/3 — 20. Where "2 × 1024 × 3" indicates the size (capacity) of 3 2T disks, "100" indicates the size of a set partition, "3" indicates three target disks, and "20" indicates that 20 partitions need to be allocated among 3 2T disks.

And step 209, the first storage server sends the identifier of the second storage server where the target disk is located and the position of the target disk to the information processing device.

It should be noted that, for the descriptions of the same steps and the same contents in this embodiment as those in other embodiments, reference may be made to the descriptions in other embodiments, which are not described herein again.

The information determining method provided by the embodiment of the application considers the respective running states of the rack in the distributed storage system, the storage server of the rack and the disk in the storage server to determine the target disk, solves the problems of capacity unbalance and load unbalance of the disk caused when the target disk is determined in the distributed storage system in the related technology, and improves the load, the capacity balance and the reliability.

Based on the foregoing embodiments, an embodiment of the present application provides a first storage server, where the first storage server 4 may be applied to the information determining method provided in the embodiments corresponding to fig. 1 and fig. 3, and as shown in fig. 6, the first storage server 4 may include: a processor 41, a memory 42, and a communication bus 43, wherein:

the communication bus 33 is used for realizing communication connection between the processor 41 and the memory 42;

the processor 41 is configured to execute the information determination program in the memory 42 to implement the following steps:

receiving a processing request sent by information processing equipment and used for determining a target disk for storing data to be processed;

acquiring a first operating parameter of the rack, a second operating parameter of a storage server of the rack and a third operating parameter of a disk of the storage server based on the processing request; wherein the first storage server is determined from a plurality of storage servers for managing the storage servers;

determining a target disk from the disks based on the first operating parameter, the second operating parameter and the third operating parameter;

and sending the identification of the second storage server where the target disk is located and the position of the target disk to the information processing equipment.

In other embodiments of the present application, the processor 41 is configured to execute the following steps in the memory 42 to determine a target disk from the disks based on the first operating parameter, the second operating parameter, and the third operating parameter:

determining a disk to be selected from the disks based on the first operating parameter and the second operating parameter;

and determining the target disk from the disks to be selected based on the third operating parameter.

In other embodiments of the present application, the processor 41 is configured to execute the following steps in the memory 42 to determine a candidate disk from the disks based on the first operating parameter and the second operating parameter:

determining a target rack from the racks based on the first operating parameter for each rack;

determining a second storage server from the storage servers of each target rack based on the second operating parameter of each storage server;

and determining the disk in the second storage server as the disk to be selected.

In other embodiments of the present application, the processor 41 is configured to execute the first operating parameter of each rack in the memory 42 to determine a target rack from the racks, so as to implement the following steps:

determining a first remaining storage capacity for each rack based on a first operating parameter for each rack;

at least three target racks are determined from the plurality of racks based on the first remaining storage capacity.

In other embodiments of the present application, the processor 41 is configured to execute the second operation parameter in the memory 42 based on each storage server to determine a second storage server from the storage servers of each target rack, so as to implement the following steps:

determining a second remaining storage capacity of each storage server in each target rack based on the second operating parameter of each storage server;

for each target rack, a second storage server is determined from the storage servers in the target rack based on the second remaining storage capacity.

In other embodiments of the present application, the processor 41 is configured to execute the following steps to determine a target disk from the candidate disks in the memory 42 based on the third operating parameter:

determining a third remaining storage capacity of the disks in each second storage server based on the third operating parameter;

and for each second storage server, determining a target disk from the disks in the second storage server based on the third remaining storage capacity.

In other embodiments of the present application, the processor 41 is configured to execute the information determination program in the memory 42, and is further configured to implement the following steps:

determining a fourth residual storage capacity of the target rack, a fifth residual storage capacity of the second storage server and a sixth residual storage capacity of the target disk based on the third residual storage capacity of the target disk and the size of the data to be processed;

updating the first operating parameter of the target rack based on the fourth remaining storage capacity;

updating a second operating parameter of the second storage server based on the fifth remaining storage capacity;

and updating the third operating parameter of the target disk based on the sixth remaining storage capacity.

In other embodiments of the present application, the processor 41 is configured to execute the information determination program in the memory 42, and is further configured to implement the following steps:

determining at least any three racks as target racks from the plurality of racks under the condition that the first remaining storage capacity of each rack is the same;

for each target rack, under the condition that the second remaining storage capacity of each storage server in each target rack is the same, determining any storage server from the storage servers in the target rack as a second storage server;

and for each second storage server, under the condition that the third residual storage capacity of the disks in each second storage server is the same, determining any disk as a target disk from the disks in the second storage servers.

It should be noted that, for a specific implementation process of the step executed by the processor in this embodiment, reference may be made to an implementation process in the information determination method provided in the embodiment corresponding to fig. 1 and fig. 3, and details are not described here again.

The first storage server provided by the embodiment of the application considers respective operating states of a rack in a distributed storage system, a storage server of the rack, and a disk in the storage server to determine a target disk, solves the problems of capacity imbalance and load imbalance of the disk caused when the target disk is determined in the distributed storage system in the related art, and improves load and capacity balance and reliability.

Based on the foregoing embodiments, embodiments of the present application provide a computer-readable storage medium storing one or more programs, which are executable by one or more processors to implement steps in an information determination method provided by the embodiments corresponding to fig. 1 and 3.

It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

The computer-readable storage medium may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); and may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., including one or any combination of the above-mentioned memories.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method described in the embodiments of the present application.

The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable information determining apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information determining apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information determination apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable information determining apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:组合芯片、存储设备和对存储对象的操作方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类