Search

CN-115328407-B - Cache disk replacement method, device, equipment and storage medium

CN115328407BCN 115328407 BCN115328407 BCN 115328407BCN-115328407-B

Abstract

The application discloses a cache disk replacement method, a device, equipment and a storage medium, which relate to the technical field of data storage and comprise the steps of storing metadata information in an original cache disk DB partition when detecting that the abrasion degree of original solid state disk equipment reaches a preset threshold value, replacing new solid state disk equipment, establishing a target cache disk by using original main storage equipment and the metadata information in the original solid state disk, starting the target cache disk, reconstructing dirty data of the original cache disk and executing new data generated by disk replacement operation, and completing cache disk replacement. When the service life of the original solid state disk is detected to be about to expire, the original solid state disk is replaced, a target buffer disk is created by using the main storage device of the original solid state disk and the copied metadata information, the data information in the corresponding DB partition is recovered, the data of the corresponding Cache partition is reconstructed by using the available copy, the reconstructed data volume is greatly reduced by multiplexing the main storage device, the reconstruction speed is accelerated, and the risk during the data reconstruction is reduced.

Inventors

  • ZHANG YINGJIE
  • MENG XIANGRUI

Assignees

  • 浪潮电子信息产业股份有限公司
  • 浪潮电子信息产业股份有限公司

Dates

Publication Date
20260421
Application Date
20220830
Priority Date
20220830

Claims (7)

  1. 1. A cache disk replacement method, applied to a distributed object storage system, comprising: when detecting that the abrasion degree of the original solid state disk device reaches a preset threshold value, storing metadata information in an original buffer disk DB partition; changing new solid state disk equipment, and establishing a target cache disk by using original main storage equipment and metadata information in the original solid state disk; Starting the target cache disk, reconstructing dirty data of the original cache disk and new data generated by executing disk changing operation, and completing the replacement of the cache disk; Wherein after the target cache disk is started, the method further comprises: deleting Cache data used for being recorded in the Cache partition in the metadata information based on the received deletion parameters; the cache disk replacement method further comprises the following steps: constructing a Cache disk based on the Cache partition, the DB partition and the main storage device; the reconstructing dirty data of the original cache disk and new data generated by executing disk changing operation includes: reconstructing new Cache data of a Cache partition in the new Cache disk based on dirty data in the Cache disk in a normal state and new data modified by service increment generated by executing disk changing operation, wherein the dirty data is data which is not written into the main storage device.
  2. 2. The cache disk replacement method according to claim 1, wherein when detecting that the wear degree of the original solid state disk device reaches a preset threshold, before storing metadata information in the original cache disk DB partition, further comprising: Inquiring the abrasion degree of all solid state disk devices of the cluster through a preset abrasion degree inquiry command.
  3. 3. The cache disk replacement method of claim 1, wherein the storing metadata information in the original cache disk DB partition comprises: and backing up the original buffer disk DB partition through a preset backup command, and storing metadata information in the original buffer disk DB partition into block equipment or files.
  4. 4. The method for replacing a cache disk according to claim 1, further comprising, after the replacing the new solid state disk device: and carrying out partition division operation on the new solid state disk equipment, and copying the backed-up metadata information to a DB partition in the new solid state disk equipment.
  5. 5. A cache disk replacement apparatus, for use in a distributed object storage system, comprising: the information storage module is used for storing metadata information in the DB partition of the original buffer disk when detecting that the abrasion degree of the original solid state disk device reaches a preset threshold value; the target disk establishing module is used for replacing the new solid state disk equipment and establishing a target cache disk by utilizing the original main storage equipment and metadata information in the original solid state disk; the cache disk replacement module is used for starting the target cache disk, reconstructing dirty data of the original cache disk and new data generated by executing disk replacement operation, and completing cache disk replacement; wherein, the cache disk replacement device further includes: The data deleting unit is used for deleting the Cache data which are used for being recorded in the Cache partition in the metadata information based on the received deleting parameters; wherein, the cache disk replacement device further includes: the Cache disk construction unit is used for constructing a Cache disk based on the Cache partition, the DB partition and the main storage device; Wherein, the cache disk replacement module includes: And the data reconstruction unit is used for reconstructing new Cache data of a Cache partition in the new Cache disk based on dirty data in the Cache disk in a normal state and new data modified by service increment generated by executing disk replacement operation, wherein the dirty data is data which is not written into the main storage equipment.
  6. 6. An electronic device, comprising: A memory for storing a computer program; a processor for executing the computer program to implement the steps of the cache disk replacement method as claimed in any one of claims 1 to 4.
  7. 7. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the steps of the cache disk replacement method according to any one of claims 1 to 4.

Description

Cache disk replacement method, device, equipment and storage medium Technical Field The present invention relates to the field of data storage technologies, and in particular, to a method, an apparatus, a device, and a storage medium for replacing a cache disk. Background In recent years, the scale of internet enterprises has been expanding, the data size has been increasing, and the demand for data storage capacity has increased. Compared with the traditional storage system, the ICFS (Inspur Cluster FILE SYSTEM, distributed file system) is becoming more and more popular with users due to its excellent cost performance and flexible fault tolerance and scalability. In an actual storage service scenario, in view of comprehensive consideration of performance and cost, an SSD (Solid STATE DRIVES, solid state disk) is used as a cache device in a layered storage scenario of the ICFS distributed storage system, and random lower case buffer and hot spot data cache functions are provided for a storage client, so that service read-write performance of the HDD (HARD DISK DRIVE ) is improved when the HDD is used as main storage. Flash particles on the storage chip of an SSD device are erased a limited number of times, and SSDs as cache devices are easier to reach for life than HDD host devices. By reading the s.m.a.r.t information of the hard disk, the wear percentage of the hard disk can be obtained, and according to an empirical value, when the wear percentage of the SSD reaches 90%, replacement of the device is recommended, and when the wear percentage of the SSD reaches 95%, the hard disk is already quite unreliable and needs to be replaced immediately. In the original buffer life expiration replacement scheme of the ICFS distributed storage system layered storage scenario, all OSDs (Object-based Storage Device, object storage device) affected by life expiration SSD devices need to be set to out, after a new SSD buffer disk is reinserted, OSDs are recreated in combination with the previous HDD device, and original data is reconstructed from OSDs under other normal state fault domains. This way all data information on the original HDD device is discarded. Because the single SSD provides buffer partitions for a plurality of HDDs, when the life of the SSD expires, a plurality of OSD needs to be reconstructed, the reconstruction data volume is large, and the period is long. In addition, if other fault problems occur in the cluster during the reconstruction period, the storage cluster exceeds the fault domain, and data is easily lost. In summary, how to realize the replacement of the buffer disk on the basis of reducing the amount of the reconstructed data, to accelerate the reconstruction speed and reduce the risk during the reconstruction of the data is a technical problem to be solved in the field. Disclosure of Invention Accordingly, an object of the present invention is to provide a method, apparatus, device, and storage medium for replacing a cache disk, which can reduce the amount of data to be reconstructed, and thereby increase the reconstruction speed and reduce the risk during the reconstruction of data. The specific scheme is as follows: in a first aspect, the present application discloses a cache disk replacement method, which is applied to a distributed object storage system, and includes: when detecting that the abrasion degree of the original solid state disk device reaches a preset threshold value, storing metadata information in an original buffer disk DB partition; changing new solid state disk equipment, and establishing a target cache disk by using original main storage equipment and metadata information in the original solid state disk; And starting the target cache disk, reconstructing dirty data of the original cache disk and new data generated by executing disk changing operation, and completing the replacement of the cache disk. Optionally, before storing the metadata information in the original cache disk DB partition when the abrasion degree of the original solid state disk device is detected to reach the preset threshold, the method further includes: Inquiring the abrasion degree of all solid state disk devices of the cluster through a preset abrasion degree inquiry command. Optionally, the storing metadata information in the original cache disk DB partition includes: and backing up the original buffer disk DB partition through a preset backup command, and storing metadata information in the original buffer disk DB partition into block equipment or files. Optionally, after the replacing the new solid state hard disk device, the method further includes: and carrying out partition division operation on the new solid state disk equipment, and copying the backed-up metadata information to a DB partition in the new solid state disk equipment. Optionally, after the target cache disk is started, the method further includes: and deleting the Cache data used for being recorded in the Cache partition