Storage system disk fault information acquisition method and device, electronic equipment and medium
By working collaboratively between the client and the central control node, disk status information is acquired and aggregated in real time, solving the problem of long processing times in existing technologies and enabling fast and real-time acquisition of disk fault information.
Patent Information
- Application Number
- CN202111138582.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2041-09-27
AI Technical Summary
In existing technologies, distributed block storage systems take a long time to obtain disk failure information by scanning client logs offline when a low probability of failure occurs, making it difficult to achieve real-time performance and high efficiency.
The client sends disk status information to the central control node, which then collects the status information of each disk and generates a list of fault information, reducing the communication burden between the client and the central control node and improving real-time performance and efficiency.
It enables rapid acquisition of disk fault information, reduces communication burden and resource waste, and improves the real-time performance and accuracy of fault information acquisition.
Smart Images

Figure CN113934581B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of cloud computing, in particular to cloud storage, and specifically to a storage system disk fault information acquisition method and device, electronic equipment and medium. BACKGROUND
[0002] Distributed block storage systems generally provide low-latency, persistent, highly reliable and highly elastic block storage services for public cloud servers. In actual application, some low-probability faults may cause the entire system to fail.
[0003] In related technologies, the logs of all clients are generally scanned offline, and then the disk fault information is obtained by analyzing the logs. However, this method is time-consuming. SUMMARY
[0004] The present disclosure provides a storage system disk fault information acquisition method and device, electronic equipment and medium.
[0005] According to an aspect of the present disclosure, a storage system disk fault information acquisition method is provided, applied to a client, and the method comprises:
[0006] sending a data access request obtained to a storage node, so that the storage node accesses a disk corresponding to the client according to the data access request;
[0007] obtaining an access result of the disk returned by the storage node;
[0008] determining current state information of the disk according to the access result;
[0009] sending the current state information of the disk to a control node.
[0010] According to another aspect of the present disclosure, a storage system disk fault information acquisition method is provided, applied to a control node, and the method comprises:
[0011] obtaining current state information of each disk respectively sent by each client in a storage system;
[0012] determining a disk fault information list according to the current state information of each disk.
[0013] According to another aspect of the present disclosure, a storage system disk fault information acquisition device is provided, applied to a client, and comprising:
[0014] a sending module configured to send a data access request obtained to a storage node, so that the storage node accesses a disk corresponding to the client according to the data access request;
[0015] The first obtaining module is configured to obtain the access result corresponding to the disk returned by the storage node.
[0016] The first determining module is configured to determine the current state information of the disk according to the access result.
[0017] The sending module is configured to send the current state information of the disk to a control node.
[0018] According to another aspect of the present disclosure, there is provided a storage system disk fault information obtaining apparatus applied to a control node, comprising:
[0019] The second obtaining module is configured to obtain the current state information of each disk respectively sent by each client in the storage system.
[0020] The second determining module is configured to determine a disk fault information list according to the current state information of each disk.
[0021] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0022] at least one processor; and
[0023] a memory connected with the at least one processor in communication; wherein,
[0024] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the above embodiments.
[0025] According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to perform the method described in the above embodiments.
[0026] According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method described in the above embodiments.
[0027] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0028] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0029] Figure 1 A flowchart of a storage system disk fault information obtaining method provided by an embodiment of the present disclosure;
[0030] Figure 2 Another flowchart of a method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is provided.
[0031] Figure 3 Another flowchart of a method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is provided.
[0032] Figure 4 Another flowchart of a method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is provided.
[0033] Figure 5 Another flowchart of a method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is provided.
[0034] Figure 6 Another flowchart of a method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is provided.
[0035] Figure 7 Another flowchart of a method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is provided.
[0036] Figure 8 Another flowchart of a method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is provided.
[0037] Figure 9 A block diagram of an electronic device for implementing the method for acquiring disk failure information of a storage system according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0038] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, which should be considered in their context only. Thus, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0039] The method, device, electronic device and storage medium for acquiring disk failure information of a storage system according to an embodiment of the present disclosure are described below with reference to the accompanying drawings.
[0040] Cloud computing refers to a technology system that accesses a flexible and scalable shared physical or virtual resource pool through a network, the resources can include servers, operating systems, networks, software, applications and storage settings, etc., and the resources can be deployed and managed in a self-service manner on demand. Through cloud computing, artificial intelligence, blockchain and other technology applications, model training can provide strong data processing capabilities.
[0041] Cloud storage is a new concept derived from the concept of cloud computing. Cloud storage is an online storage mode, that is, data is stored on virtual servers usually managed by a third party, rather than on dedicated servers.
[0042] Figure 1 A flowchart of a storage system disk fault information acquisition method is provided for the embodiments of the present disclosure.
[0043] In the present disclosure, the storage system can be a distributed block storage system, which can include a client, a storage node and a control node. The client is used to process read and write requests of users; the storage node is used to store data of users and provide read and write services; and the control module is used to manage the storage node.
[0044] The storage system disk fault information acquisition method of the embodiments of the present disclosure can be executed by the client, and the current state information of the disk is sent to the control node, so that the control node collects the state information of each disk, and the disk fault information can be obtained from the control node, which is time-saving and real-time.
[0045] As shown in Figure 1 The storage system disk fault information acquisition method includes:
[0046] In step 101, the obtained data access request is sent to the storage node, so that the storage node accesses the disk corresponding to the client according to the data access request.
[0047] In the present disclosure, the client can be understood as a virtual machine, and the virtual machine has a corresponding virtual disk, and the virtual disk corresponds to a storage system. When a user uses a virtual machine, the virtual disk will be accessed, and the client will distribute the data access request to the storage node in the storage system. The data access request can be a read request or a write request.
[0048] After the storage node obtains the data access request, it can access the disk corresponding to the client according to the data access request. Since the user uses the client to access data, the disk corresponding to the client can be understood as the disk corresponding to the user. That is, when the user uses the client, the storage node can access the disk corresponding to the user. Each user can correspond to one or more disks.
[0049] In step 102, the access result of the disk returned by the storage node is obtained.
[0050] In the present disclosure, the storage node can return the access result to the client after accessing the disk corresponding to the client according to the data access request. Thus, the client can obtain the access result returned by the storage node. The access result can include disk information, whether the access is successful, and the like.
[0051] In step 103, the current state information of the disk is determined according to the access result.
[0052] In the present disclosure, the client can determine the current state information of the disk according to the access result. For example, the access result is that the data writing to the disk A is successful, and the current state of the disk A recorded by the client is the normal state. Thus, according to the access result and the current state of the disk A recorded by the client, it can be determined that the current state of the disk A is the normal state.
[0053] The access result in the present disclosure can be the latest access result, or the access result in the past preset time length.
[0054] In order to improve the accuracy of the determined disk state, in the present disclosure, the current state information of the disk can also be determined according to the access result of the disk in the past preset time length. For example, the data writing to a certain disk and the data reading from the disk are both successful in the past 30 minutes, and it can be determined that the current state of the disk is the normal state.
[0055] In step 104, the current state information of the disk is sent to the control node.
[0056] In the present disclosure, the client can send the current state information of the disk to the control node at a preset time interval, so that the state information of the disk can be sent to the control node in time. The current state information of the disk can include disk information, user information, and the like. The disk information can include the identification of the disk, the size of the disk, the remaining space of the disk, and the like.
[0057] In the present disclosure, the client can communicate with the control node through the heartbeat packet, so that the client can send the state information of the disk to the control node through the heartbeat packet, thereby reducing the interaction times between the client and the control node and saving the traffic.
[0058] If the client corresponds to multiple disks, the client can send the state information of each disk to the control node, and the control node can obtain the state information of each disk sent by the client. Since multiple users can use the client, each client can send the state information of each disk corresponding thereto to the control node. Thus, the control node can collect the state information of each disk in the storage system, so as to provide the disk fault information query service according to the state information of each disk.
[0059] The storage system disk fault information acquisition method of the embodiment of the present disclosure sends the obtained data access request to the storage node, so that the storage node accesses the disk corresponding to the client according to the data access request; the access result corresponding to the disk returned by the storage node is obtained; the current state information of the disk is determined according to the access result; and the current state information of the disk is sent to the central control node. Thus, the current state information of the disk is sent to the central control node, so that the central control node collects the state information of each disk, and the disk fault information can be obtained from the central control node, which is time-consuming and has strong real-time performance.
[0060] In the step 103 in the above embodiment, in a case where the data access request is a read request and the access result is that no data is read, the state of the disk is updated from the normal state to the error state.
[0061] In the present disclosure, if the data access request is a read request and the obtained access result is that no data is read or reading data is timed out, it indicates that reading data from the disk is wrong, and then the state of the disk can be updated from the normal state to the error state.
[0062] Alternatively, in a case where the data access request includes a read request and a write request, the state of the currently recorded disk is an error state or a read-only state, and the access result is that reading and writing data is successful, the state of the disk is updated to the normal state.
[0063] In the present disclosure, the client can obtain a read request and a write request within a certain time length, and the client sends the two kinds of requests to the storage node and obtains the access result corresponding to each request. If the state of the currently recorded disk is an error state or a read-only state and reading and writing data to the disk is successful, the state of the disk can be updated to the normal state.
[0064] Alternatively, in a case where the data access request is a write request, the state of the currently recorded disk is an error state, and the access result is that writing data is successful, the state of the disk is updated to the read-only state.
[0065] In the present disclosure, if the state of the currently recorded disk is an error state and the access result corresponding to the obtained write request is that writing data is successful, it indicates that the writing function of the disk has been restored, and then the state of the disk can be updated from the error state to the read-only state.
[0066] In the embodiment of the present disclosure, when the current state information of the disk is determined according to the access result, the state of the disk can be updated according to the data access request, the state of the currently recorded disk, the access result, and the like, so that the state of the disk can be updated in real time.
[0067] Figure 2Another flowchart of a method for acquiring disk fault information of a storage system is provided in an embodiment of the present disclosure.
[0068] As shown in Figure 2 The method for acquiring disk fault information of a storage system includes the following steps.
[0069] In step 201, the acquired data access request is sent to a storage node, so that the storage node accesses the disk corresponding to the client according to the data access request.
[0070] In step 202, the access result corresponding to the disk returned by the storage node is acquired.
[0071] In step 203, the current state information of the disk is determined according to the access result.
[0072] In the present disclosure, steps 201-203 are similar to steps 101-103 described above, and thus will not be described here.
[0073] In step 204, the current state information of the disk is sent to the control node in the case where the state information of the disk changes.
[0074] In actual applications, the state of the disk is usually unchanged for a long period of time. If the state information of the disk is continuously sent to the control node, the communication burden between the client and the control node will be increased, and resources will be wasted.
[0075] Therefore, in the present disclosure, the current state information of the disk can be sent to the control node in the case where the state information of the disk changes. For example, when the state of a certain disk is updated from an error state to a normal state, or the state of the disk is updated from a normal state to a read-only state, the current state information of the disk can be sent to the control node.
[0076] In an embodiment of the present disclosure, the acquired data access request is sent to a storage node, so that the storage node accesses the disk corresponding to the client according to the data access request; the access result corresponding to the disk returned by the storage node is acquired; the current state information of the disk is determined according to the access result; and the current state information of the disk is sent to the control node in the case where the state information of the disk changes. Thus, when the state information of the disk changes, the current state information of the disk is sent to the control node, the communication burden between the client and the control node is reduced, and resources are saved.
[0077] To implement the above-mentioned embodiments, the present disclosure further provides a method for acquiring disk fault information of a storage system. The method can be executed by a control node in the storage system. Figure 3 Another flowchart of a method for acquiring disk fault information of a storage system is provided in an embodiment of the present disclosure.
[0078] As Figure 3 shown, the storage system disk fault information acquisition method comprises:
[0079] Step 301, acquiring the current state information of each disk respectively sent by each client in the storage system.
[0080] In the present disclosure, when multiple users use the clients, the storage node accesses the disk corresponding to each client, and each client determines the current state information of the disk corresponding thereto according to the access result, and sends the current state information of each disk corresponding thereto to the central control node.
[0081] In implementation, each client sends the current state information of each disk to the central control node through a heartbeat packet. Thus, the central control node can acquire the current state information of each disk respectively sent by each client, thereby collecting the current state information of each disk in the storage system.
[0082] Step 302, determining a disk fault information list according to the current state information of each disk.
[0083] In the present disclosure, the current disk fault information list can be determined according to the disk state in the current state information of each disk. For example, the state information of the disk with an abnormal state can be used to generate a corresponding disk fault information list. The disk fault information list can include disk information, user information, fault duration, etc.
[0084] Alternatively, if the central control node already has a disk fault information list, the existing disk fault information list can be updated according to the collected current state information of each disk, thereby reducing the calculation amount of the central control node.
[0085] In implementation, the state of each disk can be searched in the existing disk fault information list. If the state information of the disk in the disk fault information list is inconsistent with the current state information, and the current state is an abnormal state, the state information of the disk in the disk fault information list is updated. If the state of the disk in the disk fault information list is an abnormal state, and the current state is a normal state, the state information of the disk is deleted from the disk fault information list. If the current state of the disk is an abnormal state, and the disk fault information list does not have the information of the disk, the current state information of the disk is added to the disk fault information list.
[0086] In the embodiment of the present disclosure, the central control node obtains the current state information of each disk respectively sent by each client in the storage system, and determines the disk fault information list according to the current state information of each disk. Thus, the central control node can collect the state information of each disk in the storage system, and generate the disk fault information list according to the current state information of each disk, thereby shortening the time for obtaining the disk fault information, reducing the time consumption and improving the real-time performance.
[0087] Figure 4 Another flowchart of a method for obtaining disk fault information of a storage system is provided in the embodiment of the present disclosure.
[0088] As shown in Figure 4 , the method for obtaining disk fault information of a storage system comprises the following steps.
[0089] In step 401, the current state information of each disk respectively sent by each client in the storage system is obtained.
[0090] In the present disclosure, step 401 is similar to step 301 described above, and thus will not be described here.
[0091] In step 402, the state information of each disk is classified according to the type of the disk state in the state information of each disk, so as to determine the first disk fault information list corresponding to each abnormal state.
[0092] In the present disclosure, the disk can be in a normal state or an abnormal state, wherein the abnormal state can be divided into an error state, a read-only state, etc. The error state can mean that both reading data from the disk and writing data to the disk are unsuccessful.
[0093] In order to facilitate the determination of the specific fault of the disk, in the present disclosure, the state information of each disk can be classified according to the type of the disk state in the state information of each disk, so as to determine the first disk fault information list corresponding to each abnormal state.
[0094] For example, the state information of the disk whose type of disk state is the error state can be classified into one category, and the disk fault information list corresponding to the error state is generated. The state information of the disk whose type of disk state is the read-only state can be classified into one category, and the disk fault information list corresponding to the read-only state is generated.
[0095] In the embodiments of the present disclosure, current state information of each disk respectively sent by each client in the storage system is acquired; the state information of each disk is classified according to the type to which the disk state in the state information of each disk belongs, so as to determine a first disk fault information list corresponding to each abnormal state. Thus, the disk fault information list corresponding to each abnormal state can be determined according to the type to which the disk state in the state information belongs, so as to facilitate acquisition of disk information in each abnormal state.
[0096] Figure 5 Another flowchart of a storage system disk fault information acquisition method provided by the embodiments of the present disclosure is shown.
[0097] As shown in Figure 5 , the storage system disk fault information acquisition method comprises:
[0098] In step 501, current state information of each disk respectively sent by each client in the storage system is acquired.
[0099] In the present disclosure, step 501 is similar to step 301 described above, and thus will not be described here.
[0100] In step 502, the state information of each disk is classified according to the type to which the disk state in the state information of each disk belongs, so as to determine a second disk fault information list corresponding to an abnormal state.
[0101] In the present disclosure, the type to which the disk state belongs can include a normal state, an abnormal state, etc. The normal state refers to successful reading and writing of data from and to the disk, i.e., normal reading and writing operation of the disk; the abnormal state refers to unsuccessful reading or writing of data, or both.
[0102] In the present disclosure, the state information of the disk belonging to the abnormal state can be classified according to the type to which the disk state in the state information of each disk belongs, so as to determine a second disk fault information list corresponding to an abnormal state. Then, according to the state information of the remaining disks, a disk information list corresponding to a normal state can be determined.
[0103] It can be understood that the state of each disk in the second disk fault information list is an abnormal state, and some disks can be in an error state, and some disks can be in a read-only state, etc.
[0104] In step 503, a user list corresponding to an abnormal state is generated according to user information in the second disk fault information list.
[0105] In actual application, the operation and maintenance personnel also needs to determine which users' disks are in abnormal state. Therefore, in the present disclosure, a user list corresponding to the abnormal state can be generated according to the user information in the second disk fault information list, so that the user information of the user whose disk is in abnormal state can be obtained.
[0106] In the embodiment of the present disclosure, the current state information of each disk respectively sent by each client in the storage system is obtained; the state information of each disk is classified according to the type to which the disk state in the state information of each disk belongs, so as to determine the second disk fault information list corresponding to the abnormal state; and the user list corresponding to the abnormal state is generated according to the user information in the second disk fault information list. Thus, by the type to which the disk state in the state information belongs, the disk fault information list corresponding to the abnormal state can be determined, and the user list of the user whose disk is in abnormal state can also be determined according to the user information in the disk fault information list, so as to meet the diversified needs.
[0107] Figure 6 The flowchart of another storage system disk fault information acquisition method provided by the embodiment of the present disclosure is shown.
[0108] As shown in Figure 6 , the storage system disk fault information acquisition method comprises:
[0109] In step 601, the current state information of each disk respectively sent by each client in the storage system is obtained.
[0110] In step 602, the disk fault information list is determined according to the current state information of each disk.
[0111] In the present disclosure, steps 601-602 are similar to steps 301-302 described above, and therefore will not be described here.
[0112] In step 603, the disk fault information list is returned in response to the acquisition of the disk fault query request.
[0113] In the present disclosure, the central control node can provide the disk fault query function. In the operation interface corresponding to the storage system, the operation and maintenance personnel can perform the fault query operation on the interface, and at this time, the central control node can acquire the disk fault query request. The central control node can return the disk fault information list in response to the acquisition of the disk fault query request. The disk fault information list can include the information of the disk, the user information, and the fault duration.
[0114] In the present disclosure, the returned disk fault information list can be multiple, such as the disk fault information list corresponding to the abnormal state, the disk fault information list corresponding to various abnormal states, etc., and the user list corresponding to the abnormal state can also be returned.
[0115] In the embodiments of the present disclosure, the central control node obtains the current state information of each disk respectively sent by each client in the storage system; determines the disk fault information list according to the current state information of each disk; and returns the disk fault information list in response to obtaining the disk fault query request. Thus, when the central control node obtains the disk fault query request, the disk fault information list can be returned, so that the operation and maintenance personnel can obtain the disk fault information in real time.
[0116] In step 603 in the above embodiment, in the case that the target disk identifier is included in the fault query request, the disk fault information list is queried according to the target disk identifier to determine the fault information corresponding to the target disk identifier.
[0117] In the present disclosure, the operation and maintenance personnel can input the disk information to be queried, such as the disk identifier. In the case that the target disk identifier is included in the obtained fault query request, the central control node can query the disk fault information list according to the target disk identifier. If the target disk identifier exists in the disk fault information list, the state information of the target disk identifier can be determined, and thus the state information of the target disk identifier can be returned.
[0118] If the target disk identifier does not exist in the disk fault information list, the prompt information of the normal disk can be returned.
[0119] In the embodiments of the present disclosure, in response to obtaining the disk fault query request, the disk fault information list is returned, and in the case that the target disk identifier is included in the fault query request, the disk fault information list is queried according to the target disk identifier to determine the fault information corresponding to the target disk identifier. Thus, by querying the disk fault information list to determine the fault information corresponding to the target disk identifier and return, compared with querying in the state information of each disk, the query time can be reduced, and the fault information of the specified disk can be queried, meeting the diversified needs.
[0120] In step 603 in the above embodiment, in the case that the target user identifier is included in the fault query request, the corresponding disk identifier can be determined according to the user identifier, the fault information of the disk corresponding to the user identifier can be obtained according to the disk identifier, and the fault information of the disk is returned.
[0121] If the user identifier corresponds to multiple disk identifiers, the fault information list can be queried according to each disk identifier to obtain the fault information corresponding to each disk identifier.
[0122] In this embodiment of the disclosure, by including the target user identifier in the fault query request, the corresponding disk identifier can be determined based on the user identifier, and the fault information of the disk corresponding to the user identifier can be obtained based on the disk identifier, thereby enabling the query of fault information of the disk of a specified user, which meets diverse needs.
[0123] To implement the above embodiments, this disclosure also proposes a storage system disk fault information acquisition device. This device can be applied to a client. Figure 7 This is a schematic diagram of a storage system disk fault information acquisition device provided in an embodiment of the present disclosure.
[0124] like Figure 7 As shown, the storage system disk fault information acquisition device 700 includes:
[0125] The sending module 710 is used to send the acquired data access request to the storage node so that the storage node can access the disk corresponding to the client according to the data access request.
[0126] The first acquisition module 720 is used to acquire the disk access results returned by the storage node;
[0127] The first determining module 730 is used to determine the current status information of the disk based on the access result;
[0128] The sending module 710 is used to send the current status information of the disk to the central control node.
[0129] In one possible implementation of this disclosure, the first determining module 730 is configured to:
[0130] If the data access request is a read request and the access result is that no data was read, update the disk status from normal to error; or,
[0131] If the data access request includes both read and write requests, the current disk status is either error-prone or read-only, and the access result is successful read / write, update the disk status to normal; or,
[0132] If the data access request is a write request, the current disk status is an error state, and the access result is that the data was successfully written, the disk status will be updated to read-only.
[0133] In one possible implementation of this disclosure, the sending module 730 is configured to:
[0134] If the disk's status information changes, the current disk status information will be sent to the central control node.
[0135] In a possible implementation of the embodiment of the present disclosure, the sending module 730 is configured to:
[0136] The current state information of the disk is sent to the control node through the heartbeat packet.
[0137] It should be noted that the foregoing explanation of the embodiment of the method for acquiring disk fault information of a storage system on the client side is also applicable to the embodiment of the device for acquiring disk fault information of a storage system, and thus will not be described herein again.
[0138] The device for acquiring disk fault information of a storage system according to the embodiment of the present disclosure sends the acquired data access request to the storage node, so that the storage node accesses the disk corresponding to the client according to the data access request; acquires the access result of the disk returned by the storage node; determines the current state information of the disk according to the access result; and sends the current state information of the disk to the control node. In this way, the current state information of the disk is sent to the control node, so that the control node collects the state information of each disk, and thus the disk fault information can be acquired from the control node, which is time-saving and has strong real-time performance.
[0139] To implement the foregoing embodiment, the embodiment of the present disclosure further provides a device for acquiring disk fault information of a storage system. The device can be applied to a control node. Figure 8 FIG. 8 is a structural schematic diagram of another device for acquiring disk fault information of a storage system according to the embodiment of the present disclosure.
[0140] As shown in FIG. 8, the device 800 for acquiring disk fault information of a storage system includes: Figure 8
[0141] The second acquiring module 810 is configured to acquire the current state information of each disk respectively sent by each client in the storage system.
[0142] The second determining module 820 is configured to determine a disk fault information list according to the current state information of each disk.
[0143] In a possible implementation of the embodiment of the present disclosure, the second determining module 820 is configured to:
[0144] The state information of each disk is classified according to the type to which the disk state in the state information of each disk belongs, so as to determine the first disk fault information list corresponding to each abnormal state.
[0145] In a possible implementation of the embodiment of the present disclosure, the second determining module 820 is configured to:
[0146] The state information of each disk is classified according to the type to which the disk state in the state information of each disk belongs, so as to determine the second disk fault information list corresponding to the abnormal state.
[0147] According to the user information in the second disk fault information list, a user list corresponding to the abnormal state is generated.
[0148] In a possible implementation of the embodiment of the present disclosure, the apparatus can further include:
[0149] The returning module is configured to return the disk fault information list in response to obtaining the disk fault query request.
[0150] In a possible implementation of the embodiment of the present disclosure, the returning module is configured to:
[0151] In the case that the target disk identifier is included in the fault query request, the disk fault information list is queried according to the target disk identifier to determine the fault information corresponding to the target disk identifier.
[0152] It should be noted that the explanation and description of the foregoing embodiment of the storage system disk fault information acquisition method on the side of the central control node also applies to the storage system disk fault information acquisition apparatus of the embodiment, and thus will not be described here again.
[0153] In the embodiment of the present disclosure, the current state information of each disk respectively sent by each client in the storage system is acquired; and the disk fault information list is determined according to the current state information of each disk. Thus, the central control node can collect the state information of each disk in the storage system, and generate the disk fault information list according to the current state information of each disk, thereby shortening the time for acquiring the disk fault information, reducing the time consumption, and improving the real-time performance.
[0154] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0155] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.
[0156] As Figure 9As shown, the device 900 includes a computing unit 901 that can perform various appropriate actions and processes in accordance with a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded into a RAM (Random Access Memory) 903 from the storage unit 908. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. An I / O (Input / Output) interface 905 is also connected to the bus 904.
[0157] A plurality of components in the device 900 are connected to the I / O interface 905, including an input unit 906 such as a keyboard, a mouse, and the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, and the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0158] The computing unit 901 can be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various special-purpose AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, and the like. The computing unit 901 performs various methods and processes described above, such as the storage system disk failure information acquisition method. For example, in some embodiments, the storage system disk failure information acquisition method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the storage system disk failure information acquisition method described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the storage system disk failure information acquisition method by any other appropriate means, such as by means of firmware.
[0159] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a Field Programmable Gate Array (FPGA), an Application-Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a System on a Chip (SOC), a Complex Programmable Logic Device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0160] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general or special purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as part of a separate software package, and partially on a remote machine or server.
[0161] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include a linearly-programmed electronic storage, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory), or flash memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0162] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0163] The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, and a blockchain network.
[0164] The computer system can include clients and servers. This relationship can be between a client and a server that are typically remote from each other and typically interact through a communication network. The relationship between client and server exists by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service (Virtual Private Server). The server can also be a server of a distributed system, or a server combined with a blockchain.
[0165] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, when an instruction processor in the computer program product executes, executes the storage system disk fault information acquisition method proposed in the above embodiments of the present disclosure.
[0166] It should be understood that the steps shown above can be reordered, added, or deleted. For example, the steps described in the present disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, which is not limited herein.
[0167] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A method for obtaining disk fault information of a storage system, applied to a client, comprising: sending a data access request to a storage node, so that the storage node accesses a disk corresponding to the client according to the data access request; obtaining an access result of the disk returned by the storage node; determining current state information of the disk according to the data access request and the access result; wherein: in a case that the data access request is a read request and the access result is no data read, updating the state of the disk from a normal state to an error state; in a case that the data access request comprises a read request and a write request, the current recorded state of the disk is an error state or a read-only state, and the access result is that reading and writing data is successful, updating the state of the disk to a normal state; in a case that the data access request is a write request, the current recorded state of the disk is an error state, and the access result is that writing data is successful, updating the state of the disk to a read-only state; in a case that the state information of the disk changes, sending the current state information of the disk to a control node. 2.The method of claim 1, wherein the sending the current state information of the disk to the control node comprises: sending the current state information of the disk to the control node through a heartbeat packet. 3.A method for obtaining disk fault information of a storage system, applied to a control node, comprising: obtaining current state information of each disk of each client in a storage system, which is determined by the method of claim 1 or 2; determining a disk fault information list according to the current state information of each disk.
4. The method of claim 3, wherein, The determining a disk fault information list according to the state information of each disk comprises: classifying the state information of each disk according to the type of the state of the disk, to determine a first disk fault information list corresponding to each abnormal state.
5. The method of claim 3, wherein, The determining a disk fault information list according to the state information of each disk comprises: classifying the state information of each disk according to the type of the state of the disk, to determine a second disk fault information list corresponding to an abnormal state; generating a user list corresponding to the abnormal state according to user information in the second disk fault information list. 6.The method of any one of claims 3-5, further comprising: in response to obtaining a disk fault query request, returning the disk fault information list.
7. The method of claim 6, wherein, The returning the disk fault information list in response to obtaining a disk fault query request comprises: in a case that the fault query request comprises a target disk identifier, querying the disk fault information list according to the target disk identifier, to determine fault information corresponding to the target disk identifier. 8.An apparatus for obtaining disk fault information of a storage system, applied to a client, comprising: a sending module, configured to send a data access request to a storage node, so that the storage node accesses a disk corresponding to the client according to the data access request; The first obtaining module is configured to obtain the access result corresponding to the disk returned by the storage node. The first determining module is configured to determine the current state information of the disk according to the data access request and the access result; in the case that the data access request is a read request and the access result is that no data is read, the state of the disk is updated from a normal state to an error state; in the case that the data access request comprises a read request and a write request, the current recorded state of the disk is an error state or a read-only state, and the access result is that reading and writing data is successful, the state of the disk is updated to a normal state; in the case that the data access request is a write request, the current recorded state of the disk is an error state, and the access result is that writing data is successful, the state of the disk is updated to a read-only state. The sending module is configured to send the current state information of the disk to a central control node in the case that the state information of the disk changes.
9. The apparatus of claim 8, wherein, The sending module is configured to: send the current state information of the disk to the central control node through a heartbeat packet.
10. A storage system disk fault information acquisition device, applied to a central control node, comprising: A second obtaining module is configured to obtain the current state information of each disk determined by each client in a storage system using the method of claim 1 or 2. A second determining module is configured to determine a disk fault information list according to the current state information of each disk.
11. The apparatus of claim 10, wherein, The second determining module is configured to: classify the state information of each disk according to the type to which the state of the disk belongs, to determine a first disk fault information list corresponding to each abnormal state.
12. The apparatus of claim 10, wherein, The second determining module is configured to: classify the state information of each disk according to the type to which the state of the disk belongs, to determine a second disk fault information list corresponding to an abnormal state; generate a user list corresponding to an abnormal state according to the user information in the second disk fault information list.
13. The device of any one of claims 10-12, further comprising: A returning module is configured to return the disk fault information list in response to obtaining a disk fault query request.
14. The apparatus of claim 13, wherein, The returning module is configured to: in the case that the target disk identifier is included in the fault query request, query the disk fault information list according to the target disk identifier to determine the fault information corresponding to the target disk identifier.
15. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any one of claims 1-7.
Citation Information
Patent Citations
Disk monitoring method for cloud storage system
CN103067485A
Array access method and device, storage equipment and machine readable storage medium
CN112181298A