WO2017118289A1 - 读数据的方法、数据处理方法及相关存储设备 - Google Patents

读数据的方法、数据处理方法及相关存储设备 Download PDF

Info

Publication number
WO2017118289A1
WO2017118289A1 PCT/CN2016/111333 CN2016111333W WO2017118289A1 WO 2017118289 A1 WO2017118289 A1 WO 2017118289A1 CN 2016111333 W CN2016111333 W CN 2016111333W WO 2017118289 A1 WO2017118289 A1 WO 2017118289A1
Authority
WO
WIPO (PCT)
Prior art keywords
volume
data
identifier
snapshot
storage device
Prior art date
Application number
PCT/CN2016/111333
Other languages
English (en)
French (fr)
Inventor
何龙
胡伟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017118289A1 publication Critical patent/WO2017118289A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1461Backup scheduling policy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Definitions

  • the present invention relates to the field of data processing, and in particular, to a method for reading data, a data processing method, and related storage devices.
  • a Snapshot is a fully available copy of a specified data set containing a static image of the source data copy point in time, primarily for online data backup and recovery.
  • a virtual snapshot is a type of snapshot technology. A virtual snapshot does not generate a complete physical copy of the data. Instead, it maps the data location through a mapping table.
  • a storage device can be divided into multiple volumes, and there is a cascading relationship between volumes.
  • a volume can be divided into a source volume and a snapshot volume. The source volume is the upper volume of the first snapshot volume, the first snapshot volume is the lower volume of the source volume, the second snapshot volume is the lower volume of the first snapshot volume, and so on. A cascading relationship between snapshot volumes.
  • the method for reading data in the prior art is as follows: the host sends a read I/O instruction to the storage device. If the data is not written in the volume specified by the read I/O instruction, the storage device queries the upper level volume of the specified volume. In order from the lower level to the upper level, query the volumes contained in the storage device one by one until the volume where the data is located is found, and the data is read therefrom.
  • data may be written on any volume that has a cascading relationship with the specified volume. If the data is not written on the specified volume, then the upper volume of the specified volume needs to be queried step by step. In the worst case, Data can be read from the source volume. When the number of levels of the volume is large, multiple queries are required, so the read and write performance is not good. In addition, due to the uncertainty of the data storage location, the number of times the data is queried is random. In the case of multiple readings of data, the time of reading data may vary greatly, and the performance of the read data may fluctuate.
  • the present application provides a method for reading data, a data processing method, and a related storage device, which can improve the efficiency of reading and writing data and improve the stability of data read and write performance.
  • a first aspect of the present application provides a method of reading data, the method being applied to a storage device,
  • the storage device includes a volume including a source volume and a plurality of snapshot volumes, and the source volume is used to save data written to the storage device;
  • the first snapshot volume of the plurality of snapshot volumes is a snapshot of the source volume, except for the first snapshot volume
  • the remaining snapshot volumes are snapshots of the most recent snapshot volume, and each volume is assigned an identifier;
  • the method includes: receiving a read data instruction, the read data instruction including the volume identifier and the start address; determining data according to the start address
  • the block identifier determines the identifier of the snapshot volume where the data to be read is located according to the identifier of the volume and the corresponding relationship between the data block identifier and the preset relationship.
  • the preset correspondence includes the identifier of the volume, the identifier of the data block, and the identifier of the snapshot volume. Correspondence relationship; read data to be read from the snapshot volume
  • the storage device when the host reads the snapshot, since the storage device presets a corresponding correspondence for each volume of the data block, the storage device performs a search by using the volume identifier and the data block identifier, and can find the to-be-read.
  • the data is returned to the host, eliminating the need to perform multiple lookups, thus improving the efficiency of reading snapshots.
  • the time for reading data each time is very similar, thus improving the stability of the read snapshot.
  • each snapshot volume includes a pre-set correspondence.
  • the storage device when the storage device queries any snapshot volume according to the read data instruction, it can determine the snapshot of the data to be read according to the preset correspondence relationship included therein, and provides the feasibility of the implementation of the present invention.
  • a second aspect of the present application provides a data processing method, where the method is applied to a storage device, where the storage device includes a volume, the volume includes a source volume and a plurality of snapshot volumes, and the source volume is used to save data written to the storage device;
  • the first snapshot volume in the snapshot volume is a snapshot of the source volume, and the remaining snapshot volumes except the first snapshot volume are snapshots of the most recent snapshot volume, and each volume is assigned an identifier;
  • the method includes: receiving a write The data instruction, the write data instruction includes the data to be written, the identifier of the volume, and the start address; determining the data block identifier according to the start address, and according to the identifier of the volume, the identifier of the data block, and the preset correspondence, the preset correspondence includes the volume.
  • Corresponding relationship between the identifier, the data block identifier, and the identifier of the snapshot volume obtaining the data to be protected from the snapshot volume corresponding to the identified identifier of the snapshot volume, and writing the data to be protected by the volume to which the volume needs to be written, Write the data to be written to the volume corresponding to the identifier of the volume, and modify the identifier of the snapshot volume to the identifier of the volume in the preset correspondence.
  • the mapping object of the snapshot volume is changed from the data to be protected to the data to be written.
  • the storage device uses the volume identifier and the data block identifier to search for the data mapped by the snapshot volume and protect the data. It is not necessary to find the snapshot volume step by step, which reduces the time for searching for data. Improve data processing efficiency.
  • the time of each data processing is very close, and thus the stability of data processing is improved.
  • the volume corresponding to the identifier of the data to be written to the volume is: the data to be protected is written into the data protection space, and the data protection space belongs to the identifier of the volume. Volume.
  • the data to be protected after the data to be protected is written into the data protection space, when the host reads the snapshot, the data to be protected can be read from the snapshot, and the situation that the protected data is overwritten by the data written later is avoided.
  • the volume corresponding to the identifier of the volume to be protected to be written to the volume includes: the data to be written according to the identifier of the volume and the identifier of the data block The data block of the volume is written, and the data block of the volume corresponds to the data block identifier.
  • the storage device when the host reads data, the storage device can read the data to be written from the data block of the volume.
  • each snapshot volume includes a preset corresponding relationship.
  • the storage device when the storage device queries any snapshot volume according to the write data instruction, it can determine the snapshot of the data to be protected according to the preset correspondence relationship included therein, and provides the feasibility of implementing the present invention.
  • the third aspect of the present application provides a storage device having a function of implementing the first aspect of the data reading method, and the function may be implemented by using hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the storage device includes a communication interface, a controller, a memory, and a bus; the communication interface, the controller, and the memory are connected to each other through a bus, and the memory is used to store data and operation instructions, wherein the memory is stored by calling
  • the operation instruction is used by the controller to: control the communication interface to receive the read data instruction, the read data instruction includes the volume identifier and the start address, determine the data block identifier according to the start address, and according to the identifier of the volume, and the data block identifier and
  • the preset relationship determines the identifier of the snapshot volume where the data to be read is located, and the preset correspondence includes the identifier of the volume, the identifier of the data block, and the correspondence between the identifier of the snapshot volume, and the determined snapshot volume.
  • the data to be read is read from the corresponding snapshot volume.
  • the controller when the host reads the snapshot, since the data block of each volume is preset with a corresponding correspondence, the controller performs a search by using the volume identifier and the data block identifier, and can find the data to be read and return. For the host, there is no need to perform multiple searches, thus improving the efficiency of reading snapshots. In addition, in the case of multiple times of reading a snapshot, the time for reading data each time is very similar, thus improving the stability of the read snapshot.
  • each snapshot volume contains a preset correspondence.
  • a fourth aspect provides a storage device having the function of implementing the data processing method of the second aspect.
  • the storage device includes a communication interface, a controller, a memory, and a bus; the communication interface, the controller, and the memory are connected to each other through a bus, and the memory is used to store data and operation instructions, wherein the memory is stored by calling
  • the operation instruction is used by the controller to: control the communication interface to receive the write data instruction, the write data instruction includes the data to be written, the identifier of the volume, and the start address, and determine the data block identifier according to the start address, according to the identifier and data of the volume.
  • the identifier of the snapshot volume to which the data needs to be protected is determined by the block identifier and the pre-set correspondence.
  • the preset relationship includes the identifier of the volume, the identifier of the data block, and the identifier of the snapshot volume.
  • the snapshot is determined from the snapshot. Obtain the data to be protected in the snapshot volume corresponding to the volume identifier, and write the data to be written to the volume corresponding to the volume identifier; write the data to be written to the volume corresponding to the volume identifier, and set the snapshot in the corresponding relationship.
  • the identity of the volume is modified to the identity of the volume.
  • the controller uses the volume identifier and the data block identifier to search for the snapshot volume from the memory through a search.
  • Data, and protect the data without the need to find snapshot volumes step by step, reducing the time to find data, thus improving data processing efficiency.
  • the time of each data processing is very close, and thus the stability of data processing is improved.
  • the controller is specifically configured to write the data to be protected into the data protection space, where the data protection space belongs to a volume corresponding to the identifier of the volume.
  • the controller will protect the data after writing the data to the data protection space.
  • the controller can read the data to be protected from the snapshot, avoiding the situation where the protected data needs to be overwritten by the data written later.
  • the controller is specifically configured to write data to be written to the data block of the volume according to the identifier of the volume and the data block identifier, where the data block of the volume corresponds to the data block identifier.
  • the controller when the host reads data, the controller can read the data to be written from the data block of the volume.
  • each snapshot volume includes a preset correspondence.
  • the storage device uses the volume identifier and the data block identifier to perform a search, and can find the data to be read and return to the host without performing multiple searches, thereby improving the efficiency of reading the snapshot.
  • the time for reading data each time is very similar, thus improving the stability of the read snapshot.
  • FIG. 1 is a schematic diagram of a data processing system according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a storage device according to an embodiment of the present invention.
  • FIG. 3 is another schematic diagram of a storage device according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a method for reading data in an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of data storage of a storage device according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a data processing method according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of data storage in a storage device according to an embodiment of the present invention.
  • the method for reading data is generally applied to a data processing system.
  • the data processing system includes a host 1 and a storage device 2;
  • the host 1 is configured to execute an application, and send a control instruction to the storage device 2 to read and write data; wherein the control instruction includes an input/output (Input/Output, I/O) instruction;
  • the storage device 2 can be a device such as a disk or a disk array for storing data and operating instructions.
  • the storage device 2 includes a communication interface 21, a controller 22, a memory 23, and a bus 24; the communication interface 21, the controller 22, and the memory 24 are connected to each other through a bus 24, as shown in FIG.
  • Memory 24 is for storing data and operating instructions, wherein the controller 22 can perform the method of reading data shown in FIG. 3 by calling an operation instruction stored in the memory 24.
  • the memory 23 includes a volume for holding data written to the storage device; the volume includes a source volume and a plurality of snapshot volumes, and the first one of the plurality of snapshot volumes is a snapshot of the source volume, except for the first snapshot volume
  • the remaining snapshot volumes are snapshots of the most recent snapshot volume, and each snapshot volume is assigned an ID.
  • the controller 22 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP processor, etc.), or a digital signal processor (DSP). ), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices.
  • CPU central processing unit
  • NP processor network processor
  • DSP digital signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the memory 23 may include a random access memory (RAM) 231 implementation, and may also include a non-volatile memory (Non-Volatile Memory, NVM for short) 232, such as at least one disk storage, as shown in FIG.
  • NVM non-Volatile Memory
  • the cache of the storage device can be implemented by RAM, and the volume can be implemented by NVM.
  • the data processing system may be a storage area network (SAN) or a network attached storage (NAS).
  • SAN storage area network
  • NAS network attached storage
  • the execution body of the data reading method provided by the embodiment of the present application may be the controller 22 as shown in FIG. 1. Referring to FIG. 4, the method includes:
  • S401 Receive a read data instruction, where the read data instruction includes an identifier of the volume and a start address;
  • the host when the host accesses the data resource through the snapshot, the host sends a read I/O instruction to the storage device to receive the read I/O instruction.
  • the read I/O instruction includes the identifier of the volume and the starting address.
  • S402. Determine a data block identifier according to the starting address.
  • the start address is divided by the size of the data block, and the data block identifier is obtained.
  • S403. Determine, according to the identifier of the volume, and the corresponding relationship between the data block identifier and the preset relationship, the identifier of the snapshot volume where the data to be read is located, where the preset correspondence includes the identifier of the volume, the identifier of the data block, and the identifier of the snapshot volume. Correspondence relationship;
  • the preset correspondence may be represented by (X, Y) ⁇ Z, X is a data block identifier, Y is a volume identifier included in the read data instruction, and Z is a volume identifier of the snapshot volume where the data to be read is located.
  • the volume ID of the source volume is 0, the volume ID of the snapshot volume 1 is 1, the volume ID of the snapshot volume 2 is 2, the volume identifier of the snapshot volume 3 is 3, and the data block identifier of the volume includes 0, 1, 2, 3, 4, ..., n, the data to be read is stored on snapshot volume 1, snapshot volume 2 is a snapshot of snapshot volume 1, and snapshot volume 3 is a snapshot of snapshot volume 2.
  • create an access acceleration table as shown in the following table.
  • the access acceleration table contains preset correspondences. See Table 1:
  • pre-set correspondence can also be represented by (Y, X) ⁇ Z.
  • the meanings of X, Y, Z can be referred to the above X, Y, Z, and other representation methods can also be used, which are not limited herein. .
  • the snapshot volume is determined according to the identifier of the snapshot volume, and the data to be read is read from the snapshot volume.
  • the process of reading data from a snapshot volume can be referred to the prior art and will not be described here.
  • the storage device may also find the volume identifier of the source volume at a time according to the identifier of the volume and the identifier of the data block, and the preset correspondence, and then read the data from the source volume.
  • the specific implementation process is similar to the process of reading data from the snapshot volume, and is not described here.
  • the storage device includes the source volume, snapshot volume 1, snapshot volume 2, and snapshot volume 3.
  • the volume IDs of the source volume, snapshot volume 1, snapshot volume 2, and snapshot volume 3 are 0, 1, 2, and 3, respectively. Both include Chunk0, Chunk1, Chunk2, Chunk3, Chunk4, ..., Chunkn.
  • the data to be read is taken as data1. Assume that data1 is stored in Chunk4 of snapshot volume 1, and snapshot volume 2 is the next-level snapshot of snapshot volume 1, snapshot. Volume 3 is the next-level snapshot of snapshot volume 2, as shown in Figure 5; the established access acceleration table is shown in Table 2:
  • the read I/O command When the host sends a read I/O command, the read I/O command includes the volume ID and address, the volume ID is 3, and the address is 300.
  • the storage device can determine the snapshot of the data by one search, which reduces the time taken to find the data, thereby improving the efficiency of reading the data.
  • the number of times of searching is 0, or the number of times of searching is 1, so the time for reading data is very close, which avoids the situation where the time of reading data in the prior art is greatly different, thus improving the reading.
  • the stability of the data is very close, which avoids the situation where the time of reading data in the prior art is greatly different, thus improving the reading.
  • the storage device needs to query the snapshot volume one by one until the volume where the data needs to be protected is found, so that the data to be protected can be obtained. The more the number of queries, the slower the data is written.
  • the execution body of the read data method provided by the embodiment of the present application may be the controller 22 as shown in FIG. Referring to FIG. 6, the above data processing method includes:
  • the storage device when the host sends a write data command, the storage device receives the write data command.
  • the write data instruction includes data to be written, an identifier of the volume, and a start address.
  • S602. Determine a data block identifier according to the starting address.
  • Step S602 is similar to step S402 in the embodiment shown in FIG. 4, and details are not described herein again.
  • S603. Determine, according to the identifier of the volume, the identifier of the data block, and the corresponding relationship, the identifier of the snapshot volume where the data needs to be protected.
  • the preset correspondence includes the identifier of the volume, the identifier of the data block, and the identifier of the snapshot volume. relationship;
  • the identifier of the volume and the identifier of the data block included in the write data instruction, and the data mapped by the data block of the corresponding volume is the data to be protected.
  • the data to be protected may be an important level of data, or data of an important user, or other types of data to be protected, which is not limited herein.
  • the specific process of determining the identifier of the snapshot volume to be protected by the data is similar to the step 203 in the embodiment shown in FIG. 2 according to the identifier of the volume, the identifier of the data block, and the corresponding relationship.
  • the snapshot volume is determined according to the identifier of the snapshot volume, the data to be protected is obtained from the snapshot volume, and the volume corresponding to the volume identifier included in the write instruction is determined, and the protection data is written into the volume.
  • the host reads the volume again, it can read the data to be protected from it, thus realizing the data protection function.
  • the volume corresponding to the identifier of the volume to be written to the volume may be specifically implemented by writing the data to be protected to the data protection space, and the data protection space belongs to the volume corresponding to the identifier of the volume.
  • each volume further includes a data protection space. After obtaining the data to be protected, the data to be protected may be written into the data protection space of the volume to implement the data protection function.
  • the storage device After the data to be written is written to the volume corresponding to the identifier of the volume, and the identifier of the snapshot volume is modified to the identifier of the volume, when the host reads the volume, the storage device searches for the volume according to the corresponding relationship, and reads the last write of the host. The data into the volume.
  • the identifier of the snapshot volume is modified by the identifier of the volume in the preset relationship
  • the identifier of the volume and the identifier of the volume corresponding to the identifier of the data block may not be modified to avoid repeated modification.
  • the volume corresponding to the identifier of the volume to be written to the volume may be specifically implemented by: writing the data to be written to the volume of the volume according to the identifier of the volume and the identifier of the data, and the data of the volume.
  • the block corresponds to the data block identifier.
  • the data to be written is written into the data block of the volume, and the process of writing data is completed, so that the host reads the data to be written from the volume next time.
  • the present invention may also find the volume identifier of the source volume at a time according to the identifier of the volume and the identifier of the data block, and the preset correspondence, and then read from the source volume.
  • the data needs to be protected, and the specific implementation process is similar to the process of obtaining the data to be protected from the snapshot volume, and is not described here.
  • each snapshot volume contains a pre-set correspondence.
  • the storage device when the storage device queries any snapshot volume according to the write data instruction, it can determine the snapshot of the data to be protected according to the preset correspondence relationship included, and provides feasibility for implementation.
  • the storage device includes the source volume, snapshot volume 1, snapshot volume 2, and snapshot volume 3.
  • the volume IDs of the source volume, snapshot volume 1, snapshot volume 2, and snapshot volume 3 are 0, 1, 2, and 3, respectively. Both include Chunk0, Chunk1, Chunk2, Chunk3, Chunk4, ..., Chunkn. Data to be protected is taken as data2. Assume that data2 is stored in Chunk5 of snapshot volume 1, and snapshot volume 2 is the next-level snapshot of snapshot volume 1, snapshot volume. 3 is the next-level snapshot of snapshot volume 2, as shown in Figure 7; the established access acceleration table is shown in Table 3:
  • the write I/O command includes data3, the volume ID, and the address.
  • the volume ID is 3, and the data block identifier is 5, and the storage device is based on (5, 3) and the preset corresponding. Relationship: You can determine that the volume to be protected data is snapshot volume 1, obtain data2 from snapshot volume 1, and write data2 to snapshot volume 3. Specifically, write data2 to the data protection space of snapshot volume 3.
  • write data3 to snapshot volume 3 Specifically, write data3 to Chunk5 of snapshot volume 3 to complete the process of writing the snapshot.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Quality & Reliability (AREA)

Abstract

一种读数据的方法及存储设备,能够提高读快照的效率,以及读快照的稳定性。所述方法包括:接收读数据指令,读数据指令包括卷的标识和起始地址(S401);根据起始地址确定数据块标识(S402);根据卷的标识,以及数据块标识与预先设置的对应关系确定待读取数据所在的快照卷的标识,预先设置的对应关系包括卷的标识、数据块标识、与快照卷的标识之间的对应关系(S403);从与确定出的快照卷的标识对应的快照卷中读取待读取数据(S404)。还公开了一种数据处理方法以及实现上述数据处理方法的存储设备。

Description

读数据的方法、数据处理方法及相关存储设备 技术领域
本发明涉及数据处理领域,尤其涉及读数据的方法、数据处理方法及相关存储设备。
背景技术
快照(Snapshot)是对指定数据集合的一个完全可用的拷贝,该拷贝包含源数据拷贝时间点的静态映像,其作用主要是在线数据备份与恢复。虚拟快照是快照技术的一种,虚拟快照不生成完整的物理上的数据拷贝,而是通过映射表来定位数据位置。存储设备可以划分为多个卷,卷与卷之间存在级联关系。卷可以分为源卷和快照卷,源卷为第一个快照卷的上级卷,第一快照卷为源卷的下级卷,第二快照卷为第一快照卷的下级卷,依此类推其他快照卷之间的级联关系。
现有技术中读数据的方法大致如下:主机向存储设备发送读I/O指令,若数据没有写在该读I/O指令指定的卷中,那么存储设备会查询指定卷的上一级卷,以从下级到上级的顺序,逐一查询存储设备包含的卷,直至查找到数据所在卷,从其中读取数据。
在实际应用中,数据可能写在与指定卷有级联关系的任意一个卷上,如果数据没有写在指定卷,那么需要对指定卷的上级卷进行逐级查询,在最坏的情况下在源卷中才能读取数据,当卷的级数很多时,需要进行多次查询,因此读写性能不佳。另外,由于数据存储位置的不确定,因此查询数据的次数是随机的,在多次读数据的情况下,读数据的时间可能相差很大,读数据性能会发生波动。
发明内容
本申请提供了读数据的方法、数据处理方法以及相关存储设备,能够提高读写数据的效率,提高数据读写性能的稳定性。
本申请第一方面提供一种读数据的方法,所述方法应用于存储设备中, 存储设备包括卷,卷包括源卷和多个快照卷,源卷用于保存写入存储设备的数据;多个快照卷中的第一个快照卷是源卷的快照,除第一快照卷之外的其余快照卷均是最近一次快照卷的快照,并且每个卷分配有标识;所述方法包括:接收读数据指令,读数据指令包括卷的标识和起始地址;根据起始地址确定数据块标识,根据卷的标识,以及数据块标识与预先设置的对应关系确定待读取数据所在的快照卷的标识,预先设置的对应关系包括卷的标识、数据块标识、与快照卷的标识之间的对应关系;从与确定出的快照卷的标识对应的快照卷中读取待读取数据。
按照这种实施方式,当主机读快照时,由于存储设备为每个卷的数据块预先设置了相应的对应关系,存储设备利用卷标识和数据块标识进行一次查找,就可以查找到待读取数据并返回给主机,无需进行多次查找,因此提高了读快照的效率。另外,在多次读快照的情况下,每次读取数据的时间非常相近,因此提高了读快照的稳定性。
结合第一方面,在第一方面的第一种实现方式中,每个快照卷包含有预先设置的对应关系。
按照这种实施方式,在存储设备根据读数据指令查询任意一个快照卷时,就能够根据其包含的预设对应关系确定待读取数据所在快照,提供了本发明实施的可行性。
本申请第二方面提供一种数据处理方法,所述方法应用于存储设备中,存储设备包括卷,卷包括源卷和多个快照卷,源卷用于保存写入存储设备的数据;多个快照卷中的第一个快照卷是源卷的快照,除第一快照卷之外的其余快照卷均是最近一次快照卷的快照,并且每个卷分配有标识;所述方法包括:接收写数据指令,写数据指令包括待写数据、卷的标识和起始地址;根据起始地址确定数据块标识,根据卷的标识、数据块标识以及预先设置的对应关系,预先设置的对应关系包括卷的标识、数据块标识,与快照卷的标识之间的对应关系;从与确定出的快照卷的标识对应的快照卷中获取需保护数据,将需保护数据写入卷的标识对应的卷,将待写数据写入卷的标识对应的卷,并在预先设置的对应关系中,将快照卷的标识修改为卷的标识。
按照这种实施方式,在快照卷的映射对象由需保护数据更改为待写数据 的过程中,存储设备利用卷标识和数据块标识,通过一次查找,可以查找到快照卷所映射的数据,并对该数据进行保护,无需逐级查找快照卷,减少了查找数据的时间,因此提高了数据处理效率。另外,在多次执行上述数据处理方法的情况下,每次数据处理的时间非常相近,因此提高了数据处理的稳定性。
结合第二方面,在第二方面的第一种实现方式中,将需保护数据写入卷的标识对应的卷包括:将需保护数据写入数据保护空间,数据保护空间属于与卷的标识对应的卷。
按照这种实施方式,将需保护数据写入数据保护空间之后,主机读快照时,可以从快照中读取需保护数据,避免了需保护数据被后来写入的数据覆盖而丢失的情况。
结合第二方面的第一种实现方式,在第二方面的第二种实现方式中,将需保护数据写入卷的标识对应的卷包括:根据卷的标识以及数据块标识,将待写数据写入卷的数据块,卷的数据块与数据块标识对应。
按照这种实施方式,当主机读数据时,存储设备可以从该卷的数据块中读取待写数据。
结合第二方面的以上任意一种实现方式,在第二方面的第四种实现方式中,每个快照卷包含有预先设置的对应关系。
按照这种实施方式,在存储设备根据写数据指令查询任意一个快照卷时,就能够根据其包含的预设对应关系确定需保护数据所在快照,提供了本发明实施的可行性。
本申请第三方面提供一种存储设备,具有实现第一方面读数据方法的功能,功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
一种可能的实现方式中,存储设备包括通讯接口、控制器、存储器以及总线;通讯接口、控制器和存储器之间通过总线相互连接,存储器用于存储数据以及操作指令,其中,通过调用存储器存储的操作指令,控制器用于执行以下方法:控制通讯接口接收读数据指令,读数据指令包括卷的标识和起始地址,根据起始地址确定数据块标识,根据卷的标识,以及数据块标识与 预先设置的对应关系确定待读取数据所在的快照卷的标识,预先设置的对应关系包括卷的标识、数据块标识、与快照卷的标识之间的对应关系,从与确定出的快照卷的标识对应的快照卷中读取待读取数据。
按照这种实施方式,当主机读快照时,由于每个卷的数据块预先设置了相应的对应关系,控制器利用卷标识和数据块标识进行一次查找,就可以查找到待读取数据并返回给主机,无需进行多次查找,因此提高了读快照的效率。另外,在多次读快照的情况下,每次读取数据的时间非常相近,因此提高了读快照的稳定性。
可选的,每个快照卷包含有预先设置的对应关系。
第四方面提供一种存储设备,具有实现第二方面中数据处理方法的功能。
一种可能的实现方式中,存储设备包括通讯接口、控制器、存储器以及总线;通讯接口、控制器和存储器之间通过总线相互连接,存储器用于存储数据以及操作指令,其中,通过调用存储器存储的操作指令,控制器用于执行以下方法:控制通讯接口接收写数据指令,写数据指令包括待写数据、卷的标识和起始地址,根据起始地址确定数据块标识,根据卷的标识、数据块标识以及预先设置的对应关系,确定需保护数据所在快照卷的标识,预先设置的对应关系包括卷的标识、数据块标识,与快照卷的标识之间的对应关系;从与确定出的快照卷的标识对应的快照卷中获取需保护数据,将需保护数据写入卷的标识对应的卷;将待写数据写入卷的标识对应的卷,并在预先设置的对应关系中,将快照卷的标识修改为卷的标识。
按照这种实施方式,在快照卷的映射对象由需保护数据更改为待写数据的过程中,控制器利用卷标识和数据块标识,通过一次查找,可以从存储器中查找到快照卷所映射的数据,并对该数据进行保护,无需逐级查找快照卷,减少了查找数据的时间,因此提高了数据处理效率。另外,在多次执行上述数据处理方法的情况下,每次数据处理的时间非常相近,因此提高了数据处理的稳定性。
另一种可能的实现方式中,控制器具体用于将需保护数据写入数据保护空间,数据保护空间属于与卷的标识对应的卷。
按照这种实施方式,控制器将需保护数据写入数据保护空间之后,主机 读快照时,控制器可以从快照中读取需保护数据,避免了需保护数据被后来写入的数据覆盖而丢失的情况。
另一种可能的实现方式中,控制器具体用于根据卷的标识以及数据块标识,将待写数据写入卷的数据块,卷的数据块与数据块标识对应。
按照这种实施方式,当主机读数据时,控制器可以从该卷的数据块中读取待写数据。
另一种可能的实现方式中,每个快照卷包含有预先设置的对应关系。
本申请提供的读数据的方法中,存储设备利用卷标识和数据块标识进行一次查找,就可以查找到待读取数据并返回给主机,无需进行多次查找,因此提高了读快照的效率。另外,在多次读快照的情况下,每次读取数据的时间非常相近,因此提高了读快照的稳定性。
附图说明
图1为本发明实施例中数据处理系统的一个示意图;
图2为本发明实施例中存储设备的一个示意图;
图3为本发明实施例中存储设备的另一个示意图;
图4为本发明实施例中读数据的方法的一个流程示意图;
图5为本发明实施例中存储设备数据存储的一个示意图;
图6为本发明实施例中数据处理方法的一个流程示意图;
图7为本发明实施例中存储设备中数据存储的一个示意图。
具体实施方式
下面对本申请中读数据的方法的应用环境进行介绍,读数据的方法一般应用于数据处理系统,请参阅图1,数据处理系统包括主机1以及存储设备2;
主机1,用于执行应用程序,向存储设备2发送控制指令,以读写数据;其中控制指令包括输入/输出(Input/Output,简称I/O)指令;
存储设备2,可以是磁盘或磁盘阵列等设备,用于存储数据以及操作指令。存储设备2包括通讯接口21、控制器22、存储器23以及总线24;通讯接口21、控制器22和存储器24之间通过总线24相互连接,如图2所示。存储器 24用于存储数据以及操作指令,其中,通过调用存储器24存储的操作指令,控制器22可以执行图3所示读数据的方法。存储器23包括卷,卷用于保存写入存储设备的数据;卷包括源卷和多个快照卷,多个快照卷中的第一个快照卷是源卷的快照,除第一快照卷之外的其余快照卷均是最近一次快照卷的快照,并且每个快照卷分配有标识。
其中,控制器22可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(Digital Signal Processing,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称FPGA)或者其他可编程逻辑器件等。
存储器23可以包括随机存取存储器(Random Access Memory,简称RAM)231实现,也可能包括非易失性存储器(Non-Volatile Memory,简称NVM)232,例如至少一个磁盘存储器,如图3所示。在实际应用中,存储设备的缓存可以由RAM实现,卷可以由NVM实现。
需要说明的是,数据处理系统可以是存储区域网(Storage Area Networks,简称SAN),也可以是网络附加存储设备(Network Attached Storage,简称NAS)。
下面对本申请提供的读数据的方法进行介绍,本申请实施例提供的读数据方法的执行主体可以是如图1所示的控制器22,请参阅图4,上述方法包括:
S401、接收读数据指令,读数据指令包括卷的标识和起始地址;
本实施例中,当主机通过快照访问数据资源时,主机向存储设备发送读I/O指令,接收读I/O指令。其中,读I/O指令包括卷的标识和起始地址。
S402、根据起始地址确定数据块标识;
具体的,获取起始地址之后,将起始地址除以数据块的大小,可以得到数据块标识。
S403、根据卷的标识,以及数据块标识与预先设置的对应关系确定待读取数据所在的快照卷的标识,预先设置的对应关系包括卷的标识、数据块标识、与快照卷的标识之间的对应关系;
具体的,预先设置的对应关系可以采用(X,Y)→Z表示,X为数据块标识,Y为读数据指令包括的卷标识,Z为待读取数据所在快照卷的卷标识。
举例来说,源卷的卷标识为0,快照卷1的卷标识为1,快照卷2的卷标识为2,快照卷3的卷标识为3,卷包含的数据块标识包括0,1,2,3,4,…,n,待读取数据存储在快照卷1上,快照卷2为快照卷1的快照,快照卷3为快照卷2的快照。在存储设备中,创建访问加速表可以如下表所示,访问加速表包含预先设置的对应关系可参阅表1:
(0,0)→0 (0,1)→0 (0,2)→0 (0,3)→0
(1,0)→0 (1,1)→1 (1,2)→1 (1,3)→1
(2,0)→0 (2,1)→1 (2,2)→1 (2,3)→1
(3,0)→0 (3,1)→1 (3,2)→1 (3,3)→1
(4,0)→0 (4,1)→1 (4,2)→1 (4,3)→1
表1
获取一个卷的标识和一个数据块标识之后,可以查询访问加速表,确定对应的卷标识。若数据存储在快照卷1中,那么访问快照卷2或快照卷3都可以一次查找到快照卷1的标识。
可以理解的是,预先设置的对应关系还可以采用(Y,X)→Z表示,X,Y,Z的含义可参阅上述X,Y,Z,还可以采用其他表示方法,具体此处不作限定。
S404、从与确定出的快照卷的标识对应的快照卷中读取待读取数据。
存储设备确定快照卷的标识之后,根据快照卷的标识确定快照卷,从快照卷中读取待读取数据。从快照卷中读取数据的过程可参阅现有技术,此处不再赘述。
需要说明的是,若数据存储在源卷中,存储设备根据卷的标识和数据块的标识,以及预设的对应关系也可以一次查找到源卷的卷标识,再从源卷中读取数据,具体实现过程与上述从快照卷中读取数据的过程相似,此处不再赘述。
为便于理解,下面以一具体应用场景对本申请中的读数据的方法进行详细说明:
存储设备包括源卷、快照卷1、快照卷2和快照卷3,源卷、快照卷1、快照卷2和快照卷3的卷标识分别以0,1,2,3为例,每个卷都包括Chunk0,Chunk1,Chunk2,Chunk3,Chunk4,…,Chunkn,待读取数据以data1为例,假定data1存储在快照卷1的Chunk4中,快照卷2为快照卷1的下一级快照,快照卷3为快照卷2的下一级快照,如图5所示;建立的访问加速表如表2所示:
(0,0)→0 (0,1)→0 (0,2)→0 (0,3)→0
(1,0)→0 (1,1)→0 (1,2)→0 (1,3)→0
(2,0)→0 (2,1)→0 (2,2)→0 (2,3)→0
(3,0)→0 (3,1)→0 (3,2)→0 (3,3)→0
(4,0)→0 (4,1)→1 (4,2)→1 (4,3)→1
表2
当主机下发读I/O指令,读I/O指令包括卷ID和地址,卷ID以3为例,地址以300为例,Chunk的大小以64kb为例,确定Chunk ID=300/64=4,根据(4,3)和预先设置的对应关系,可以确定data1所在卷为卷1,即快照卷1,从快照卷1中读取数据。
由此可见,存储设备可以通过一次查找确定数据所在快照,减少了查找数据所用时间,因此提高了读数据的效率。同时,在多次读快照的情况下,查找次数为0,或查找次数为1,因此读数据的时间非常接近,避免了现有技术中读数据的时间相差较大的情况,因此提高了读数据的稳定性。
在实际应用中,若I/O指定的快照卷所映射的数据为需保护数据,则需要先将需保护数据进行保护,再写入主机下发的数据,才能保护需保护数据,在现有技术中,存储设备需要逐一查询快照卷,直至查找到需保护数据所在卷,才能获取需保护数据,查询次数越多,写数据速度越慢。
为了提高上述数据处理过程的数据处理效率,本申请提供一种数据处理方法,本申请实施例提供的读数据方法的执行主体可以是如图1所示的控制器22。请参阅图6,上述数据处理方法包括:
S601、接收写数据指令,写数据指令包括待写数据、卷的标识和起始地址;
本实施例中,主机下发写数据指令时,存储设备接收写数据指令。其中,写数据指令包括待写数据、卷的标识和起始地址。
S602、根据起始地址确定数据块标识;
步骤S602与图4所示实施例中步骤S402相似,此处不再赘述。
S603、根据卷的标识、数据块标识以及预先设置的对应关系,确定需保护数据所在快照卷的标识,预先设置的对应关系包括卷的标识、数据块标识,与快照卷的标识之间的对应关系;
本实施例中,写数据指令包含的卷的标识和数据块的标识,所对应的卷的数据块所映射的数据为需保护数据。需保护数据可以是重要等级的数据,或重要用户的数据,或其他类型需要要被保护的数据,此处不作限定。
具体的,根据卷的标识、数据块标识以及预先设置的对应关系,确定需保护数据所在快照卷的标识的具体过程与图2所示实施例中步骤203相似,此处不再赘述。
S604、从与确定出的快照卷的标识对应的快照卷中获取需保护数据,将需保护数据写入卷的标识对应的卷;
存储设备确定快照卷的标识之后,根据快照卷的标识确定快照卷,从快照卷中获取需保护数据,并确定与写指令包括的卷标识对应的卷,将需保护数据写入该卷。主机再读该卷时,可以从其中读取需保护数据,从而实现了数据保护功能。
作为一个可选的实施例,将需保护数据写入卷的标识对应的卷具体可以通过以下方式实现:将需保护数据写入数据保护空间,数据保护空间属于与卷的标识对应的卷。
具体的,在存储设备中,每个卷还包括数据保护空间,获取需保护数据之后,可以将需保护数据写入卷的数据保护空间,以实现数据保护功能。
S605、将待写数据写入卷的标识对应的卷,并在预先设置的对应关系中,将快照卷的标识修改为卷的标识。
将待写数据写入卷的标识对应的卷,并将快照卷的标识修改为卷的标识之后,当主机读该卷时,存储设备根据对应关系在该卷中查找,并读取主机最后写入该卷的数据。
需要说明的是,在预先设置的对应关系中,将快照卷的标识修改卷的标识之后,可以不再修改卷的标识和数据块的标识对应的卷的标识,以避免重复修改。
作为一个可选的实施例,将待写数据写入卷的标识对应的卷具体可以通过以下方式实现:根据卷的标识以及数据块标识,将待写数据写入卷的数据块,卷的数据块与数据块标识对应。
具体的,将需保护数据写入卷的标识对应的卷之后,再将待写数据写入该卷的数据块,完成写数据的过程,以便主机下次从该卷中读取上述待写数据。
需要说明的是,若需保护数据存储在源卷中,本发明根据卷的标识和数据块的标识,以及预设的对应关系也可以一次查找到源卷的卷标识,再从源卷中读取需保护数据,具体实现过程与上述从快照卷中获取需保护数据的过程相似,此处不再赘述。
作为一个可选的实施例,每个快照卷包含有预先设置的对应关系。
具体的,存储设备根据写数据指令查询任意一个快照卷时,就能够根据其包含的预设对应关系确定需保护数据所在快照,提供了实施的可行性。
为便于理解,下面以一具体应用场景对本申请中的数据处理方法进行详细说明:
存储设备包括源卷、快照卷1、快照卷2和快照卷3,源卷、快照卷1、快照卷2和快照卷3的卷标识分别以0,1,2,3为例,每个卷都包括Chunk0,Chunk1,Chunk2,Chunk3,Chunk4,…,Chunkn,需保护数据以data2为例,假定data2存储在快照卷1的Chunk5中,快照卷2为快照卷1的下一级快照,快照卷3为快照卷2的下一级快照,如图7所示;建立的访问加速表如表3所示:
(0,0)→0 (0,1)→0 (0,2)→0 (0,3)→0
(1,0)→0 (1,1)→0 (1,2)→0 (1,3)→0
(2,0)→0 (2,1)→0 (2,2)→0 (2,3)→0
(3,0)→0 (3,1)→0 (3,2)→0 (3,3)→0
(4,0)→0 (4,1)→0 (4,2)→0 (4,3)→0
(5,0)→0 (5,1)→1 (5,2)→1 (5,3)→1
表3
当主机下发写IO指令时,写I/O指令包括data3、卷ID和地址,卷ID以3为例,数据块标识以5为例,存储设备根据(5,3)和预先设置的对应关系,可以确定需保护数据所在卷为快照卷1,从快照卷1中获取data2,将data2写入快照卷3,具体的,将data2写入快照卷3的数据保护空间;
再将data3写入快照卷3,具体的,将data3写入快照卷3的的Chunk5,完成写快照的过程。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (12)

  1. 一种读数据的方法,其特征在于,所述方法应用于存储设备中,所述存储设备包括卷,所述卷包括源卷和多个快照卷,所述源卷用于保存写入所述存储设备的数据;所述多个快照卷中的第一个快照卷是所述源卷的快照,除所述第一快照卷之外的其余快照卷均是最近一次快照卷的快照,并且每个卷分配有标识;所述方法包括:
    接收读数据指令,所述读数据指令包括卷的标识和起始地址;
    根据所述起始地址确定数据块标识;
    根据所述卷的标识,以及所述数据块标识与预先设置的对应关系确定待读取数据所在的快照卷的标识,所述预先设置的对应关系包括所述卷的标识、数据块标识、与所述快照卷的标识之间的对应关系;
    从与所述确定出的快照卷的标识对应的快照卷中读取所述待读取数据。
  2. 根据权利要求1所述的方法,其特征在于,每个快照卷包含有所述预先设置的对应关系。
  3. 一种数据处理方法,其特征在于,所述方法应用于存储设备中,所述存储设备包括卷,所述卷包括源卷和多个快照卷,所述源卷用于保存写入所述存储设备的数据;所述多个快照卷中的第一个快照卷是所述源卷的快照,除所述第一快照卷之外的其余快照卷均是最近一次快照卷的快照,并且每个卷分配有标识;所述方法包括:
    接收写数据指令,所述写数据指令包括待写数据、卷的标识和起始地址;
    根据所述起始地址确定数据块标识;
    根据所述卷的标识、所述数据块标识以及预先设置的对应关系,确定需保护数据所在快照卷的标识,所述预先设置的对应关系包括所述卷的标识、数据块标识,与所述快照卷的标识之间的对应关系;
    从与确定出的所述快照卷的标识对应的所述快照卷中获取所述需保护数据,将所述需保护数据写入所述卷的标识对应的卷;
    将所述待写数据写入所述卷的标识对应的卷,并在所述预先设置的对应关系中,将所述快照卷的标识修改为所述卷的标识。
  4. 根据权利要求3所述的方法,其特征在于,将所述需保护数据写入所 述卷的标识对应的卷包括:
    将所述需保护数据写入数据保护空间,所述数据保护空间属于与所述卷的标识对应的卷。
  5. 根据权利要求4所述的方法,其特征在于,所述将所述待写数据写入所述卷的标识对应的卷包括:
    根据所述卷的标识以及所述数据块标识,将所述待写数据写入所述卷的数据块,所述卷的数据块与所述数据块标识对应。
  6. 根据权利要求3至5中任一项所述的方法,其特征在于,每个快照卷包含有预先设置的对应关系。
  7. 一种存储设备,其特征在于,包括通讯接口、控制器、存储器以及总线;所述通讯接口、所述控制器和所述存储器之间通过所述总线相互连接,所述存储器用于存储数据以及操作指令,其中,通过调用所述存储器存储的操作指令,所述控制器用于执行以下方法:
    控制所述通讯接口接收读数据指令,所述读数据指令包括卷的标识和起始地址;
    根据所述起始地址确定数据块标识;
    根据所述卷的标识,以及所述数据块标识与预先设置的对应关系确定待读取数据所在的快照卷的标识,所述预先设置的对应关系包括所述卷的标识、数据块标识、与所述快照卷的标识之间的对应关系;
    从与所述确定出的快照卷的标识对应的快照卷中读取所述待读取数据。
  8. 根据权利要求7所述的存储设备,其特征在于,每个快照卷包含有所述预先设置的对应关系。
  9. 一种存储设备,其特征在于,包括通讯接口、控制器、存储器以及总线;所述通讯接口、所述控制器和所述存储器之间通过所述总线相互连接,所述存储器用于存储数据以及操作指令,其中,通过调用所述存储器存储的操作指令,所述控制器用于执行以下方法:
    控制所述通讯接口接收写数据指令,所述写数据指令包括待写数据、卷的标识和起始地址;
    根据所述起始地址确定数据块标识;
    根据所述卷的标识、所述数据块标识以及预先设置的对应关系,确定需保护数据所在快照卷的标识,所述预先设置的对应关系包括所述卷的标识、数据块标识,与所述快照卷的标识之间的对应关系;
    从与确定出的所述快照卷的标识对应的所述快照卷中获取所述需保护数据,将所述需保护数据写入所述卷的标识对应的卷;
    将所述待写数据写入所述卷的标识对应的卷,并在所述预先设置的对应关系中,将所述快照卷的标识修改为所述卷的标识。
  10. 根据权利要求9所述的存储设备,其特征在于,所述控制器具体用于将所述需保护数据写入数据保护空间,所述数据保护空间属于与所述卷的标识对应的卷。
  11. 根据权利要求10所述的存储设备,其特征在于,所述控制器具体用于根据所述卷的标识以及所述数据块标识,将所述待写数据写入所述卷的数据块,所述卷的数据块与所述数据块标识对应。
  12. 根据权利要求9至11中任一项所述的存储设备,其特征在于,每个快照卷包含有预先设置的对应关系。
PCT/CN2016/111333 2016-01-06 2016-12-21 读数据的方法、数据处理方法及相关存储设备 WO2017118289A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610006123.5A CN105677252B (zh) 2016-01-06 2016-01-06 读数据的方法、数据处理方法及相关存储设备
CN201610006123.5 2016-01-06

Publications (1)

Publication Number Publication Date
WO2017118289A1 true WO2017118289A1 (zh) 2017-07-13

Family

ID=56299064

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111333 WO2017118289A1 (zh) 2016-01-06 2016-12-21 读数据的方法、数据处理方法及相关存储设备

Country Status (2)

Country Link
CN (1) CN105677252B (zh)
WO (1) WO2017118289A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677252B (zh) * 2016-01-06 2019-06-07 华为技术有限公司 读数据的方法、数据处理方法及相关存储设备
CN107071031B (zh) * 2017-04-19 2019-11-05 电子科技大学 基于chunk块版本号的分布式块存储系统数据恢复判定方法
CN107329698B (zh) * 2017-06-29 2020-08-11 杭州宏杉科技股份有限公司 一种数据保护方法及存储设备
CN107679276B (zh) * 2017-08-31 2021-06-18 电力规划总院有限公司 电力系统潮流接线图的生成方法、装置及电子设备
CN110018983B (zh) * 2017-09-27 2021-07-16 华为技术有限公司 一种元数据查询方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140536A (zh) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 一种支持级联快照的快照系统及其快照处理方法
US20080183990A1 (en) * 2007-01-31 2008-07-31 Inventec Corporation Disk snapshot method
CN101419564A (zh) * 2008-12-11 2009-04-29 杭州华三通信技术有限公司 一种采用快照恢复数据的方法和装置
CN103761159A (zh) * 2014-01-23 2014-04-30 天津中科蓝鲸信息技术有限公司 增量快照处理的方法及系统
CN105677252A (zh) * 2016-01-06 2016-06-15 华为技术有限公司 读数据的方法、数据处理方法及相关存储设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102411524A (zh) * 2011-12-30 2012-04-11 云海创想信息技术(天津)有限公司 一种快照卷数据拷贝方法
CN105138281B (zh) * 2015-08-05 2018-12-07 华为技术有限公司 一种物理磁盘的共享方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080183990A1 (en) * 2007-01-31 2008-07-31 Inventec Corporation Disk snapshot method
CN101140536A (zh) * 2007-05-21 2008-03-12 中兴通讯股份有限公司 一种支持级联快照的快照系统及其快照处理方法
CN101419564A (zh) * 2008-12-11 2009-04-29 杭州华三通信技术有限公司 一种采用快照恢复数据的方法和装置
CN103761159A (zh) * 2014-01-23 2014-04-30 天津中科蓝鲸信息技术有限公司 增量快照处理的方法及系统
CN105677252A (zh) * 2016-01-06 2016-06-15 华为技术有限公司 读数据的方法、数据处理方法及相关存储设备

Also Published As

Publication number Publication date
CN105677252A (zh) 2016-06-15
CN105677252B (zh) 2019-06-07

Similar Documents

Publication Publication Date Title
WO2017118289A1 (zh) 读数据的方法、数据处理方法及相关存储设备
US9836224B2 (en) Storage controller, storage system and method of operating storage controller
TWI629591B (zh) 存取快閃記憶體模組的方法及相關的快閃記憶體控制器與電子裝置
WO2019144553A1 (zh) 数据存储方法、装置及存储介质
US10534547B2 (en) Consistent transition from asynchronous to synchronous replication in hash-based storage systems
US20170192889A1 (en) Parallel processing of a series of data units for writing
TWI544334B (zh) 資料儲存裝置與資料儲存裝置操作方法
US9678760B2 (en) Memory card and storage system having authentication program and method for operating thereof
US11334415B2 (en) Data storage device and method for sharing memory of controller thereof
US11226868B2 (en) Replication link smoothing using historical data
WO2016041384A1 (zh) 重复数据删除方法和装置
US20210216220A1 (en) Storage device and operation method thereof
US9594675B2 (en) Virtualization of chip enables
EP3352071B1 (en) Data check method and storage system
CN109522154B (zh) 数据恢复方法及相关设备与系统
US20180267713A1 (en) Method and apparatus for defining storage infrastructure
US9262096B2 (en) Dynamic address mapping for finish in the field
KR20160070920A (ko) 맵 테이블을 갖는 컨트롤러 및 반도체 메모리 장치를 포함하는 메모리 시스템 및 그것의 동작 방법
WO2017020668A1 (zh) 一种物理磁盘的共享方法及装置
US11775183B2 (en) Storage device and operation method thereof
US11449270B2 (en) Address translation method and system for KV storage device
US20230384979A1 (en) Data processing method, apparatus, and system
US20220253381A1 (en) Memory system and non-transitory computer readable recording medium
US10489321B1 (en) Performance improvement for an active-active distributed non-ALUA system with address ownerships
US10108340B2 (en) Method and system for a common processing framework for memory device controllers

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16883415

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16883415

Country of ref document: EP

Kind code of ref document: A1