WO2023179077A1 - 一种数据一致性检测和修复的方法、装置及介质 - Google Patents
一种数据一致性检测和修复的方法、装置及介质 Download PDFInfo
- Publication number
- WO2023179077A1 WO2023179077A1 PCT/CN2022/135108 CN2022135108W WO2023179077A1 WO 2023179077 A1 WO2023179077 A1 WO 2023179077A1 CN 2022135108 W CN2022135108 W CN 2022135108W WO 2023179077 A1 WO2023179077 A1 WO 2023179077A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- data
- repaired
- repair
- data object
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Definitions
- the present application relates to the field of storage technology, and in particular to a method, device and non-volatile computer-readable storage medium for data consistency detection and repair.
- SATA hard disk Serial Advanced Technology Attachment hard disk
- FC Fiber Channel
- firmware issues such as disk arrays (Redundant Arrays of Independent Disks, RAID) controller, disk controller, etc.
- software problems such as operating system kernel problems, local file system problems, network system problems, general block layer problems, IO (Input/Output, input/output) scheduling layer problems, etc.
- operation Dimension factors when extreme situations occur, maintenance operations on the distributed system may be incorrect.
- the purpose of this application is to provide a data consistency detection and repair method, device and non-volatile computer-readable storage medium for consistency detection and repair of data.
- this application provides a method for data consistency detection and repair, including:
- the current file is determined to be the file to be repaired
- comparing the current file with the original file to determine whether the current file is consistent with the original file includes:
- obtaining the data object of the file to be repaired includes:
- the original files stored in the storage pool include:
- the PG placement group is mapped to the OSD disk of the storage pool through the crushmap algorithm.
- the OSD disk of the storage pool contains multiple copy data mapped by each PG placement group.
- repairing the data object to be repaired based on the copy data of the data object of the original file includes:
- the data object to be repaired is repaired based on the copy data of the data object of the original file, it also includes:
- the data object to be repaired is repaired according to the copy data corresponding to the data object to be repaired, it also includes:
- this application also provides a device for data consistency detection and repair, including:
- the first acquisition module is set to acquire the current file and the original file corresponding to the current file
- the first comparison module is set to compare the current file with the original file to determine whether the current file is consistent with the original file; if the current file is inconsistent with the original file, trigger the determination module; if the current file is consistent with the original file, end ;
- Determination module set to determine the current file as the file to be repaired
- the second acquisition module is set to acquire the data object of the file to be repaired
- the second comparison module is configured to compare the data object of the file to be repaired with the data object of the original file and determine the data object to be repaired;
- the repair module is configured to repair the data object to be repaired based on the copy data of the data object of the original file, and return the steps of obtaining the current file and the original file corresponding to the current file.
- this application also provides a device for data consistency detection and repair, including:
- a memory configured to store a computer program
- the processor is configured to implement the steps of the above-mentioned data consistency detection and repair method when executing the computer program.
- this application also provides a non-volatile computer-readable storage medium.
- a computer program is stored on the computer-readable storage medium.
- the computer program is executed by the processor, the above-mentioned data consistency detection and repair are realized. Method steps.
- the data consistency detection and repair method provided by this application includes: obtaining the current file and the original file corresponding to the current file; comparing the current file with the original file to determine whether the current file is consistent with the original file; if the current file is consistent with the original file, If the file is inconsistent with the original file, determine that the current file is the file to be repaired; obtain the data object of the file to be repaired; compare the data object of the file to be repaired with the data object of the original file and determine the data object to be repaired; according to the original file Use the copy data of the data object to repair the data object to be repaired, and return to the steps of obtaining the current file and the original file corresponding to the current file; if the current file is consistent with the original file, it ends.
- the method of this application does not need to attach verification information to the entire IO path in the process of achieving data consistency, and is therefore more complex. It is easy to achieve data consistency; secondly, compared with the method of directly dividing files into multiple data objects, this method first determines whether the files are consistent, and then only divides the files to be repaired into multiple data objects, without the need for data consistency. The file is divided into multiple data objects, thus reducing the time to determine the data objects to be repaired, making the process of data consistency detection and repair relatively simple, and improving the efficiency of data consistency detection and repair.
- this application also provides a device and a non-volatile computer-readable storage medium for data consistency detection and repair, which correspond to the above-mentioned data consistency detection and repair method and have the same effect as above.
- Figure 1 is a data storage flow chart based on a distributed storage system provided by an embodiment of the present application
- Figure 2 is a flow chart of a data consistency detection and repair method provided by an embodiment of the present application
- Figure 3 is a structural diagram of a device for data consistency detection and repair provided by an embodiment of the present application.
- Figure 4 is a structural diagram of a device for data consistency detection and repair provided by another embodiment of the present application.
- Figure 5 is a schematic diagram of an application scenario for data consistency detection and repair provided by an embodiment of the present application.
- the core of this application is to provide a data consistency detection and repair method, device and non-volatile computer-readable storage medium for consistency detection and repair of data.
- a distributed storage system usually consists of a storage server and multiple clients. Its essence is to evenly distribute a large number of files to multiple storage servers.
- Distributed storage systems have been widely used in production environments and have the characteristics of high scalability, high availability, and high reliability.
- distributed object storage systems can be used in a variety of scenarios. Driven by the commercial model, The requirements for data reliability of distributed storage systems are getting higher and higher.
- Figure 1 is a data storage flow chart based on a distributed storage system provided by an embodiment of the present application.
- the distributed storage system mainly includes: file data 1, data object 2, PG (Placement group, placement group) 3, disk 4, of which data object 2, PG placement group 3, and disk 4 are stored in in the storage pool.
- the client of the distributed storage system stores the file data to be stored in the underlying disk 4 as object instances.
- Disk 4 is a daemon that stores data in a distributed storage system. The role of the disk 4 daemon is to handle IO operations on storage devices.
- the distributed storage system designs PG placement group 3 to effectively manage massive data objects 2, and maps PG placement group 3 to disk 4.
- Disk 4 is usually an object storage device (OSD) and is set as a process to return specific data in response to client requests.
- OSD object storage device
- the method for the distributed storage system client to store files in the storage system is as follows:
- the distributed storage client first specifies the object name to be stored in the storage pool of the distributed storage system
- the crushmap algorithm performs hash calculation on the object name to obtain the specific PG id.
- the setting of PG num is determined by the number of OSD disks;
- the data object is stored in the directory of the PG placement group.
- the data object consists of three elements: data, xattr, and omap.
- Data saves the data of the data object
- xattr saves the extended attributes of the data object.
- Each object file can set a file. Attribute, this attribute is a key/value value, but it is limited by the file system. The number of key/value pairs and the size of each value are limited. If the key/value of the object to be set cannot be stored in the file Among the extended attributes, there is another way to save omap.
- Omap is saved in the database levelDB of key/value pair;
- the data objects in the PG placement group will be mapped to multiple OSD disks, such as three copies.
- a PG placement group contains three OSD disks, and each OSD disk The data object information carried is completely consistent. The above process serves as the principle basis for data consistency detection and repair in this application.
- OSD disk uses a unified namespace in the distributed storage system to slice the client's file data, stipulates that the size of each data object is a preset value, and performs data object detection and repair processing based on the slice size.
- the data object consists of a globally unique inode number (specified in hexadecimal), relative file offset, object type (snapshot or non-snapshot), object hash value, the id of the storage pool to which it belongs, and the osd number.
- examples of data objects stored in the OSD disk are as follows:
- 10000226acd the inode number of the file, globally unique
- the object is in the head directory, not a snapshot, or snap if it is a snapshot;
- This application detects the consistency of data based on the distributed storage system and repairs the data based on the copy redundancy mechanism of the distributed storage system when data inconsistency is detected.
- Figure 2 is a flow chart of a data consistency detection and repair method provided by an embodiment of the present application. As shown in Figure 2, the method includes:
- the consistency test of data is based on whether the data of the current file is consistent with the original file corresponding to the current file. Therefore, first obtain the current file and the original file corresponding to the current file.
- the specific contents of the two files obtained are not limited here, but the objects obtained for comparison must be Consistent, such as obtaining file attributes for both files. Since obtaining the current file and the original file corresponding to the current file is used to determine whether the data of the two files are consistent, you can also obtain the check values of the two files separately through the verification tool, thereby judging the two files based on the check values. Whether the data in the file is consistent.
- verification tools mainly include hash algorithms, MD5 Message-Digest Algorithm (MD5), etc.
- MD5 Message-Digest Algorithm MD5 Message-Digest Algorithm
- the specific verification tools used are not limited in this application. For example, when judging whether the data of two files are consistent based on the MD5 value, it is necessary to obtain the MD5 value of the current file and the MD5 value of the original file corresponding to the current file.
- step S11 Compare the current file with the original file to determine whether the current file is consistent with the original file; if the current file is inconsistent with the original file, proceed to step S12; if the current file is consistent with the original file, end.
- the current file and the original file corresponding to the current file are obtained, and then it can be judged whether the data is consistent based on the current file and the original file corresponding to the current file.
- the comparison object used to determine whether the data of two files are consistent you can make a judgment based on the specific contents of the two files. When the specific contents of the two files are exactly the same, confirm that the data of the two files are consistent; you can also make a judgment based on the specific contents of the two files and the attributes of the files at the same time.
- the files to be repaired are identified in the above steps.
- this embodiment divides the file to be repaired into multiple data objects, and determines whether the data has changed one by one. First, confirm that the client accesses the damaged file path. Through the file path, find out the inode information of the file and convert it to hexadecimal. Calculate the size of the file. It is known that the size of each data object is the preset value for segmentation. Count how many data objects a file has.
- the 11-i command uses the 11-i command to obtain the inode number and file size of the file, calculate the underlying data object name prefix based on the inode number, and obtain the maximum suffix of the underlying data object name based on the file size.
- the inode of the file is 2199080746415.
- Execute printf′′%x ⁇ n′′2199080746415 to get the underlying data object name prefix is 200036d3daf.
- the number of data objects is 5130 and the data object name suffix is Starting from 0, the suffix ranges from 00000000 to 00001409, where 1409 is the hexadecimal version of 5129.
- the files in the PG placement group directory will be migrated according to the process of storing files in the storage system and the data object storage process. However, the move will cause the expansion of the data object files in the PG placement group directory. If the attribute is missing, an error will occur when reading the data object in the PG placement group directory, and it will be reported that the data object does not exist.
- step S15 Repair the data object to be repaired according to the copy data of the data object of the original file, and return to step S10.
- the distributed storage system records the Map information of each PG placement group in different replica data.
- the replica OSD id of the OSD disk of the lost data object can be obtained.
- the information of the lost data object can be restored based on the OSD disk of the replica.
- the data consistency detection and repair method includes: obtaining the current file and the original file corresponding to the current file; comparing the current file with the original file to determine whether the current file is consistent with the original file; if the current file If it is inconsistent with the original file, the current file is determined to be the file to be repaired; the data object of the file to be repaired is obtained; the data object of the file to be repaired is compared with the data object of the original file and the data object to be repaired is determined; according to the data object of the original file The copy data of the data object repairs the data object to be repaired, and returns to the steps of obtaining the current file and the original file corresponding to the current file; if the current file is consistent with the original file, it ends.
- the method of this embodiment does not need to attach verification information to the entire IO path in the process of achieving data consistency. Therefore, It is easier to achieve data consistency; secondly, compared with the method of directly dividing files into multiple data objects, this method first determines whether the files are consistent, and then only divides the files to be repaired into multiple data objects, without the need for data consistency. The file is divided into multiple data objects, thus reducing the time to determine the data objects to be repaired, making the process of data consistency detection and repair relatively simple, and improving the efficiency of data consistency detection and repair.
- a verification tool is used to make the determination.
- An optional implementation is to compare the current file with the original file to determine whether the current file is consistent with the original file, including:
- the two MD5 values when When the two MD5 values are the same, it means that the data of the two files are consistent; when the two MD values are not the same, it means that the data of the two files are inconsistent, and the current file is determined to be the file to be repaired.
- the data consistency verification based on the MD5 value provided in this embodiment can obtain data consistency results more accurately, comprehensively, and quickly.
- the file to be repaired is divided into multiple data objects, and the damaged data object is determined by traversing each data object.
- obtaining the data object of the file to be repaired includes:
- the client accesses the damaged file path.
- Find out the inode information of the file through the path of the file convert it to hexadecimal, calculate the size of the file, and set the size of each data object to the preset value.
- This default value splits the file and calculates how many data objects the file has. It should be noted that this application does not limit the setting of the default value.
- the default value can be 4MB; for 6FS distributed storage, the default value can be 64MB; for HDFS distributed storage, the default value can be 128MB. In this embodiment, the default value is 4M.
- This embodiment provides that the file is divided into multiple data objects, and the damaged data object is determined by traversing each data object, thereby accurately locating the location of the data damage.
- the storage of original files in the storage pool includes:
- the PG placement group is mapped to the OSD disk of the storage pool through the crushmap algorithm.
- the OSD disk of the storage pool contains multiple copy data mapped by each PG placement group.
- the distributed storage method provided by this embodiment can, on the one hand, set up a PG placement group in the storage pool to avoid the tight coupling between the client and the underlying OSD disk; on the other hand, the crushmap algorithm can ensure that Data objects are evenly distributed among OSD disks.
- common data inconsistencies include damage to stored data, loss of xattr extended attributes, etc.
- the specific repair process is as follows.
- the data object to be repaired based on the copy data of the data object of the original file includes:
- the distribution of the data object is located in the distributed storage system.
- the distributed storage system records the Map information of different copy data of each PG placement group.
- the copy number of the OSD disk of the lost data object that is, the OSD id
- the lost data object can be recovered according to the OSD disk of the copy. information, first obtain the information of the copy data and save it, then copy the saved object information to the corresponding node, and finally modify the header part of the attr file and set it to the OSD disk number of the currently lost data object, and re-store the data object information. , complete the data repair.
- the repair process is as follows:
- the OSD of the lost object lists the attribute information of the copy OSD under the same group of PGs;
- the data repair method provided in this embodiment solves the problem of data inconsistency caused by the loss of the xattr extended attribute, making the business IO as correct as possible and ensuring the availability of the data.
- an optional implementation method is that after repairing the data object to be repaired based on the copy data of the data object of the original file, it also includes:
- the checking tool can be designed through pseudo code and added to the Linux background crontab task to achieve scheduled detection.
- the detection process through pseudocode is as follows: first enter the path of the file to be repaired, find the path of the file to be analyzed, and compare the information of the data object in the storage pool.
- This embodiment provides an automated repair tool.
- the automated repair tool can handle the data inconsistency in a timely manner, thereby making the business IO as correct as possible and ensuring the availability of the data.
- the consistency of data is detected and repaired.
- the data repair situation in order to allow users to intuitively understand the data repair situation, as an optional method, after repairing the data object to be repaired based on the copy data corresponding to the data object to be repaired, it also includes:
- prompt information is output to prompt the user to complete the data repair.
- the specific content, method, time, etc. of the information used to prompt the completion of repair there are no restrictions on the specific content, method, time, etc. of the information used to prompt the completion of repair, as long as it can prompt the completion of data repair.
- This embodiment provides that after the data repair is completed, prompt information is output, so that the user can intuitively understand the data repair situation.
- the method of data consistency detection and repair is described in detail.
- the present application also provides a corresponding embodiment of a device for data consistency detection and repair. It should be noted that this application describes the embodiments of the device part from two perspectives, one is based on the perspective of functional modules, and the other is based on the perspective of hardware.
- Figure 3 is a structural diagram of a device for data consistency detection and repair provided by an embodiment of the present application. This embodiment is based on the perspective of functional modules, including:
- the first acquisition module 10 is configured to acquire the current file and the original file corresponding to the current file;
- the first comparison module 11 is configured to compare the current file with the original file to determine whether the current file is consistent with the original file; if the current file is inconsistent with the original file, trigger the determination module 12; if the current file is consistent with the original file, then ends;
- the determination module 12 is configured to determine that the current file is the file to be repaired
- the second acquisition module 13 is configured to acquire the data object of the file to be repaired
- the second comparison module 14 is configured to compare the data object of the file to be repaired with the data object of the original file and determine the data object to be repaired;
- the repair module 15 is configured to repair the data object to be repaired based on the copy data of the data object of the original file, and return to the step of obtaining the current file and the original file corresponding to the current file.
- the device for data consistency detection and repair obtaineds the current file and the original file corresponding to the current file through the first acquisition module; and compares the current file with the original file through the first comparison module to determine the current file. Whether it is consistent with the original file; if the current file is inconsistent with the original file, the determination module is triggered to determine that the current file is the file to be repaired; the data object of the file to be repaired is obtained through the second acquisition module; the file to be repaired is obtained through the second comparison module Compare the data object with the data object of the original file and determine the data object to be repaired; use the repair module to repair the data object to be repaired based on the copy data of the data object of the original file.
- this device does not need to attach verification information to the entire IO path in the process of achieving data consistency, so it is easier to implement.
- the data is consistent; secondly, compared to directly dividing the files into multiple data objects, this device first determines whether the files are consistent, and then only divides the files to be repaired into multiple data objects. There is no need to divide files with consistent data into Multiple data objects, thus reducing the time to determine the data objects to be repaired, making the process of data consistency detection and repair relatively simple, and improving the efficiency of data consistency detection and repair.
- Figure 4 is a structural diagram of a device for data consistency detection and repair provided by another embodiment of the present application. This embodiment is based on the hardware perspective. As shown in Figure 4, the device for data consistency detection and repair includes:
- Memory 20 configured to store computer programs
- the processor 21 is configured to implement the steps of the data consistency detection and repair method mentioned in the above embodiment when executing the computer program.
- the device for data consistency detection and repair provided in this embodiment may include but is not limited to smartphones, tablet computers, notebook computers or desktop computers.
- the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc.
- the processor 21 can adopt at least one hardware form among a digital signal processor (Digital Signal Processor, DSP), a field-programmable gate array (Field-Programmable Gate Array, FPGA), and a programmable logic array (Programmable Logic Array, PLA). to fulfill.
- the processor 21 may also include a main processor and a co-processor.
- the main processor is a processor configured to process data in a wake-up state, also called a central processing unit (Central Processing Unit, CPU); the co-processor is A low-power processor configured to process data in standby mode.
- CPU Central Processing Unit
- the processor 21 may be integrated with a graphics processor (Graphics Processing Unit, GPU), and the GPU is configured to be responsible for rendering and drawing content that needs to be displayed on the display screen.
- the processor 21 may also include an artificial intelligence (Artificial Intelligence, AI) processor, which is configured to process computing operations related to machine learning.
- AI Artificial Intelligence
- Memory 20 may include one or more computer-readable storage media, which may be non-transitory.
- the memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices.
- the memory 20 is at least configured to store the following computer program 201. After the computer program is loaded and executed by the processor 21, the relevant steps of the data consistency detection and repair method disclosed in any of the foregoing embodiments can be implemented.
- the resources stored in the memory 20 may also include the operating system 202, data 203, etc., and the storage method may be short-term storage or permanent storage.
- the operating system 202 may include Windows, Unix, Linux, etc.
- Data 203 may include but is not limited to data involved in the above-mentioned data consistency detection and repair methods, etc.
- the device for data consistency detection and repair may also include a display screen 22 , an input and output interface 23 , a communication interface 24 , a power supply 25 and a communication bus 26 .
- Figure 4 does not constitute a limitation on the device for data consistency detection and repair, and may include more or fewer components than shown in the figure.
- the device for data consistency detection and repair provided by the embodiment of the present application includes a memory and a processor.
- the processor executes the program stored in the memory, the following method can be implemented:
- the method of data consistency detection and repair has the same effect as above.
- this application also provides a corresponding embodiment of a non-volatile computer-readable storage medium.
- the computer program is stored on the computer-readable storage medium.
- the steps recorded in the above method embodiments are implemented.
- the methods in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , execute all or part of the steps of the methods of various embodiments of this application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code. .
- the computer-readable storage medium provided by this application includes the above-mentioned data consistency detection and repair methods, and the effect is the same as above.
- Figure 5 is a data consistency detection and repair method provided by an embodiment of the present application.
- Application scenario diagram As shown in Figure 5, the process includes:
- the data consistency detection and repair method does not require the entire IO to achieve data consistency. Verification information is attached to the path, so it is easier to achieve data consistency; secondly, compared to directly dividing the file into multiple data objects, this method first determines whether the file is consistent, and then only divides the file to be repaired into multiple Data objects do not need to divide files with consistent data into multiple data objects, thus reducing the time to determine the data objects to be repaired, making the process of data consistency detection and repair relatively simple, and improving the efficiency of data consistency detection and repair. efficiency.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Bioethics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (20)
- 一种数据一致性检测和修复的方法,包括:获取当前文件以及当前所述文件对应的原始文件;将当前所述文件与所述原始文件进行比对以便确定当前所述文件与所述原始文件是否一致;若所述文件与所述原始文件不一致,则确定当前所述文件为待修复文件;获取待修复文件的数据对象;将所述待修复文件的数据对象与所述原始文件的数据对象进行比对并确定待修复的数据对象;根据所述原始文件的数据对象的副本数据将所述待修复的数据对象进行修复,并返回所述获取当前文件以及当前所述文件对应的原始文件的步骤;若所述文件与所述原始文件一致,则结束。
- 根据权利要求1所述的数据一致性检测和修复的方法,其中,所述将当前所述文件与所述原始文件进行比对以便确定当前所述文件与所述原始文件是否一致包括:获取所述原始文件的第一MD5值以及获取当前所述文件的第二MD5值;在所述第一MD5值与所述第二MD5值不相同的情况下,进入所述确定当前所述文件为待修复文件的步骤。
- 根据权利要求2所述的数据一致性检测和修复的方法,其中,所述获取待修复文件的数据对象包括:获取所述待修复文件的大小以及设置各所述数据对象的大小为预设值;根据所述待修复文件的大小以及所述预设值将所述待修复的文件分为多个数据对象;获取所述待修复文件的各所述数据对象。
- 根据权利要求1所述的数据一致性检测和修复的方法,其中,所述原始文件在存储池中存放包括:将所述原始文件分为多个数据对象并获取所述原始文件的数据对象;在所述存储池中设置PG归置组;将所述原始文件的数据对象存储至所述PG归置组;通过crushmap算法将所述PG归置组映射至所述存储池的OSD磁盘,其中,所述存储池的OSD磁盘中包含各所述PG归置组映射的多个副本数据。
- 根据权利要求4所述的数据一致性检测和修复的方法,其中,在检测到是xattr 扩展属性丢失导致数据不一致的情况下,所述根据所述原始文件的数据对象的副本数据将所述待修复的数据对象进行修复包括:根据各所述PG归置组在所述存储池的OSD磁盘中的映射信息查询所述待修复的数据对象的副本编号;获取所述待修复的数据对象对应的PG归置组映射的副本数据;其中,所述PG归置组映射的副本数据为所述原始文件的数据对象的副本数据;将所述PG归置组映射的副本数据复制到所述待修复的数据对象对应的节点;将xattr文件的头部部分修改为所述待修复的数据对象的副本编号;重新储存所述待修复的数据对象以完成数据的修复。
- 根据权利要求5所述的数据一致性检测和修复的方法,其中,在所述根据所述原始文件的数据对象的副本数据将所述待修复的数据对象进行修复之后,还包括:设置自动化修复工具;将所述自动化修复工具添加至后台任务中。
- 根据权利要求1至6任意一项所述的数据一致性检测和修复的方法,其中,在所述根据所述待修复的数据对象对应的副本数据将所述待修复的数据对象进行修复之后,还包括:输出用于提示完成修复的信息。
- 根据权利要求1所述的数据一致性检测和修复的方法,其中,所述将当前所述文件与所述原始文件进行比对以便确定当前所述文件与所述原始文件是否一致包括:获取所述原始文件的信息以及获取当前所述文件的信息,其中,所述原始文件的信息包括以下至少之一:所述原始文件中的内容、所述原始文件的属性、所述原始文件的类型,当前所述文件的信息包括以下至少之一:当前所述文件中的内容、当前所述文件的属性、当前所述文件的类型;对所述原始文件的信息与当前所述文件的信息进行对应比较,并在确定比较结果为不相同的情况下,进入所述确定当前所述文件为待修复文件的步骤。
- 根据权利要求1所述的数据一致性检测和修复的方法,其中,所述将当前所述文件与所述原始文件进行比对以便确定当前所述文件与所述原始文件是否一致包括:获取所述原始文件的哈希值以及获取当前所述文件的哈希值;在所述原始文件的哈希值与当前所述文件的哈希值不相同的情况下,进入所述确定当前所述文件为待修复文件的步骤。
- 根据权利要求3所述的数据一致性检测和修复的方法,其中,将所述待修复文 件的数据对象与所述原始文件的数据对象进行比对并确定待修复的数据对象包括:针对所述待修复文件的多个所述数据对象,逐个与所述原始文件的数据对象进行比对并确定待修复的数据对象。
- 根据权利要求1所述的数据一致性检测和修复的方法,其中,根据所述原始文件的数据对象的副本数据将所述待修复的数据对象进行修复包括:保存所述原始文件的数据对象的副本数据;将保存的所述副本数据复制到所述待修复的数据对象对应的节点上。
- 根据权利要求3所述的数据一致性检测和修复的方法,其中,根据所述待修复文件的大小以及所述预设值将所述待修复的文件分为多个数据对象包括:根据所述待修复文件的大小以及所述预设值对所述待修复的文件进行切分,以将所述待修复的文件分为多个数据对象,其中,按照不同的存储格式存储的所述待修复文件所对应的所述预设值是不同的。
- 根据权利要求6所述的数据一致性检测和修复的方法,其中,设置所述自动化修复工具包括:设置伪代码设计检查工具;将所述自动化修复工具添加至后台任务中包括:将所述伪代码设计检查工具添加到所述后台任务中。
- 根据权利要求13所述的数据一致性检测和修复的方法,其中,将所述伪代码设计检查工具添加到所述后台任务中包括:将所述伪代码设计检查工具添加到Linux后台crontab任务中。
- 根据权利要求13所述的数据一致性检测和修复的方法,其中,所述伪代码设计检查工具的检测过程包括:在所述伪代码设计检查工具中输入要修复的文件路径,找到要分析的文件的路径;在存储池中比对基于要分析的文件的路径所确定出的数据对象的信息。
- 一种数据一致性检测和修复的装置,包括:第一获取模块,设置为获取当前文件以及当前所述文件对应的原始文件;第一比对模块,设置为将当前所述文件与所述原始文件进行比对以便确定当前所述文件与所述原始文件是否一致;若所述文件与所述原始文件不一致,则触发确定模块;若所述文件与所述原始文件一致,则结束;所述确定模块,设置为确定当前所述文件为待修复文件;第二获取模块,设置为获取待修复文件的数据对象;第二比对模块,设置为将所述待修复文件的数据对象与所述原始文件的数据对象进 行比对并确定待修复的数据对象;修复模块,设置为根据所述原始文件的数据对象的副本数据将所述待修复的数据对象进行修复,并返回所述获取当前文件以及当前所述文件对应的原始文件的步骤。
- 根据权利要求16所述的数据一致性检测和修复的装置,其中,所述第一比对模块用于:获取所述原始文件的第一MD5值以及获取当前所述文件的第二MD5值;在所述第一MD5值与所述第二MD5值不相同的情况下,进入所述确定当前所述文件为待修复文件的步骤。
- 一种数据一致性检测和修复的装置,包括:存储器,设置为存储计算机程序;处理器,设置为执行所述计算机程序时实现如权利要求1至15任一项所述的数据一致性检测和修复的方法的步骤。
- 根据权利要求18所述的数据一致性检测和修复的装置,其中,还包括:显示屏、输入输出接口、通信接口、电源以及通信总线;所述存储器、所述处理器、所述显示屏、所述输入输出接口、所述通信接口以及所述电源均与所述通信总线连接。
- 一种非易失性计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至15任一项所述的数据一致性检测和修复的方法的步骤。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/718,148 US12541622B2 (en) | 2022-03-25 | 2022-11-29 | Method and apparatus for data consistency detection and repair, and medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210298447.6A CN114416665B (zh) | 2022-03-25 | 2022-03-25 | 一种数据一致性检测和修复的方法、装置及介质 |
| CN202210298447.6 | 2022-03-25 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023179077A1 true WO2023179077A1 (zh) | 2023-09-28 |
Family
ID=81264493
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/135108 Ceased WO2023179077A1 (zh) | 2022-03-25 | 2022-11-29 | 一种数据一致性检测和修复的方法、装置及介质 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US12541622B2 (zh) |
| CN (1) | CN114416665B (zh) |
| WO (1) | WO2023179077A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114416665B (zh) * | 2022-03-25 | 2022-06-10 | 苏州浪潮智能科技有限公司 | 一种数据一致性检测和修复的方法、装置及介质 |
| CN115729477A (zh) * | 2023-01-09 | 2023-03-03 | 苏州浪潮智能科技有限公司 | 分布式存储io路径数据写入、读取方法、装置和设备 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104111937A (zh) * | 2013-04-18 | 2014-10-22 | 中兴通讯股份有限公司 | 主、备数据库及其数据一致性检测、修复方法和装置 |
| US20170344597A1 (en) * | 2016-05-24 | 2017-11-30 | Vmware, Inc. | Distributed file system consistency check |
| CN107948334A (zh) * | 2018-01-09 | 2018-04-20 | 无锡华云数据技术服务有限公司 | 基于分布式存储系统的数据处理方法 |
| CN112463444A (zh) * | 2020-11-18 | 2021-03-09 | 苏州浪潮智能科技有限公司 | 一种数据不一致修复方法及相关装置 |
| CN114416665A (zh) * | 2022-03-25 | 2022-04-29 | 苏州浪潮智能科技有限公司 | 一种数据一致性检测和修复的方法、装置及介质 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10003649B2 (en) * | 2015-05-07 | 2018-06-19 | Dell Products Lp | Systems and methods to improve read/write performance in object storage applications |
| CN105160253B (zh) * | 2015-09-29 | 2018-11-09 | 网易(杭州)网络有限公司 | 修复客户端程序的方法、装置、系统及服务器 |
| US10599634B2 (en) * | 2016-06-19 | 2020-03-24 | Qualcomm Incorporated | Signaling which version information to use on byte-range file repair |
| CN113806119B (zh) * | 2020-06-17 | 2024-05-31 | 浙江宇视科技有限公司 | 存储卡处理方法、装置、设备及存储介质 |
-
2022
- 2022-03-25 CN CN202210298447.6A patent/CN114416665B/zh active Active
- 2022-11-29 WO PCT/CN2022/135108 patent/WO2023179077A1/zh not_active Ceased
- 2022-11-29 US US18/718,148 patent/US12541622B2/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104111937A (zh) * | 2013-04-18 | 2014-10-22 | 中兴通讯股份有限公司 | 主、备数据库及其数据一致性检测、修复方法和装置 |
| US20170344597A1 (en) * | 2016-05-24 | 2017-11-30 | Vmware, Inc. | Distributed file system consistency check |
| CN107948334A (zh) * | 2018-01-09 | 2018-04-20 | 无锡华云数据技术服务有限公司 | 基于分布式存储系统的数据处理方法 |
| CN112463444A (zh) * | 2020-11-18 | 2021-03-09 | 苏州浪潮智能科技有限公司 | 一种数据不一致修复方法及相关装置 |
| CN114416665A (zh) * | 2022-03-25 | 2022-04-29 | 苏州浪潮智能科技有限公司 | 一种数据一致性检测和修复的方法、装置及介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20250061235A1 (en) | 2025-02-20 |
| US12541622B2 (en) | 2026-02-03 |
| CN114416665A (zh) | 2022-04-29 |
| CN114416665B (zh) | 2022-06-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20230031079A1 (en) | Resynchronization to a synchronous replication relationship | |
| US11153380B2 (en) | Continuous backup of data in a distributed data store | |
| US11128573B2 (en) | Load balancing for IP failover | |
| US11782783B2 (en) | Method and apparatus to neutralize replication error and retain primary and secondary synchronization during synchronous replication | |
| US11068503B2 (en) | File system operation handling during cutover and steady state | |
| US11663166B2 (en) | Post-processing global deduplication algorithm for scaled-out deduplication file system | |
| US20230259295A1 (en) | Serializing execution of replication operations | |
| US11221785B2 (en) | Managing replication state for deleted objects | |
| CN110825704B (zh) | 一种读数据方法、写数据方法及服务器 | |
| US9984139B1 (en) | Publish session framework for datastore operation records | |
| US12242428B2 (en) | Freeing pages within persistent memory | |
| WO2023179077A1 (zh) | 一种数据一致性检测和修复的方法、装置及介质 | |
| US11940954B2 (en) | Methods for ensuring correctness of file system analytics and devices thereof | |
| US10896152B2 (en) | Method, apparatus and computer program product for managing data storage | |
| US10852994B2 (en) | Metadata compaction | |
| CN107402841A (zh) | 大规模分布式文件系统数据修复方法及设备 | |
| US11720551B1 (en) | Method and system for streaming data from portable storage devices | |
| CN117130830A (zh) | 对象的数据恢复方法、装置、计算机设备及存储介质 | |
| US11138229B2 (en) | Dependency aware improvements to support parallel replay or parallel replication of operations which are directed to a common inode | |
| US20230018284A1 (en) | Crash-consistent clone generation in a distributed file system | |
| CN119415314A (zh) | 一种基于数据变化感知的数据备份和清理方法和装置 | |
| CN120469649A (zh) | 一种性能监控数据的存储方法、装置、设备以及介质 | |
| CN115391276A (zh) | 一种高分辨率遥感图像分布式处理系统与方法 | |
| CN116680281A (zh) | 数据一致性校验方法、装置、计算机设备和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22933128 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18718148 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22933128 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07.03.2025) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22933128 Country of ref document: EP Kind code of ref document: A1 |
|
| WWG | Wipo information: grant in national office |
Ref document number: 18718148 Country of ref document: US |