CN104850469A - Method for realizing data backup recovery and migration in linux system based on LV mirror image - Google Patents
Method for realizing data backup recovery and migration in linux system based on LV mirror image Download PDFInfo
- Publication number
- CN104850469A CN104850469A CN201510238366.7A CN201510238366A CN104850469A CN 104850469 A CN104850469 A CN 104850469A CN 201510238366 A CN201510238366 A CN 201510238366A CN 104850469 A CN104850469 A CN 104850469A
- Authority
- CN
- China
- Prior art keywords
- mirror image
- dev
- linux system
- migration
- lvm
- 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
- 238000000034 method Methods 0.000 title claims abstract description 13
- 238000013508 migration Methods 0.000 title claims abstract description 12
- 230000005012 migration Effects 0.000 title claims abstract description 12
- 238000011084 recovery Methods 0.000 title abstract 2
- 238000005516 engineering process Methods 0.000 claims abstract description 7
- 238000007726 management method Methods 0.000 description 7
- 238000005192 partition Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for realizing data backup recovery and migration in a linux system based on an LV mirror image. The method realizes the online migration of the data among different PVs through the LVM mirror image technology, so that the data can be managed on the linux platform more conveniently, flexibly and safely.
Description
Technical field
The present invention relates to Linux system data technique field, relate to server Linux system O&M, disk management, online data is moved, be specifically related to a kind of method realizing data backup restoration and migration in Linux system based on LV mirror image, safeguards system data security, is managed by LV, realize data to roll up in Different Logic, and then realize online data to move on different memory devices.
Background technology
At informationalized large data age, server, in industry-by-industry data processing and in storing, act as vital role.Linux system, as the current operating system the most general at server industries, carries the crucial responsibility to data management.In the face of the huge data of enterprise, there is higher requirement for the security of the management of system space and disk and dirigibility.Under zero prerequisite of shutting down, for the management of the capacity of the fdisk of system assignment, relative difficult.Logical volume management mechanism provides perfect solution.
LVM is the abbreviation of Logical Disk volume management (LogicalVolumeManager), and it is that LVM is the logical layer be based upon on hard disk and subregion, improves the dirigibility of disk partition management to the one mechanism that disk partition manages under Linux environment.Can light hyperdisk subregion by LVM system manager, as: several disk partition being connected is the volume group (volumegroup) of a monoblock, forms a storage pool.Keeper arbitrarily can create logical volume group (logicalvolumes) in volume group, and in logical volume group, creates file system further.Keeper can adjust the size of storage volume group easily by LVM, and can the mode of disk storage according to group be named, manages and be distributed, such as define according to use: " development " and " sales ", instead of use Physical disk name " sda " and " sdb ".And with the addition of new disk when system, just will the file of disk do not moved to make full use of new storage space on new disk by LVM keeper, but directly extended file system crosses over disk.
A physical disks (or a lun) is exactly a pv, has several physical disks just to have several pv.One or several hard disks can form a vg, and a system can comprise several vg, such as rootvg, datavg etc., and PV forms VG, and VG divides LV.LV just can be mounted to below a catalogue that you want to be mounted to, after lv is mounted to catalogue, operates this catalogue and operates this lv exactly.
Summary of the invention
The technical problem to be solved in the present invention is: the invention provides in Linux system, by LVM mirror image technology, realize, by the data in a PV, backuping in LVM image file, and then recover and move in another PV, with new backup or replace original PV.
The technical solution adopted in the present invention is:
A method for data backup restoration and migration in Linux system is realized, in Linux system, by LVM mirror image technology based on LV mirror image, by the data in a PV, backup in LVM image file, and then recover and move in another PV, with new backup or replace original PV.
By in Linux system/online data of dev/sda moves to/dev/sdd in, concrete implementation step is as follows:
Pv/dev/sda is there is, input volume group vg0 in system;
1) three PV is created;
2) newly-built three PV are added same VG;
3) LVM mirror image/dev/vg0/mirror0 is created;
4) LVM mirror image carry is formatd;
5) original pv/dev/sda is destroyed;
6) carry mirror image LV again, still can use;
7) original pv/dev/sda is removed;
8) mirror image data is returned to/dev/sdd;
9) equipment state is checked.
Another PV described is other logical volumes existed in system.
Another PV described is the logical volume in the new disk unit added.
Beneficial effect of the present invention is:
The inventive method, by LVM mirror image technology, realizes the online migration of data between different PV, makes the management of data on linux platform, more convenient, flexible and safety.
Embodiment
Below in conjunction with embodiment, the present invention is further described:
A method for data backup restoration and migration in Linux system is realized, in Linux system, by LVM mirror image technology based on LV mirror image, by the data in a PV, backup in LVM image file, and then recover and move in another PV, with new backup or replace original PV.
By in Linux system/online data of dev/sda moves to/dev/sdd in, concrete implementation step and code as follows:
Pv/dev/sda is there is, input volume group vg0 in system
1) three PV is created
pvcreate /dev/sdb
pvcreate /dev/sdc
pvcreate /dev/sdd
2) newly-built three PV are added same VG
vgextend vg0 /dev/sdb
vgextend vg0 /dev/sdc
vgextend vg0 /dev/sdd
3) LVM mirror image/dev/vg0/mirror0 is created
lvcreate -L 1000M -m1 -n mirror vg0 /dev/sda /dev/sdb /dev/sdc
Check LVM mirrored state
lvdisplay /dev/vg0/mirror0
Check LVM equipment state
lvs –a –o +device
4) LVM mirror image carry is formatd
mkfs.ext3 /dev//vg0/mirror0
mount /dev/vg0/mirror0 /mnt
5) original pv/dev/sda is destroyed
dd if=/dev/zero of=/dev/sda count=10
Check/dev/sda state is the unknown
lvs -a -o +devices
lvscan
6) carry mirror image LV again, still can use
umount /mnt
mount /dev/vg0/mirror0 /mnt
cd /mnt
7) original pv/dev/sda is removed
Vgreduce –removemissing –froce vg0
8) mirror image data is returned to/dev/sdd
lvconvert –m1 /dev/vg0/mirror0 /dev/sdd /dev/sdb /dev/sdc
9) equipment state is checked
lvs –a –o +device
lvdisplay /dev/vg0/mirror
Another PV described is other logical volumes existed in system.
Another PV described is the logical volume in the new disk unit added.
Above embodiment is only for illustration of the present invention; and be not limitation of the present invention; the those of ordinary skill of relevant technical field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all equivalent technical schemes also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.
Claims (4)
1. one kind realizes the method for data backup restoration and migration in Linux system based on LV mirror image, it is characterized in that: in Linux system, by LVM mirror image technology, by the data in a PV, backup in LVM image file, and then recover and move in another PV, with new backup or replace original PV.
2. the method realizing data backup restoration and migration in Linux system based on LV mirror image according to claim 1, is characterized in that: by Linux system/online data of dev/sda moves to/dev/sdd in, concrete implementation step is as follows:
Pv/dev/sda is there is, input volume group vg0 in system;
1) three PV is created;
2) newly-built three PV are added same VG;
3) LVM mirror image/dev/vg0/mirror0 is created;
4) LVM mirror image carry is formatd;
5) original pv/dev/sda is destroyed;
6) carry mirror image LV again, still can use;
7) original pv/dev/sda is removed;
8) mirror image data is returned to/dev/sdd;
9) equipment state is checked.
3. the method realizing data backup restoration and migration in Linux system based on LV mirror image according to claim 1 and 2, is characterized in that: another PV described is other logical volumes existed in system.
4. the method realizing data backup restoration and migration in Linux system based on LV mirror image according to claim 1 and 2, is characterized in that: another PV described is the logical volume in the new disk unit added.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510238366.7A CN104850469A (en) | 2015-05-12 | 2015-05-12 | Method for realizing data backup recovery and migration in linux system based on LV mirror image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510238366.7A CN104850469A (en) | 2015-05-12 | 2015-05-12 | Method for realizing data backup recovery and migration in linux system based on LV mirror image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104850469A true CN104850469A (en) | 2015-08-19 |
Family
ID=53850124
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510238366.7A Pending CN104850469A (en) | 2015-05-12 | 2015-05-12 | Method for realizing data backup recovery and migration in linux system based on LV mirror image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104850469A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017049828A1 (en) * | 2015-09-25 | 2017-03-30 | 中兴通讯股份有限公司 | Method, device and system for data processing based on linux |
CN110618897A (en) * | 2019-08-23 | 2019-12-27 | 苏州浪潮智能科技有限公司 | VGDA (virtual volume data acquisition) information-based VG data recovery method |
CN113031879A (en) * | 2021-05-24 | 2021-06-25 | 广东睿江云计算股份有限公司 | Cluster storage method based on LVM logic |
CN113391952A (en) * | 2021-06-07 | 2021-09-14 | 北京同创永益科技发展有限公司 | Automatic backup method based on LVM snapshot in cloud native environment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101650680A (en) * | 2009-07-27 | 2010-02-17 | 浪潮电子信息产业股份有限公司 | Continuous data protection method based on continuous snapshots |
US20110179082A1 (en) * | 2004-02-06 | 2011-07-21 | Vmware, Inc. | Managing concurrent file system accesses by multiple servers using locks |
CN103440111A (en) * | 2013-08-05 | 2013-12-11 | 北京京东尚科信息技术有限公司 | Method for expanding disk space of virtual machines, host machines and platform |
CN104023058A (en) * | 2014-06-03 | 2014-09-03 | 浙江宇视科技有限公司 | Method and system for managing and allocating storage resources |
-
2015
- 2015-05-12 CN CN201510238366.7A patent/CN104850469A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110179082A1 (en) * | 2004-02-06 | 2011-07-21 | Vmware, Inc. | Managing concurrent file system accesses by multiple servers using locks |
CN101650680A (en) * | 2009-07-27 | 2010-02-17 | 浪潮电子信息产业股份有限公司 | Continuous data protection method based on continuous snapshots |
CN103440111A (en) * | 2013-08-05 | 2013-12-11 | 北京京东尚科信息技术有限公司 | Method for expanding disk space of virtual machines, host machines and platform |
CN104023058A (en) * | 2014-06-03 | 2014-09-03 | 浙江宇视科技有限公司 | Method and system for managing and allocating storage resources |
Non-Patent Citations (1)
Title |
---|
常常去怀念: "lvm磁盘镜像同步备份:实现LVM镜像的详细方法与步骤", 《HTTP://BLOG.CSDN.NET/ZHANYUANLIN/ARTICLE/DETAILS/8486003》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017049828A1 (en) * | 2015-09-25 | 2017-03-30 | 中兴通讯股份有限公司 | Method, device and system for data processing based on linux |
CN106557384A (en) * | 2015-09-25 | 2017-04-05 | 中兴通讯股份有限公司 | Based on the data processing method of Linux, device and system |
CN106557384B (en) * | 2015-09-25 | 2020-10-02 | 南京中兴软件有限责任公司 | Data processing method, device and system based on Linux |
CN110618897A (en) * | 2019-08-23 | 2019-12-27 | 苏州浪潮智能科技有限公司 | VGDA (virtual volume data acquisition) information-based VG data recovery method |
CN110618897B (en) * | 2019-08-23 | 2023-01-06 | 苏州浪潮智能科技有限公司 | VGDA (virtual volume data acquisition) information-based VG data recovery method |
CN113031879A (en) * | 2021-05-24 | 2021-06-25 | 广东睿江云计算股份有限公司 | Cluster storage method based on LVM logic |
CN113391952A (en) * | 2021-06-07 | 2021-09-14 | 北京同创永益科技发展有限公司 | Automatic backup method based on LVM snapshot in cloud native environment |
CN113391952B (en) * | 2021-06-07 | 2022-03-11 | 北京同创永益科技发展有限公司 | Automatic backup method based on LVM snapshot in cloud native environment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9600192B2 (en) | Managing metadata and data for a logical volume in a distributed and declustered system | |
US10394467B2 (en) | Flexible deployment and migration of virtual machines | |
AU2014318053B2 (en) | Systems and methods for protecting virtual machine data | |
US9678680B1 (en) | Forming a protection domain in a storage architecture | |
EP2387751B1 (en) | Apparatus and method for data backup | |
CN104216793B (en) | Application Backup, the method and apparatus recovered | |
US10140144B2 (en) | Multi-site disaster recovery consistency group for heterogeneous systems | |
CN104850469A (en) | Method for realizing data backup recovery and migration in linux system based on LV mirror image | |
CN111752759A (en) | Kafka cluster fault recovery method, device, equipment and medium | |
US20150186070A1 (en) | Migrating high activity volumes in a mirror copy relationship to lower activity volume groups | |
US20170300243A1 (en) | Efficient asynchronous mirror copy of thin-provisioned volumes | |
EP3398046A1 (en) | Systems and methods for backing up large distributed scale-out data systems | |
US10248619B1 (en) | Restoring a virtual machine from a copy of a datastore | |
US10976941B2 (en) | Validation of storage volumes that are in a peer to peer remote copy relationship | |
EP3891640B1 (en) | Systems and methods for controlling access to information stored in an information retention system | |
US20180052621A1 (en) | Efficient asynchronous mirror copy of fully provisioned volumes to thin-provisioned volumes | |
US11175999B2 (en) | Management of backup volume extents via a tiered storage mechanism | |
US11176003B2 (en) | Restoration of data when point in time copy operations are performed during asynchronous copy | |
US10606506B2 (en) | Releasing space allocated to a space efficient target storage in a copy relationship with a source storage | |
WO2014111773A1 (en) | Data backup recovery | |
US10002050B1 (en) | Systems and methods for improving rehydration performance in data deduplication systems | |
US9223513B2 (en) | Accessing data in a dual volume data storage system using virtual identifiers | |
US10691549B2 (en) | System managed facilitation of backup of dataset before deletion | |
US11775395B2 (en) | Withdrawing a point-in-time snapshot copy operation within a data consistency application | |
US10740203B2 (en) | Aggregation of updated tracks to be copied to a backup volume for physically contiguous storage on a RAID stride |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150819 |
|
RJ01 | Rejection of invention patent application after publication |