CN111159786B - Metadata protection method and device, electronic equipment and storage medium - Google Patents

Metadata protection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111159786B
CN111159786B CN201911386463.5A CN201911386463A CN111159786B CN 111159786 B CN111159786 B CN 111159786B CN 201911386463 A CN201911386463 A CN 201911386463A CN 111159786 B CN111159786 B CN 111159786B
Authority
CN
China
Prior art keywords
version number
metadata
service process
white list
metadata service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911386463.5A
Other languages
Chinese (zh)
Other versions
CN111159786A (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201911386463.5A priority Critical patent/CN111159786B/en
Publication of CN111159786A publication Critical patent/CN111159786A/en
Application granted granted Critical
Publication of CN111159786B publication Critical patent/CN111159786B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a metadata protection method, a device, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: receiving a service request of a target metadata service process; the service request at least comprises a white list version number stored by a target metadata service process; determining a white list version number corresponding to the service request as a first version number, and determining a white list version number stored in a storage system as a second version number; the white list stores the home metadata service process corresponding to the storage system, and the version number of the white list stored by the storage system is updated when the home metadata service process is switched; judging whether the first version number is consistent with the second version number; and if so, executing the operation corresponding to the service request when the target metadata service process is in the white list. Therefore, the metadata protection method provided by the application uses the white list with the version number to avoid data damage caused by split brain.

Description

Metadata protection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a metadata protection method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The distributed storage architecture comprises a client, a Metadata service (MDS), a storage system and a cluster management subsystem, wherein each Metadata can only be served by a corresponding attribution Metadata service process, so that inconsistency and even data damage caused by the operation of the same Metadata by a plurality of Metadata service processes are avoided. If the attribution metadata service process has a fault, the cluster management subsystem selects metadata which is responsible for a normal metadata service fault metadata service process from the cluster, namely modifies the attribution metadata service process of the metadata, completes the fault switching process and ensures high availability of upper-layer service access.
In the above-mentioned failover process, under some abnormal conditions, for example, the metadata service process of the cluster management subsystem has an abnormal fault detection function, but the metadata service process itself has no abnormality, a phenomenon that a plurality of metadata service processes think that the same metadata belongs to the same metadata process may be formed within a short time, that is, a split brain occurs. These metadata service processes may modify the same metadata, and if the metadata written by the new metadata service process is overwritten by the metadata written by the old metadata service process, data damage may occur, causing a serious system failure.
Therefore, how to avoid data damage caused by brain cracks is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
The present application aims to provide a metadata protection method, device, electronic device and computer-readable storage medium, which can avoid data damage caused by split brain.
In order to achieve the above object, the present application provides a metadata protection method, applied to a storage system, including:
receiving a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process;
determining a white list version number corresponding to the service request as a first version number, and determining a white list version number stored in the storage system as a second version number; the white list stores an attribution metadata service process corresponding to the storage system, and the version number of the white list stored by the storage system is updated when the attribution metadata service process is switched;
judging whether the first version number is consistent with the second version number;
and if so, executing the operation corresponding to the service request when the target metadata service process is in the white list.
Wherein, still include:
and when the first version number is higher than the second version number, updating the white list, and re-entering a step of taking the version number corresponding to the white list of the metadata service stored in the storage system as the second version number.
Wherein, still include:
and when the first version number is lower than the second version number, returning error information to the target metadata service process so that the target metadata service process can update the version number of the white list stored by the target metadata service process.
Wherein, still include:
and when the target metadata service process does not exist in the white list, returning error information to the target metadata service process so as to facilitate the target metadata service process to perform exception handling.
To achieve the above object, the present application provides a metadata protection apparatus, including:
the receiving module is used for receiving a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process;
the determining module is used for determining the version number of the white list corresponding to the service request as a first version number and determining the version number of the white list stored in the storage system as a second version number; the white list stores an attribution metadata service process corresponding to the storage system, and the version number of the white list stored by the storage system is updated when the attribution metadata service process is switched;
the judging module is used for judging whether the first version number is consistent with the second version number; if yes, starting the working process of the execution module;
and the execution module is used for executing the operation corresponding to the service request when the target metadata service process is in the white list.
Wherein, still include:
and the updating module is used for updating the white list and starting the work flow of the determining module when the first version number is higher than the second version number.
Wherein, still include:
and the first returning module is used for returning error information to the target metadata service process when the first version number is lower than the second version number so that the target metadata service process can update the white list version number stored by the target metadata service process.
Wherein, still include:
and the second returning module is used for returning error information to the target metadata service process when the target metadata service process does not exist in the white list so as to facilitate the exception handling of the target metadata service process.
To achieve the above object, the present application provides an electronic device including:
a memory for storing a computer program;
a processor for implementing the steps of the above-described metadata protection method when executing the computer program.
To achieve the above object, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described metadata protection method.
According to the above scheme, the metadata protection method provided by the application includes: receiving a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process; determining a white list version number corresponding to the service request as a first version number, and determining a white list version number stored in the storage system as a second version number; the white list stores the attribution metadata service process corresponding to the storage system; judging whether the first version number is consistent with the second version number; and if so, executing the operation corresponding to the service request when the target metadata service process is in the white list.
According to the metadata protection method, the storage system realizes a white list checking mechanism, can acquire the latest white list from the cluster management subsystem, and on the other hand, when the storage system processes the service request of the target metadata service process, checks the white list version number carried in the service request. If the version numbers of the two parties are consistent and the target metadata service process exists in the white list, the service request is normally processed, so that the problem that the metadata is damaged due to the fact that data written by a new metadata service is covered by data written by an old metadata service when the metadata service is split can be solved. Therefore, the metadata protection method provided by the application uses the white list with the version number, and achieves the consistency of the white list among different network elements in the distributed file system by using the version number, so that the metadata is protected from being damaged by split metadata service. The application also discloses a metadata protection device, an electronic device and a computer readable storage medium, which can also achieve the technical effects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is an architecture diagram of a distributed file system;
FIG. 2 is a flow diagram illustrating a method of metadata protection in accordance with an exemplary embodiment;
FIG. 3 is a flow diagram illustrating another method of metadata protection in accordance with an illustrative embodiment;
FIG. 4 is a flowchart of an embodiment of an application provided in the present application;
FIG. 5 is a block diagram illustrating a metadata protection apparatus in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to understand the metadata protection method provided in the present application, a distributed file system architecture applied thereto is first described, referring to fig. 1, where fig. 1 is an architecture diagram of a distributed file system, as shown in fig. 1, including a storage system, MDSs, clients, and a cluster management subsystem. The storage system is composed of a plurality of server devices and is responsible for reliably distributing data to the devices, a simplified data access interface is provided for the outside, the MDS provides metadata service, file metadata and file data are stored in the storage system, a file system client interacts with the MDS and the storage system at the same time to realize the file access interface for the outside, and the cluster management subsystem is responsible for management of the whole system, such as selection of other subsystems, heartbeat processing and other operations.
In the distributed file system, the metadata service is formed by a cluster formed by a plurality of metadata service processes and is used for improving the performance and reliability of the metadata. The metadata of the whole file system is distributed in the cluster according to a certain strategy, so that each metadata service process only needs to share part of the traffic of the whole file system. Each metadata, for example, metadata of a certain file, is only served by a certain metadata service process, which is called a home metadata service process of the metadata, and only the home metadata service process can modify the metadata of the file in the storage system, thereby avoiding inconsistency and even data damage caused by writing the same metadata by a plurality of metadata service processes. If the metadata service process fails, the cluster management subsystem detects the failure, selects a normal metadata service process from the cluster, takes over the metadata responsible for the service of the failed metadata service process, namely modifies the attributive metadata service process of the metadata, completes the failure switching process and ensures high availability of upper-layer service access.
In a related technology, a blacklist mechanism is adopted to avoid data damage caused by split brain, that is, the cluster management subsystem adds the original metadata service process to a blacklist and notifies a storage system when switching the metadata service process. When the storage system receives a request sent by a metadata service process, whether the request is in a blacklist is checked, and if the request is in the blacklist, the request is rejected. Because the storage system is also a distributed cluster, the system is difficult to ensure that all storage system services can receive the updated blacklist in time, and if the storage system service receiving the request is still the old blacklist and receives the request of the old metadata service process, the data written by the new metadata service process can still be damaged. In another related technology, a version number mechanism is adopted to avoid data damage caused by split brain, namely, a version number is recorded for each data, the version number recorded by the storage system is carried when the metadata service process issues operation, the version number recorded by the storage system is compared with the version number carried in the request after the storage system receives the request, and the request is rejected if the version number in the request is small; if the data is modified, the version number is increased. After the metadata service process is switched, if the new metadata service process writes data, the version number is updated, so that the old metadata service process is prevented from being written again. However, if the old metadata service process request arrives first, so that the version number is increased, the request of the new metadata service process is prevented when arriving. Like this exception scenario, additional processing is required, adding a significant amount of complexity to the scheme.
Therefore, in the present application, the cluster management subsystem implements a white list mechanism, and when a certain metadata service process fails, the metadata service process for taking over is added to the white list, and the failed metadata service process is removed from the white list. The white list has a version number attribute that increases the version number when any change occurs. The cluster management subsystem asynchronously distributes the white list to all storage system services without ensuring the reliability of distribution.
The embodiment of the application discloses a metadata protection method, which avoids data damage caused by split brain.
Referring to fig. 2, a flowchart of a metadata protection method is shown according to an exemplary embodiment, as shown in fig. 2, including:
s101: receiving a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process;
the execution main body of the application is the storage system in the distributed file system, and the metadata service process carries the version number of the white list recorded by the metadata service process when issuing a service request to the storage system so as to facilitate the storage system to verify the version number.
S102: determining a white list version number corresponding to the service request as a first version number, and determining a white list version number stored in the storage system as a second version number; the white list stores an attribution metadata service process corresponding to the storage system, and the version number of the white list stored by the storage system is updated when the attribution metadata service process is switched;
in specific implementation, the metadata service implements a white list mechanism, when a home metadata service process corresponding to a certain metadata fails, the home metadata service is switched, that is, the cluster management subsystem selects a normal metadata service process, takes over the metadata in charge of the service of the failed metadata service process, that is, switches over the home metadata service process of the storage system, and the storage system updates the white list. On the other hand, all service requests sent to the storage system by the metadata service carry the version number of the white list, and the white list error codes between the metadata service and the storage system are processed.
S103: judging whether the first version number is consistent with the second version number; if yes, the process proceeds to S104:
in this embodiment, the storage system implements a white list checking mechanism, on one hand, the storage system may obtain a latest white list from the cluster management subsystem, and on the other hand, when the storage system processes a service request, it checks whether a version number of the white list carried in the storage system is consistent with a version number of the white list stored in the storage system. If the version numbers of the two parties are the same, the process proceeds to S104 to process the service request normally.
S104: and when the target metadata service process is in the white list, executing the operation corresponding to the service request.
Preferably, this embodiment further includes: and when the first version number is higher than the second version number, updating the white list, and re-entering a step of taking the version number corresponding to the white list of the metadata service stored in the storage system as the second version number. In specific implementation, if the version number of the white list in the service request is higher than the version number recorded by the storage system, the service request is suspended, the white list is updated from the cluster management subsystem, and the version number of the white list corresponding to the service request is compared with the updated version number of the white list again.
Preferably, this embodiment further includes: and when the first version number is lower than the second version number, returning error information to the target metadata service process so that the target metadata service process can update the version number of the white list stored by the target metadata service process. In a specific implementation, if the version number of the white list in the service request is lower than the version number recorded by the storage system, an error code is returned to the target metadata service process, the MDS service is triggered to update the white list first, and then whether the request is sent again is determined.
Preferably, this embodiment further includes: and when the target metadata service process does not exist in the white list, returning error information to the target metadata service process so as to facilitate the target metadata service process to perform exception handling. In a specific implementation, when the target metadata service process does not exist in the white list, it indicates that the target metadata service process is considered as a fault by the cluster management subsystem, and at this time, the target metadata service process may perform exception handling such as active exit.
In the metadata protection method provided in the embodiment of the present application, the storage system implements a white list checking mechanism, and the storage system can obtain a latest white list from the cluster management subsystem, and on the other hand, when processing a service request of a target metadata service process, the storage system checks a white list version number carried in the service request. If the version numbers of the two parties are consistent and the target metadata service process exists in the white list, the service request is normally processed, so that the problem that the metadata is damaged due to the fact that data written by a new metadata service is covered by data written by an old metadata service when the metadata service is split can be solved. Therefore, the metadata protection method provided by the embodiment of the application uses the white list with the version number, and achieves the consistency of the white lists among different network elements in the distributed file system by using the version number, so that the metadata is protected from being damaged by split metadata service.
The embodiment of the application discloses a metadata protection method, and compared with the previous embodiment, the embodiment further explains and optimizes the technical scheme. Specifically, the method comprises the following steps:
referring to fig. 3, a flowchart of another metadata protection method according to an exemplary embodiment is shown, as shown in fig. 3, including:
s201: receiving a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process;
s202: determining a white list version number corresponding to the service request as a first version number, and determining a white list version number stored in the storage system as a second version number; the white list stores an attribution metadata service process corresponding to the storage system, and the version number of the white list stored by the storage system is updated when the attribution metadata service process is switched;
s203: comparing the first version number with the second version number, and entering S204 when the first version number is higher than the second version number; when the first version number is lower than the second version number, S205 is entered: when the first version number is consistent with the second version number, entering S206;
s204: updating the white list and re-entering S202;
s205: returning error information to the target metadata service process so that the target metadata service process can update the version number of the white list stored by the target metadata service process;
s206: judging whether the target metadata service process exists in the white list or not; if yes, entering S207; if not, the step S208 is entered;
s207: executing the operation corresponding to the service request;
s208: and returning error information to the target metadata service process so as to facilitate the target metadata service process to carry out exception handling.
An application embodiment provided by the present application is described below, and as shown in fig. 4, the application embodiment may specifically include the following steps:
the method comprises the following steps: the cluster management subsystem is responsible for checking the MDS service state, initiating fault switching and maintaining a white list; when the MDS service is found to be abnormal, selecting a normal MDS service and taking over the service of the fault MDS service; and updating the white list and increasing the version number of the white list.
Step two: and when taking over the MDS to send a request to the storage system, carrying the version number of the white list recorded by the MDS.
Step three: when the storage system receives the MDS request, the version number of the white list is checked first. If the version number in the request is low, returning a version low error; and if the version number in the request is high, adding the request into the queue to be suspended, firstly updating the white list from the cluster management subsystem, and executing judgment again after receiving the latest white list. If the versions are consistent, continuously checking whether the MDS initiating the request is in a white list, and if not, returning an error of not being in the white list; if so, the operation is performed normally.
Step four: the MDS receives a request response returned by the storage system, if the error code is that the version of the white list is low or the error code is not in the white list, the white list is updated from the cluster management subsystem, and the operation is executed according to the latest white list, if the error code is not in the white list, the fact that the error code is considered to be a fault by the cluster management subsystem is indicated, and abnormal processing such as active quitting is executed at the moment; if in the white list, the request is initiated again using the updated white list version number.
In the following, a metadata protection apparatus provided in an embodiment of the present application is introduced, and a metadata protection apparatus described below and a metadata protection method described above may be referred to each other.
Referring to fig. 5, a block diagram of a metadata protection apparatus according to an exemplary embodiment is shown, as shown in fig. 5, including:
a receiving module 501, configured to receive a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process;
a determining module 502, configured to determine a version number of a white list corresponding to the service request as a first version number, and determine a version number of the white list stored in the storage system as a second version number; the white list stores an attribution metadata service process corresponding to the storage system, and the version number of the white list stored by the storage system is updated when the attribution metadata service process is switched;
a determining module 503, configured to determine whether the first version number is consistent with the second version number; if yes, the workflow of the execution module 504 is started;
the executing module 504 is configured to execute an operation corresponding to the service request when the target metadata service process is in the white list.
In the metadata protection apparatus provided in the embodiment of the present application, the storage system implements a white list checking mechanism, and the storage system can obtain a latest white list from the cluster management subsystem, and on the other hand, when processing a service request of a target metadata service process, the storage system checks a white list version number carried in the service request. If the version numbers of the two parties are consistent and the target metadata service process exists in the white list, the service request is normally processed, so that the problem that the metadata is damaged due to the fact that data written by a new metadata service is covered by data written by an old metadata service when the metadata service is split can be solved. Therefore, the metadata protection device provided by the embodiment of the application uses the white list with the version number, and achieves the consistency of the white lists among different network elements in the distributed file system by using the version number, so that the metadata is protected from being damaged by split metadata service.
On the basis of the above embodiment, as a preferred implementation, the method further includes:
and the updating module is used for updating the white list and starting the work flow of the determining module when the first version number is higher than the second version number.
On the basis of the above embodiment, as a preferred implementation, the method further includes:
and the first returning module is used for returning error information to the target metadata service process when the first version number is lower than the second version number so that the target metadata service process can update the white list version number stored by the target metadata service process.
On the basis of the above embodiment, as a preferred implementation, the method further includes:
and the second returning module is used for returning error information to the target metadata service process when the target metadata service process does not exist in the white list so as to facilitate the exception handling of the target metadata service process.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The present application further provides an electronic device, and referring to fig. 6, a structure diagram of an electronic device 600 provided in an embodiment of the present application may include a processor 11 and a memory 12, as shown in fig. 6. The electronic device 600 may also include one or more of a multimedia component 13, an input/output (I/O) interface 14, and a communication component 15.
The processor 11 is configured to control the overall operation of the electronic device 600, so as to complete all or part of the steps in the above-mentioned metadata protection method. The memory 12 is used to store various types of data to support operation at the electronic device 600, such as instructions for any application or method operating on the electronic device 600 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 12 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia component 13 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 12 or transmitted via the communication component 15. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 14 provides an interface between the processor 11 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication module 15 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so that the corresponding Communication component 15 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described metadata protection method.
In another exemplary embodiment, there is also provided a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the above-described metadata protection method. For example, the computer readable storage medium may be the memory 12 described above including program instructions that are executable by the processor 11 of the electronic device 600 to perform the metadata protection method described above.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and 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. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are 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 phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A metadata protection method is applied to a storage system and comprises the following steps:
receiving a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process;
determining a white list version number corresponding to the service request as a first version number, and determining a white list version number stored in the storage system as a second version number; the white list stores the home metadata service process corresponding to the storage system, the version number of the white list stored by the storage system is updated when the home metadata service process is switched, and the switching process of the home metadata service process corresponding to the storage system comprises the following steps: selecting a normal metadata service process in the cluster management subsystem for taking over the metadata in charge of the service of the failed home metadata service process;
judging whether the first version number is consistent with the second version number;
and if so, executing the operation corresponding to the service request when the target metadata service process is in a white list stored in the storage system.
2. The metadata protection method according to claim 1, further comprising:
and when the first version number is higher than the second version number, updating the white list, and re-entering a step of taking the version number corresponding to the white list of the metadata service stored in the storage system as the second version number.
3. The metadata protection method according to claim 1, further comprising:
and when the first version number is lower than the second version number, returning error information to the target metadata service process so that the target metadata service process can update the version number of the white list stored by the target metadata service process.
4. The metadata protection method according to claim 1, further comprising:
and when the target metadata service process does not exist in the white list stored in the storage system, returning error information to the target metadata service process so as to facilitate the target metadata service process to perform exception handling.
5. A metadata protection device, applied to a storage system, includes:
the receiving module is used for receiving a service request of a target metadata service process; wherein the service request includes at least a whitelist version number stored by the target metadata service process;
the determining module is used for determining the version number of the white list corresponding to the service request as a first version number and determining the version number of the white list stored in the storage system as a second version number; the white list stores the home metadata service process corresponding to the storage system, the version number of the white list stored by the storage system is updated when the home metadata service process is switched, and the switching process of the home metadata service process corresponding to the storage system comprises the following steps: selecting a normal metadata service process in the cluster management subsystem for taking over the metadata in charge of the service of the failed home metadata service process;
the judging module is used for judging whether the first version number is consistent with the second version number; if yes, starting the working process of the execution module;
and the execution module is used for executing the operation corresponding to the service request when the target metadata service process is in a white list stored in the storage system.
6. The metadata protection apparatus according to claim 5, further comprising:
and the updating module is used for updating the white list and starting the work flow of the determining module when the first version number is higher than the second version number.
7. The metadata protection apparatus according to claim 5, further comprising:
and the first returning module is used for returning error information to the target metadata service process when the first version number is lower than the second version number so that the target metadata service process can update the white list version number stored by the target metadata service process.
8. The metadata protection apparatus according to claim 5, further comprising:
and the second returning module is used for returning error information to the target metadata service process when the target metadata service process does not exist in the white list stored in the storage system so as to facilitate the target metadata service process to perform exception handling.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the metadata protection method as claimed in any one of claims 1 to 4 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the metadata protection method as claimed in any one of claims 1 to 4.
CN201911386463.5A 2019-12-29 2019-12-29 Metadata protection method and device, electronic equipment and storage medium Active CN111159786B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911386463.5A CN111159786B (en) 2019-12-29 2019-12-29 Metadata protection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911386463.5A CN111159786B (en) 2019-12-29 2019-12-29 Metadata protection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111159786A CN111159786A (en) 2020-05-15
CN111159786B true CN111159786B (en) 2022-04-22

Family

ID=70558865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911386463.5A Active CN111159786B (en) 2019-12-29 2019-12-29 Metadata protection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111159786B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577735A (en) * 2009-06-24 2009-11-11 成都市华为赛门铁克科技有限公司 Method, device and system for taking over fault metadata server
CN104158897A (en) * 2014-08-25 2014-11-19 曙光信息产业股份有限公司 Updating method of file layout in distributed file system
EP3101904A1 (en) * 2015-06-05 2016-12-07 Sony Corporation Distributed white list for security renewability
CN106789180A (en) * 2016-11-30 2017-05-31 郑州云海信息技术有限公司 The service control method and device of a kind of meta data server
CN107729178A (en) * 2017-09-28 2018-02-23 郑州云海信息技术有限公司 A kind of Metadata Service process takes over method and device
CN109165112A (en) * 2018-08-16 2019-01-08 郑州云海信息技术有限公司 A kind of fault recovery method, system and the associated component of metadata cluster

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9170892B2 (en) * 2010-04-19 2015-10-27 Microsoft Technology Licensing, Llc Server failure recovery

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577735A (en) * 2009-06-24 2009-11-11 成都市华为赛门铁克科技有限公司 Method, device and system for taking over fault metadata server
CN104158897A (en) * 2014-08-25 2014-11-19 曙光信息产业股份有限公司 Updating method of file layout in distributed file system
EP3101904A1 (en) * 2015-06-05 2016-12-07 Sony Corporation Distributed white list for security renewability
CN106789180A (en) * 2016-11-30 2017-05-31 郑州云海信息技术有限公司 The service control method and device of a kind of meta data server
CN107729178A (en) * 2017-09-28 2018-02-23 郑州云海信息技术有限公司 A kind of Metadata Service process takes over method and device
CN109165112A (en) * 2018-08-16 2019-01-08 郑州云海信息技术有限公司 A kind of fault recovery method, system and the associated component of metadata cluster

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
蓝鲸元数据服务器集群的细粒度负载迁移;刘健等;《计算机研究与发展》;20141231;第210-222页 *
蓝鲸分布式文件系统元数据服务;杨德志等;《计算机工程》;20080430;第34卷(第07期);第4-6,9页 *

Also Published As

Publication number Publication date
CN111159786A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN114787781B (en) System and method for enabling high availability managed failover services
CN109542361B (en) Distributed storage system file reading method, system and related device
KR101871383B1 (en) Method and system for using a recursive event listener on a node in hierarchical data structure
CN110765023A (en) Distributed system testing method and system based on chaos experiment
JP2006268172A (en) Server system and method for updating online software
US20210157692A1 (en) Systems and methods for enabling a highly available managed failover service
CN112650576A (en) Resource scheduling method, device, equipment, storage medium and computer program product
CN105069152B (en) data processing method and device
CN108418859B (en) Method and device for writing data
WO2020211362A1 (en) Method and apparatus for improving availability of trunking system, and computer device
CN111147274B (en) System and method for creating a highly available arbitration set for a cluster solution
CN108984334B (en) Method and apparatus for managing sessions
CN111159160A (en) Version rollback method and device, electronic equipment and storage medium
CN113259476B (en) Message pushing method and system
CN114130035A (en) User matching method, device, equipment and storage medium
CN111159786B (en) Metadata protection method and device, electronic equipment and storage medium
CN111488163A (en) Firmware updating method and device, electronic equipment and storage medium
CN111124308A (en) Performance analysis method and device, electronic equipment and storage medium
CN110879718A (en) maridb upgrading method and device, electronic equipment and storage medium
CN114546591A (en) Mirror image file sharing method, container cluster management system and related equipment
CN111629054B (en) Message processing method, device and system, electronic equipment and readable storage medium
CN114077587A (en) Rule engine based business processing method, rule engine, medium and device
CN110019023B (en) Method, device and equipment for pushing mechanism information message
CN116431566B (en) Data migration method, device, electronic equipment and medium
CN114546705B (en) Operation response method, operation response device, electronic apparatus, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant