CN114443332B - Storage pool detection method and device, electronic equipment and storage medium - Google Patents

Storage pool detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114443332B
CN114443332B CN202111600027.0A CN202111600027A CN114443332B CN 114443332 B CN114443332 B CN 114443332B CN 202111600027 A CN202111600027 A CN 202111600027A CN 114443332 B CN114443332 B CN 114443332B
Authority
CN
China
Prior art keywords
storage pool
target
target storage
pool
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111600027.0A
Other languages
Chinese (zh)
Other versions
CN114443332A (en
Inventor
许江永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111600027.0A priority Critical patent/CN114443332B/en
Publication of CN114443332A publication Critical patent/CN114443332A/en
Application granted granted Critical
Publication of CN114443332B publication Critical patent/CN114443332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a method and device for detecting a storage pool, electronic equipment and a storage medium. The method comprises the following steps: monitoring storage pool deployment events acting in the distributed storage system, wherein the storage pool deployment events are used for deploying storage pools in the distributed storage system; determining a target storage pool corresponding to a storage pool deployment event from a distributed storage system; detecting a target storage pool to obtain a detection result corresponding to the target storage pool; and under the condition that the detection result is used for indicating that the target storage pool is abnormal, determining the abnormal information corresponding to the target storage pool, and executing processing operation according to the abnormal information. According to the method and the device, after the storage pool deployment event is monitored, the target storage pool corresponding to the storage pool deployment event can be automatically detected, so that whether the target storage pool can normally operate after deployment in the distributed storage cluster is completed or not is determined, the state of the storage pool is timely acquired, the storage pool is not required to be checked after faults occur, and the service efficiency of the storage pool is improved.

Description

Storage pool detection method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for detecting a storage pool, an electronic device, and a storage medium.
Background
The invention relates to a distributed block erasure storage pool management scheme. In the distributed block storage system, a storage pool formed by the osd resources plays a very important role as a basic resource module of a block storage core service such as logical volume management and volume mapping management. In the existing storage management system, a general storage pool exists independently, and when a hardware medium is a common disk, the read-write performance encounters a bottleneck; the lack of perfect storage pool monitoring can not grasp the state information of the storage pool in real time, and once faults occur, fault positioning is time-consuming and labor-consuming.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides a method, a device, electronic equipment and a storage medium for detecting a storage pool.
According to an aspect of the embodiments of the present application, there is provided a method for detecting a storage pool, including:
monitoring a storage pool deployment event acting in a distributed storage system, wherein the storage pool deployment event is used for deploying a storage pool in the distributed storage system;
determining a target storage pool corresponding to the storage pool deployment event from the distributed storage system;
detecting the target storage pool to obtain a detection result corresponding to the target storage pool;
and under the condition that the detection result is used for indicating that the target storage pool is abnormal, determining the abnormal information corresponding to the target storage pool, and executing processing operation according to the abnormal information.
Further, the monitoring acts on a storage pool deployment event in the distributed storage system, including:
acquiring a storage pool creation request, wherein the storage pool creation request carries a storage pool type and configuration information for creating a storage pool;
creating a target storage pool corresponding to the storage pool type in the distributed storage system according to the configuration information;
and acquiring the creation progress of the target storage pool, and generating the storage pool deployment event under the condition that the creation progress is used for indicating that the creation of the target storage pool is completed.
Further, the storage pool types include: data type and cache type;
before creating the target storage pool corresponding to the storage pool type in the distributed storage system according to the configuration information, the method further comprises:
acquiring a currently deployed historical storage pool in the distributed storage system;
and generating prompt information under the condition that a storage pool of the cache type does not exist in the historical storage pool, wherein the prompt information is used for prompting that the storage pool of the cache type is firstly created.
Further, the creating, according to the configuration information, the target storage pool corresponding to the storage pool type in the distributed storage system includes:
initializing based on a preset class template to obtain an initial storage pool object;
the configuration information is used as the static attribute of the initial storage pool object to obtain a target storage pool object, and a creation task is generated based on the target storage pool object and the storage pool type;
and calling a target creation method to execute the creation task and creating a target storage pool corresponding to the storage pool type.
Further, the detecting the target storage pool to obtain a detection result corresponding to the target storage pool includes:
detecting the target storage pool according to a preset detection item to obtain detection data corresponding to the preset detection item;
and determining a detection result corresponding to the target storage pool based on the detection data.
Further, the preset detection items include: capacity and status information are used;
detecting the target storage pool according to a preset detection item to obtain detection data corresponding to the preset detection item, including:
acquiring the current corresponding use capacity and total capacity of the target storage pool, and calculating the use rate based on the use capacity and the total capacity;
reading the running state of the target storage pool from a state interface;
and determining the usage rate and the running state as the detection data.
Further, the executing a processing operation according to the exception information includes:
sending first prompt information under the condition that the abnormal information is abnormal in use rate, wherein the first prompt information is used for prompting capacity expansion of the target storage pool;
and sending second prompt information under the condition that the abnormal information is abnormal in the running state, wherein the second prompt information is used for detecting the distributed storage system.
According to another aspect of the embodiments of the present application, there is also provided a device for detecting a storage pool, including:
a monitoring module, configured to monitor a storage pool deployment event acting on a distributed storage system, where the storage pool deployment event is configured to deploy a storage pool in the distributed storage system;
the determining module is used for determining a target storage pool corresponding to the storage pool deployment event from the distributed storage system;
the detection module is used for detecting the target storage pool and obtaining a detection result corresponding to the target storage pool;
and the execution module is used for determining the abnormality information corresponding to the target storage pool under the condition that the detection result is used for indicating the abnormality of the target storage pool, and executing the repairing operation according to the abnormality information.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that performs the steps described above when running.
According to another aspect of the embodiments of the present application, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; and a processor for executing the steps of the method by running a program stored on the memory.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the method provided by the embodiment of the invention, after the storage pool deployment event is monitored, the target storage pool corresponding to the storage pool deployment event can be automatically detected, so that whether the target storage pool can normally run or not after the deployment of the target storage pool in the distributed storage cluster is completed is determined, the state of the storage pool is timely acquired, the storage pool is not required to be checked after the storage pool fails, the service efficiency of the storage pool is improved, and the problem that the state information of the storage pool cannot be mastered in real time in the prior art is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a method for detecting a storage pool according to an embodiment of the present application;
fig. 2 is a block diagram of a device for detecting a storage pool according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments, the exemplary embodiments of the present application and the descriptions thereof are used to explain the present application and do not constitute undue limitations of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a method and device for detecting a storage pool, electronic equipment and a storage medium. The method provided by the embodiment of the invention can be applied to any needed electronic equipment, for example, the electronic equipment can be a server, a terminal and the like, is not particularly limited, and is convenient to describe and is called as the electronic equipment for short hereinafter.
According to an aspect of the embodiments of the present application, a method embodiment of a method for detecting a storage pool is provided. Fig. 1 is a flowchart of a method for detecting a storage pool according to an embodiment of the present application, where, as shown in fig. 1, the method includes:
in step S11, a storage pool deployment event acting on the distributed storage system is monitored, where the storage pool deployment event is used to deploy a storage pool in the distributed storage system.
In the embodiment of the present application, step S11, monitoring a storage pool deployment event acting on a distributed storage system, includes the following steps A1-A3:
and step A1, acquiring a storage pool creation request, wherein the storage pool creation request carries a storage pool type and configuration information for creating a storage pool.
In an embodiment of the present application, the storage pool creation request may be initiated by a user at an operation interface, where the storage pool type includes: a data type (i.e., a data pool) and a cache type (i.e., a cache pool). The configuration information of the cache type includes: storage pool name, copy policy, alarm threshold, fault domain settings, and SSD disk selection. The configuration information of the cache type includes: storage pool name, erasure policy, alarm threshold, fault domain setting and HDD disk selection, and a cache pool to be bound.
In an embodiment of the present application, before creating a target storage pool corresponding to a storage pool type in the distributed storage system according to the configuration information, the method further includes: and acquiring a currently deployed historical storage pool in the distributed storage system, and generating prompt information under the condition that a storage pool of a cache type does not exist in the historical storage pool, wherein the prompt information is used for prompting that the storage pool of the cache type is firstly created.
It should be noted that, the creation of the cache pool needs to be performed first, and if the cache pool does not exist, the request of first creating the cache pool is prompted when the data pool is created. After the storage pool of the cache type is created preferentially, the data pool is created again, and then the data pool and the cache pool are bound, so that a client can interact with the cache pool directly, and meanwhile, the binding relation between the data pool and the cache pool is stored in a database.
According to the embodiment of the application, the data pool and the cache pool are created to be bound, the binding relation table is designed to store the binding relation through the database of the persistent layer, the binding of the data pool and the cache pool is completed, when a client performs data read-write operation, the client can directly interact with the cache pool, and the data is regularly brushed down to the data pool, so that the data pool stores a large amount of data, and the performance of the distributed storage cluster is greatly improved.
And step A2, creating a target storage pool corresponding to the storage pool type in the distributed storage system according to the configuration information.
In the embodiment of the present application, creating a target storage pool corresponding to a storage pool type in a distributed storage system according to configuration information includes the following steps a201-a203:
step A201, initializing based on a preset class template to obtain an initial storage pool object.
Step A202, taking the configuration information as the static attribute of the initial storage pool object, obtaining a target storage pool object, and generating a creation task based on the target storage pool object and the storage pool type.
And step A203, a target creation method is called to execute a creation task, and a target storage pool corresponding to the storage pool type is created.
In this embodiment of the present application, through setting parameters of an operation interface storage pool, forwarding the parameters to a CLI (command-line interface) layer through a rest layer, analyzing and calling parameters to a task manager module, allocating a task id to the task by the task manager, where the task id and the description information can be briefly described by the description information, providing an error code library, matching corresponding error codes in the error code library when an abnormality occurs in a task manager execution flow, and displaying task progress, task description and execution results (if an abnormality may display an error cause, and facilitate positioning of an abnormality problem) in a list form.
In this embodiment, the developer defines a class template for the storage pool, where the class template includes a type of pool, a name of the pool, a protection policy for the pool, an alarm threshold for the pool, a failure domain for the pool, and disk attributes for the pool, and a private method for creating and deleting. After a storage pool creation task is generated, initializing a storage pool object according to a class template, assigning a GUI transmission value to the static attribute of the storage pool object, calling a private creation method, performing operation of the creation task, firstly adjusting a cache structure, generating a socket of a root level, generating a naming rule according to the type of the storage pool, such as ssd_% d of a cache pool, and sequentially increasing the data pool to be hdd_% d according to the number of the created pools, wherein the naming rule is respectively%s-ssd_% d and%s-hdd_% d, wherein%s represents a host name as the root level, moving host under the root level, finally moving osd information in a disk issued by the GUI under the host structure, completing generation of the cache tree structure, and calling an interface created by the storage pool to generate the storage pool.
And when the data is the data pool, binding the data pool and the cache pool through the tier add and the tier set-overlay. Designing a storage pool binding information table pool_bind_info, which comprises pool_type (storage pool type), data_pool (data pool), cache_pool (cache pool), pro_type (protection policy type), and is_bind (whether binding is not) fields; when a cache pool is created, table data is inserted, data_pool is empty, and is_bind is 0 and unbound; when creating a data pool, the table data is updated, and an is_bind of 1 indicates that it is bound.
And step A3, acquiring the creation progress of the target storage pool, and generating a storage pool deployment event under the condition that the creation progress is used for indicating the completion of the creation of the target storage pool.
In the embodiment of the application, the creation progress of the target storage pool is queried in real time, and if the creation progress is used for indicating that the creation of the target storage pool is completed, the storage pool is determined to be deployed in the distributed storage system, and a storage pool deployment event is triggered at the time, so that the completion of storage pool deployment is informed. And after the storage pool deployment is completed, the storage pool can be in an active state, and operations such as data storage, query and the like are executed.
Step S12, determining a target storage pool corresponding to the storage pool deployment event from the distributed storage system.
In this embodiment of the present application, after a storage pool deployment event is triggered, the storage pool may enter an active state, so it is required to determine, from the distributed storage system, a target storage pool corresponding to the storage pool deployment event, thereby detecting whether the target storage pool can normally operate after entering the active state.
And step S13, detecting the target storage pool to obtain a detection result corresponding to the target storage pool.
In the embodiment of the present application, step S13, detecting a target storage pool, to obtain a detection result corresponding to the target storage pool, includes the following steps B1-B2:
and B1, detecting the target storage pool according to a preset detection item to obtain detection data corresponding to the preset detection item.
In this embodiment of the present application, the preset detection items include: capacity and status information are used. Before detecting the target storage pool, whether the target storage pool meets detection conditions is further required to be judged, the detection standard is whether the node is a master node corresponding to the virtual IP, whether the node is stored in the storage pool or not, if the two judgment standards are met, the thread pool is initialized according to the number of the storage pools, and the thread pool is distributed to each storage pool detection thread.
In the embodiment of the application, step B1, detecting the target storage pool according to a preset detection item to obtain detection data corresponding to the preset detection item, includes the following steps C1-C3:
and step C1, acquiring the current corresponding used capacity and the total capacity of the target storage pool, and calculating the use rate based on the used capacity and the total capacity.
And step C2, reading the running state of the target storage pool from the state interface.
And C3, determining the utilization rate and the running state as detection data.
In the embodiment of the present application, the calculation process of the usage rate is: (usage capacity of target storage pool/total capacity of target storage pool) ×100%. The operational status of the target storage pool may be obtained through the query status interface, and the operational status may be degraded or abnormal. The resulting usage and operating status are then determined as detection data.
And step B2, determining a detection result corresponding to the target storage pool based on the detection data.
In the embodiment of the present application, the determination of the detection result corresponding to the target storage pool based on the detection data may be: comparing the utilization rate with a preset threshold value, and if the utilization rate is smaller than the preset threshold value, determining that the current storage capacity of the target storage pool is in a normal state. If the utilization rate is greater than or equal to the preset threshold value, determining that the current storage capacity of the target storage pool is in an emergency state, wherein the storage capacity of the target storage pool is insufficient to support the storage service of the target storage pool. And meanwhile, determining whether the target storage pool is abnormal according to the running state, for example: the target storage pool is not capable of reading and writing data, and so on.
Step S14, determining the abnormality information corresponding to the target storage pool and executing the processing operation according to the abnormality information under the condition that the detection result is used for indicating the abnormality of the target storage pool.
In the embodiment of the application, the processing operation is executed according to the anomaly information, and the processing operation comprises the following steps D1-D2:
and D1, sending first prompt information under the condition that the abnormal information is abnormal in use rate, wherein the first prompt information is used for prompting the expansion of the target storage pool.
And D2, sending second prompt information under the condition that the abnormal information is abnormal in the running state, wherein the second prompt information is used for detecting the distributed storage system.
In this embodiment of the present application, corresponding prompt information is provided according to the anomaly information, where the prompt information includes repair information, for example: if the use rate is abnormal, the need of capacity expansion is indicated. And if the running state is abnormal, prompting that the cluster state, the node state or the osd state and the like need to be checked, so that corresponding recovery measures are taken.
The method provided by the embodiment of the invention monitors the residual capacity and the running state of the storage pool, so that a user can timely master the state of the storage pool, and distributes a proper repairing strategy through analysis of alarm description, such as the need of expanding the storage pool, whether the state of a node is abnormal or the osd state is abnormal, and the like, and timely recovery of the storage pool is performed.
According to the method provided by the embodiment of the invention, after the storage pool deployment event is monitored, the target storage pool corresponding to the storage pool deployment event can be automatically detected, so that whether the target storage pool can normally run or not after the deployment of the target storage pool in the distributed storage cluster is completed is determined, the state of the storage pool is timely acquired, the storage pool is not required to be checked after the storage pool fails, the service efficiency of the storage pool is improved, and the problem that the state information of the storage pool cannot be mastered in real time in the prior art is solved.
In the embodiment of the application, after cluster deployment is completed, a cache service is started, chi Huancun thread pair indexes including IOPS, bandwidth, reconstruction and time delay indexes are stored, point data are stored in a cache queue, cached performance data are put in batches for 5 minutes at regular time, and an operation interface can check the performance data in real time according to selection of time conditions.
In the embodiment of the application, when a user can issue a storage pool to delete through an operation interface, a task manager allocates task id and description information for the user, the pool is deleted by calling a deletion interface of the storage pool, a root and host level of the pool is removed, an osd resource is moved to a default resource storage warehouse of a default root, a pool_bind_info table is updated, related information of the pool is updated, a task for deleting a binding pool is started, the binding pool is restored, and finally the binding data of the binding table is deleted, so that the deletion and unbinding of the pool are completed.
Fig. 2 is a block diagram of a device for detecting a storage pool according to an embodiment of the present application, where the device may be implemented as part or all of an electronic device by using software, hardware, or a combination of both. As shown in fig. 2, the apparatus includes:
a listening module 21, configured to listen for a storage pool deployment event acting on the distributed storage system, where the storage pool deployment event is used to deploy a storage pool in the distributed storage system;
a determining module 22, configured to determine a target storage pool corresponding to a storage pool deployment event from the distributed storage system;
the detection module 23 is configured to detect a target storage pool, and obtain a detection result corresponding to the target storage pool;
and the execution module 24 is configured to determine, if the detection result is used to indicate that the target storage pool is abnormal, abnormality information corresponding to the target storage pool, and execute a repair operation according to the abnormality information.
In this embodiment of the present application, the monitoring module 21 is configured to obtain a storage pool creation request, where the storage pool creation request carries a storage pool type and configuration information for creating a storage pool; creating a target storage pool corresponding to the storage pool type in the distributed storage system according to the configuration information; and acquiring the creation progress of the target storage pool, and generating a storage pool deployment event under the condition that the creation progress is used for indicating that the creation of the target storage pool is completed.
In the embodiment of the application, the storage pool types include: data type and cache type;
a monitoring module 21, configured to obtain a currently deployed historical storage pool in the distributed storage system; and generating prompt information under the condition that a storage pool of the cache type does not exist in the historical storage pool, wherein the prompt information is used for prompting that the storage pool of the cache type is created first.
In the embodiment of the present application, the monitoring module 21 is configured to initialize based on a preset class template to obtain an initial storage pool object; the configuration information is used as the static attribute of the initial storage pool object to obtain a target storage pool object, and a creation task is generated based on the target storage pool object and the storage pool type; and calling a target creation method to execute the creation task and creating a target storage pool corresponding to the storage pool type.
In this embodiment, the detection module 23 is configured to detect the target storage pool according to a preset detection item, so as to obtain detection data corresponding to the preset detection item; and determining a detection result corresponding to the target storage pool based on the detection data.
In this embodiment of the present application, the preset detection items include: capacity and status information are used;
a detection module 23, configured to obtain a current corresponding usage capacity and a total capacity of the target storage pool, and calculate a usage rate based on the usage capacity and the total capacity; reading the running state of the target storage pool from the state interface; the usage and the operating status are determined as detection data.
In this embodiment of the present application, the execution module 24 is configured to send first hint information when the anomaly information is that the usage rate is anomaly, where the first hint information is used to hint to expand the target storage pool.
In this embodiment, the execution module 24 is configured to send a second hint information when the exception information is an operation state exception, where the second hint information is used to detect the distributed storage system.
According to the method and the device for monitoring the storage pool deployment event, the target storage pool corresponding to the storage pool deployment event can be automatically detected after the storage pool deployment event is monitored, so that whether the target storage pool can normally operate after deployment in the distributed storage cluster is completed or not is determined, the state of the storage pool is timely acquired, the storage pool is not required to be checked after the storage pool fails, the service efficiency of the storage pool is improved, and the problem that state information of the storage pool cannot be mastered in real time in the prior art is solved.
The embodiment of the application further provides an electronic device, as shown in fig. 3, the electronic device may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the above embodiments.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided herein, a computer readable storage medium is provided, where instructions are stored, which when executed on a computer, cause the computer to perform a method for detecting a storage pool according to any one of the above embodiments.
In yet another embodiment provided herein, a computer program product containing instructions that, when executed on a computer, cause the computer to perform a method of detecting a storage pool as described in any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), etc.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.
The foregoing is merely a specific embodiment of the application to enable one skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (5)

1. A method for detecting a storage pool, comprising:
monitoring a storage pool deployment event acting in a distributed storage system, wherein the storage pool deployment event is used for deploying a storage pool in the distributed storage system;
determining a target storage pool corresponding to the storage pool deployment event from the distributed storage system;
detecting the target storage pool to obtain a detection result corresponding to the target storage pool;
determining the abnormality information corresponding to the target storage pool under the condition that the detection result is used for indicating that the target storage pool is abnormal, and executing processing operation according to the abnormality information;
the listening for storage pool deployment events in a distributed storage system comprises:
acquiring a storage pool creation request, wherein the storage pool creation request carries a storage pool type and configuration information for creating a storage pool;
creating a target storage pool corresponding to the storage pool type in the distributed storage system according to the configuration information;
acquiring the creation progress of the target storage pool, and generating the storage pool deployment event under the condition that the creation progress is used for indicating that the creation of the target storage pool is completed;
the storage pool types include: data type and cache type;
before creating the target storage pool corresponding to the storage pool type in the distributed storage system according to the configuration information, the method further comprises:
acquiring a currently deployed historical storage pool in the distributed storage system;
generating prompt information under the condition that a storage pool of a cache type does not exist in the historical storage pool, wherein the prompt information is used for prompting that the storage pool of the cache type is firstly created;
the creating, according to the configuration information, a target storage pool corresponding to the storage pool type in the distributed storage system includes:
initializing based on a preset class template to obtain an initial storage pool object;
the configuration information is used as the static attribute of the initial storage pool object to obtain a target storage pool object, and a creation task is generated based on the target storage pool object and the storage pool type;
a target creation method is called to execute the creation task, and a target storage pool corresponding to the storage pool type is created;
and detecting the target storage pool to obtain a detection result corresponding to the target storage pool, wherein the detection result comprises:
detecting the target storage pool according to a preset detection item to obtain detection data corresponding to the preset detection item;
determining a detection result corresponding to the target storage pool based on the detection data;
the preset detection items comprise: capacity and status information are used;
detecting the target storage pool according to a preset detection item to obtain detection data corresponding to the preset detection item, including:
acquiring the current corresponding use capacity and total capacity of the target storage pool, and calculating the use rate based on the use capacity and the total capacity;
reading the running state of the target storage pool from a state interface;
determining the usage rate and the operating state as the detection data;
the executing processing operation according to the anomaly information comprises the following steps:
and under the condition that the abnormal information is abnormal in utilization rate, sending first prompt information, wherein the first prompt information is used for prompting capacity expansion of the target storage pool.
2. The method of claim 1, wherein performing processing operations based on the exception information further comprises:
and sending second prompt information under the condition that the abnormal information is abnormal in the running state, wherein the second prompt information is used for detecting the distributed storage system.
3. A device for detecting a storage pool, comprising:
a monitoring module, configured to monitor a storage pool deployment event acting on a distributed storage system, where the storage pool deployment event is configured to deploy a storage pool in the distributed storage system;
the determining module is used for determining a target storage pool corresponding to the storage pool deployment event from the distributed storage system;
the detection module is used for detecting the target storage pool and obtaining a detection result corresponding to the target storage pool;
the execution module is used for determining the abnormal information corresponding to the target storage pool under the condition that the detection result is used for indicating the abnormality of the target storage pool, and executing the repairing operation according to the abnormal information;
the monitoring module is used for acquiring a storage pool creation request, wherein the storage pool creation request carries a storage pool type and configuration information for creating a storage pool; creating a target storage pool corresponding to the storage pool type in the distributed storage system according to the configuration information; acquiring the creation progress of the target storage pool, and generating a storage pool deployment event under the condition that the creation progress is used for indicating the completion of the creation of the target storage pool;
the storage pool types include: data type and cache type;
the monitoring module is used for acquiring a currently deployed historical storage pool in the distributed storage system; generating prompt information under the condition that a storage pool of a cache type does not exist in the historical storage pool, wherein the prompt information is used for prompting to firstly establish the storage pool of the cache type;
the monitoring module is used for initializing based on a preset class template to obtain an initial storage pool object; the configuration information is used as the static attribute of the initial storage pool object to obtain a target storage pool object, and a creation task is generated based on the target storage pool object and the storage pool type; the target creating method is called to execute the creating task, and a target storage pool corresponding to the storage pool type is created;
the detection module is used for detecting the target storage pool according to a preset detection item to obtain detection data corresponding to the preset detection item; determining a detection result corresponding to the target storage pool based on the detection data;
the preset detection items comprise: capacity and status information are used;
the detection module is used for acquiring the current corresponding use capacity and total capacity of the target storage pool and calculating the use rate based on the use capacity and the total capacity; reading the running state of the target storage pool from the state interface; determining the usage rate and the running state as detection data;
and the execution module is used for sending first prompt information under the condition that the abnormal information is the abnormal use rate, wherein the first prompt information is used for prompting the expansion of the target storage pool.
4. A storage medium comprising a stored program, wherein the program, when run, performs the method of claim 1 or 2 by a processor.
5. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for executing the method of claim 1 or 2 by running a program stored on a memory.
CN202111600027.0A 2021-12-24 2021-12-24 Storage pool detection method and device, electronic equipment and storage medium Active CN114443332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111600027.0A CN114443332B (en) 2021-12-24 2021-12-24 Storage pool detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111600027.0A CN114443332B (en) 2021-12-24 2021-12-24 Storage pool detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114443332A CN114443332A (en) 2022-05-06
CN114443332B true CN114443332B (en) 2024-01-09

Family

ID=81364418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111600027.0A Active CN114443332B (en) 2021-12-24 2021-12-24 Storage pool detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114443332B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499304B (en) * 2022-07-29 2024-03-08 天翼云科技有限公司 Automatic deployment method, device, equipment and product for distributed storage
CN115904819B (en) * 2023-02-09 2023-07-28 云和恩墨(北京)信息技术有限公司 Database backup data verification method and device
CN115934001B (en) * 2023-03-08 2023-05-12 浪潮电子信息产业股份有限公司 Erasure pool selection method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669631A (en) * 2018-12-10 2019-04-23 浪潮(北京)电子信息产业有限公司 A kind of storage pool planing method, device, equipment and computer readable storage medium
CN111104283A (en) * 2019-11-29 2020-05-05 浪潮电子信息产业股份有限公司 Fault detection method, device, equipment and medium of distributed storage system
CN112269772A (en) * 2020-10-30 2021-01-26 深信服科技股份有限公司 File deployment method, system, equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10180807B2 (en) * 2011-10-12 2019-01-15 Tata Consultancy Services Limited Method and system for consolidating a plurality of heterogeneous storage systems in a data center

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669631A (en) * 2018-12-10 2019-04-23 浪潮(北京)电子信息产业有限公司 A kind of storage pool planing method, device, equipment and computer readable storage medium
CN111104283A (en) * 2019-11-29 2020-05-05 浪潮电子信息产业股份有限公司 Fault detection method, device, equipment and medium of distributed storage system
CN112269772A (en) * 2020-10-30 2021-01-26 深信服科技股份有限公司 File deployment method, system, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114443332A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN114443332B (en) Storage pool detection method and device, electronic equipment and storage medium
US10379838B1 (en) Update and rollback of code and API versions
EP3149591B1 (en) Tracking application deployment errors via cloud logs
US8661291B2 (en) Diagnosing a fault incident in a data center
US7165189B1 (en) Distributed test framework for clustered systems
US10725763B1 (en) Update and rollback of configurations in a cloud-based architecture
US7945751B2 (en) Disk image inheritance
US20110296398A1 (en) Systems and methods for determining when to update a package manager software
US20140188815A1 (en) Annotation of Resources in a Distributed Execution Environment
US10069702B2 (en) Dynamic discovery of applications, external dependencies, and relationships
US7370101B1 (en) Automated testing of cluster data services
US20090013321A1 (en) Managing virtual computers
US10949401B2 (en) Data replication in site recovery environment
JP2017201470A (en) Setting support program, setting support method, and setting support device
US8970598B1 (en) Visualizing the similarity of resources in a distributed execution environment
CN111897558A (en) Kubernets upgrading method and device for container cluster management system
US11221943B2 (en) Creating an intelligent testing queue for improved quality assurance testing of microservices
US11113186B1 (en) Testing and publishing of resource handlers in a cloud environment
CN112162761A (en) Method, system and equipment for automatically deploying project to public cloud containerization platform
US20220067065A1 (en) Providing instant and distributed access to a source blob via copy-on-read blobs and link blobs
CN111694724A (en) Testing method and device of distributed table system, electronic equipment and storage medium
JP2023044720A (en) Computer implemented method for recovering crashed application, computer program product, and remote computer server (remote recovery of crashed process)
US11262932B2 (en) Host-aware discovery and backup configuration for storage assets within a data protection environment
CN115150253B (en) Fault root cause determining method and device and electronic equipment
US11474904B2 (en) Software-defined suspected storage drive failure identification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant