CN105068894A - Method and device for achieving high availability of Linux system storage device on basis of LVM mirror image - Google Patents

Method and device for achieving high availability of Linux system storage device on basis of LVM mirror image Download PDF

Info

Publication number
CN105068894A
CN105068894A CN201510574037.XA CN201510574037A CN105068894A CN 105068894 A CN105068894 A CN 105068894A CN 201510574037 A CN201510574037 A CN 201510574037A CN 105068894 A CN105068894 A CN 105068894A
Authority
CN
China
Prior art keywords
mirror image
volume
lvm
unknown
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
Application number
CN201510574037.XA
Other languages
Chinese (zh)
Inventor
邢天明
杜彦魁
陈良华
张明明
李建磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510574037.XA priority Critical patent/CN105068894A/en
Publication of CN105068894A publication Critical patent/CN105068894A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention provides a method and device for achieving the high availability of a Linux system storage device on the basis of an LVM mirror image. The storage device comprises at least two shared magnetic disks with the same storage data. The method includes the steps of establishing data volumes with the same capacity and storage data for all the shared magnetic disks respectively, establishing a journal volume for a local magnetic disk, backing up all the data volumes and the journal volume into the LVM mirror image, deleting an unknown data volume and establishing a new data volume in the unknown shared magnetic disk when detecting the existence of the unknown mirror image data volume, recovering storage data in the unknown data volume into the new data volume through the LVM mirror image technology, and replacing the unknown data volume with the new data volume. The single-point failure problem is effectively solved, data in the shared magnetic disks can be recovered and reused rapidly, the failure disposal and data recovery difficulty is lowered, the redundancy of important service data on the bottom layer is ensured, the continuity of service of the upper layer is ensured, the high availability of the storage device is achieved, and meanwhile hardware cost is saved.

Description

The method and apparatus of linux system memory device High Availabitity is realized based on LVM mirror image
Technical field
The present invention relates in linux system and stores High availability field, particularly relates to a kind of method and apparatus realizing linux system memory device High Availabitity based on LVM mirror image.
Background technology
At present, single shared disk is adopted to store data in linux system, when this single shared disk sends fault, the loss of data that will cause because this single disk failure is unavailable, there is Single Point of Faliure problem, and comparatively large to the difficulty of fault handling and date restoring, the redundancy of bottom important business data cannot be ensured, and then ensure the continuity of upper-layer service.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus realizing linux system memory device High Availabitity based on LVM mirror image, single shared disk is adopted to store data to solve linux system in prior art, when this single shared disk sends fault, the loss of data that will cause because this single disk failure is unavailable, greatly reduce the difficulty of fault handling and date restoring, the redundancy of bottom important business data cannot be ensured, and then be the successional problem of upper-layer service.
For achieving the above object, the embodiment of the present invention provides following technical scheme:
Realize a method for memory device High Availabitity in linux system based on LVM mirror image, described memory device comprises at least 2 and stores the identical shared disk of data, comprising:
For each described shared disk all sets up a book, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and adds in same volume group by all described book and described daily record volume;
By LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtain mirror image data volume and mirror image daily record volume respectively;
Detect the state of described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, set up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.
Wherein, described is also comprise before each described shared disk all sets up a book:
Each described shared disk all divides a logic magnetic disc, and the capacity of each described logic magnetic disc is identical with storage data;
All described logic magnetic discs are all mapped on the same node of same server;
Scan the optical fiber port of described server or restart the described node of described server, described server is identified all described logic magnetic discs.
Wherein, also comprise after making described server identify all described logic magnetic discs described in:
Judge whether described server identifies all described logic magnetic discs;
If not, then again scan the optical fiber port of described server or again restart the described node of described server, until all described logic magnetic discs of described server identification.
Wherein, describedly all set up a book and be for each described shared disk: for each described logic magnetic disc all sets up a book.
Wherein, described for local disk set up a storing daily record daily record volume comprise:
The logic magnetic disc of predetermined volumes is divided in described local disk;
Logic magnetic disc for described predetermined volumes sets up daily record volume.
Wherein, described according to LVM mirror image technology, by all described book and daily record volume in storing data backup in LVM mirror image, obtain respectively mirror image data volume and mirror image daily record roll up comprise:
LVM mirror image is created in described volume group;
Format described LVM mirror image and described LVM mirror image is mounted in predetermined local directory.
Wherein, described by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume and comprises:
Described new data volume is added in described volume group;
According to described daily record volume, data in described unknown shared disk are recovered, make described new data volume store data inside identical with other book store data inside.
Realize a device for memory device High Availabitity in linux system based on LVM mirror image, described memory device comprises at least 2 shared disks, comprising: set up module, backup module and detection module; Wherein,
Describedly set up module, for all setting up a book for each described shared disk, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and adds in same volume group by all described book and described daily record volume;
Described backup module, for by LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtains mirror image data volume and mirror image daily record volume respectively;
Described detection module, for detecting the state of described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, sets up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.
Wherein, the described device realizing memory device High Availabitity in linux system based on LVM mirror image also comprises: carry identification module, and for all dividing a logic magnetic disc on each described shared disk, the capacity of each described logic magnetic disc is identical with storage data; All described logic magnetic discs are all mapped on the same node of same server; Scan the optical fiber port of described server or restart the described node of described server, described server is identified all described logic magnetic discs.
Wherein, described backup module comprises: creating unit and carry unit; Wherein,
Described creating unit, for creating LVM mirror image in described volume group;
Described carry unit, for formaing described LVM mirror image and being mounted in predetermined local directory by described LVM mirror image.
Based on technique scheme, the method and apparatus realizing memory device High Availabitity in linux system based on LVM mirror image that the embodiment of the present invention provides, described memory device comprises at least 2 and stores the identical shared disk of data, wherein method comprises for each described shared disk all sets up a book, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and all described book and described daily record volume are added in same volume group; By LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtain mirror image data volume and mirror image daily record volume respectively; Detect the state of described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, set up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.Memory device comprises at least 2 shared disks, the storage data of each shared disk are identical, when the current shared disk fault used, other shared disk can be used immediately to access the data of needs, different mirror image data disks is distributed to different memory devices simultaneously, achieve redundancy and the hardware isolated of hardware view data, efficiently solve Single Point of Faliure problem; Simultaneously, use LVM mirror image technology, when detecting that in a certain shared disk, data break down unavailable, rapidly date restoring in this shared disk can be able to be used, reduce the difficulty of fault handling and date restoring, ensure the redundancy of bottom important business data, and then ensure that the continuity of upper-layer service, achieve the high availability of memory device; In addition, use LVM mirror image technology, do not need the independent purchase of equipment that goes to solve High Availabitity and the Single Point of Faliure problem of storage, save hardware cost.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
Fig. 1 provides the method flow diagram realizing memory device High Availabitity in linux system based on LVM mirror image for the embodiment of the present invention;
Fig. 2 realizes in the method for memory device High Availabitity in linux system as each shared disk all sets up the method flow diagram of a book based on LVM mirror image for the embodiment of the present invention provides;
What Fig. 3 provided for the embodiment of the present invention realizes in the method for memory device High Availabitity in linux system as local disk sets up the method flow diagram of a daily record volume based on LVM mirror image;
Fig. 4 realizes obtaining the method flow diagram that mirror image data is rolled up and mirror image daily record is rolled up in the method for memory device High Availabitity in linux system based on LVM mirror image for the embodiment of the present invention provides;
Fig. 5 realizes in the method for memory device High Availabitity in linux system, unknown data being rolled up the method flow diagram that store data inside returns to new data volume based on LVM mirror image for the embodiment of the present invention provides;
Fig. 6 provides the system chart of the device realizing memory device High Availabitity in linux system based on LVM mirror image for the embodiment of the present invention;
Fig. 7 provides another system chart realizing the device of memory device High Availabitity in linux system based on LVM mirror image for the embodiment of the present invention;
Fig. 8 provides the structured flowchart realizing backup module in the device of memory device High Availabitity in linux system based on LVM mirror image for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
The method flow diagram realizing memory device High Availabitity in linux system based on LVM mirror image that Fig. 1 provides for the embodiment of the present invention, memory device comprises at least 2 shared disks, the storage data of each shared disk are identical, efficiently solve Single Point of Faliure problem, simultaneously, use LVM mirror image technology, when detecting that in a certain shared disk, data break down unavailable, rapidly date restoring in this shared disk can be able to be used, reduce the difficulty of fault handling and date restoring, ensure the redundancy of bottom important business data, and then ensure that the continuity of upper-layer service, achieve the high availability of memory device, in addition, use LVM mirror image technology, the independent purchase of equipment that goes is not needed to solve High Availabitity and the Single Point of Faliure problem of storage, save hardware cost, with reference to Fig. 1, this method realizing memory device High Availabitity in linux system based on LVM mirror image can comprise:
Step S100: for each described shared disk all sets up a book, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and adds in same volume group by all described book and described daily record volume;
Optionally, also have before all setting up a book for each shared disk and each shared disk is mapped on server node, wherein, each shared disk all should be mapped on the same node of same server.
Optionally, can by all dividing a capacity identity logic disk on each shared disk, make the storage data of each logic magnetic disc all identical, then all logic magnetic discs are all mapped on the same node of same server, for each logic magnetic disc all sets up a book, be embodied as each shared disk and all set up a book.
Optionally, after on the same node all shared disks or all logic magnetic discs being all mapped to same server, by scanning the optical fiber port of this server or restarting this node of this server, this server is identified to all shared disks or all logic magnetic discs.
Optionally, after making server identify all shared disks or all logic magnetic discs, can also judge whether this server recognizes all described logic magnetic discs; If no, then again scan the optical fiber port of this server or again restart this node of this server, until all shared disks of this server identification or all logic magnetic discs.
Optionally, can by dividing the logic magnetic disc of predetermined volumes in local disk, the logic magnetic disc for this predetermined volumes sets up daily record volume, and be embodied as local disk and set up a daily record volume, this daily record volume is used for storing daily record.
Step S110: by LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtains mirror image data volume and mirror image daily record volume respectively;
Optionally, by creating LVM mirror image in volume group, then can format this LVM mirror image and this LVM mirror image be mounted in predetermined local directory, by the storing data backup in all book and daily record volume in LVM mirror image.
Step S120: the state detecting described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, set up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.
Optionally, by the new data of foundation volume is added in volume group, then according to daily record volume, data in this unknown shared disk can be recovered, make this new data volume store data inside identical with other book store data inside.
Passable, the state that statement " lvs-a-o+devices " detects LVM mirror image can be passed through, when certain mirror image data volume display state is " ukown ", namely during the unknown, determine to there is unknown mirror image data volume.
Optionally, if the name that the volume group added is rolled up in all book and daily record is called gv0, statement " vgreduce--removemissing--forcevg0 " can be passed through and the unknown data in volume group gv0 is involved in row deletion.
Based on technique scheme, the method and apparatus realizing memory device High Availabitity in linux system based on LVM mirror image that the embodiment of the present invention provides, described memory device comprises at least 2 and stores the identical shared disk of data, wherein method comprises for each described shared disk all sets up a book, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and all described book and described daily record volume are added in same volume group; By LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtain mirror image data volume and mirror image daily record volume respectively; Detect the state of described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, set up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.Memory device comprises at least 2 shared disks, the storage data of each shared disk are identical, when the current shared disk fault used, other shared disk can be used immediately to access the data of needs, different mirror image data disks is distributed to different memory devices simultaneously, achieve redundancy and the hardware isolated of hardware view data, efficiently solve Single Point of Faliure problem; Simultaneously, use LVM mirror image technology, when detecting that in a certain shared disk, data break down unavailable, rapidly date restoring in this shared disk can be able to be used, reduce the difficulty of fault handling and date restoring, ensure the redundancy of bottom important business data, and then ensure that the continuity of upper-layer service, achieve the high availability of memory device; In addition, use LVM mirror image technology, do not need the independent purchase of equipment that goes to solve High Availabitity and the Single Point of Faliure problem of storage, save hardware cost.
Optionally, what Fig. 2 showed that the embodiment of the present invention provides realizes in the method for memory device High Availabitity in linux system as each shared disk all sets up the method flow diagram of a book based on LVM mirror image, with reference to Fig. 2, this method all setting up a book for each shared disk can comprise:
Step S200: all divide a logic magnetic disc on each described shared disk, the capacity of each described logic magnetic disc is identical with storage data;
Identical for ensureing the capacity of each book, first can all divide the identical logic magnetic disc of a capacity on each shared disk, for this logic magnetic disc sets up a book.
Step S210: all described logic magnetic discs are all mapped on the same node of same server;
Step S220: scan the optical fiber port of described server or restart the described node of described server, makes described server identify all described logic magnetic discs;
Step S230: judge whether described server identifies all described logic magnetic discs;
Step S240: if not, then again scan the optical fiber port of described server or again restart the described node of described server, until all described logic magnetic discs of described server identification, enters step S250;
If server fails to identify all described logic magnetic discs, then again scan the optical fiber port of described server or again restart the node of server, until all described logic magnetic discs of server identification.
Step S250: for each described logic magnetic disc all sets up a book.
When until server identification all described logic magnetic disc time, can all set up a book by each logic magnetic disc, realize each shared disk and all set up a book.
Optionally, what Fig. 3 showed that the embodiment of the present invention provides realizes in the method for memory device High Availabitity in linux system as local disk sets up the method flow diagram of a daily record volume based on LVM mirror image, with reference to Fig. 3, this method setting up a daily record volume for local disk can comprise:
Step S300: the logic magnetic disc dividing predetermined volumes in described local disk;
Optionally, described predetermined volumes can be 1G.
Step S310: the logic magnetic disc for described predetermined volumes sets up daily record volume.
Optionally, Fig. 4 shows the embodiment of the present invention and provides the method flow diagram realizing obtaining in the method for memory device High Availabitity in linux system mirror image data volume and mirror image daily record volume based on LVM mirror image, with reference to Fig. 4, this method obtaining mirror image data volume and mirror image daily record volume can comprise:
Step S400: create LVM mirror image in described volume group;
Optionally, if memory device is 2 shared disks, book called after pv0 and pv1 respectively that these 2 shared disks are set up, the daily record volume called after pv2 that local disk is set up, it is gv0 that the volumegroup name added is rolled up in book and daily record, then in volume group gv0, set up LVM mirror image by statement " lvcreate-L1G-m1-nmirrorvg0pv0pv1pv2 ", by this LVM mirror image called after mirror.
Step S410: format described LVM mirror image and described LVM mirror image is mounted in predetermined local directory.
Optionally, statement " mkfs.ext3/dev/vg0/mirror " can be passed through to format LVM mirror image mirror.
Optionally, after LVM mirror image mirror is formatd, statement " mount/dev/vg0/mirror/mnt " can be passed through LVM mirror image mirror is mounted in predetermined local directory mnt.
This LVM mirror image is also mounted to after in predetermined local directory by format LVM mirror image, just normally can use this LVM mirror image, now, this LVM mirror image comprises the backup in all book and daily record volume, the backup of book in LVM mirror image can be called that mirror image data is rolled up, the backup of daily record volume in LVM mirror image is called that mirror image daily record is rolled up.
Optionally, Fig. 5 shows the embodiment of the present invention and provides and realize being rolled up by unknown data in the method for memory device High Availabitity in linux system based on LVM mirror image the method flow diagram that store data inside returns to new data volume, with reference to Fig. 5, unknown data is rolled up the method that store data inside returns to new data volume and can be comprised by this:
Step S500: described new data volume is added in described volume group;
Optionally, if the new data file label set up is called pv3, then can passes through statement " vgextendvg0/dev/vg0/pv3 " and new data be rolled up pv3 and add in volume group vg0.
Step S510: recover data in described unknown shared disk according to described daily record volume, makes described new data volume store data inside identical with other book store data inside.
Optionally, statement " lvconvert-m1/dev/vg0/morror/dev/vg0/pv3/dev/vg0/pv2 " can be passed through to recover data in unknown shared disk.
The embodiment of the present invention provides the method realizing memory device High Availabitity in linux system based on LVM mirror image, memory device comprises at least 2 shared disks, the storage data of each shared disk are identical, efficiently solve Single Point of Faliure problem, simultaneously, use LVM mirror image technology, rapidly date restoring in this shared disk can be able to be used, reduce the difficulty of fault handling and date restoring, ensure the redundancy of bottom important business data, and then ensure that the continuity of upper-layer service, achieve the high availability of memory device, the independent purchase of equipment that goes is not needed to solve High Availabitity and the Single Point of Faliure problem of storage, save hardware cost.
Below the device realizing memory device High Availabitity in linux system based on LVM mirror image that the embodiment of the present invention provides is introduced, the device realizing memory device High Availabitity in linux system based on LVM mirror image described below with above-described realize the method for memory device High Availabitity in linux system based on LVM mirror image can mutual corresponding reference.
Fig. 6 provides the system chart of the device realizing memory device High Availabitity in linux system based on LVM mirror image for the embodiment of the present invention, memory device comprises at least 2 shared disks, with reference to Fig. 6, this device realizing memory device High Availabitity in linux system based on LVM mirror image can comprise: set up module 100, backup module 200 and detection module 300; Wherein,
Set up module 100, for all setting up a book for each described shared disk, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and adds in same volume group by all described book and described daily record volume;
Backup module 200, for by LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtains mirror image data volume and mirror image daily record volume respectively;
Detection module 300, for detecting the state of described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, sets up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.
Optionally, Fig. 7 shows the embodiment of the present invention and provides another system chart realizing the device of memory device High Availabitity in linux system based on LVM mirror image, with reference to Fig. 7, this device realizing memory device High Availabitity in linux system based on LVM mirror image can also comprise: carry identification module 400.
Carry identification module 400, for all dividing a logic magnetic disc on each described shared disk, the capacity of each described logic magnetic disc is identical with storage data; All described logic magnetic discs are all mapped on the same node of same server; Scan the optical fiber port of described server or restart the described node of described server, described server is identified all described logic magnetic discs.
Optionally, Fig. 8 shows the embodiment of the present invention and provides the structured flowchart realizing backup module 200 in the device of memory device High Availabitity in linux system based on LVM mirror image, and with reference to Fig. 8, this backup module 200 can comprise: creating unit 210 and carry unit 220; Wherein,
Creating unit 210, for creating LVM mirror image in described volume group;
Carry unit 220, for formaing described LVM mirror image and being mounted in predetermined local directory by described LVM mirror image.
The embodiment of the present invention provides the device realizing memory device High Availabitity in linux system based on LVM mirror image, memory device comprises at least 2 shared disks, the storage data of each shared disk are identical, efficiently solve Single Point of Faliure problem, simultaneously, use LVM mirror image technology, rapidly date restoring in this shared disk can be able to be used, reduce the difficulty of fault handling and date restoring, ensure the redundancy of bottom important business data, and then ensure that the continuity of upper-layer service, achieve the high availability of memory device, the independent purchase of equipment that goes is not needed to solve High Availabitity and the Single Point of Faliure problem of storage, save hardware cost.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For device disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. realize a method for memory device High Availabitity in linux system based on LVM mirror image, it is characterized in that, described memory device comprises at least 2 and stores the identical shared disk of data, comprising:
For each described shared disk all sets up a book, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and adds in same volume group by all described book and described daily record volume;
By LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtain mirror image data volume and mirror image daily record volume respectively;
Detect the state of described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, set up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.
2. method according to claim 1, is characterized in that, described is also comprise before each described shared disk all sets up a book:
Each described shared disk all divides a logic magnetic disc, and the capacity of each described logic magnetic disc is identical with storage data;
All described logic magnetic discs are all mapped on the same node of same server;
Scan the optical fiber port of described server or restart the described node of described server, described server is identified all described logic magnetic discs.
3. method according to claim 2, is characterized in that, described in described server is identified all described logic magnetic discs after also comprise:
Judge whether described server identifies all described logic magnetic discs;
If not, then again scan the optical fiber port of described server or again restart the described node of described server, until all described logic magnetic discs of described server identification.
4. method according to claim 2, is characterized in that, describedly all sets up a book and is for each described shared disk: for each described logic magnetic disc all sets up a book.
5. method according to claim 1, is characterized in that, described for local disk set up a storing daily record daily record volume comprise:
The logic magnetic disc of predetermined volumes is divided in described local disk;
Logic magnetic disc for described predetermined volumes sets up daily record volume.
6. method according to claim 1, is characterized in that, described according to LVM mirror image technology, by all described book and daily record volume in storing data backup in LVM mirror image, obtain respectively mirror image data volume and mirror image daily record roll up comprise:
LVM mirror image is created in described volume group;
Format described LVM mirror image and described LVM mirror image is mounted in predetermined local directory.
7. method according to claim 1, is characterized in that, described by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume and comprises:
Described new data volume is added in described volume group;
According to described daily record volume, data in described unknown shared disk are recovered, make described new data volume store data inside identical with other book store data inside.
8. realize a device for memory device High Availabitity in linux system based on LVM mirror image, it is characterized in that, described memory device comprises at least 2 shared disks, comprising: set up module, backup module and detection module; Wherein,
Describedly set up module, for all setting up a book for each described shared disk, the capacity of each described book is identical with storage data, for local disk sets up the daily record volume of a storing daily record, and adds in same volume group by all described book and described daily record volume;
Described backup module, for by LVM mirror image technology, by the storing data backup in all described book and daily record volume in LVM mirror image, obtains mirror image data volume and mirror image daily record volume respectively;
Described detection module, for detecting the state of described LVM mirror image, unknown mirror image data volume is there is if detect, then determine the unknown data volume that described unknown mirror image data volume is corresponding and unknown shared disk, described unknown data volume is deleted, and in described unknown shared disk, sets up a new data identical with described unknown data Volume Space roll up, by LVM mirror image technology, described unknown data volume store data inside is returned to described new data volume, replaces described unknown data volume with described new data volume.
9. device according to claim 8, is characterized in that, also comprises: carry identification module, and for all dividing a logic magnetic disc on each described shared disk, the capacity of each described logic magnetic disc is identical with storage data; All described logic magnetic discs are all mapped on the same node of same server; Scan the optical fiber port of described server or restart the described node of described server, described server is identified all described logic magnetic discs.
10. device according to claim 8, is characterized in that, described backup module comprises: creating unit and carry unit; Wherein,
Described creating unit, for creating LVM mirror image in described volume group;
Described carry unit, for formaing described LVM mirror image and being mounted in predetermined local directory by described LVM mirror image.
CN201510574037.XA 2015-09-10 2015-09-10 Method and device for achieving high availability of Linux system storage device on basis of LVM mirror image Pending CN105068894A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510574037.XA CN105068894A (en) 2015-09-10 2015-09-10 Method and device for achieving high availability of Linux system storage device on basis of LVM mirror image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510574037.XA CN105068894A (en) 2015-09-10 2015-09-10 Method and device for achieving high availability of Linux system storage device on basis of LVM mirror image

Publications (1)

Publication Number Publication Date
CN105068894A true CN105068894A (en) 2015-11-18

Family

ID=54498271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510574037.XA Pending CN105068894A (en) 2015-09-10 2015-09-10 Method and device for achieving high availability of Linux system storage device on basis of LVM mirror image

Country Status (1)

Country Link
CN (1) CN105068894A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108037894A (en) * 2017-12-05 2018-05-15 浙江大华技术股份有限公司 A kind of disk space management method and device
CN109194515A (en) * 2018-09-12 2019-01-11 郑州云海信息技术有限公司 Server cluster system and the method for realizing server cluster system High Availabitity
CN109960602A (en) * 2017-12-26 2019-07-02 中国移动通信集团四川有限公司 Approaches to IM, device, equipment and medium
CN111158586A (en) * 2019-12-09 2020-05-15 杭州宏杉科技股份有限公司 Data reading and writing method and device, electronic equipment and machine-readable storage medium
CN113031879A (en) * 2021-05-24 2021-06-25 广东睿江云计算股份有限公司 Cluster storage method based on LVM logic
CN113407380A (en) * 2021-07-14 2021-09-17 安超云软件有限公司 Method and device for rapidly recovering cross-cluster disaster recovery, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055446A1 (en) * 2007-08-23 2009-02-26 Microsoft Corporation Staged, Lightweight Backup System
CN101866307A (en) * 2010-06-24 2010-10-20 杭州华三通信技术有限公司 Data storage method and device based on mirror image technology
CN103970486A (en) * 2014-05-22 2014-08-06 浪潮(北京)电子信息产业有限公司 Method and system for data storage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055446A1 (en) * 2007-08-23 2009-02-26 Microsoft Corporation Staged, Lightweight Backup System
CN101866307A (en) * 2010-06-24 2010-10-20 杭州华三通信技术有限公司 Data storage method and device based on mirror image technology
CN103970486A (en) * 2014-05-22 2014-08-06 浪潮(北京)电子信息产业有限公司 Method and system for data storage

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
佚名: "LVM磁盘镜像同步备份:实现LVM镜像的详细步骤", 《HTTP://BLOG.SINA.COM.CN/S/BLOG_623630D50101S0XC.HTML》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN109960602A (en) * 2017-12-26 2019-07-02 中国移动通信集团四川有限公司 Approaches to IM, device, equipment and medium
CN109960602B (en) * 2017-12-26 2023-02-10 中国移动通信集团四川有限公司 Information management method, device, equipment and medium
CN109194515A (en) * 2018-09-12 2019-01-11 郑州云海信息技术有限公司 Server cluster system and the method for realizing server cluster system High Availabitity
CN111158586A (en) * 2019-12-09 2020-05-15 杭州宏杉科技股份有限公司 Data reading and writing method and device, electronic equipment and machine-readable storage medium
CN113031879A (en) * 2021-05-24 2021-06-25 广东睿江云计算股份有限公司 Cluster storage method based on LVM logic
CN113407380A (en) * 2021-07-14 2021-09-17 安超云软件有限公司 Method and device for rapidly recovering cross-cluster disaster recovery, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105068894A (en) Method and device for achieving high availability of Linux system storage device on basis of LVM mirror image
CN105068856A (en) Mirror image snapshooting based on virtual machine backup system and backup method
CN106776130B (en) Log recovery method, storage device and storage node
US9817724B2 (en) Efficient FlashCopy backup target volume allocation with reuse and a shared resource pool
US20110191628A1 (en) Computer program, method, and apparatus for controlling data allocation
CN106557266B (en) Method and apparatus for redundant array of independent disks RAID
US9535617B2 (en) Marking a flashcopy backup for collapse without breaking a flashcopy chain
JP2021509989A (en) Resource reservation method, resource reservation device, resource reservation device, and resource reservation system
US9817719B2 (en) Efficient Flashcopy backup and mount, clone, or restore collision avoidance using dynamic volume allocation with reuse and from a shared resource pool
CN111752759A (en) Kafka cluster fault recovery method, device, equipment and medium
WO2020233311A1 (en) Virtual machine backup method and device based on cloud platform data center
US9454315B2 (en) Efficient flashcopy backup target volume allocation from a shared resource pool while ingesting a flashcopy backup in a repository
CN109491832A (en) Data disaster tolerance method and website
CN104035837A (en) Method for backing up isomorphic/isomerous UNIX/Linux host on line
US9542106B2 (en) Efficient repository ingest of a target volume without breaking a flashcopy chain
US9817723B2 (en) Efficient FlashCopy backup and mount, clone, or restore collision avoidance using dynamic volume allocation with reuse
US9507536B2 (en) Creating a stable flashcopy map (FCMAPS) for ingest
US9880776B1 (en) Content-driven data protection method for multiple storage devices
CN109710377B (en) Method for recovering kvm virtual machine from faulty distributed storage
CN104298609A (en) Data copying method and device
CN109165117B (en) Data processing method and system
CN103440179B (en) The continuous store method of storage device configurations information
US9817718B2 (en) Efficient flashcopy backup and mount, clone, or restore collision avoidance using dynamic volume allocation from a shared resource pool
US9600188B2 (en) Collision avoidance using dynamic target volume allocation from a shared resource pool
CN107888430A (en) Virtual Machine Manager operates synchronous method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20151118