CN115309588A - Metadata backup method, device, equipment and medium - Google Patents

Metadata backup method, device, equipment and medium Download PDF

Info

Publication number
CN115309588A
CN115309588A CN202211034575.6A CN202211034575A CN115309588A CN 115309588 A CN115309588 A CN 115309588A CN 202211034575 A CN202211034575 A CN 202211034575A CN 115309588 A CN115309588 A CN 115309588A
Authority
CN
China
Prior art keywords
target
preset
metadata
data
partition
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.)
Pending
Application number
CN202211034575.6A
Other languages
Chinese (zh)
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202211034575.6A priority Critical patent/CN115309588A/en
Publication of CN115309588A publication Critical patent/CN115309588A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • 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/061Improving I/O performance
    • 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
    • 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

Landscapes

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

Abstract

The application discloses a metadata backup method, a device, equipment and a medium, which relate to the field of data storage, and the method comprises the following steps: after target data are stored to a mechanical hard disk in a preset operating system by using a first piece of equipment in a preset object storage engine, storing target metadata corresponding to the target data, which are stored in a preset database, to a preset metadata storage partition in a target disk array, which is constructed based on RAID10, in the preset operating system by using a second piece of equipment in the preset object storage engine; and backing up the target metadata to a target backup partition which is constructed based on RAID1 and corresponds to the preset metadata storage partition in the target disk array. Therefore, the method and the device can reduce the data reconstruction amount when the disk is damaged, reduce the data degradation time, ensure the data safety and reliability to the maximum extent, and reduce the influence of a fault stage on normal service.

Description

Metadata backup method, device, equipment and medium
Technical Field
The present invention relates to the field of data storage, and in particular, to a metadata backup method, apparatus, device, and medium.
Background
After a new generation storage engine Bluestore is introduced, data index information of an object is stored in a rocksdb KV database, and in order to improve storage performance, the database is stored on an SSD (Solid State Disk or Solid State Drive, solid State Disk) partition. Some metadata information (OSDmap, pglog, pginfo, superblock) of the cluster is also stored in the rocksdb database in the form of kv (Key Value) for improving access performance.
Generally, an SSD disk is divided into 6 to 12 SSD partitions as db (data base) data partitions of OSDs (Object-based Storage devices), and when an SSD disk fails, data of db database information of all OSDs is lost, which causes that the OSDs cannot continue to work normally. At this time, after the SSD is replaced, the corresponding HDD (i.e., hard disk drive) needs to be formatted, the relevant OSD deletes and rejoins, and then the data on these HDDs is restored through data reconstruction. This mechanism can cause a problem when the cluster is at a high water level (50% and above), if the SSD is damaged and needs to be replaced, the time it takes for the entire replacement until the cluster returns to normal can be particularly long.
Therefore, when data is stored, how to avoid the situation that the data reconstruction amount is large due to the failure of the SSD disk and the cluster failure period is long is a problem to be solved in the field.
Disclosure of Invention
In view of this, an object of the present invention is to provide a metadata backup method, apparatus, device and medium, which can reduce data reconstruction amount when a disk is damaged, reduce data degradation time, ensure data security and reliability to the maximum extent, and reduce the influence of a failure stage on normal services. The specific scheme is as follows:
in a first aspect, the present application discloses a metadata backup method, including:
after target data are stored to a mechanical hard disk in a preset operating system by using a first piece of equipment in a preset object storage engine, storing target metadata corresponding to the target data, which are stored in a preset database, to a preset metadata storage partition in a target disk array, which is constructed based on RAID10, in the preset operating system by using a second piece of equipment in the preset object storage engine;
and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition, which is constructed on the basis of RAID1, in the target disk array.
Optionally, the storing, by using the second block device of the preset object storage engine, the target metadata, which is stored in a preset database and corresponds to the target data, in a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system includes:
storing target metadata corresponding to the target data, which is stored in a preset database, into a preset metadata storage partition in a first target disk in a target disk array constructed based on RAID10 in the preset operating system by using a second piece of equipment of the preset object storage engine;
correspondingly, after the backing up the target metadata to the target backup partition corresponding to the preset metadata storage partition, which is constructed based on RAID1, in the target disk array, the method further includes:
and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition in a second target disk corresponding to the first target disk based on RAID1 in the target disk array.
Optionally, after the target data is stored in the mechanical hard disk in the preset operating system by using the first block device in the preset object storage engine, the target metadata stored in the preset database and corresponding to the target data is stored in the preset metadata storage partition in the target disk array constructed based on RAID10 in the preset operating system by using the second block device in the preset object storage engine, including:
after target data are stored to a mechanical hard disk in a preset kernel by using a first block device in the bluestore, target metadata corresponding to the target data and stored in a rocksDB are stored to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using a second block device of the bluestore.
Optionally, the storing, by using the second block device of the preset object storage engine, the target metadata, which is stored in a preset database and corresponds to the target data, in a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system includes:
acquiring target metadata corresponding to the target data, which is stored in a preset database, according to an interface provided by a preset file system in the preset object storage engine;
and storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by using a second block device of the preset object storage engine.
Optionally, the storing, by using the second block device of the bluestore, the target metadata, which is stored in the RocksDB and corresponds to the target data, into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel includes:
acquiring target metadata corresponding to the target data, which is stored in a rocksDB, according to an interface provided by BluesFS in bluestore;
and storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using a second block device of the bluestore.
Optionally, before the storing the target data to the mechanical hard disk in the preset operating system by using the first block device in the preset object storage engine, the method further includes:
and constructing a target disk array with RAID0 as an execution array and RAID1 as a protection array based on RAID 10.
Optionally, after the backing up the target metadata to the target backup partition corresponding to the preset metadata storage partition, which is constructed based on RAID1, in the target disk array, the method further includes:
when a certain disk in the target disk array is identified to have a fault, reading target reconstruction data from the target backup partition;
and based on the target reconstruction data, performing data reconstruction on a new disk newly inserted into the target disk array by using a preset data reconstruction method.
In a second aspect, the present application discloses a metadata backup apparatus, comprising:
the metadata storage module is used for storing target metadata which is stored in a preset database and corresponds to the target data into a preset metadata storage partition in a target disk array which is constructed based on RAID10 in a preset operating system by using a second block device of a preset object storage engine after the first block device of the preset object storage engine stores the target data into a mechanical hard disk in the preset operating system;
and the metadata backup module is used for backing up the target metadata to a target backup partition which is constructed on the basis of RAID1 and corresponds to the preset metadata storage partition in the target disk array.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the aforementioned metadata backup method.
In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the metadata backup method disclosed in the foregoing.
The application provides an OSD metadata backup technology based on RAID10, after target data are stored to a mechanical hard disk in a preset operating system by using a first piece of equipment in a preset object storage engine, target metadata corresponding to the target data stored in a preset database are stored to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by using a second piece of equipment in the preset object storage engine; and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition, which is constructed on the basis of RAID1, in the target disk array. Therefore, the invention realizes the backup function of OSD metadata by using the backup redundancy mechanism of RAID10, the RAID10 realizes data redundancy by using data mirroring of four SSD disks, RAID0 is used as an execution array, RAID1 is used as a data protection array, and compared with the condition that no measure is taken by a single SSD disk, the data writing speed can be doubled. And when the original data is busy or abnormal, the data reading can be directly finished from the backup mirror image. The writing speed is improved, and meanwhile, the safety is also considered. The data reconstruction time when the SSD disk fails is shortened, the influence of the failure on the cluster state is reduced, and the reliability of the system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a metadata backup method provided in the present application;
fig. 2 is a schematic structural diagram of a target disk array constructed based on RAID10 according to the present application;
FIG. 3 is a flowchart of a specific metadata backup method provided in the present application;
fig. 4 is a diagram of a data backup storage architecture provided in the present application;
FIG. 5 is a schematic structural diagram of a metadata backup apparatus according to the present application;
fig. 6 is a block diagram of an electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In the prior art, when one SSD disk fails, data of db database information of all corresponding OSDs is lost, which causes that the OSDs cannot continue to work normally, and when a cluster is at a high water level (50% or more), if the SSD is damaged and needs to be replaced, the time from the whole replacement until the cluster is restored to a normal state is extremely long. According to the method and the device, the data reconstruction amount can be reduced when the disk is damaged, the data degradation time is shortened, the data safety and reliability are guaranteed to the maximum extent, and the influence of a fault stage on normal services is reduced.
The embodiment of the invention discloses a metadata backup method, which is described with reference to fig. 1 and comprises the following steps:
step S11: after target data are stored to a mechanical hard disk in a preset operating system by using a first piece of equipment in a preset object storage engine, target metadata which are stored in a preset database and correspond to the target data are stored to a preset metadata storage partition in a target disk array which is constructed on the basis of RAID10 in the preset operating system by using a second piece of equipment in the preset object storage engine.
In this embodiment, before the storing the target data to the mechanical hard disk in the preset operating system by using the first block of device in the preset object storage engine, the method further includes: and constructing a target disk array with RAID0 as an execution array and RAID1 as a protection array based on RAID 10.
Fig. 2 is a schematic diagram of a target disk array structure constructed based on RAID10, in the present application, every two disks in the target disk array form RAID1, and two groups of RAID1 form RAID0, and the RAID10 is formed with this structure, that is, in the drawing, a disk 1 and a disk 2 form a RAID1, a disk 3 and a disk 4 form a RAID1, and two RAID1 form a new RAID0. In the specific embodiment, the data A1, A3, A5, and A7 written on the hard disk 1, the hard disk 2 is a backup disk of the data of the hard disk 1, that is, the data A1, A3, A5, and A7 are also stored in the hard disk 2, the data A0, A2, A4, and A6 are stored in the hard disk 3, the data A0, A2, A4, and A6 are also stored in the hard disk 4, which is a backup disk of the data of the hard disk 3, and all the data are combined into RAID10 on the four hard disks, and have both characteristics of RAID0 and RAID 1. In this embodiment, RAID10 uses RAID0 as an execution array and RAID1 as a data protection array, and has the same fault-tolerant capability as RAID1, and is used for fault-tolerant processing overhead. Basically the same as the single mirroring operation, because RAID0 is used as an execution level, the method has higher read-write performance and is suitable for occasions which need high performance and high fault tolerance but have low requirement on capacity.
In this embodiment, the storing, by using the second block device of the preset object storage engine, the target metadata stored in a preset database and corresponding to the target data in a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system may include: and storing target metadata corresponding to the target data, which is stored in a preset database, into a preset metadata storage partition in a first target disk in a target disk array constructed based on RAID10 in the preset operating system by using a second block device of the preset object storage engine.
In this embodiment, in the deployment phase, as shown in fig. 2, four SSDs form a RAID10 array, a series of partitions are divided on the RAID10 array to serve as metadata partitions of OSD of the HDD disk, so as to create the OSD, and data read and written by metadata in the OSD all enter the partitions of the array.
In this embodiment, after the target data is written into the mechanical hard disk, that is, the mechanical hard disk, the metadata is written. Specifically, the metadata is written into a preset metadata storage partition pre-partitioned from a target disk array constructed in advance based on RAID 10. In a specific embodiment, the preset metadata storage partition divided in advance may be referred to as an SSD1 partition.
In this embodiment, the storing, by using the second block device of the preset object storage engine, the target metadata stored in a preset database and corresponding to the target data in a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system may include: acquiring target metadata corresponding to the target data, which is stored in a preset database, according to an interface provided by a preset file system in the preset object storage engine; and storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by using a second block device of the preset object storage engine.
In some specific embodiments, when writing target metadata corresponding to target data into a target disk array, the target metadata is obtained from a preset database, and at this time, the target metadata may be obtained through an interface provided by a preset file system in a preset object storage engine.
Step S12: and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition, which is constructed on the basis of RAID1, in the target disk array.
In this embodiment, the backing up the target metadata to the target backup partition corresponding to the preset metadata storage partition, which is constructed based on RAID1 in the target disk array, may include: and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition in a second target disk corresponding to the first target disk based on RAID1 in the target disk array.
In this embodiment, the backup partition in this step and the metadata storage partition in step S11 are partitions constructed based on RAID1, and the target backup partition is a backup partition corresponding to the preset metadata storage partition. In a specific embodiment, the preset metadata storage partition divided in advance may be referred to as an SSD2 partition.
It should be noted that in the present application, raid10 will automatically exit the Raid10 array when the disk is pulled out, and will automatically add the Raid10 array when the disk is inserted for data recovery. In this embodiment, the backing up the target metadata to the target backup partition corresponding to the preset metadata storage partition, which is constructed based on RAID1 in the target disk array, may include: when a certain disk in the target disk array is identified to have a fault, reading target reconstruction data from the target backup partition; and based on the target reconstruction data, performing data reconstruction on a new disk newly inserted into the target disk array by using a preset data reconstruction method.
In the embodiment, the metadata can be written into a disk array formed by four SSD disks through the RAID10, so that when one SSD disk fails, the metadata required by OSD operation can be read from the backup disk, the validity of the existing data on the HDD disk after the SSD fails can be ensured, the reconstruction data volume and the reconstruction time caused by the SSD failure are greatly reduced, only a new hard disk needs to be replaced to recover the data according to the working principle of the RAID10, and the system can still normally work in the data recovery process. The original data is synchronously restored to the replaced hard disk.
In the embodiment, the backup redundancy mechanism of RAID10 is used to implement the backup function of OSD metadata. While the Raid10 scheme results in 50% disk wastage, it provides 200% speed and single disk-corruption data security. Because the requirement on the reading and writing speed of metadata is very high, 200% of data writing advantages can be provided on the premise of ensuring data security through a RAID10 mode, which is very important for a high-performance storage system extremely meeting the requirement on the data writing speed, and the requirements on the reliability of the system under the disk failure and the overall high performance of the system are met.
The embodiment provides an OSD metadata backup technology based on RAID10, after target data is stored to a mechanical hard disk in a preset operating system by using a first block device in a preset object storage engine, target metadata corresponding to the target data stored in a preset database is stored to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by using a second block device of the preset object storage engine; and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition, which is constructed on the basis of RAID1, in the target disk array. Therefore, the invention realizes the backup function of OSD metadata by using the backup redundancy mechanism of RAID10, the RAID10 realizes data redundancy by using data mirroring of four SSD disks, RAID0 is used as an execution array, RAID1 is used as a data protection array, and compared with the condition that no measure is taken by a single SSD disk, the data writing speed can be doubled. And when the original data is busy or abnormal, the data reading can be directly finished from the backup mirror image. The writing speed is improved, and meanwhile, the safety is also considered. The data reconstruction time when the SSD disk fails is shortened, the influence of the failure on the cluster state is reduced, and the reliability of the system is improved.
Fig. 3 is a flowchart of a specific metadata backup method according to an embodiment of the present disclosure. Referring to fig. 3, the method includes:
step S21: after target data are stored to a mechanical hard disk in a preset kernel by using a first block device in the bluestore, target metadata corresponding to the target data and stored in a rocksDB are stored to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using a second block device of the bluestore.
In this embodiment, the preset object storage engine is preferably a bluestore, the preset operating system is preferably a kernel, and the preset database is preferably rocksd db.
Step S22: and acquiring target metadata corresponding to the target data stored in a rocksDB according to an interface provided by BluesFS in bluestore.
In this embodiment, when the preset object storage engine is bluestore, the preset file system is BluesFS.
Step S23: and storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using a second block device of the bluestore.
Fig. 4 is a diagram of a data backup storage architecture, in which Bluestore is used as the preset object storage engine, kernel is used as the preset operating system to complete storage operations of data and metadata, where a first block device writes data into an HDD disk in the kernel, a second block device writes metadata into a target disk array constructed by RAID10 of the kernel, and SSD1 and SSD2 complete disk metadata backup. When the second block device is used to write the metadata into RAID10, the metadata corresponding to the data is determined from the rocksfb, and then is transmitted to the second block device through an interface provided by bluefs, and then the second block device writes the metadata into the target disk array.
In this embodiment, after storing target data to a mechanical hard disk in a preset kernel by using a first block device in a bluestore, storing target metadata corresponding to the target data, which is stored in a RocksDB, to a preset metadata storage partition in a target disk array, which is constructed based on RAID10 in the preset kernel, by using a second block device of the bluestore; acquiring target metadata corresponding to the target data, which is stored in a rocksDB, according to an interface provided by BluesFS in bluestore; and finally, storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using the second block device of the bluestore. Thus, the present invention can implement the backup function of OSD metadata through the backup redundancy mechanism of RAID 10. When data storage is completed by using the bluestore as a preset object storage engine, target metadata which is stored in the rocksDB and corresponds to the target data is obtained by using an interface provided by a preset file system BluesFS in the bluestore, and then the target metadata is stored in a target disk array which is constructed based on RAID10 by using a second block device. Compared with the condition that no measure is taken by a single SSD, the data writing speed can be doubled, and when the original data is busy or abnormal, the data reading can be directly finished from the backup mirror image. The writing speed is improved, and meanwhile, the safety is also considered. The data reconstruction time when the SSD disk fails is shortened, and the influence of the failure on the cluster state is reduced.
Referring to fig. 5, an embodiment of the present application discloses a metadata backup apparatus, which may specifically include:
the metadata storage module 11 is configured to store, by using a first device in a preset object storage engine, target metadata corresponding to the target data stored in a preset database to a preset metadata storage partition in a target disk array constructed based on RAID10 in a preset operating system, by using a second device in the preset object storage engine after the target data is stored to a mechanical hard disk in the preset operating system;
and the metadata backup module 12 is configured to backup the target metadata to a target backup partition corresponding to the preset metadata storage partition, which is constructed based on RAID1, in the target disk array.
The invention provides an OSD metadata backup technology based on RAID10, which stores target data to a mechanical hard disk in a preset operating system by using a first block device in a preset object storage engine, and then stores the target metadata corresponding to the target data stored in a preset database to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by using a second block device in the preset object storage engine; and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition, which is constructed on the basis of RAID1, in the target disk array. Therefore, the invention realizes the backup function of OSD metadata by using the backup redundancy mechanism of RAID10, the RAID10 realizes data redundancy by using data mirroring of four SSD disks, RAID0 is used as an execution array, RAID1 is used as a data protection array, and compared with the condition that no measure is taken by a single SSD disk, the data writing speed can be doubled. And when the original data is busy or abnormal, the data reading can be directly finished from the backup mirror image. The writing speed is improved, and meanwhile, the safety is considered. The data reconstruction time when the SSD disk fails is shortened, the influence of the failure on the cluster state is reduced, and the reliability of the system is improved.
In some specific embodiments, the metadata storage module 11 specifically includes:
a first metadata storage unit, configured to store, by using a second device of the preset object storage engine, target metadata corresponding to the target data and stored in a preset database into a preset metadata storage partition in a first target disk in a target disk array that is constructed based on RAID10 in the preset operating system;
correspondingly, the metadata backup module 12 specifically includes:
a first metadata backup unit, configured to backup the target metadata to a target backup partition corresponding to the preset metadata storage partition in a second target disk corresponding to the first target disk based on RAID1 in the target disk array.
In some specific embodiments, the metadata storage module 11 specifically includes:
and the second metadata storage unit is used for storing the target data stored in the rocksDB and corresponding to the target data into a preset metadata storage partition in a target disk array constructed based on RAID10 in a preset kernel by using a second block device of the bluestore after the first block device of the bluestore stores the target data into a mechanical hard disk in the preset kernel.
In some specific embodiments, the metadata storage module 11 specifically includes:
a first target metadata obtaining unit, configured to obtain, according to an interface provided by a preset file system in the preset object storage engine, target metadata corresponding to the target data, stored in a preset database;
and the first target metadata storage unit is used for storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by using a second block device of the preset object storage engine.
In some embodiments, the second metadata storage unit includes:
a second target metadata acquisition unit, configured to acquire, according to an interface provided by bluefs in bluestore, target metadata corresponding to the target data stored in the RocksDB;
and the second target metadata storage unit is used for storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using the second block device of the bluestore.
In some embodiments, the metadata backup apparatus further includes:
and the target disk array construction unit is used for constructing a target disk array with RAID0 as an execution array and RAID1 as a protection array based on RAID 10.
In some specific embodiments, the metadata backup apparatus further includes:
the target reconstruction data reading unit is used for reading target reconstruction data from the target backup partition when a certain disk in the target disk array is identified to have a fault;
and the data reconstruction unit is used for reconstructing data of a new disk newly inserted into the target disk array by using a preset data reconstruction method based on the target reconstruction data.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 6 is a block diagram of an electronic device 20 shown in the exemplary embodiment, which should not be construed as limiting the scope of the application in any way.
Fig. 6 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a display 24, an input-output interface 25, a communication interface 26, and a communication bus 27. Wherein the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the metadata backup method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 26 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol followed by the communication interface is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk, an optical disk, or the like, the resources stored thereon may include an operating system 221, a computer program 222, virtual machine data 223, and the like, and the virtual machine data 223 may include various data. The storage means may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, netware, unix, linux, or the like. The computer programs 222 may further include computer programs that can be used to perform other specific tasks in addition to the computer programs that can be used to perform the metadata backup method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium includes a Random Access Memory (RAM), a Memory, a Read-Only Memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk, or an optical disk, or any other form of storage medium known in the art. Wherein the computer program when executed by a processor implements the metadata backup method disclosed in the foregoing. For the specific steps of the method, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another 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 phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The metadata backup method, device, equipment and storage medium provided by the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A metadata backup method, comprising:
after target data are stored to a mechanical hard disk in a preset operating system by using a first piece of equipment in a preset object storage engine, storing target metadata which are stored in a preset database and correspond to the target data into a preset metadata storage partition in a target disk array which is constructed on the basis of RAID10 in the preset operating system by using a second piece of equipment in the preset object storage engine;
and backing up the target metadata to a target backup partition which is constructed based on RAID1 and corresponds to the preset metadata storage partition in the target disk array.
2. The metadata backup method according to claim 1, wherein the storing, by the second block device of the preset object storage engine, the target metadata corresponding to the target data stored in a preset database into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system, comprises:
storing target metadata corresponding to the target data, which is stored in a preset database, into a preset metadata storage partition in a first target disk in a target disk array constructed based on RAID10 in the preset operating system by using a second block device of the preset object storage engine;
correspondingly, after the backing up the target metadata to the target backup partition corresponding to the preset metadata storage partition, which is constructed based on RAID1, in the target disk array, the method further includes:
and backing up the target metadata to a target backup partition corresponding to the preset metadata storage partition in a second target disk corresponding to the first target disk based on RAID1 in the target disk array.
3. The method of claim 1, wherein after storing the target data to a mechanical hard disk in a preset operating system by using a first device in a preset object storage engine, storing the target metadata corresponding to the target data stored in a preset database to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by using a second device in the preset object storage engine, comprises:
after target data are stored to a mechanical hard disk in a preset kernel by using a first block device in the bluestore, target metadata corresponding to the target data and stored in a rocksDB are stored to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using a second block device of the bluestore.
4. The method of claim 3, wherein the storing, by the second block device of the preset object storage engine, target metadata corresponding to the target data stored in a preset database into a preset metadata storage partition in a target disk array of the preset operating system constructed based on RAID10 comprises:
acquiring target metadata corresponding to the target data, which is stored in a preset database, according to an interface provided by a preset file system in the preset object storage engine;
and storing the target metadata into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset operating system by utilizing a second piece of equipment of the preset object storage engine.
5. The metadata backup method according to claim 4, wherein the storing, by the second block device of the bluestore, the target metadata corresponding to the target data stored in the RocksDB into a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel comprises:
acquiring target metadata corresponding to the target data, which is stored in a rocksDB, according to an interface provided by BluesFS in bluestore;
and storing the target metadata to a preset metadata storage partition in a target disk array constructed based on RAID10 in the preset kernel by using the second block device of the bluestore.
6. The metadata backup method according to claim 1, before storing the target data to a mechanical hard disk in a preset operating system by using a first block device in a preset object storage engine, further comprising:
and constructing a target disk array with RAID0 as an execution array and RAID1 as a protection array based on RAID 10.
7. The metadata backup method according to any one of claims 1 to 6, wherein after the backup of the target metadata into the target backup partition corresponding to the preset metadata storage partition constructed based on RAID1 in the target disk array, the method further comprises:
when a certain disk in the target disk array is identified to have a fault, reading target reconstruction data from the target backup partition;
and based on the target reconstruction data, performing data reconstruction on a new disk newly inserted into the target disk array by using a preset data reconstruction method.
8. A metadata backup apparatus, comprising:
the metadata storage module is used for storing target metadata corresponding to the target data, which is stored in a preset database, into a preset metadata storage partition in a target disk array constructed based on RAID10 in a preset operating system by using a second piece of equipment of a preset object storage engine after the first piece of equipment in the preset object storage engine is used for storing the target data to a mechanical hard disk in the preset operating system;
and the metadata backup module is used for backing up the target metadata to a target backup partition which is constructed on the basis of RAID1 and corresponds to the preset metadata storage partition in the target disk array.
9. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the metadata backup method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the metadata backup method as claimed in any one of claims 1 to 7.
CN202211034575.6A 2022-08-26 2022-08-26 Metadata backup method, device, equipment and medium Pending CN115309588A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211034575.6A CN115309588A (en) 2022-08-26 2022-08-26 Metadata backup method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211034575.6A CN115309588A (en) 2022-08-26 2022-08-26 Metadata backup method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115309588A true CN115309588A (en) 2022-11-08

Family

ID=83865142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211034575.6A Pending CN115309588A (en) 2022-08-26 2022-08-26 Metadata backup method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115309588A (en)

Similar Documents

Publication Publication Date Title
US20230138736A1 (en) Cluster file system-based data backup method and apparatus, and readable storage medium
CN109791520B (en) Physical media aware spatially coupled logging and replay
CN110531940B (en) Video file processing method and device
US9348827B1 (en) File-based snapshots for block-based backups
EP2494456B1 (en) Backup using metadata virtual hard drive and differential virtual hard drive
US10126946B1 (en) Data protection object store
US11544159B2 (en) Techniques for managing context information for a storage device while maintaining responsiveness
CN104077380A (en) Method and device for deleting duplicated data and system
US11030060B2 (en) Data validation during data recovery in a log-structured array storage system
KR20170054767A (en) Database management system and method for modifying and recovering data the same
CN115098299A (en) Backup method, disaster recovery method, device and equipment for virtual machine
CN113885809B (en) Data management system and method
KR970049599A (en) Data processing system with increased data storage performance
US20210223957A1 (en) Storage apparatus and storage control method
EP4170499A1 (en) Data storage method, storage system, storage device, and storage medium
CN115827322A (en) Cloud storage data full-scale disaster recovery method and system
US10795588B1 (en) Check point recovery based on identifying used blocks for block-based backup files
CN115309588A (en) Metadata backup method, device, equipment and medium
US11663165B2 (en) Method, electronic device, and computer program product for managing file system
US11467777B1 (en) Method and system for storing data in portable storage devices
CN111124746B (en) Method, apparatus and computer readable medium for managing redundant array of independent disks
CN113641298A (en) Data storage method, device and computer program product
CN111897676A (en) File backup method and device based on database index
CN113391937A (en) Method, electronic device and computer program product for storage management
US7590780B2 (en) Method and computer program product to migrate legacy data to a RAID array while contemporaneously providing user access to legacy data

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