CN109460187B - Verification method and verification terminal for data consistency of qcow2 file - Google Patents
Verification method and verification terminal for data consistency of qcow2 file Download PDFInfo
- Publication number
- CN109460187B CN109460187B CN201811329221.8A CN201811329221A CN109460187B CN 109460187 B CN109460187 B CN 109460187B CN 201811329221 A CN201811329221 A CN 201811329221A CN 109460187 B CN109460187 B CN 109460187B
- Authority
- CN
- China
- Prior art keywords
- qcow2
- verification
- data
- nbd
- file
- 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
Links
- 238000012795 verification Methods 0.000 title claims abstract description 151
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000005192 partition Methods 0.000 claims abstract description 21
- 238000012545 processing Methods 0.000 claims description 13
- 238000012360 testing method Methods 0.000 claims description 7
- 238000004891 communication Methods 0.000 claims description 4
- 238000003860 storage Methods 0.000 abstract description 9
- 238000013500 data storage Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013524 data verification Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000005022 packaging material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0662—Virtualisation aspects
- G06F3/0664—Virtualisation aspects at device level, e.g. emulation of a storage device or system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0674—Disk device
- G06F3/0676—Magnetic disk device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method and a terminal for verifying the data consistency of a qcow2 file, which are characterized in that a qcow2 block of file of an original disk image or snapshot to be verified is obtained on a remote server; copying the qcow2 block files on the remote server to the local, using a Nbd kernel module to mount the qcow2 block files, and mounting the qcow2 block files into a preset partition; acquiring a preset comparison data disk of a local mirrored or snapshot mounting point; and carrying out data consistency verification on the data in the preset comparison data disk and the data of the qcow2 block file, and outputting a verification result. The data consistency of the qcow2 blocks of equipment is verified by utilizing qemu-nbd and storage equipment supporting the qcow2 blocks of equipment, the consistency of the stored data is ensured to a great extent, and the stable and reliable operation of the equipment is guaranteed.
Description
Technical Field
The invention relates to the technical field of computer storage, in particular to a qcow2 file data consistency verification method and a verification terminal.
Background
With the continuous development of the technology in the IT field and the arrival of the big data era, the stability of the server by the traditional informatization service and the increasingly strong cloud computing service is more and more required. In this case, regardless of the field of big data or cloud computing, the application scenarios of the device adopting qcow2 format block at the backend are very wide. qcow2 is a mirror format, a type of disk mirror supported by the QEMU emulator. qcow2 may be in the form of a file representing a fixed-size block device disk. How to guarantee the stability and consistency of qcow2 block data is a technical problem to be solved urgently at present.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a method for verifying the data consistency of a qcow2 file, which comprises the following steps:
acquiring a qcow2 block file of an original disk image or snapshot to be verified on a remote server;
copying the qcow2 block files on the remote server to the local, mounting the qcow2 block files by using a Nbd kernel module, and mounting the qcow2 block files into a preset partition;
step three, acquiring a preset comparison data disk of a local mirrored or snapshot mounting point;
and fourthly, carrying out data consistency verification on the data in the preset comparison data disk and the data of the qcow2 block file, and outputting a verification result.
Preferably, the first step further comprises: acquiring a qcow2 block file of an original disk image or snapshot to be verified, and acquiring a verification value of the qcow2 block file;
the second step further comprises: comparing the verification value of the qcow2 block file with a preset verification value;
and when the verification value of the qcow2 block file is consistent with the preset verification value, using the Nbd kernel module to mount the qcow2 block file to a preset partition of the device where the Nbd kernel module is located.
Preferably, step two further comprises: copying the qcow2 block files on the remote server to the local through scp;
the third step also comprises: and checking the address information of the local mirrored or snapshot mounting point, judging Nbd whether the kernel module has a verification idle processing space, and when the Nbd kernel module has the verification idle processing space, acquiring a preset comparison data disk of the local mirrored or snapshot mounting point based on the address information of the local mirrored or snapshot mounting point.
Preferably, step one is preceded by:
checking whether the remote server supports cpu virtualization, memory virtualization and whether a kernel module is configured Nbd;
when the remote server does not support cpu virtualization, does not support memory virtualization and is not configured with Nbd kernel modules, loading an NBD driver, configuring Nbd kernel modules, configuring cpu virtualization and memory virtualization;
based on cpu virtualization, memory virtualization and Nbd kernel module mount qcow2 block files, identifying the mounted partition information.
Preferably, step four further comprises:
log is empty, which means that the qcow2 block file is consistent with the data in the preset comparison data disc; otherwise, they are not consistent.
A verification terminal based on qcow2 file data consistency verification comprises: verifying the terminal;
the verification terminal is respectively in communication connection with each remote server to be verified;
the verification terminal is used for obtaining the qcow2 block file of the original disk image or snapshot to be verified on the remote server,
the device is also used for copying the qcow2 block files on the remote server to the local, using a Nbd kernel module to mount the qcow2 block files, and mounting the qcow2 block files into a preset partition;
the system is also used for acquiring a preset comparison data disk of a local mirrored or snapshot mounting point;
and the data comparison module is also used for verifying the data consistency between the data in the preset comparison data disk and the data of the qcow2 block file based on data consistency and outputting a verification result.
Preferably, the verification terminal is further configured to obtain a preset verification value for configuring the qcow2 block file to be verified;
acquiring a qcow2 block file of an original disk image or snapshot to be verified, and acquiring a verification value of the qcow2 block file; comparing the verification value of the qcow2 block file with a preset verification value;
and when the verification value of the qcow2 block file is consistent with the preset verification value, using the Nbd kernel module to mount the qcow2 block file to a preset partition of the device where the Nbd kernel module is located.
Preferably, the verification terminal is configured with an NBD driver, a cpu virtualization loading module and a memory virtualization loading module;
the verification terminal is also used for checking whether the remote server supports cpu virtualization, memory virtualization and whether a Nbd kernel module is configured;
when the remote server does not support cpu virtualization, does not support memory virtualization and is not configured with Nbd kernel modules, loading an NBD driver, configuring Nbd kernel modules, configuring cpu virtualization and memory virtualization;
based on cpu virtualization, memory virtualization and Nbd kernel module mount qcow2 block files, identifying the mounted partition information.
Preferably, the verification terminal is also used for copying the qcow2 block file on the remote server to the local through scp copy;
and the management module is further used for checking address information of the local mirrored or snapshot mounting point, judging Nbd whether the kernel module has a verification idle processing space, and when the Nbd kernel module has the verification idle processing space, acquiring a preset comparison data disk of the local mirrored or snapshot mounting point based on the address information of the local mirrored or snapshot mounting point.
Preferably, the verification terminal is further configured with a verification log output module, a memory and a processor;
the verification log output module is used for outputting a verification result, and if test.log is empty, the qcow2 block file is consistent with data in a preset comparison data disc; otherwise, the two are inconsistent;
the memory is used for storing a verification terminal operating system, verification data information and a qcow2 file data consistency verification method application program;
the processor is used for executing the verification terminal operating system and the application program of the verification method of the consistency of the qcow2 file data so as to realize the steps of the verification method of the consistency of the qcow2 file data.
According to the technical scheme, the invention has the following advantages:
the method for verifying the consistency of the qcow2 file data utilizes qemu-nbd and storage equipment supporting qcow2 block equipment to verify the consistency of the qcow2 block equipment data, so that the consistency of the stored data is ensured to a great extent, and the stable and reliable operation of the equipment is guaranteed.
The invention relates to the technical field of computer computing/storage, in particular to a data consistency verification method with strong practicability and wide application range. According to the method, on the basis of supporting the qemu-nbd command, for most images, the data consistency verification can be carried out on the qcow2 format file generated by the snapshot, and multiple servers can carry out verification simultaneously.
The method and the device can enable a tester to conveniently and rapidly verify whether the source data is consistent with the mirror image data and the snapshot data, improve the testing efficiency and reduce the uncertainty caused by human factors.
The invention avoids the problems that a large amount of data is often encountered in the test process, whether the data of the mirror image and the snapshot file is consistent with the source file or not needs to be verified, the manual successive verification is unscientific, the efficiency is low, and the artificial uncertainty is also brought.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description will be briefly introduced, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for verifying data consistency of a qcow2 file;
FIG. 2 is a flowchart of an embodiment of a method for verifying data consistency of a qcow2 file;
fig. 3 is a schematic diagram of communication between a verification terminal and a remote server based on qcow2 file data consistency verification.
Detailed Description
The invention provides a method for verifying data consistency of a qcow2 file, which comprises the following steps of:
s1, acquiring a qcow2 block file of the original disk image or snapshot to be verified on a remote server;
s2, copying the qcow2 files on the remote server to the local, using a Nbd kernel module to mount the qcow2 files to a preset partition;
s3, acquiring a preset comparison data disk of a local mirrored or snapshot mounting point;
and S4, carrying out data consistency verification on the data in the preset comparison data disk and the data of the qcow2 block file, and outputting a verification result.
The QEMU is responsible for cpu virtualization and memory virtualization for the kvm, so that the cpu and the memory are virtualized, but the kvm cannot simulate other equipment; qemu is an analog IO device (network card, disk), and server virtualization can be realized in a real sense after qemu is added to kvm, so that the qemu-kvm is generally called qemu-kvm.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions of the present invention will be clearly and completely described below with reference to specific embodiments and drawings. 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 scope of protection of this patent.
In the embodiment provided by the present invention, as shown in fig. 2,
s11, acquiring a qcow2 block file of the original disk image or snapshot to be verified on a remote server; meanwhile, obtaining a verification value of the qcow2 block file;
s12, comparing the verification value of the qcow2 block file with a preset verification value;
when the verification value of the qcow2 block file is inconsistent with the preset verification value, the obtained qcow2 block file is not the qcow2 block file which needs to be verified, and thus the qcow2 block file of the original disk image or snapshot to be verified needs to be obtained again on the remote server. The acquisition verifier checks whether the acquisition process is wrong or not or is in misoperation. The verification value can adopt the MD5 value, and certainly, other ways can also be adopted to set the encryption code, such as an RSA way, an MD way, or an AES way to form the encryption code, so as to confirm whether the obtained qcow2 block file is correct and meets the verification requirement.
And when the verification value of the qcow2 block file is consistent with the preset verification value, using the Nbd kernel module to mount the qcow2 block file to a preset partition of the device where the Nbd kernel module is located.
S13, acquiring a preset comparison data disk of a local mirrored or snapshot mounting point;
and S14, carrying out data consistency verification on the data in the preset comparison data disk and the data of the qcow2 block file, and outputting a verification result.
The techniques described herein may be implemented in hardware, software, firmware, or any combination thereof. Various features are described as modules, units or components that may be implemented together in an integrated logic device or separately as discrete but interoperable logic devices or other hardware devices. In some cases, various features of an electronic circuit may be implemented as one or more integrated circuit devices, such as an integrated circuit chip or chipset.
In the embodiment provided by the invention, the second step further comprises: and copying the qcow2 block file on the remote server to the local through scp. Of course, this is not limited to scp copying.
The third step also comprises: and checking the address information of the local mirrored or snapshot mounting point, judging Nbd whether the kernel module has a verification idle processing space, and when the Nbd kernel module has the verification idle processing space, acquiring a preset comparison data disk of the local mirrored or snapshot mounting point based on the address information of the local mirrored or snapshot mounting point.
If implemented in hardware, the invention relates to an apparatus, which may be, for example, a processor or an integrated circuit device, such as an integrated circuit chip or chipset. Alternatively or additionally, if implemented in software or firmware, the techniques may implement a data storage medium readable at least in part by a computer, comprising instructions that when executed cause a processor to perform one or more of the above-described methods. For example, a computer-readable data storage medium may store instructions that are executed, such as by a processor.
In the embodiment provided by the present invention, the first step further includes:
checking whether the remote server supports cpu virtualization, memory virtualization and whether a kernel module is configured Nbd;
when the remote server does not support cpu virtualization, does not support memory virtualization and is not configured with Nbd kernel modules, loading an NBD driver, configuring Nbd kernel modules, configuring cpu virtualization and memory virtualization;
based on cpu virtualization, memory virtualization and Nbd kernel module mount qcow2 block files, identifying the mounted partition information.
NBD is that the Network Block Device is a kernel module, and most Linux distribution versions are contained; the disk space of a remote host can be used as a block device, just like a hard disk; the hard disk space of another server can be conveniently added to the local server.
In the embodiment provided by the invention, the fourth step further comprises: log is empty, which means that the qcow2 block file is consistent with the data in the preset comparison data disc; otherwise, they are not consistent.
The verification result can be output in a form mode, a chart mode and the like, so that the verification personnel can inquire and use conveniently.
The invention also provides a verification terminal based on qcow2 file data consistency verification, as shown in fig. 1, comprising: an authentication terminal 1;
the verification terminal 1 is respectively in communication connection with each remote server 2 to be verified;
the verification terminal is used for obtaining the qcow2 block file of the original disk image or snapshot to be verified on the remote server,
the device is also used for copying the qcow2 block files on the remote server to the local, using a Nbd kernel module to mount the qcow2 block files, and mounting the qcow2 block files into a preset partition;
the system is also used for acquiring a preset comparison data disk of a local mirrored or snapshot mounting point;
and the data comparison module is also used for verifying the data consistency between the data in the preset comparison data disk and the data of the qcow2 block file based on data consistency and outputting a verification result.
The computer program product of the computer readable medium may form part of, which may include, packaging materials. The computer-readable medium of data may include computer storage media such as Random Access Memory (RAM), Read Only Memory (ROM), non-volatile random access memory (NVRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory, magnetic or optical data storage media, and the like. In some embodiments, an article of manufacture may comprise one or more computer-readable storage media.
In the invention, the verification terminal 1 can verify only one remote server 2, and also can verify a plurality of remote servers 2 at the same time, thereby improving the verification efficiency.
The verification terminal is also used for acquiring a preset verification value for configuring the qcow2 block files to be verified;
acquiring a qcow2 block file of an original disk image or snapshot to be verified, and acquiring a verification value of the qcow2 block file; comparing the verification value of the qcow2 block file with a preset verification value;
when the verification value of the qcow2 block file is inconsistent with the preset verification value, the obtained qcow2 block file is not the qcow2 block file which needs to be verified, and thus the qcow2 block file of the original disk image or snapshot to be verified needs to be obtained again on the remote server. The acquisition verifier checks whether the acquisition process is wrong or not or is in misoperation. The verification value can adopt the MD5 value, and certainly, other ways can also be adopted to set the encryption code, such as an RSA way, an MD way, or an AES way to form the encryption code, so as to confirm whether the obtained qcow2 block file is correct and meets the verification requirement.
And when the verification value of the qcow2 block file is consistent with the preset verification value, using the Nbd kernel module to mount the qcow2 block file to a preset partition of the device where the Nbd kernel module is located.
The code or instructions may be software and/or firmware executed by processing circuitry including one or more processors, such as one or more Digital Signal Processors (DSPs), general purpose microprocessors, Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor," as used herein, may refer to any of the foregoing structure or any other structure more suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described in this disclosure may be provided in software modules and hardware modules.
The verification terminal provided by the invention is provided with an NBD driver, a cpu virtualization loading module and a memory virtualization loading module; the verification terminal is also used for checking whether the remote server supports cpu virtualization, memory virtualization and whether a Nbd kernel module is configured;
when the remote server does not support cpu virtualization, does not support memory virtualization and is not configured with Nbd kernel modules, loading an NBD driver, configuring Nbd kernel modules, configuring cpu virtualization and memory virtualization; based on cpu virtualization, memory virtualization and Nbd kernel module mount qcow2 block files, identifying the mounted partition information.
The authentication terminal may include additional hardware components, such as one or more processors and the like. Furthermore, the unit, module, component, application, and component devices, systems, described herein and/or mobile devices may include hardware and software, may also include firmware, may perform various operations including those described herein, may be combined or remain separate, and may be stored on one or more storage devices or computer-readable media. And, although described herein as a mobile device, it need not be limited in this regard, such that the mobile device may advantageously be a smartphone, tablet, laptop, desktop computer, or the like.
In the invention, the verification terminal is also used for copying the qcow2 block file on the remote server to the local through scp copy;
and the management module is further used for checking address information of the local mirrored or snapshot mounting point, judging Nbd whether the kernel module has a verification idle processing space, and when the Nbd kernel module has the verification idle processing space, acquiring a preset comparison data disk of the local mirrored or snapshot mounting point based on the address information of the local mirrored or snapshot mounting point.
In the invention, the verification terminal is also provided with a verification log output module, a memory and a processor;
the verification log output module is used for outputting a verification result, and if test.log is empty, the qcow2 block file is consistent with data in a preset comparison data disc; otherwise, the two are inconsistent; the memory is used for storing a verification terminal operating system, verification data information and a qcow2 file data consistency verification method application program; the processor is used for executing the verification terminal operating system and the application program of the verification method of the consistency of the qcow2 file data so as to realize the steps of the verification method of the consistency of the qcow2 file data.
The method and apparatus of the present invention may be implemented in a number of ways. For example, the methods and apparatus of the present invention may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
The invention also provides a specific embodiment, which specifically comprises the following steps:
finding an image of an original disk needing to be verified or a snapshot qcow2 file test1.qcow2 on a remote server and recording the md5 value of the image or the snapshot qcow2 file;
executing and recording md5 value on the remote server;
copying a remote storage host (IP: 1.1.1.1) test1.qcow2 file to the local of the verification terminal through scp;
copying a remote qcow2 file to the local verification terminal;
verifying the MD5 value after copying to the local verification terminal;
if the nbd device name is occupied, please replace one;
view the nbd device partition;
mounting an nbd device partition;
find the original data disk (non-system disk) mount point that is mirrored/snapshot locally, e.g.,/dev/sdb 1;
listing local disk partitions
Comparing the data of the local original data disk with the qcow2 block file mount partitions;
log is empty, which means that the remote qcow2 block file is consistent with the local source data; otherwise, they are not consistent.
The invention realizes the verification of data consistency of the qcow2 blocks of equipment by utilizing qemu-nbd and the storage equipment supporting the qcow2 blocks of equipment, ensures the consistency of the stored data to a great extent and ensures the stable and reliable operation of the equipment.
The invention relates to consistency test and verification of computer calculation/stored data, and avoids the problems that a large amount of data is often encountered in the test process, whether mirror image and snapshot file data are consistent with a source file or not needs to be verified, manual successive verification is unscientific, the efficiency is low, and manual uncertainty is also brought.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (8)
1. A qcow2 file data consistency verification method is characterized by comprising the following steps:
checking whether a remote server supports cpu virtualization, memory virtualization and whether a core module is configured Nbd;
secondly, loading an NBD driver, configuring a Nbd kernel module, and configuring cpu virtualization and memory virtualization when the remote server does not support cpu virtualization, does not support memory virtualization and does not configure Nbd kernel module;
step three, when the remote server supports cpu virtualization, supports memory virtualization and configures Nbd kernel modules, acquiring a qcow2 block file of an original disk image or a snapshot to be verified on the remote server;
copying the qcow2 block files on the remote server to the local, using a Nbd kernel module to mount the qcow2 block files, and mounting the qcow2 block files into a preset partition;
step four, acquiring a preset comparison data disk of a local mirrored or snapshot mounting point;
and fifthly, carrying out data consistency verification on the data in the preset comparison data disk and the data of the qcow2 block file, and outputting a verification result.
2. The qcow2 file data consistency verification method of claim 1,
the third step also comprises: acquiring a qcow2 block file of an original disk image or snapshot to be verified, and acquiring a verification value of the qcow2 block file;
comparing the verification value of the qcow2 block file with a preset verification value;
and when the verification value of the qcow2 block file is consistent with the preset verification value, using the Nbd kernel module to mount the qcow2 block file to a preset partition of the device where the Nbd kernel module is located.
3. The qcow2 file data consistency verification method of claim 1 or 2, wherein,
the third step also comprises: copying the qcow2 block files on the remote server to the local through scp;
the fourth step also comprises: and checking the address information of the local mirrored or snapshot mounting point, judging Nbd whether the kernel module has a verification idle processing space, and when the Nbd kernel module has the verification idle processing space, acquiring a preset comparison data disk of the local mirrored or snapshot mounting point based on the address information of the local mirrored or snapshot mounting point.
4. The qcow2 file data consistency verification method of claim 1 or 2, wherein,
the fifth step also comprises:
log is empty, which means that the qcow2 block file is consistent with the data in the preset comparison data disc; otherwise, they are not consistent.
5. A verification terminal based on qcow2 file data consistency verification is characterized by comprising: verifying the terminal;
the verification terminal is respectively in communication connection with each remote server to be verified;
the verification terminal is provided with an NBD driver, a cpu virtualization loading module and a memory virtualization loading module;
the verification terminal is used for checking whether the remote server supports cpu virtualization, memory virtualization and whether a Nbd kernel module is configured;
when the remote server does not support cpu virtualization, does not support memory virtualization and is not configured with Nbd kernel modules, loading an NBD driver, configuring Nbd kernel modules, configuring cpu virtualization and memory virtualization;
the verification terminal is further used for acquiring a qcow2 block file of an original disk image or snapshot to be verified on the remote server when the remote server supports cpu virtualization, memory virtualization and Nbd kernel module configuration, copying the qcow2 block file on the remote server to the local, and using Nbd kernel module to mount the qcow2 block file into a preset partition;
the system is also used for acquiring a preset comparison data disk of a local mirrored or snapshot mounting point;
and the data comparison module is also used for verifying the data consistency between the data in the preset comparison data disk and the data of the qcow2 block file based on data consistency and outputting a verification result.
6. The verification terminal for verification of consistency of data based on qcow2 file according to claim 5,
the verification terminal is also used for acquiring a preset verification value of the qcow2 block file to be verified;
acquiring a qcow2 block file of an original disk image or snapshot to be verified, and acquiring a verification value of the qcow2 block file; comparing the verification value of the qcow2 block file with a preset verification value;
and when the verification value of the qcow2 block file is consistent with the preset verification value, using the Nbd kernel module to mount the qcow2 block file to a preset partition of the device where the Nbd kernel module is located.
7. The verification terminal for verification of consistency of data based on qcow2 file according to claim 5,
the verification terminal is also used for copying the qcow2 block file on the remote server to the local through scp copying;
and the management module is further used for checking address information of the local mirrored or snapshot mounting point, judging Nbd whether the kernel module has a verification idle processing space, and when the Nbd kernel module has the verification idle processing space, acquiring a preset comparison data disk of the local mirrored or snapshot mounting point based on the address information of the local mirrored or snapshot mounting point.
8. The verification terminal for verification of consistency of data based on qcow2 file according to claim 5,
the verification terminal is also provided with a verification log output module, a memory and a processor;
the verification log output module is used for outputting a verification result, and if test.log is empty, the qcow2 block file is consistent with data in a preset comparison data disc; otherwise, the two are inconsistent;
the memory is used for storing a verification terminal operating system, verification data information and a qcow2 file data consistency verification method application program;
the processor is used for executing the verification terminal operating system and the application program of the verification method of the consistency of the qcow2 file data so as to realize the steps of the verification method of the consistency of the qcow2 file data according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811329221.8A CN109460187B (en) | 2018-11-09 | 2018-11-09 | Verification method and verification terminal for data consistency of qcow2 file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811329221.8A CN109460187B (en) | 2018-11-09 | 2018-11-09 | Verification method and verification terminal for data consistency of qcow2 file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109460187A CN109460187A (en) | 2019-03-12 |
CN109460187B true CN109460187B (en) | 2022-05-03 |
Family
ID=65609826
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811329221.8A Active CN109460187B (en) | 2018-11-09 | 2018-11-09 | Verification method and verification terminal for data consistency of qcow2 file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109460187B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110008227B (en) * | 2019-04-11 | 2021-08-10 | 苏州浪潮智能科技有限公司 | Consistency group reliability verification method and related device |
CN110737546B (en) * | 2019-10-17 | 2022-04-29 | 深信服科技股份有限公司 | Consistency snapshot checking method, device, equipment and storage medium |
CN116257277B (en) * | 2023-05-12 | 2023-08-01 | 天津卓朗昆仑云软件技术有限公司 | Mirror image file updating method and device and VOI system |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1549670A (en) * | 2003-05-21 | 2004-11-24 | 华为技术有限公司 | Method and apparatus for examining uniformity |
US8027952B2 (en) * | 2003-06-18 | 2011-09-27 | International Business Machines Corporation | System and article of manufacture for mirroring data at storage locations |
CN102761615A (en) * | 2012-06-29 | 2012-10-31 | 浪潮(北京)电子信息产业有限公司 | Method and device for realizing data synchronism of long-distance duplication system |
CN103795759A (en) * | 2012-10-31 | 2014-05-14 | 北京搜狐新媒体信息技术有限公司 | Method and system for scheduling virtual machine mirror image file |
CN105208104A (en) * | 2015-08-26 | 2015-12-30 | 浪潮(北京)电子信息产业有限公司 | Remote mirroring data consistency detection method and device |
CN105446769A (en) * | 2015-11-03 | 2016-03-30 | 广东欧珀移动通信有限公司 | Mirror image file update processing method and apparatus and terminal device |
CN105808374A (en) * | 2014-12-31 | 2016-07-27 | 华为技术有限公司 | Snapshot processing method and associated equipment |
CN106227621A (en) * | 2016-07-25 | 2016-12-14 | 北京飞杰信息技术有限公司 | The data back up method of logic-based volume management simplification volume and system |
CN107102918A (en) * | 2017-05-26 | 2017-08-29 | 郑州云海信息技术有限公司 | A kind of data processing method and device |
CN107480562A (en) * | 2017-08-18 | 2017-12-15 | 郑州云海信息技术有限公司 | A kind of disk management method and device |
CN107493204A (en) * | 2016-06-13 | 2017-12-19 | 阿里巴巴集团控股有限公司 | The method and device of a kind of microscope testing |
CN107678831A (en) * | 2017-09-25 | 2018-02-09 | 郑州云海信息技术有限公司 | It is a kind of to realize the V2V methods migrated between virtual platform |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6779063B2 (en) * | 2001-04-09 | 2004-08-17 | Hitachi, Ltd. | Direct access storage system having plural interfaces which permit receipt of block and file I/O requests |
US10437681B2 (en) * | 2013-10-30 | 2019-10-08 | Trilio Data, Inc. | Method and apparatus of managing application workloads on backup and recovery system |
US10289476B2 (en) * | 2017-01-21 | 2019-05-14 | International Business Machines Corporation | Asynchronous mirror inconsistency correction |
-
2018
- 2018-11-09 CN CN201811329221.8A patent/CN109460187B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1549670A (en) * | 2003-05-21 | 2004-11-24 | 华为技术有限公司 | Method and apparatus for examining uniformity |
US8027952B2 (en) * | 2003-06-18 | 2011-09-27 | International Business Machines Corporation | System and article of manufacture for mirroring data at storage locations |
CN102761615A (en) * | 2012-06-29 | 2012-10-31 | 浪潮(北京)电子信息产业有限公司 | Method and device for realizing data synchronism of long-distance duplication system |
CN103795759A (en) * | 2012-10-31 | 2014-05-14 | 北京搜狐新媒体信息技术有限公司 | Method and system for scheduling virtual machine mirror image file |
CN105808374A (en) * | 2014-12-31 | 2016-07-27 | 华为技术有限公司 | Snapshot processing method and associated equipment |
CN105208104A (en) * | 2015-08-26 | 2015-12-30 | 浪潮(北京)电子信息产业有限公司 | Remote mirroring data consistency detection method and device |
CN105446769A (en) * | 2015-11-03 | 2016-03-30 | 广东欧珀移动通信有限公司 | Mirror image file update processing method and apparatus and terminal device |
CN107493204A (en) * | 2016-06-13 | 2017-12-19 | 阿里巴巴集团控股有限公司 | The method and device of a kind of microscope testing |
CN106227621A (en) * | 2016-07-25 | 2016-12-14 | 北京飞杰信息技术有限公司 | The data back up method of logic-based volume management simplification volume and system |
CN107102918A (en) * | 2017-05-26 | 2017-08-29 | 郑州云海信息技术有限公司 | A kind of data processing method and device |
CN107480562A (en) * | 2017-08-18 | 2017-12-15 | 郑州云海信息技术有限公司 | A kind of disk management method and device |
CN107678831A (en) * | 2017-09-25 | 2018-02-09 | 郑州云海信息技术有限公司 | It is a kind of to realize the V2V methods migrated between virtual platform |
Also Published As
Publication number | Publication date |
---|---|
CN109460187A (en) | 2019-03-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9846617B2 (en) | System and method for self-healing basic input/output system boot image and secure recovery | |
CN109460187B (en) | Verification method and verification terminal for data consistency of qcow2 file | |
US10678670B2 (en) | Evaluating fairness in devices under test | |
US10552306B2 (en) | Automated test generation for multi-interface and multi-platform enterprise virtualization management environment | |
US11048618B2 (en) | Environment modification for software application testing | |
US11366800B2 (en) | System and method to automate validating media redirection in testing process | |
US9792168B2 (en) | System and method for cloud remediation of a client with a non-bootable storage medium | |
US20160170869A9 (en) | Systems and methods for in-place reorganization of device storage | |
CN115599618B (en) | Register dynamic change-allocation verification method and device, storage medium and processor | |
CN108228611B (en) | Document information copying method and device | |
US11574060B2 (en) | Secure initial program load | |
CN112133357A (en) | eMMC testing method and device | |
CN113505026A (en) | Method, device and equipment for verifying backup data and storage medium | |
US20200411047A1 (en) | Detecting electronic system modification | |
CN114968753A (en) | Equipment upgrading test method, medium, electronic equipment and test system | |
US11907409B2 (en) | Dynamic immutable security personalization for enterprise products | |
CN118069160A (en) | System deployment method, deployment platform and storage medium under micro-service architecture | |
US11474816B2 (en) | Code review using quantitative linguistics | |
CN111708691B (en) | Figerprint automatic adaptation method and device based on android platform | |
US11150992B2 (en) | File entity relationship management and source product backup | |
CN108897561B (en) | Data storage method and storage system | |
CN110007930B (en) | Application deployment method and system | |
CN117806767A (en) | Method and device for improving virtual machine creation time, storage medium and electronic equipment | |
CN113791941A (en) | Method for automatically testing stability of OpenStack cluster and application | |
CN113900934A (en) | Multi-mirror mixed refresh test method, system, terminal 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 |