CN114356211B - Storage space processing method and device, electronic equipment and storage medium - Google Patents

Storage space processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114356211B
CN114356211B CN202111391879.3A CN202111391879A CN114356211B CN 114356211 B CN114356211 B CN 114356211B CN 202111391879 A CN202111391879 A CN 202111391879A CN 114356211 B CN114356211 B CN 114356211B
Authority
CN
China
Prior art keywords
storage space
target
data
state information
fault
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
CN202111391879.3A
Other languages
Chinese (zh)
Other versions
CN114356211A (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 CN202111391879.3A priority Critical patent/CN114356211B/en
Publication of CN114356211A publication Critical patent/CN114356211A/en
Application granted granted Critical
Publication of CN114356211B publication Critical patent/CN114356211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • 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

Landscapes

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

Abstract

The application discloses a storage space processing method, a storage space processing device, electronic equipment and a storage medium. The method comprises the following steps: acquiring first state information currently displayed in a plurality of storage spaces of a storage pool; determining a storage space of which the first state information belongs to a use state as a target storage space; generating a data query task based on the target storage space, wherein the data query task is used for querying the data service condition of the data in the target storage space; and inquiring second state information actually corresponding to the target storage space according to the data inquiry task, and locking the target storage space so as not to release metadata to the target storage space. According to the method provided by the application, the invalid storage space is determined by inquiring the actual use condition of the data in the storage space, the invalid storage space is recovered, the real and effective storage space of each used storage space is ensured, the space leakage and the waste are avoided, and the data available space occupation ratio of the equipment can be improved.

Description

Storage space processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for processing a storage space, an electronic device, and a storage medium.
Background
With the increasing size of big data applications, the processing requirements of massive data put higher demands on the storage performance of computer systems. Full flash memory rapidly takes the leading position in the memory field with the performance advantage, and the optimal development and stability maintenance of the full flash memory are also important subjects which are required to be perfected continuously. The metadata space in full flash storage is divided into multiple grains at sector granularity, each of which maintains byte-independent state information. The gran adopts a preassigned mode to carry out space management, and when node faults occur, the gran in an allocated state can be not actually used, so that metadata space leakage is caused.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the application provides a processing method and device of a storage space, electronic equipment and a storage medium.
According to an aspect of an embodiment of the present application, there is provided a method for processing a storage space, which is applied to a controller disposed in a storage device, the method including:
acquiring first state information currently displayed in a plurality of storage spaces of a storage pool, wherein the storage pool is deployed in the storage device;
determining the storage space of the first state information belonging to the use state as a target storage space;
generating a data query task based on the target storage space, wherein the data query task is used for querying the data service condition of the data in the target storage space;
and inquiring second state information actually corresponding to the target storage space according to the data inquiry task, and locking the target storage space so as not to release metadata for the target storage space.
Further, the obtaining the first status information currently displayed in the plurality of storage spaces in the storage pool includes:
acquiring a target array, wherein the target array comprises the use condition of the storage space;
first state information for a plurality of storage spaces of the storage pool is determined based on usage in a target array.
Further, the querying, according to the data querying task, the second state information actually corresponding to the target storage space includes:
sending a data query task to a manager arranged in the storage device, so that the manager queries the data use condition of data in a storage interval according to the data query task;
and determining second state information actually corresponding to the target storage space according to the data use condition fed back by the manager.
Further, after the second state information actually corresponding to the target storage space is queried according to the data query task and the target storage space is locked, the method further includes:
updating the first state information currently displayed by the target storage space to obtain updated first state information under the condition that the second state information is used for indicating that the target storage space is in an unused state, wherein the updated first state information is used for indicating that the target storage space is in the unused state;
and under the condition that the updating of the first state information currently displayed by the target storage space is completed, unlocking the target storage space after the state updating, so that the target storage space after the state updating receives the released metadata.
Further, after the second state information corresponding to the target storage space is queried according to the data query task and the target storage space is locked, the method further includes:
receiving a fault processing task;
scanning a fault storage space with faults in the storage pool based on the fault processing task;
detecting whether metadata exists in the fault storage space;
and under the condition that metadata exist in the fault storage space, migrating the metadata, and executing fault processing operation on the fault storage space.
Further, the step of migrating the metadata in the case that metadata exists in the failure storage space includes:
determining the data type of the metadata in the fault storage space under the condition that the metadata exists in the fault storage space;
acquiring a target storage space meeting the data type from other storage spaces except the fault storage space in the storage pool;
and migrating the metadata to the target storage space.
Further, the performing a fault handling operation on the fault storage space includes:
detecting a target fault type corresponding to the fault storage space;
obtaining a fault handling policy, wherein the fault handling policy comprises: the fault type and at least one target processing operation corresponding to the fault type;
acquiring a target processing operation corresponding to the target fault type from the fault processing strategy;
and processing the fault storage space according to the target processing operation.
According to another aspect of the embodiment of the present application, there is also provided a data processing apparatus including:
the storage pool comprises an acquisition module, a storage device and a storage module, wherein the acquisition module is used for acquiring first state information currently displayed in a plurality of storage spaces of the storage pool, and the storage pool is deployed in the storage device;
the determining module is used for determining the storage space of the first state information belonging to the use state as a target storage space;
the generation module is used for generating a data query task based on the target storage space, wherein the data query task is used for querying the data use condition of the data in the target storage space;
and the processing module is used for inquiring the second state information actually corresponding to the target storage space according to the data inquiry task and locking the target storage space so as not to release metadata for the target storage space.
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 above steps when running.
According to another aspect of the embodiment of the present application, there is also 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 application, the invalid storage space is determined by inquiring the actual use condition of the data in the storage space, the invalid storage space is recovered, the real and effective storage space of each used storage space is ensured, the space leakage and the waste are avoided, and the data available space occupation ratio of the equipment can be improved.
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 application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person 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 processing a storage space according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for processing a storage space according to another embodiment of the present application;
FIG. 3 is a block diagram of a processing device for a memory space according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of 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, illustrative embodiments of the present application and 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 those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
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 storage space processing method, a storage space processing device, electronic equipment and a storage medium. The method provided by the embodiment of the application 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 embodiment of the application, a method embodiment of a storage space processing method is provided. Fig. 1 is a flowchart of a method for processing a storage space according to an embodiment of the present application, as shown in fig. 1, where the method includes:
step S11, obtaining first state information currently displayed by a plurality of storage spaces of a storage pool, wherein the storage pool is deployed in a storage device.
The method provided by the embodiment of the application is applied to the controller deployed in the storage device, and a target array is arranged in the controller and used for maintaining the use condition of each storage space in the storage pool.
Specifically, step S11, obtaining first state information currently displayed in a plurality of storage spaces in a storage pool, includes the following steps A1-A2:
step A1, a target array is obtained, wherein the target array comprises the use condition of a storage space.
In the embodiment of the application, the controller periodically detects the invalid storage space in the storage pool, so that the controller can call the target array before each detection, and reads the use condition of each storage space from the target array, wherein the target array stores the identification of the storage space and the use condition corresponding to the identification, and the use condition can comprise: used and ratio of use, or unused, etc.
Step A2, determining first state information of a plurality of storage spaces of the storage pool based on the use condition in the target array.
In the embodiment of the present application, after the controller reads the usage situation from the target array, the controller may directly determine the first state information of each storage space according to the usage situation, for example: if the use condition is displayed as used or the use proportion, the first state information is the use state. If the use condition is displayed as unused, the first state information is in an unused state.
Step S12, the storage space of the first state information belonging to the use state is determined as the target storage space.
In the embodiment of the application, after determining the first state information of each storage index, the controller gathers the first state information and determines the storage space of the first state information belonging to the use state as the target storage space.
Step S13, generating a data query task based on the target storage space, wherein the data query task is used for querying the data use condition of the data in the target storage space.
In the embodiment of the application, because the use state of the storage pool needs to be detected, and the data in the storage space is in failure or invalid state, or whether the storage space is actually used is queried, a data query task needs to be generated based on the target storage space, the data query task is used for querying the data use condition of the data in the target storage space, and specifically, the data query task is generated through the data identification or the data characteristics in the target storage space.
And S14, inquiring second state information actually corresponding to the target storage space according to the data inquiry task, and locking the target storage space so that metadata is not released to the target storage space any more.
In the embodiment of the present application, step S14, the step of querying the second state information actually corresponding to the target storage space according to the data querying task, includes the following steps B1-B2:
and step B1, sending a data query task to a manager arranged in the storage device, so that the manager queries the data use condition of the data in the storage section according to the data query task.
In the embodiment of the application, after generating the data query task, the controller sends the data query task to the data use condition of the data in the storage device, and the manager is used for storing the data use condition of the data, such as data use, data consumption, validity period of the data, and the like. And the manager feeds back the data use condition to the controller after collecting the data use condition.
And step B2, determining second state information actually corresponding to the target storage space according to the data use condition fed back by the manager.
In the embodiment of the present application, the controller determines that the target storage space actually corresponds to the second state information for the data usage, for example: and after the data use condition shows that the data is damaged, cannot be used or the data validity period expires, determining that the target storage space actually corresponds to the second state information as an unused state. Or after the data use condition shows that the data is normally used or the data is still in the validity period, determining the second state information actually corresponding to the target storage space as a use state.
In the embodiment of the application, when the data service condition of the data in the target storage space is inquired, the target storage space is locked, so that the data cannot be released to the target storage space at the moment, and the mutual exclusivity of data inquiry and data release is ensured.
According to the method provided by the application, the invalid storage space is determined by inquiring the actual use condition of the data in the storage space, the invalid storage space is recovered, the real and effective storage space of each used storage space is ensured, the space leakage and the waste are avoided, and the data available space occupation ratio of the equipment can be improved.
In the embodiment of the application, after the second state information actually corresponding to the target storage space is queried according to the data query task and the target storage space is locked, the method further comprises the following steps:
step S21, under the condition that the second state information is used for indicating that the target storage space is in an unused state, updating the first state information currently displayed by the target storage space to obtain updated first state information, wherein the updated first state information is used for indicating that the target storage space is in the unused state.
In the embodiment of the application, the controller updates the first state information currently displayed by the target storage space with the second state information being the unused state, so that the updated first state information is used for indicating that the target storage space is in the unused state.
Step S22, unlocking the target storage space after the state update under the condition that the first state information currently displayed in the target storage space is updated, so that the target storage space after the state update receives the released metadata.
In the embodiment of the application, after the first state information currently displayed in the target storage space is updated, the target storage space after the state update is unlocked, so that the subsequent release of data to the target storage space after the state update can be ensured, and the improvement of the data storage efficiency is facilitated.
In this embodiment of the present application, as shown in fig. 2, after querying second state information corresponding to a target storage space according to a data query task and locking the target storage space, the method further includes:
step S31, receiving a fault processing task.
In the embodiment of the application, the fault processing task may be sent by the sender device after the data storage in the storage pool fails, and at this time, the controller receives the fault processing task and executes corresponding fault detection operation according to the fault processing task. The fault handling tasks may be periodically generated by the controller.
Step S32, scanning the fault storage space with faults in the storage pool based on the fault processing task.
In the embodiment of the application, the controller scans the fault storage spaces with faults in the storage pool according to the fault scanning task, and specifically, the controller can inquire the storage records corresponding to each storage space and acquire the storage spaces with the reading failure times larger than the preset times from the storage records. And determining the storage space as a fault storage space, determining the storage space as a candidate fault storage space, then determining the storage duty ratio in the candidate fault storage space, and determining the storage space with the storage duty ratio larger than the preset duty ratio as the fault storage space.
Step S33, detecting whether metadata exists in the failure storage space.
And step S34, in the case that metadata exists in the fault storage space, the metadata is migrated, and fault processing operation is performed on the fault storage space.
In the embodiment of the present application, step S34, in the case that metadata exists in the failure storage space, migrates the metadata, includes the following steps C1-C3:
and step C1, determining the data type of the metadata in the fault storage space under the condition that the metadata exists in the fault storage space.
And step C2, acquiring a target storage space meeting the data type from other storage spaces except the fault storage space in the storage pool.
And C3, migrating the metadata to a target storage space.
In the embodiment of the application, under the condition that metadata exists in the fault storage space, the data type of the metadata in the fault storage space is determined, and the destination storage space of the metadata is determined according to the data type, for example: when the data type is operation metadata (metadata describing how the data is used), a storage area for storing the operation metadata of the image type is acquired as a destination storage area. Or the data type is shared metadata (a part describing how the data is shared, including interface mode, format, content, etc.), a storage area for storing the shared metadata is acquired as a destination storage area.
In the embodiment of the present application, step S34, performing a failure processing operation on the failed storage space, includes the following steps D1-D4:
and D1, detecting a target fault type corresponding to the fault storage space.
Step D2, acquiring a fault processing strategy, wherein the fault processing strategy comprises the following steps: the fault type and at least one target processing operation corresponding to the fault type.
Step D3, obtaining target processing operation corresponding to the target fault type from the fault processing strategy;
and D4, processing the fault storage space according to the target processing operation.
In the embodiment of the present application, the fault handling policy may be uploaded by a worker in advance, where the fault handling policy includes: fault type, and processing operation corresponding to the fault type. For example: the fault type is that the storage duty ratio reaches a preset upper limit, and the processing operation is as follows: and migrating the metadata in the storage area or deleting the metadata exceeding the validity period. In addition, the controller may notify the worker for repair after determining the storage area failure, or send a prompt message to other devices requesting to read and write data on the current storage device.
Fig. 3 is a block diagram of a processing apparatus for a storage space according to an embodiment of the present application, where the apparatus may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 3, the apparatus includes:
an obtaining module 41, configured to obtain first status information currently displayed in a plurality of storage spaces in a storage pool, where the storage pool is deployed in a storage device;
a determining module 42, configured to determine, as a target storage space, a storage space in which the first state information belongs to a usage state;
a generating module 43, configured to generate a data query task based on the target storage space, where the data query task is configured to query a data usage of data in the target storage space;
the processing module 44 is configured to query the second state information actually corresponding to the target storage space according to the data query task, and lock the target storage space so that metadata is not released to the target storage space any more.
In the embodiment of the present application, the obtaining module 41 is configured to obtain a target array, where the target array includes a usage situation of a storage space; first state information for a plurality of storage spaces of a storage pool is determined based on usage in a target array.
In the embodiment of the present application, the processing module 44 is configured to send a data query task to a manager deployed in a storage device, where the data query task is configured to query a current data usage of data in each storage space; and receiving the data use condition fed back by the manager to determine the second state information actually corresponding to the target storage space.
In the embodiment of the application, the processing device of the storage space further comprises an updating module, configured to update the first state information currently displayed in the target storage space to obtain updated first state information when the second state information is used for indicating that the target storage space is in an unused state, where the updated first state information is used for indicating that the target storage space is in an unused state; and under the condition that the updating of the first state information currently displayed by the target storage space is completed, unlocking the target storage space after the state updating, so that the target storage space after the state updating receives the released metadata.
In the embodiment of the application, the processing device of the storage space further comprises a fault processing module, which is used for receiving a fault processing task; under the condition that the second state information corresponding to all the target storage spaces is received, scanning the fault storage spaces with faults in the storage pool based on the fault processing task; detecting whether metadata exists in the fault storage space; and under the condition that the metadata exists in the fault storage space, the metadata is migrated, and fault processing operation is performed on the fault storage space.
In the embodiment of the application, the fault processing module is used for determining the data type of the metadata in the fault storage space under the condition that the metadata exists in the fault storage space; acquiring a target storage space meeting the data type from other storage spaces except the fault storage space in the storage pool; and migrating the metadata to the target storage space.
In the embodiment of the application, the fault processing module is used for detecting the target fault type corresponding to the fault storage space; obtaining a fault processing strategy, wherein the fault processing strategy comprises the following steps: at least one target processing operation corresponding to the fault type; acquiring a target processing operation corresponding to the target fault type from a fault processing strategy; and processing the fault storage space according to the target processing operation.
The device provided by the embodiment of the application determines the invalid storage space currently by inquiring the actual use condition of the data in each storage space, and recovers the invalid storage space, thereby effectively avoiding space waste and improving the data available space ratio of the equipment.
The embodiment of the application also provides an electronic device, as shown in fig. 4, 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 of the present application, a computer readable storage medium is provided, in which instructions are stored, which when run on a computer, cause the computer to perform the method of the processing device of the storage space according to any of the above embodiments.
In a further embodiment of the present application, a computer program product comprising instructions which, when run on a computer, causes the computer to perform the method of the processing device of the storage space according to 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 modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
The foregoing is only a specific embodiment of the application to enable those 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 (9)

1. A method of processing a storage space, applied to a controller disposed in a storage device, the method comprising:
acquiring first state information currently displayed in a plurality of storage spaces of a storage pool, wherein the storage pool is deployed in the storage device;
determining the storage space of the first state information belonging to the use state as a target storage space;
generating a data query task based on the target storage space, wherein the data query task is used for querying the data service condition of the data in the target storage space;
inquiring second state information actually corresponding to the target storage space according to the data inquiry task, and locking the target storage space so as not to release metadata to the target storage space;
after the second state information actually corresponding to the target storage space is queried according to the data query task and the target storage space is locked, the method further comprises the following steps:
updating the first state information currently displayed by the target storage space to obtain updated first state information under the condition that the second state information is used for indicating that the target storage space is in an unused state, wherein the updated first state information is used for indicating that the target storage space is in the unused state;
and under the condition that the updating of the first state information currently displayed by the target storage space is completed, unlocking the target storage space after the state updating, so that the target storage space after the state updating receives the released metadata.
2. The method of claim 1, wherein the obtaining the first status information currently displayed by the plurality of storage spaces of the storage pool comprises:
acquiring a target array, wherein the target array comprises the use condition of the storage space;
first state information for a plurality of storage spaces of the storage pool is determined based on usage in a target array.
3. The method according to claim 1, wherein the querying the second state information actually corresponding to the target storage space according to the data querying task includes:
sending a data query task to a manager arranged in the storage device, so that the manager queries the data use condition of data in a storage interval according to the data query task;
and determining second state information actually corresponding to the target storage space according to the data use condition fed back by the manager.
4. The method of claim 1, wherein after querying the second state information corresponding to the target storage space according to the data querying task and locking the target storage space, the method further comprises:
receiving a fault processing task;
scanning a fault storage space with faults in the storage pool based on the fault processing task;
detecting whether metadata exists in the fault storage space;
and under the condition that metadata exist in the fault storage space, migrating the metadata, and executing fault processing operation on the fault storage space.
5. The method of claim 4, wherein the migrating the metadata in the presence of metadata in the failed storage space comprises:
determining the data type of the metadata in the fault storage space under the condition that the metadata exists in the fault storage space;
acquiring a target storage space meeting the data type from other storage spaces except the fault storage space in the storage pool;
and migrating the metadata to the target storage space.
6. The method of claim 4, wherein performing a failure handling operation on the failed storage space comprises:
detecting a target fault type corresponding to the fault storage space;
obtaining a fault handling policy, wherein the fault handling policy comprises: the fault type and at least one target processing operation corresponding to the fault type;
acquiring a target processing operation corresponding to the target fault type from the fault processing strategy;
processing the fault storage space according to the target processing operation;
the processing device of the storage space further comprises an updating module, which is used for updating the first state information currently displayed by the target storage space to obtain updated first state information when the second state information is used for indicating that the target storage space is in an unused state, wherein the updated first state information is used for indicating that the target storage space is in the unused state; and under the condition that the updating of the first state information currently displayed by the target storage space is completed, unlocking the target storage space after the state updating, so that the target storage space after the state updating receives the released metadata.
7. A data processing apparatus, comprising:
the storage pool comprises an acquisition module, a storage device and a storage module, wherein the acquisition module is used for acquiring first state information currently displayed in a plurality of storage spaces of the storage pool, and the storage pool is deployed in the storage device;
the determining module is used for determining the storage space of the first state information belonging to the use state as a target storage space;
the generation module is used for generating a data query task based on the target storage space, wherein the data query task is used for querying the data use condition of the data in the target storage space;
and the processing module is used for inquiring the second state information actually corresponding to the target storage space according to the data inquiry task and locking the target storage space so as not to release metadata for the target storage space.
8. A storage medium comprising a stored program, wherein the program when run performs the method steps of any of the preceding claims 1 to 6.
9. 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 steps of any of claims 1-6 by running a program stored on a memory.
CN202111391879.3A 2021-11-19 2021-11-19 Storage space processing method and device, electronic equipment and storage medium Active CN114356211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111391879.3A CN114356211B (en) 2021-11-19 2021-11-19 Storage space processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111391879.3A CN114356211B (en) 2021-11-19 2021-11-19 Storage space processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114356211A CN114356211A (en) 2022-04-15
CN114356211B true CN114356211B (en) 2023-08-29

Family

ID=81096324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111391879.3A Active CN114356211B (en) 2021-11-19 2021-11-19 Storage space processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114356211B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116974473A (en) * 2023-07-26 2023-10-31 中科驭数(北京)科技有限公司 Storage space management method, device, equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103534688A (en) * 2013-05-29 2014-01-22 华为技术有限公司 Data recovery method, storage equipment and storage system
CN106776095A (en) * 2016-12-22 2017-05-31 湖南国科微电子股份有限公司 SSD solid state hard disc data reliability intelligent detecting methods and detection means
CN109343796A (en) * 2018-09-21 2019-02-15 新华三技术有限公司 A kind of data processing method and device
CN111562884A (en) * 2020-04-28 2020-08-21 北京奇艺世纪科技有限公司 Data storage method and device and electronic equipment
CN111984552A (en) * 2020-08-21 2020-11-24 苏州浪潮智能科技有限公司 Cache management method and device, electronic equipment and storage medium
CN113239114A (en) * 2021-05-13 2021-08-10 中国邮政储蓄银行股份有限公司 Data storage method, data storage device, storage medium and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103534688A (en) * 2013-05-29 2014-01-22 华为技术有限公司 Data recovery method, storage equipment and storage system
CN106776095A (en) * 2016-12-22 2017-05-31 湖南国科微电子股份有限公司 SSD solid state hard disc data reliability intelligent detecting methods and detection means
CN109343796A (en) * 2018-09-21 2019-02-15 新华三技术有限公司 A kind of data processing method and device
CN111562884A (en) * 2020-04-28 2020-08-21 北京奇艺世纪科技有限公司 Data storage method and device and electronic equipment
CN111984552A (en) * 2020-08-21 2020-11-24 苏州浪潮智能科技有限公司 Cache management method and device, electronic equipment and storage medium
CN113239114A (en) * 2021-05-13 2021-08-10 中国邮政储蓄银行股份有限公司 Data storage method, data storage device, storage medium and electronic device

Also Published As

Publication number Publication date
CN114356211A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
US6947972B2 (en) Alarm management system and method thereof for network management system
CN111782707B (en) Data query method and system
CN114356211B (en) Storage space processing method and device, electronic equipment and storage medium
CN111562889B (en) Data processing method, device, system and storage medium
CN112882900B (en) Method and device for recording service data change log
CN111382206B (en) Data storage method and device
WO2020029588A1 (en) Data reading method, device, system, and distributed system
CN110543401B (en) Hierarchical application topology generation method, hierarchical application topology generation system and hierarchical application topology cluster
CN114584454B (en) Processing method and device of server information, electronic equipment and storage medium
CN113301173A (en) Domain name updating system and method, message forwarding method and server
CN110888847A (en) Recycle bin system and file recycling method
CN114338794B (en) Service message pushing method and device, electronic equipment and storage medium
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN111274208B (en) Method and device for locking file
CN114647546B (en) Method and device for processing case abnormality, electronic equipment and storage medium
CN112596867A (en) Suspension transaction processing method and distributed database system
CN112148508A (en) Information processing method and related device
CN117453665B (en) Data processing method, device, equipment and storage medium
CN106612299B (en) Access request processing method and device
CN112543213B (en) Data processing method and device
CN111259208B (en) Information query device and system
CN114385081B (en) Disk protection method for kafka cluster and related equipment
CN114721909B (en) Processing method and device of server information, electronic equipment and storage medium
CN117908925A (en) Program updating method, device and storage medium
CN116628033A (en) Cache preheating and data processing method, service device, electronic equipment and medium

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