CN114356211A - 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 PDFInfo
- Publication number
- CN114356211A CN114356211A CN202111391879.3A CN202111391879A CN114356211A CN 114356211 A CN114356211 A CN 114356211A CN 202111391879 A CN202111391879 A CN 202111391879A CN 114356211 A CN114356211 A CN 114356211A
- Authority
- CN
- China
- Prior art keywords
- storage space
- target
- data
- fault
- state 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title abstract description 5
- 238000000034 method Methods 0.000 claims abstract description 45
- 238000012545 processing Methods 0.000 claims description 60
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 8
- 239000002699 waste material Substances 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0647—Migration mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The application discloses a storage space processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring first state information currently displayed by a plurality of storage spaces of a storage pool; 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 use 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 to prevent metadata from being released to the target storage space. According to the method, 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 fact that each used storage space is real and effective is guaranteed, space leakage and waste are avoided, and the data available space occupation ratio of the equipment can be improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a storage space, an electronic device, and a storage medium.
Background
With the increasing of the application scale of big data, the processing requirement of mass data puts higher demands on the storage performance of the computer system. The full flash memory rapidly takes a leading position in the storage field due to the performance advantages of the full flash memory, and the optimization development and the stability maintenance of the full flash memory are important subjects which need to be continuously improved. The metadata space in full flash storage is divided into multiple grains at sector granularity, and each grain maintains byte-independent state information. The method adopts a pre-allocation mode to perform space management, and when a node fault occurs, the allocated-state grain is not actually used, so that metadata space leakage is caused.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the application provides a storage space processing method, an apparatus, an electronic device and a storage medium.
According to an aspect of the embodiments of the present application, there is provided a method for processing a storage space, where the method is applied to a controller deployed in a storage device, and the method includes:
acquiring first state information currently displayed by a plurality of storage spaces of a storage pool, wherein the storage pool is deployed in the storage device;
determining the first state information as a target storage space belonging to the storage space of the use state;
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 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 to prevent metadata from being released to the target storage space.
Further, the obtaining the first status information currently displayed by the plurality of storage spaces of the storage pool includes:
acquiring a target array, wherein the target array comprises the use condition of the storage space;
first status 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 query task, second state information actually corresponding to the target storage space includes:
sending a data query task to a manager deployed 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 querying second state information actually corresponding to the target storage space according to the data query task and locking the target storage space, the method further includes:
under the condition that the second state information is used for indicating that the target storage space is in an unused state, updating 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;
and under the condition that the updating of the first state information currently displayed in the target storage space is completed, unlocking the target storage space after the state updating so as to enable the target storage space after the state updating to receive the released metadata.
Further, after querying second state information corresponding to the target storage space according to the data query task and locking the target storage space, the method further includes:
receiving a fault processing task;
scanning a fault storage space with a fault 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, migrating the metadata, and executing fault processing operation on the fault storage space.
Further, the migrating the metadata when the metadata exists in the failed 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;
migrating the metadata to the destination storage space.
Further, the executing the fault processing operation on the fault storage space includes:
detecting a target fault type corresponding to the fault storage space;
acquiring a fault handling strategy, wherein the fault handling strategy comprises the following steps: a fault type and at least one target processing operation corresponding to the fault type;
acquiring 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 embodiments of the present application, there is also provided a data processing apparatus, including:
the device comprises an acquisition module, a storage device and a display module, wherein the acquisition module is used for acquiring first state information currently displayed by a plurality of storage spaces of a storage pool, and the storage pool is deployed in the storage device;
the determining module is used for determining the first state information belonging to the storage space in the use state as a target storage space;
the generating 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 second state information actually corresponding to the target storage space according to the data inquiry task and locking the target storage space so as to prevent the metadata from being released to 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 executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, 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; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing 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, 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 fact that each used storage space is real and effective is guaranteed, space leakage and 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 present 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 needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a method for processing a storage space according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for processing a memory space according to another embodiment of the present application;
fig. 3 is a block diagram of a processing apparatus for a storage 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
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a storage space processing method and device, electronic equipment and a storage medium. The method provided by the embodiment of the invention can be applied to any required electronic equipment, for example, the electronic equipment can be electronic equipment such as a server and a terminal, and the method is not particularly limited herein, and is hereinafter simply referred to as electronic equipment for convenience in description.
According to an aspect of embodiments of the present application, a method embodiment of a method for processing a storage space is provided. Fig. 1 is a flowchart of a method for processing a storage space according to an embodiment of the present application, and as shown in fig. 1, the method includes:
step S11, obtaining first status information currently displayed by a plurality of storage spaces of a storage pool, wherein the storage pool is deployed on a storage device.
The method provided by the embodiment of the application is applied to a controller deployed in a storage device, wherein a target array is arranged in the controller and used for maintaining the use condition of each storage space in a storage pool.
Specifically, step S11, obtaining the first status information currently displayed in the plurality of storage spaces of the storage pool, includes the following steps a1-a 2:
step A1, obtaining a target array, wherein the target array comprises the use condition of the storage space.
In this embodiment of the present application, the controller periodically detects an invalid storage space in the storage pool, so that the controller calls the target array before each detection, reads the usage of each storage space from the target array, where the target array stores an identifier of the storage space and a usage corresponding to the identifier, and the usage may include: used and used proportion, or unused, etc.
Step A2, based on the usage in the target array, determines first state information for a plurality of storage spaces of the storage pool.
In this embodiment of the application, after the controller reads the usage from the target array, the first state information of each storage space may be directly determined according to the usage, for example: if the use condition is displayed as used or a use ratio, the first state information is the use state at the moment. If the usage indicates unused, the first status information is now unused.
In step S12, the first status information is determined to belong to the storage space in the use status as the target storage space.
In the embodiment of the application, after determining the first state information of each storage index, the controller summarizes the first state information, and determines that the first state information belongs to the storage space in the use state as the target storage space.
And 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 present application, it is required to detect that the storage pool is in a use state, and data in the storage space is invalid or invalid, or whether the query storage space is actually used, so that a data query task needs to be generated based on the target storage space, and the data query task is used to query the data use condition of the data in the target storage space, specifically, the data query task is generated by data identification or data characteristics in the target storage space.
And step S14, 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 to prevent the metadata from being released to the target storage space.
In this embodiment of the present application, the step S14, querying the second status information actually corresponding to the target storage space according to the data query task, includes the following steps B1-B2:
and step B1, sending a data query task to the manager deployed in the storage device, so that the manager queries the data use condition of the data in the storage interval according to the data query task.
In the embodiment of the application, after the data query task is generated, the controller sends the data query task to the data usage of the data in the storage device, and the manager is used for storing the data usage of the data, such as data usage, data consumption, and the validity period of the data. And the manager feeds back the data use condition to the controller after summarizing the data use condition.
And step B2, determining the second state information actually corresponding to the target storage space according to the data use condition fed back by the manager.
In this 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 determining the second state information actually corresponding to the target storage space as an unused state after the data use condition shows that the data is damaged and cannot be used or the data validity period is expired. Or, after the data use condition shows that the data is normally used or the data is still in the valid period, determining the second state information actually corresponding to the target storage space as the use state.
In the embodiment of the application, when the data use condition of the data in the target storage space is queried, 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 query and data release is ensured.
According to the method, 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 fact that each used storage space is real and effective is guaranteed, space leakage and waste are avoided, and the data available space occupation ratio of the equipment can be improved.
In this embodiment of the present application, after querying, according to the data query task, second state information actually corresponding to the target storage space, and locking the target storage space, the method further includes:
step S21, in a case that the second status information is used to indicate that the target storage space is in an unused state, updating the first status information currently displayed in the target storage space to obtain updated first status information, where the updated first status information is used to indicate that the target storage space is in an unused state.
In this embodiment, the controller updates the first state information currently displayed in the target storage space whose second state information is in an unused state, so that the updated first state information is used to indicate that the target storage space is in an unused state.
In step S22, when the update of the first status information currently displayed in the target storage space is completed, the target storage space after the status update is unlocked, so that the target storage space after the status 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 it is ensured that data can be continuously released to the target storage space after the state update subsequently, and the improvement of data storage efficiency is facilitated.
In this embodiment of the present application, as shown in fig. 2, after querying, according to a data query task, second state information corresponding to a target storage space and locking the target storage space, the method further includes:
in step S31, a failure processing task is received.
In this embodiment of the present application, the failure processing task may be sent by the sending device after the failure of storing the data in the storage pool, and at this time, the controller receives the failure processing task and executes a corresponding failure detection operation according to the failure processing task. The fault handling tasks may be generated periodically by the controller.
In step S32, the failed storage space in the storage pool where the failure exists is scanned based on the failure processing task.
In the embodiment of the application, the controller scans the storage pool according to the fault scanning task to collect the fault storage space with the fault, specifically, the controller may query the storage records corresponding to each storage space, and obtain the storage space with the reading failure frequency greater than the preset frequency 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 ratio in the candidate fault storage space, and determining the storage space with the storage ratio larger than a preset ratio as the fault storage space.
In step S33, it is detected whether metadata exists in the failed storage space.
In step S34, when metadata exists in the failed storage space, the metadata is migrated, and a failure processing operation is performed on the failed storage space.
In the embodiment of the present application, in step S34, in the case that metadata exists in the failed storage space, migrating the metadata, including the following steps C1-C3:
step C1, in case metadata exists in the failed storage space, determining the data type of the metadata in the failed storage space.
And step C2, acquiring the destination storage space which meets the data type from other storage spaces except the fault storage space in the storage pool.
Step C3, migrate the metadata to the destination storage space.
In the embodiment of the present application, in the case that metadata exists in a failed storage space, a data type of the metadata in the failed storage space is determined, and a destination storage space of the metadata is determined according to the data type, for example: when the data type is operation metadata (a type of 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 when the data type is the sharing metadata (describing how the data is shared, including interface mode, format, content, etc.), the storage area for storing the sharing metadata is obtained and used as the target storage area.
In the embodiment of the present application, step S34, executing a failure handling operation on the failed storage space, includes the following steps D1-D4:
and D1, detecting the target fault type corresponding to the fault storage space.
Step D2, obtaining a fault handling strategy, wherein the fault handling strategy comprises: 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 step D4, processing the fault storage space according to the target processing operation.
In this embodiment of the present application, the fault handling policy may be uploaded by a worker in advance, where the fault handling policy includes: the fault type and the processing operation corresponding to the fault type. For example: the fault type is that the storage 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 a worker to perform maintenance after determining that the storage area is faulty, or send a prompt message to another device requesting to read and write data on the current storage device.
Fig. 3 is a block diagram of a processing device of a storage space according to an embodiment of the present application, which may be implemented as part or all of an electronic device by software, hardware, or a combination of the two. 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 of a storage pool, where the storage pool is deployed in a storage device;
a determining module 42, configured to determine that the first state information belongs to the storage space in the use state, as a target storage space;
a generating module 43, configured to generate a data query task based on the target storage space, where the data query task is used to query data usage of data in the target storage space;
and the processing module 44 is configured to query, according to the data query task, second state information actually corresponding to the target storage space, and lock the target storage space, so that the metadata is not released to the target storage space.
In this embodiment of the present application, the obtaining module 41 is configured to obtain a target array, where the target array includes a use condition of a storage space; first status information for a plurality of storage spaces of a storage pool is determined based on usage in a target array.
In this 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 used to query data usage of data in each current storage space; and receiving the data use condition fed back by the manager to determine second state information actually corresponding to the target storage space.
In this embodiment of the present application, the processing apparatus of the storage space further includes an updating module, configured to update first state information currently displayed in the target storage space to obtain updated first state information when the second state information is used to indicate that the target storage space is in an unused state, where the updated first state information is used to indicate that the target storage space is in an unused state; and under the condition that the updating of the first state information currently displayed in the target storage space is completed, unlocking the target storage space after the state updating so as to enable the target storage space after the state updating to receive the released metadata.
In this embodiment of the present application, the processing apparatus of the storage space further includes a fault handling module, configured to receive a fault handling task; under the condition that the second state information corresponding to all the target storage spaces is determined to be received, scanning 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, migrating the metadata and executing fault processing operation on the fault storage space.
In the embodiment of the application, the failure processing module is configured to determine a data type of metadata in a failure storage space under the condition that the metadata exists in the failure 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 destination storage space.
In the embodiment of the application, the fault processing module is used for detecting a target fault type corresponding to a fault storage space; acquiring a fault handling strategy, wherein the fault handling strategy comprises the following steps: the fault type and at least one target processing operation corresponding to the fault type; acquiring 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.
The device provided by the embodiment of the application confirms that the current storage space is invalid through inquiring the actual use condition of the data in each storage space, and recovers the invalid storage space, thereby effectively avoiding space waste and simultaneously improving the data available space occupation ratio of the equipment.
An embodiment of the present application further provides an electronic device, as shown in fig. 4, the electronic device may include: the system 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 complete communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501 is configured to implement the steps of the above embodiments when executing the computer program stored in the memory 1503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a 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 processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute the method of the storage space processing apparatus in any one of the above embodiments.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of the memory space processing apparatus as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized 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, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, 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 wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present 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 (10)
1. A method for processing a storage space, which is applied to a controller deployed in a storage device, the method comprising:
acquiring first state information currently displayed by a plurality of storage spaces of a storage pool, wherein the storage pool is deployed in the storage device;
determining the first state information as a target storage space belonging to the storage space of the use state;
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 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 to prevent metadata from being released to the target storage space.
2. The method of claim 1, wherein obtaining first status information currently displayed by a 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 status 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, according to the data query task, second state information actually corresponding to the target storage space includes:
sending a data query task to a manager deployed 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 according to claim 1, wherein after querying the second status information actually corresponding to the target storage space according to the data query task and locking the target storage space, the method further comprises:
under the condition that the second state information is used for indicating that the target storage space is in an unused state, updating 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;
and under the condition that the updating of the first state information currently displayed in the target storage space is completed, unlocking the target storage space after the state updating so as to enable the target storage space after the state updating to receive the released metadata.
5. The method according to claim 1, wherein after querying the second status information corresponding to the target storage space according to the data query task and locking the target storage space, the method further comprises:
receiving a fault processing task;
scanning a fault storage space with a fault 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, migrating the metadata, and executing fault processing operation on the fault storage space.
6. The method of claim 5, wherein migrating the metadata if the metadata exists 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;
migrating the metadata to the destination storage space.
7. The method of claim 5, wherein performing a fault handling operation on the faulty storage space comprises:
detecting a target fault type corresponding to the fault storage space;
acquiring a fault handling strategy, wherein the fault handling strategy comprises the following steps: a fault type and at least one target processing operation corresponding to the fault type;
acquiring 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.
8. A data processing apparatus, comprising:
the device comprises an acquisition module, a storage device and a display module, wherein the acquisition module is used for acquiring first state information currently displayed by a plurality of storage spaces of a storage pool, and the storage pool is deployed in the storage device;
the determining module is used for determining the first state information belonging to the storage space in the use state as a target storage space;
the generating 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 second state information actually corresponding to the target storage space according to the data inquiry task and locking the target storage space so as to prevent the metadata from being released to the target storage space.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1-7 by executing a program stored on a memory.
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 true CN114356211A (en) | 2022-04-15 |
CN114356211B 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) |
Cited By (1)
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)
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 |
-
2021
- 2021-11-19 CN CN202111391879.3A patent/CN114356211B/en active Active
Patent Citations (6)
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 |
Cited By (1)
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 |
Also Published As
Publication number | Publication date |
---|---|
CN114356211B (en) | 2023-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20140081927A1 (en) | Data node fencing in a distributed file system | |
WO2020015092A1 (en) | Instance monitoring method and apparatus, terminal device and medium | |
CN111049928A (en) | Data synchronization method, system, electronic device and computer readable storage medium | |
CN111562889B (en) | Data processing method, device, system and storage medium | |
CN115113997A (en) | Task scheduling method and device, electronic equipment and storage medium | |
CN114356211A (en) | Storage space processing method and device, electronic equipment and storage medium | |
CN111597270A (en) | Data synchronization method, device, equipment and computer storage medium | |
WO2020029588A1 (en) | Data reading method, device, system, and distributed system | |
CN101483668A (en) | Network storage and access method, device and system for hot spot data | |
CN110674153B (en) | Data consistency detection method and device and electronic equipment | |
CN108920092B (en) | Data operation method and device of memory data and electronic equipment | |
CN115580522A (en) | Method and device for monitoring running state of container cloud platform | |
CN111400327B (en) | Data synchronization method and device, electronic equipment and storage medium | |
CN111209304B (en) | Data processing method, device and system | |
CN114584454A (en) | Server information processing method and device, electronic equipment and storage medium | |
CN112596867A (en) | Suspension transaction processing method and distributed database system | |
CN113760854A (en) | Method for identifying data in HDFS memory and related equipment | |
CN106612299B (en) | Access request processing method and device | |
CN111125232A (en) | Method and device for accessing public cloud asset information | |
CN111163088B (en) | Message processing method, system and device and electronic equipment | |
CN113992566B (en) | Message broadcasting method and device | |
CN114866594B (en) | Device connection management method, device, system, server and readable storage medium | |
CN115563030A (en) | Configuration data processing method and device, electronic equipment and storage medium | |
CN114647546A (en) | Case abnormity processing method and device, electronic equipment and storage medium | |
CN113900752A (en) | Configuration method of user plane, query method of user plane and device |
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 |