CN103885718A - Mirror disk increment synchronizing method based on lvm - Google Patents
Mirror disk increment synchronizing method based on lvm Download PDFInfo
- Publication number
- CN103885718A CN103885718A CN201210558614.2A CN201210558614A CN103885718A CN 103885718 A CN103885718 A CN 103885718A CN 201210558614 A CN201210558614 A CN 201210558614A CN 103885718 A CN103885718 A CN 103885718A
- Authority
- CN
- China
- Prior art keywords
- disk
- mirrored
- failed
- track table
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
The invention relates to disk mirroring technologies, in particular to a mirror disk increment synchronizing method based on lvm. The method includes: writing mirror data into a tracking table, and judging the change state of disk logic blocks to achieve disk increment synchronization. By comparing the logic tracking tables of a non-fault disk and a fault disk, the positions of disk blocks requiring updating is judged, and data updating is performed. The mirror disk increment synchronizing method is applicable to the field of disk mirroring.
Description
Technical field
The present invention relates to disk mirroring, especially a kind of mirrored disk increment synchronization method based on lvm.
Background technology
LVM is Logical Volume Manager(logical volume management) write a Chinese character in simplified form, it is the one mechanism under Linux environment, disk partition being managed, it is realized on Linux 2.4 kernels by Heinz Mauelshagen, LVM is the abbreviation of Logical Disk volume management (Logical Volume Manager), it is the one mechanism under Linux environment, disk partition being managed, LVM is the logical layer being based upon on hard disk and subregion, improves the dirigibility of disk partition management.Speak of above, LVM is the logical layer adding between disk partition and file system, carrys out the disk partition layout for file system shielding lower floor, and abstract coiling is provided, and sets up file system on coiling.Physical volume (physical volume) physical volume just refers to fdisk or from have in logic the equipment (as RAID) of said function with disk partition, it is the basic stored logic piece of LVM, but and basic physical storage medium (as subregion, disk etc.) relatively, but includes the management parameters relevant to LVM
Run into when Linux user installation (SuSE) Linux OS one modal problem that is difficult to determine is exactly how correctly to the each partition size of assessment, to distribute suitable hard drive space.And run into while occurring that certain partition space exhausts, the method for solution typically uses Symbolic Links, or uses the instrument (such as PatitionMagic etc.) of adjusting partition size, but this is all temporary transient solution, does not deal with problems at all.Along with the appearance of the logical volume management LVM function of Linux, these problems are all readily solved, and user is adjusting each partition size without shut down in the situation that easily.
Lvm is mainly also for subregion expansion, but it is also very extensive to use lvm to realize the application of disk mirroring.Such as, there is two hard disk/dev/sdb size the same as/dev/sdc, want these two hard disks to do disk mirroring, ensure the data consistent of two hard disks, can utilize the disk mirroring function of lvm to realize.In prior art, linux lvm is after mirrored volume disk failure recovers, need to carry out full dose synchronous, to the data acquisition between two hard disks with full dose synchronous (being disposable synchronous total data), can increase system disk burden, seriously reduce disk iops performance, also reduce business host performance, cause professional chief to wait for, system effectiveness is low.
Summary of the invention
Technical matters to be solved by this invention is: for the problem of above-mentioned existence, provide a kind of mirrored disk increment synchronization method based on lvm, write Track Table by mirror image data, it is synchronous that the change state that judges disk logical block is realized the increment of disk.
Technical solution of the present invention is:
A kind of mirrored disk increment synchronization method based on lvm comprises
Step 1: initialization mirrored disk also arranges respectively the disk Track Table of each disk according to mirrored disk capacity;
Step 2: data to be written be mapped to logic Track Table in the position of mirrored disk and respectively mirrored disk write to mark position 0;
Step 3: zone bit to be written is 0 o'clock, writes data respectively the relevant position of mirrored disk, if a disk breaks down in mirrored disk, non-failed disk is write to mark position 1;
Step 4: if disk breaks down after recovery, the logic Track Table of more non-failed disk and failed disk, judgement need to be upgraded the position of disk block;
Step 5: the more new data that logic Track Table in non-failed disk is shown is synchronized to failed disk relevant position.
Logic Track Table described in described step 1 comprises disk creation-time stamp, disk latest update timestamp, disk block logic bitmap, wherein the form of disk creation-time stamp or disk latest update timestamp is divide-XX of the XX-XX month-XX day-XX time-XX second-XX millisecond, and disk block logic bitmap is the zone bit of writing that every bit represents 512B disk block.
Described step 2 is mapped to data to be written logic Track Table specific implementation step in the position of mirrored disk comprises:
Step 21: be 512B that the reference position in disk is started as a Block, be mapped to initial first Bit position of logic Track Table;
Step 22: repeating step 21, continues data in magnetic disk to be mapped in logic Track Table.
In described step 4, comparative approach specifically comprises:
Step 41: the time value of the up-to-date timestamp of more non-failed disk and failed disk, determine that mirrored disk latest data changes the time;
Step 42: change the time according to mirrored disk latest data, each in more non-failed disk and failed disk successively, if when zone bit is inconsistent, by all relevant positions in failed disk of corresponding data image in non-failed disk, and zone bit zero clearing will be write in non-failed disk accordingly.
In sum, owing to having adopted technique scheme, the invention has the beneficial effects as follows: write Track Table by mirror image data, it is synchronous that the change state that judges disk logical block is realized the increment of disk;
Brief description of the drawings
Examples of the present invention will be described by way of reference to the accompanying drawings, wherein:
Fig. 1 is prior art process flow diagram;
Fig. 2 is process flow diagram in the design.
Embodiment
Disclosed all features in this instructions, or step in disclosed all methods or process, except mutually exclusive feature and/or step, all can combine by any way.
Disclosed arbitrary feature in this instructions (comprising any accessory claim, summary and accompanying drawing), unless narration especially all can be replaced by other equivalences or the alternative features with similar object.,, unless narration especially, each feature is an example in a series of equivalences or similar characteristics.
Embodiment mono-: a kind of mirrored disk increment synchronization method based on lvm comprises
Step 1: initialization mirrored disk also arranges respectively the disk Track Table of each disk according to mirrored disk capacity;
Step 2: data to be written be mapped to logic Track Table in the position of mirrored disk and respectively mirrored disk write to mark position 0;
Step 3: zone bit to be written is 0 o'clock, writes data respectively the relevant position of mirrored disk, if a disk breaks down in mirrored disk, non-failed disk is write to mark position 1;
Step 4: if disk breaks down after recovery, the logic Track Table of more non-failed disk and failed disk, judgement need to be upgraded the position of disk block;
Step 5: the more new data that logic Track Table in non-failed disk is shown is synchronized to failed disk relevant position.
Embodiment bis-: on embodiment mono-basis, in described step 1, logic Track Table comprises disk creation-time stamp, disk latest update timestamp, disk block logic bitmap, wherein the form of disk creation-time stamp or disk latest update timestamp is divide-XX of the XX-XX month-XX day-XX time-XX second-XX millisecond, and disk block logic bitmap is the zone bit of writing that every bit represents 512B disk block.
Embodiment tri-: on embodiment mono-or two bases, described step 2 is mapped to data to be written logic Track Table specific implementation step in the position of mirrored disk comprises:
Step 21: be 512B that the reference position in disk is started as a Block, be mapped to initial first Bit position of logic Track Table;
Step 22: repeating step 21, continues data in magnetic disk to be mapped in logic Track Table.
Embodiment tetra-: on one of embodiment mono-to three basis, in described step 4, comparative approach specifically comprises:
Step 41: the time value of the up-to-date timestamp of more non-failed disk and failed disk, determine that mirrored disk latest data changes the time;
Step 42: change the time according to mirrored disk latest data, each in more non-failed disk and failed disk successively, if when zone bit is inconsistent, by all relevant positions in failed disk of corresponding data image in non-failed disk, and zone bit zero clearing will be write in non-failed disk accordingly.
The present invention is not limited to aforesaid embodiment.The present invention expands to any new feature or any new combination disclosing in this manual, and the arbitrary new method disclosing or step or any new combination of process.
Claims (4)
1. the mirrored disk increment synchronization method based on lvm, is characterized in that comprising
Step 1: initialization mirrored disk also arranges respectively the disk Track Table of each disk according to mirrored disk capacity;
Step 2: data to be written be mapped to logic Track Table in the position of mirrored disk and respectively mirrored disk write to mark position 0;
Step 3: zone bit to be written is 0 o'clock, writes data respectively the relevant position of mirrored disk, if a disk breaks down in mirrored disk, non-failed disk is write to mark position 1;
Step 4: if disk breaks down after recovery, the logic Track Table of more non-failed disk and failed disk, judgement need to be upgraded the position of disk block;
Step 5: the more new data that logic Track Table in non-failed disk is shown is synchronized to failed disk relevant position.
2. according to a kind of mirrored disk increment synchronization method based on lvm described in claim 1, it is characterized in that in described step 1, logic Track Table comprises disk creation-time stamp, disk latest update timestamp, disk block logic bitmap, wherein the form of disk creation-time stamp or disk latest update timestamp is divide-XX of the XX-XX month-XX day-XX time-XX second-XX millisecond, and disk block logic bitmap is the zone bit of writing that every bit represents 512B disk block.
3. according to a kind of mirrored disk increment synchronization method based on lvm described in claim 1, it is characterized in that described step 2 is mapped to data to be written logic Track Table specific implementation step in the position of mirrored disk comprises:
Step 21: be 512B that the reference position in disk is started as a Block, be mapped to initial first Bit position of logic Track Table;
Step 22: repeating step 21, continues data in magnetic disk to be mapped in logic Track Table.
4. according to a kind of mirrored disk increment synchronization method based on lvm described in claim 1, it is characterized in that in described step 4, comparative approach specifically comprises:
Step 41: the time value of the up-to-date timestamp of more non-failed disk and failed disk, determine that mirrored disk latest data changes the time;
Step 42: change the time according to mirrored disk latest data, each in more non-failed disk and failed disk successively, if when zone bit is inconsistent, by all relevant positions in failed disk of corresponding data image in non-failed disk, and zone bit zero clearing will be write in non-failed disk accordingly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210558614.2A CN103885718A (en) | 2012-12-21 | 2012-12-21 | Mirror disk increment synchronizing method based on lvm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210558614.2A CN103885718A (en) | 2012-12-21 | 2012-12-21 | Mirror disk increment synchronizing method based on lvm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103885718A true CN103885718A (en) | 2014-06-25 |
Family
ID=50954639
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210558614.2A Pending CN103885718A (en) | 2012-12-21 | 2012-12-21 | Mirror disk increment synchronizing method based on lvm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103885718A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105553722A (en) * | 2015-12-16 | 2016-05-04 | 深圳市迪菲特科技股份有限公司 | Timestamp-based data exchange method, device and system |
CN108037894A (en) * | 2017-12-05 | 2018-05-15 | 浙江大华技术股份有限公司 | A kind of disk space management method and device |
CN110351386A (en) * | 2019-07-23 | 2019-10-18 | 无锡华云数据技术服务有限公司 | It is a kind of difference copy between increment synchronization method and device |
CN116680114A (en) * | 2023-08-04 | 2023-09-01 | 浙江鹏信信息科技股份有限公司 | LVM fault data quick recovery method, system and computer readable storage medium |
-
2012
- 2012-12-21 CN CN201210558614.2A patent/CN103885718A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105553722A (en) * | 2015-12-16 | 2016-05-04 | 深圳市迪菲特科技股份有限公司 | Timestamp-based data exchange method, device and system |
CN105553722B (en) * | 2015-12-16 | 2019-01-08 | 深圳市迪菲特科技股份有限公司 | A kind of method for interchanging data based on timestamp, apparatus and system |
CN108037894A (en) * | 2017-12-05 | 2018-05-15 | 浙江大华技术股份有限公司 | A kind of disk space management method and device |
CN108037894B (en) * | 2017-12-05 | 2021-07-20 | 浙江大华技术股份有限公司 | Disk space management method and device |
CN110351386A (en) * | 2019-07-23 | 2019-10-18 | 无锡华云数据技术服务有限公司 | It is a kind of difference copy between increment synchronization method and device |
CN110351386B (en) * | 2019-07-23 | 2022-09-16 | 华云工业互联网有限公司 | Increment synchronization method and device between different copies |
CN116680114A (en) * | 2023-08-04 | 2023-09-01 | 浙江鹏信信息科技股份有限公司 | LVM fault data quick recovery method, system and computer readable storage medium |
CN116680114B (en) * | 2023-08-04 | 2023-10-31 | 浙江鹏信信息科技股份有限公司 | LVM fault data quick recovery method, system and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7725651B2 (en) | Storage system and data management method | |
US10678663B1 (en) | Synchronizing storage devices outside of disabled write windows | |
CN102792276B (en) | Buffer disk in flashcopy cascade | |
TWI556104B (en) | Techniques to perform power fail-safe caching without atomic metadata | |
US7409510B2 (en) | Instant virtual copy to a primary mirroring portion of data | |
US8464010B2 (en) | Apparatus and method for data backup | |
US8775861B1 (en) | Non-disruptive storage device migration in failover cluster environment | |
CN100472464C (en) | Data back-up system and method and system load-bearing apparatus | |
CN101441582A (en) | Backup and recovery method of computer data object and system and program product for implementing the same | |
US10747624B2 (en) | Storage system and control method of storage system using asynchronous remote copying to backup volume at specific time points | |
CN103885718A (en) | Mirror disk increment synchronizing method based on lvm | |
US7979396B1 (en) | System and method for performing consistent resynchronization between synchronized copies | |
CN106776147A (en) | A kind of variance data backup method and variance data back-up device | |
US9053073B1 (en) | Use of timestamp logic in synchronous replication | |
CN110945472B (en) | System and method for redundant array data alignment | |
US9256372B2 (en) | Storage device and method of controlling storage device | |
US7496724B2 (en) | Load balancing in a mirrored storage system | |
US7937548B2 (en) | System and method for improved snapclone performance in a virtualized storage system | |
CN103843309A (en) | Data synchronizing method and data synchronizing system | |
CN101169705B (en) | Method for implementing file class mirror-image under multiple hard disk based on nude file system | |
CN102968358A (en) | Quick recovery method of soft RAID1 deployment system | |
CN110531925B (en) | Data reading method and device, electronic equipment and machine-readable storage medium | |
US20090132615A1 (en) | Storage system, storage device and data updating method | |
CN106802839A (en) | A kind of virtual-machine data guard method driven based on block | |
CN112119380A (en) | Parity recording with bypass |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140625 |