CN107391396B - Data partitioning method of snapshot-writable device and snapshot-writable device - Google Patents

Data partitioning method of snapshot-writable device and snapshot-writable device Download PDF

Info

Publication number
CN107391396B
CN107391396B CN201710625184.4A CN201710625184A CN107391396B CN 107391396 B CN107391396 B CN 107391396B CN 201710625184 A CN201710625184 A CN 201710625184A CN 107391396 B CN107391396 B CN 107391396B
Authority
CN
China
Prior art keywords
data
space
write
writable
writable snapshot
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
Application number
CN201710625184.4A
Other languages
Chinese (zh)
Other versions
CN107391396A (en
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201710625184.4A priority Critical patent/CN107391396B/en
Publication of CN107391396A publication Critical patent/CN107391396A/en
Application granted granted Critical
Publication of CN107391396B publication Critical patent/CN107391396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • G06F12/0653Configuration or reconfiguration with centralised address assignment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (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 discloses a data partitioning method of a snapshot-writable device and the snapshot-writable device, wherein the method comprises the following steps: receiving data of a preset logic block address; if the data is the first-write copy data, allocating corresponding space storage data in a first-write copy area in the space of the writable snapshot device, and establishing mapping between the logical block address and the space allocated by the first-write copy area; if the data is the host application write data, distributing corresponding space storage data in a host service area in the space of the writable snapshot device, and establishing mapping between the logical block address and the corresponding space distributed by the host service area; the invention stores the first-write copy data and the host application write data in a partition by utilizing the logic partition in the writable snapshot device, and organizes the mapping of the metadata according to the logic partition, thereby ensuring that the writable snapshot device can store the first-write copy data as a data set at the snapshot time and can also store the host application write data.

Description

Data partitioning method of snapshot-writable device and snapshot-writable device
Technical Field
The invention relates to the technical field of data center disaster recovery, in particular to a data partitioning method of a writable snapshot device and the writable snapshot device.
Background
Snapshot is a disaster recovery technique that involves a fully available copy of a given data set, including an image of the corresponding data at some point in time (the point in time at which the copy began). The snapshot may be a copy of the data it represents or may be a replica of the data.
In the prior art, in the snapshot in the first write copy implementation manner, after a write request is received for the first time after the snapshot is created, data in a corresponding position needs to be read, then stored in other positions, and finally a new write request is written down. Therefore, for the writable snapshot device, if the same position is accessed by the write request of the host application, the write data of the host application can cover the first-write copy data, so that the first-write copy data cannot be completely stored in the data set at the snapshot time. Therefore, how to ensure that the writable snapshot device can store the first-write copy data as the data set at the snapshot time and can also store the host application write data is a problem that needs to be solved urgently today.
Disclosure of Invention
The invention aims to provide a data partitioning method of a writable snapshot device and the writable snapshot device, which are used for storing first-write copy data and host application write data in a partitioned mode by utilizing a logic partition in the writable snapshot device, so that the snapshot performance of a data center is improved, and the competitiveness of the data center is improved.
In order to solve the above technical problem, the present invention provides a data partitioning method for a writable snapshot device, including:
receiving data of a preset logic block address;
if the data is write-first copy data, allocating a corresponding space in a write-first copy area in a space of the writable snapshot device to store the data, and establishing mapping between the logical block address and the space allocated by the write-first copy area;
and if the data is the host application write data, allocating a corresponding space in a host service area in the space of the writable snapshot device to store the data, and establishing mapping between the logical block address and the corresponding space allocated to the host service area.
Optionally, before receiving the data of the preset logical block address, the method further includes:
and logically partitioning the space of the writable snapshot device, and dividing the space of the writable snapshot device into the first write copy area and the host service area.
Optionally, the space of the writable snapshot device is specifically a linear address space.
In addition, the present invention also provides a writable snapshot apparatus, including:
the receiving module is used for receiving data of a preset logic block address;
the first storage module is used for allocating a corresponding space in a first write copy area in a space of a writable snapshot device to store the data and establishing mapping between the logical block address and the corresponding space allocated by the first write copy area if the data is the first write copy data;
and the second storage module is used for allocating a corresponding space in a host service area in the space of the writable snapshot device to store the data and establishing mapping between the logical block address and the corresponding space allocated to the host service area if the data is the host application write data.
Optionally, the apparatus further comprises:
and the partition module is used for logically partitioning the space of the writable snapshot device and dividing the space of the writable snapshot device into the first write copy area and the host service area.
The invention provides a data partitioning method of a writable snapshot device, which comprises the following steps: receiving data of a preset logic block address; if the data is the first-write copy data, allocating corresponding space storage data in a first-write copy area in the space of the writable snapshot device, and establishing mapping between the logical block address and the space allocated by the first-write copy area; if the data is the host application write data, distributing corresponding space storage data in a host service area in the space of the writable snapshot device, and establishing mapping between the logical block address and the corresponding space distributed by the host service area;
therefore, the invention can store the first-write copy data or the host application write data in a partition way by allocating the corresponding space in the first-write copy area or the host service area in the space of the writable snapshot device, and can store the first-write copy data and the host application write data in a partition way by utilizing the logic partition in the writable snapshot device; by establishing mapping of the logical block address and the corresponding space allocated by the first-write copy area or the host service area, mapping of metadata can be organized according to logical partitions, so that the writable snapshot device can store the first-write copy data as a data set at the snapshot time, and can also store host application write data, thereby improving the performance of data center snapshot and improving the competitiveness of a data center. In addition, the invention also provides a writable snapshot device, which also has the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a data partitioning method of a writable snapshot device according to an embodiment of the present invention;
fig. 2 is a data storage diagram illustrating a data partitioning method of a writable snapshot apparatus according to an embodiment of the present invention;
fig. 3 is a block diagram of a writable snapshot apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a data partitioning method of a writable snapshot device according to an embodiment of the present invention. The method can comprise the following steps:
step 101: receiving data of a preset logic block address.
The specific mode of this step may be set by the designer according to the practical scenario and the user requirement, and if a mode similar to the prior art may be adopted, this embodiment does not set any limitation thereto.
Step 102: and if the data is the first-write copy data, allocating corresponding space to store the data in a first-write copy area in the space of the writable snapshot device, and establishing mapping between the logical block address and the space allocated to the first-write copy area.
The space of the writable snapshot device can be a linear address space, and the linear address space can be logically partitioned into a first-write copy area and a host service area; other partitions may also be partitioned. As long as two areas capable of storing the first-write copy data and the host application write data can be divided, the specific dividing manner and the size of the divided space can be set by a designer according to a practical scene and user requirements, and the embodiment is not limited thereto.
Step 103: if the data is the host application write data, allocating corresponding space storage data in a host service area in the space of the writable snapshot device, and establishing mapping between the logical block address and the corresponding space allocated by the host service area.
It is understood that, as shown in fig. 2, after the snapshot (writable snapshot device) is established, when the first-write copy data of the preset logical block address Lba1 is received, the corresponding space p1 is allocated in the first-write copy area to store the first-write copy data, and a mapping of Lba1- > p1 is established in step 102 and step 103. Similarly, when the host application writes data to the Lba1, the host application write data may be stored in a space p4 allocated in the host service area, and a mapping of Lba1- > p4 is established, so that the snapshot may store the data set at the snapshot time and may accept the host application write access by isolating the first-write copy data and the host application write data.
In this embodiment, in the embodiment of the present invention, the first-write copy data or the host application write data is stored in a space allocated to the first-write copy area or the host service area in the space of the writable snapshot device, and the first-write copy data and the host application write data can be stored in a partitioned manner by using a logical partition inside the writable snapshot device; by establishing mapping of the logical block address and the corresponding space allocated by the first-write copy area or the host service area, mapping of metadata can be organized according to logical partitions, so that the writable snapshot device can store the first-write copy data as a data set at the snapshot time, and can also store host application write data, thereby improving the performance of data center snapshot and improving the competitiveness of a data center.
Referring to fig. 3, fig. 3 is a block diagram of a writable snapshot apparatus according to an embodiment of the present invention. The apparatus may include:
a receiving module 100, configured to receive data of a preset logical block address;
a first storage module 200, configured to allocate, if the data is write-first data, a corresponding space in a write-first copy area in a space of the writable snapshot apparatus to store the data, and establish mapping between a logical block address and the space allocated by the write-first copy area;
the second storage module 300 is configured to, if data is host application write data, allocate a corresponding space in a host service area in a space of the writable snapshot device to store the data, and establish mapping between a logical block address and the corresponding space allocated to the host service area.
Optionally, the apparatus may further include:
and the partition module is used for logically partitioning the space of the writable snapshot device and dividing the space of the writable snapshot device into a first write copy area and a host service area.
In this embodiment, in the embodiment of the present invention, through the first storage module 200 and the second storage module 300, the first write copy data or the host application write data is stored in a space allocated to a first write copy area or a host service area in a space of the writable snapshot device, and the first write copy data and the host application write data can be stored in a partition manner by using a logical partition inside the writable snapshot device; by establishing mapping of the logical block address and the corresponding space allocated by the first-write copy area or the host service area, mapping of metadata can be organized according to logical partitions, so that the writable snapshot device can store the first-write copy data as a data set at the snapshot time, and can also store host application write data, thereby improving the performance of data center snapshot and improving the competitiveness of a data center.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The data partitioning method and the writable snapshot device of the writable snapshot device provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (2)

1. A method for partitioning data of a writable snapshot device, comprising:
receiving data of a preset logic block address;
if the data is write-first copy data, allocating a corresponding space in a write-first copy area in a space of the writable snapshot device to store the data, and establishing mapping between the logical block address and the space allocated by the write-first copy area;
if the data is host application write data, allocating a corresponding space in a host service area in the space of the writable snapshot device to store the data, and establishing mapping between the logical block address and the corresponding space allocated to the host service area;
before receiving the data of the preset logical block address, the method further includes:
performing logical partitioning on the space of the writable snapshot device, and dividing the space of the writable snapshot device into the first write copy area and the host service area;
the space of the writable snapshot device is specifically a linear address space.
2. A writable snapshot apparatus, comprising:
the receiving module is used for receiving data of a preset logic block address;
the first storage module is used for allocating a corresponding space in a first write copy area in a space of a writable snapshot device to store the data and establishing mapping between the logical block address and the corresponding space allocated by the first write copy area if the data is the first write copy data;
a second storage module, configured to allocate, if the data is host application write data, a corresponding space in a host service area in a space of the writable snapshot device to store the data, and establish mapping between the logical block address and the corresponding space allocated by the host service area;
further comprising:
and the partition module is used for logically partitioning the space of the writable snapshot device and dividing the space of the writable snapshot device into the first write copy area and the host service area, wherein the space of the writable snapshot device is a linear address space.
CN201710625184.4A 2017-07-27 2017-07-27 Data partitioning method of snapshot-writable device and snapshot-writable device Active CN107391396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710625184.4A CN107391396B (en) 2017-07-27 2017-07-27 Data partitioning method of snapshot-writable device and snapshot-writable device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710625184.4A CN107391396B (en) 2017-07-27 2017-07-27 Data partitioning method of snapshot-writable device and snapshot-writable device

Publications (2)

Publication Number Publication Date
CN107391396A CN107391396A (en) 2017-11-24
CN107391396B true CN107391396B (en) 2020-10-23

Family

ID=60342623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710625184.4A Active CN107391396B (en) 2017-07-27 2017-07-27 Data partitioning method of snapshot-writable device and snapshot-writable device

Country Status (1)

Country Link
CN (1) CN107391396B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140542A (en) * 2007-10-19 2008-03-12 华中科技大学 Method for copying snapshot writing response time in the time of shortening writing time
CN101174231A (en) * 2006-11-03 2008-05-07 英业达股份有限公司 Snap backup method
CN105988895A (en) * 2015-02-10 2016-10-05 中兴通讯股份有限公司 Snapshot processing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110161298A1 (en) * 2009-12-29 2011-06-30 Grobman Steven L System and method for opportunistic re-imaging using cannibalistic storage techniques on sparse storage devices
KR20150081810A (en) * 2014-01-07 2015-07-15 한국전자통신연구원 Method and device for multiple snapshot management of data storage media
US9870322B2 (en) * 2015-11-12 2018-01-16 International Business Machines Corporation Memory mapping for object-based storage devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174231A (en) * 2006-11-03 2008-05-07 英业达股份有限公司 Snap backup method
CN101140542A (en) * 2007-10-19 2008-03-12 华中科技大学 Method for copying snapshot writing response time in the time of shortening writing time
CN105988895A (en) * 2015-02-10 2016-10-05 中兴通讯股份有限公司 Snapshot processing method and device

Also Published As

Publication number Publication date
CN107391396A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN109522154B (en) Data recovery method and related equipment and system
US20140075137A1 (en) Method of managing memory
JP2014528127A (en) Efficient access to storage devices with usage bitmaps
CN107861691B (en) Load balancing method and device of multi-control storage system
WO2019005277A1 (en) Systems and methods for improved error correction in a refreshable memory
US10055377B2 (en) Using a proprietary framework on a standards-based embedded device
CN106201652B (en) Data processing method and virtual machine
US8903804B2 (en) Data existence judging device and data existence judging method
CN109445687A (en) A kind of date storage method and protocol server
CN109213450B (en) Associated metadata deleting method, device and equipment based on flash memory array
CN110688256A (en) Metadata power-on recovery method and device, electronic equipment and storage medium
CN113434470B (en) Data distribution method and device and electronic equipment
JP2016533588A (en) Storage processing method, apparatus and terminal
CN109508150B (en) Method and device for allocating storage space
CN109144403B (en) Method and equipment for switching cloud disk modes
US9195613B2 (en) Systems and methods for managing read-only memory
CN107391396B (en) Data partitioning method of snapshot-writable device and snapshot-writable device
US20150347320A1 (en) ENCRYPTION FOR SOLID STATE DRIVES (SSDs)
CN109992527B (en) Bitmap management method of full flash memory system
CN105488047B (en) Metadata reading/writing method and device
CN115712394A (en) Data reading and writing method and device, computer equipment and readable storage medium
CN107924350B (en) Electronic equipment and data compression method thereof
CN110007875B (en) Method, device and equipment for migrating effective data
CN111708489B (en) Method and equipment for improving hard disk service quality
US11513951B2 (en) System and method for improving write performance for log structured storage systems

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
TA01 Transfer of patent application right

Effective date of registration: 20200922

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 450018 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant