Detection method and device, equipment and storage medium

By detecting the service status of logical storage units in the distributed storage system and issuing alarm information, the problem of the distributed storage system being unable to notify users in time when a network failure occurs is solved, improving system reliability and user trust.

CN118733386APending Publication Date: 2024-10-01ZHENGZHOU INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410834577.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Distributed storage systems cannot notify users in time when network failures occur, causing business collapse and affecting user services.

Method used

Before the server performs read and write operations on the distributed storage device, it detects the service status of the logical storage unit, determines the working status of the device based on the status, and issues an alarm message to remind the user to avoid reading and writing data in abnormal conditions.

Benefits of technology

Users can know in time whether the distributed storage device is abnormal, avoid data reading and writing problems caused by abnormal conditions, and improve users' trust in the distributed storage system and the reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733386A_ABST
    Figure CN118733386A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a detection method and device, equipment and a storage medium, the method is applied to a server, the server comprises distributed storage equipment, and the method comprises the following steps: detecting the service state of a logic storage unit in the distributed storage equipment before performing read-write operation on the distributed storage equipment; determining the working state of the distributed storage device according to the service state of the logic storage unit in the distributed storage device; if the working state of the distributed storage device is an abnormal state, alarm information is sent out, and the alarm information is used for reminding a user that the distributed storage device works abnormally. According to the invention, a user can know whether the distributed storage device is abnormal or not in time, so that the influence on user service caused by data read-write operation when the distributed storage device is abnormal is avoided, and the credibility of the user on the distributed storage system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a detection method, device, equipment and storage medium. Background Art

[0002] Distributed storage generally uses disks from multiple devices in a cluster to build a storage pool, unifies the disks on all servers in the cluster into a logical whole, and creates logical storage units in the storage pool for users to use. Users can use the logical storage unit as an independent disk to install operating systems, format file systems, store data, etc.; in related technologies, distributed storage systems are inevitably affected by the network status in the cluster. When the network of a server fails, users cannot be informed in time, which leads to the collapse of user business. Summary of the invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a detection method, apparatus, device and storage medium that overcome the above problems or at least partially solve the above problems.

[0004] In order to solve the above problem, the present invention discloses a detection method, which is applied to a server, wherein the server includes a distributed storage device, and the method includes:

[0005] Before performing a read or write operation on a distributed storage device, detecting a service status of a logical storage unit in the distributed storage device;

[0006] Determining the working state of the distributed storage device according to the service state of the logical storage unit in the distributed storage device;

[0007] If the working state of the distributed storage device is an abnormal state, an alarm message is issued, and the alarm message is used to remind the user that the distributed storage device is working abnormally.

[0008] Optionally, the server is connected to a terminal device, and the method further includes:

[0009] Acquire target data that the terminal device needs to read;

[0010] Determining whether the target data exists in the distributed storage device;

[0011] If the target data does not exist in the distributed storage device, a target device storing the target data is determined, the target data is read from the target device, and sent to the terminal device.

[0012] Optionally, the server is connected to a terminal device, and the method further includes:

[0013] When the working state of the distributed storage device is normal, obtaining the data to be written that the terminal device needs to write;

[0014] Determine whether there is a copy corresponding to the data to be written in the distributed storage device;

[0015] If a copy corresponding to the data to be written exists in the distributed storage device, the data to be written is stored in the distributed storage device, the copy corresponding to the data to be written is deleted, and it is determined whether a copy corresponding to the data to be written exists in other servers;

[0016] If a copy corresponding to the data to be written exists in the target server among the other servers, a socket connection is established between the distributed storage device and the target server;

[0017] When the socket connection between the distributed storage device and the target server is established, determining whether the communication network between the distributed storage device and the target server is normal;

[0018] If the communication network between the distributed storage device and the target server is normal, the data to be written is sent to the target server to update the copy in the target server.

[0019] Optionally, the method further comprises:

[0020] When the writing of the data to be written into the distributed storage device fails, determining the failure type of the failure of writing the data to be written;

[0021] The number of failure types is counted, and when the number reaches a preset value, the working state of the distributed storage device is set to abnormal.

[0022] Optionally, the failure type includes one of network timeout, route unreachable, port occupied, and network unavailable.

[0023] Optionally, the distributed storage device includes a plurality of logical storage units, and determining whether the distributed storage device works abnormally according to the service status of the distributed storage device includes:

[0024] determining whether the plurality of logical storage units are in operation;

[0025] If the plurality of logical storage units are not operating, it is determined that the distributed storage device is operating abnormally.

[0026] Optionally, the method further comprises:

[0027] When the network status of the distributed storage device is abnormal, monitoring the network card status of the distributed storage device;

[0028] If the network card status returns to normal, the working status of the distributed storage device is updated to a normal status.

[0029] The present invention also discloses a detection device, which is applied to a server, wherein the server includes a distributed storage device, and the device includes:

[0030] A first acquisition module, used for detecting the service status of a logical storage unit in the distributed storage device before performing a read or write operation on the distributed storage device;

[0031] A first determining module, configured to determine a working state of the distributed storage device according to a service state of a logical storage unit in the distributed storage device;

[0032] The issuing module is used to issue an alarm message if the working state of the distributed storage device is abnormal, and the alarm message is used to remind the user that the distributed storage device is working abnormally.

[0033] Optionally, the server is connected to a terminal device, and the apparatus further comprises:

[0034] A second acquisition module, used to acquire target data that the terminal device needs to read;

[0035] A first judgment module, used to judge whether the target data exists in the distributed storage device;

[0036] The second determination module is used to determine the target device storing the target data if the target data does not exist in the distributed storage device, read the target data from the target device, and send the target data to the terminal device.

[0037] Optionally, the server is connected to a terminal device, and the apparatus further comprises:

[0038] A third acquisition module is used to acquire the data to be written that needs to be written by the terminal device;

[0039] A second judgment module is used to judge whether there is a copy corresponding to the data to be written in the distributed storage device;

[0040] a deletion module, configured to store the data to be written in the distributed storage device if a copy corresponding to the data to be written exists in the distributed storage device, delete the copy corresponding to the data to be written, and determine whether a copy corresponding to the data to be written exists in other servers;

[0041] A communication module, configured to establish a socket connection between the distributed storage device and the target server if a copy corresponding to the data to be written exists in the target server among the other servers;

[0042] A third judgment module is used to judge whether the communication network between the distributed storage device and the target server is normal when the socket connection between the distributed storage device and the target server is established;

[0043] A sending module is used to send the data to be written to the target server if the communication network between the distributed storage device and the target server is normal, so as to update the copy in the target server.

[0044] Optionally, the device further comprises:

[0045] A third determination module, configured to determine a failure type of failure in writing the data to be written when writing the data to be written into the distributed storage device fails;

[0046] The statistical module is used to count the number of failure types, and when the number reaches a preset value, the working state of the distributed storage device is set to abnormal.

[0047] Optionally, the failure type includes one of network timeout, route unreachable, port occupied, and network unavailable.

[0048] Optionally, the distributed storage device includes multiple logical storage units, and the first determining module includes:

[0049] A judging submodule, used for judging whether the plurality of logic storage units are in operation;

[0050] The determination submodule is used to determine that the distributed storage device is operating abnormally if the multiple logical storage units are not operating.

[0051] Optionally, the device further comprises:

[0052] A monitoring module, used for monitoring the network card status of the distributed storage device when the network status of the distributed storage device is abnormal;

[0053] An updating module is used to update the working state of the distributed storage device to a normal state if the network card state returns to normal.

[0054] The present invention also discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the steps of the above-mentioned detection method when executed by the processor.

[0055] The present invention also discloses a non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned detection method are implemented.

[0056] The embodiments of the present invention include the following advantages:

[0057] The present invention discloses a detection method. The present invention can detect the service status of a logical storage unit in a distributed storage device before a server performs a read / write operation on the distributed storage device, determine the working status of the distributed storage device according to the service status of the logical storage unit, and when the working status of the distributed storage device is determined, issue an alarm message to remind a user, so that the user can know in time whether the distributed storage device is abnormal, avoid performing data read / write operations when the distributed storage device is abnormal, thereby affecting user services, and improve the user's trust in the distributed storage system. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flow chart of the steps of a detection method provided by an embodiment of the present invention;

[0059] Figure 2 is a schematic diagram of a display interface of a host computer provided by an embodiment of the present invention;

[0060] Figure 3 It is a flow chart of a detection method provided by an embodiment of the present invention;

[0061] Figure 4 is a structural block diagram of an electronic device provided by an embodiment of the present invention;

[0062] Figure 5 It is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0063] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0064] One of the core concepts of the embodiments of the present invention is that the present invention can detect the service status of the logical storage unit in the distributed storage device before the server performs read and write operations on the distributed storage device, determine the working status of the distributed storage device according to the service status of the logical storage unit, and when the working status of the distributed storage device is determined, issue an alarm message to remind the user, so that the user can promptly know whether the distributed storage device is abnormal, avoid performing data read and write operations when the distributed storage device is abnormal, thereby affecting user services, and improve the user's trust and satisfaction with the distributed storage system.

[0065] Reference Figure 1 , shows a flow chart of the steps of a detection method provided by an embodiment of the present invention, which is applied to a server, and the server includes a distributed storage device. The method may include the following steps:

[0066] Step 101: Before performing a read or write operation on a distributed storage device, detect the service status of a logical storage unit in the distributed storage device.

[0067] A server is a piece of computer hardware that provides a variety of services and resources in response to client requests. A server can be a physical machine or a software application running on a physical machine. Servers play a key role in network environments. They can be part of a data center or the infrastructure of a cloud service provider. Server management includes tasks such as hardware maintenance, operating system management, service configuration, security updates, performance monitoring, and fault recovery. Effective server management is essential to ensure the stability and reliability of services; servers can include application servers, database servers, file servers, mail servers, and cloud servers. The specific type is not limited here.

[0068] Before reading and writing data to the distributed storage device, the server may detect the service status of the logical storage unit in the distributed storage system, thereby determining whether the working status of the distributed storage device is normal.

[0069] Step 102: Determine the working state of the distributed storage device according to the service state of the logical storage unit in the distributed storage device.

[0070] In the embodiment of the present invention, if the service status of the logical storage unit is not running, it can be determined that the distributed storage system is abnormal, and if the service status of the logical storage unit is running, it can be determined that the distributed storage system is working normally.

[0071] It should be noted that it is also possible to determine whether the working status of the distributed storage device is normal by detecting the read and write delays, throughput, error rate, and capacity usage of the logical storage unit. For example, it is possible to detect whether the throughput of the logical storage unit is within a preset range. If the throughput of the logical storage unit is within the preset range, it can be determined that the distributed storage device is working normally; otherwise, it can be determined that the distributed storage device is working abnormally.

[0072] Step 103: If the working state of the distributed storage device is abnormal, an alarm message is issued, and the alarm message is used to remind the user that the distributed storage device is working abnormally.

[0073] In the embodiment of the present invention, if the server determines that the working state of the distributed storage device is abnormal, it can generate an alarm message and then send the alarm message to remind the user. The user can obtain the working state of the distributed storage device in time through the alarm message.

[0074] The present invention discloses a detection method. The present invention can detect the service status of a logical storage unit in a distributed storage device before a server performs a read / write operation on the distributed storage device, determine the working status of the distributed storage device according to the service status of the logical storage unit, and when the working status of the distributed storage device is determined, issue an alarm message to remind a user, so that the user can know in time whether the distributed storage device is abnormal, avoid performing data read / write operations when the distributed storage device is abnormal, thereby affecting user services, and improve the user's trust in the distributed storage system.

[0075] In one embodiment of the present invention, the server is connected to the terminal device, and the method further includes:

[0076] Obtain the target data that the terminal device needs to read; determine whether the target data exists in the distributed storage device; if the target data does not exist in the distributed storage device, determine the target device that stores the target data, read the target data from the target device, and send it to the terminal device.

[0077] In an embodiment of the present invention, a server is connected to a terminal device. When the terminal device needs to read target data in a distributed storage device, it can send a read instruction to the server. The read instruction includes an identifier of the target data. The server can determine whether there is corresponding target data in the distributed storage device based on the target data identifier. If there is no corresponding target data, it can query whether there is target data in other devices. If the target data exists in a target device in other devices, a communication connection can be established between the server and the target device, and data corresponding to the identifier of the target data can be obtained from the target device first, and then the target data can be sent to the terminal device.

[0078] In one embodiment of the present invention, the server is connected to the terminal device, and the method further includes:

[0079] When the working state of the distributed storage device is normal, obtain the data to be written that the terminal device needs to write; determine whether there is a copy corresponding to the data to be written in the distributed storage device; if there is a copy corresponding to the data to be written in the distributed storage device, store the data to be written in the distributed storage device, delete the copy corresponding to the data to be written, and determine whether there is a copy corresponding to the data to be written in other servers; if there is a copy corresponding to the data to be written in the target server among other servers, establish a socket connection between the distributed storage device and the target server; when the socket connection between the distributed storage device and the target server is established, determine whether the communication network between the distributed storage device and the target server is normal; if the communication network between the distributed storage device and the target server is normal, send the data to be written to the target server to update the copy in the target server.

[0080] In an embodiment of the present invention, when the working state of the distributed storage device is normal and the terminal device needs to write the data to be written into the distributed storage device of the server, it can first be determined whether there is a copy corresponding to the data to be written in the distributed storage device. If there is a copy corresponding to the data to be written in the distributed storage device, the data to be written can be stored in the distributed storage device, and then the copy of the data to be written can be deleted to update the original copy data; it can further be determined whether there is a copy corresponding to the data to be written in other servers. If there is a copy corresponding to the data to be written in the target server, a socket connection can be established between the target server and the distributed storage device. When the socket connection is established, it can be determined whether the communication network between the distributed storage device and the target server is normal. If it is normal, the data to be written can be sent to the target server to update the copy in the target server. The present invention can ensure that the data in the distributed storage system remains consistent by first determining the existence of the copy and updating the original copy; by establishing a socket connection between the distributed storage device and the target server and ensuring that the communication network is normal, the reliability and integrity of data transmission can be guaranteed.

[0081] When the communication network between the distributed storage device and the target server is abnormal, the writing of the data to be written to the target server can be stopped, and a reminder message is sent to the user to remind the user that the communication connection between the distributed storage device and the target server is abnormal. When the communication network is abnormal, the present invention can timely discover and take measures to avoid system problems caused by data update failure.

[0082] In one embodiment of the present invention, a Ping command can be used to send an Internet Control Message Protocol echo request to a target server to check whether an echo response can be received. If a response can be received, it indicates that the network connection is connected. This method can effectively determine whether the communication network between the distributed storage device and the target server is normal. If a network problem is found, troubleshooting and repair should be performed in a timely manner to ensure the reliability of data transmission and the stability of the system.

[0083] In one embodiment of the present invention, the data to be written includes a unique identifier, and the unique identifier is used to query in the distributed storage system to determine whether there is a copy of the data.

[0084] In one embodiment of the present invention, the method further includes:

[0085] When writing the data to be written to the distributed storage device fails, determining the failure type of the failure to write the data to be written; counting the number of failure types, and when the number reaches a preset value, setting the working state of the distributed storage device to abnormal.

[0086] In an embodiment of the present invention, when writing the data to be written to the distributed storage device fails, the failure type of the failure to write the data to be written can be determined, and the number of failure types can be counted. For example, when the failure type is network timeout, when the number of network timeouts reaches a preset value of 2 times, it can be determined that the distributed storage device has a fault, and the working state of the distributed storage device can be set to abnormal.

[0087] In an embodiment of the present invention, the failure type includes one of network timeout, route unreachable, port occupied, and network unavailable for connection.

[0088] In one embodiment of the present invention, a distributed storage device includes multiple logical storage units, and determining whether the distributed storage device is operating abnormally is based on the service status of the distributed storage device, including: judging whether the multiple logical storage units are running; if the multiple logical storage units are not running, determining that the distributed storage device is operating abnormally.

[0089] In an embodiment of the present invention, since a distributed storage device may include multiple logical storage units, the operating status of the multiple logical storage units can be monitored. If the multiple logical storage units are not operating, it can be determined that the operating status of the distributed storage device is abnormal; if it is determined that the multiple logical storage units are operating, it can be determined that the operating status of the distributed storage device is normal. The present invention can determine the operating status of the distributed storage device based on the operating status of the logical storage unit, thereby providing convenience for users.

[0090] In one embodiment of the present invention, the method further includes: when the network status of the distributed storage device is abnormal, monitoring the network card status of the distributed storage device; if the network card status returns to normal, updating the working status of the distributed storage device to a normal status.

[0091] In an embodiment of the present invention, when the network status of a distributed storage device is abnormal, the network card status of the distributed storage device can be monitored at this time, and when the network card status returns to normal, the working status of the distributed storage device can be updated to a normal status, thereby timely updating the status of the distributed storage device when the network card status returns to normal, reducing the service interruption time caused by network problems and improving user experience; similarly, when the network status changes from normal to abnormal, the working status of the distributed storage device can be modified from a normal status to an abnormal status in a timely manner; the present invention automatically updates the working status of the distributed storage device by switching the network card status, which is crucial to maintaining the stability, availability and performance of the system, and helps ensure that the distributed storage system can continue to provide users with high-quality storage services.

[0092] like Figure 2 , showing a flow chart of a detection method provided by an embodiment of the present invention, it is possible to first detect whether the status of the distributed storage device is abnormal. If it is abnormal, an alarm message is issued. If it is normal, data can be read and written. If there is no copy locally, data can be read and written on other servers. If communication with other servers fails, the status of the distributed storage device is set to abnormal, and an alarm message is issued. At the same time, it is determined whether the status of the network card has returned to normal. If the network card has returned to normal, the status of the distributed storage device is updated to normal. If the network card has not returned to normal, the status of the distributed storage device is still abnormal.

[0093] The present invention discloses a detection method. The present invention can detect the service status of a logical storage unit in a distributed storage device before a server performs a read / write operation on the distributed storage device, determine the working status of the distributed storage device according to the service status of the logical storage unit, and when the working status of the distributed storage device is determined, issue an alarm message to remind a user, so that the user can know in time whether the distributed storage device is abnormal, avoid performing data read / write operations when the distributed storage device is abnormal, thereby affecting user services, and improve the user's trust in the distributed storage system.

[0094] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0095] Reference Figure 3 , shows a structural block diagram of a detection device provided by an embodiment of the present invention, which is applied to a server, and the server includes a distributed storage device. The device may include the following modules:

[0096] A first acquisition module 201 is used to detect the service status of a logical storage unit in the distributed storage device before performing a read or write operation on the distributed storage device;

[0097] A first determining module 202, configured to determine a working state of the distributed storage device according to a service state of a logical storage unit in the distributed storage device;

[0098] The issuing module 203 is used to issue an alarm message if the working state of the distributed storage device is abnormal, and the alarm message is used to remind the user that the distributed storage device is working abnormally.

[0099] The present invention discloses a detection device. The present invention can detect the service status of a logical storage unit in a distributed storage device before a server performs a read / write operation on the distributed storage device, determine the working status of the distributed storage device according to the service status of the logical storage unit, and when the working status of the distributed storage device is determined, issue an alarm message to remind a user, so that the user can know in time whether the distributed storage device is abnormal, avoid performing data read / write operations when the distributed storage device is abnormal, thereby affecting user services, and improving the user's trust in the distributed storage system.

[0100] In one embodiment of the present invention, the server is connected to the terminal device, and the apparatus further includes:

[0101] The second acquisition module is used to acquire the target data that the terminal device needs to read;

[0102] A first determination module, used to determine whether the target data exists in the distributed storage device;

[0103] The second determination module is used to determine the target device storing the target data if the target data does not exist in the distributed storage device, read the target data from the target device, and send it to the terminal device.

[0104] In one embodiment of the present invention, the server is connected to the terminal device, and the apparatus further includes:

[0105] A third acquisition module is used to acquire the data to be written that the terminal device needs to write;

[0106] The second judgment module is used to judge whether there is a copy corresponding to the data to be written in the distributed storage device;

[0107] A deletion module is used to store the data to be written in the distributed storage device if there is a copy corresponding to the data to be written in the distributed storage device, delete the copy corresponding to the data to be written, and determine whether there is a copy corresponding to the data to be written in other servers;

[0108] A communication module, used for establishing a socket connection between the distributed storage device and the target server if a copy corresponding to the data to be written exists in the target server among the other servers;

[0109] A third judgment module is used to judge whether the communication network between the distributed storage device and the target server is normal when the socket connection between the distributed storage device and the target server is established;

[0110] The sending module is used to send the data to be written to the target server if the communication network between the distributed storage device and the target server is normal, so as to update the copy in the target server.

[0111] In one embodiment of the present invention, the device further includes:

[0112] A third determination module is used to determine the failure type of the failure of writing the data to be written when writing the data to be written into the distributed storage device fails;

[0113] The statistics module is used to count the number of failure types. When the number reaches a preset value, the working state of the distributed storage device is set to abnormal.

[0114] In an embodiment of the present invention, the failure type includes one of network timeout, route unreachable, port occupied, and network unavailable for connection.

[0115] In an embodiment of the present invention, a distributed storage device includes a plurality of logical storage units, and a first determination module includes:

[0116] A judgment submodule, used to judge whether the multiple logical storage units are running;

[0117] The determination submodule is used to determine that the distributed storage device is operating abnormally if the multiple logical storage units are not operating.

[0118] In one embodiment of the present invention, the device further includes:

[0119] A monitoring module, used to monitor the network card status of the distributed storage device when the network status of the distributed storage device is abnormal;

[0120] The update module is used to update the working state of the distributed storage device to a normal state if the network card state returns to normal.

[0121] The present invention discloses a detection device. The present invention can detect the service status of a logical storage unit in a distributed storage device before a server performs a read / write operation on the distributed storage device, determine the working status of the distributed storage device according to the service status of the logical storage unit, and when the working status of the distributed storage device is determined, issue an alarm message to remind a user, so that the user can know in time whether the distributed storage device is abnormal, avoid performing data read / write operations when the distributed storage device is abnormal, thereby affecting user services, and improving the user's trust in the distributed storage system.

[0122] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0123] like Figure 4 , showing a structural block diagram of an electronic device 30 provided in an embodiment of the present invention, including:

[0124] A processor 301, a memory 302, and a computer program 3021 stored in the memory 302 and capable of running on the processor 301. When the computer program 3021 is executed by the processor 301, each process of the above-mentioned detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0125] like Figure 5 , shows a structural block diagram of a computer-readable storage medium 40 provided in an embodiment of the present invention. A computer program 401 is stored on the computer-readable storage medium 40. When the computer program 401 is executed by the processor, the various processes of the above-mentioned detection method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0126] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0127] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0128] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0131] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0132] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0133] The above is a detailed introduction to a detection method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a general technician in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A detection method, characterized in that: Applied to a server, the server comprising a distributed storage device, the method comprising: Before performing a read or write operation on a distributed storage device, detecting a service status of a logical storage unit in the distributed storage device; Determining the working state of the distributed storage device according to the service state of the logical storage unit in the distributed storage device; If the working state of the distributed storage device is an abnormal state, an alarm message is issued, and the alarm message is used to remind the user that the distributed storage device is working abnormally.

2. The method according to claim 1, characterized in that The server is connected to the terminal device. The method further comprises: Acquire target data that the terminal device needs to read; Determining whether the target data exists in the distributed storage device; If the target data does not exist in the distributed storage device, a target device storing the target data is determined, the target data is read from the target device, and sent to the terminal device.

3. The method according to claim 1, characterized in that The server is connected to the terminal device. The method further comprises: When the working state of the distributed storage device is normal, obtaining the data to be written that the terminal device needs to write; Determine whether there is a copy corresponding to the data to be written in the distributed storage device; If a copy corresponding to the data to be written exists in the distributed storage device, the data to be written is stored in the distributed storage device, the copy corresponding to the data to be written is deleted, and it is determined whether a copy corresponding to the data to be written exists in other servers; If a copy corresponding to the data to be written exists in the target server among the other servers, a socket connection is established between the distributed storage device and the target server; When the socket connection between the distributed storage device and the target server is established, Determine whether the communication network between the distributed storage device and the target server is normal; If the communication network between the distributed storage device and the target server is normal, the data to be written is sent to the target server to update the copy in the target server.

4. The method according to claim 3, characterized in that The method further comprises: When the writing of the data to be written into the distributed storage device fails, determining the failure type of the failure of writing the data to be written; The number of failure types is counted, and when the number reaches a preset value, the working state of the distributed storage device is set to abnormal.

5. The method according to claim 4, characterized in that The failure type includes one of network timeout, route unreachable, port occupied, and network unavailable.

6. The method according to claim 1, characterized in that The distributed storage device includes a plurality of logical storage units, and determining the working state of the distributed storage device according to the service states of the logical storage units in the distributed storage device includes: determining whether the plurality of logical storage units are in operation; If the plurality of logical storage units are not operating, it is determined that the distributed storage device is operating abnormally.

7. The method according to claim 1, characterized in that The method further comprises: When the network status of the distributed storage device is abnormal, monitoring the network card status of the distributed storage device; If the network card status returns to normal, the working status of the distributed storage device is updated to normal. Normal state.

8. A detection device, characterized in that: Applied to a server, the server includes a distributed storage device, and the apparatus includes: A first acquisition module, used for detecting the service status of a logical storage unit in the distributed storage device before performing a read or write operation on the distributed storage device; A first determining module, configured to determine a working state of the distributed storage device according to a service state of a logical storage unit in the distributed storage device; The issuing module is used to issue an alarm message if the working state of the distributed storage device is abnormal, and the alarm message is used to remind the user that the distributed storage device is working abnormally.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the detection method according to any one of claims 1 to 7 are implemented.

10. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the detection method according to any one of claims 1 to 7 are implemented.