Data processing method of combined disk array, terminal and storage medium
By disassembling the combined disk array into a parent array and a child array, and splitting and writing commands, and executing subcommands with hardware acceleration units, the problem of difficult to ensure the IO processing performance of RAID10/50/60 disk array in the prior art is solved, and the problem of the difficulty in ensuring the IO processing performance of RAID10/50/60 disk array in the prior art is realized. Efficient data processing and cost savings.
Patent Information
- Application Number
- CN202411284136.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-13
AI Technical Summary
When the prior art realizes IO processing of RAID10/50/60 combined disk arrays, the hardware implementation cost is high, the software implementation efficiency is low, and it is difficult to ensure performance.
The combined disk array is disassembled into a parent array and a child array, and the parent volume is split based on the number of child arrays, the corresponding relationship between the child volume and the child array is established, the write command is disassembled into a child command, and the hardware acceleration unit is used to execute it step by step.
Through disassembly and split commands, the hardware acceleration unit of the basic disk array is fully utilized, which improves the data processing efficiency of the combined disk array and reduces the complexity and cost of hardware design.
Smart Images

Figure CN119292519A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of storage technology, and in particular relates to a data processing method, a terminal and a storage medium of a combined disk array. Background Art
[0002] Combined disk arrays are used to create large disk arrays based on smaller basic disk arrays. For example, RAID50 is a disk array that combines RAID5 and RAID0. First, RAID5 is implemented on a smaller disk group. Each such RAID5 uses distributed parity to provide data redundancy, which can provide data protection when a single disk fails. Then, these independent RAID5s are combined to form a larger RAID0 stripe set, thereby enabling data reading across multiple disks.
[0003] Different physical disks form a RAID array, and logical volumes are created on the basis of the RAID array. Logical volumes are also called namespaces, which are storage space units mapped to the host. The host sends IO in namespace units, which are first mapped to the RAID group through the namespace, and then to the physical disk through the RAID group.
[0004] In order to ensure efficient transmission of host IO data, the existing technology is to introduce a computing accelerated RAID controller between the host and the disk, which is implemented by a hardware acceleration unit integrating multiple components. However, for a disk array in the form of a combined RAID such as RAID10 / 50 / 60, if IO processing is completely implemented by hardware, a set of complex hardware computing circuits needs to be implemented, which is costly. If it is completely implemented by software, there are a large number of repeated sub-units in the processing process, and the execution efficiency is low, and the performance of IO processing is difficult to guarantee.
[0005] Therefore, designing a data processing mechanism for a combined disk array that is adapted to existing hardware resources is a technical problem that needs to be solved. Summary of the invention
[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a data processing method, a terminal and a storage medium of a combined disk array to solve the above-mentioned technical problems.
[0007] In a first aspect, the present invention provides a data processing method for a combined disk array, comprising: Decomposing the combined disk array into a parent array and a sub-array, wherein the sub-array is a basic disk array having a corresponding hardware acceleration unit; Based on the number of sub-arrays, the parent volume corresponding to the parent array is split into a corresponding number of sub-volumes, and a corresponding relationship between the sub-volumes and the sub-arrays is established; The write command received by the parent volume is decomposed into sub-commands based on the corresponding relationship, and the sub-commands are written into the sub-array using the corresponding sub-volume.
[0008] In an optional implementation, the combined disk array is decomposed into a parent array and a child array, wherein the child array is a basic disk array having an independent hardware acceleration unit, including: Intercepting a management command for creating a disk array, parsing basic information of the disk array to be created from parameters of the management command, the basic information including the disk array level, the number of member disks, and information of the included basic disk array; If the disk array level is a combination level, the disk array to be created is marked as a parent array; Based on the information of the basic disk array contained in the parent array, marking the corresponding basic disk array as a child array of the parent array; Execute the management command for creating the disk array.
[0009] In an optional implementation, executing the management command for creating a disk array includes: Based on the information of the basic disk array included in the parent array, determine the member disks constituting the subarrays, and evenly partition the member disk list in the parameters of the management command according to the number of subarrays as the member disks constituting each subarray; Configuring member disk information of the subarray to the hardware acceleration unit; Create an array global array, the array global array maintains the disk array information to be created and records the connection relationship between the parent array and the child array; the array global array includes the parent array information and the child array information, the parent array information includes the parent array id, level, member disk information, the number of subarrays included, and a pointer array pointing to the subarray, and the subarray information includes the subarray id, level, member disk information and a pointer pointing to the parent array; Respond to the host's prompt message that the disk array has been successfully created.
[0010] In an optional implementation, splitting a parent volume corresponding to a parent array into a corresponding number of sub-volumes based on the number of sub-arrays, and establishing a corresponding relationship between the sub-volumes and the sub-arrays includes: Receiving a command to create a volume, parsing volume parameters from the command, the volume parameters including a parent array ID, a volume size, and a starting logical address; Access the array global array where the parent array is located through the parent array ID, and extract the number of subarrays from the array global array; Setting the number of sub-arrays to the number of sub-volumes; Calculate the size of each subvolume and the starting logical address in the subarray based on the volume size and the starting logical address in the volume parameters and the number of subvolumes; Configure subvolume information to the hardware acceleration unit; A volume global array for maintaining parent volume and child volume information is created, and the relationship between the parent volume and the child volume is recorded through the volume global array; the volume global array includes parent volume information and child volume information, the parent volume information includes the parent volume ID and the ID of the disk array where it is located, detailed information of the disk array where it is located, volume size, starting logical address, number of child volumes, and pointer array pointing to the child volume, and the child volume information includes the child volume ID and the ID of the sub-array where it is located, detailed information of the sub-array where it is located, volume size, starting logical address, and pointer pointing to the parent volume; Respond to the host's prompt message that the volume was successfully created, and report the asynchronous event of the host volume attribute change.
[0011] In an optional implementation, calculating the size of each subvolume and the starting logical address in the subarray based on the volume size and the starting logical address in the volume parameters and the number of subvolumes includes: The calculation formula for the subvolume size is: child_nlb = nlb / child_ns_num; Among them, nlb is the volume size, and child_ns_num is the number of subvolumes; The calculation formula for the starting logical address of a subvolume is: child_raid_slba=raid_slba / child_ns_num; Among them, raid_slba is the starting logical address in the volume parameters, and child_ns_num is the number of subvolumes.
[0012] In an optional implementation, decomposing the write command received by the parent volume into subcommands based on the corresponding relationship, and writing the subcommands into the subarray using the corresponding subvolume includes: Parsing the parent volume id, starting position and length of the write command; Retrieve the corresponding target volume global array based on the parent volume ID; Converting the starting position into an actual address based on the target volume global array, and decomposing the write command into multiple sub-commands according to the length and the size of the sub-array corresponding to each sub-volume in the target volume global array; Execute subcommands one by one until all subcommands are completed.
[0013] In an optional implementation, the starting position is converted into an actual address based on the target volume global array, and the write command is decomposed into multiple sub-commands according to the length and the size of the sub-array corresponding to each sub-volume in the target volume global array, including: Calculate the actual address of the parent array relative to the starting position in the write command according to the size of the parent volume in the target volume global array, the starting logical address, and the actual address in the parent array; Access the parent array and obtain the stripe size of the subarray based on the connection relationship between the parent array and the subarray; Determine whether the write command spans multiple subarrays according to the starting position and length in the write command and the stripe size of the subarray, directly execute the write command if the length is smaller than the stripe size of the subarray, and disassemble the write command if the length is larger than the stripe size of the subarray; The method for disassembling the write command includes: Calculate the subarray number using the formula: child_raid_index=slba / child_stripe_size; Wherein, child_raid_index is the subarray number, slba is the starting position of the write command, and child_stripe_size is the stripe size of the subarray [3]; The subarray ID is obtained from the subarray number and the subarray information recorded in the parent array, and the subvolume ID is obtained from the subarray ID and the parent volume ID; Calculate the number of logical blocks of the split subcommands in the subarray: child_nlb=child_stripe_size–slba%child_stripe_size[4]; Among them, child_stripe_size is the stripe size of the subarray, and slba is the starting position; Calculate the starting logical address of the segmented subcommand in the subarray: child_slba=stripe_id*child_stripe_size+slba%child_stripe_size; Among them, stripe_id represents the stripe number hit by the host IO, and its calculation formula is: stripe_id=slba / father_stripe_size; Among them, father_stripe_size is the stripe size of the parent array; Update the number of remaining logical blocks of the write command, confirm that the number of remaining logical blocks exceeds the number of logical blocks of the subarray, and use the smaller value of the number of remaining logical blocks and the stripe size of the subarray as the number of logical blocks of the subcommand split to the next subarray; Update the starting position of the latest subcommand, where the starting position of the latest subcommand is updated to the starting position of the write command plus the number of logical blocks of all subarrays that have been allocated the corresponding subcommand; Update the subarray number of the subarray corresponding to the new subcommand to the previous subarray number plus 1; Apply for the corresponding subcommand processing node and fill in the subvolume ID, subarray ID, the starting position of the subcommand after segmentation, and the number of logical blocks of the subcommand after segmentation; Increase the number of commands in the parent command processing node by 1; The write command is split repeatedly until the number of remaining logical blocks of the write command is zero.
[0014] In an optional implementation, executing subcommands one by one until all subcommands are executed, includes: Receiving an event indicating that a subcommand has been executed, and extracting subcommand information and execution results from the event; Obtaining a processing node of the upper-level write command according to the sub-command information, and sending the sub-command information and the execution result to the processing node of the upper-level write command; The processing node of the upper-level write command summarizes the received subcommand information and execution results, updates the number of subcommands to be executed, and recycles the processing nodes corresponding to the subcommands that have been executed; If the execution results of all subcommands are successful, the superior write command is determined to be executed successfully. If there are subcommands that fail to execute, the superior write command is determined to have failed to execute.
[0015] In a second aspect, the present invention provides a data processing system of a combined disk array, comprising: An array analysis module, used for disassembling a combined disk array into a parent array and a sub-array, wherein the sub-array is a basic disk array having a corresponding hardware acceleration unit; A volume analysis module, used to split the parent volume corresponding to the parent array into a corresponding number of sub-volumes based on the number of sub-arrays, and establish a corresponding relationship between the sub-volumes and the sub-arrays; The command disassembly module is used to disassemble the write command received by the parent volume into sub-commands based on the corresponding relationship, and write the sub-commands into the sub-array using the corresponding sub-volume.
[0016] In a third aspect, a terminal is provided, including: processor, memory, wherein: The memory is used to store computer programs. The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0017] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.
[0018] The beneficial effect of the present invention lies in that the data processing method, terminal and storage medium of the combined disk array provided by the present invention fully utilize the hardware acceleration unit of the basic disk array and ensure the data processing efficiency of the combined disk array by disassembling the combined disk array into a parent array and a child array structure, and splitting the write command based on the disassembled architecture, and then gradually executing the split write commands.
[0019] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0022] Figure 2 It is a schematic diagram of the architecture analysis of a method according to an embodiment of the present invention.
[0023] Figure 3 It is a schematic diagram of the structure of a combined disk array according to a method of an embodiment of the present invention.
[0024] Figure 4 It is a schematic diagram of the structure of a volume of a method according to an embodiment of the present invention.
[0025] Figure 5 It is a schematic flow chart of hierarchical management of a method according to an embodiment of the present invention.
[0026] Figure 6 It is a schematic diagram of the data structure of a method according to an embodiment of the present invention.
[0027] Figure 7 It is a schematic flow chart of write command disassembly of a method according to an embodiment of the present invention.
[0028] Figure 8 It is a schematic flowchart of the sub-command execution of the method according to an embodiment of the present invention.
[0029] Fig. 9 is a schematic block diagram of a system according to an embodiment of the present invention.
[0030] Fig.10 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0033] The key terms appearing in the present invention are explained below.
[0034] NVMe: The full name is Non-Volatile Memory Express, which is a communication interface and driver standard designed for solid-state drives (SSDs). It uses the PCI Express (PCIe) bus to provide high-speed data transmission. It has the characteristics of high bandwidth and low latency.
[0035] RAID: The full name is Redundant Array of Independent Disks, which is a storage virtualization technology that combines multiple separate physical disk drives in different ways to form a logical disk drive, thereby achieving the purpose of improving storage capacity, read and write performance, and data security.
[0036] Combined RAID: Also known as hybrid RAID or nested RAID, it is a method of combining two or more arrays of different RAID levels. Common combined RAID levels include RAID10, RAID50, and RAID60.
[0037] ns: namespace, an independent storage space, each namespace has its own logical block address range. From the host's point of view, a namespace is an independent storage device, and namespace corresponds to the concept of logical volume in a disk array.
[0038] slba: The full name is start logic block address, which is the device-side starting logic block address included in the IO command. The device divides the address space into logical blocks. When the host submits an IO command, it specifies the logical block address, which indicates which address in the device space to read and write data from.
[0039] nlb: The full name is num of logic block. The number of device-side logic blocks included in the IO command. When the host submits an IO command, it specifies the number of logic blocks in the IO command, which means how many logic blocks of data to read and write from slba in the device space.
[0040] The data processing method of the combined disk array provided in the embodiment of the present invention is executed by a computer device, and accordingly, the data processing system of the combined disk array runs in the computer device.
[0041] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a data processing system of a combined disk array. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.
[0042] like Figure 1 As shown, the method includes: Step 110, disassembling the combined disk array into a parent array and a sub-array, wherein the sub-array is a basic disk array having a corresponding hardware acceleration unit; Step 120, splitting the parent volume corresponding to the parent array into a corresponding number of sub-volumes based on the number of sub-arrays, and establishing a corresponding relationship between the sub-volumes and the sub-arrays; Step 130: Decompose the write command received by the parent volume into sub-commands based on the corresponding relationship, and write the sub-commands into the sub-array using the corresponding sub-volume.
[0043] The present invention aims at combined RAID, proposes the concepts of parent array, child array, parent volume and child volume, and provides a management method of subarray and subvolume.
[0044] The software first splits the host write command of the volume on the combined disk array into sub-commands of the volume on the single disk array, and then hands it over to the hardware for processing, reusing the existing hardware acceleration unit of the single disk array to save costs. The present invention provides a method for splitting a write command and a method for integrating the results of the split sub-commands.
[0045] To facilitate understanding of the present invention, the data processing method for the combined disk array provided by the present invention is further described below based on the principle of the data processing method for the combined disk array of the present invention and the process of processing data by the combined disk array in the embodiment.
[0046] Specifically, the data processing method of the combined disk array includes: S1. Architecture management.
[0047] The sub-array is a single disk array level, and the parent array is a combined disk array level. For example, RAID50 is composed of three RAID5s. RAID50 is called the parent array, and the three RAID5s are called sub-arrays. Figure 2 As shown in the figure, two volumes are created on RAID50, parent ns_1 and parent ns_2. Parent ns_1 consists of three sub-volumes (sub ns_1_1, sub ns_1_2, sub ns_1_3), and parent ns_2 consists of three sub-volumes (sub ns_2_1, sub ns_2_2, sub ns_2_3), which are located in sub-RAID1, sub-RAID2, and sub-RAID3. The number of sub-arrays is exactly the same as the number of sub-volumes.
[0048] In one embodiment of the present invention, the following architecture management method is adopted: The management command for creating a disk array is intercepted, and basic information of the disk array to be created is parsed from the parameters of the management command, wherein the basic information includes the disk array level, the number of member disks, and information of the included basic disk array; if the disk array level is a combination level, the disk array to be created is marked as a parent array; based on the information of the basic disk array included in the parent array, the corresponding basic disk array is marked as a child array of the parent array; and the management command for creating the disk array is executed.
[0049] Specifically, the following steps are included: First, the management command for creating the disk array is intercepted from the user input or the system configuration.
[0050] The command is formatted to ensure that it conforms to the expected syntax and parameter requirements.
[0051] If the command format is incorrect, an error message is returned and a request is made to re-enter or correct the command.
[0052] Use a parser such as regular expressions or a command line parsing library to extract all necessary parameters from the management command.
[0053] Verify the validity of each parameter, such as checking whether the disk array level is a level supported by the system (such as RAID0, RAID 1, RAID 5, RAID 10, JBOD, etc.), whether the number of member disks is reasonable (non-zero and does not exceed the system limit), and whether the basic disk array information is correctly specified (if the command contains such information).
[0054] Extract the disk array level, number of member disks, and basic disk array information (if applicable) from the parsed parameters.
[0055] Further verification is performed on this basic information, such as checking whether the specified basic disk array exists and is in good condition, and whether the number of member disks meets the requirements of the selected array level.
[0056] If the disk array level is a combination level (such as some advanced RAID configurations, which may involve the combination of multiple sub-arrays), perform the following steps: Mark the disk array to be created as the parent array and record its unique identifier and related information in the system database or configuration file.
[0057] Check that all base disk arrays required by the parent array are correctly specified and that there are no conflicts or dependency issues between them.
[0058] Based on the configuration information of the parent array, traverse all disk arrays specified as base components.
[0059] These basic disk arrays are marked as child arrays of the parent array, and a parent-child relationship between them is established within the system.
[0060] Update the system database or configuration files to reflect the changes.
[0061] Call the underlying disk management API or execute system commands to actually create the disk array.
[0062] Monitor the creation process to ensure that all steps complete successfully.
[0063] If any errors or exceptions are encountered during the creation process, stop the operation immediately, roll back all completed changes, and record the error log for subsequent analysis.
[0064] In one embodiment of the present invention, the disk array architecture is as follows: Figure 3 As shown in the figure, the process of executing the management command for creating a disk array includes: Based on the information of the basic disk array contained in the parent array, determine the member disks constituting the subarray, evenly partition the member disk list in the parameters of the management command according to the number of subarrays as the member disks constituting each subarray; configure the member disk information of the subarray to the hardware acceleration unit; create an array global array, the array global array maintains the disk array information to be created and records the connection relationship between the parent array and the subarray; the array global array includes the parent array information and the subarray information, the parent array information includes the parent array id, level, member disk information, the number of subarrays included, and the pointer array pointing to the subarray, the subarray information includes the subarray id, level, member disk information and the pointer pointing to the parent array; reply to the host with a prompt message that the disk array is successfully created.
[0065] In another embodiment of the present invention, please refer to Figure 4 , volume management methods include: A command for creating a volume is received, and volume parameters are parsed from the command, wherein the volume parameters include a parent array ID, a volume size, and a starting logical address; an array global array where the parent array is located is accessed through the parent array ID, and the number of sub-arrays is extracted from the array global array; the number of sub-arrays is set as the number of sub-volumes; the size of each sub-volume and the starting logical address in the sub-array are calculated based on the volume size and the starting logical address in the volume parameters and the number of sub-volumes; the sub-volume information is configured to a hardware acceleration unit; a volume global array for maintaining parent volume and sub-volume information is created, and the relationship between the parent volume and the sub-volume is recorded through the volume global array; the volume global array includes parent volume information and sub-volume information, wherein the parent volume information includes a parent volume ID and an ID of a disk array where the parent volume is located, detailed information of the disk array where the parent volume is located, a volume size, a starting logical address, the number of sub-volumes, and an array of pointers to sub-volumes, wherein the sub-volume information includes a sub-volume ID and an ID of a sub-array where the parent volume is located, detailed information of the sub-array where the parent volume is located, a volume size, a starting logical address, and a pointer to the parent volume; a prompt message of successful volume creation is replied to the host, and an asynchronous event of host volume attribute change is reported.
[0066] The step of calculating the size of each subvolume and the starting logical address in the subarray based on the volume size and the starting logical address in the volume parameters and the number of subvolumes includes: The calculation formula for the subvolume size is: child_nlb = nlb / child_ns_num; Among them, nlb is the volume size, and child_ns_num is the number of subvolumes; The calculation formula for the starting logical address of a subvolume is: child_raid_slba=raid_slba / child_ns_num; Among them, raid_slba is the starting logical address in the volume parameters, and child_ns_num is the number of subvolumes.
[0067] Please refer to Figure 5 In an embodiment of the architecture management of the present invention, the following steps are specifically included: After receiving the host management command "Create RAID", the information of the RAID disk array to be created is parsed from the command parameters, including the RAID level, the number of member disks, and the number of single RAIDs included; Determine the sub-RAID level. If you want to create RAID10, the sub-RAID level is RAID1. If you want to create RAID50, the sub-RAID level is RAID5. If you want to create RAID60, the sub-RAID level is RAID6; Determine the member disks that make up the sub-RAID, and evenly partition the member disk list in the create command parameter according to the number of single RAIDs as the member disks that make up each sub-RAID; Configure sub-RAID information to the hardware acceleration unit; Fill the global array that maintains RAID information in the software module and record the connection relationship between the parent and child raids; Reply to the host that the "Create RAID" command was executed successfully; Parse the configuration parameters from the command "Create ns on combined RAID", including RAID group number, ns size nlb, RAID group number, offset raid_slba in the RAID group, etc.; Access the global array that records RAID information through the RAID number to obtain the number of sub-RAIDs in the RAID disk array corresponding to the number, that is, the sub-ns number child_ns_num; Calculate the information of child ns. The size of parent ns and the starting offset of parent ns in RAID are nlb and raid_slba in the configuration command parameters (limited to stripe alignment). The calculation formula of the size of each child ns child_nlb is: child_nlb=nlb / child_ns_num; The calculation formula of the starting offset of child ns in the child RAID, child_raid_slba, is: child_raid_slba=raid_slba / child_ns_num; Configure the sub-ns information to the hardware acceleration unit; Fill the global array of ns information maintained in the software module and record the connection relationship between the parent and child ns; Reply to the host that the "create ns" command is executed successfully and report the asynchronous event of the host ns attribute change.
[0068] After the above steps, from the perspective of the host, the storage space obtained by the identify command is the parent ns on the combined RAID, and the IO range that can be issued depends on the size of the parent ns. From the perspective of hardware, the difference between the combined RAID and the single RAID is transparent, which lays the foundation for the combined RAID to reuse the hardware acceleration unit of the single RAID to process IO.
[0069] S2. Command processing.
[0070] Please refer to Figure 6 , the data structure lists the fields related to IO splitting. slba and nlb in the parent IO node represent the starting position and length of the original host IO respectively, and io_cnt represents the number of IOs after being split according to the child ns. The child IO node records the information of the sliced IO, where slba, nlb, and io_result represent the starting position, length, and result of the IO after splitting respectively.
[0071] S201, write command disassembly, please refer to Figure 7 , the specific process is as follows: a. Parse the host IO command, obtain the slba, nlb and nsid information, apply for the parent IO node and fill it; b. Access the global array that records ns information through nsid, and calculate the actual address offset of slba in the original host command relative to the RAID group based on the size, logical address, and actual address of the created ns in the RAID group; c. The nsid in the original command of the host is the parent nsid, from which the parent raid_id is obtained, the parent RAID node is accessed, and the stripe size child_stripe_size of the child RAID is obtained according to the connection relationship between the parent RAID and the child RAID; d. Determine whether this IO command spans multiple sub-RAIDs based on the slba, nlb and sub-RAID stripe size in the original command. If yes, go to the next step. Otherwise, no IO splitting is required and the process ends; e. Calculate the child RAID number, which is the initial value of child_raid_index. The formula is: child_raid_index=slba / child_stripe_size; f. Get the child raid_id from the child raid number and the information recorded in the parent RAID node, and get the child ns_id based on the child raid_id and the parent ns_id; g. Calculate the nlb divided into the child RAID. The formula is: child_nlb = child_stripe_size – slba%child_stripe_size; h. Calculate the slba of the split IO in the child RAID. The formula is: child_slba= stripe_id*child_stripe_size+slba%child_stripe_size; where stripe_id represents the stripe number hit by the host IO, and its calculation formula is: stripe_id=slba / father_stripe_size; i. Update the remaining nlb, subtract the nlb of all sub-RAIDs from the original nlb of the host, and determine whether the value is 0. If it is 0, the process ends. Otherwise, compare the remaining nlb and the sub-RAID stripe size, and use the smaller value of the two as the nlb in the next sub-RAID; j. Update slba, the initial value plus the nlb of all sub-RAIDs; k. Update the child RAID number, child_raid_index plus 1; l. Apply for a sub-IO node and fill in the sub-nsid, sub-raid_id, split slba, and split nlb; m. In the parent IO node, io_cnt is incremented by 1; n. Repeat the above steps fm until the remaining nlb is 0, indicating that the splitting is complete and the process ends.
[0072] S202: Split the IO on the combined RAID into each sub-RAID, and hand over each split IO to the hardware acceleration unit of the existing single RAID for processing. Figure 8 As shown, including: a. After receiving an event that a slice IO is executed, the software module parses the sub-IO and obtains the execution result of the slice IO; b. Get the parent IO node based on the parent-child connection relationship, and integrate io_result into the parent IO node. The formula is: father_result=child1_result|child2_result|…|childN_result; c. The io_cnt that records the number of slice IOs is decremented by 1 each time, and the child IO nodes are recycled; d. Repeat the above steps ac until io_cnt in the parent IO node is reduced to 0, which means that all slice IOs have been executed; e. Reply to the host IO command execution result. If the io_result in all the child IO nodes is 0, it means that all the split child IO requests have been completed, and the reply host IO command execution is successful. As long as the io_result in one child IO node is not 0, the reply host IO command execution fails; f. Reclaim the resources of the parent IO node.
[0073] This method takes advantage of the high performance of hardware processing while giving full play to the flexibility of software, taking into account the system performance and cost-effectiveness of the RAID controller. For complex IO on RAID10 / 50 / 60, the hardware does not need to implement additional digital circuits for combined RAID, and can reuse the existing single RAID controller, which improves the utilization of hardware resources, reduces the complexity of hardware implementation, and saves hardware design costs.
[0074] In some embodiments, the data processing system of the combined disk array may include multiple functional modules composed of computer program segments. The computer programs of the various program segments in the data processing system of the combined disk array may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Data processing function of combined disk array.
[0075] In this embodiment, the data processing system of the combined disk array can be divided into multiple functional modules according to the functions it performs, such as Fig. 9 As shown. The functional modules of the system 900 may include: an array analysis module 910, a volume analysis module 920 and a command disassembly module 930. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0076] An array analysis module, used for disassembling a combined disk array into a parent array and a sub-array, wherein the sub-array is a basic disk array having a corresponding hardware acceleration unit; A volume analysis module, used to split the parent volume corresponding to the parent array into a corresponding number of sub-volumes based on the number of sub-arrays, and establish a corresponding relationship between the sub-volumes and the sub-arrays; The command disassembly module is used to disassemble the write command received by the parent volume into sub-commands based on the corresponding relationship, and write the sub-commands into the sub-array using the corresponding sub-volume.
[0077] Optionally, as an embodiment of the present invention, the combined disk array is decomposed into a parent array and a child array, wherein the child array is a basic disk array having an independent hardware acceleration unit, including: Intercepting a management command for creating a disk array, parsing basic information of the disk array to be created from parameters of the management command, the basic information including the disk array level, the number of member disks, and information of the included basic disk array; If the disk array level is a combination level, the disk array to be created is marked as a parent array; Based on the information of the basic disk array contained in the parent array, marking the corresponding basic disk array as a child array of the parent array; Execute the management command for creating the disk array.
[0078] Optionally, as an embodiment of the present invention, executing the management command for creating a disk array includes: Based on the information of the basic disk array included in the parent array, determine the member disks constituting the subarrays, and evenly partition the member disk list in the parameters of the management command according to the number of subarrays as the member disks constituting each subarray; Configuring member disk information of the subarray to the hardware acceleration unit; Create an array global array, the array global array maintains the disk array information to be created and records the connection relationship between the parent array and the child array; the array global array includes the parent array information and the child array information, the parent array information includes the parent array id, level, member disk information, the number of subarrays included, and a pointer array pointing to the subarray, and the subarray information includes the subarray id, level, member disk information and a pointer pointing to the parent array; Respond to the host's prompt message that the disk array has been successfully created.
[0079] Optionally, as an embodiment of the present invention, splitting a parent volume corresponding to a parent array into a corresponding number of sub-volumes based on the number of sub-arrays, and establishing a corresponding relationship between the sub-volumes and the sub-arrays includes: Receiving a command to create a volume, parsing volume parameters from the command, the volume parameters including a parent array ID, a volume size, and a starting logical address; Access the array global array where the parent array is located through the parent array ID, and extract the number of subarrays from the array global array; Setting the number of sub-arrays to the number of sub-volumes; Calculate the size of each subvolume and the starting logical address in the subarray based on the volume size and the starting logical address in the volume parameters and the number of subvolumes; Configure subvolume information to the hardware acceleration unit; A volume global array for maintaining parent volume and child volume information is created, and the relationship between the parent volume and the child volume is recorded through the volume global array; the volume global array includes parent volume information and child volume information, the parent volume information includes the parent volume ID and the ID of the disk array where it is located, detailed information of the disk array where it is located, volume size, starting logical address, number of child volumes, and pointer array pointing to the child volume, and the child volume information includes the child volume ID and the ID of the sub-array where it is located, detailed information of the sub-array where it is located, volume size, starting logical address, and pointer pointing to the parent volume; Respond to the host's prompt message that the volume was successfully created, and report the asynchronous event of the host volume attribute change.
[0080] Optionally, as an embodiment of the present invention, calculating the size of each subvolume and the starting logical address in the subarray based on the volume size and the starting logical address in the volume parameters and the number of subvolumes includes: The calculation formula for the subvolume size is: child_nlb = nlb / child_ns_num; Among them, nlb is the volume size, and child_ns_num is the number of subvolumes; The calculation formula for the starting logical address of a subvolume is: child_raid_slba=raid_slba / child_ns_num; Among them, raid_slba is the starting logical address in the volume parameters, and child_ns_num is the number of subvolumes.
[0081] Optionally, as an embodiment of the present invention, decomposing the write command received by the parent volume into sub-commands based on the corresponding relationship, and writing the sub-commands into the sub-array using the corresponding sub-volume includes: Parsing the parent volume id, starting position and length of the write command; Retrieve the corresponding target volume global array based on the parent volume ID; Converting the starting position into an actual address based on the target volume global array, and decomposing the write command into multiple sub-commands according to the length and the size of the sub-array corresponding to each sub-volume in the target volume global array; Execute subcommands one by one until all subcommands are completed.
[0082] Optionally, as an embodiment of the present invention, the starting position is converted into an actual address based on the target volume global array, and the write command is disassembled into multiple sub-commands according to the length and the size of the sub-array corresponding to each sub-volume in the target volume global array, including: Calculate the actual address of the parent array relative to the starting position in the write command according to the size of the parent volume in the target volume global array, the starting logical address, and the actual address in the parent array; Access the parent array and obtain the stripe size of the subarray based on the connection relationship between the parent array and the subarray; Determine whether the write command spans multiple subarrays according to the starting position and length in the write command and the stripe size of the subarray, directly execute the write command if the length is smaller than the stripe size of the subarray, and disassemble the write command if the length is larger than the stripe size of the subarray; The method for disassembling the write command includes: Calculate the subarray number using the formula: child_raid_index=slba / child_stripe_size; Wherein, child_raid_index is the subarray number, slba is the starting position of the write command, and child_stripe_size is the stripe size of the subarray [5]; The subarray ID is obtained from the subarray number and the subarray information recorded in the parent array, and the subvolume ID is obtained from the subarray ID and the parent volume ID; Calculate the number of logical blocks of the split subcommands in the subarray: child_nlb=child_stripe_size–slba%child_stripe_size[6]; Among them, child_stripe_size is the stripe size of the subarray, and slba is the starting position; Calculate the starting logical address of the segmented subcommand in the subarray: child_slba=stripe_id*child_stripe_size+slba%child_stripe_size; Among them, stripe_id represents the stripe number hit by the host IO, and its calculation formula is: stripe_id=slba / father_stripe_size; Among them, father_stripe_size is the stripe size of the parent array; Update the number of remaining logical blocks of the write command, confirm that the number of remaining logical blocks exceeds the number of logical blocks of the subarray, and use the smaller value of the number of remaining logical blocks and the stripe size of the subarray as the number of logical blocks of the subcommand split to the next subarray; Update the starting position of the latest subcommand, where the starting position of the latest subcommand is updated to the starting position of the write command plus the number of logical blocks of all subarrays that have been allocated the corresponding subcommand; Update the subarray number of the subarray corresponding to the new subcommand to the previous subarray number plus 1; Apply for the corresponding subcommand processing node and fill in the subvolume ID, subarray ID, the starting position of the subcommand after segmentation, and the number of logical blocks of the subcommand after segmentation; Increase the number of commands in the parent command processing node by 1; The write command is split repeatedly until the number of remaining logical blocks of the write command is zero.
[0083] Optionally, as an embodiment of the present invention, subcommands are executed one by one until all subcommands are executed, including: Receiving an event indicating that a subcommand has been executed, and extracting subcommand information and execution results from the event; Obtaining a processing node of the upper-level write command according to the sub-command information, and sending the sub-command information and the execution result to the processing node of the upper-level write command; The processing node of the upper-level write command summarizes the received subcommand information and execution results, updates the number of subcommands to be executed, and recycles the processing nodes corresponding to the subcommands that have been executed; If the execution results of all subcommands are successful, the superior write command is determined to be executed successfully. If there are subcommands that fail to execute, the superior write command is determined to have failed to execute.
[0084] Fig.10 The present invention is a schematic diagram of the structure of a terminal 1000 provided in an embodiment of the present invention. The terminal 1000 can be used to execute the data processing method of the combined disk array provided in an embodiment of the present invention.
[0085] The terminal 1000 may include: a processor 1010, a memory 1020 and a communication unit 1030. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0086] The memory 1020 can be used to store the execution instructions of the processor 1010, and the memory 1020 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 1020 are executed by the processor 1010, the terminal 1000 can perform some or all of the steps in the following method embodiments.
[0087] The processor 1010 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 1020, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 1010 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0088] The communication unit 1030 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.
[0089] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0090] Therefore, the present invention disassembles the combined disk array into a parent array and a child array structure, and splits the write command based on the disassembled architecture, and then gradually executes the split write commands, thereby making full use of the hardware acceleration unit of the basic disk array and ensuring the data processing efficiency of the combined disk array. The technical effects that can be achieved by this embodiment can be found in the description above and will not be repeated here.
[0091] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0092] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0093] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.
[0094] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0095] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0096] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A data processing method for a combined disk array, characterized in that: include: Decomposing the combined disk array into a parent array and a sub-array, wherein the sub-array is a basic disk array having a corresponding hardware acceleration unit; Based on the number of sub-arrays, the parent volume corresponding to the parent array is split into a corresponding number of sub-volumes, and a corresponding relationship between the sub-volumes and the sub-arrays is established; The write command received by the parent volume is decomposed into sub-commands based on the corresponding relationship, and the sub-commands are written into the sub-array using the corresponding sub-volume.
2. The method according to claim 1, characterized in that The combined disk array is disassembled into a parent array and a sub-array, wherein the sub-array is a basic disk array having an independent hardware acceleration unit, including: Intercepting a management command for creating a disk array, parsing basic information of the disk array to be created from parameters of the management command, the basic information including the disk array level, the number of member disks, and information of the included basic disk array; If the disk array level is a combination level, the disk array to be created is marked as a parent array; Based on the information of the basic disk array contained in the parent array, marking the corresponding basic disk array as a child array of the parent array; Execute the management command for creating the disk array.
3. The method according to claim 2, characterized in that Executing the management command for creating the disk array includes: Based on the information of the basic disk array included in the parent array, determine the member disks constituting the subarrays, and evenly partition the member disk list in the parameters of the management command according to the number of subarrays as the member disks constituting each subarray; Configuring member disk information of the subarray to the hardware acceleration unit; Create an array global array, the array global array maintains the disk array information to be created and records the connection relationship between the parent array and the child array; the array global array includes the parent array information and the child array information, the parent array information includes the parent array id, level, member disk information, the number of subarrays included, and a pointer array pointing to the subarray, and the subarray information includes the subarray id, level, member disk information and a pointer pointing to the parent array; Respond to the host's prompt message that the disk array has been successfully created.
4. The method according to claim 1, characterized in that: The parent volume corresponding to the parent array is split into a corresponding number of sub-volumes based on the number of sub-arrays, and the corresponding relationship between the sub-volumes and the sub-arrays is established, including: Receiving a command to create a volume, parsing volume parameters from the command, the volume parameters including a parent array ID, a volume size, and a starting logical address; Access the array global array where the parent array is located through the parent array ID, and extract the number of subarrays from the array global array; Setting the number of sub-arrays to the number of sub-volumes; Calculate the size of each subvolume and the starting logical address in the subarray based on the volume size and the starting logical address in the volume parameters and the number of subvolumes; Configure subvolume information to the hardware acceleration unit; A volume global array for maintaining parent volume and child volume information is created, and the relationship between the parent volume and the child volume is recorded through the volume global array; the volume global array includes parent volume information and child volume information, the parent volume information includes the parent volume ID and the ID of the disk array where it is located, detailed information of the disk array where it is located, volume size, starting logical address, number of child volumes, and pointer array pointing to the child volume, and the child volume information includes the child volume ID and the ID of the sub-array where it is located, detailed information of the sub-array where it is located, volume size, starting logical address, and pointer pointing to the parent volume; Respond to the host's prompt message that the volume was successfully created, and report the asynchronous event of the host volume attribute change.
5. The method according to claim 4, characterized in that Calculating the size of each sub-volume and the starting logical address in the sub-array based on the volume size and the starting logical address in the volume parameters and the number of sub-volumes, including: The calculation formula for the subvolume size is: child_nlb = nlb / child_ns_num; Among them, nlb is the volume size, child_ns_num is the number of subvolumes; The calculation formula for the starting logical address of a subvolume is: child_raid_slba=raid_slba / child_ns_num; Among them, raid_slba is the starting logical address in the volume parameters, and child_ns_num is the number of subvolumes.
6. The method according to claim 1, characterized in that Decomposing the write command received by the parent volume into sub-commands based on the corresponding relationship, and writing the sub-commands into the sub-array using the corresponding sub-volume, including: Parsing the parent volume id, starting position and length of the write command; Retrieve the corresponding target volume global array based on the parent volume ID; Converting the starting position into an actual address based on the target volume global array, and decomposing the write command into multiple sub-commands according to the length and the size of the sub-array corresponding to each sub-volume in the target volume global array; Execute subcommands one by one until all subcommands are completed.
7. The method according to claim 6, characterized in that The starting position is converted into an actual address based on the target volume global array, and the write command is disassembled into multiple sub-commands according to the length and the size of the sub-array corresponding to each sub-volume in the target volume global array, including: Calculate the actual address of the parent array relative to the starting position in the write command according to the size of the parent volume in the target volume global array, the starting logical address, and the actual address in the parent array; Access the parent array and obtain the stripe size of the subarray based on the connection relationship between the parent array and the subarray; Determine whether the write command spans multiple subarrays according to the starting position and length in the write command and the stripe size of the subarray, directly execute the write command if the length is smaller than the stripe size of the subarray, and disassemble the write command if the length is larger than the stripe size of the subarray; The method for disassembling the write command includes: Calculate the subarray number using the formula: child_raid_index=slba / child_stripe_size; Wherein, child_raid_index is the subarray number, slba is the starting position of the write command, and child_stripe_size is the stripe size of the subarray [1]; The subarray ID is obtained from the subarray number and the subarray information recorded in the parent array, and the subvolume ID is obtained from the subarray ID and the parent volume ID; Calculate the number of logical blocks of the split subcommands in the subarray: child_nlb=child_stripe_size–slba%child_stripe_size[2]; Among them, child_stripe_size is the stripe size of the subarray, and slba is the starting position; Calculate the starting logical address of the segmented subcommand in the subarray: child_slba=stripe_id*child_stripe_size+slba%child_stripe_size; Among them, stripe_id represents the stripe number hit by the host IO, and its calculation formula is: stripe_id=slba / father_stripe_size; Among them, father_stripe_size is the stripe size of the parent array; Update the number of remaining logical blocks of the write command, confirm that the number of remaining logical blocks exceeds the number of logical blocks of the subarray, and use the smaller value of the number of remaining logical blocks and the stripe size of the subarray as the number of logical blocks of the subcommand split to the next subarray; Update the starting position of the latest subcommand, where the starting position of the latest subcommand is updated to the starting position of the write command plus the number of logical blocks of all subarrays that have been allocated the corresponding subcommand; Update the subarray number of the subarray corresponding to the new subcommand to the previous subarray number plus 1; Apply for the corresponding subcommand processing node and fill in the subvolume ID, subarray ID, the starting position of the subcommand after segmentation, and the number of logical blocks of the subcommand after segmentation; Increase the number of commands in the parent command processing node by 1; The write command is split repeatedly until the number of remaining logical blocks of the write command is zero.
8. The method according to claim 6, characterized in that Execute the subcommands one by one until all subcommands are completed, including: Receiving an event indicating that a subcommand has been executed, and extracting subcommand information and execution results from the event; Obtaining a processing node of the upper-level write command according to the sub-command information, and sending the sub-command information and the execution result to the processing node of the upper-level write command; The processing node of the upper-level write command summarizes the received subcommand information and execution results, updates the number of subcommands to be executed, and recycles the processing nodes corresponding to the subcommands that have been executed; If the execution results of all subcommands are successful, the superior write command is determined to be executed successfully. If there are subcommands that fail to execute, the superior write command is determined to have failed to execute.
9. A terminal, characterized in that: include: A memory, used for storing a data processing program of the combined disk array; A processor is used to implement the steps of the data processing method for the combined disk array as claimed in any one of claims 1 to 8 when executing the data processing program of the combined disk array.
10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a data processing program for a combined disk array, and when the data processing program for the combined disk array is executed by a processor, the steps of the data processing method for a combined disk array as claimed in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Storage system, method for reading data from storage system and method for writing data to storage system
CN102023809A
Storage cache optimization method and system, equipment and medium
CN111240595A
Disk read-write resource allocation method and device, equipment and storage medium
CN111880750A
IO processing method and device based on disk array and medium
CN112463022A
IO processing method and device during disk array degradation and electronic equipment
CN117111860A
Cited By
Address mapping method and device, storage system, program product and storage medium
CN120743812A
Data processing method and device, electronic equipment and readable storage medium
CN120872254A