Address mapping method, apparatus, storage system, program product, storage medium

By receiving the starting logical block address and disk array identifier, and querying stripe size and physical address information, the complex problem of logical block address translation caused by inconsistent disk array construction methods in storage systems is solved, and efficient data access is achieved.

CN120743812BActive Publication Date: 2026-01-27SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511262361.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2026-01-27
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

The inconsistent disk array construction methods and stripe sizes in the storage system lead to complex translation of the starting logical block address, affecting data access efficiency.

Method used

By receiving the starting logical block address and disk array identifier, querying the stripe size, and using a preset mapping table to determine the stripe identifier and physical address information, efficient conversion from logical block address to physical block address is achieved.

Benefits of technology

In scenarios with different disk arrays and stripe sizes, the efficiency of starting logical block address translation is improved, thereby increasing data operation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743812B_ABST
    Figure CN120743812B_ABST
Patent Text Reader

Abstract

The application provides an address mapping method, device, storage system, program product and storage medium, and relates to the technical field of storage. In the method, the storage system receives an input starting logical block address and a disk array identifier at the same time, and can query a strip size configured by a disk array corresponding to the disk array identifier, and then determines a strip identifier by using the starting logical block address, the disk array identifier and the strip size at the same time, so as to determine a strip where the starting logical block address is located by combining the disk array identifier and the strip size of different disk arrays. Subsequently, the storage system can query strip physical address information corresponding to the strip identifier in a preset mapping table, and determines a physical block address corresponding to the starting logical block address according to the strip physical address information. In this way, the application can improve the conversion efficiency of the starting logical block address and the data operation efficiency in the scene where the storage system can be provided with different disk arrays and different disk arrays can correspond to different strip sizes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and in particular to an address mapping method, apparatus, storage system, program product, and storage medium. Background Technology

[0002] To enhance data storage security, storage systems can be configured with multiple disk arrays (RAID, Redundant Arrays of Independent Disks) to form storage pools. Furthermore, when a host operates on user data within the storage system, it needs to provide the storage system with a Starting Logical Block Address (SLBA) to indicate the starting point of the host's access. The storage system can then translate this starting logical address into a Physical Block Address (PBA) on the disk to perform operations on the data within the disk.

[0003] In related technologies, the construction methods and stripe sizes of disk arrays in storage systems can be different, which makes the conversion of the starting logical block address more complicated and not conducive to efficient data access. Summary of the Invention

[0004] This invention provides an address mapping method, apparatus, storage system, program product, and storage medium, which can improve the conversion efficiency of the starting logical block address in scenarios where the storage system has different disk arrays and different disk arrays can correspond to different stripe sizes.

[0005] This invention provides an address mapping method applied to a storage system, comprising:

[0006] Receive the starting logical block address and disk array identifier as input;

[0007] Query the stripe size configured for the disk array corresponding to the disk array identifier, and determine the stripe identifier using the starting logical block address, disk array identifier, and stripe size;

[0008] The system queries the stripe physical address information corresponding to the stripe identifier in the preset mapping table, and determines the physical block address corresponding to the starting logical block address based on the stripe physical address information.

[0009] The present invention also provides an address mapping device for use in a storage system, comprising:

[0010] The receiving module is used to receive the input starting logical block address and disk array identifier;

[0011] The stripe identifier determination module is used to query the stripe size configured for the disk array corresponding to the disk array identifier, and determine the stripe identifier using the starting logical block address, disk array identifier, and stripe size;

[0012] The physical block address translation module is used to query the stripe physical address information corresponding to the stripe identifier in the preset mapping table, and determine the physical block address corresponding to the starting logical block address based on the stripe physical address information.

[0013] The present invention also provides a storage system, comprising:

[0014] Data storage, used to set up disk arrays;

[0015] Program memory, used to store computer programs;

[0016] The processor is used to implement the address mapping method described above when executing computer programs.

[0017] The present invention also provides a computer program product, including a computer program or instructions, which implement the above-described address mapping method when executed by a processor.

[0018] The present invention also provides a non-volatile computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the above-described address mapping method.

[0019] The beneficial effects of this invention are as follows: The storage system first receives the input starting logical block address and disk array identifier, where the disk array identifier indicates the disk array where the starting logical block address is located. Subsequently, the storage system queries the stripe size configured on the disk array corresponding to the disk array identifier, and determines the stripe identifier using the starting logical block address, disk array identifier, and stripe size. It can also determine the stripe where the starting logical block address is located by combining the disk array identifiers and stripe sizes of different disk arrays. Finally, the storage system queries the stripe physical address information corresponding to the stripe identifier in a preset mapping table, and determines the physical block address corresponding to the starting logical block address based on the stripe physical address information. This allows the stripe physical address information corresponding to the stripe identifier to be pre-recorded in the preset mapping table, enabling efficient querying of the stripe physical address information and efficient conversion of the physical block address corresponding to the starting logical block address. Thus, this invention improves the conversion efficiency of the starting logical block address in scenarios where the storage system has different disk arrays and different disk arrays can have different stripe sizes, thereby improving data operation efficiency.

[0020] The present invention also provides an address mapping device, a storage system, a program product, and a storage medium, which have the above-mentioned beneficial effects. Attached Figure Description

[0021] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart of an address mapping method provided in an embodiment of the present invention;

[0023] Figure 2 This is a schematic diagram of an address mapping process provided in an embodiment of the present invention;

[0024] Figure 3 This is a structural block diagram of an address mapping device provided in an embodiment of the present invention. Detailed Implementation

[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.

[0026] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0027] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0028] To enhance data storage security, storage systems can utilize multiple disk arrays, forming storage pools. Furthermore, when a host operates on user data within the storage system, it needs to provide the storage system with a starting logical block address to indicate the origin of its access. The storage system can then translate this starting logical address into a physical block address on the disk to perform operations on the data. However, in related technologies, the varying configurations and stripe sizes of disk arrays within the storage system lead to complex starting logical block address translations, hindering efficient data access.

[0029] In view of this, to address the technical problem of how to improve the efficiency of starting logical block address mapping, the present invention provides an address mapping method. For scenarios where a storage system has different disk arrays and different disk arrays correspond to different stripe sizes, the present invention can determine the stripe where the starting logical block address is located by combining the disk array identifier and stripe size of different disk arrays, ensuring that the stripe setting is related to the disk array. Furthermore, the physical address information of the stripe identifier corresponding to the stripe can be queried in a preset mapping table, and the physical block address corresponding to the starting logical block address can be determined based on the stripe physical address information, thereby improving the efficiency of mapping the starting logical block address to the physical block address and improving data operation efficiency.

[0030] For easier understanding, please refer to Figure 1 , Figure 1 A flowchart of an address mapping method provided in an embodiment of the present invention, which is applied to a storage system, may include:

[0031] S101, Receive the input starting logic block address and disk array identifier.

[0032] In this embodiment, the storage system uses a disk array identifier when performing initial logical block address mapping. This disk array identifier is used to uniquely identify the disk array. This embodiment does not limit the specific form and setting method of the disk array identifier, and it can be set according to actual application requirements.

[0033] Furthermore, the aforementioned starting logical block address can originate from data processing requests (NVMe requests, Non-Volatile Memory Host Controller Interface Specification), such as data read requests and data write requests. Additionally, for ease of storage space management, the storage system can map a portion of the logical address range to corresponding disk arrays; that is, each disk array corresponds to a set of logical address ranges. Therefore, when extracting the starting logical block address from the data processing request, the disk array corresponding to that starting logical block address can be further queried to obtain the disk array identifier.

[0034] In one implementation, receiving the input starting logical block address and disk array identifier may include:

[0035] Step 11: Receive the data processing request and extract the starting logical block address from the data processing request;

[0036] Step 12: Query the disk array corresponding to the starting logical block address to obtain the disk array identifier.

[0037] In one specific implementation, querying the disk array corresponding to the starting logical block address may include:

[0038] Step 21: Determine the logical address range where the starting logical block address is located according to the preset address mapping table, and determine the disk array corresponding to the address range.

[0039] It is understandable that the preset address mapping table records the logical address range corresponding to each disk array. Therefore, by simply matching the starting logical block address in the request with the logical address range in the preset address mapping table, the disk array corresponding to the starting logical block address can be determined.

[0040] Furthermore, when adding a new disk array to the storage system, a mapping relationship between the disk array and the logical address range can be created and saved to a preset address mapping table.

[0041] In one embodiment, the method may further include:

[0042] Step 31: When adding a disk array to the storage system, create a mapping between the disk array and the logical address range, and save it to the preset address mapping table.

[0043] S102. Query the stripe size configured for the disk array corresponding to the disk array identifier, and determine the stripe identifier using the starting logical block address, disk array identifier, and stripe size.

[0044] In this embodiment, the storage system can be configured with multiple disk arrays, each with different RAID levels, such as RAID 0, RAID 1, RAID 5, RAID 6, and RAID 10. Each level emphasizes different aspects in terms of performance, redundancy strategies, and cost. Setting different RAID levels for different disk arrays can meet the data storage needs of different users. Furthermore, due to the number of disks and the RAID level, the stripe size corresponding to each disk array may also differ. This results in multiple RAID levels and stripe sizes within the storage system, thereby increasing the difficulty of mapping and converting the starting logical block address using related technologies.

[0045] Therefore, in this embodiment, when the storage system translates the starting logical block address, it also needs to obtain the disk array identifier and the stripe size configured for the disk array corresponding to that identifier. Then, it uses the starting logical block address, disk array identifier, and stripe size to determine the stripe identifier. This setup achieves two advantages: firstly, it allows for the differentiation of stripe identifiers for different disk arrays in storage systems with multiple stripe sizes using different disk array identifiers; secondly, it retains the method of determining the stripe identifier through computation, ensuring the efficiency of stripe identifier determination.

[0046] In one specific implementation, determining the stripe identifier using the starting logical block address, disk array identifier, and stripe size may include:

[0047] Step 41: Patch the disk array identifier to the highest bit of the starting logical block address to obtain the patch value;

[0048] Step 42: Shift the concatenated value to the right according to the strip size to obtain the strip identifier; where the number of binary bits of the strip size is the number of bits shifted right from the concatenated value.

[0049] For example, if the starting logical block address SLBA = 0x12345678, the disk array identifier is 0x01, and the stripe length is 0x1000, then the concatenated value can be 0x112345678. The number of binary bits for the stripe size is log2(0x1000) = 12, and the result of the right shift operation is 0x112345. Therefore, 0x112345 can be used as the stripe identifier.

[0050] S103. Query the stripe physical address information corresponding to the stripe identifier in the preset mapping table, and determine the physical block address corresponding to the starting logical block address based on the stripe physical address information.

[0051] In this embodiment, a preset mapping table can be used to store the physical address information of each stripe, such as the physical address of each physical block in the stripe, and a stripe identifier can be marked on the physical address information. Then, after obtaining the stripe identifier in step S102, the physical address information corresponding to the stripe identifier can be queried in the preset mapping table, and the physical block address corresponding to the starting logical block address can be determined based on the stripe physical address information. Thus, this embodiment can quickly realize the conversion from the starting logical block address to the physical block address through stripe identifier calculation and stripe physical address information query, thereby enabling rapid mapping conversion from logical address to physical address in scenarios where the storage system has different disk arrays and different disk arrays can correspond to different stripe sizes.

[0052] In one specific implementation, querying the stripe physical address information corresponding to the stripe identifier in a preset mapping table includes:

[0053] Step 51: Query the target stripe entry corresponding to the stripe identifier in the preset master mapping table, and read the stripe starting physical address and metadata pointer from the target stripe entry; the preset master mapping table stores the stripe entries corresponding to the stripes in the storage system. The stripe entry contains the stripe identifier, the stripe starting physical address and the metadata pointer. The metadata pointer records the storage location of the metadata entry.

[0054] Step 52: Read the target metadata entry corresponding to the metadata pointer in the preset metadata table, and read the disk information and disk offset value corresponding to the physical block in the entry from the target metadata entry; the preset metadata table stores the metadata entries corresponding to the stripes in the storage system, and the metadata entries sequentially record the disk information and disk offset value of each physical block in the entry.

[0055] In this embodiment, the preset mapping table specifically includes a preset main mapping table and a preset metadata table. The preset main mapping table can store stripe entries corresponding to each stripe in the storage system. Each stripe entry includes at least a stripe identifier, a stripe starting physical address, and a metadata pointer. The preset metadata table stores metadata entries corresponding to the stripes in the storage system. Each metadata entry at least sequentially records the disk information and disk offset values ​​of each physical block in the entry. The metadata pointer in the stripe entry points to the storage location of the metadata entry, so the metadata entry can be quickly read after the stripe entry is queried.

[0056] When querying the mapping table, this embodiment first needs to query the target stripe entry corresponding to the stripe identifier in the preset master mapping table, and read the stripe's starting physical address and metadata pointer from the target stripe entry. The starting physical address indicates the starting physical address of the stripe in the storage system. Subsequently, this embodiment can access the corresponding target metadata entry according to the metadata pointer, and read the disk information and disk offset value corresponding to the physical block in the target metadata entry. The disk information indicates the disk where the physical block is located, and the disk offset value indicates the physical address offset value of the physical block within the disk.

[0057] Therefore, after obtaining the starting physical address of the stripe and the disk offset value, the physical address corresponding to the starting logical block address can be determined.

[0058] In one specific implementation, determining the physical block address corresponding to the starting logical block address based on the striped physical address information includes:

[0059] Step 61: Determine the offset value within the stripe using the starting logical block address and the stripe size, and determine the target disk information and target disk offset value corresponding to the target physical block corresponding to the starting logical block address.

[0060] Step 62: Using the stripe start physical address, target disk offset, and stripe offset, determine the physical block address of the starting logical block address in the target disk corresponding to the target disk information.

[0061] Specifically, the physical block address is determined as follows:

[0062] PBA = stripe start address + disk offset + (SLBA % stripe size);

[0063] Where PBA represents the physical block address and SLBA represents the starting logical block address.

[0064] Furthermore, after obtaining the physical block address, data operations can be performed on the corresponding physical block in the target disk according to the operation type of the data operation request containing the starting logical block address.

[0065] In one embodiment, the method may further include:

[0066] Step 71: Perform data operations on the corresponding physical block in the target disk based on the physical block address.

[0067] For example, data can be written to and read from this physical block.

[0068] Furthermore, since this embodiment is suitable for setting up multiple disk arrays in a storage system, with each disk array corresponding to different disk array levels and different stripe sizes, this embodiment can flexibly set up disk arrays in the storage system without affecting the logical address translation efficiency. For example, at least two disk arrays can be set up based on different storage spaces of the same set of disks.

[0069] Based on the above embodiments, the storage system first receives the input starting logical block address and disk array identifier, where the disk array identifier indicates the disk array where the starting logical block address is located. Subsequently, the storage system queries the stripe size configured on the disk array corresponding to the disk array identifier, and determines the stripe identifier using the starting logical block address, disk array identifier, and stripe size. It can also determine the stripe where the starting logical block address is located by combining the disk array identifiers and stripe sizes of different disk arrays. Finally, the storage system queries the stripe physical address information corresponding to the stripe identifier in a preset mapping table, and determines the physical block address corresponding to the starting logical block address based on the stripe physical address information. This allows the stripe physical address information corresponding to the stripe identifier to be pre-recorded in the preset mapping table, enabling efficient querying of the stripe physical address information and efficient conversion of the physical block address corresponding to the starting logical block address. Thus, this invention improves the conversion efficiency of the starting logical block address in scenarios where the storage system has different disk arrays and different disk arrays can have different stripe sizes, thereby improving data operation efficiency.

[0070] Based on the above embodiments, the stripe entry also includes the disk array level of the disk array to which the stripe belongs, and the metadata entry also includes the data type of the physical block. The data type includes user data and redundant data, with different disk array levels corresponding to different redundant data types. Redundant data can be PQ check data and hot backup data. At this time, the redundant data contained in the stripe and the physical block address corresponding to the redundant data can also be determined based on the stripe entry and metadata entry, so that the redundant data can be used. The process of determining redundant data is described below. In one embodiment, the method may further include:

[0071] S201. Read the disk array level from the target stripe entry and determine the corresponding redundant data type based on the disk array level.

[0072] In this step, the disk array level can be read from the target stripe entry, thereby determining the stripe layout based on the disk array level, and determining the corresponding redundant data type based on the disk array level.

[0073] S202. Read the first disk information and first disk offset value corresponding to the physical block of each redundant data type from the target metadata entry.

[0074] S203. Using the stripe start physical address and the first disk offset value, determine the address of the redundant physical block of each redundant data type in the first disk corresponding to the first disk information.

[0075] In S202 and S203, similar to determining the physical block address of the starting logical block address, the first disk information and first disk offset value corresponding to the physical blocks of each redundant data type can be read from the target metadata entry. The first disk information indicates the disk where the redundant data resides, and the first disk offset value indicates the internal physical address offset of the physical block of the redundant data on the disk. Subsequently, the redundant physical block address in the first disk corresponding to the first disk information can be determined using the stripe starting physical address and the first disk offset value.

[0076] Furthermore, after obtaining the physical block address corresponding to the starting logical block address and the redundant physical block address corresponding to the redundant data, data operations can be performed on the corresponding user data physical block in the target disk and the corresponding redundant data physical block in the first disk, such as data verification operations, data backup operations, and data recovery operations, based on the physical block address and the redundant physical block address.

[0077] In one embodiment, the method may further include:

[0078] Step 81: Perform data operations on the corresponding user data physical block in the target disk and the corresponding redundant data physical block in the first disk based on the physical block address and the redundant physical block address.

[0079] Based on the above embodiments, the update methods for the preset master mapping table and the preset metadata table are described below. In one embodiment, the method may further include:

[0080] S301. When the starting logical block address comes from a data write request, if the target stripe entry corresponding to the stripe identifier cannot be found in the preset master mapping table, then the stripe entry is created in the preset master mapping table using the stripe identifier, and a metadata entry is created in the preset metadata table. The disk array level of the disk array corresponding to the disk array identifier and the metadata pointer of the newly created metadata entry are recorded in the newly created stripe entry.

[0081] S302. Write the data in the data write request to the disk array in the form of entries, and record the data type, disk information and disk offset of each physical block in the entry to the newly created metadata entry.

[0082] In this embodiment, when processing a data write request, since the data may be written to a new location in the storage system, the starting logical block address may not yet be mapped to the stripe, making it impossible to find the corresponding entry in the main mapping table and the metadata table. Therefore, when it is determined that the target stripe entry corresponding to the stripe identifier cannot be found in the preset main mapping table, this embodiment can use the stripe identifier to create a stripe entry in the preset main mapping table and a metadata entry in the preset metadata table. The disk array level of the disk array corresponding to the disk array identifier and the metadata pointer of the newly created metadata entry are recorded in the newly created stripe entry. Subsequently, the data in the data write request can be written to the corresponding disk array in the form of entries. After the write is completed, the data type, disk information, and disk offset corresponding to each physical block in the entry are recorded in the newly created metadata entry, thereby completing the creation of the stripe entry and the metadata entry.

[0083] Based on the above embodiments, the address mapping method described below is illustrated with specific diagrams. Please refer to... Figure 2 , Figure 2 This is a schematic diagram illustrating an address mapping process provided in an embodiment of the present invention. The address mapping mechanism provided in this embodiment may include:

[0084] 1. Hash mapping mechanism:

[0085] Input the SLBA and RAID group ID (the system may have multiple RAID groups) and generate the stripe number (StripeID) through shift operations (such as SLBA >> log2(strip size)) to replace the traditional modulo operation.

[0086] 2. Multi-stage pipeline architecture:

[0087] Phase 1 (Strip Number Calculation): The SLBA and RAID group ID are input into the conversion module, and the strip number is generated through shift operations.

[0088] Phase 2 (Master Mapping Table Lookup): Based on the stripe number, retrieve the stripe metadata pointer, RAID level, and stripe size from the master mapping table constructed from SRAM (Static Random-Access Memory).

[0089] Phase 3 (Metadata parsing): Access the metadata storage module through the metadata pointer to extract the disk layout information (data block and parity block locations) of the target stripe.

[0090] Phase 4 (Physical Address Generation): Based on the stripe offset (SLBA%strip size) and the disk offset in the metadata, calculate the target physical block address for the current operation data and the corresponding check block and hot spare block.

[0091] 3. Core Module Design:

[0092] Master Mapping Table (SRAM):

[0093] Entry format: Metadata pointer | RAID level | Stripe size | Stripe start address |.

[0094] Metadata storage module (SRAM):

[0095] Data structure: Indexed by stripe number, each entry contains disk data type information (data / RAID5P block / RAID6Q block / hot spare disk) and corresponding offset, encoded in the following format:

[0096] |Number of disks|Disk 1 data type|Disk 1 offset|...|.

[0097] Physical address generation module:

[0098] Logical formula:

[0099] PBA = stripe start address + disk offset + (SLBA% stripe size);

[0100] It supports various RAID distribution types, such as dynamic strategies like left / right symmetric / rotational parity.

[0101] This embodiment provides an address mapping device with a clock frequency of 1GHz (period = 1ns), capable of pipelined address mapping operations. The pipeline stages can be divided into:

[0102] Phase 1 (Strip number calculation): 1 cycle, hash function bitwise operations.

[0103] Phase 2 (Master Mapping Table Lookup): 2 cycles, SRAM access.

[0104] Phase 3 (Metadata parsing): 2 cycles, SRAM access.

[0105] Phase 4 (Physical Address Generation): 2 cycles, offset calculation.

[0106] The above address mapping method will be introduced below based on specific example values.

[0107] Step 1: Initialize configuration:

[0108] 1. Configure the hash register: Set the stripe size to 0x1000.

[0109] 2. Load the main mapping table.

[0110] 3. Load the metadata table.

[0111] Step 2: SLBA input and stripe number calculation:

[0112] 1. Enter SLBA=0x1234_5678.

[0113] 2. Shift calculation:

[0114] The strip number = SLBA >> log2(0x1000) = 0x1234_5678 >> 12 = 0x12345.

[0115] Step 3: Master mapping table lookup:

[0116] Access the SRAM entry using stripe number 0x12345 as the index:

[0117] |Metadata pointer=0x8000_1000|RAID level=01 (RAID5)|Strip size=0x1000|.

[0118] Step 4: Metadata parsing:

[0119] Read metadata from SRAM based on pointer 0x8000_1000:

[0120] |Number of disks=4|Disk 1 type=00 (data)|Disk 1 offset=0x2000||Disk 2 type=00|Disk 2 offset=0x3000|Disk 3 type=00|Disk 3 offset=0x4000||Disk 4 type=01 (RAID5P block)|Disk 4 offset=0x5000|.

[0121] Step 5: Physical address generation:

[0122] 1. Calculate the offset within the strip: SLBA%0x1000=0x678.

[0123] 2. If the target disk is disk 1 (data block) and its offset is 0x2000, then:

[0124] PBA = stripe start address (0x8000_0000) + disk offset (0x2000) + 0x678 = 0x8000_2678.

[0125] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0126] Please refer to Figure 3 , Figure 3 This is a structural block diagram of an address mapping device provided in an embodiment of the present invention. The device is applied to a storage system and may include:

[0127] The receiving module 301 is used to receive the input starting logical block address and disk array identifier;

[0128] The stripe identifier determination module 302 is used to query the stripe size configured for the disk array corresponding to the disk array identifier, and determine the stripe identifier using the starting logical block address, the disk array identifier, and the stripe size;

[0129] The physical block address translation module 303 is used to query the stripe physical address information corresponding to the stripe identifier in the preset mapping table, and determine the physical block address corresponding to the starting logical block address based on the stripe physical address information.

[0130] Optionally, the stripe identification module 302 includes:

[0131] The splicing submodule is used to splice the disk array identifier to the highest bit of the starting logical block address to obtain the spliced ​​value;

[0132] The shift operation submodule is used to perform a right shift operation on the concatenated value according to the strip size to obtain the strip identifier; where the number of binary bits of the strip size is the number of bits to shift the concatenated value to the right.

[0133] Optionally, the physical block address translation module 303 includes:

[0134] The main mapping table query submodule is used to query the target stripe entry corresponding to the stripe identifier in the preset main mapping table, and read the stripe starting physical address and metadata pointer from the target stripe entry. The preset main mapping table stores the stripe entries corresponding to the stripes in the storage system. The stripe entry contains the stripe identifier, the stripe starting physical address and the metadata pointer. The metadata pointer records the storage location of the metadata entry.

[0135] The metadata table query submodule is used to read the target metadata entry corresponding to the metadata pointer in the preset metadata table, and to read the disk information and disk offset value corresponding to the physical block in the target metadata entry. The preset metadata table stores the metadata entries corresponding to the stripes in the storage system. The metadata entries sequentially record the disk information and disk offset value of each physical block in the entry.

[0136] Optionally, the physical block address translation module 303 includes:

[0137] The first conversion submodule is used to determine the offset value within the stripe using the starting logical block address and the stripe size, and to determine the target disk information and target disk offset value corresponding to the target physical block corresponding to the starting logical block address;

[0138] The first conversion submodule is used to determine the physical block address of the starting logical block address in the target disk corresponding to the target disk information by using the stripe start physical address, the target disk offset value, and the stripe offset value.

[0139] Optionally, the device may further include:

[0140] The first data operation module is used to perform data operations on the corresponding physical block in the target disk based on the physical block address.

[0141] Optionally, the stripe entry also includes the disk array level of the disk array to which the stripe belongs, and the metadata entry also includes the data type of the physical block, which includes user data and redundant data, with different disk array levels corresponding to different redundant data types;

[0142] The main mapping table query submodule is also used to read the disk array level from the target stripe entry and determine the corresponding redundant data type based on the disk array level;

[0143] The metadata table query submodule is also used to read the first disk information and the first disk offset value corresponding to the physical block of each redundant data type from the target metadata entry;

[0144] The device may also include:

[0145] The redundant physical block address determination module is used to determine the redundant physical block address of each redundant data type in the first disk corresponding to the first disk information by using the stripe start physical address and the first disk offset value.

[0146] Optionally, the device may further include:

[0147] The second data operation module is used to perform data operations on the corresponding user data physical block in the target disk and the corresponding redundant data physical block in the first disk based on the physical block address and the redundant physical block address.

[0148] Optionally, the device may further include:

[0149] The first entry creation module is used to create a stripe entry in the preset main mapping table and a metadata entry in the preset metadata table when the starting logical block address comes from a data write request. If the target stripe entry corresponding to the stripe identifier cannot be found in the preset main mapping table, the module will use the stripe identifier to create a stripe entry in the preset main mapping table and a metadata entry in the preset metadata table. The module will also record the disk array level of the disk array corresponding to the disk array identifier and the metadata pointer of the newly created metadata entry into the newly created stripe entry.

[0150] The second entry creation module is used to write the data in the data write request into the disk array in the form of entries, and record the data type, disk information and disk offset of each physical block in the entry into the newly created metadata entry.

[0151] Optionally, the receiving module 301 may include:

[0152] The request receiving submodule is used to receive data processing requests and extract the starting logic block address from the data processing requests;

[0153] The disk array query submodule is used to query the disk array corresponding to the starting logical block address and obtain the disk array identifier.

[0154] Optionally, the disk array query submodule can be used for:

[0155] Based on the preset address mapping table, determine the logical address range where the starting logical block address is located, and determine the disk array corresponding to the address range.

[0156] Optionally, the device may further include:

[0157] The address mapping table update module is used to create a mapping relationship between disk arrays and logical address ranges when adding disk arrays to the storage system, and save it to the preset address mapping table.

[0158] For a description of the features in the embodiment corresponding to the address mapping device, please refer to the relevant description in the embodiment corresponding to the address mapping method, which will not be repeated here.

[0159] Embodiments of the present invention also provide a storage system including a data memory, a program memory, and a processor. The data memory is used to configure a disk array, the program memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described address mapping method embodiments.

[0160] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described address mapping method embodiments when it is run.

[0161] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0162] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described address mapping method embodiments.

[0163] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described address mapping method embodiments.

[0164] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0165] The above provides a detailed description of the address mapping method, apparatus, storage system, program product, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.

Claims

1. An address mapping method, characterized in that, Used in storage systems, including: Receive the starting logical block address and disk array identifier as input; Query the stripe size configured for the disk array corresponding to the disk array identifier, and determine the stripe identifier using the starting logical block address, the disk array identifier, and the stripe size; The stripe physical address information corresponding to the stripe identifier is queried in the preset mapping table, and the physical block address corresponding to the starting logical block address is determined based on the stripe physical address information; The stripe physical address information corresponding to the stripe identifier is queried in the preset mapping table, including: The system queries the target stripe entry corresponding to the stripe identifier in the preset master mapping table, and reads the stripe start physical address and metadata pointer from the target stripe entry; the preset master mapping table stores the stripe entries corresponding to the stripes in the storage system, and the stripe entry contains the stripe identifier, the stripe start physical address and the metadata pointer, and the metadata pointer records the storage location of the metadata entry; The target metadata entry corresponding to the metadata pointer is read from the preset metadata table, and the disk information and disk offset value corresponding to the physical block in the entry are read from the target metadata entry; the preset metadata table stores the metadata entries corresponding to the stripes in the storage system, and the metadata entries sequentially record the disk information and disk offset value of each physical block in the entry.

2. The address mapping method according to claim 1, characterized in that, Determining the stripe identifier using the starting logical block address, the disk array identifier, and the stripe size includes: The disk array identifier is appended to the highest bit of the starting logical block address to obtain the appended value; The splicing value is shifted to the right based on the strip size to obtain the strip identifier; wherein the number of binary bits of the strip size is the number of bits shifted right from the splicing value.

3. The address mapping method according to claim 1, characterized in that, Determining the physical block address corresponding to the starting logical block address based on the striped physical address information includes: The offset value within the stripe is determined using the starting logical block address and the stripe size, and the target disk information and target disk offset value corresponding to the target physical block corresponding to the starting logical block address are determined. Using the stripe start physical address, the target disk offset value, and the stripe offset value, the physical block address of the start logical block address in the target disk corresponding to the target disk information is determined.

4. The address mapping method according to claim 3, characterized in that, Also includes: Data operations are performed on the corresponding physical block in the target disk based on the physical block address.

5. The address mapping method according to claim 3, characterized in that, The stripe entry also includes the disk array level of the disk array to which the stripe belongs, and the metadata entry also includes the data type of the physical block, which includes user data and redundant data, with different disk array levels corresponding to different redundant data types; the method further includes: The disk array level is read from the target stripe entry, and the corresponding redundant data type is determined based on the disk array level; Read the first disk information and first disk offset value corresponding to the physical block of each redundant data type from the target metadata entry; Using the stripe start physical address and the first disk offset value, the redundant physical block address of each redundant data type in the first disk corresponding to the first disk information is determined.

6. The address mapping method according to claim 5, characterized in that, Also includes: Data operations are performed on the corresponding user data physical block in the target disk and the corresponding redundant data physical block in the first disk based on the physical block address and the redundant physical block address.

7. The address mapping method according to claim 5, characterized in that, Also includes: When the starting logical block address comes from a data write request, if the target stripe entry corresponding to the stripe identifier cannot be found in the preset master mapping table, the stripe entry is created in the preset master mapping table using the stripe identifier, the metadata entry is created in the preset metadata table, and the disk array level of the disk array corresponding to the disk array identifier and the metadata pointer of the newly created metadata entry are recorded in the newly created stripe entry. The data in the data write request is written to the disk array in the form of entries, and the data type, disk information, and disk offset of each physical block in the entry are recorded to the newly created metadata entry.

8. The address mapping method according to claim 1, characterized in that, Receive the starting logical block address and disk array identifier as input, including: Receive a data processing request and extract the starting logical block address from the data processing request; The disk array identifier is obtained by querying the disk array corresponding to the starting logical block address.

9. The address mapping method according to claim 8, characterized in that, Querying the disk array corresponding to the starting logical block address includes: Based on the preset address mapping table, determine the logical address range where the starting logical block address is located, and determine the disk array corresponding to the address range.

10. The address mapping method according to claim 9, characterized in that, Also includes: When a disk array is added to the storage system, a correspondence between the disk array and the logical address range is created and saved to the preset address mapping table.

11. An address mapping device, characterized in that, Used in storage systems, including: The receiving module is used to receive the input starting logical block address and disk array identifier; The stripe identifier determination module is used to query the stripe size configured in the disk array corresponding to the disk array identifier, and determine the stripe identifier using the starting logical block address, the disk array identifier, and the stripe size; The physical block address translation module is used to query the stripe physical address information corresponding to the stripe identifier in a preset mapping table, and determine the physical block address corresponding to the starting logical block address based on the stripe physical address information; The physical block address translation module includes: The main mapping table query submodule is used to query the target stripe entry corresponding to the stripe identifier in the preset main mapping table, and read the stripe starting physical address and metadata pointer from the target stripe entry; the preset main mapping table stores the stripe entries corresponding to the stripes in the storage system, and the stripe entry contains the stripe identifier, the stripe starting physical address and the metadata pointer, and the metadata pointer records the storage location of the metadata entry; The metadata table query submodule is used to read the target metadata entry corresponding to the metadata pointer in the preset metadata table, and to read the disk information and disk offset value corresponding to the physical block in the entry from the target metadata entry; the preset metadata table stores the metadata entries corresponding to the stripes in the storage system, and the metadata entries sequentially record the disk information and disk offset value of each physical block in the entry.

12. A storage system, characterized in that, include: Data storage, used to set up disk arrays; Program memory, used to store computer programs; A processor for implementing the address mapping method as described in any one of claims 1 to 10 when executing the computer program.

13. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the address mapping method as described in any one of claims 1 to 10.

14. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the address mapping method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Address conversion method for disk array device

    JP1995114445A

  • Mapping table managing method and associated storage system

    US20160196216A1

  • Method and apparatus for accessing a striped configuration of disks

    US7406563B1