CN112817520A - Data disk refreshing method and device - Google Patents

Data disk refreshing method and device Download PDF

Info

Publication number
CN112817520A
CN112817520A CN202011628130.1A CN202011628130A CN112817520A CN 112817520 A CN112817520 A CN 112817520A CN 202011628130 A CN202011628130 A CN 202011628130A CN 112817520 A CN112817520 A CN 112817520A
Authority
CN
China
Prior art keywords
data
cache
lun
cache block
important
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
Application number
CN202011628130.1A
Other languages
Chinese (zh)
Other versions
CN112817520B (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.)
Macrosan Technologies Co Ltd
Original Assignee
Macrosan Technologies 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 Macrosan Technologies Co Ltd filed Critical Macrosan Technologies Co Ltd
Priority to CN202011628130.1A priority Critical patent/CN112817520B/en
Publication of CN112817520A publication Critical patent/CN112817520A/en
Application granted granted Critical
Publication of CN112817520B publication Critical patent/CN112817520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • 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/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • 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)
  • Computer Security & Cryptography (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data disk refreshing method and device, which are applied to a cache module. The cache module receives a write command issued by the LUN, wherein the write command comprises an important identifier for indicating whether data to be written is important data; when the important mark indicates that the data to be written is important data, setting a disk-brushing mark of a cache block storing the data to be written as a first value, wherein the first value is used for indicating that the data in the cache block needs to be immediately disk-brushed; the cache module performs immediate disk refreshing aiming at the cache block with the first disk refreshing identifier, so that the time of the important data staying in the cache is reduced, and the risk of data loss is reduced.

Description

Data disk refreshing method and device
Technical Field
The present application relates to the field of storage technologies, and in particular, to a data disk refreshing method and apparatus.
Background
In order to increase the response speed of the storage device, a buffer is usually used to terminate the write command of a Logical Unit Number (LUN). That is, after data is written into the cache, an execution result is returned to the LUN, and then the data in the cache is flushed to a disk of a Redundant Array of Independent Disks (RAID) according to a preset policy.
The physical medium of the cache is typically a volatile medium that loses data when power is lost. To avoid data loss, some power loss protection mechanism is typically provided. However, in some extreme cases, data may still be lost.
For this reason, for some very important data, such as configuration files (including RAID configuration files, LUN configuration files, etc.) for instructing the storage device to operate, it is common to write directly to RAID without caching. However, during the write process, if the RAID fails for a short time (for example, the member disk goes offline), the configuration file update may be incomplete, or the configuration file may be inconsistent because part of the configuration file is updated and part of the configuration file is not updated.
Disclosure of Invention
In view of this, the present application provides a data disk refreshing method and apparatus, which can also achieve the effect of reducing the risk of losing important data, and meanwhile, can ensure the integrity and consistency of the important data.
In order to achieve the purpose of the application, the application provides the following technical scheme:
in a first aspect, the present application provides a data disk refreshing method, which is applied to a cache module, where the cache module is configured to manage a cache included in a storage device, the cache is divided into a plurality of cache blocks according to a preset size, each cache block corresponds to management data, the management data includes a disk refreshing identifier used for indicating whether user data in a cache block needs to be refreshed immediately, the storage device further includes at least one LUN, and each LUN corresponds to a RAID used for storing data corresponding to the LUN, where the method includes:
receiving a write command issued by each LUN, wherein the write command comprises data to be written and an important identifier for indicating whether the data to be written is important data;
when a preset cache condition is met, writing the data to be written into a corresponding cache block;
if the important mark indicates that the data to be written is important data, updating a flash disk mark of a cache block corresponding to the data to be written to be a first value, wherein the first value is used for indicating that user data in the cache block needs to be flashed immediately;
and for each first LUN without RAID faults, if a first cache block with a first value of a disk refreshing identifier exists in the cache block corresponding to the first LUN, immediately refreshing the first cache block.
Optionally, the method further includes:
and if the important mark indicates that the data to be written is not important data, updating the disk-refreshing mark of the cache block corresponding to the data to be written to be a second value, wherein the second value is used for indicating that the user data in the cache block does not need to be refreshed immediately.
Optionally, the preset caching condition is that the RAID corresponding to the LUN does not fail.
Optionally, the preset caching condition is that the LUN fails in correspondence to the RAID, and the important identifier indicates that the data to be written is important data.
Optionally, the method further includes:
if the failure RAID is recovered to be normal, immediately detecting whether a second cache block with a first flashing identification exists in cache blocks corresponding to a second LUN, wherein the second LUN is the LUN corresponding to the failure RAID;
if so, the second cache block is immediately flushed.
In a second aspect, the present application provides a data disk refreshing apparatus, which is applied to a cache module, the cache module is configured to manage a cache included in a storage device, the cache is divided into a plurality of cache blocks according to a preset size, each cache block corresponds to management data, the management data includes a disk refreshing identifier used for indicating whether user data in the cache blocks needs to be refreshed immediately, the storage device further includes at least one LUN, each LUN corresponds to a RAID used for storing data corresponding to the LUN, and the apparatus includes:
the receiving unit is used for receiving a write command issued by each LUN, wherein the write command comprises data to be written and an important identifier used for indicating whether the data to be written is important data;
the writing unit is used for writing the data to be written into a corresponding cache block when a preset cache condition is met;
the updating unit is used for updating the disk-brushing identifier of the cache block corresponding to the data to be written into as a first value if the important identifier indicates that the data to be written into is important data, and the first value is used for indicating that the user data in the cache block needs to be immediately disk-brushed;
and the disk flushing unit is used for flushing the first cache block immediately if the first LUN corresponds to the first cache block with the disk flushing identification being the first value in the cache blocks for each first LUN without RAID failure.
Optionally, the apparatus further comprises:
the updating unit is further configured to update the disk-flushing identifier of the cache block corresponding to the data to be written to be a second value if the important identifier indicates that the data to be written is not important data, where the second value is used to indicate that the user data in the cache block does not need to be flushed immediately.
Optionally, the preset caching condition is that the RAID corresponding to the LUN does not fail.
Optionally, the preset caching condition is that the LUN fails in correspondence to the RAID, and the important identifier indicates that the data to be written is important data.
Optionally, the apparatus further comprises:
the detection unit is used for immediately detecting whether a second cache block with a first flash disk identifier exists in a cache block corresponding to a second LUN if the failed RAID is recovered to be normal, wherein the second LUN is the LUN corresponding to the failed RAID;
and the disk brushing unit is used for brushing the disk of the second cache block immediately if the second cache block exists.
As can be seen from the above description, in the embodiment of the present application, important data is flushed to a RAID through a cache, and for the important data, the existing disk flushing strategy (the disk flushing efficiency is low) is not used any longer, but a mode of immediately flushing the disk is adopted, so that the time for the important data to stay in the cache is reduced, and the risk of data loss is reduced. In addition, when the RAID fails, important data are still allowed to be written into the cache, so that the integrity and consistency of the important data are guaranteed, and the important data are written into the RAID after the RAID failure is recovered.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a data flashing method according to an embodiment of the present application;
fig. 2 is a RAID failure recovery processing flow according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data disk device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the embodiments of the present application, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the negotiation information may also be referred to as second information, and similarly, the second information may also be referred to as negotiation information without departing from the scope of the embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clear, the embodiments of the present application are described in detail below with reference to the accompanying drawings and specific embodiments:
referring to fig. 1, a flowchart of a data disk refreshing method according to an embodiment of the present application is shown. The flow is applied to a cache module, which is used for managing the cache included in the storage device.
The storage device further comprises at least one LUN and RAID used for storing data corresponding to the LUN. Wherein, RAID is composed of a plurality of member disks, which can provide higher storage performance and data redundancy protection than single disk.
The cache of the storage device is divided into a plurality of cache blocks according to a preset size (e.g., 64 KB). Each cache block corresponds to management data, which includes an identification of a LUN to which user data belongs in the cache block and a corresponding address field in the LUN.
For example, if the management data of a certain cache block is LUN1, the starting address is LBA1, and the data length is 64KB, it indicates that 64KB user data with the starting address of LBA1 in LUN1 is cached in the cache block, or user data in the range of [ LBA1, LBA1+64KB ] in LUN1 (address field) is cached.
In addition, the management data of the cache block may further include a disk-flushing identifier for indicating whether the user data in the cache block needs to be flushed immediately.
For example, the disk-flushing identifier is 1, which represents that the user data in the cache block needs to be flushed immediately; the flash disk identifier is 0, which represents that the user data in the cache block does not need to be immediately flashed.
The specific disc brushing process is shown in fig. 1, and the process may include the following steps:
and step 101, receiving a write command issued by the LUN aiming at each LUN.
The write command includes data to be written and an important identifier for indicating whether the data to be written is important data. For example, the important flag is 1, which indicates that the data to be written is important data; the important flag is 0, indicating that the data to be written is not important data.
Whether the data to be written is important data can be set according to actual application scenarios.
For example, when the configuration file of the storage device needs to be updated, the configuration file directly affects whether the storage device can normally operate, so that the data corresponding to the configuration file can be set as important data. In the write command issued by the LUN, an important identifier for indicating that the data corresponding to the configuration file is important data is carried, for example, the important identifier is 1.
For another example, when the front-end server writes data into the storage device, the data may be set as non-important data because the data does not greatly affect whether the storage device can operate normally. In the write command issued by the LUN, an important identifier indicating that the data is not important data is carried, for example, the important identifier is 0.
And 102, writing the data to be written into the corresponding cache block when the preset cache condition is met.
For one embodiment, the preset caching condition is that the RAID corresponding to the LUN does not fail.
Here, it should be noted that, when the RAID corresponding to the LUN does not fail, the data in the cache may be normally flushed to the RAID, and the cache space may be released, so that new data (to-be-written data) is allowed to be written into the cache.
As another embodiment, the preset caching condition is that a RAID corresponding to the LUN fails, but the important identifier carried in the write command indicates that the data to be written is important data.
Here, it should be noted that, when a RAID corresponding to a LUN fails (for example, a member disk goes offline), data in the cache cannot be flushed to the failed RAID, and only data in the cache can be stored continuously. The capacity of the cache is limited, and a plurality of LUNs share the same cache. In order to avoid that the cache is filled up and the processing performance of other LUNs is affected, generally, when a RAID corresponding to a LUN fails, data corresponding to the LUN is prohibited from being rewritten into the cache, that is, the authority of the LUN to use the cache is frozen.
In the embodiment of the application, when the RAID corresponding to the LUN fails, only the write permission of the non-important data corresponding to the LUN is frozen, and the important data is still allowed to be written into the cache, so that the integrity and consistency of the important data are ensured, and the RAID is flushed after the subsequent RAID failure is recovered.
Step 103, judging whether the data to be written is important data.
As described above, the write command carries an important identifier indicating whether the data to be written is important data, and therefore, whether the data to be written is important data can be determined directly according to the important identifier. For example, when the important flag is 1, it indicates that the data to be written is important data; when the important flag is 0, it indicates that the data to be written is non-important data.
If the important mark indicates that the data to be written is important data, turning to step 104; otherwise, go to step 106.
And 104, updating the flash disk identifier of the cache block corresponding to the data to be written into to be a first value.
That is, for a cache block storing important data, the flash disk identifier corresponding to the cache block is set to a first value, for example, the first value is 1, so as to indicate that user data (important data) in the cache block needs to be flashed immediately.
It is to be understood that the first value is a name for convenience of distinguishing and is not intended to be limiting.
And 105, for each first LUN without RAID failure, if there is a first cache block with a first value of the disk refreshing identifier in the cache block corresponding to the first LUN, immediately refreshing the first cache block.
In this embodiment of the present application, the cache module may maintain, for each LUN, a corresponding immediate disk-flushing queue, where the immediate disk-flushing queue is used to record an identifier of a cache block whose disk-flushing identifier corresponding to the LUN is a first value (needs to be flushed immediately).
Here, the cache block whose flash disk is identified as the first value is referred to as the first cache block. It is to be understood that the first cache block is referred to herein by way of name and not limitation for ease of distinction.
Because the failed RAID cannot write data, the step only executes the disk flushing operation for the LUN that has not failed in the RAID. The LUN that does not have a RAID failure is referred to herein as a first LUN. It is understood that the first LUN is named for convenience of distinguishing and is not intended to be limiting.
And the cache module determines whether a first cache block needing to be immediately flushed exists in the cache blocks corresponding to each first LUN. Specifically, whether an identifier of a first cache block exists in an immediate disk-flushing queue corresponding to the first LUN may be queried, and if so, disk-flushing is immediately performed on the first cache block. Namely, the data in the first cache block is written into the RAID corresponding to the first LUN, and the cache space corresponding to the first cache block is released.
It can be seen that in the embodiment of the present application, the disk refreshing for the important data does not wait for the disk refreshing to meet the preset disk refreshing policy (for example, when the used cache space in the cache reaches the preset cache threshold, or when the data in the cache block is not updated for a long time), but the disk refreshing is performed immediately, so that the retention time of the important data in the cache is reduced, and the risk of data loss is reduced.
And 106, updating the flash disk identifier of the cache block corresponding to the data to be written into to be a second value.
That is, for a cache block storing non-important data, the corresponding disk-flushing identifier of the cache block is set to be a second value, for example, the second value is 0, which is used to indicate that the user data (non-important data) in the cache block does not need to be flushed immediately. It is to be understood that the reference to a second value is merely a nomenclature for convenience of description and not a limitation.
For the cache block with the second value of the disk-brushing identifier, the disk-brushing strategy can be adopted for disk-brushing, which is not limited in the application.
Thus, the flow shown in fig. 1 is completed.
As can be seen from the flow shown in fig. 1, in the embodiment of the present application, important data is flushed to RAID through a cache, and for the important data, an existing disk flushing strategy (with a low disk flushing efficiency) is not used any longer, but a mode of immediately flushing the disk is adopted, so that the time for the important data to stay in the cache is reduced, and the risk of data loss is reduced. In addition, when the RAID fails, important data are still allowed to be written into the cache, so that the integrity and consistency of the important data are guaranteed, and the important data are written into the RAID after the RAID failure is recovered.
The following describes a process flow after RAID failure recovery. Referring to fig. 2, a processing flow after RAID failure recovery according to the embodiment of the present application is shown.
As shown in fig. 2, the process may include the following steps:
step 201, if the failed RAID returns to normal, immediately detecting whether a second cache block with a first value of the disk refreshing identifier exists in the cache block corresponding to the second LUN.
Here, the second LUN refers to a LUN corresponding to a failed RAID. It is understood that the reference to the second LUN is a name for convenience of distinguishing and is not intended to be limiting.
As previously described, critical data is still allowed to be written to cache upon a RAID failure. That is, when a RAID returns to normal, there may already be important data in the cache to be written to the RAID. In order to reduce the retention time of the important data in the cache as much as possible, when the RAID is determined to be recovered to be normal, the existing cache block of the LUN (second LUN) corresponding to the RAID in the cache is immediately detected.
Specifically, it may be detected whether an identifier of a cache block exists in the immediate disk-flushing queue corresponding to the second LUN, that is, whether an identifier of a cache block whose disk-flushing identifier is the first value exists. Here, the cache block in which the flash corresponding to the second LUN is identified as the first value is referred to as a second cache block. It is to be understood that the second cache block is referred to herein by way of name, for ease of distinction, and not by way of limitation.
If yes, it indicates that the important data to be written into the failed RAID (now recovered to normal) is cached in the cache, and go to step 202.
Step 202, the second cache block is immediately flushed.
Thus, the flow shown in fig. 2 is completed.
Through the process shown in fig. 2, after the failed RAID returns to normal, the disk-flushing operation is immediately performed on the important data to be written into the RAID that has been cached in the cache, so as to shorten the retention time of the important data in the cache as much as possible, and avoid the loss of the important data.
The method provided by the embodiment of the present application is described above, and the apparatus provided by the embodiment of the present application is described below:
referring to fig. 3, a schematic structural diagram of an apparatus provided in an embodiment of the present application is shown. The device is applied to a cache module, the cache module is used for managing a cache included by the storage equipment, the cache is divided into a plurality of cache blocks according to a preset size, each cache block corresponds to management data, the management data comprises a disk brushing identifier used for indicating whether user data in the cache blocks need to be immediately brushed, the storage equipment further comprises at least one LUN, each LUN corresponds to a RAID used for storing data corresponding to the LUN, and the device comprises: a receiving unit 301, a writing unit 302, an updating unit 303, and a brushing unit 304, wherein:
a receiving unit 301, configured to receive, for each LUN, a write command issued by the LUN, where the write command includes data to be written and an important identifier used to indicate whether the data to be written is important data;
a writing unit 302, configured to write the data to be written into a corresponding cache block when a preset cache condition is met;
an updating unit 303, configured to update a flash disk identifier of a cache block corresponding to the data to be written to be a first value if the important identifier indicates that the data to be written is important data, where the first value is used to indicate that user data in the cache block needs to be flashed immediately;
and the disk flushing unit 304 is configured to flush, for each first LUN that does not have a RAID fault, a first cache block whose disk flushing identifier is a first value if the first LUN exists in the cache block corresponding to the first LUN.
As an embodiment, the apparatus further comprises:
the updating unit 303 is further configured to update the flash disk identifier of the cache block corresponding to the data to be written to be a second value if the important identifier indicates that the data to be written is not important data, where the second value is used to indicate that the user data in the cache block does not need to be flashed immediately.
As an embodiment, the preset caching condition is that the RAID corresponding to the LUN does not fail.
As an embodiment, the preset caching condition is that the RAID corresponding to the LUN fails, and the important identifier indicates that the data to be written is important data.
As an embodiment, the apparatus further comprises:
the detection unit is used for immediately detecting whether a second cache block with a first flash disk identifier exists in a cache block corresponding to a second LUN if the failed RAID is recovered to be normal, wherein the second LUN is the LUN corresponding to the failed RAID;
the disk-flushing unit 304 is configured to flush the second cache block immediately if the second cache block exists.
As can be seen from the above description, in the embodiment of the present application, important data is flushed to a RAID through a cache, and for the important data, the existing disk flushing strategy (the disk flushing efficiency is low) is not used any longer, but a mode of immediately flushing the disk is adopted, so that the time for the important data to stay in the cache is reduced, and the risk of data loss is reduced. In addition, when the RAID fails, important data are still allowed to be written into the cache, so that the integrity and consistency of the important data are guaranteed, and the important data are written into the RAID after the RAID failure is recovered.
The above description is only a preferred embodiment of the present application, and should not be taken as limiting the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application shall be included in the scope of the present application.

Claims (10)

1. A data disk refreshing method is applied to a cache module, the cache module is used for managing a cache included in a storage device, the cache is divided into a plurality of cache blocks according to a preset size, each cache block corresponds to management data, the management data includes a disk refreshing identifier used for indicating whether user data in the cache blocks need to be refreshed immediately, the storage device further includes at least one LUN, and each LUN corresponds to a RAID used for storing data corresponding to the LUN, and the method includes:
receiving a write command issued by each LUN, wherein the write command comprises data to be written and an important identifier for indicating whether the data to be written is important data;
when a preset cache condition is met, writing the data to be written into a corresponding cache block;
if the important mark indicates that the data to be written is important data, updating a flash disk mark of a cache block corresponding to the data to be written to be a first value, wherein the first value is used for indicating that user data in the cache block needs to be flashed immediately;
and for each first LUN without RAID faults, if a first cache block with a first value of a disk refreshing identifier exists in the cache block corresponding to the first LUN, immediately refreshing the first cache block.
2. The method of claim 1, wherein the method further comprises:
and if the important mark indicates that the data to be written is not important data, updating the disk-refreshing mark of the cache block corresponding to the data to be written to be a second value, wherein the second value is used for indicating that the user data in the cache block does not need to be refreshed immediately.
3. The method of claim 1, wherein the predetermined caching condition is that the LUN does not fail in accordance with the RAID.
4. The method according to claim 1, wherein the predetermined caching condition is that the LUN fails in accordance with RAID, and the important flag indicates that the data to be written is important data.
5. The method of claim 4, wherein the method further comprises:
if the failure RAID is recovered to be normal, immediately detecting whether a second cache block with a first flashing identification exists in cache blocks corresponding to a second LUN, wherein the second LUN is the LUN corresponding to the failure RAID;
if so, the second cache block is immediately flushed.
6. The utility model provides a data brush dish device, its characterized in that is applied to the cache module, the cache module is used for managing the cache that storage device includes, the cache divides into a plurality of cache blocks according to preset size, and each cache block corresponds there is management data, management data is including the brush dish sign that is used for instructing user's data in the cache block and need to brush the dish immediately, storage device still includes at least one LUN, and each LUN corresponds to the RAID that is used for depositing this LUN corresponding data, the device includes:
the receiving unit is used for receiving a write command issued by each LUN, wherein the write command comprises data to be written and an important identifier used for indicating whether the data to be written is important data;
the writing unit is used for writing the data to be written into a corresponding cache block when a preset cache condition is met;
the updating unit is used for updating the disk-brushing identifier of the cache block corresponding to the data to be written into as a first value if the important identifier indicates that the data to be written into is important data, and the first value is used for indicating that the user data in the cache block needs to be immediately disk-brushed;
and the disk flushing unit is used for flushing the first cache block immediately if the first LUN corresponds to the first cache block with the disk flushing identification being the first value in the cache blocks for each first LUN without RAID failure.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the updating unit is further configured to update the disk-flushing identifier of the cache block corresponding to the data to be written to be a second value if the important identifier indicates that the data to be written is not important data, where the second value is used to indicate that the user data in the cache block does not need to be flushed immediately.
8. The apparatus of claim 6, wherein the predetermined caching condition is that the LUN does not fail in accordance with the RAID.
9. The apparatus according to claim 6, wherein the predetermined caching condition is that the LUN fails corresponding to the RAID, and the important flag indicates that the data to be written is important data.
10. The apparatus of claim 9, wherein the apparatus further comprises:
the detection unit is used for immediately detecting whether a second cache block with a first flash disk identifier exists in a cache block corresponding to a second LUN if the failed RAID is recovered to be normal, wherein the second LUN is the LUN corresponding to the failed RAID;
and the disk brushing unit is used for brushing the disk of the second cache block immediately if the second cache block exists.
CN202011628130.1A 2020-12-31 2020-12-31 Data disk refreshing method and device Active CN112817520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011628130.1A CN112817520B (en) 2020-12-31 2020-12-31 Data disk refreshing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011628130.1A CN112817520B (en) 2020-12-31 2020-12-31 Data disk refreshing method and device

Publications (2)

Publication Number Publication Date
CN112817520A true CN112817520A (en) 2021-05-18
CN112817520B CN112817520B (en) 2022-08-09

Family

ID=75856269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011628130.1A Active CN112817520B (en) 2020-12-31 2020-12-31 Data disk refreshing method and device

Country Status (1)

Country Link
CN (1) CN112817520B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778342A (en) * 2021-09-17 2021-12-10 土巴兔集团股份有限公司 Data storage method and related equipment thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461936A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Cached data disk brushing method and device
CN106527974A (en) * 2016-10-09 2017-03-22 华为技术有限公司 Data writing method, device and system
CN106959912A (en) * 2017-03-07 2017-07-18 杭州宏杉科技股份有限公司 Disk detection method and device
CN106970765A (en) * 2017-04-25 2017-07-21 杭州宏杉科技股份有限公司 Date storage method and device
US20180210799A1 (en) * 2016-12-21 2018-07-26 EMC IP Holding Company LLC Method and device for rebuilding raid
US20180300240A1 (en) * 2017-04-17 2018-10-18 EMC IP Holding Company Method, apparatus and computer readable medium for building muti-tier flash cache by using spare flash drives
CN109783023A (en) * 2019-01-04 2019-05-21 平安科技(深圳)有限公司 The method and relevant apparatus brushed under a kind of data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461936A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Cached data disk brushing method and device
CN106527974A (en) * 2016-10-09 2017-03-22 华为技术有限公司 Data writing method, device and system
US20180210799A1 (en) * 2016-12-21 2018-07-26 EMC IP Holding Company LLC Method and device for rebuilding raid
CN106959912A (en) * 2017-03-07 2017-07-18 杭州宏杉科技股份有限公司 Disk detection method and device
US20180300240A1 (en) * 2017-04-17 2018-10-18 EMC IP Holding Company Method, apparatus and computer readable medium for building muti-tier flash cache by using spare flash drives
CN106970765A (en) * 2017-04-25 2017-07-21 杭州宏杉科技股份有限公司 Date storage method and device
CN109783023A (en) * 2019-01-04 2019-05-21 平安科技(深圳)有限公司 The method and relevant apparatus brushed under a kind of data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778342A (en) * 2021-09-17 2021-12-10 土巴兔集团股份有限公司 Data storage method and related equipment thereof
CN113778342B (en) * 2021-09-17 2024-03-29 土巴兔集团股份有限公司 Data storage method and related equipment thereof

Also Published As

Publication number Publication date
CN112817520B (en) 2022-08-09

Similar Documents

Publication Publication Date Title
US7461176B2 (en) Method for initialization of storage systems
US10223272B2 (en) Latency sensitive metadata object persistence operation for storage device
US8065479B2 (en) Methods and structure for improved storage system performance with write-back caching for disk drives
US11301379B2 (en) Access request processing method and apparatus, and computer device
US8533409B2 (en) Method of managing data snapshot images in a storage system
US8108450B2 (en) Aggregation of write traffic to a data store
US7783850B2 (en) Method and apparatus for master volume access during volume copy
US20050163014A1 (en) Duplicate data storing system, duplicate data storing method, and duplicate data storing program for storage device
US9563566B2 (en) Device and method for integrated data management for nonvolatile buffer cache and nonvolatile storage
US20190188156A1 (en) Stripe aligned cache flush
JP2004213647A (en) Writing cache of log structure for data storage device and system
KR20120090965A (en) Apparatus, system, and method for caching data on a solid-state strorage device
CN103207883A (en) Method For Metadata Persistence
US11030092B2 (en) Access request processing method and apparatus, and computer system
US6636954B2 (en) Method and apparatus for inter-disk copy processing, and a computer product
CN112817520B (en) Data disk refreshing method and device
US20050076260A1 (en) Raid consistency initialization method
US20020083263A1 (en) DASD-free non-volatile updates
CN118051179A (en) Techniques for partition namespace storage using multiple partitions
JP2006099802A (en) Storage controller, and control method for cache memory
US20040133741A1 (en) Disk array apparatus and data writing method used in the disk array apparatus
CN111580757A (en) Data writing method and system and solid state disk
CN111913664B (en) Data writing method and device
US10209926B2 (en) Storage system and control method therefor
CN112162703B (en) Cache implementation method and cache management module

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