WO2018113322A1 - Method and device for reading data - Google Patents

Method and device for reading data Download PDF

Info

Publication number
WO2018113322A1
WO2018113322A1 PCT/CN2017/097682 CN2017097682W WO2018113322A1 WO 2018113322 A1 WO2018113322 A1 WO 2018113322A1 CN 2017097682 W CN2017097682 W CN 2017097682W WO 2018113322 A1 WO2018113322 A1 WO 2018113322A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
target
record
address
lun
Prior art date
Application number
PCT/CN2017/097682
Other languages
French (fr)
Chinese (zh)
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 WO2018113322A1 publication Critical patent/WO2018113322A1/en

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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • 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/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • 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/0629Configuration or reconfiguration of storage systems

Definitions

  • the embodiments of the present invention relate to the field of storage technologies, and in particular, to a data reading method and device.
  • the storage device has its own interface and protocol, and is connected to the host computer through a coaxial cable, a network cable, an optical fiber, or the like.
  • the storage device can provide disk space to the computer host through a logical unit number (LUN). Specifically, the disk space of the storage device is divided into multiple blocks, and each block corresponds to one LUN.
  • LUN logical unit number
  • the storage device receives the read command from the host computer, if there is a disk bad track or data corruption in the block corresponding to a certain LUN, the correct data cannot be read from the corresponding storage location of the LUN.
  • the mirrored LUN exists on the LUN, check whether the data corresponding to the mirrored LUN meets the data consistency status. If the data is consistent, the data is read from the storage space corresponding to the mirrored LUN and returned to the host. The data is fetched and written into the storage space corresponding to the LUN. If they are inconsistent, the medium error information is returned to the host computer.
  • data can be read from the mirrored LUN only when the data corresponding to the mirrored LUN meets the data consistency status. If there is some data in the storage space corresponding to the LUN, even if the mirrored LUN does not meet the data consistency status, the mirrored LUN does not meet the data consistency status. The correct data cannot be obtained from the mirrored LUN, resulting in the inability to fully utilize the redundant data of the storage system.
  • Embodiments of the present invention provide a data reading method and device to improve utilization of redundant data of a storage system.
  • an embodiment of the present invention provides a data reading method, including:
  • the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to a redundant view, and the redundancy
  • the remaining view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
  • the first record item further stores a second start address and a second data length of the second redundant data; determining an address space corresponding to the first start address and the first data length, and the second The identifier of the target LUN in the corresponding first record entry is the identifier of the target LUN corresponding to the data to be read when the address space corresponding to the first address and the second data length are overlapped.
  • the source LUN corresponds to a redundant view
  • the redundant view includes at least one first record item, where each first record item stores an identifier of a target LUN that performs redundant storage on at least part of the data in the source LUN, so that the source is in the source
  • the data in the data meets the data consistency.
  • the first record in the redundant view corresponding to the data to be read is obtained, and the identifier of the target LUN corresponding to the data to be read is determined; and the identifier of the target LUN corresponding to the data to be read is determined.
  • the first redundant data is read to improve the utilization of redundant data in the storage system.
  • the storage space corresponding to the source LUN is divided into a plurality of data blocks, wherein each of the data blocks respectively corresponds to a redundant view;
  • Determining, according to the first start address, the first data length, and the redundant view, the identifier of the target LUN corresponding to the data to be read including:
  • the first record item further stores a second start address and a second data length of the second redundant data, where the second start address and the second data length form The second address space is a subset of the address space of the data block;
  • the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
  • the storage space corresponding to the source LUN is divided into multiple data blocks, and each data block has a corresponding redundant view. In this way, as long as the target data block corresponding to the data to be read is found, the first record item can be traversed only in the target data block, which reduces the traversal time and improves the efficiency of reading the data.
  • the priority of each target LUN is also stored in the first record item
  • the target LUN in the target record item For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
  • the method further includes:
  • the redundant view corresponding to the two target data blocks is processed by inserting the record items.
  • the priority of the target LUN stored in each of the first records in the redundant view corresponding to each of the second target data blocks and the target stored in the second record Priority of the LUN, the processing of inserting the record entry into the redundant view corresponding to each of the second target data blocks including:
  • the record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
  • each second target data block traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
  • the method further includes:
  • the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
  • the redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
  • the fifth start address and the fifth data length and the fourth start in each fourth record item in the redundant view corresponding to each of the third target data blocks are processed by deleting the record of the redundant view corresponding to each of the third target data blocks, including:
  • the redundant view corresponding to the third target data block is deleted according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length
  • the processing of records including:
  • the starting address and data length of the R1 are as follows:
  • the starting address and data length of the R2 are as follows:
  • the processing of deleting a record item in the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2 includes:
  • the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record
  • the address is D5
  • the data length is D6-D5
  • the starting address in the sixth record is D6+L6
  • the data length is D5+L5-D6-L6;
  • the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
  • the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5.
  • the data length is D6-D5.
  • an embodiment of the present invention provides a storage device, including:
  • a receiving module configured to acquire a read command of the host, where the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to redundancy View, the redundant view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
  • a processing module configured to determine, according to the first start address, the first data length, and the redundant view, the data to be read, when the data in the storage space corresponding to the source LUN is unreadable The identifier of the target LUN is read, and the first redundant data is read according to the identifier of the target LUN corresponding to the data to be read;
  • a sending module configured to return the first redundant data to the host.
  • the storage space corresponding to the source LUN is divided into a plurality of data blocks, wherein each of the data blocks corresponds to a redundant view; the processing module is specifically configured to:
  • the first record item further stores a second start address and a second data length of the second redundant data, where the second start address and the second data length form The second address space is a subset of the address space of the data block;
  • the processing module is specifically configured to:
  • the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
  • the priority of each target LUN is also stored in the first record item
  • the processing module is specifically configured to:
  • the target LUN in the target record item For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
  • processing module is further configured to:
  • the identifier of the target LUN corresponding to the data and the priority of the target LUN;
  • the redundant view corresponding to the two target data blocks is processed by inserting the record items.
  • the processing module is specifically configured to:
  • the record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
  • each second target data block traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
  • processing module is further configured to:
  • the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
  • the redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
  • the processing module is specifically configured to:
  • the processing module is specifically configured to:
  • the starting address and data length of the R1 are as follows:
  • the starting address and data length of the R2 are as follows:
  • the processing module is specifically configured to:
  • the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record
  • the address is D5
  • the data length is D6-D5
  • the starting address in the sixth record is D6+L6
  • the data length is D5+L5-D6-L6;
  • the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
  • the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5.
  • the data length is D6-D5.
  • the embodiment of the present invention further provides a storage device, where the storage device includes at least one processor and a memory; the memory stores a computer to execute an instruction; and the at least one processor executes the computer execution of the memory storage
  • the instructions cause the storage device to be as described above in the first aspect and the data reading method of the various possible designs of the first aspect.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer execution instructions, when the at least one processor of the storage device executes the computer execution instruction, the storage device performs the above Various data reading methods that may be provided by the design.
  • an embodiment of the present invention further provides a computer program product, the computer program product comprising computer execution instructions, the computer execution instructions being stored in a computer readable storage medium.
  • At least one processor of the storage device can read the computer-executable instructions from a computer readable storage medium, and the at least one processor executes the computer-executable instructions to cause the storage device to implement the data reading method provided by various possible designs in the foregoing method embodiments .
  • the data reading method and device provided in this embodiment have a redundant view corresponding to the source LUN, and the redundant view includes At least one first record item, each of the first record items stores an identifier of the target LUN that is used to store at least part of the data in the source LUN, so that the data in the storage space corresponding to the source LUN cannot be read.
  • the data of the source LUN is not required to be consistent with the data in the target LUN.
  • the first record in the redundant view corresponding to the data to be read is obtained, and the target LUN corresponding to the data to be read is determined.
  • the first redundant data is read according to the identifier of the target LUN corresponding to the data to be read, thereby improving the utilization of redundant data in the storage system.
  • FIG. 1 is a schematic structural diagram 1 of a storage device according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart 1 of a data reading method according to an embodiment of the present invention.
  • FIG. 3 is a corresponding relationship diagram between a data block and a redundant view according to an embodiment of the present invention
  • FIG. 4 is a schematic flowchart 2 of a data reading method according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of inserting a redundant view record item according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart 1 of deleting a redundant view record item according to an embodiment of the present invention.
  • FIG. 7 is a schematic flowchart 2 of deleting a redundant view record item according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram 2 of a storage device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram 3 of a storage device according to an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram 1 of a storage device according to an embodiment of the present invention.
  • the storage device provided in this embodiment is relatively independent from the computer host, has its own interface and protocol, and is connected to the computer host through a coaxial cable, a network cable, an optical fiber, or the like.
  • the storage device can provide disk space to the host computer through a logical unit number (LUN).
  • LUN logical unit number
  • the storage device of this embodiment includes software and hardware.
  • the software of the storage device contains the operating system and software modules.
  • the operating system provides the basic operating system for the software to run.
  • the software module can implement functions such as reading and repairing data.
  • the hardware of the storage device includes multiple hard disks, interface cards, a central processing unit (CPU), and memory.
  • the multiple hard disks can provide the hard disk storage space corresponding to the LUN.
  • An interface card is used to connect to a host computer or other storage device.
  • Other storage devices store redundant data such as remote replication.
  • the CPU and memory provide the basic hardware platform required for the operating system and software modules.
  • FIG. 1 shows a possible structure of the storage device of the embodiment.
  • the components such as the hard disk and the CPU are provided, the protection scope of the present invention belongs to the present invention.
  • this embodiment will not be described herein.
  • the storage space corresponding to the source LUN is divided into multiple data blocks, and the storage information of the redundant data of each data block is redundant.
  • the view mode is organized. When some data blocks of the source LUN are damaged, the target LUN is found through the redundant view, and the data is read from the target LUN and automatically repaired. The data consistency status is not required, and the storage system is improved. rate.
  • the data reading method provided by the embodiment of the present invention is described in detail below by using a detailed embodiment.
  • FIG. 2 is a schematic flowchart 1 of a data reading method according to an embodiment of the present invention.
  • the execution body of this embodiment is the above-described storage device. As shown in Figure 1, the method includes:
  • the source LUN corresponds to a redundant view, and the redundant view includes at least one first record item, and each of the first record items stores redundant storage of at least part of the data in the source LUN.
  • the identity of the target LUN corresponds to a redundant view, and the redundant view includes at least one first record item, and each of the first record items stores redundant storage of at least part of the data in the source LUN.
  • the storage device When the host reads the data stored in the storage device, the storage device receives the read instruction of the host, where the read command includes the identifier of the source LUN and the first start address and the first data length of the data to be read.
  • the ID of the source LUN can be, for example, the number of the LUN, such as LUN_0, LUN_1, and LUN_N.
  • the source LUN corresponds to a redundant view.
  • the redundant view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundant storage on at least part of the data in the source LUN.
  • the data stored in the storage space corresponding to the target LUN may be redundant data such as mirroring, cloning, active-active, copy, snapshot, synchronous remote replication, and asynchronous remote replication.
  • the target LUN can be one or more, for example, the mirror corresponds to a target LUN, and the synchronization is performed.
  • the remote replication corresponds to a target LUN. In this embodiment, the number of target LUNs and the type of redundant data are not particularly limited.
  • S102 Determine, according to the first start address, the first data length, and the redundant view, a target corresponding to the data to be read, when the data in the storage space corresponding to the source LUN is unreadable. ID of the LUN.
  • the storage device cannot read the correct data from the storage space to the host.
  • the first record corresponding to the data to be read is determined in the redundant view according to the first start address and the first data length, and the first record corresponding to the data to be read is obtained for reading. ID of the target LUN corresponding to the data taken.
  • the first record item stores an identifier of the target LUN, a second start address of the second redundant data, and a second data length.
  • the first record entry is the identifier of the target LUN corresponding to the data to be read.
  • the first record item may be traversed until the data to be read is obtained.
  • a plurality of target records wherein the redundant data corresponding to the plurality of target records can be integrated into the complete data to be read, and the identifiers of the target LUNs in the plurality of target records are all corresponding to the data to be read. ID of the target LUN.
  • the target LUN corresponding to the data to be read is at least one, and the redundant data is read from the storage space corresponding to each target LUN according to the identifier of the target LUN corresponding to the data to be read, thereby completing the to-be-read The reading of the first redundant data corresponding to the data.
  • the address is generally represented by hexadecimal, for example 0x1000, and the data length is represented by sector sectors.
  • the decimal is taken as an example to illustrate that the hexadecimal is similar to this. For example, if the starting address of the data to be read is 50 and the data length is 250, the ending address is 300.
  • the ID of the target LUN corresponding to the data to be read is LUN_1, LUN_3, and LUN_4, and the data to be read exists.
  • the first redundant data is read, the first redundant data is returned to the host, and the first redundant data is written into the corresponding source LUN to complete the repair of the source LUN.
  • the data reading method provided in this embodiment has a redundant view corresponding to the source LUN, and the redundant view includes at least one first record item, and each of the first record items stores redundancy for at least part of the data in the source LUN.
  • the identifier of the target LUN is stored.
  • the first record item in the redundant view corresponding to the data determines the identifier of the target LUN corresponding to the data to be read; and reads the first redundant data according to the identifier of the target LUN corresponding to the data to be read, thereby improving the storage system. Utilization of redundant data.
  • the storage space corresponding to the source LUN may be divided into multiple data blocks, and each data block has its own corresponding Redundant view.
  • the first record item can be traversed only in the target data block, which reduces the traversal time.
  • S102 in FIG. 1 can be implemented by S1021 and S1022 as follows.
  • S1021 determining, according to the first start address, the first data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read;
  • a first address space corresponding to the data to be read Determining, according to the first start address of the data to be read and the first data length, a first address space corresponding to the data to be read. Then, according to the address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read is obtained.
  • the identifier of the source LUN corresponds to an address space of each of the plurality of data blocks in which the storage space is divided.
  • the first address space is [50, 300]
  • the data length of each data block is 200
  • the start address of the data block starts from 0,
  • the address space of each of the plurality of data blocks is [0, 200], [201, 400], [401, 600], etc.
  • the first address space corresponds to two consecutive data blocks of address space [0, 200], [200, 400].
  • S1022 Determine, according to the first record item in the redundancy view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the data to be read.
  • the first record item stores an identifier of the target LUN corresponding to the storage space in which the data in the data block is redundantly stored.
  • the redundant view includes a plurality of first entries.
  • the first address space may be determined according to the first start address and the first data length; and the second address space corresponding to the first record item in the redundant view corresponding to each first target data block according to the first address space , OK And a target record item corresponding to the second address space that has an intersection with the first address space; and determining, according to each target record item, an identifier of the target LUN corresponding to the data to be read.
  • the redundant data in the storage space corresponding to the target LUN in each of the first target records is part or all of the data to be read, that is, the data to be read is redundantly stored in one or more target LUNs. Therefore, the target record corresponding to the second address space in which the first address space exists is determined, and the identifiers of all the target LUNs corresponding to the storage space where the redundant data of the data to be read is located are obtained.
  • the first address space is [50, 300] spanning two consecutive blocks of data.
  • the second address space that intersects the first address space is [30, 70], [60, 200], [200, 310], and the identifiers of the corresponding target LUNs are LUN_1, LUN_3, and LUN_4. It can be seen that the first address space is a subset of consecutive address spaces formed by the above three second address spaces, indicating that the complete data to be read can be obtained.
  • FIG. 3 is a corresponding relationship diagram between a data block and a redundant view according to an embodiment of the present invention. As shown in FIG. 3, the storage space corresponding to a single LUN is divided into a plurality of 16 MB data blocks, and each data block corresponds to a plurality of records of the redundant view of the data block.
  • the record item is referred to as a first record item. The contents of the entry are described in detail below.
  • LBA logical block address: the starting address of redundant data
  • Target LUN ID ID of the target LUN corresponding to this entry.
  • PRI priority: The priority of the restoration of this entry can be expressed by numbers or letters, for example, the priority is A, and the priority is B.
  • the starting address and the data length form an address space of redundant data.
  • each record item is different, and may be the same priority, but the address space is different, or the address space has an intersection, but the priority of the target LUN is different.
  • the address space corresponding to each record item is a subset or a complete set of the address space formed by the start address and the data length of the data block.
  • the priority is determined in principle based on the relationship between the target LUN and the source LUN.
  • the target LUN includes mirroring, cloning, active-active, copy, snapshot, synchronous remote replication, asynchronous remote replication, and the like.
  • the recovery priority is from high to low for Mirroring > Clone > Active & Active > Copy > Snapshot > Synchronous Remote Replication > Asynchronous Remote Replication.
  • This example is only an example of the priority.
  • the priority can be set according to the relationship between the target LUN and the source LUN and the performance of the target LUN. This embodiment will not be repeated here.
  • the optimal recovery path can be used to recover data and read data based on the priority.
  • the third address space for each first target data block is determined according to the first address space and the address space corresponding to each data block.
  • the first address space is [50, 300], and the data length of each data block is 200.
  • the first address space corresponds to two consecutive data blocks of address space [0, 200], [200, 400].
  • the third address space of the data to be read for the two first target data blocks is [50, 200], [200, 300], respectively.
  • a target record item is acquired.
  • the third address space [50, 200] will be described in detail as an example.
  • each of the first entries in the redundant view is arranged in descending order of priority of the target LUN. That is, the first record corresponding to the target LUN with the highest priority is ranked first, and the first record corresponding to the target LUN with the lower priority is the first record.
  • each first record item in the redundant view is traversed, and a second intersection with the third address space is obtained.
  • a target record corresponding to the address space, and the third address space is a subset of the address space formed by the at least one second address space.
  • the target LUN in the target record has a higher priority than the other first records. The priority of the target LUN in the entry.
  • FIG. 4 is a schematic flowchart 2 of a data reading method according to an embodiment of the present invention. As shown in FIG. 4, the method includes:
  • the first first record in the redundant view is obtained, that is, the record with the highest priority. If the second address space corresponding to the first record item is [20, 40], and there is no intersection with the remaining address space [50, 200] of the third address space, the next first record item is obtained, that is, the priority is An advanced record item; if the second address space corresponding to the first record item is [30, 100], there is an intersection [50, 100] with the remaining address space [50, 200] of the third address space, but the third If the address space [50, 200] is not a subset of the second address space [30, 100], the next first record item is obtained; if the second address space corresponding to the next first record item is [80, 200], There is an intersection [101, 200] with the remaining address space [101, 200] of the third address space, and the third address space [50, 200] is a child of the address space [30, 100] formed by at least one second address space.
  • the set reads the redundant data, that is, sequentially reads the redundant data of the intersection portion from the second address space. Then, the redundant data is returned to the host. If all the first entries are traversed, and the third address space is not a subset of the address space formed by the at least one second address space, the media error is returned to the host and cannot be read. Take data.
  • the redundant data acquired according to the priority is used to obtain the optimal path of the redundant data, that is, the complete redundant data corresponding to the data to be read can be obtained in the shortest time.
  • the redundant data is obtained from the target LUN according to the redundant view, because the data of the storage space corresponding to the source LUN is synchronized to the storage space corresponding to the target LUN.
  • the record corresponding to the redundant data is inserted into the redundant view.
  • the following describes a specific implementation process of inserting a record item corresponding to redundant data into a redundant view by using a specific embodiment.
  • FIG. 5 is a schematic flowchart of inserting a redundant view record item according to an embodiment of the present invention. As shown in FIG. 5, the method includes:
  • the second record item includes a third start address and a third data length of the third redundant data, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN.
  • S302. Determine, according to the third start address, the third data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one second target data block corresponding to the third redundant data.
  • determining the at least one second target data block in step 302 is similar to the implementation of determining the at least one first target data block in step 102, and details are not described herein again.
  • the redundant view corresponding to the second target data block performs processing of inserting the record item.
  • the second record item when the address space corresponding to the third start address and the third data length in the second record item spans multiple data blocks, the second record item needs to be split into a plurality of third record items.
  • the third start address in the second record and the address space corresponding to the third data length correspond to only one data block, the second record item is equivalent to the third record item.
  • the address space formed by the third start address and the third data length in the second record item is split into multiple according to the address space of the data block. Address spaces to form a plurality of third entries. In each third entry, the identity of the target LUN and the priority of the target LUN are the same as the second entry in the split.
  • each first record item in the redundant view is traversed according to the order of priority of each first record item in the redundant view corresponding to the second target data block from high to low.
  • the priority of the target LUN in the third entry is 3, and the priority of each first entry in the redundant view is 1st, 2nd, 3rd, 4th, and 5th.
  • the third record item is inserted before the first record item.
  • a person skilled in the art can understand that if there is a first record item with a priority level of 3, it is determined whether the third record item has an intersection with the first record item, and if there is an intersection, the merge process can be performed. For example, if the address space corresponding to the first record with priority level 3 is [50, 100] and the address space corresponding to the third record item is [80, 120], the merge processing is performed, and the above two items are merged into [50, 120], that is, the inserted record item has a data start address of 50 and a data length of 70.
  • the data is synchronized to the target LUN.
  • the source LUN and the target LUN are in the previous cycle before the data is newly written to the source LUN. Synchronous, therefore, there is a historical redundant record record that the target LUN is redundant data of the source LUN. Because the data is newly written, the source LUN data has changed but has not been synchronized to the target LUN, so the target LUN is The data at this location is no longer redundant data, but erroneous data, so when writing data in the source LUN, you need to delete the entries in the redundant view.
  • FIG. 6 is a schematic flowchart 1 of deleting a redundant view record item according to an embodiment of the present invention. As shown in FIG. 6, the method includes:
  • the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length.
  • S402. Determine, according to the fourth start address, the fourth data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one third target corresponding to the newly written data. data block.
  • determining the at least one third target data block in step 402 is similar to the implementation of determining the at least one first target data block in step 102, and details are not described herein again.
  • each third target The redundant view corresponding to the data block performs the processing of deleting the record item. For details, refer to step 403 and step 404.
  • S403. Determine, according to the fourth start address, the fourth data length, and an address space of each data block, a sixth start address and a sixth of the new write data for each third target data block. Data length and fourth address space.
  • the implementation manner of determining the fourth address space in this embodiment is similar to the implementation manner of the third address space, and details are not described herein again.
  • the partial data corresponding to the fourth record item is the address space before the update. Redundant data is not redundant data corresponding to newly written data, so it needs to be deleted.
  • FIG. 7 is a schematic flowchart 2 of deleting a redundant view record item according to an embodiment of the present invention. As shown in FIG. 7, the method includes:
  • R1 the starting address and data length of R1 are as follows:
  • the starting address and data length of R2 are as follows:
  • R2_lba D6+L6;
  • R2_len D5+L5-D6-L6
  • the R1_lba is the starting address of the first decomposition space
  • the R1_len is the data length of the first decomposition space
  • the R2_lba is The starting address of the second decomposition space
  • the R2_len is the data length of the second decomposition space
  • the D5 is the fifth start address
  • the D6 is the sixth start address
  • the L5 is the fifth Data length
  • the L6 is a sixth data length
  • S504 and S506 are one of the relationships, that is, the three cases cannot exist at the same time, and only one of the three can exist.
  • the three cases are respectively illustrated by examples.
  • the traversal process of this embodiment traverses each record item in the redundant view until all record item traversal is completed.
  • the data reading method provided by the embodiment of the present invention can avoid the problem that the upper layer error causes the service interruption due to bad sectors or partial erroneous data of the hard disk, and the LUN is dispersed in the storage system through the redundant view mode.
  • the redundant data blocks in various places are organized, and the data can be read in a small range to complete the automatic repair of bad track data or error data, thereby improving the data reliability of the source LUN.
  • the solution provided by the embodiment of the present invention is introduced for the functions implemented by the storage device.
  • the storage device includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above functions.
  • the embodiments of the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present invention.
  • the embodiment of the present invention may divide the function module into the storage device according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software function module. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 8 is a schematic structural diagram 2 of a storage device according to an embodiment of the present invention.
  • the storage device 10 includes a receiving module 11, a processing module 12, and a sending module 13. among them
  • the receiving module 11 is configured to acquire a read command of the host, where the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to redundancy.
  • the redundant view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
  • the processing module 12 is configured to determine, according to the first start address, the first data length, and the redundant view, that the data to be read is determined when the data in the storage space corresponding to the source LUN is unreadable The identifier of the target LUN corresponding to the data, and the first redundant data is read according to the identifier of the target LUN corresponding to the data to be read;
  • the sending module 13 is configured to return the first redundant data to the host.
  • the storage space corresponding to the source LUN is divided into multiple data blocks, where each of the data blocks respectively has a redundant view; the processing module 12 is specifically configured to:
  • the first record item further stores a second start address and a second data length of the second redundant data, and the second start address and the second address formed by the second data length Space is a subset of the address space of the data block;
  • the processing module 12 is specifically configured to:
  • the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
  • the priority of each target LUN is also stored in the first record item
  • the processing module 12 is specifically configured to:
  • the target LUN in the target record item For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
  • processing module 12 is further configured to:
  • the identifier of the target LUN corresponding to the data and the priority of the target LUN;
  • the redundant view corresponding to the two target data blocks is processed by inserting the record items.
  • processing module 12 is specifically configured to:
  • the record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
  • each second target data block traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
  • processing module 12 is further configured to:
  • the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
  • the redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
  • processing module 12 is specifically configured to:
  • processing module 12 is specifically configured to:
  • the starting address and data length of the R1 are as follows:
  • the starting address and data length of the R2 are as follows:
  • processing module 12 is specifically configured to:
  • the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record
  • the address is D5 and the data length is D6-D5
  • the starting address in the sixth record is D6+L6
  • the data length is D5+L5-D6-L6;
  • the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
  • the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5.
  • the data length is D6-D5.
  • the storage device provided in this embodiment may be used to perform the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar.
  • the receiving module and the sending module may be implemented as a communication interface
  • the processing module may be implemented as a processor
  • the data and program code may be stored in the memory, and controlled by the processor according to the corresponding program instruction.
  • FIG. 9 is a schematic structural diagram 3 of a storage device according to an embodiment of the present invention.
  • the storage device 20 includes at least one processor 21, a memory 22, and a communication interface 23.
  • the at least one processor 21, the memory 22, and the communication interface 23 are each connected by a bus 24;
  • the memory 22 stores computer execution instructions;
  • the at least one processor 21 executes computer execution instructions stored by the memory 22.
  • the process of the storage device 20 obtaining the read command of the host through the communication interface 43, executing the above-described method embodiment according to the read command, and returning correct data to the host.
  • the processor 21 may be a central processing unit (English: Central Processing Unit, CPU for short), or may be other general-purpose processors, digital signal processors (English: Digital Signal Processor) , referred to as: DSP), ASIC (English: Application Specific Integrated Circuit, referred to as: ASIC).
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
  • the memory 22 may be any one or any combination of the following: a solid state drive (SSD), a mechanical hard disk, a magnetic disk, a disk array, and the like.
  • SSD solid state drive
  • the communication interface 23 may be an interface such as an interface card that establishes a connection with the host.
  • the bus 24 may include an address bus, a data bus, a control bus, etc., for convenience of representation, the bus is indicated by a thick line in FIG.
  • the bus may be any one or any combination of the following: an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, and an extended industry standard structure ( Extended Industry Standard Architecture (EISA) bus and other devices for wired data transmission.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer execution instructions, and when at least one processor of the storage device executes the computer execution instruction, the storage device executes the foregoing various It is possible to design a data reading method.
  • a computer program product is also provided in an embodiment of the invention, the computer program product comprising computer executed instructions stored in a computer readable storage medium.
  • At least one processor of the storage device can read the computer-executable instructions from a computer readable storage medium, and the at least one processor executes the computer-executable instructions to cause the storage device to implement the data reading method provided by various possible designs in the foregoing method embodiments .
  • the aforementioned program can be stored in a computer readable storage medium.
  • the course When the sequence is executed, the steps including the foregoing method embodiments are performed; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

Provided in the embodiments of the present invention are a method and a device for reading data. The method comprises: acquiring a reading instruction from a host, the reading instruction comprising the identifier of a source logical unit number (LUN) and the first starting address and the first data length of to-be-read data, the source LUN corresponding to a redundant view, the redundant view comprising at least one first record entry, the identifier of a target LUN, which redundantly stores at least part of the data of the source LUN, being stored in each first record entry; if it is determined that the data in the storage space corresponding to the source LUN can't be read, determining, according to the first starting address, the first data length and the redundant view, the identifier of the target LUN corresponding to the to-be-read data; and reading, according to the identifier of the target LUN corresponding to the to-be-read data, first redundant data, and feeding the first redundant data back to the host. The present embodiment can improve the utilization of redundant data of a storage system.

Description

数据读取方法及设备Data reading method and device 技术领域Technical field
本发明实施例涉及存储技术领域,尤其涉及一种数据读取方法及设备。The embodiments of the present invention relate to the field of storage technologies, and in particular, to a data reading method and device.
背景技术Background technique
随着计算机技术以及网络技术的高速发展,计算机自带的存储器逐渐难以满足存储需求,于是发展出相对独立的存储设备。该存储设备具有自己的接口和协议,通过同轴电缆、网线、光纤等方式与计算机主机连接。With the rapid development of computer technology and network technology, the memory that comes with the computer is gradually unable to meet the storage requirements, so a relatively independent storage device is developed. The storage device has its own interface and protocol, and is connected to the host computer through a coaxial cable, a network cable, an optical fiber, or the like.
现有技术中,该存储设备可以通过逻辑单元号(logical unit number,LUN)对计算机主机提供磁盘空间。具体地,将存储设备的磁盘空间划分为多个区块,每个区块对应一个LUN。当存储设备接收到计算机主机的读取指令时,若某个LUN对应的区块存在磁盘坏道或者数据损坏时,就无法从该LUN的对应存储位置读取到正确的数据。此时,如果该LUN存在镜像LUN,则查看该LUN与镜像LUN对应的数据是否满足数据一致性的状态,若一致,则从该镜像LUN对应的存储空间中读取数据,向计算机主机返回读取的数据,并将该数据写入该LUN对应的存储空间中,若不一致,则向计算机主机返回介质错误(Medium error)信息。In the prior art, the storage device can provide disk space to the computer host through a logical unit number (LUN). Specifically, the disk space of the storage device is divided into multiple blocks, and each block corresponds to one LUN. When the storage device receives the read command from the host computer, if there is a disk bad track or data corruption in the block corresponding to a certain LUN, the correct data cannot be read from the corresponding storage location of the LUN. If the mirrored LUN exists on the LUN, check whether the data corresponding to the mirrored LUN meets the data consistency status. If the data is consistent, the data is read from the storage space corresponding to the mirrored LUN and returned to the host. The data is fetched and written into the storage space corresponding to the LUN. If they are inconsistent, the medium error information is returned to the host computer.
然而,现有技术中,只有在该LUN与镜像LUN对应的数据满足数据一致性状态时,才可以从镜像LUN中读取数据。对于该LUN对应的存储空间中有部分损坏数据时,即使镜像LUN对应的存储空间中存储有该部分损坏数据对应的正确数据时,但由于该镜像LUN与该LUN不满足数据一致性状态,因此不能从该镜像LUN中获取正确的数据,导致无法充分利用存储系统的冗余数据。However, in the prior art, data can be read from the mirrored LUN only when the data corresponding to the mirrored LUN meets the data consistency status. If there is some data in the storage space corresponding to the LUN, even if the mirrored LUN does not meet the data consistency status, the mirrored LUN does not meet the data consistency status. The correct data cannot be obtained from the mirrored LUN, resulting in the inability to fully utilize the redundant data of the storage system.
发明内容Summary of the invention
本发明实施例提供一种数据读取方法及设备,以提高存储系统的冗余数据的利用率。Embodiments of the present invention provide a data reading method and device to improve utilization of redundant data of a storage system.
第一方面,本发明实施例提供一种数据读取方法,包括:In a first aspect, an embodiment of the present invention provides a data reading method, including:
获取主机的读取指令,所述读取指令中包括源逻辑单元号LUN的标识以及待读取数据的第一起始地址以及第一数据长度,所述源LUN对应有冗余视图,所述冗余视图包括至少一个第一记录项,每个所述第一记录项中存储有对所述源LUN中的至少部分数据进行冗余存储的目标LUN的标识;Obtaining a read instruction of the host, where the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to a redundant view, and the redundancy The remaining view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
在确定所述源LUN对应的存储空间中的数据无法读取时,根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识;可选地,第一记录项中还存储有第二冗余数据的第二起始地址和第二数据长度;在确定第一起始地址和第一数据长度对应的地址空间与第二起始地址和第二数据长度对应的地址空间存在交集时,可以确定对应的第一记录项中的目标LUN的标识为待读取的数据对应的目标LUN的标识;Determining, according to the first start address, the first data length, and the redundant view, the target LUN corresponding to the data to be read, when the data in the storage space corresponding to the source LUN is unreadable. Optionally, the first record item further stores a second start address and a second data length of the second redundant data; determining an address space corresponding to the first start address and the first data length, and the second The identifier of the target LUN in the corresponding first record entry is the identifier of the target LUN corresponding to the data to be read when the address space corresponding to the first address and the second data length are overlapped.
根据所述待读取数据对应的目标LUN的标识,读取第一冗余数据,并将所述第一冗余数据返回至所述主机。And reading, according to the identifier of the target LUN corresponding to the data to be read, the first redundant data, and returning the first redundant data to the host.
通过源LUN对应有冗余视图,冗余视图包括至少一个第一记录项,每个第一记录项中存储有对源LUN中的至少部分数据进行冗余存储的目标LUN的标识,使得在源LUN对应的存储空间中的数据无法读取时,不需要判断该源LUN中的数据是否与目标LUN 中的数据满足数据一致性,只要获取该待读取数据对应的冗余视图中的第一记录项,确定待读取数据对应的目标LUN的标识;根据待读取数据对应的目标LUN的标识,读取第一冗余数据,提高了存储系统中冗余数据的利用率。The source LUN corresponds to a redundant view, and the redundant view includes at least one first record item, where each first record item stores an identifier of a target LUN that performs redundant storage on at least part of the data in the source LUN, so that the source is in the source When the data in the storage space corresponding to the LUN cannot be read, you do not need to determine whether the data in the source LUN is related to the target LUN. The data in the data meets the data consistency. The first record in the redundant view corresponding to the data to be read is obtained, and the identifier of the target LUN corresponding to the data to be read is determined; and the identifier of the target LUN corresponding to the data to be read is determined. The first redundant data is read to improve the utilization of redundant data in the storage system.
在一种可能的设计中,所述源LUN对应的存储空间被划分为多个数据块,其中,每个所述数据块各自对应有冗余视图;In a possible design, the storage space corresponding to the source LUN is divided into a plurality of data blocks, wherein each of the data blocks respectively corresponds to a redundant view;
所述根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识,包括:Determining, according to the first start address, the first data length, and the redundant view, the identifier of the target LUN corresponding to the data to be read, including:
根据所述第一起始地址、第一数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述待读取的数据对应的至少一个第一目标数据块;Determining, according to the first start address, the first data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read;
根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to the first record item in the redundant view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the to-be-read data.
在一种可能的设计中,所述第一记录项中还存储有第二冗余数据的第二起始地址和第二数据长度,所述第二起始地址和所述第二数据长度形成的第二地址空间为数据块的地址空间的子集;In a possible design, the first record item further stores a second start address and a second data length of the second redundant data, where the second start address and the second data length form The second address space is a subset of the address space of the data block;
所述根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识,包括:Determining, according to the first record item in the redundancy view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the data to be read, including:
根据所述第一起始地址和所述第一数据长度,确定第一地址空间;Determining a first address space according to the first start address and the first data length;
根据所述第一地址空间、各所述第一目标数据块对应的冗余视图中的第一记录项对应的第二地址空间,确定与所述第一地址空间存在交集的第二地址空间对应的目标记录项,且所述第一地址空间是多个所述第二地址空间形成的地址空间的子集;Determining, according to the first address space, the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
根据各所述目标记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to each of the target record items, an identifier of the target LUN corresponding to the data to be read.
通过将源LUN对应的存储空间划分为多个数据块,每个数据块对应有各自的冗余视图。这样,只要找到对应待读取的数据对应的目标数据块,就可以只在该目标数据块中对第一记录项进行遍历,减少了遍历时间,提高了读取数据的效率。The storage space corresponding to the source LUN is divided into multiple data blocks, and each data block has a corresponding redundant view. In this way, as long as the target data block corresponding to the data to be read is found, the first record item can be traversed only in the target data block, which reduces the traversal time and improves the efficiency of reading the data.
在一种可能的设计中,所述第一记录项中还存储有各目标LUN的优先级;In a possible design, the priority of each target LUN is also stored in the first record item;
所述根据所述第一地址空间、各所述第一目标数据块的冗余视图中的第一记录项对应的第二地址空间,确定与所述第一地址空间存在交集的第二地址空间对应的目标记录项,包括:Determining, according to the first address space, the second address space corresponding to the first record item in the redundant view of each of the first target data blocks, determining a second address space that intersects with the first address space Corresponding target records, including:
根据所述第一地址空间以及每个数据块的地址空间,确定所述待读取数据针对每个第一目标数据块的第三地址空间;Determining, according to the first address space and an address space of each data block, the third address space of the data to be read for each first target data block;
针对任一第一目标数据块,根据所述冗余视图中的各第一记录项中的目标LUN的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,得到与所述第三地址空间存在交集的第二地址空间对应的目标记录项,且所述第三地址空间是至少一个所述第二地址空间形成的地址空间的子集,针对同一冗余数据,所述目标记录项中的目标LUN的优先级高于其它第一记录项中的目标LUN的优先级。For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
下面将详细说明在冗余视图中插入记录项的过程,本领域技术人员可以理解,在冗余视图中插入记录项的过程,可以不依赖于上述的可能的设计单独实现,也可以在上述可能的设计的基础上实现。The process of inserting a record item in the redundant view will be described in detail below, and those skilled in the art can understand that the process of inserting a record item in the redundant view can be implemented separately without depending on the above possible design, and may also be The design is based on the implementation.
在一种可能的设计中,所述方法还包括:In one possible design, the method further includes:
获取所述源LUN的标识、待插入冗余视图的第二记录项,所述第二记录项中包括第 三冗余数据的第三起始地址和第三数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Obtaining an identifier of the source LUN, a second record to be inserted into the redundant view, where the second record includes a third start address and a third data length of the three redundant data, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
根据所述第三起始地址、第三数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述第三冗余数据对应的至少一个第二目标数据块;Determining, according to the third start address, the third data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one second target data block corresponding to the third redundant data;
根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理。And according to the priority of the target LUN stored in each first record in the redundant view corresponding to each of the second target data blocks, and the priority of the target LUN stored in the second record, The redundant view corresponding to the two target data blocks is processed by inserting the record items.
在一种可能的设计中,所述根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理,包括:In a possible design, the priority of the target LUN stored in each of the first records in the redundant view corresponding to each of the second target data blocks and the target stored in the second record Priority of the LUN, the processing of inserting the record entry into the redundant view corresponding to each of the second target data blocks, including:
根据所述第三起始地址、所述第三数据长度以及每个数据块的地址空间,确定所述第三冗余数据针对每个第二目标数据块的第三记录项,所述第三记录项中包括第四起始地址、第四数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Determining, according to the third start address, the third data length, and an address space of each data block, a third record of the third redundant data for each second target data block, the third The record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
针对任一第二目标数据块,根据所述第二目标数据块对应的冗余视图中的各第一记录项的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,直至所述第三记录项中的目标LUN的优先级高于第一记录项中的目标LUN的优先级为止,将所述第三记录项插入到该第一记录项之前。For each second target data block, traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
下面将详细说明在冗余视图中删除记录项的过程,本领域技术人员可以理解,在冗余视图中删除记录项的过程,可以不依赖于上述的可能的设计单独实现,也可以在上述可能的设计的基础上实现。The process of deleting a record item in the redundant view will be described in detail below. Those skilled in the art can understand that the process of deleting a record item in the redundant view can be implemented separately without depending on the above possible design, and may also be The design is based on the implementation.
在一种可能的设计中,所述方法还包括:In one possible design, the method further includes:
获取所述源LUN对应的存储空间的新写入数据的写入信息,所述写入信息包括所述源LUN的标识、所述新写入数据的第四起始地址和第四数据长度;Obtaining the write information of the newly written data of the storage space corresponding to the source LUN, where the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
根据所述新写入数据的第四起始地址、第四数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述新写入数据对应的至少一个第三目标数据块;Determining, according to the fourth start address, the fourth data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one third target data block corresponding to the newly written data. ;
根据各所述第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、所述第四起始地址和所述第四数据长度,对各所述第三目标数据块对应的冗余视图进行删除记录项的处理。And according to the fifth start address and the fifth data length, the fourth start address, and the fourth data length in each fourth record item in the redundant view corresponding to each of the third target data blocks, The redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
在一种可能的设计中,所述根据各所述第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、所述第四起始地址和所述第四数据长度,对各所述第三目标数据块对应的冗余视图进行删除记录项的处理,包括:In a possible design, the fifth start address and the fifth data length and the fourth start in each fourth record item in the redundant view corresponding to each of the third target data blocks The address and the fourth data length are processed by deleting the record of the redundant view corresponding to each of the third target data blocks, including:
根据所述第四起始地址、所述第四数据长度以及每个数据块的地址空间,确定所述新写入数据针对每个第三目标数据块的第六起始地址和第六数据长度以及第四地址空间;Determining, according to the fourth start address, the fourth data length, and an address space of each data block, a sixth start address and a sixth data length of the new write data for each third target data block. And a fourth address space;
遍历所述冗余视图中的每个第四记录项,若所述第四记录项对应的第五地址空间与所述第四地址空间存在交集,则根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。Traversing each fourth record item in the redundant view, if the fifth address space corresponding to the fourth record item and the fourth address space have an intersection, according to the fifth start address, the fifth The data length, the sixth start address, and the sixth data length are processed by deleting the record item in the redundant view corresponding to the third target data block.
在一种可能的设计中,所述根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理,包括: In a possible design, the redundant view corresponding to the third target data block is deleted according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length The processing of records, including:
根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度建立第一分解空间R1和第二分解空间R2;Establishing a first decomposition space R1 and a second decomposition space R2 according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length;
其中,所述R1的起始地址和数据长度如下:The starting address and data length of the R1 are as follows:
R1_lba=D5;R1_len=D6-D5;R1_lba=D5; R1_len=D6-D5;
其中,所述R2的起始地址和数据长度如下:The starting address and data length of the R2 are as follows:
R2_lba=D6+L6;R2_len=D5+L5-D6-L6,其中,所述R1_lba为所述第一分解空间的起始地址,所述R1_len为所述第一分解空间的数据长度,所述R2_lba为所述第二分解空间的起始地址,所述R2_len为所述第二分解空间的数据长度,所述D5为第五起始地址、所述D6为第六起始地址、所述L5为第五数据长度、所述L6为第六数据长度;R2_lba=D6+L6; R2_len=D5+L5-D6-L6, wherein R1_lba is a starting address of the first decomposition space, the R1_len is a data length of the first decomposition space, and the R2_lba For the start address of the second decomposition space, the R2_len is the data length of the second decomposition space, the D5 is the fifth start address, the D6 is the sixth start address, and the L5 is a fifth data length, wherein the L6 is a sixth data length;
根据所述R1的数据长度和所述R2的数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。And processing the deleted record item on the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2.
在一种可能的设计中,所述根据所述R1的数据长度和所述R2的数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理,包括:In a possible design, the processing of deleting a record item in the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2 includes:
若所述R1的数据长度大于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项和第六记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record The address is D5, the data length is D6-D5, the starting address in the sixth record is D6+L6, and the data length is D5+L5-D6-L6;
若所述R1的数据长度大于0,所述R2的数据长度小于等于0,则删除所述第四记录项,并插入第六记录项,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is less than or equal to 0, the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
若所述R1的数据长度小于等于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5。If the data length of the R1 is less than or equal to 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5. The data length is D6-D5.
第二方面,本发明实施例提供一种存储设备,包括:In a second aspect, an embodiment of the present invention provides a storage device, including:
接收模块,用于获取主机的读取指令,所述读取指令中包括源逻辑单元号LUN的标识以及待读取数据的第一起始地址以及第一数据长度,所述源LUN对应有冗余视图,所述冗余视图包括至少一个第一记录项,每个所述第一记录项中存储有对所述源LUN中的至少部分数据进行冗余存储的目标LUN的标识;a receiving module, configured to acquire a read command of the host, where the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to redundancy View, the redundant view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
处理模块,用于在确定所述源LUN对应的存储空间中的数据无法读取时,根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识,根据所述待读取数据对应的目标LUN的标识,读取第一冗余数据;a processing module, configured to determine, according to the first start address, the first data length, and the redundant view, the data to be read, when the data in the storage space corresponding to the source LUN is unreadable The identifier of the target LUN is read, and the first redundant data is read according to the identifier of the target LUN corresponding to the data to be read;
发送模块,用于将所述第一冗余数据返回至所述主机。And a sending module, configured to return the first redundant data to the host.
在一种可能的设计中,所述源LUN对应的存储空间被划分为多个数据块,其中,每个所述数据块各自对应有冗余视图;所述处理模块具体用于:In a possible design, the storage space corresponding to the source LUN is divided into a plurality of data blocks, wherein each of the data blocks corresponds to a redundant view; the processing module is specifically configured to:
根据所述第一起始地址、第一数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述待读取的数据对应的至少一个第一目标数据块;Determining, according to the first start address, the first data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read;
根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to the first record item in the redundant view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the to-be-read data.
在一种可能的设计中,所述第一记录项中还存储有第二冗余数据的第二起始地址和第二数据长度,所述第二起始地址和所述第二数据长度形成的第二地址空间为数据块的地址空间的子集;In a possible design, the first record item further stores a second start address and a second data length of the second redundant data, where the second start address and the second data length form The second address space is a subset of the address space of the data block;
所述处理模块具体用于: The processing module is specifically configured to:
根据所述第一起始地址和所述第一数据长度,确定第一地址空间;Determining a first address space according to the first start address and the first data length;
根据所述第一地址空间、各所述第一目标数据块对应的冗余视图中的第一记录项对应的第二地址空间,确定与所述第一地址空间存在交集的第二地址空间对应的目标记录项,且所述第一地址空间是多个所述第二地址空间形成的地址空间的子集;Determining, according to the first address space, the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
根据各所述目标记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to each of the target record items, an identifier of the target LUN corresponding to the data to be read.
在一种可能的设计中,所述第一记录项中还存储有各目标LUN的优先级;In a possible design, the priority of each target LUN is also stored in the first record item;
所述处理模块具体用于:The processing module is specifically configured to:
根据所述第一地址空间以及每个数据块的地址空间,确定所述待读取数据针对每个第一目标数据块的第三地址空间;Determining, according to the first address space and an address space of each data block, the third address space of the data to be read for each first target data block;
针对任一第一目标数据块,根据所述冗余视图中的各第一记录项中的目标LUN的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,得到与所述第三地址空间存在交集的第二地址空间对应的目标记录项,且所述第三地址空间是至少一个所述第二地址空间形成的地址空间的子集,针对同一冗余数据,所述目标记录项中的目标LUN的优先级高于其它第一记录项中的目标LUN的优先级。For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
在一种可能的设计中,所述处理模块还用于:In one possible design, the processing module is further configured to:
获取所述源LUN的标识、待插入冗余视图的第二记录项,所述第二记录项中包括第三冗余数据的第三起始地址和第三数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Obtaining an identifier of the source LUN, a second record to be inserted into the redundant view, where the second record includes a third start address and a third data length of the third redundant data, and the third redundancy The identifier of the target LUN corresponding to the data and the priority of the target LUN;
根据所述第三起始地址、第三数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述第三冗余数据对应的至少一个第二目标数据块;Determining, according to the third start address, the third data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one second target data block corresponding to the third redundant data;
根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理。And according to the priority of the target LUN stored in each first record in the redundant view corresponding to each of the second target data blocks, and the priority of the target LUN stored in the second record, The redundant view corresponding to the two target data blocks is processed by inserting the record items.
在一种可能的设计中,所述处理模块具体用于:In one possible design, the processing module is specifically configured to:
根据所述第三起始地址、所述第三数据长度以及每个数据块的地址空间,确定所述第三冗余数据针对每个第二目标数据块的第三记录项,所述第三记录项中包括第四起始地址、第四数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Determining, according to the third start address, the third data length, and an address space of each data block, a third record of the third redundant data for each second target data block, the third The record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
针对任一第二目标数据块,根据所述第二目标数据块对应的冗余视图中的各第一记录项的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,直至所述第三记录项中的目标LUN的优先级高于第一记录项中的目标LUN的优先级为止,将所述第三记录项插入到该第一记录项之前。For each second target data block, traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
在一种可能的设计中,所述处理模块还用于:In one possible design, the processing module is further configured to:
获取所述源LUN对应的存储空间的新写入数据的写入信息,所述写入信息包括所述源LUN的标识、所述新写入数据的第四起始地址和第四数据长度;Obtaining the write information of the newly written data of the storage space corresponding to the source LUN, where the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
根据所述新写入数据的第四起始地址、第四数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述新写入数据对应的至少一个第三目标数据块;Determining, according to the fourth start address, the fourth data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one third target data block corresponding to the newly written data. ;
根据各所述第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、所述第四起始地址和所述第四数据长度,对各所述第三目标数据块对应的冗余视图进行删除记录项的处理。 And according to the fifth start address and the fifth data length, the fourth start address, and the fourth data length in each fourth record item in the redundant view corresponding to each of the third target data blocks, The redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
在一种可能的设计中,所述处理模块具体用于:In one possible design, the processing module is specifically configured to:
根据所述第四起始地址、所述第四数据长度以及每个数据块的地址空间,确定所述新写入数据针对每个第三目标数据块的第六起始地址和第六数据长度以及第四地址空间;Determining, according to the fourth start address, the fourth data length, and an address space of each data block, a sixth start address and a sixth data length of the new write data for each third target data block. And a fourth address space;
遍历所述冗余视图中的每个第四记录项,若所述第四记录项对应的第五地址空间与所述第四地址空间存在交集,则根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。Traversing each fourth record item in the redundant view, if the fifth address space corresponding to the fourth record item and the fourth address space have an intersection, according to the fifth start address, the fifth The data length, the sixth start address, and the sixth data length are processed by deleting the record item in the redundant view corresponding to the third target data block.
在一种可能的设计中,所述处理模块具体用于:In one possible design, the processing module is specifically configured to:
根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度建立第一分解空间R1和第二分解空间R2;Establishing a first decomposition space R1 and a second decomposition space R2 according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length;
其中,所述R1的起始地址和数据长度如下:The starting address and data length of the R1 are as follows:
R1_lba=D5;R1_len=D6-D5;R1_lba=D5; R1_len=D6-D5;
其中,所述R2的起始地址和数据长度如下:The starting address and data length of the R2 are as follows:
R2_lba=D6+L6;R2_len=D5+L5-D6-L6,其中,所述R1_lba为所述第一分解空间的起始地址,所述R1_len为所述第一分解空间的数据长度,所述R2_lba为所述第二分解空间的起始地址,所述R2_len为所述第二分解空间的数据长度,所述D5为第五起始地址、所述D6为第六起始地址、所述L5为第五数据长度、所述L6为第六数据长度;R2_lba=D6+L6; R2_len=D5+L5-D6-L6, wherein R1_lba is a starting address of the first decomposition space, the R1_len is a data length of the first decomposition space, and the R2_lba For the start address of the second decomposition space, the R2_len is the data length of the second decomposition space, the D5 is the fifth start address, the D6 is the sixth start address, and the L5 is a fifth data length, wherein the L6 is a sixth data length;
根据所述R1的数据长度和所述R2的数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。And processing the deleted record item on the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2.
在一种可能的设计中,所述处理模块具体用于:In one possible design, the processing module is specifically configured to:
若所述R1的数据长度大于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项和第六记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record The address is D5, the data length is D6-D5, the starting address in the sixth record is D6+L6, and the data length is D5+L5-D6-L6;
若所述R1的数据长度大于0,所述R2的数据长度小于等于0,则删除所述第四记录项,并插入第六记录项,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is less than or equal to 0, the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
若所述R1的数据长度小于等于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5。If the data length of the R1 is less than or equal to 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5. The data length is D6-D5.
第三方面,本发明实施例里还提供一种存储设备,所述存储设备包括至少一个处理器和存储器;所述存储器存储计算机执行指令;所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述存储设备如上第一方面以及第一方面的各种可能的设计的数据读取方法。In a third aspect, the embodiment of the present invention further provides a storage device, where the storage device includes at least one processor and a memory; the memory stores a computer to execute an instruction; and the at least one processor executes the computer execution of the memory storage The instructions cause the storage device to be as described above in the first aspect and the data reading method of the various possible designs of the first aspect.
第四方面,本发明实施例里还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当存储设备的至少一个处理器执行该计算机执行指令时,存储设备执行上述各种可能设计提供的数据读取方法。In a fourth aspect, the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer execution instructions, when the at least one processor of the storage device executes the computer execution instruction, the storage device performs the above Various data reading methods that may be provided by the design.
第五方面,本发明实施例里还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中。存储设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得存储设备实施前述方法实施例中的各种可能设计提供的数据读取方法。In a fifth aspect, an embodiment of the present invention further provides a computer program product, the computer program product comprising computer execution instructions, the computer execution instructions being stored in a computer readable storage medium. At least one processor of the storage device can read the computer-executable instructions from a computer readable storage medium, and the at least one processor executes the computer-executable instructions to cause the storage device to implement the data reading method provided by various possible designs in the foregoing method embodiments .
本实施例提供的数据读取方法及装置,通过源LUN对应有冗余视图,冗余视图包括 至少一个第一记录项,每个第一记录项中存储有对源LUN中的至少部分数据进行冗余存储的目标LUN的标识,使得在源LUN对应的存储空间中的数据无法读取时,不需要判断该源LUN中的数据是否与目标LUN中的数据满足数据一致性,只要获取该待读取数据对应的冗余视图中的第一记录项,确定待读取数据对应的目标LUN的标识;根据待读取数据对应的目标LUN的标识,读取第一冗余数据,提高了存储系统中冗余数据的利用率。The data reading method and device provided in this embodiment have a redundant view corresponding to the source LUN, and the redundant view includes At least one first record item, each of the first record items stores an identifier of the target LUN that is used to store at least part of the data in the source LUN, so that the data in the storage space corresponding to the source LUN cannot be read. The data of the source LUN is not required to be consistent with the data in the target LUN. The first record in the redundant view corresponding to the data to be read is obtained, and the target LUN corresponding to the data to be read is determined. The first redundant data is read according to the identifier of the target LUN corresponding to the data to be read, thereby improving the utilization of redundant data in the storage system.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings to be used in the description of the embodiments will be briefly described below.
图1为本发明实施例提供的存储设备的结构示意图一;1 is a schematic structural diagram 1 of a storage device according to an embodiment of the present invention;
图2为本发明实施例提供的数据读取方法的流程示意图一;2 is a schematic flowchart 1 of a data reading method according to an embodiment of the present invention;
图3为本发明实施例提供的数据块与冗余视图的对应关系图;3 is a corresponding relationship diagram between a data block and a redundant view according to an embodiment of the present invention;
图4为本发明实施例提供的数据读取方法的流程示意图二;4 is a schematic flowchart 2 of a data reading method according to an embodiment of the present invention;
图5为本发明实施例提供的插入冗余视图记录项的流程示意图;FIG. 5 is a schematic flowchart of inserting a redundant view record item according to an embodiment of the present invention;
图6为本发明实施例提供的删除冗余视图记录项的流程示意图一;FIG. 6 is a schematic flowchart 1 of deleting a redundant view record item according to an embodiment of the present invention;
图7为本发明实施例提供的删除冗余视图记录项的流程示意图二;FIG. 7 is a schematic flowchart 2 of deleting a redundant view record item according to an embodiment of the present invention;
图8为本发明实施例提供的存储设备的结构示意图二;FIG. 8 is a schematic structural diagram 2 of a storage device according to an embodiment of the present disclosure;
图9为本发明实施例提供的存储设备的结构示意图三。FIG. 9 is a schematic structural diagram 3 of a storage device according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings.
图1为本发明实施例提供的存储设备的结构示意图一。本实施例提供的存储设备与计算机主机相对独立,具有自己的接口和协议,通过同轴电缆、网线、光纤等方式与计算机主机连接。该存储设备可以通过逻辑单元号(logical unit number,LUN)对计算机主机提供磁盘空间。如图1所示,本实施例的存储设备包括软件和硬件。FIG. 1 is a schematic structural diagram 1 of a storage device according to an embodiment of the present invention. The storage device provided in this embodiment is relatively independent from the computer host, has its own interface and protocol, and is connected to the computer host through a coaxial cable, a network cable, an optical fiber, or the like. The storage device can provide disk space to the host computer through a logical unit number (LUN). As shown in FIG. 1, the storage device of this embodiment includes software and hardware.
存储设备的软件包含操作系统和软件模块。其中,操作系统提供软件运行的基本操作系统。软件模块可以实现数据的读取以及修复等功能。The software of the storage device contains the operating system and software modules. Among them, the operating system provides the basic operating system for the software to run. The software module can implement functions such as reading and repairing data.
存储设备的硬件包括多个硬盘、接口卡、中央处理器(Central Processing Unit,CPU)以及内存。其中,多个硬盘可以提供LUN对应的硬盘存储空间。接口卡,用于连接计算机主机或者其它存储设备,其它存储设备上存储有远程复制等冗余数据。CPU和内存可以提供操作系统和软件模块所需的基本硬件平台。The hardware of the storage device includes multiple hard disks, interface cards, a central processing unit (CPU), and memory. The multiple hard disks can provide the hard disk storage space corresponding to the LUN. An interface card is used to connect to a host computer or other storage device. Other storage devices store redundant data such as remote replication. The CPU and memory provide the basic hardware platform required for the operating system and software modules.
图1示出了本实施例存储设备的一种可能的结构,对于其它的存储设备,只要具备硬盘、CPU等部件,都属于本发明的保护范畴。对于其它的结构,本实施例此处不再赘述。FIG. 1 shows a possible structure of the storage device of the embodiment. For other storage devices, as long as the components such as the hard disk and the CPU are provided, the protection scope of the present invention belongs to the present invention. For other structures, this embodiment will not be described herein.
基于现有技术中无法充分利用存储系统的冗余数据的技术问题,本实施例将源LUN对应的存储空间划分为多个数据块,将每个数据块的冗余数据的存储信息通过冗余视图的方式组织起来,在源LUN的部分数据块损坏的时候,通过冗余视图找到目标LUN,从目标LUN上读取数据并自动修复,不需要保证数据一致性状态,提高了存储系统的利用率。下面采用详细的实施例,对本发明实施例提供的数据读取方法进行详细说明。Based on the technical problem that the redundant data of the storage system cannot be fully utilized in the prior art, the storage space corresponding to the source LUN is divided into multiple data blocks, and the storage information of the redundant data of each data block is redundant. The view mode is organized. When some data blocks of the source LUN are damaged, the target LUN is found through the redundant view, and the data is read from the target LUN and automatically repaired. The data consistency status is not required, and the storage system is improved. rate. The data reading method provided by the embodiment of the present invention is described in detail below by using a detailed embodiment.
图2为本发明实施例提供的数据读取方法的流程示意图一。本实施例的执行主体为上述的存储设备。如图1所示,该方法包括: 2 is a schematic flowchart 1 of a data reading method according to an embodiment of the present invention. The execution body of this embodiment is the above-described storage device. As shown in Figure 1, the method includes:
S101、获取主机的读取指令,所述读取指令中包括源逻辑单元号LUN的标识以及待读取数据的第一起始地址以及第一数据长度;S101. Acquire a read instruction of the host, where the read instruction includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length.
其中,所述源LUN对应有冗余视图,所述冗余视图包括至少一个第一记录项,每个所述第一记录项中存储有对所述源LUN中的至少部分数据进行冗余存储的目标LUN的标识。The source LUN corresponds to a redundant view, and the redundant view includes at least one first record item, and each of the first record items stores redundant storage of at least part of the data in the source LUN. The identity of the target LUN.
在主机读取存储设备中存储的数据时,存储设备接收主机的读取指令,该读取指令中包括源LUN的标识以及待读取数据的第一起始地址和第一数据长度。源LUN的标识例如可以为LUN的编号,例如LUN_0、LUN_1、LUN_N。When the host reads the data stored in the storage device, the storage device receives the read instruction of the host, where the read command includes the identifier of the source LUN and the first start address and the first data length of the data to be read. The ID of the source LUN can be, for example, the number of the LUN, such as LUN_0, LUN_1, and LUN_N.
在本实施例中,源LUN对应有冗余视图。冗余视图包括至少一个第一记录项,每个第一记录项中存储有对源LUN中的至少部分数据进行冗余存储的目标LUN的标识。其中,目标LUN对应的存储空间中存储的数据可以为镜像、克隆、双活、拷贝、快照、同步远程复制、异步远程复制等冗余数据。In this embodiment, the source LUN corresponds to a redundant view. The redundant view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundant storage on at least part of the data in the source LUN. The data stored in the storage space corresponding to the target LUN may be redundant data such as mirroring, cloning, active-active, copy, snapshot, synchronous remote replication, and asynchronous remote replication.
本领域技术人员可以理解,目标LUN中可以对源LUN中的全部数据进行存储,也可以对源LUN中的部分数据进行存储,目标LUN可以为一个或多个,例如镜像对应一个目标LUN,同步远程复制对应一个目标LUN等,本实施例对目标LUN的数量以及冗余数据的类型不做特别限制。A person skilled in the art can understand that all the data in the source LUN can be stored in the target LUN, and some data in the source LUN can be stored. The target LUN can be one or more, for example, the mirror corresponds to a target LUN, and the synchronization is performed. The remote replication corresponds to a target LUN. In this embodiment, the number of target LUNs and the type of redundant data are not particularly limited.
S102、在确定所述源LUN对应的存储空间中的数据无法读取时,根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识。S102. Determine, according to the first start address, the first data length, and the redundant view, a target corresponding to the data to be read, when the data in the storage space corresponding to the source LUN is unreadable. ID of the LUN.
当源LUN对应的存储空间出现磁盘坏道或者数据错误的情况下,则存储设备无法从该存储空间中读取正确的数据给主机。此时,根据第一起始地址、第一数据长度,在冗余视图中确定该待读取的数据对应的第一记录项,根据该待读取的数据对应的第一记录项,获取待读取的数据对应的目标LUN的标识。If the disk corresponding to the source LUN has bad sectors or data errors, the storage device cannot read the correct data from the storage space to the host. At this time, the first record corresponding to the data to be read is determined in the redundant view according to the first start address and the first data length, and the first record corresponding to the data to be read is obtained for reading. ID of the target LUN corresponding to the data taken.
在一个具体的例子中,第一记录项中存储有目标LUN的标识、第二冗余数据的第二起始地址和第二数据长度。In a specific example, the first record item stores an identifier of the target LUN, a second start address of the second redundant data, and a second data length.
若待读取数据的第一起始地址、第一数据长度对应的地址空间与第二冗余数据对应的第二起始地址和第二数据长度对应的地址空间存在交集,则该第一记录项为目标记录项,该目标记录项中的目标LUN的标识为待读取的数据对应的目标LUN的标识。If the first start address of the data to be read, the address space corresponding to the first data length, and the address space corresponding to the second start address and the second data length corresponding to the second redundant data, the first record entry The identifier of the target LUN in the target entry is the identifier of the target LUN corresponding to the data to be read.
在具体实现过程中,若一个目标记录项对应的冗余数据不是待读取数据的全部,而是待读取数据的一部分,则可以遍历第一记录项,直至得到待读取的数据对应的多个目标记录项,该多个目标记录项对应的冗余数据可以拼成完整的待读取数据,则该多个目标记录项中的目标LUN的标识,均为待读取的数据对应的目标LUN的标识。In a specific implementation process, if the redundant data corresponding to a target record item is not all of the data to be read but a part of the data to be read, the first record item may be traversed until the data to be read is obtained. a plurality of target records, wherein the redundant data corresponding to the plurality of target records can be integrated into the complete data to be read, and the identifiers of the target LUNs in the plurality of target records are all corresponding to the data to be read. ID of the target LUN.
S103、根据所述待读取数据对应的目标LUN的标识,读取第一冗余数据,并将所述第一冗余数据返回至所述主机。S103. Read first redundant data according to the identifier of the target LUN corresponding to the data to be read, and return the first redundant data to the host.
具体地,待读取数据对应的目标LUN为至少一个,根据待读取数据对应的目标LUN的标识,从每个目标LUN对应的存储空间中,读取冗余数据,从而完成该待读取数据对应的第一冗余数据的读取。Specifically, the target LUN corresponding to the data to be read is at least one, and the redundant data is read from the storage space corresponding to each target LUN according to the identifier of the target LUN corresponding to the data to be read, thereby completing the to-be-read The reading of the first redundant data corresponding to the data.
在现有技术中,地址一般通过十六进制来表示,例如0x1000,数据长度通过扇区sectors来表示。在本实施例中,为了便于说明,以十进制为例来说明,十六进制与此类似。例如,待读取的数据的起始地址为50,数据长度为250,则终止地址为300。待读取的数据对应的目标LUN的标识为LUN_1、LUN_3以及LUN_4,与该待读取的数据存在 交集的部分分别为[50,70]、[70,230]、[230,230];最终从LUN_1对应的地址空间中读取[50,70]的数据,从LUN_3对应的地址空间中读取[70,200]的数据,从LUN_4中读取[200,300]的数据。其中,在[50,70]中,50代表起始地址,70代表终止地址,其它类似。本领域技术人员可以理解,多个目标记录项也可以对应一个目标LUN的标识。In the prior art, the address is generally represented by hexadecimal, for example 0x1000, and the data length is represented by sector sectors. In the present embodiment, for convenience of explanation, the decimal is taken as an example to illustrate that the hexadecimal is similar to this. For example, if the starting address of the data to be read is 50 and the data length is 250, the ending address is 300. The ID of the target LUN corresponding to the data to be read is LUN_1, LUN_3, and LUN_4, and the data to be read exists. The intersections are [50, 70], [70, 230], [230, 230]; finally, the data of [50, 70] is read from the address space corresponding to LUN_1, and is read from the address space corresponding to LUN_3. [70,200] data, read [200,300] data from LUN_4. Among them, in [50, 70], 50 represents the starting address, 70 represents the ending address, and the like. Those skilled in the art can understand that multiple target record items can also correspond to the identifier of one target LUN.
在读取到该第一冗余数据后,向主机返回该第一冗余数据,并将该第一冗余数据写入对应的源LUN中,以完成对该源LUN的修复。After the first redundant data is read, the first redundant data is returned to the host, and the first redundant data is written into the corresponding source LUN to complete the repair of the source LUN.
本实施例提供的数据读取方法,通过源LUN对应有冗余视图,冗余视图包括至少一个第一记录项,每个第一记录项中存储有对源LUN中的至少部分数据进行冗余存储的目标LUN的标识,使得在源LUN对应的存储空间中的数据无法读取时,不需要判断该源LUN中的数据是否与目标LUN中的数据满足数据一致性,只要获取该待读取数据对应的冗余视图中的第一记录项,确定待读取数据对应的目标LUN的标识;根据待读取数据对应的目标LUN的标识,读取第一冗余数据,提高了存储系统中冗余数据的利用率。The data reading method provided in this embodiment has a redundant view corresponding to the source LUN, and the redundant view includes at least one first record item, and each of the first record items stores redundancy for at least part of the data in the source LUN. The identifier of the target LUN is stored. When the data in the storage space corresponding to the source LUN cannot be read, the data in the source LUN does not need to be consistent with the data in the target LUN. The first record item in the redundant view corresponding to the data determines the identifier of the target LUN corresponding to the data to be read; and reads the first redundant data according to the identifier of the target LUN corresponding to the data to be read, thereby improving the storage system. Utilization of redundant data.
下面采用详细的实施例,对本发明实施例提供的数据读取方法的具体实现过程进行详细说明。The specific implementation process of the data reading method provided by the embodiment of the present invention is described in detail below by using a detailed embodiment.
在本实施例中,为了提高存储设备遍历第一记录项,获取目标记录项的效率,本实施例还可以将源LUN对应的存储空间划分为多个数据块,每个数据块对应有各自的冗余视图。这样,只要找到对应待读取的数据对应的目标数据块,就可以只在该目标数据块中对第一记录项进行遍历,减少了遍历时间。对应的,图1中的S102可通过如下的S1021和S1022来实现。In this embodiment, in order to improve the efficiency of the storage device traversing the first record item and acquiring the target record item, the storage space corresponding to the source LUN may be divided into multiple data blocks, and each data block has its own corresponding Redundant view. In this way, as long as the target data block corresponding to the data to be read is found, the first record item can be traversed only in the target data block, which reduces the traversal time. Correspondingly, S102 in FIG. 1 can be implemented by S1021 and S1022 as follows.
S1021、根据所述第一起始地址、第一数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述待读取的数据对应的至少一个第一目标数据块;S1021, determining, according to the first start address, the first data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read;
根据该待读取数据的第一起始地址和第一数据长度,确定该待读取数据对应的第一地址空间。然后根据源LUN的标识对应的各数据块的地址空间,得到该待读取的数据对应的至少一个第一目标数据块。其中,源LUN的标识对应有存储空间被划分的多个数据块各自的地址空间。Determining, according to the first start address of the data to be read and the first data length, a first address space corresponding to the data to be read. Then, according to the address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read is obtained. The identifier of the source LUN corresponds to an address space of each of the plurality of data blocks in which the storage space is divided.
本领域技术人员可以理解,当该待读取的数据长度较短,且刚好在一个数据块中时,则只有一个第一目标数据块,当该待读取的数据较长,或刚好跨越两个或多个数据块时,则有多个第一目标数据块。Those skilled in the art can understand that when the length of the data to be read is short and is just in one data block, there is only one first target data block, when the data to be read is long, or just spans two When there are one or more data blocks, there are multiple first target data blocks.
例如,第一地址空间为[50,300],每个数据块的数据长度为200,数据块的起始地址若从0开始,则多个数据块各自的地址空间为[0,200]、[201,400]、[401,600]等,则第一地址空间对应地址空间为[0,200]、[200,400]的两个连续的数据块。For example, the first address space is [50, 300], the data length of each data block is 200, and the start address of the data block starts from 0, and the address space of each of the plurality of data blocks is [0, 200], [201, 400], [401, 600], etc., the first address space corresponds to two consecutive data blocks of address space [0, 200], [200, 400].
S1022、根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识。S1022: Determine, according to the first record item in the redundancy view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the data to be read.
由上可知,在第一记录项中存储有对数据块中的数据进行冗余存储的存储空间对应的目标LUN的标识。As can be seen from the above, the first record item stores an identifier of the target LUN corresponding to the storage space in which the data in the data block is redundantly stored.
若该数据块中的数据均被一个目标LUN对应的存储空间连续存储,则冗余视图中可以仅有一个第一记录项。若该数据块中的数据被分散存储,则冗余视图中包括多个第一记录项。If the data in the data block is continuously stored by the storage space corresponding to a target LUN, there may be only one first record in the redundant view. If the data in the data block is distributed, the redundant view includes a plurality of first entries.
具体地,可以根据第一起始地址和第一数据长度,确定第一地址空间;根据第一地址空间、各第一目标数据块对应的冗余视图中的第一记录项对应的第二地址空间,确定 与第一地址空间存在交集的第二地址空间对应的目标记录项;根据各目标记录项,确定待读取数据对应的目标LUN的标识。Specifically, the first address space may be determined according to the first start address and the first data length; and the second address space corresponding to the first record item in the redundant view corresponding to each first target data block according to the first address space , OK And a target record item corresponding to the second address space that has an intersection with the first address space; and determining, according to each target record item, an identifier of the target LUN corresponding to the data to be read.
由于各第一目标记录项中的目标LUN对应的存储空间中的冗余数据是待读取数据的一部分或全部,即待读取数据被冗余存储在一个或多个目标LUN中。因此,确定与该第一地址空间存在交集的第二地址空间对应的目标记录项,就可以得到该待读取数据的冗余数据所在的存储空间对应的所有目标LUN的标识。The redundant data in the storage space corresponding to the target LUN in each of the first target records is part or all of the data to be read, that is, the data to be read is redundantly stored in one or more target LUNs. Therefore, the target record corresponding to the second address space in which the first address space exists is determined, and the identifiers of all the target LUNs corresponding to the storage space where the redundant data of the data to be read is located are obtained.
例如,第一地址空间为[50,300],跨越两个连续的数据块。与该第一地址空间存在交集的第二地址空间为[30,70],[60,200]、[200,310],分别对应的目标LUN的标识为LUN_1、LUN_3、LUN_4。由此可知,第一地址空间为上述的三个第二地址空间形成的连续的地址空间的子集,则说明可以得到完整的待读取的数据。For example, the first address space is [50, 300] spanning two consecutive blocks of data. The second address space that intersects the first address space is [30, 70], [60, 200], [200, 310], and the identifiers of the corresponding target LUNs are LUN_1, LUN_3, and LUN_4. It can be seen that the first address space is a subset of consecutive address spaces formed by the above three second address spaces, indicating that the complete data to be read can be obtained.
在具体实现过程中,在上述实施例的基础上,第一记录项中还存储有各目标LUN的优先级。图3为本发明实施例提供的数据块与冗余视图的对应关系图。如图3所示,将单个LUN对应的存储空间划分为多个16MB的数据块,每个数据块下对应该数据块的冗余视图的多个记录项。在本实施例中,为了便于区分,将该记录项称为第一记录项。下面对记录项内的内容进行详细说明。In the specific implementation process, based on the foregoing embodiment, the priority of each target LUN is also stored in the first record item. FIG. 3 is a corresponding relationship diagram between a data block and a redundant view according to an embodiment of the present invention. As shown in FIG. 3, the storage space corresponding to a single LUN is divided into a plurality of 16 MB data blocks, and each data block corresponds to a plurality of records of the redundant view of the data block. In the present embodiment, for the sake of distinction, the record item is referred to as a first record item. The contents of the entry are described in detail below.
LBA(logical block address):冗余数据的起始地址;LBA (logical block address): the starting address of redundant data;
LEN(length):冗余数据的数据长度;LEN(length): the data length of the redundant data;
目标LUN ID:本记录项对应的目标LUN的标识;Target LUN ID: ID of the target LUN corresponding to this entry.
PRI(priority):本记录项的恢复优先级,可通过数字或字母等来表示,例如优先级为A,优先级为B等。PRI (priority): The priority of the restoration of this entry can be expressed by numbers or letters, for example, the priority is A, and the priority is B.
其中,起始地址和数据长度形成了冗余数据的地址空间。在本实施例中,每条记录项不同,具体可以为相同的优先级,但是地址空间不同,或者地址空间有交集,但是目标LUN的优先级不同。但是每条记录项对应的地址空间都是该数据块的起始地址和数据长度形成的地址空间的子集或全集。Among them, the starting address and the data length form an address space of redundant data. In this embodiment, each record item is different, and may be the same priority, but the address space is different, or the address space has an intersection, but the priority of the target LUN is different. However, the address space corresponding to each record item is a subset or a complete set of the address space formed by the start address and the data length of the data block.
优先级原则上根据目标LUN和源LUN的关系来确定。在本实施例中,目标LUN包括镜像、克隆、双活、拷贝、快照、同步远程复制、异步远程复制等。恢复优先级从高到低为镜像>克隆>双活>拷贝>快照>同步远程复制>异步远程复制。本实施例此处仅仅是对优先级的一种示例,在具体实现过程中,可以根据目标LUN与源LUN的关系以及目标LUN的性能等综合考虑来设置优先级,对于优先级的具体实现方式,本实施例此处不再赘述。The priority is determined in principle based on the relationship between the target LUN and the source LUN. In this embodiment, the target LUN includes mirroring, cloning, active-active, copy, snapshot, synchronous remote replication, asynchronous remote replication, and the like. The recovery priority is from high to low for Mirroring > Clone > Active & Active > Copy > Snapshot > Synchronous Remote Replication > Asynchronous Remote Replication. This example is only an example of the priority. In the specific implementation process, the priority can be set according to the relationship between the target LUN and the source LUN and the performance of the target LUN. This embodiment will not be repeated here.
因此,可以在考虑优先级的基础上,采用最优的恢复路径来恢复数据和读取数据。Therefore, the optimal recovery path can be used to recover data and read data based on the priority.
在具体实现过程中,根据上述的第一地址空间以及每个数据块对应的地址空间,确定待读取数据针对每个第一目标数据块的第三地址空间。继续以上述的实施例为例来进行说明。In a specific implementation process, the third address space for each first target data block is determined according to the first address space and the address space corresponding to each data block. The description of the above embodiment will be continued as an example.
第一地址空间为[50,300],每个数据块的数据长度为200,则第一地址空间对应地址空间为[0,200]、[200,400]的两个连续的数据块。由此可知,待读取数据针对两个第一目标数据块的第三地址空间分别为[50,200]、[200,300]。然后,针对每个第一目标数据块,来获取目标记录项。在此以第三地址空间[50,200]为例来进行详细说明。在本实施例中,冗余视图中的各第一记录项按照目标LUN的优先级从高到低的顺序排列。即优先级高的目标LUN对应的第一记录项排列靠前,优先级低的目标LUN对应的第一记 录项排列靠后。因此根据冗余视图中的各第一记录项中的目标LUN的优先级从高到低的顺序,遍历冗余视图中的每个第一记录项,得到与第三地址空间存在交集的第二地址空间对应的目标记录项,且第三地址空间是至少一个第二地址空间形成的地址空间的子集,针对同一冗余数据,目标记录项中的目标LUN的优先级高于其它第一记录项中的目标LUN的优先级。下面以图4所示的实施例进行详细说明。The first address space is [50, 300], and the data length of each data block is 200. The first address space corresponds to two consecutive data blocks of address space [0, 200], [200, 400]. It can be seen that the third address space of the data to be read for the two first target data blocks is [50, 200], [200, 300], respectively. Then, for each first target data block, a target record item is acquired. Here, the third address space [50, 200] will be described in detail as an example. In this embodiment, each of the first entries in the redundant view is arranged in descending order of priority of the target LUN. That is, the first record corresponding to the target LUN with the highest priority is ranked first, and the first record corresponding to the target LUN with the lower priority is the first record. The entries are ranked lower. Therefore, according to the order of priority of the target LUNs in each of the first records in the redundant view, each first record item in the redundant view is traversed, and a second intersection with the third address space is obtained. a target record corresponding to the address space, and the third address space is a subset of the address space formed by the at least one second address space. For the same redundant data, the target LUN in the target record has a higher priority than the other first records. The priority of the target LUN in the entry. The details will be described below with reference to the embodiment shown in FIG.
图4为本发明实施例提供的数据读取方法的流程示意图二。如图4所示,该方法包括:FIG. 4 is a schematic flowchart 2 of a data reading method according to an embodiment of the present invention. As shown in FIG. 4, the method includes:
S201、获取冗余视图中的第一个第一记录项;S201. Obtain a first first record item in the redundant view.
S202、判断第三地址空间的剩余地址空间与第一记录项对应的第二地址空间是否有交集,若是,执行步骤203,若否,执行步骤206;S202, determining whether the remaining address space of the third address space and the second address space corresponding to the first record have an intersection, and if so, executing step 203, if not, executing step 206;
S203、判断第三地址空间是否是多个第二地址空间形成的地址空间的子集,若是,执行步骤204,若否,执行步骤206;S203, determining whether the third address space is a subset of the address space formed by the plurality of second address spaces, and if so, executing step 204; if not, executing step 206;
S204、读取冗余数据正常;S204. The read redundant data is normal.
S205、将冗余数据返回给主机,并对源LUN进行修复;S205. Return redundant data to the host, and repair the source LUN.
S206、获取冗余视图中的下一个第一记录项;S206. Obtain a next first record item in the redundant view.
S207、判断该下一个第一记录项是否为空;若否,执行步骤202,若是,执行步骤208;S207, determining whether the next first record item is empty; if not, executing step 202, and if so, executing step 208;
S208、向主机返回介质错误。S208. Return a media error to the host.
具体地,获取冗余视图中的第一个第一记录项,即优先级最高的记录项。若该第一记录项对应的第二地址空间为[20,40],与第三地址空间的剩余地址空间[50,200]没有交集,则获取下一个第一记录项,即优先级为次高级的记录项;若该第一记录项对应的第二地址空间为[30,100],与第三地址空间的剩余地址空间[50,200]存在交集[50,100],但该第三地址空间[50,200]不是第二地址空间[30,100]的子集,则获取下一个第一记录项;若下一个第一记录项对应的第二地址空间为[80,200],与第三地址空间的剩余地址空间[101,200]存在交集[101,200],且第三地址空间[50,200]是至少一个第二地址空间形成的地址空间[30,100]的子集,则读取冗余数据,即从第二地址空间中依次读取交集部分的冗余数据。然后将冗余数据返回给主机,若遍历所有的第一记录项之后,也未达到第三地址空间是至少一个第二地址空间形成的地址空间的子集,则向主机返回介质错误,无法读取数据。Specifically, the first first record in the redundant view is obtained, that is, the record with the highest priority. If the second address space corresponding to the first record item is [20, 40], and there is no intersection with the remaining address space [50, 200] of the third address space, the next first record item is obtained, that is, the priority is An advanced record item; if the second address space corresponding to the first record item is [30, 100], there is an intersection [50, 100] with the remaining address space [50, 200] of the third address space, but the third If the address space [50, 200] is not a subset of the second address space [30, 100], the next first record item is obtained; if the second address space corresponding to the next first record item is [80, 200], There is an intersection [101, 200] with the remaining address space [101, 200] of the third address space, and the third address space [50, 200] is a child of the address space [30, 100] formed by at least one second address space. The set reads the redundant data, that is, sequentially reads the redundant data of the intersection portion from the second address space. Then, the redundant data is returned to the host. If all the first entries are traversed, and the third address space is not a subset of the address space formed by the at least one second address space, the media error is returned to the host and cannot be read. Take data.
本领域技术人员可以理解,通过上述根据优先级获取的冗余数据,为获取冗余数据的最优路径,即通过最短的时间可以获取待读取数据对应的完整的冗余数据。A person skilled in the art can understand that the redundant data acquired according to the priority is used to obtain the optimal path of the redundant data, that is, the complete redundant data corresponding to the data to be read can be obtained in the shortest time.
在上述实施例的基础上,之所以能够根据冗余视图,从目标LUN中获取冗余数据,是因为将源LUN对应的存储空间的数据同步到了目标LUN对应的存储空间。在此过程中,将该冗余数据对应的记录项插入到冗余视图中。On the basis of the foregoing embodiment, the redundant data is obtained from the target LUN according to the redundant view, because the data of the storage space corresponding to the source LUN is synchronized to the storage space corresponding to the target LUN. In this process, the record corresponding to the redundant data is inserted into the redundant view.
下面采用具体的实施例,来说明冗余数据对应的记录项插入到冗余视图中的具体实现过程。The following describes a specific implementation process of inserting a record item corresponding to redundant data into a redundant view by using a specific embodiment.
图5为本发明实施例提供的插入冗余视图记录项的流程示意图。如图5所示,该方法包括:FIG. 5 is a schematic flowchart of inserting a redundant view record item according to an embodiment of the present invention. As shown in FIG. 5, the method includes:
S301、获取所述源LUN的标识、待插入冗余视图的第二记录项。S301. Obtain an identifier of the source LUN, and a second record to be inserted into the redundant view.
在将源LUN对应的存储空间中的数据同步到目标LUN对应的存储空间中时,获取 源LUN的标识和待插入冗余视图的第二记录项。其中,第二记录项中包括第三冗余数据的第三起始地址和第三数据长度、第三冗余数据对应的目标LUN的标识以及目标LUN的优先级。When the data in the storage space corresponding to the source LUN is synchronized to the storage space corresponding to the target LUN, obtain the data. The identifier of the source LUN and the second record to be inserted into the redundant view. The second record item includes a third start address and a third data length of the third redundant data, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN.
S302、根据所述第三起始地址、第三数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述第三冗余数据对应的至少一个第二目标数据块;S302. Determine, according to the third start address, the third data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one second target data block corresponding to the third redundant data.
步骤302中的确定至少一个第二目标数据块的实现方式与步骤102中的确定至少一个第一目标数据块的实现方式类似,本实施例此处不再赘述。The implementation of determining the at least one second target data block in step 302 is similar to the implementation of determining the at least one first target data block in step 102, and details are not described herein again.
S303、根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理。S303, according to the priority of the target LUN stored in each first record in the redundant view corresponding to each of the second target data blocks, and the priority of the target LUN stored in the second record, The redundant view corresponding to the second target data block performs processing of inserting the record item.
具体地,根据第三起始地址、第三数据长度以及每个数据块的地址空间,确定第三冗余数据针对每个第二目标数据块的第三记录项,第三记录项中包括第四起始地址、第四数据长度、第三冗余数据对应的目标LUN的标识以及目标LUN的优先级,针对任一第二目标数据块,根据冗余视图中的各第一记录项的优先级从高到低的顺序,遍历冗余视图中的每个第一记录项,直至第三记录项中的目标LUN的优先级高于第一记录项中的目标LUN的优先级为止,将第三记录项插入到该第一记录项之前。Specifically, determining, according to the third start address, the third data length, and the address space of each data block, the third record of the third redundant data for each second target data block, where the third record includes The starting address, the fourth data length, the identifier of the target LUN corresponding to the third redundant data, and the priority of the target LUN, according to the priority of each first record in the redundant view for any second target data block Levels from high to low, traversing each of the first entries in the redundant view until the priority of the target LUN in the third entry is higher than the priority of the target LUN in the first entry, Three entries are inserted before the first entry.
在具体实现过程中,当第二记录项中的第三起始地址和第三数据长度对应的地址空间跨越多个数据块时,需要将第二记录项拆分成多个第三记录项。当第二记录项中的第三起始地址和第三数据长度对应的地址空间仅对应一个数据块时,则第二记录项与第三记录项等同。In a specific implementation process, when the address space corresponding to the third start address and the third data length in the second record item spans multiple data blocks, the second record item needs to be split into a plurality of third record items. When the third start address in the second record and the address space corresponding to the third data length correspond to only one data block, the second record item is equivalent to the third record item.
在将第二记录项拆分成多个第三记录项时,即将第二记录项中的第三起始地址和第三数据长度形成的地址空间,根据数据块的地址空间,拆分成多个地址空间,从而形成多个第三记录项。在每个第三记录项中,目标LUN的标识以及目标LUN的优先级与被拆分中第二记录项相同。When the second record item is split into a plurality of third record items, the address space formed by the third start address and the third data length in the second record item is split into multiple according to the address space of the data block. Address spaces to form a plurality of third entries. In each third entry, the identity of the target LUN and the priority of the target LUN are the same as the second entry in the split.
针对第二目标数据块,根据该第二目标数据块对应的冗余视图中的各第一记录项的优先级从高到低的顺序,遍历冗余视图中的每个第一记录项。例如,第三记录项中的目标LUN的优先级为3级,冗余视图中的各第一记录项的优先级从高到低为1级、2级、3级、4级、5级,在遍历到优先级为4级的第一记录项时,将该第三记录项插入到该第一记录项之前。For the second target data block, each first record item in the redundant view is traversed according to the order of priority of each first record item in the redundant view corresponding to the second target data block from high to low. For example, the priority of the target LUN in the third entry is 3, and the priority of each first entry in the redundant view is 1st, 2nd, 3rd, 4th, and 5th. When traversing to the first record item having the priority level of 4, the third record item is inserted before the first record item.
本领域技术人员可以理解,若存在优先级为3级的第一记录项,则判断第三记录项与该第一记录项是否有交集,如果存在交集,则可以进行合并处理。例如,优先级为3级的第一记录项对应的地址空间为[50,100],第三记录项对应的地址空间为[80,120],则进行合并处理,将上述的两项合并成[50,120],即插入的记录项的数据起始地址为50,数据长度为70。A person skilled in the art can understand that if there is a first record item with a priority level of 3, it is determined whether the third record item has an intersection with the first record item, and if there is an intersection, the merge process can be performed. For example, if the address space corresponding to the first record with priority level 3 is [50, 100] and the address space corresponding to the third record item is [80, 120], the merge processing is performed, and the above two items are merged into [50, 120], that is, the inserted record item has a data start address of 50 and a data length of 70.
主机对源LUN新写入数据完成,此时还没有完成将源LUN本次更新的数据同步到目标LUN上(在对源LUN新写入数据之前,源LUN和目标LUN在上一个周期是已经同步的,因此,存在一个历史冗余记录项记录目标LUN是源LUN的冗余数据的),因为新写入了数据,源LUN数据已经变化但还没有同步到目标LUN上,因此目标LUN上此位置的数据不再是冗余数据,而是错误的数据,因此在源LUN中写入数据时,需要删除冗余视图中的记录项。 After the host writes the data to the source LUN, the data is synchronized to the target LUN. The source LUN and the target LUN are in the previous cycle before the data is newly written to the source LUN. Synchronous, therefore, there is a historical redundant record record that the target LUN is redundant data of the source LUN. Because the data is newly written, the source LUN data has changed but has not been synchronized to the target LUN, so the target LUN is The data at this location is no longer redundant data, but erroneous data, so when writing data in the source LUN, you need to delete the entries in the redundant view.
下面对删除冗余视图中的记录项的具体过程进行详细说明。The specific process of deleting the entries in the redundant view is described in detail below.
图6为本发明实施例提供的删除冗余视图记录项的流程示意图一。如图6所示,该方法包括:FIG. 6 is a schematic flowchart 1 of deleting a redundant view record item according to an embodiment of the present invention. As shown in FIG. 6, the method includes:
S401、获取所述源LUN对应的存储空间的新写入数据的写入信息;S401. Obtain write information of newly written data in a storage space corresponding to the source LUN.
在源LUN对应的存储空间新写入数据时,获取写入信息。其中,写入信息包括源LUN的标识、新写入数据的第四起始地址和第四数据长度。When the data is newly written in the storage space corresponding to the source LUN, the write information is obtained. The write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length.
S402、根据所述新写入数据的第四起始地址、第四数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述新写入数据对应的至少一个第三目标数据块。S402. Determine, according to the fourth start address, the fourth data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one third target corresponding to the newly written data. data block.
步骤402中的确定至少一个第三目标数据块的实现方式与步骤102中的确定至少一个第一目标数据块的实现方式类似,本实施例此处不再赘述。The implementation of determining the at least one third target data block in step 402 is similar to the implementation of determining the at least one first target data block in step 102, and details are not described herein again.
然后,根据各第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、第四起始地址和第四数据长度,对各第三目标数据块对应的冗余视图进行删除记录项的处理。具体可参见步骤403与步骤404。Then, according to the fifth start address and the fifth data length, the fourth start address, and the fourth data length in each fourth record item in the redundant view corresponding to each third target data block, each third target The redundant view corresponding to the data block performs the processing of deleting the record item. For details, refer to step 403 and step 404.
S403、根据所述第四起始地址、所述第四数据长度以及每个数据块的地址空间,确定所述新写入数据针对每个第三目标数据块的第六起始地址和第六数据长度以及第四地址空间。S403. Determine, according to the fourth start address, the fourth data length, and an address space of each data block, a sixth start address and a sixth of the new write data for each third target data block. Data length and fourth address space.
本实施例的确定第四地址空间的实现方式,与第三地址空间的实现方式类似,本实施例此处不再赘述。The implementation manner of determining the fourth address space in this embodiment is similar to the implementation manner of the third address space, and details are not described herein again.
S404、遍历所述冗余视图中的每个第四记录项,若所述第四记录项对应的第五地址空间与所述第四地址空间存在交集,则根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。S404, traversing each fourth record item in the redundant view, if the fifth address space corresponding to the fourth record item and the fourth address space have an intersection, according to the fifth start address, And a fifth data length, a sixth start address, and a sixth data length, and performing processing for deleting the record item on the redundant view corresponding to the third target data block.
在具体实现过程中,若第四记录项中的第五起始地址和第五数据长度形成的第五地址空间存在交集,则说明第四记录项对应的部分数据为更新前的该地址空间的冗余数据,并不是新写入数据对应的冗余数据,所以需要删除。In a specific implementation process, if the fifth address space in the fourth record item and the fifth address space formed by the fifth data length have an intersection, the partial data corresponding to the fourth record item is the address space before the update. Redundant data is not redundant data corresponding to newly written data, so it needs to be deleted.
步骤404的具体实现过程,可参见图7所示。图7为本发明实施例提供的删除冗余视图记录项的流程示意图二。如图7所示,该方法包括:The specific implementation process of step 404 can be seen in FIG. 7. FIG. 7 is a schematic flowchart 2 of deleting a redundant view record item according to an embodiment of the present invention. As shown in FIG. 7, the method includes:
S501、获取冗余视图中的第一个第四记录项;S501. Obtain a first fourth record item in the redundant view.
S502、判断第四地址空间与第四记录项对应的第五地址空间是否存在交集;若是,执行S502,若否;执行S507;S502, determining whether there is an intersection of the fourth address space corresponding to the fourth record space and the fourth record item; if yes, executing S502, if not; executing S507;
S503、根据第五起始地址、第五数据长度、第六起始地址和第六数据长度建立第一分解空间R1和第二分解空间R2;S503, establishing a first decomposition space R1 and a second decomposition space R2 according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length;
其中,R1的起始地址和数据长度如下:Among them, the starting address and data length of R1 are as follows:
R1_lba=D5;R1_len=D6-D5;R1_lba=D5; R1_len=D6-D5;
其中,R2的起始地址和数据长度如下:Among them, the starting address and data length of R2 are as follows:
R2_lba=D6+L6;R2_len=D5+L5-D6-L6,所述R1_lba为所述第一分解空间的起始地址,所述R1_len为所述第一分解空间的数据长度,所述R2_lba为所述第二分解空间的起始地址,所述R2_len为所述第二分解空间的数据长度,所述D5为第五起始地址、所述D6为第六起始地址、所述L5为第五数据长度、所述L6为第六数据长度;R2_lba=D6+L6; R2_len=D5+L5-D6-L6, the R1_lba is the starting address of the first decomposition space, the R1_len is the data length of the first decomposition space, and the R2_lba is The starting address of the second decomposition space, the R2_len is the data length of the second decomposition space, the D5 is the fifth start address, the D6 is the sixth start address, and the L5 is the fifth Data length, the L6 is a sixth data length;
S504、若所述R1的数据长度大于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项和第六记录项,所述第五记录项中的起始地址为D5,数据长 度为D6-D5,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;S504. If the data length of the R1 is greater than 0, and the data length of the R2 is greater than 0, deleting the fourth record item, and inserting the fifth record item and the sixth record item, where the fifth record item is Start address is D5, data length Degree is D6-D5, the starting address in the sixth record item is D6+L6, and the data length is D5+L5-D6-L6;
S505、若所述R1的数据长度大于0,所述R2的数据长度小于等于0,则删除所述第四记录项,并插入第六记录项,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;S505. If the data length of the R1 is greater than 0, and the data length of the R2 is less than or equal to 0, deleting the fourth record item, and inserting a sixth record item, where the start address in the sixth record item is D6+L6, the data length is D5+L5-D6-L6;
S506、若所述R1的数据长度小于等于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5;S506. If the data length of the R1 is less than or equal to 0, and the data length of the R2 is greater than 0, delete the fourth record item, and insert a fifth record item, where the start address in the fifth record item is D5, the data length is D6-D5;
S507、获取冗余视图中的下一个第四记录项;S507. Obtain a next fourth record item in the redundant view.
S508、判断该下一个第四记录项是否为空,若是,执行S509,若否,执行S502;S508, determining whether the next fourth record item is empty, and if so, executing S509, if not, executing S502;
S509、返回参数错误。S509, the return parameter is wrong.
本领域技术人员可以理解,S504与S506为则其一的关系,即三种情况不能同时存在,只能存在三者其一。针对三种情况分别举例进行说明。Those skilled in the art can understand that S504 and S506 are one of the relationships, that is, the three cases cannot exist at the same time, and only one of the three can exist. The three cases are respectively illustrated by examples.
本实施例的遍历过程为遍历冗余视图中的每个记录项,直至所有记录项遍历完成。The traversal process of this embodiment traverses each record item in the redundant view until all record item traversal is completed.
针对S504,新写入数据针对该数据块的起始地址D6=50,数据长度L6=100,第四地址空间[50,150];第四记录项的起始地址D5=20,数据长度L5=150,第五地址空间[20,170],则删除第四记录项,插入第五记录项,第五记录项的起始地址为20,数据长度为30,插入第六记录项,第六记录项的起始地址为150,数据长度为20。For S504, the newly written data is for the starting address of the data block D6=50, the data length L6=100, the fourth address space [50, 150]; the starting address of the fourth record item D5=20, the data length L5 =150, the fifth address space [20, 170], delete the fourth record item, insert the fifth record item, the start address of the fifth record item is 20, the data length is 30, and the sixth record item is inserted, the sixth The starting address of the entry is 150 and the data length is 20.
针对S505,新写入数据针对该数据块的起始地址D6=50,数据长度L6=100,第四地址空间[50,150];第四记录项的起始地址D5=70,数据长度L5=130,第五地址空间[70,200],则删除第四记录项,插入第六记录项,第六记录项的起始地址为150,数据长度为50。For S505, the newly written data is for the starting address of the data block D6=50, the data length L6=100, the fourth address space [50, 150]; the starting address of the fourth record item D5=70, the data length L5 =130, the fifth address space [70, 200], delete the fourth record item, insert the sixth record item, the start address of the sixth record item is 150, and the data length is 50.
针对S506,新写入数据针对该数据块的起始地址D6=50,数据长度L6=100,第四地址空间[50,150];第四记录项的起始地址D5=20,数据长度L5=60,第五地址空间[20,80],则删除第四记录项,插入第五记录项,第五记录项的起始地址为20,数据长度为30。For S506, the newly written data is for the starting address of the data block D6=50, the data length L6=100, the fourth address space [50, 150]; the starting address of the fourth record item D5=20, the data length L5 = 60, the fifth address space [20, 80], delete the fourth record item, insert the fifth record item, the start address of the fifth record item is 20, and the data length is 30.
综上,本发明实施例提供的数据读取方法,可以避免因为硬盘有坏道或部分错误数据,而返回上层错误导致业务中断的问题,通过冗余视图方式将存储系统中某个LUN的分散在各个地方的冗余数据块组织起来,可以通过小范围读取数据完成坏道数据或错误数据的自动修复,提高源LUN的数据可靠性。In summary, the data reading method provided by the embodiment of the present invention can avoid the problem that the upper layer error causes the service interruption due to bad sectors or partial erroneous data of the hard disk, and the LUN is dispersed in the storage system through the redundant view mode. The redundant data blocks in various places are organized, and the data can be read in a small range to complete the automatic repair of bad track data or error data, thereby improving the data reliability of the source LUN.
上述针对存储设备所实现的功能,对本发明实施例提供的方案进行了介绍。可以理解的是,存储设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本发明中所公开的实施例描述的各示例的单元及算法步骤,本发明实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本发明实施例的技术方案的范围。The solution provided by the embodiment of the present invention is introduced for the functions implemented by the storage device. It can be understood that the storage device includes corresponding hardware structures and/or software modules for performing the respective functions in order to implement the above functions. The embodiments of the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present invention.
本发明实施例可以根据上述方法示例对存储设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。 The embodiment of the present invention may divide the function module into the storage device according to the foregoing method example. For example, each function module may be divided according to each function, or two or more functions may be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software function module. It should be noted that the division of the module in the embodiment of the present invention is schematic, and is only a logical function division, and the actual implementation may have another division manner.
图8为本发明实施例提供的存储设备的结构示意图二。如图8所示,该存储设备10包括:接收模块11、处理模块12以及发送模块13。其中FIG. 8 is a schematic structural diagram 2 of a storage device according to an embodiment of the present invention. As shown in FIG. 8, the storage device 10 includes a receiving module 11, a processing module 12, and a sending module 13. among them
接收模块11,用于获取主机的读取指令,所述读取指令中包括源逻辑单元号LUN的标识以及待读取数据的第一起始地址以及第一数据长度,所述源LUN对应有冗余视图,所述冗余视图包括至少一个第一记录项,每个所述第一记录项中存储有对所述源LUN中的至少部分数据进行冗余存储的目标LUN的标识;The receiving module 11 is configured to acquire a read command of the host, where the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to redundancy. The redundant view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
处理模块12,用于在确定所述源LUN对应的存储空间中的数据无法读取时,根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识,根据所述待读取数据对应的目标LUN的标识,读取第一冗余数据;The processing module 12 is configured to determine, according to the first start address, the first data length, and the redundant view, that the data to be read is determined when the data in the storage space corresponding to the source LUN is unreadable The identifier of the target LUN corresponding to the data, and the first redundant data is read according to the identifier of the target LUN corresponding to the data to be read;
发送模块13,用于将所述第一冗余数据返回至所述主机。The sending module 13 is configured to return the first redundant data to the host.
可选地,所述源LUN对应的存储空间被划分为多个数据块,其中,每个所述数据块各自对应有冗余视图;所述处理模块12具体用于:Optionally, the storage space corresponding to the source LUN is divided into multiple data blocks, where each of the data blocks respectively has a redundant view; the processing module 12 is specifically configured to:
根据所述第一起始地址、第一数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述待读取的数据对应的至少一个第一目标数据块;Determining, according to the first start address, the first data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read;
根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to the first record item in the redundant view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the to-be-read data.
可选地,所述第一记录项中还存储有第二冗余数据的第二起始地址和第二数据长度,所述第二起始地址和所述第二数据长度形成的第二地址空间为数据块的地址空间的子集;Optionally, the first record item further stores a second start address and a second data length of the second redundant data, and the second start address and the second address formed by the second data length Space is a subset of the address space of the data block;
所述处理模块12具体用于:The processing module 12 is specifically configured to:
根据所述第一起始地址和所述第一数据长度,确定第一地址空间;Determining a first address space according to the first start address and the first data length;
根据所述第一地址空间、各所述第一目标数据块对应的冗余视图中的第一记录项对应的第二地址空间,确定与所述第一地址空间存在交集的第二地址空间对应的目标记录项,且所述第一地址空间是多个所述第二地址空间形成的地址空间的子集;Determining, according to the first address space, the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
根据各所述目标记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to each of the target record items, an identifier of the target LUN corresponding to the data to be read.
可选地,所述第一记录项中还存储有各目标LUN的优先级;Optionally, the priority of each target LUN is also stored in the first record item;
所述处理模块12具体用于:The processing module 12 is specifically configured to:
根据所述第一地址空间以及每个数据块的地址空间,确定所述待读取数据针对每个第一目标数据块的第三地址空间;Determining, according to the first address space and an address space of each data block, the third address space of the data to be read for each first target data block;
针对任一第一目标数据块,根据所述冗余视图中的各第一记录项中的目标LUN的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,得到与所述第三地址空间存在交集的第二地址空间对应的目标记录项,且所述第三地址空间是至少一个所述第二地址空间形成的地址空间的子集,针对同一冗余数据,所述目标记录项中的目标LUN的优先级高于其它第一记录项中的目标LUN的优先级。For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
可选地,所述处理模块12还用于:Optionally, the processing module 12 is further configured to:
获取所述源LUN的标识、待插入冗余视图的第二记录项,所述第二记录项中包括第三冗余数据的第三起始地址和第三数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Obtaining an identifier of the source LUN, a second record to be inserted into the redundant view, where the second record includes a third start address and a third data length of the third redundant data, and the third redundancy The identifier of the target LUN corresponding to the data and the priority of the target LUN;
根据所述第三起始地址、第三数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述第三冗余数据对应的至少一个第二目标数据块; Determining, according to the third start address, the third data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one second target data block corresponding to the third redundant data;
根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理。And according to the priority of the target LUN stored in each first record in the redundant view corresponding to each of the second target data blocks, and the priority of the target LUN stored in the second record, The redundant view corresponding to the two target data blocks is processed by inserting the record items.
可选地,所述处理模块12具体用于:Optionally, the processing module 12 is specifically configured to:
根据所述第三起始地址、所述第三数据长度以及每个数据块的地址空间,确定所述第三冗余数据针对每个第二目标数据块的第三记录项,所述第三记录项中包括第四起始地址、第四数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Determining, according to the third start address, the third data length, and an address space of each data block, a third record of the third redundant data for each second target data block, the third The record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
针对任一第二目标数据块,根据所述第二目标数据块对应的冗余视图中的各第一记录项的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,直至所述第三记录项中的目标LUN的优先级高于第一记录项中的目标LUN的优先级为止,将所述第三记录项插入到该第一记录项之前。For each second target data block, traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
可选地,所述处理模块12还用于:Optionally, the processing module 12 is further configured to:
获取所述源LUN对应的存储空间的新写入数据的写入信息,所述写入信息包括所述源LUN的标识、所述新写入数据的第四起始地址和第四数据长度;Obtaining the write information of the newly written data of the storage space corresponding to the source LUN, where the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
根据所述新写入数据的第四起始地址、第四数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述新写入数据对应的至少一个第三目标数据块;Determining, according to the fourth start address, the fourth data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one third target data block corresponding to the newly written data. ;
根据各所述第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、所述第四起始地址和所述第四数据长度,对各所述第三目标数据块对应的冗余视图进行删除记录项的处理。And according to the fifth start address and the fifth data length, the fourth start address, and the fourth data length in each fourth record item in the redundant view corresponding to each of the third target data blocks, The redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
可选地,所述处理模块12具体用于:Optionally, the processing module 12 is specifically configured to:
根据所述第四起始地址、所述第四数据长度以及每个数据块的地址空间,确定所述新写入数据针对每个第三目标数据块的第六起始地址和第六数据长度以及第四地址空间;Determining, according to the fourth start address, the fourth data length, and an address space of each data block, a sixth start address and a sixth data length of the new write data for each third target data block. And a fourth address space;
遍历所述冗余视图中的每个第四记录项,若所述第四记录项对应的第五地址空间与所述第四地址空间存在交集,则根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。Traversing each fourth record item in the redundant view, if the fifth address space corresponding to the fourth record item and the fourth address space have an intersection, according to the fifth start address, the fifth The data length, the sixth start address, and the sixth data length are processed by deleting the record item in the redundant view corresponding to the third target data block.
可选地,所述处理模块12具体用于:Optionally, the processing module 12 is specifically configured to:
根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度建立第一分解空间R1和第二分解空间R2;Establishing a first decomposition space R1 and a second decomposition space R2 according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length;
其中,所述R1的起始地址和数据长度如下:The starting address and data length of the R1 are as follows:
R1_lba=D5;R1_len=D6-D5;R1_lba=D5; R1_len=D6-D5;
其中,所述R2的起始地址和数据长度如下:The starting address and data length of the R2 are as follows:
R2_lba=D6+L6;R2_len=D5+L5-D6-L6,所述D5为第五起始地址、所述D6为第六起始地址、所述L5为第五数据长度、所述L6为第六数据长度;R2_lba=D6+L6; R2_len=D5+L5-D6-L6, the D5 is the fifth start address, the D6 is the sixth start address, the L5 is the fifth data length, and the L6 is the first Six data lengths;
根据所述R1的数据长度和所述R2的数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。And processing the deleted record item on the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2.
可选地,所述处理模块12具体用于:Optionally, the processing module 12 is specifically configured to:
若所述R1的数据长度大于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项和第六记录项,所述第五记录项中的起始地址为D5,数据长度为 D6-D5,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record The address is D5 and the data length is D6-D5, the starting address in the sixth record is D6+L6, and the data length is D5+L5-D6-L6;
若所述R1的数据长度大于0,所述R2的数据长度小于等于0,则删除所述第四记录项,并插入第六记录项,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is less than or equal to 0, the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
若所述R1的数据长度小于等于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5。If the data length of the R1 is less than or equal to 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5. The data length is D6-D5.
本实施例提供的存储设备,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。The storage device provided in this embodiment may be used to perform the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar.
前述的存储设备的具体实现中,接收模块和发送模块可以被实现为通信接口,处理模块可以被实现为处理器,数据和程序代码可存储在存储器中,由处理器根据相应的程序指令控制执行。In a specific implementation of the foregoing storage device, the receiving module and the sending module may be implemented as a communication interface, and the processing module may be implemented as a processor, and the data and program code may be stored in the memory, and controlled by the processor according to the corresponding program instruction. .
图9为本发明实施例提供的存储设备的结构示意图三,如图9所示,该存储设备20包括至少一个处理器21、存储器22和通信接口23。所述至少一个处理器21、所述存储器22和所述通信接口23均通过总线24连接;所述存储器22存储计算机执行指令;所述至少一个处理器21执行所述存储器22存储的计算机执行指令,使得所述存储设备20通过所述通信接口43获取主机的读取指令,根据该读取指令执行上述的方法实施例,并向主机返回正确数据的过程。FIG. 9 is a schematic structural diagram 3 of a storage device according to an embodiment of the present invention. As shown in FIG. 9, the storage device 20 includes at least one processor 21, a memory 22, and a communication interface 23. The at least one processor 21, the memory 22, and the communication interface 23 are each connected by a bus 24; the memory 22 stores computer execution instructions; the at least one processor 21 executes computer execution instructions stored by the memory 22. The process of the storage device 20 obtaining the read command of the host through the communication interface 43, executing the above-described method embodiment according to the read command, and returning correct data to the host.
在上述存储设备的具体实现中,应理解,处理器21可以是中央处理单元(英文:Central Processing Unit,简称:CPU),还可以是其他通用处理器、数字信号处理器(英文:Digital Signal Processor,简称:DSP)、专用集成电路(英文:Application Specific Integrated Circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the specific implementation of the foregoing storage device, it should be understood that the processor 21 may be a central processing unit (English: Central Processing Unit, CPU for short), or may be other general-purpose processors, digital signal processors (English: Digital Signal Processor) , referred to as: DSP), ASIC (English: Application Specific Integrated Circuit, referred to as: ASIC). The general purpose processor may be a microprocessor or the processor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
存储器22可以是以下的任一种或任一种组合:固态硬盘(Solid State Drives,简称SSD)、机械硬盘、磁盘、磁盘整列等存储介质。The memory 22 may be any one or any combination of the following: a solid state drive (SSD), a mechanical hard disk, a magnetic disk, a disk array, and the like.
通信接口23可以是接口卡等与主机建立连接的接口。The communication interface 23 may be an interface such as an interface card that establishes a connection with the host.
总线24可以包括地址总线、数据总线、控制总线等,为便于表示,图9中用一条粗线表示该总线。该总线可以是以下的任一种或任一种组合:工业标准体系结构(Industry Standard Architecture,简称ISA)总线、外设组件互连标准(Peripheral Component Interconnect,简称PCI)总线、扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等有线数据传输的器件。The bus 24 may include an address bus, a data bus, a control bus, etc., for convenience of representation, the bus is indicated by a thick line in FIG. The bus may be any one or any combination of the following: an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, and an extended industry standard structure ( Extended Industry Standard Architecture (EISA) bus and other devices for wired data transmission.
此外,本发明实施例里还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当存储设备的至少一个处理器执行该计算机执行指令时,存储设备执行上述各种可能设计提供的数据读取方法。In addition, the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer execution instructions, and when at least one processor of the storage device executes the computer execution instruction, the storage device executes the foregoing various It is possible to design a data reading method.
本发明实施例里还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中。存储设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得存储设备实施前述方法实施例中的各种可能设计提供的数据读取方法。A computer program product is also provided in an embodiment of the invention, the computer program product comprising computer executed instructions stored in a computer readable storage medium. At least one processor of the storage device can read the computer-executable instructions from a computer readable storage medium, and the at least one processor executes the computer-executable instructions to cause the storage device to implement the data reading method provided by various possible designs in the foregoing method embodiments .
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程 序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。One of ordinary skill in the art will appreciate that all or part of the steps to implement the various method embodiments described above may be accomplished by hardware associated with the program instructions. The aforementioned program can be stored in a computer readable storage medium. The course When the sequence is executed, the steps including the foregoing method embodiments are performed; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims (21)

  1. 一种数据读取方法,其特征在于,包括:A data reading method, comprising:
    获取主机的读取指令,所述读取指令中包括源逻辑单元号LUN的标识以及待读取数据的第一起始地址以及第一数据长度,所述源LUN对应有冗余视图,所述冗余视图包括至少一个第一记录项,每个所述第一记录项中存储有对所述源LUN中的至少部分数据进行冗余存储的目标LUN的标识;Obtaining a read instruction of the host, where the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to a redundant view, and the redundancy The remaining view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
    在确定所述源LUN对应的存储空间中的数据无法读取时,根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识;Determining, according to the first start address, the first data length, and the redundant view, the target LUN corresponding to the data to be read, when the data in the storage space corresponding to the source LUN is unreadable. Identification
    根据所述待读取数据对应的目标LUN的标识,读取第一冗余数据,并将所述第一冗余数据返回至所述主机。And reading, according to the identifier of the target LUN corresponding to the data to be read, the first redundant data, and returning the first redundant data to the host.
  2. 根据权利要求1所述的方法,其特征在于,所述源LUN对应的存储空间被划分为多个数据块,其中,每个所述数据块各自对应有冗余视图;The method according to claim 1, wherein the storage space corresponding to the source LUN is divided into a plurality of data blocks, wherein each of the data blocks respectively corresponds to a redundant view;
    所述根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识,包括:Determining, according to the first start address, the first data length, and the redundant view, the identifier of the target LUN corresponding to the data to be read, including:
    根据所述第一起始地址、第一数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述待读取的数据对应的至少一个第一目标数据块;Determining, according to the first start address, the first data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read;
    根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to the first record item in the redundant view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the to-be-read data.
  3. 根据权利要求2所述的方法,其特征在于,所述第一记录项中还存储有第二冗余数据的第二起始地址和第二数据长度,所述第二起始地址和所述第二数据长度形成的第二地址空间为数据块的地址空间的子集;The method according to claim 2, wherein the first record item further stores a second start address and a second data length of the second redundant data, the second start address and the The second address space formed by the second data length is a subset of the address space of the data block;
    所述根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识,包括:Determining, according to the first record item in the redundancy view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the data to be read, including:
    根据所述第一起始地址和所述第一数据长度,确定第一地址空间;Determining a first address space according to the first start address and the first data length;
    根据所述第一地址空间、各所述第一目标数据块对应的冗余视图中的第一记录项对应的第二地址空间,确定与所述第一地址空间存在交集的第二地址空间对应的目标记录项,且所述第一地址空间是多个所述第二地址空间形成的地址空间的子集;Determining, according to the first address space, the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
    根据各所述目标记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to each of the target record items, an identifier of the target LUN corresponding to the data to be read.
  4. 根据权利要求3所述的方法,其特征在于,所述第一记录项中还存储有各目标LUN的优先级;The method according to claim 3, wherein the first record item further stores a priority of each target LUN;
    所述根据所述第一地址空间、各所述第一目标数据块的冗余视图中的第一记录项对应的第二地址空间,确定与所述第一地址空间存在交集的第二地址空间对应的目标记录项,包括:Determining, according to the first address space, the second address space corresponding to the first record item in the redundant view of each of the first target data blocks, determining a second address space that intersects with the first address space Corresponding target records, including:
    根据所述第一地址空间以及每个数据块的地址空间,确定所述待读取数据针对每个第一目标数据块的第三地址空间;Determining, according to the first address space and an address space of each data block, the third address space of the data to be read for each first target data block;
    针对任一第一目标数据块,根据所述冗余视图中的各第一记录项中的目标LUN的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,得到与所述第三地址空间存在交集的第二地址空间对应的目标记录项,且所述第三地址空间是至少一个所述第二地址空间形成的地址空间的子集,针对同一冗余数据,所述目标记录项中的目标LUN的优先级高于其它第一记录项中的目标LUN的优先级。 For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
  5. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, wherein the method further comprises:
    获取所述源LUN的标识、待插入冗余视图的第二记录项,所述第二记录项中包括第三冗余数据的第三起始地址和第三数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Obtaining an identifier of the source LUN, a second record to be inserted into the redundant view, where the second record includes a third start address and a third data length of the third redundant data, and the third redundancy The identifier of the target LUN corresponding to the data and the priority of the target LUN;
    根据所述第三起始地址、第三数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述第三冗余数据对应的至少一个第二目标数据块;Determining, according to the third start address, the third data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one second target data block corresponding to the third redundant data;
    根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理。And according to the priority of the target LUN stored in each first record in the redundant view corresponding to each of the second target data blocks, and the priority of the target LUN stored in the second record, The redundant view corresponding to the two target data blocks is processed by inserting the record items.
  6. 根据权利要求5所述的方法,其特征在于,所述根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理,包括:The method according to claim 5, wherein the priority of the target LUN stored in each of the first entries in the redundant view corresponding to each of the second target data blocks and the second record The priority of the target LUN stored in the item, and the processing of inserting the record item into the redundant view corresponding to each of the second target data blocks, including:
    根据所述第三起始地址、所述第三数据长度以及每个数据块的地址空间,确定所述第三冗余数据针对每个第二目标数据块的第三记录项,所述第三记录项中包括第四起始地址、第四数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Determining, according to the third start address, the third data length, and an address space of each data block, a third record of the third redundant data for each second target data block, the third The record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
    针对任一第二目标数据块,根据所述第二目标数据块对应的冗余视图中的各第一记录项的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,直至所述第三记录项中的目标LUN的优先级高于第一记录项中的目标LUN的优先级为止,将所述第三记录项插入到该第一记录项之前。For each second target data block, traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
  7. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, wherein the method further comprises:
    获取所述源LUN对应的存储空间的新写入数据的写入信息,所述写入信息包括所述源LUN的标识、所述新写入数据的第四起始地址和第四数据长度;Obtaining the write information of the newly written data of the storage space corresponding to the source LUN, where the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
    根据所述新写入数据的第四起始地址、第四数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述新写入数据对应的至少一个第三目标数据块;Determining, according to the fourth start address, the fourth data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one third target data block corresponding to the newly written data. ;
    根据各所述第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、所述第四起始地址和所述第四数据长度,对各所述第三目标数据块对应的冗余视图进行删除记录项的处理。And according to the fifth start address and the fifth data length, the fourth start address, and the fourth data length in each fourth record item in the redundant view corresponding to each of the third target data blocks, The redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
  8. 根据权利要求7所述的方法,其特征在于,所述根据各所述第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、所述第四起始地址和所述第四数据长度,对各所述第三目标数据块对应的冗余视图进行删除记录项的处理,包括:The method according to claim 7, wherein the fifth starting address and the fifth data length of each of the fourth entries in the redundant view corresponding to each of the third target data blocks are The fourth start address and the fourth data length are processed, and the redundant view corresponding to each of the third target data blocks is deleted, including:
    根据所述第四起始地址、所述第四数据长度以及每个数据块的地址空间,确定所述新写入数据针对每个第三目标数据块的第六起始地址和第六数据长度以及第四地址空间;Determining, according to the fourth start address, the fourth data length, and an address space of each data block, a sixth start address and a sixth data length of the new write data for each third target data block. And a fourth address space;
    遍历所述冗余视图中的每个第四记录项,若所述第四记录项对应的第五地址空间与所述第四地址空间存在交集,则根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。Traversing each fourth record item in the redundant view, if the fifth address space corresponding to the fourth record item and the fourth address space have an intersection, according to the fifth start address, the fifth The data length, the sixth start address, and the sixth data length are processed by deleting the record item in the redundant view corresponding to the third target data block.
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述第五起始地址、第五数 据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理,包括:The method according to claim 8, wherein said according to said fifth starting address, said fifth number And processing the deletion record item in the redundant view corresponding to the third target data block according to the length, the sixth start address, and the sixth data length, including:
    根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度建立第一分解空间R1和第二分解空间R2;Establishing a first decomposition space R1 and a second decomposition space R2 according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length;
    其中,所述R1的起始地址和数据长度如下:The starting address and data length of the R1 are as follows:
    R1_lba=D5;R1_len=D6-D5;R1_lba=D5; R1_len=D6-D5;
    其中,所述R2的起始地址和数据长度如下:The starting address and data length of the R2 are as follows:
    R2_lba=D6+L6;R2_len=D5+L5-D6-L6,其中,所述R1_lba为所述第一分解空间的起始地址,所述R1_len为所述第一分解空间的数据长度,所述R2_lba为所述第二分解空间的起始地址,所述R2_len为所述第二分解空间的数据长度,所述D5为第五起始地址、所述D6为第六起始地址、所述L5为第五数据长度、所述L6为第六数据长度;R2_lba=D6+L6; R2_len=D5+L5-D6-L6, wherein R1_lba is a starting address of the first decomposition space, the R1_len is a data length of the first decomposition space, and the R2_lba For the start address of the second decomposition space, the R2_len is the data length of the second decomposition space, the D5 is the fifth start address, the D6 is the sixth start address, and the L5 is a fifth data length, wherein the L6 is a sixth data length;
    根据所述R1的数据长度和所述R2的数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。And processing the deleted record item on the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2.
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述R1的数据长度和所述R2的数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理,包括:The method according to claim 9, wherein the processing of deleting a record item is performed on the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2, include:
    若所述R1的数据长度大于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项和第六记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record The address is D5, the data length is D6-D5, the starting address in the sixth record is D6+L6, and the data length is D5+L5-D6-L6;
    若所述R1的数据长度大于0,所述R2的数据长度小于等于0,则删除所述第四记录项,并插入第六记录项,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is less than or equal to 0, the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
    若所述R1的数据长度小于等于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5。If the data length of the R1 is less than or equal to 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5. The data length is D6-D5.
  11. 一种存储设备,其特征在于,包括:A storage device, comprising:
    接收模块,用于获取主机的读取指令,所述读取指令中包括源逻辑单元号LUN的标识以及待读取数据的第一起始地址以及第一数据长度,所述源LUN对应有冗余视图,所述冗余视图包括至少一个第一记录项,每个所述第一记录项中存储有对所述源LUN中的至少部分数据进行冗余存储的目标LUN的标识;a receiving module, configured to acquire a read command of the host, where the read command includes an identifier of the source logical unit number LUN, a first start address of the data to be read, and a first data length, where the source LUN corresponds to redundancy View, the redundant view includes at least one first record item, and each of the first record items stores an identifier of a target LUN that performs redundancy storage on at least part of the data in the source LUN;
    处理模块,用于在确定所述源LUN对应的存储空间中的数据无法读取时,根据所述第一起始地址、第一数据长度以及所述冗余视图,确定所述待读取的数据对应的目标LUN的标识,根据所述待读取数据对应的目标LUN的标识,读取第一冗余数据;a processing module, configured to determine, according to the first start address, the first data length, and the redundant view, the data to be read, when the data in the storage space corresponding to the source LUN is unreadable The identifier of the target LUN is read, and the first redundant data is read according to the identifier of the target LUN corresponding to the data to be read;
    发送模块,用于将所述第一冗余数据返回至所述主机。And a sending module, configured to return the first redundant data to the host.
  12. 根据权利要求11所述的存储设备,其特征在于,所述源LUN对应的存储空间被划分为多个数据块,其中,每个所述数据块各自对应有冗余视图;所述处理模块具体用于:The storage device according to claim 11, wherein the storage space corresponding to the source LUN is divided into a plurality of data blocks, wherein each of the data blocks respectively has a redundant view; Used for:
    根据所述第一起始地址、第一数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述待读取的数据对应的至少一个第一目标数据块;Determining, according to the first start address, the first data length, and an address space of each data block corresponding to the identifier of the source LUN, at least one first target data block corresponding to the data to be read;
    根据各所述第一目标数据块对应的冗余视图中的第一记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to the first record item in the redundant view corresponding to each of the first target data blocks, an identifier of the target LUN corresponding to the to-be-read data.
  13. 根据权利要求12所述的存储设备,其特征在于,所述第一记录项中还存储有第 二冗余数据的第二起始地址和第二数据长度,所述第二起始地址和所述第二数据长度形成的第二地址空间为数据块的地址空间的子集;The storage device according to claim 12, wherein said first record entry further stores a second start address and a second data length of the second redundant data, wherein the second address space formed by the second start address and the second data length is a subset of an address space of the data block;
    所述处理模块具体用于:The processing module is specifically configured to:
    根据所述第一起始地址和所述第一数据长度,确定第一地址空间;Determining a first address space according to the first start address and the first data length;
    根据所述第一地址空间、各所述第一目标数据块对应的冗余视图中的第一记录项对应的第二地址空间,确定与所述第一地址空间存在交集的第二地址空间对应的目标记录项,且所述第一地址空间是多个所述第二地址空间形成的地址空间的子集;Determining, according to the first address space, the second address space corresponding to the first record item in the redundant view corresponding to each of the first target data blocks, corresponding to the second address space that has an intersection with the first address space a target record entry, and the first address space is a subset of address spaces formed by the plurality of the second address spaces;
    根据各所述目标记录项,确定所述待读取数据对应的目标LUN的标识。And determining, according to each of the target record items, an identifier of the target LUN corresponding to the data to be read.
  14. 根据权利要求13所述的存储设备,其特征在于,所述第一记录项中还存储有各目标LUN的优先级;The storage device according to claim 13, wherein the first record item further stores a priority of each target LUN;
    所述处理模块具体用于:The processing module is specifically configured to:
    根据所述第一地址空间以及每个数据块的地址空间,确定所述待读取数据针对每个第一目标数据块的第三地址空间;Determining, according to the first address space and an address space of each data block, the third address space of the data to be read for each first target data block;
    针对任一第一目标数据块,根据所述冗余视图中的各第一记录项中的目标LUN的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,得到与所述第三地址空间存在交集的第二地址空间对应的目标记录项,且所述第三地址空间是至少一个所述第二地址空间形成的地址空间的子集,针对同一冗余数据,所述目标记录项中的目标LUN的优先级高于其它第一记录项中的目标LUN的优先级。For each of the first target data blocks, traversing each of the first records in the redundant view according to a priority of the target LUNs in each of the first entries in the redundant view from high to low Obtaining a target record corresponding to the second address space where the third address space intersects, and the third address space is a subset of the address space formed by at least one of the second address spaces, for the same redundancy Data, the target LUN in the target record item has a higher priority than the target LUN in the other first record item.
  15. 根据权利要求12所述的存储设备,其特征在于,所述处理模块还用于:The storage device according to claim 12, wherein the processing module is further configured to:
    获取所述源LUN的标识、待插入冗余视图的第二记录项,所述第二记录项中包括第三冗余数据的第三起始地址和第三数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Obtaining an identifier of the source LUN, a second record to be inserted into the redundant view, where the second record includes a third start address and a third data length of the third redundant data, and the third redundancy The identifier of the target LUN corresponding to the data and the priority of the target LUN;
    根据所述第三起始地址、第三数据长度以及所述源LUN的标识对应的各数据块的地址空间,确定所述第三冗余数据对应的至少一个第二目标数据块;Determining, according to the third start address, the third data length, and the address space of each data block corresponding to the identifier of the source LUN, the at least one second target data block corresponding to the third redundant data;
    根据各所述第二目标数据块对应的冗余视图中每个第一记录项中存储的目标LUN的优先级以及所述第二记录项中存储的目标LUN的优先级,对各所述第二目标数据块对应的冗余视图进行插入记录项的处理。And according to the priority of the target LUN stored in each first record in the redundant view corresponding to each of the second target data blocks, and the priority of the target LUN stored in the second record, The redundant view corresponding to the two target data blocks is processed by inserting the record items.
  16. 根据权利要求15所述的存储设备,其特征在于,所述处理模块具体用于:The storage device according to claim 15, wherein the processing module is specifically configured to:
    根据所述第三起始地址、所述第三数据长度以及每个数据块的地址空间,确定所述第三冗余数据针对每个第二目标数据块的第三记录项,所述第三记录项中包括第四起始地址、第四数据长度、所述第三冗余数据对应的目标LUN的标识以及所述目标LUN的优先级;Determining, according to the third start address, the third data length, and an address space of each data block, a third record of the third redundant data for each second target data block, the third The record entry includes a fourth start address, a fourth data length, an identifier of the target LUN corresponding to the third redundant data, and a priority of the target LUN;
    针对任一第二目标数据块,根据所述第二目标数据块对应的冗余视图中的各第一记录项的优先级从高到低的顺序,遍历所述冗余视图中的每个第一记录项,直至所述第三记录项中的目标LUN的优先级高于第一记录项中的目标LUN的优先级为止,将所述第三记录项插入到该第一记录项之前。For each second target data block, traversing each of the redundant views according to a priority of each first record in the redundant view corresponding to the second target data block from highest to lowest a record item is inserted before the first record item until the priority of the target LUN in the third record item is higher than the priority of the target LUN in the first record item.
  17. 根据权利要求12所述的存储设备,其特征在于,所述处理模块还用于:The storage device according to claim 12, wherein the processing module is further configured to:
    获取所述源LUN对应的存储空间的新写入数据的写入信息,所述写入信息包括所述源LUN的标识、所述新写入数据的第四起始地址和第四数据长度;Obtaining the write information of the newly written data of the storage space corresponding to the source LUN, where the write information includes an identifier of the source LUN, a fourth start address of the newly written data, and a fourth data length;
    根据所述新写入数据的第四起始地址、第四数据长度以及所述源LUN的标识对应的 各数据块的地址空间,确定所述新写入数据对应的至少一个第三目标数据块;Corresponding to the fourth start address, the fourth data length, and the identifier of the source LUN of the newly written data. Determining, by the address space of each data block, at least one third target data block corresponding to the newly written data;
    根据各所述第三目标数据块对应的冗余视图中每个第四记录项中的第五起始地址和第五数据长度、所述第四起始地址和所述第四数据长度,对各所述第三目标数据块对应的冗余视图进行删除记录项的处理。And according to the fifth start address and the fifth data length, the fourth start address, and the fourth data length in each fourth record item in the redundant view corresponding to each of the third target data blocks, The redundant view corresponding to each of the third target data blocks performs processing for deleting the record items.
  18. 根据权利要求17所述的存储设备,其特征在于,所述处理模块具体用于:The storage device according to claim 17, wherein the processing module is specifically configured to:
    根据所述第四起始地址、所述第四数据长度以及每个数据块的地址空间,确定所述新写入数据针对每个第三目标数据块的第六起始地址和第六数据长度以及第四地址空间;Determining, according to the fourth start address, the fourth data length, and an address space of each data block, a sixth start address and a sixth data length of the new write data for each third target data block. And a fourth address space;
    遍历所述冗余视图中的每个第四记录项,若所述第四记录项对应的第五地址空间与所述第四地址空间存在交集,则根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。Traversing each fourth record item in the redundant view, if the fifth address space corresponding to the fourth record item and the fourth address space have an intersection, according to the fifth start address, the fifth The data length, the sixth start address, and the sixth data length are processed by deleting the record item in the redundant view corresponding to the third target data block.
  19. 根据权利要求18所述的存储设备,其特征在于,所述处理模块具体用于:The storage device according to claim 18, wherein the processing module is specifically configured to:
    根据所述第五起始地址、第五数据长度、第六起始地址和第六数据长度建立第一分解空间R1和第二分解空间R2;Establishing a first decomposition space R1 and a second decomposition space R2 according to the fifth start address, the fifth data length, the sixth start address, and the sixth data length;
    其中,所述R1的起始地址和数据长度如下:The starting address and data length of the R1 are as follows:
    R1_lba=D5;R1_len=D6-D5;R1_lba=D5; R1_len=D6-D5;
    其中,所述R2的起始地址和数据长度如下:The starting address and data length of the R2 are as follows:
    R2_lba=D6+L6;R2_len=D5+L5-D6-L6,其中,所述R1_lba为所述第一分解空间的起始地址,所述R1_len为所述第一分解空间的数据长度,所述R2_lba为所述第二分解空间的起始地址,所述R2_len为所述第二分解空间的数据长度,所述D5为第五起始地址、所述D6为第六起始地址、所述L5为第五数据长度、所述L6为第六数据长度;R2_lba=D6+L6; R2_len=D5+L5-D6-L6, wherein R1_lba is a starting address of the first decomposition space, the R1_len is a data length of the first decomposition space, and the R2_lba For the start address of the second decomposition space, the R2_len is the data length of the second decomposition space, the D5 is the fifth start address, the D6 is the sixth start address, and the L5 is a fifth data length, wherein the L6 is a sixth data length;
    根据所述R1的数据长度和所述R2的数据长度,对所述第三目标数据块对应的冗余视图进行删除记录项的处理。And processing the deleted record item on the redundant view corresponding to the third target data block according to the data length of the R1 and the data length of the R2.
  20. 根据权利要求19所述的存储设备,其特征在于,所述处理模块具体用于:The storage device according to claim 19, wherein the processing module is specifically configured to:
    若所述R1的数据长度大于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项和第六记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record and the sixth record are inserted, and the start of the fifth record The address is D5, the data length is D6-D5, the starting address in the sixth record is D6+L6, and the data length is D5+L5-D6-L6;
    若所述R1的数据长度大于0,所述R2的数据长度小于等于0,则删除所述第四记录项,并插入第六记录项,所述第六记录项中的起始地址为D6+L6,数据长度为D5+L5-D6-L6;If the data length of the R1 is greater than 0, and the data length of the R2 is less than or equal to 0, the fourth record is deleted, and the sixth record is inserted, and the start address in the sixth record is D6+ L6, the data length is D5+L5-D6-L6;
    若所述R1的数据长度小于等于0,所述R2的数据长度大于0,则删除所述第四记录项,并插入第五记录项,所述第五记录项中的起始地址为D5,数据长度为D6-D5。If the data length of the R1 is less than or equal to 0, and the data length of the R2 is greater than 0, the fourth record is deleted, and the fifth record is inserted, and the start address in the fifth record is D5. The data length is D6-D5.
  21. 一种存储设备,其特征在于,所述存储设备包括至少一个处理器和存储器;A storage device, characterized in that the storage device comprises at least one processor and a memory;
    所述存储器存储计算机执行指令;The memory stores a computer execution instruction;
    所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述存储设备如执行权利要求1至10任一项所述的数据读取方法。 The at least one processor executes the computer-executed instructions stored in the memory such that the storage device performs the data reading method of any one of claims 1 to 10.
PCT/CN2017/097682 2016-12-23 2017-08-16 Method and device for reading data WO2018113322A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611208442.0A CN106775481B (en) 2016-12-23 2016-12-23 Method for reading data and equipment
CN201611208442.0 2016-12-23

Publications (1)

Publication Number Publication Date
WO2018113322A1 true WO2018113322A1 (en) 2018-06-28

Family

ID=58920007

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/097682 WO2018113322A1 (en) 2016-12-23 2017-08-16 Method and device for reading data

Country Status (2)

Country Link
CN (1) CN106775481B (en)
WO (1) WO2018113322A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775481B (en) * 2016-12-23 2019-11-05 华为技术有限公司 Method for reading data and equipment
JP6747753B2 (en) 2017-10-25 2020-08-26 ホアウェイ・テクノロジーズ・カンパニー・リミテッド Active/active storage system and address allocation method
CN111224903B (en) * 2018-11-26 2022-10-14 深圳市中兴微电子技术有限公司 Data transmission method, data transmission equipment and computer readable storage medium
CN113986128A (en) * 2021-10-26 2022-01-28 杭州宏杉科技股份有限公司 LUN data copying method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102667738A (en) * 2009-10-09 2012-09-12 提琴存储器公司 Memory system with multiple striping of RAID groups and method for performing the same
CN105808378A (en) * 2016-02-26 2016-07-27 华为技术有限公司 Metadata restoration method and device
CN106775481A (en) * 2016-12-23 2017-05-31 华为技术有限公司 Method for reading data and equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622189B (en) * 2011-12-31 2015-11-25 华为数字技术(成都)有限公司 The device of Storage Virtualization, date storage method and system
US9703500B2 (en) * 2012-04-25 2017-07-11 International Business Machines Corporation Reducing power consumption by migration of data within a tiered storage system
US9268502B2 (en) * 2013-09-16 2016-02-23 Netapp, Inc. Dense tree volume metadata organization
WO2015089798A1 (en) * 2013-12-19 2015-06-25 华为技术有限公司 Data migration method and device
CN103713857B (en) * 2013-12-24 2017-06-27 华为技术有限公司 The method and storage device of data storage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102667738A (en) * 2009-10-09 2012-09-12 提琴存储器公司 Memory system with multiple striping of RAID groups and method for performing the same
CN105808378A (en) * 2016-02-26 2016-07-27 华为技术有限公司 Metadata restoration method and device
CN106775481A (en) * 2016-12-23 2017-05-31 华为技术有限公司 Method for reading data and equipment

Also Published As

Publication number Publication date
CN106775481B (en) 2019-11-05
CN106775481A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US11163472B2 (en) Method and system for managing storage system
AU2017228544B2 (en) Nonvolatile media dirty region tracking
US9189311B2 (en) Rebuilding a storage array
KR101863406B1 (en) Nonvolatile media journaling of verified data sets
WO2018113322A1 (en) Method and device for reading data
US10860447B2 (en) Database cluster architecture based on dual port solid state disk
CN104516793A (en) Data mirroring control apparatus and method
US10983874B2 (en) Processing a recover state input/output request
WO2012140695A1 (en) Storage control apparatus and error correction method
US9690651B2 (en) Controlling a redundant array of independent disks (RAID) that includes a read only flash data storage device
US10831401B2 (en) Method, device and computer program product for writing data
US10503620B1 (en) Parity log with delta bitmap
JP2006139478A (en) Disk array system
US9436554B2 (en) Information processing apparatus and data repairing method
US11314594B2 (en) Method, device and computer program product for recovering data
US10664346B2 (en) Parity log with by-pass
US11747990B2 (en) Methods and apparatuses for management of raid
JP3798773B2 (en) Disk control apparatus and consistency recovery method for redundant logical disk drive
CN115809011A (en) Data reconstruction method and device in storage system
WO2018107460A1 (en) Object-based copying method and apparatus, and object-based storage device
CN109086010A (en) A method of promoting metadata reliability on full flash memory storage array
BR112014005623B1 (en) METHOD OF RECORDING PENDING WRITINGS IN A STORAGE SET AND COMPUTER-READABLE STORAGE MEDIA
JPWO2013080299A1 (en) Data management apparatus, data copy method, and program

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: 17882340

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: 17882340

Country of ref document: EP

Kind code of ref document: A1