Creation method for redundant array of independent disks, and data storage system

By dynamically creating RAID arrays that adapt to business needs, and utilizing contiguous address ranges and flexible configuration information of hard drives, the problems of storage resource waste and performance imbalance in pooled systems are solved, achieving more efficient storage resource utilization and data management.

WO2026103840A1PCT designated stage Publication Date: 2026-05-21HUAWEI TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-11-14
Publication Date
2026-05-21

AI Technical Summary

Technical Problem

Existing RAID solutions tend to waste storage resources in pooled systems and cannot dynamically match the storage needs of different services, resulting in low resource utilization and unbalanced performance.

Method used

By acquiring the Quality of Service (QoS) requests of services, we can dynamically create RAID arrays adapted to different services, and optimize storage space allocation and scheduling by utilizing contiguous address ranges of hard drives and flexible RAID configuration information.

Benefits of technology

It improves the utilization of storage resources, optimizes the performance and reliability of the data storage system, reduces the difficulty and overhead of accessing and maintaining business data, and enhances the system's balance and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025134882_21052026_PF_FP_ABST
    Figure CN2025134882_21052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a creation method for a redundant array of independent disks (RAID), and a data storage system, applicable to the technical field of storage. The method comprises: acquiring a quality of service (QoS) request of a first service; and on the basis of the QoS request, acquiring a first storage space of each of P hard disks from among M hard disks of a data storage system, and combining the P first storage spaces to form a first RAID, wherein the QoS request is used for indicating a QoS requirement for storage, access, processing, or transmission of data of the first service in the data storage system, P is greater than or equal to 2, the first storage space is less than the storage capacity of each hard disk, and the first RAID is used for storing the data of the first service. In the creation method for the RAID provided by the present application, an RAID adapted to a service can be created on the basis of a QoS request of the service, thereby improving the utilization rate of storage resources in the data storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Methods for creating redundant arrays of independent disks and data storage systems

[0001] This application claims priority to Chinese Patent Application No. 202411656083.X, filed on November 18, 2024, entitled “Method for Creating a Redundant Array of Independent Disks and Data Storage System”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of storage technology, and in particular to a method for creating a redundant array of independent disks and a data storage system. Background Technology

[0003] To provide reliable data services, data storage systems typically require processors to use a Redundant Array of Independent Disks (RAID) algorithm to encode checksum data when writing data to solid-state drives (SSDs). This checksum data is then distributed across multiple SSDs. There are many RAID algorithms, including RAID 5, RAID 6, RAID 50, and RAID 60. Different RAID algorithms vary in disk utilization, reliability, read / write performance, and redundancy requirements. Using RAID to store data allows for the recovery of damaged data from the remaining SSDs by utilizing the data and checksum data if one SSD fails and its data is corrupted.

[0004] SSD pooling has become a trend because pooled systems allow multiple users to share storage resources to run different services simultaneously. Before a pooled system is deployed, its RAID configuration is already set up, resulting in multiple fixed RAID arrays within the system. Once a new service arrives, one of the RAID arrays can be directly allocated to that service. However, existing RAID configurations can easily waste storage resources within the pooled system. Summary of the Invention

[0005] To address the aforementioned technical issues, this application provides a method for creating an independent disk redundant array and a data storage system, which can create RAID adapted to different services, thereby improving the utilization rate of storage resources in the system.

[0006] Firstly, a method for creating a Redundant Array of Independent Disks (RAID) is provided, applied to a data storage system. The data storage system includes M hard disks. The method includes: obtaining a Quality of Service (QoS) request for a first service; obtaining the first storage space of each of P hard disks from the M hard disks according to the QoS request; and assembling the P first storage spaces into a first RAID. The QoS request indicates the quality of service requirements for storing, accessing, processing, or transmitting data for the first service in the data storage system. P ≥ 2. The first storage space is less than the storage capacity of the hard disks. The first RAID is used to store the data for the first service.

[0007] In existing solutions, pooled systems use different types of hard drives, typically grouping SSDs of the same type into a RAID array. This results in multiple fixed RAID arrays within the pooled system. When a new service is added, one of these RAID arrays is directly allocated to that service. However, this approach often results in a mismatch between the RAID arrays provided and the storage requirements of the services, leading to more storage space provided by the RAID arrays than the services need, thus wasting storage resources in the pooled system. This new solution first obtains the QoS request of the first service to determine its specific requirements. Then, based on this QoS request, it creates a first RAID array adapted to the first service. This ensures that the first RAID array meets the storage space requirements of the first service without consuming additional storage space on the hard drives. As can be seen, this solution dynamically allocates and schedules storage resources according to service needs to meet the access or processing requirements of different service data. This not only improves the utilization rate of storage resources in the data storage system but also enhances the performance, reliability, and efficiency of the data storage system in storing and managing various service data.

[0008] In some possible implementations, the aforementioned QoS requests include one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of business input / output IO, number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements.

[0009] In some possible implementations, obtaining the first storage space of each of the P hard disks from the M hard disks according to the QoS request includes: obtaining a continuous address segment of each of the P hard disks from the M hard disks according to the QoS request, and using the storage space indicated by the P continuous address segments as the P first storage spaces.

[0010] In the above scheme, a contiguous address range of the hard disk is used to provide the storage space required for the first RAID. This allows the hard disk to access the data of the first service in address order, thereby reducing the hard disk seek time and rotational latency, optimizing the hard disk access performance, and improving the hard disk access speed of the data of the first service.

[0011] In some possible implementations, the first hard disk among the P hard disks stores the correspondence between the start address and end address of the continuous address segment of the first hard disk and the first RAID.

[0012] In existing RAID 2.0 schemes, all hard drives in the control layer store the mapping between blocks and RAID, resulting in high storage overhead and difficulty in updating the mapping. This technical solution uses a contiguous address range from the first hard drive to provide the storage space required for the first RAID. This allows the first hard drive to identify the mapping between all addresses included in the contiguous address range and the RAID by storing only the start and end addresses of the contiguous address range and their corresponding RAID values. This not only reduces storage overhead but also simplifies the difficulty of updating the mapping.

[0013] In some possible implementations, the above method further includes: obtaining a termination request for the first service, and instructing the first hard disk to delete the correspondence between the start and end addresses of the continuous address segment of the first hard disk and the first RAID according to the termination request. The termination request is used to instruct the data storage system to terminate the data storage service for the first service.

[0014] Compared to existing RAID configurations where the mapping between hard drives and RAID levels is fixed, or RAID 2.0 configurations where the mapping between blocks and RAID levels is fixed, leading to RAID mismatches with business needs and wasted storage resources, this technical solution establishes and deletes mappings between addresses and RAID levels based on business requirements. Therefore, this solution supports dynamic adjustment of address-RAID mappings based on business needs, allowing the same storage space to be used to form different RAID levels at different times. Consequently, this solution dynamically allocates and schedules storage resources according to business needs, offering greater flexibility and improving storage resource utilization.

[0015] In some possible implementations, after assembling P first storage spaces into a first RAID, the method further includes: determining the RAID configuration information of the first RAID based on the QoS request. This RAID configuration information indicates the method of storing the data of the first service in the first RAID.

[0016] In existing solutions, multiple RAID arrays are typically configured within the pooling system before it is deployed, and these configurations remain unchanged during system operation. This can lead to incomplete matching between the RAID arrays and the needs of some services when they are used subsequently. This technical solution determines the RAID configuration information of the first RAID array based on the QoS request of the first service, ensuring that the created first RAID array meets the requirements of that service. Furthermore, this solution supports dynamically configuring different RAID arrays based on the QoS requests of different services, enabling each RAID array to meet the needs of its corresponding service, thereby providing better storage services.

[0017] In some possible implementations, the RAID configuration information mentioned above includes one or more of the following: RAID algorithm, stripe width, stripe unit size, and stripe arrangement.

[0018] In some possible implementations, the stripe width in the RAID configuration information of the first RAID described above is K, where K is a positive integer. The first RAID includes multiple subgroups. Each subgroup includes at least K hard drives. The hard drives included in each subgroup are different, and the data blocks and parity blocks included in the stripes of each subgroup are provided by the hard drives in the subgroup to which the stripe belongs.

[0019] To leverage the performance advantages of RAID and improve data read / write speeds and fault tolerance, existing solutions directly set the stripe width to equal the number of hard drives in the RAID array. However, in this technical solution, since the RAID configuration information is determined based on the QoS requests of the service, situations inevitably arise where the stripe width is less than the number of hard drives in the RAID array. Therefore, this technical solution provides a stripe arrangement method for scenarios where the stripe width is less than the number of hard drives in the RAID array.

[0020] In some possible implementations, the aforementioned multiple subgroups include a first subgroup. The first subgroup includes a first hard disk. The first hard disk stores first data. The method further includes: in the event of a failure of the first hard disk, retrieving data blocks and parity blocks from a first stripe, calculating the data blocks and parity blocks to obtain the first data, and storing the first data on a second hard disk. The first stripe is arranged within the first subgroup. The first stripe is the stripe to which the first data belongs. The parity block is used to store parity data for the first data. The first hard disk and the second hard disk are different.

[0021] This technical solution divides the first RAID into multiple subgroups and arranges stripes only within the subgroups. In the event of data corruption, data can be reconstructed using only other data within the same subgroup, without needing to use data from other subgroups. This is because data in the same stripe is only distributed within the same subgroup and does not spread across subgroups. Therefore, data reconstruction only requires reading operations from the hard drives in one subgroup, thus reducing the overhead of data reconstruction.

[0022] In some possible implementations, the above method further includes: obtaining the QoS request of the second service; obtaining the second storage space of each of the Q hard drives from the M hard drives according to the QoS request of the second service; and forming a second RAID from the Q second storage spaces. The QoS request of the second service indicates the quality of service requirements for the storage, access, processing, or transmission of data of the second service in the data storage system. Q ≥ 2. The second storage space is less than the storage capacity of the hard drives, or the second storage space is equal to the storage capacity of the hard drives. The second RAID is used to store the data of the second service. Furthermore, the P hard drives of the first RAID include the first hard drive and the second hard drive, but do not include the third hard drive; the Q hard drives of the second RAID include the first hard drive and the third hard drive, but do not include the second hard drive.

[0023] This technical solution can create corresponding RAID arrays to store the data of different services based on their QoS requests. These include a first RAID and a second RAID array. Therefore, this solution supports dynamic allocation and scheduling of storage resources according to service needs to meet the access or processing requirements of different service data. This not only improves the utilization rate of storage resources in the data storage system but also enhances the performance, reliability, and efficiency of the data storage system in storing and managing various service data.

[0024] In existing solutions, grouping SSDs of the same type into a RAID array in a pooling system can enhance the system's fault tolerance and recovery capabilities. However, this leads to uneven distribution of business data and uneven utilization of SSD storage space, resulting in performance imbalances within the pooling system. This technical solution supports using different storage spaces on the same hard drive to form different RAID arrays. This includes using the first storage space on a first hard drive (or a second hard drive) to form a first RAID array and using the second storage space on a first hard drive (or a second hard drive) to form a second RAID array. This allows different business data to be stored on a single hard drive, improving hard drive storage space utilization, enhancing the uniformity of business data distribution within the data storage system, improving the system's parallel read / write performance and throughput, and enhancing system balance.

[0025] In some possible implementations, the above method further includes: obtaining a termination request for a first service, and releasing the P first storage spaces according to the termination request; after releasing the P first storage spaces, obtaining a QoS request for a third service, and creating a third RAID according to the QoS request of the third service. The third RAID includes some or all of the P first storage spaces.

[0026] In the above scheme, after the first service runs out, the storage space originally provided to the first service (i.e., the first RAID) can be reclaimed and then provided to the new service (i.e., the third service), thus realizing the on-demand allocation and scheduling of storage resources.

[0027] In some possible implementations, the aforementioned third RAID includes a third storage space for each of the R hard drives, where 2 ≤ R < M, or R = M. The method further includes: migrating the data of the second service when the R third storage spaces include part or all of the Q second storage spaces and the second RAID stores data for the second service, or when the QoS requirements of the second service are not met.

[0028] This technical solution provides a way to resolve conflicts between multiple services. Specifically, it offers passive and active migration methods for service data. When a new service needs to occupy the storage space of an existing service, passive migration is triggered, moving the data of the existing service to another storage space. This ensures the successful creation of a new RAID array for the new service without affecting the normal operation of the existing service. When the performance of a hard drive dynamically changes with the service data it stores, causing the hard drive's performance to fail to meet the QoS requirements of a certain service, active migration is triggered, moving the data of that service to another storage space. This ensures that the service can operate while still meeting its requirements.

[0029] Secondly, a data storage system is provided, comprising multiple independent redundant disk arrays (RAID). Different RAID arrays are used to store data for different services. The first RAID array and the second RAID array do not contain exactly the same hard drives.

[0030] There are two existing RAID schemes in pooled systems: the first scheme groups SSDs of the same type in the pooled system into one RAID, giving the pooled system multiple fixed RAIDs; the second scheme divides each SSD in the pooled system into multiple blocks according to a specified storage capacity, assigns these blocks to different block groups, and then configures RAID for each block group. The existing first scheme only allows each SSD to store data for a single service for a period of time, resulting in many SSDs dedicated to a single service remaining idle due to low data volume during service operation. However, the first and second RAID schemes created in this technical solution do not include identical hard drives; specifically, some hard drives are the same, while others are different. For hard drives included in both the first and second RAID schemes, the different storage spaces on these hard drives form different RAIDs, allowing the hard drive to be used simultaneously to store data for different services. This reduces the probability of the hard drive being idle, improves the utilization rate of the hard drive's storage space, and enhances the uniformity of service data distribution in the data storage system. The existing second-mode configuration includes blocks on all SSDs in each RAID. Due to the excessive dispersion of blocks within the RAID, the business data stored on that RAID is also too dispersed. This results in an excessively large data range involved in accessing and maintaining business data (such as data consistency verification and fault recovery), requiring too many SSDs to be read and written, thus affecting the execution efficiency of data read and write tasks. The first and second RAID created in this technical solution do not include the same number of hard drives. This means that both the first and second RAID only occupy a portion of the hard drives in the data storage system. Therefore, the distribution range of business data in the first RAID (or second RAID) is smaller than that in any RAID in the existing second-mode configuration. Consequently, the number of hard drives required to access and maintain business data in the first RAID (or second RAID) in this technical solution is also less than the number of SSDs required to access and maintain business data in any RAID in the existing second-mode configuration. Therefore, this technical solution reduces the difficulty and overhead of accessing and maintaining business data, making the execution efficiency of data read and write tasks higher than that of the existing second-mode configuration. In summary, this technical solution can be considered a compromise between the existing first and second solutions, possessing the advantages of both solutions while eliminating their disadvantages.

[0031] In some possible implementations, the data storage system described above includes M hard drives. These M hard drives are used to provide the aforementioned multiple RAID configurations. The M hard drives include a first hard drive, a second hard drive, and a third hard drive. The first hard drive, the second hard drive, and the third hard drive are different hard drives. The first RAID configuration includes the first hard drive and the second hard drive, but excludes the third hard drive. The second RAID configuration includes the first hard drive and the third hard drive, but excludes the second hard drive.

[0032] While the existing first approach enhances the fault tolerance and recovery capabilities of the pooling system, it leads to uneven distribution of business data and uneven utilization of SSD storage space, resulting in performance imbalances. This technical solution supports using different storage spaces on the same hard drive to form different RAID arrays. This includes using a portion of the storage space on the first (or second) hard drive to form the first RAID and another portion on the first (or second) hard drive to form the second RAID. This allows different business data to be stored on a single hard drive, improving storage space utilization, enhancing the uniformity of business data distribution in the data storage system, improving parallel read / write performance and throughput, and enhancing system balance. While the existing second approach achieves a more even distribution of business data in the pooling system and enhances parallel read / write performance and throughput, the excessively dispersed blocks in the RAID array make accessing and maintaining business data difficult and costly, impacting the efficiency of data read / write tasks. The first RAID created by this technical solution only occupies the first and second hard drives, not the third hard drive. Therefore, the data for the first service in the first RAID will be distributed across the first and second hard drives, not the third hard drive. Accessing and maintaining the data for the first service in the first RAID requires reading and writing to the first and second hard drives, but not the third hard drive. If the existing second solution is continued in the data storage system, the service data in any RAID will be distributed across the first, second, and third hard drives. Accessing and maintaining the service data in that RAID will require reading and writing to all three hard drives. It is understandable that the second RAID created by this technical solution has a similar situation compared to the RAID in the existing second solution, which will not be elaborated here. It can be seen that the distribution range of service data and the number of hard drives required to read and write when accessing and maintaining service data in a RAID are both smaller in this technical solution than in the existing second solution. Therefore, this technical solution reduces the difficulty and overhead of accessing and maintaining service data, making the execution efficiency of data read and write tasks higher than that of the existing second solution.

[0033] In some possible implementations, the first RAID configuration described above comprises P hard drives. These P hard drives include the first and second hard drives, where 2 ≤ P < M.

[0034] The first RAID created by this technical solution only occupies a portion of the hard drives in the data storage system. Therefore, the distribution range of the business data in the first RAID is smaller than that of any RAID in the existing second solution. Consequently, the number of hard drives that need to be read and written when accessing and maintaining the business data in the first RAID in this technical solution is also less than the number of SSDs that need to be read and written when accessing and maintaining the business data in any RAID in the existing second solution. Therefore, this technical solution reduces the difficulty and overhead of accessing and maintaining business data, and makes the execution efficiency of data read and write tasks higher than that of the existing second solution.

[0035] In some possible implementations, the first RAID described above includes a first storage space for each of the P hard drives. Where P ≥ 2, the first storage space is less than the storage capacity of the hard drives, or the first storage space is equal to the storage capacity of the hard drives.

[0036] This technical solution dynamically allocates and schedules storage resources based on business needs, offering greater flexibility. The first storage space can be equal to or less than the hard drive's storage capacity, determined by the primary business requirements to satisfy the access or processing needs of the primary business data. When the first storage space is less than the hard drive's storage capacity, it does not prevent other storage spaces on the hard drive from being used for other RAID configurations, thus improving the utilization rate of storage resources in the data storage system.

[0037] In some possible implementations, the first storage space mentioned above is the storage space indicated by a continuous address segment in the hard disk.

[0038] In some possible implementations, the first hard disk stores the correspondence between the start and end addresses of the continuous address segments of the first hard disk and the first RAID.

[0039] In some possible implementations, the first RAID is used to store data for the first service. The data storage system includes a processor. After receiving a termination request for the first service, the processor instructs the first hard disk to delete the mapping between the start and end addresses of a consecutive address segment of the first hard disk and the first RAID. The termination request instructs the data storage system to terminate its storage service for the data of the first service.

[0040] In some possible implementations, the RAID configuration information of the first RAID differs from that of the second RAID. Specifically, the RAID configuration information of the first RAID indicates how the data for the first service is stored in the first RAID. The RAID configuration information of the second RAID indicates how the data for the second service is stored in the second RAID.

[0041] This technical solution supports dynamically configuring different RAID arrays according to the needs of different services, ensuring that each RAID array meets the requirements of its corresponding service and thus provides better storage services. Therefore, the RAID configuration information for different RAID arrays often differs.

[0042] In some possible implementations, the RAID configuration information of the first RAID mentioned above includes one or more of the following: RAID algorithm, stripe width, stripe unit size, and stripe arrangement.

[0043] In some possible implementations, the RAID configuration information of the first RAID is determined based on the Quality of Service (QoS) request of the first service. This QoS request indicates the quality of service requirements for accessing, processing, or transmitting data for the first service in the data storage system.

[0044] In some possible implementations, the aforementioned QoS requests include one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of business input / output IO, number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements.

[0045] In some possible implementations, the stripe width in the RAID configuration information of the first RAID described above is K, where K is a positive integer. The first RAID includes multiple subgroups. Each subgroup includes at least K hard drives. The hard drives included in each subgroup are different, and the data blocks and parity blocks included in the stripes of each subgroup are provided by the hard drives in the subgroup to which the stripe belongs.

[0046] In some possible implementations, the aforementioned multiple subgroups include a first subgroup. The first subgroup includes a first hard disk. The first hard disk stores first data. In the event of a failure of the first hard disk, the processor retrieves data blocks and parity blocks from a first stripe, performs calculations on the data blocks and parity blocks to obtain the first data, and stores the first data on a second hard disk. The first stripe is arranged within the first subgroup. The first stripe is the stripe to which the first data belongs. The parity block is used to store parity data for the first data. The first hard disk is different from the second hard disk.

[0047] In some possible implementations, the aforementioned data storage system includes a processor. After receiving a termination request for the first service, the processor releases the P first storage spaces and then creates a third RAID. The third RAID comprises some or all of the P first storage spaces.

[0048] In some possible implementations, the second RAID mentioned above includes a second storage space for each of the Q hard drives, where 2 ≤ Q < M, or Q = M. The third RAID mentioned above includes a third storage space for each of the R hard drives, where 2 ≤ R < M, or R = M. When the R third storage spaces include part or all of the Q second storage spaces, and the second RAID stores data for the second service, or when the QoS requirements of the second service are not met, the processor is used to migrate the data for the second service.

[0049] Thirdly, a storage device is provided, including a first acquisition unit, a second acquisition unit, and a creation unit. The first acquisition unit is used to acquire a Quality of Service (QoS) request for a first service. The QoS request indicates the QoS requirements for storing, accessing, processing, or transmitting data of the first service in the data storage system. The second acquisition unit is used to acquire first storage space from each of P hard disks out of M hard disks in the data storage system according to the QoS request. Here, P ≥ 2, and the first storage space is less than the storage capacity of the hard disk. The creation unit is used to arrange the P first storage spaces into a first RAID. The first RAID is used to store the data of the first service.

[0050] In some possible implementations, the aforementioned QoS requests include one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of business input / output IO, number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements.

[0051] In some possible implementations, the second acquisition unit is specifically used to acquire consecutive address segments of each of the P hard disks from the M hard disks according to the QoS request, and use the storage space indicated by the P consecutive address segments as the aforementioned P first storage spaces.

[0052] In some possible implementations, the first hard disk among the P hard disks stores the correspondence between the start address and end address of the continuous address segment of the first hard disk and the first RAID.

[0053] In some possible implementations, the aforementioned storage device includes a deletion unit. This deletion unit is used to obtain a termination request for the first service, and, based on the termination request, instructs the first hard disk to delete the correspondence between the start and end addresses of a consecutive address segment of the first hard disk and the first RAID. The termination request is used to instruct the data storage system to terminate the storage service for the data of the first service.

[0054] In some possible implementations, the creation unit is further configured to determine the RAID configuration information of the first RAID based on the aforementioned QoS request after P first storage spaces are assembled into a first RAID. This RAID configuration information indicates the method of storing the data of the first service within the first RAID.

[0055] In some possible implementations, the RAID configuration information mentioned above includes one or more of the following: RAID algorithm, stripe width, stripe unit size, and stripe arrangement.

[0056] In some possible implementations, the stripe width in the RAID configuration information of the first RAID described above is K, where K is a positive integer. The first RAID includes multiple subgroups. Each subgroup includes at least K hard drives. The hard drives included in each subgroup are different, and the data blocks and parity blocks included in the stripes of each subgroup are provided by the hard drives in the subgroup to which the stripe belongs.

[0057] In some possible implementations, the aforementioned multiple subgroups include a first subgroup. The first subgroup includes a first hard disk. The first hard disk stores first data. The aforementioned storage device includes a reconstruction unit. The reconstruction unit is used to, in the event of a failure of the first hard disk, retrieve data blocks and parity blocks from a first stripe, perform calculations on the data blocks and parity blocks to obtain the first data, and store the first data on a second hard disk. The first stripe is arranged within the first subgroup. The first stripe is the stripe to which the first data belongs. The parity block is used to store parity data for the first data. The first hard disk is different from the second hard disk.

[0058] In some possible implementations, the first acquisition unit is further configured to acquire a QoS request for the second service. The QoS request for the second service indicates the quality of service requirements for the storage, access, processing, or transmission of data for the second service in the data storage system. The second acquisition unit is further configured to acquire second storage space for each of the Q hard drives from the M hard drives according to the QoS request for the second service. Here, Q ≥ 2. The second storage space is less than the storage capacity of the hard drive, or the second storage space is equal to the storage capacity of the hard drive. The creation unit is further configured to assemble the Q second storage spaces into a second RAID. The second RAID is used to store the data for the second service. Furthermore, the P hard drives of the first RAID include the first hard drive and the second hard drive, but do not include the third hard drive; the Q hard drives of the second RAID include the first hard drive and the third hard drive, but do not include the second hard drive.

[0059] In some possible implementations, the deletion unit is further configured to obtain a termination request for the first service and release the P first storage spaces based on the termination request. The first acquisition unit is further configured to obtain a QoS request for the third service after releasing the P first storage spaces. The creation unit is further configured to create a third RAID based on the QoS request of the third service. The third RAID includes some or all of the P first storage spaces.

[0060] In some possible implementations, the aforementioned third RAID includes a third storage space for each of the R hard drives, where 2 ≤ R < M, or R = M. The storage device includes a migration unit. The migration unit is used to migrate the data of the second service when the R third storage spaces include part or all of the Q second storage spaces and the second RAID stores data for the second service, or when the QoS requirements of the second service are not met.

[0061] Fourthly, a chip is provided, including a processor and a power supply circuit for supplying power to the processor, which is used to perform the method as described in any of the first aspects.

[0062] Fifthly, a storage device cluster is provided, including at least one storage device, each storage device including a processor and memory.

[0063] The processor of the at least one storage device is configured to execute instructions stored in the memory of the at least one storage device to cause the cluster of storage devices to perform the method as described in any of the first aspects.

[0064] In a sixth aspect, a computer program product comprising instructions is provided, which, when executed by a storage device, causes the storage device to perform the method as described in any of the first aspects.

[0065] A seventh aspect provides a computer-readable storage medium including computer program instructions that, when executed by a storage device, perform the method of any of the first aspects. Attached Figure Description

[0066] Figure 1 is an architecture diagram of a data storage system provided in an embodiment of this application;

[0067] Figure 2 is a structural diagram of a data storage system provided in an embodiment of this application;

[0068] Figure 3 is a flowchart illustrating a RAID creation method provided in an embodiment of this application;

[0069] Figure 4 is a flowchart illustrating a method for creating a first RAID according to an embodiment of this application;

[0070] Figure 5A is a schematic diagram of the arrangement of strips provided in an embodiment of this application;

[0071] Figure 5B is a schematic diagram of another strip arrangement provided in an embodiment of this application;

[0072] Figure 6 is a schematic diagram of the structure of a storage device provided in an embodiment of this application;

[0073] Figure 7 is a schematic diagram of the structure of a storage device cluster provided in an embodiment of this application;

[0074] Figure 8 is a schematic diagram of another storage device cluster provided in an embodiment of this application. Detailed Implementation

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

[0076] To improve the utilization rate of storage resources in a data storage system, this application provides a data storage system and a method for creating a redundant array of independent disks (RAID). The data storage system can be seen in Figures 1 and 2 and related descriptions; the RAID creation method can be seen in Figure 3 and related descriptions.

[0077] Referring to Figure 1, Figure 1 is an architecture diagram of a data storage system provided in an embodiment of this application. As shown in Figure 1, the architecture includes a client 10 and a data storage system 20. The client 10 and the data storage system 20 can communicate via wired or wireless means.

[0078] In some possible implementations, client 10 can be deployed on computing devices or terminal devices. Computing devices are electronic devices used for computing, processing, and storing data, including servers, supercomputers, personal computers, workstations, industrial control computers, mobile devices, etc. Terminal devices are electronic devices used to access computing devices, including personal computers, smartphones, handheld devices, tablets, mobile laptops, all-in-one handheld devices, smart conferencing devices, smart advertising devices, etc.

[0079] In some possible implementations, the data storage system 20 can be deployed on a computing device.

[0080] In some possible implementations, the client 10 and the data storage system 20 can be deployed on different computing devices, or on the same computing device. When the client 10 and the data storage system 20 are deployed on different computing devices, they can be deployed on different computing devices within the same computing device cluster, or on different computing devices within different computing clusters. The computing device cluster includes multiple of the aforementioned computing devices. In practical applications, the specific deployment of the client 10 and the data storage system 20 can be determined based on the actual application scenario, and this application does not impose specific limitations.

[0081] The data storage system architecture in Figure 1 is suitable for multiple users to share storage resources to run different services simultaneously.

[0082] The specific process of a single user using the data storage system is as follows: The user sends a Quality of Service (QoS) request to the data storage system 20 through client 10. The QoS request indicates the quality of service requirements for the storage, access, processing, or transmission of service data in the data storage system 20. The QoS request is typically created by the user on client 10 based on service needs. The data storage system 20 responds to the QoS request by providing corresponding storage space for the service. After the data storage system 20 completes the QoS request, the user sends the service data to the data storage system 20 through client 10. This service data can be generated while running the service on client 10 or can be directly stored by the user on client 10. Upon receiving the service data, the data storage system 20 stores the service data in the storage space corresponding to that service.

[0083] Therefore, when there are multiple clients 10 in Figure 1, multiple users can send different QoS requests for different services to the data storage system 20 using different clients 10. The data storage system 20 then responds to the QoS requests of multiple services, providing corresponding storage space for each service to store its data. For example, if one client 10 sends a QoS request for a first service to the data storage system 20, the data storage system 20 will respond to the QoS request for the first service and provide storage space for the first service to store its data. If another client 10 sends a QoS request for a second service to the data storage system 20, the data storage system 20 will respond to the QoS request for the second service and provide storage space for the second service to store its data. If another client 10 sends a QoS request for a third service to the data storage system 20, the data storage system 20 will respond to the QoS request for the third service and provide storage space for the third service to store its data. The QoS request for the first service is used to indicate the quality of service requirements for the storage, access, processing, or transmission of data for the first service in the data storage system 20; the QoS request for the second service is used to indicate the quality of service requirements for the storage, access, processing, or transmission of data for the third service in the data storage system 20; and the QoS request for the third service is used to indicate the quality of service requirements for the storage, access, processing, or transmission of data for the third service in the data storage system 20.

[0084] The specific composition and functions of the data storage system 20 will be further described below with reference to Figure 2.

[0085] Referring to Figure 2, which is a structural diagram of a data storage system provided in an embodiment of this application, the data storage system 20 includes a processor 21, a hard disk 22, and a communication bus 23. The processor 21 and the hard disk 22 communicate via the communication bus 23.

[0086] The processor 21 can be a central processing unit (CPU), a data processing unit (DPU), a graphics processing unit (GPU), etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits.

[0087] Hard drive 22 can be either a physical hard drive or a virtual hard drive. A physical hard drive refers to an actual hard drive device, such as a hard disk drive (HDD) or a solid-state drive (SSD). A virtual hard drive refers to a hard drive device simulated by software. A virtual hard drive can be a virtual disk created on a physical hard drive, or a virtual disk created on a network storage device (such as direct-attached storage, network-attached storage, storage area networks, etc.), such as a virtual hard drive in a virtual machine (e.g., VMDK, VHD, VDI formats), or a virtual hard drive in a cloud storage service, etc.

[0088] Since there are various types of hard drives 22, for ease of explanation, the following text will use hard drive 22 as an example of a solid-state drive.

[0089] When hard disk 22 is an SSD (see hard disk 22 in Figure 2), hard disk 22 is a storage device built from flash memory chips, including an SSD controller and storage media. The SSD controller executes input / output (I / O) instructions from processor 21. The SSD controller can be a chip, such as a field-programmable gate array (FPGA) or an ASIC. The storage media consists of several flash memory chips. Each flash memory chip can be divided into several physical chunks of a fixed size. Therefore, the physical chunks have a standard capacity, for example, 2 to the power of N, where N is a positive integer. Optionally, the SSD controller and the flash memory chips in the storage media can be mounted on the same printed circuit board (PCB), presented as a disk or card, and communicate with processor 21 or other hard disks 22 via communication bus 23 through the input / output (I / O) interface on the PCB. In the case where the hard disk 22 includes an SSD controller and storage media, if the IO instruction received by the hard disk 22 is a read instruction, the SSD controller concurrently reads data from one or more physical blocks of the storage media and then sends the data to the outside of the hard disk 22. If the IO instruction received by the hard disk 22 is a write instruction, the SSD controller concurrently writes data from the outside of the hard disk 22 to one or more physical blocks of the storage media.

[0090] The communication bus 23 can be a peripheral component interconnect express (PCIe) bus, a high-speed interconnect bus, a network bus, an extended industry standard architecture (EISA) bus, a unified bus (UB) bus, an NVIDIA interconnect bus, a compute express link (CXL) bus, a cache coherent interconnect for accelerators (CCIX) bus, etc. The unified bus is also known as the Lingqu bus. Buses can be divided into address buses, data buses, control buses, etc.

[0091] When the data storage system 20 is deployed on a computing device, the data storage system 20 can be either a single computing device or a cluster of computing devices.

[0092] When the data storage system 20 is a computing device, the processor 21, hard disk 22 and communication bus 23 are deployed on the same computing device.

[0093] When the data storage system 20 is a cluster of computing devices, it can be that the processor 21 and at least one hard disk 22 are deployed on the same computing device, while the remaining hard disks 22 are deployed on another computing device; or the processor 21 and at least one hard disk 22 are deployed on the same computing device, while the remaining hard disks 22 are distributed across multiple computing devices; or the processor 21 is deployed on a single computing device, while all hard disks 22 are deployed on another computing device; or the processor 21 is deployed on a single computing device, while multiple hard disks 22 are distributed across multiple computing devices, and so on. In practical applications, the processor 21 and hard disks 22 can be deployed as needed according to the actual application scenario, and this application does not impose specific limitations.

[0094] It should be understood that the number of processors and hard disks in the data storage system is illustrated using the data storage system 20 shown in Figure 2, which includes one processor 21 and eleven hard disks 22 as an example. In practical applications, the number of processors and hard disks in the data storage system can be more or less, and this application does not impose specific limitations. When the data storage system includes multiple processors, the deployment method of the processors and hard disks in the data storage system can refer to the deployment method of processor 21 and hard disk 22 in the data storage system 20 in Figure 2 above. Alternatively, the processors and hard disks can be deployed in two separate device clusters. The device cluster with the processors can be a computing device cluster, and the device cluster with the hard disks can be a storage device cluster.

[0095] In some possible implementations, multiple hard drives 22 in the data storage system 20 collectively provide storage resources for multiple services. These multiple hard drives 22 can include hard drives of different types and specifications, allowing the data storage system 20 to provide storage resources with varying performance levels. In the data storage system 20, each hard drive can contribute a portion or all of the device's storage space. By integrating and managing the storage space of hard drives with different performance levels, the data storage system 20 provides unified storage resources for upper-layer services, thereby better leveraging storage performance advantages. This application does not impose any limitations on the number, type, or specifications of the hard drives included in the data storage system 20.

[0096] In the data storage system 20 shown in Figure 2, the processor 21 is used to obtain QoS requests from multiple services and provide corresponding storage space for different services to store their data based on the QoS requests. Specifically:

[0097] After receiving a QoS request for a first service from one of the clients 10, the processor 21 retrieves the first storage space of each of the P hard disks 22 from the M hard disks 22 according to the QoS request of the first service, and forms a first RAID with the P first storage spaces as the storage space for the first service to store the data of the first service. Where M ≥ 2, M is an integer, P ≥ 2, the first storage space is less than the storage capacity of the hard disk 22, or the first storage space is equal to the storage capacity of the hard disk 22. This process can be referred to in the execution process of steps S101-S103 of the RAID creation method in Figure 3 below.

[0098] The processor 21 is also configured to, upon receiving a QoS request for a second service from another client 10, obtain second storage space from each of the Q hard disks 22 out of the M hard disks 22 according to the QoS request of the second service, and form a second RAID with the Q second storage spaces as the storage space for the second service to store the data of the second service. Where Q ≥ 2, the second storage space is less than the storage capacity of the hard disk 22, or the second storage space is equal to the storage capacity of the hard disk 22. This process is similar to the process of the processor 21 creating the first RAID described above, and will not be repeated here for the sake of brevity.

[0099] The processor 21 is also configured to, upon receiving a QoS request for a third service from another client 10, obtain third storage space from each of the R hard disks 22 out of the M hard disks 22 according to the QoS request of the third service, and form a third RAID with the R third storage spaces as the storage space for the third service to store the data of the third service. Where R ≥ 2, the third storage space is less than the storage capacity of the hard disk 22, or the third storage space is equal to the storage capacity of the hard disk 22. This process is similar to the process of the processor 21 creating the first RAID described above, and will not be repeated here for the sake of brevity.

[0100] It should be noted that the specific response process of the processor 21 to the QoS requests of the first, second, and third services is related to the sending time and content of these QoS requests. For details, please refer to the description of the second and third RAID in the RAID creation method shown in Figure 3 below; further explanation is not provided here.

[0101] In summary, the data storage system 20 first obtains the QoS request of the service, then creates a RAID array suitable for that QoS request, thereby providing storage services for the service. It can be seen that the data storage system allocates and schedules storage resources according to business needs to meet the access or processing requirements of different data. This not only improves the utilization rate of storage resources in the data storage system, but also enhances the performance, reliability, and efficiency of the data storage system in storing and managing various business data.

[0102] The data storage system provided by the embodiments of this application has been described above with reference to Figures 1 and 2. Next, a RAID creation method provided by an embodiment of this application will be introduced. It should be noted that the application scenarios of the RAID creation method provided by the embodiments of this application are not limited to the data storage systems shown in Figures 1 and 2. All scenarios where the RAID creation method provided by the embodiments of this application can be applied are within the protection scope of this application.

[0103] Referring to Figure 3, Figure 3 is a flowchart illustrating a RAID creation method provided in an embodiment of this application. As shown in Figure 3, the RAID creation method provided in this application includes:

[0104] S101: The first client sends a QoS request for the first service to the data storage system.

[0105] Accordingly, the data storage system receives a QoS request for the first service from the first client.

[0106] The first client can be client 10 in Figure 1 or Figure 2, which is used to send the QoS request for the first service. The data storage system can be data storage system 20 in Figure 1 or Figure 2.

[0107] The QoS request for the first service is used to indicate the quality of service requirements for the storage, access, processing, or transmission of data for the first service in the data storage system. Specifically, the QoS request for the first service may include one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of service input / output (IO), number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements.

[0108] Storage space requirements specify the following: Storage space requirements indicate the first service's need for available storage space in the data storage system. These requirements typically involve storage capacity, storage allocation, and storage partitioning. Storage capacity indicates the amount of storage space to be allocated to the first service to ensure all its data can be stored. Storage allocation strategy indicates the allocation method, such as on-demand allocation or pre-allocation. Storage partitioning requirements indicate the partitioning method for the first service's storage space, including partition size and number. Storage space constraints indicate the limitations on the first service's storage space, such as maximum available space and minimum reserved space. Reliability requirements indicate the stability and reliability of the first service's data during storage, access, processing, or transmission, ensuring that the data can be correctly accessed, used, and recovered when needed. Privacy requirements indicate the privacy and security level of the first service's data during storage, access, processing, or transmission, ensuring that the data is not subject to unauthorized access, tampering, or damage, and preventing data leakage, damage, or loss. Read / write performance requirements indicate the performance requirements for reading and writing data for the primary business, ensuring the data storage system can quickly respond to read and write requests, guaranteeing timely access and processing of the primary business's data. Read / write performance requirements typically involve access speed, response time, and throughput. Average business I / O size indicates the average data size of I / O operations for the primary business. Different businesses have different requirements for I / O operation data size; some businesses may need to handle a large number of small I / O operations, while others may prefer large I / O operations. Specifying the average business I / O size allows for better adjustment of the data storage system's performance and resource allocation. Concurrent I / O quantity indicates the number of simultaneous I / O operations on the primary business's data. Specifying the concurrent I / O quantity controls the data storage system's concurrent processing capability for the primary business, ensuring the system can handle a large number of I / O requests related to the primary business in a timely manner. Storage space utilization indicates the effective utilization of storage space for the primary business. Storage space utilization typically involves the storage efficiency of the primary business's data, data redundancy and backup strategies, and storage resource allocation. Bandwidth requirements indicate the bandwidth limitations for data transmission in the primary business, ensuring that the primary business's data can be transmitted at a specified rate. Latency requirements indicate the maximum latency for data access or processing of the primary service, ensuring that data from the primary service can be responded to within a specified time. Throughput requirements indicate the throughput requirements for data storage or processing of the primary service, ensuring that the data storage system can handle a certain amount of data. Priority requirements indicate the priority of data access or processing of the primary service, ensuring that important data is processed first.

[0109] In practical applications, the specific content of the QoS request for the first service can be determined by the user, and this application does not impose specific restrictions.

[0110] It's understandable that the specific content of QoS requests differs across different services. Some services have high requirements for reliability and privacy, such as banking, financial services, and healthcare. Some services involve high-concurrency I / O and have high requirements for storage space utilization, such as social media services. Some services involve high-concurrency I / O, with large I / O volumes, and typically also have high requirements for read / write performance, bandwidth, latency, and throughput, such as cloud computing services.

[0111] S102: The data storage system, based on the QoS request of the first service, obtains the first storage space of each of the P hard disks from the M hard disks, and combines the P first storage spaces into a first RAID.

[0112] The data storage system includes M hard disks. M ≥ 2, where M is an integer, and the hard disks can be hard disk 22 in the data storage system 20 shown in Figure 2. In some possible implementations, different hard disks can be identified using a hard disk identifier (ID), a hard disk serial number, or a hard disk number. Both the hard disk ID and the hard disk serial number are unique identifiers assigned by the hard disk manufacturer during production. However, the hard disk ID is usually a hardware-level identifier, while the hard disk serial number is one of the serial numbers of the hard disk device. The hard disk serial number is usually included in the hard disk ID, but the hard disk ID may also include other hardware information or identifiers. The hard disk number can be the sequential numbering of the M hard disks in the data storage system, specifically hard disk 1, hard disk 2, ..., hard disk M. For ease of explanation, the hard disk number will be used to identify different hard disks in the following text.

[0113] In some possible implementations, the data storage system, based on the QoS request of the first service, obtains the first storage space of each of the P hard drives from the M hard drives, and the process of assembling the P first storage spaces into a first RAID can be seen in Figure 4. Here, 2 ≤ P < M, or P = M.

[0114] As shown in Figure 4, Figure 4 is a flowchart illustrating a method for creating a first RAID according to an embodiment of this application. The method for creating a first RAID provided in this application includes:

[0115] S1021: The data storage system determines the specific value of P and the size of the first storage space based on the QoS request.

[0116] In some possible implementations, the specific value of P and the size of the first storage space are determined based on the QoS request. Implementation methods 1 and 2 are as follows:

[0117] Implementation Method 1: Determine the specific value of P and the size of the first storage space based solely on the storage space requirements in the QoS request.

[0118] For example, the storage space requirement is 10 terabytes (TB). If M = 20, and each hard drive has a storage capacity of 5TB, then feasible solutions include at least the following four:

[0119] Option 1: P is 2, and the size of the first storage space is 5TB;

[0120] Option 2: P is 4, and the size of the first storage space is 2.5TB;

[0121] Option 3: P is 5, and the size of the first storage space is 2TB;

[0122] Option 4: P is 10, and the size of the first storage space is 1TB.

[0123] From the above four options, we can see that either the first storage space is equal to the storage capacity of the hard disk, or the first storage space is less than the storage capacity of the hard disk.

[0124] Implementation Method 2: First, based on the reliability requirements, read / write performance requirements, storage space utilization, and other requirements in the QoS request, select hard drives that meet the requirements from M hard drives. Then, based on the storage space requirements, determine the specific value of P and the size of the first storage space from the hard drives that meet the requirements.

[0125] If high reliability is required, then hard drives that meet the requirements are considered highly reliable, characterized by long lifespan and low failure rate. In a specific implementation, hard drives with a mean time between failures (MTBF) ≥ F1 can be marked as highly reliable, while those with an MTBF < F1 can be marked as less reliable. MTBF refers to the average time a hard drive operates correctly between two consecutive failure intervals. The MTBF of a hard drive is provided by the hard drive manufacturer. The specific value of F1 is determined by the user.

[0126] If high read / write performance is required, then the hard drive that meets the requirements is considered to have good read / write performance, specifically characterized by fast read / write speeds and short response times. In a specific implementation, hard drives with input / output operations per second (IOPS) ≥ F2 can be marked as having good read / write performance; hard drives with IOPS < F2 can be marked as having poor read / write performance.

[0127] If high storage space utilization is required, then hard drives that meet the requirements are considered to have high storage space utilization, specifically characterized by large storage capacity and strong data management capabilities. In a specific implementation, hard drives that meet the following criteria can be marked as having high storage space utilization: storage capacity ≥ F3, data transfer rate ≥ F4, cache ≥ F5, and seek time ≥ F6; otherwise, they are marked as having low storage space utilization.

[0128] It should be understood that the above only illustrates the correspondence between reliability requirements, read / write performance requirements, storage space utilization, and certain hard drive performance metrics. In practical applications, each requirement in a QoS request corresponds to a specific hard drive performance metric, with different requirements corresponding to different hard drive performance metrics, which will not be listed here.

[0129] After receiving a QoS request, the data storage system can search for disks from a pool of M disks that meet the different requirements of the QoS request, based on the correspondence between each requirement and the disk's performance metrics. For example, if the QoS request only requires high reliability, then disks with an MTBF ≥ F1 from the M disks are selected as meeting the requirement. If the QoS request requires both high reliability and high read / write performance, then disks with an MTBF ≥ F1 and IOPS ≥ F2 from the M disks are selected as meeting the requirement.

[0130] After identifying a hard drive that meets the requirements, the data storage system determines the specific value of P and the size of the first storage space from the hard drives that meet the requirements, based on the storage space requirements.

[0131] Let's continue with the example of a storage space requirement of 10TB, M=20, and a storage capacity of 5TB per hard drive.

[0132] Assuming the QoS request requires high reliability and high read / write performance, and there are 8 hard drives out of 20 that have an MTBF ≥ F1 and IOPS ≥ F2, meaning the number of hard drives meeting the requirements is 8, specifically hard drive 1, hard drive 2, hard drive 3, ..., hard drive 8. Therefore, feasible solutions include at least the following three:

[0133] Option 1: P is 2, and the size of the first storage space is 5TB;

[0134] Option 2: P is 4, and the size of the first storage space is 2.5TB;

[0135] Option 3: P is 5, and the size of the first storage space is 2TB.

[0136] Solution 4 in implementation method 1 of step S102 above is an infeasible solution in implementation method 2.

[0137] From the above three schemes, we can see that: the first storage space is equal to the storage capacity of the hard disk, or the first storage space is less than the storage capacity of the hard disk.

[0138] It should be understood that the specific value of P and the implementation methods 1 and 2 of the size of the first storage space in step 1 above are merely examples and are not specifically limited here. In practical applications, any implementation method that can determine the specific value of P and the size of the first storage space based on the QoS request is within the protection scope of this application.

[0139] S1022: The data storage system determines P hard disks from M hard disks based on the specific value of P.

[0140] The execution process of step 2 is related to the implementation method of step 1 above.

[0141] Corresponding to implementation method 1 of step 1, the execution process of step 2 is as follows: Randomly select P hard drives from the M hard drives. Taking scheme 2 in implementation method 1 as an example, when P is 4, arbitrarily select 4 hard drives: Hard drives 1, 2, 3, and 4 can be selected; Hard drives 1, 3, 5, and 7 can be selected; Hard drives M-3, M-2, M-1, and M can also be selected; no specific limitation is made here. It can be understood that when P is other values, the selection process of P hard drives is similar to that when P is 4; for the sake of brevity, it will not be elaborated here.

[0142] Corresponding to implementation method 2 of step 1, the execution process of step 2 is as follows: Randomly select P hard drives from the hard drives that meet the requirements. Continuing with the example of hard drives 1 through 8 meeting the requirements, and using scheme 2 in implementation method 2 as an example, when P is 4, arbitrarily select 4 hard drives from hard drives 1 through 8: either hard drives 1 through 4 can be selected; or hard drives 1, 3, 5, and 7 can be selected; no specific limitation is made here. It can be understood that when P is other values, the selection process of P hard drives is similar to the selection process when P is 4, and for the sake of brevity, it will not be elaborated here.

[0143] S1023: The data storage system determines the address used to indicate the first storage space in each of the P hard disks, establishes the correspondence between the address and the first RAID, and thus combines the P first storage spaces into the first RAID.

[0144] Since the processes for determining the address used to indicate the first storage space in each of the P hard drives and establishing the correspondence between the address and the first RAID are similar, for the sake of brevity, the following section focuses on the process of determining the address used to indicate the first storage space in the first hard drive and establishing the correspondence between the address and the first RAID. Here, the first hard drive is any one of the P hard drives. The processes for determining the addresses used to indicate the first storage space in the other P hard drives and establishing the correspondence between the addresses in the other hard drives and the first RAID will not be described in detail later.

[0145] In some possible implementations, the data storage system uses logical unit numbers (LUNs) to address physical blocks on the hard disk. The specific implementation mainly includes the following configuration and application phases:

[0146] Configuration Phase: A LUN is created using physical blocks from multiple hard drives. Specifically, physical blocks on multiple hard drives are mapped into multiple logical blocks, logical block addresses (LBAs) are assigned to all logical blocks, and a mapping relationship is established between LBAs and physical block addresses (PBAs). When the mapping between physical and logical blocks is one-to-one, one PBA corresponds to one LBA; when it's one-to-many, one PBA corresponds to multiple LBAs; and when it's many-to-one, multiple PBAs correspond to one LBA. The mapping relationship between physical and logical blocks is determined by the user. For ease of explanation, the following descriptions of LBAs will consistently use the example of a one-to-one correspondence between LBAs and PBAs.

[0147] Application phase: LBAs are used to indicate the physical blocks that make up the LUN. Specifically, the PBA corresponding to a given LBA is determined by looking up the correspondence between LBAs and PBAs.

[0148] In a data storage system based on LUN storage, determining the address in the first hard disk used to indicate the first storage space includes: determining the number of addresses based on the size of the first storage space and the capacity of physical blocks in the first hard disk, and then selecting a sufficient number of addresses in an unmarked state from the first hard disk as the addresses used to indicate the first storage space. Here, an unmarked address refers to an address not bound to any RAID. An address in a marked state refers to an address bound to any RAID.

[0149] Continuing with Scheme 2 in Implementation Method 1 of Step 1 as an example, the size of the first storage space is 2.5TB. Assuming the physical block capacity in the first hard disk is 0.1TB, since there is a one-to-one correspondence between LBA and PBA throughout the text, the number of LBAs is 2.5TB ÷ 0.1TB = 25. Therefore, 25 unmarked LBAs are selected from the first hard disk, and the storage spaces indicated by these 25 LBAs together constitute the first storage space of the first hard disk. These 25 LBAs are the addresses used to indicate the first storage space in the first hard disk.

[0150] In some possible implementations, selecting a sufficient number of unmarked addresses from the first hard disk can be either selecting multiple discrete addresses from the first hard disk or selecting multiple consecutive addresses from the first hard disk, i.e., selecting a consecutive address segment from the first hard disk.

[0151] Continuing with the example above, we know that the first hard disk has a storage capacity of 5TB, and the capacity of each physical block on the first hard disk is 0.1TB, meaning the first hard disk has 50 physical blocks. If a LUN is created using all the physical blocks on the first hard disk, then all physical blocks on the first hard disk will have an LBA. Since there is a one-to-one correspondence between LBA and PBA, and the first hard disk has 50 LBAs, assuming the address range on the first hard disk is LBA0-LBA 49, and these LBAs are all in an unmarked state, then we can either select 25 discrete LBAs from LBA 0-LBA 49, such as LBA 0, LBA 2, LBA 4, LBA 6, ..., and LBA 48; or we can select 25 consecutive LBAs from LBA0-LBA 49, such as the consecutive address range LBA 1-LBA 25.

[0152] After determining the address in the first hard disk used to indicate the first storage space, a correspondence is established between these addresses and the first RAID, so that these addresses are switched from an unmarked state to a marked state.

[0153] In one specific implementation, for each address used to indicate the first storage space, the first hard disk stores the correspondence between that address and the first RAID, allowing the address to switch from an unmarked state to a marked state. In another specific implementation, a table is used to record the correspondence between addresses and RAIDs. The first hard disk determines the address's state (including marked and unmarked states) by looking up the table. If a correspondence between an address and a RAID is found in the table, it indicates that the address is in a marked state; if no correspondence is found, it indicates that the address is in an unmarked state. Continuing with the example of LBA 1-LBA 25 used to indicate the first storage space in the first hard disk, the first hard disk binds LBA 1, LBA 2, LBA 3, ..., and LBA 25 to the first RAID.

[0154] In another specific implementation, if the first storage space is indicated by a continuous address range of the first hard disk, the first hard disk may only store the correspondence between the start and end addresses of the continuous address range and the first RAID. Continuing with the example of LBA 1-LBA25 used to indicate the first storage space in the first hard disk, the first hard disk only binds LBA1 and LBA25 to the first RAID, without needing to bind LBA2-LBA24 to the first RAID.

[0155] Compared to the RAID 2.0 scheme, where all hard drives in the control layer store the correspondence between blocks and RAID, resulting in high storage overhead and difficulty in updating the correspondence, this technical solution uses a continuous address segment of the first hard drive to provide the storage space required by the first RAID. This not only allows the first hard drive to access the data of the first service in LBA order, reducing the seek time and rotational latency of the first hard drive, optimizing the access performance of the first hard drive, and improving the access speed of the first hard drive to the data of the first service; it also allows the first hard drive to identify the correspondence between all addresses included in the continuous address segment and the RAID by storing only the start and end addresses of the continuous address segment and the first RAID, thus reducing storage overhead and simplifying the difficulty of updating the correspondence.

[0156] It should be noted that the mapping between all hard drive addresses and RAID configurations can also be stored uniformly in the processor. In practical applications, this application does not specifically limit the storage location of the mapping between hard drive addresses and RAID configurations.

[0157] It should be understood that the above-described use of LBA to represent an address is merely an example. In practical applications, other identifiers can also be used to represent addresses, and this application does not impose any specific limitations. It is understood that when other identifiers are used to represent addresses, the process of determining the address on the hard disk used to indicate the first storage space is similar to the process described above of determining the LBA on the hard disk used to indicate the first storage space in a data storage system based on LUN storage. For the sake of brevity, this will not be elaborated upon here.

[0158] After determining the address used to indicate the first storage space in each of the P hard disks and establishing the correspondence between the address and the first RAID, the first storage spaces provided by the P hard disks (i.e., the P first storage spaces) are combined to form the first RAID.

[0159] S1024: The data storage system determines the RAID configuration information of the first RAID based on the QoS request.

[0160] The RAID configuration information of the first RAID indicates how the data for the first service is stored in the first RAID. Specifically, the RAID configuration information of the first RAID includes one or more of the following: RAID algorithm, stripe width, stripe unit size, and stripe arrangement.

[0161] The RAID algorithm is used to indicate the data storage and redundancy strategy for the primary service. RAID algorithms include RAID1, RAID5, RAID6, RAID50, and RAID60, etc. Different RAID algorithms differ in disk utilization, reliability, read / write performance, and redundancy calculation requirements, thus providing different data protection and performance characteristics. The stripe width indicates the distribution of the primary service's data on the first RAID, i.e., the number of stripes into which the primary service's data is divided across P hard drives. A stripe unit indicates the data block or parity block within a stripe. A data block is a physical block used to store data, and a parity block is a physical block used to store parity data. The parity data in a stripe is used to verify the data in that stripe to ensure the reliability of the data within that stripe. The stripe width typically refers to the total number of data blocks and parity blocks contained in a stripe, i.e., the number of stripe units in a stripe. The stripe unit size is the same as the data block size within the stripe. The stripe arrangement indicates how the primary service's data is stored in the first RAID, including the distribution between stripes and the storage location of the parity blocks within the stripes.

[0162] In practical applications, the content included in the RAID configuration information (such as whether it includes stripe width and whether it includes stripe arrangement) can be determined by the user, and this application does not impose specific limitations.

[0163] In some possible implementations, the data storage system determines the RAID configuration information of the first RAID based on the QoS request of the first service. The following three examples illustrate how the specific content of the QoS request of the first service affects the specific content of the RAID configuration information of the first RAID.

[0164] Example 1: If the QoS request of the first service has high reliability requirements, then the RAID algorithm in the RAID configuration information of the first RAID will be configured as RAID1 or RAID5.

[0165] The second example: If the QoS request of the first service has high requirements for storage space utilization and a large number of concurrent IOs, then in the RAID configuration information of the first RAID, configure a larger value for the stripe width and a larger value for the ratio of the number of data blocks to parity blocks in a stripe in the stripe arrangement.

[0166] The third example: The QoS request of the first service has high read and write performance requirements (i.e., high IOPS), and the IO instructions are mostly random IO, and the IO instructions usually involve a small amount of data. Therefore, in the RAID configuration information of the first RAID, a smaller value is configured for the stripe unit size, and a larger value is configured for the ratio of the number of data blocks to parity blocks in a stripe in the stripe arrangement.

[0167] It should be understood that the above three examples are merely illustrative of the correspondence between the specific content of a QoS request and the specific content of RAID configuration information. In practical applications, the content included in a QoS request (such as whether it includes privacy requirements or bandwidth requirements) and the content included in RAID configuration information can be set as needed according to the actual application scenario. Therefore, the correspondence between the specific content of a QoS request and the specific content of RAID configuration information also needs to be determined by the user according to the actual application scenario, and this application does not impose any specific limitations.

[0168] In some possible implementations, the data storage system can first determine the stripe width, and then determine the stripe arrangement based on the stripe width. The correspondence between stripe width and stripe arrangement can be seen in scenarios 11 and 12 below:

[0169] Scenario 11: K≤0.5P

[0170] When K = 0.5P, the first RAID consists of a first subgroup and a second subgroup. Both the first and second subgroups contain K hard drives, but the hard drives in the first and second subgroups are different. The data blocks and parity blocks for the stripes in the first subgroup are provided by the hard drives in the first subgroup, and the data blocks and parity blocks for the stripes in the second subgroup are provided by the hard drives in the second subgroup. For example, if the first subgroup includes the first stripe, then the data blocks and parity blocks for the first stripe are provided by the hard drives in the first subgroup.

[0171] The following example, shown in Figure 5A, illustrates this point.

[0172] Referring to Figure 5A, which is a schematic diagram of a stripe arrangement provided in an embodiment of this application. As shown in Figure 5A, the first RAID includes 10 hard drives. The five hard drives on the left (including SSD 0-SSD 4) are the hard drives in the first subgroup, and the five hard drives on the right (including SSD 5-SSD 9) are the hard drives in the second subgroup.

[0173] Taking RAID 5 as the first RAID configuration example, both the first and second subgroups are based on RAID 5 for data storage. Therefore, the ratio of data blocks to parity blocks in each stripe is 4:1. Furthermore, the data blocks and parity blocks in each stripe of the first subgroup are provided by all hard drives in the first subgroup, and the data blocks and parity blocks in each stripe of the second subgroup are provided by all hard drives in the second subgroup. Details are as follows:

[0174] The strips in the first subgroup include strip S11, strip S12, strip S13, strip S14, etc. In stripe S11, data blocks A11, A12, A13, A14, and parity block PA1 are provided by SSD 0, SSD 1, SSD 2, SSD 3, and SSD 4, respectively; in stripe S12, data blocks B11, B12, B13, B14, and parity block PB1 are provided by SSD 0, SSD 1, SSD 2, SSD 4, and SSD 3, respectively; in stripe S13, data blocks C11, C12, C13, C14, and parity block PC1 are provided by SSD 0, SSD 1, SSD 3, SSD 4, and SSD 2, respectively; and in stripe S14, data blocks D11, D12, D13, D14, and parity block PD1 are provided by SSD 0, SSD 2, SSD 3, SSD 4, and SSD 4, respectively. 1. Provided. It should be understood that when the first subgroup includes more strips, the arrangement of other strips can refer to the arrangement of strips S11, S12, S13 or S14. For the sake of brevity, it will not be described in detail here.

[0175] The strips in the second subgroup include strip S21, strip S22, strip S23, strip S24, etc. In stripe S21, data blocks A21, A22, A23, A24, and parity block PA2 are provided by SSD 5, SSD 6, SSD 7, SSD 8, and SSD 9, respectively; in stripe S22, data blocks B21, B22, B23, B24, and parity block PB2 are provided by SSD 5, SSD 6, SSD 7, SSD 9, and SSD 8, respectively; in stripe S23, data blocks C21, C22, C23, C24, and parity block PC2 are provided by SSD 5, SSD 6, SSD 8, SSD 9, and SSD 7, respectively; and in stripe S24, data blocks D21, D22, D23, D24, and parity block PD2 are provided by SSD 5, SSD 7, SSD 8, SSD 9, and SSD 9, respectively. 6. Provided. It should be understood that when the second subgroup includes more strips, the arrangement of the other strips can refer to the arrangement of strips S21, S22, S23 or S24. For the sake of brevity, it will not be described in detail here.

[0176] It should be understood that the arrangement of stripes in the first and second subgroups in Figure 5A above is merely an example and is not specifically limited in this application.

[0177] When K < 0.5P, the first RAID includes multiple subgroups, including a first subgroup and a second subgroup. Each subgroup includes at least K hard drives. The hard drives included in each subgroup are different, and the data blocks and parity blocks of each stripe within a subgroup are provided by the hard drives in that subgroup. For example, if the first subgroup includes the first stripe, then the data blocks and parity blocks of the first stripe are provided by the hard drives in the first subgroup.

[0178] In some possible implementations, each subgroup includes at least K hard drives. Specifically: if P is a multiple of K, then each subgroup contains K hard drives. For example, if P = 10 and K = 2, the first RAID includes five subgroups, each containing 2 hard drives. If P is not a multiple of K, then at least one subgroup contains more than K hard drives. Specifically, one subgroup may contain more than K hard drives, while the other subgroups contain only K hard drives. For example, if P = 10 and K = 4, the first RAID includes two subgroups, one containing 6 hard drives and the other containing 4 hard drives. Alternatively, as many subgroups as possible may contain more than K hard drives. For example, if P = 10 and K = 4, the first RAID includes two subgroups, each containing 5 hard drives.

[0179] For a subgroup with K hard drives, the data blocks and parity blocks in each stripe of the subgroup are provided by all the hard drives in the subgroup. The stripe arrangement in this subgroup can be referred to the stripe arrangement in the first subgroup or the stripe arrangement in the second subgroup when K=0.5P, as described above, and will not be repeated here.

[0180] For subgroups with more than K hard drives, since the stripe width is less than the number of hard drives in the subgroup, the data blocks and parity blocks in each stripe of the subgroup are provided only by a portion of the hard drives in the subgroup. Taking the first subgroup as an example, each stripe in the first subgroup includes the 1st stripe unit, the 2nd stripe unit, ..., the Kth stripe unit. For ease of explanation, assume that the first subgroup includes (K+H) hard drives (H is a positive integer, H<K), and these hard drives are respectively called hard drive (1), hard drive (2), ..., hard drive (K), hard drive (K+1), hard drive (K+2), ..., hard drive (K+H). For the first subgroup, which includes multiple stripes including the first and second stripes, the first stripe unit, the second stripe unit, ..., the Kth stripe unit in the first stripe are provided by hard disk (1), hard disk (2), ..., hard disk (K), respectively. The first stripe unit, the second stripe unit, ..., the Hth stripe unit in the second stripe are provided by hard disk (K+1), hard disk (K+2), ..., hard disk (K+H), respectively. The first and second stripes are different stripes. The H+1th stripe unit, the H+2th stripe unit, ..., the Kth stripe unit in the second stripe are provided by hard disk (1), hard disk (2), ..., hard disk (KH), respectively. Furthermore, when the first subgroup includes a third stripe, the first stripe unit, the second stripe unit, ..., the Kth stripe unit in the third stripe are provided by hard disk (K-H+1), hard disk (K-H+2), ..., hard disk (K-H+K), respectively. This process continues until all stripes of the first subgroup have been arranged.

[0181] Referring to Figure 5B, the following explanation uses an example where P=10, K=4, and the first RAID consists of two subgroups: the first subgroup contains 6 hard drives, and the second subgroup contains 4 hard drives. The first subgroup is an example of a subgroup with more than K hard drives, and the second subgroup is an example of a subgroup with K hard drives.

[0182] Referring to Figure 5B, which is a schematic diagram of another stripe arrangement provided in an embodiment of this application. As shown in Figure 5B, the first RAID includes 10 hard drives. The six hard drives on the left (including SSD 0-SSD 5) are the hard drives in the first subgroup, and the four hard drives on the right (including SSD 6-SSD 9) are the hard drives in the second subgroup.

[0183] Continuing with the example configuration of RAID 5 as the first RAID algorithm, if both the first and second subgroups are based on RAID 5 for data storage, then the ratio of data blocks to parity blocks in each stripe is 3:1. The stripe arrangements in the first and second subgroups are as follows:

[0184] The strips in the first subgroup include strips S31, S32, S33, S34, S35, and S36. In stripe S31, data blocks A31, A32, A33, and parity block PA3 are provided by SSD 0, SSD 1, SSD 2, and SSD 3, respectively; in stripe S32, data blocks B31, B32, B33, and parity block PB3 are provided by SSD 4, SSD 5, SSD 0, and SSD 1, respectively; in stripe S33, data blocks C31, C32, C33, and parity block PC3 are provided by SSD 2, SSD 3, SSD 4, and SSD 5, respectively; in stripe S34, data blocks D31, D32, D33, and parity block PD3 are provided by SSD 0, SSD 1, SSD 2, and SSD 3, respectively; and in stripe S35, data blocks E31, E32, E33, and parity block PE3 are provided by SSD 4, SSD 5, SSD 6, and SSD 7, respectively. 5. SSD 0 and SSD 1 provide the data blocks F31, F32, F33, and PF3 in stripe S36, which are provided by SSD 2, SSD 3, SSD 4, and SSD 5, respectively. It should be understood that when the first subgroup includes more stripes, the arrangement of other stripes can refer to the arrangement of stripes S31, S32, or S33. For the sake of brevity, this will not be elaborated here.

[0185] The stripes in the second subgroup include stripe S41, stripe S42, stripe S43, and stripe S44. In stripe S41, data blocks A41, A42, A43, and parity block PA4 are provided by SSD 6, SSD 7, SSD 8, and SSD 9, respectively; in stripe S42, data blocks B41, B42, B43, and parity block PB4 are provided by SSD 6, SSD 7, SSD 9, and SSD 8, respectively; in stripe S43, data blocks C41, C42, C43, and parity block PC4 are provided by SSD 6, SSD 8, SSD 9, and SSD 7, respectively; and in stripe S44, data blocks D41, D42, D43, D44, and parity block PD4 are provided by SSD 7, SSD 8, SSD 9, and SSD 6, respectively. It should be understood that when the second subgroup includes more strips, the arrangement of the other strips can refer to the arrangement of strips S41, S42, S43 or S44. For the sake of brevity, this will not be elaborated here.

[0186] It should be understood that the arrangement of stripes in the first and second subgroups in Figure 5B above is merely an example and is not specifically limited in this application.

[0187] In Scenario 11, if the first subgroup includes a first hard drive, and the first hard drive stores the first data from the first stripe, and the first hard drive fails, causing the first data to be corrupted, the data storage system will be unable to directly retrieve the first data. In this case, the data storage system recovers the first data as follows: the data storage system retrieves the data blocks and check blocks from the first stripe, performs calculations on the data blocks and check blocks to obtain the first data, and stores the first data on the second hard drive. The first stripe is arranged within the first subgroup and is the stripe to which the first data belongs. The check blocks in the first stripe are used to store check data for the first data. The first hard drive and the second hard drive are different.

[0188] Specifically, the data storage system reads data from other data blocks in the first stripe, excluding the data block used to store the first data, and reads check data from the check block in the first stripe by sending IO instructions. Then, it calculates the read check data and data using an erasure coding (EC) decoding algorithm to obtain the first data, and then writes the first data to the second hard disk.

[0189] The following example, using the first subgroup in Figure 5B as the first subgroup, stripe S31 as the first stripe, and SSD 0 as the first hard disk, will be used to describe in detail the process of restoring the first data in the data storage system. In the example, the first data is data block A31 in SSD 0.

[0190] In the event of an SSD failure, data block A31 is corrupted, meaning the first data is corrupted. The process of the data storage system recovering data block A31 is as follows: The data storage system obtains data blocks A32, A33, and parity block PA3 from stripe S31. It then uses data blocks A32, A33, and PA3 to calculate data block A31 using the EC decoding algorithm, thereby achieving the recovery of data block A31.

[0191] It should be understood that when a hard drive in another subgroup of the first RAID (such as the second subgroup) fails, the process by which the data storage system recovers the data in the stripes of the other subgroups is similar to the process by which the data storage system recovers the first data in the first stripe of the first subgroup. For the sake of brevity, this will not be elaborated here.

[0192] As can be seen, dividing the first RAID into multiple subgroups and arranging stripes only within the subgroups allows for data reconstruction using only other data within the same subgroup in the event of data corruption, without needing to use data from other subgroups. This is because data in the same stripe is only distributed within the same subgroup and does not spread across subgroups. Therefore, data reconstruction only requires reading operations from the hard drives in one subgroup, thus reducing the overhead of data reconstruction.

[0193] Scenario 12: 0.5P < K < P

[0194] When 0.5P < K < P, since the stripe width is less than the number of hard drives included in the first RAID, the stripe arrangement in the first RAID can refer to the stripe arrangement in the subgroup with more than K when K < 0.5P. For example, see the stripe arrangement in the first subgroup in Figure 5B. For the sake of brevity, it will not be described again here.

[0195] To leverage the performance advantages of RAID and improve data read / write speeds and fault tolerance, existing solutions directly set the stripe width to equal the number of hard drives in the RAID array. However, in this technical solution, since the RAID configuration information is determined based on the QoS requests of the service, it is inevitable that the stripe width will be less than the number of hard drives in the RAID array. Therefore, this technical solution provides a stripe arrangement method for scenarios where the stripe width is less than the number of hard drives in the RAID array, as described in the relevant sections of scenarios 11 and 12 above.

[0196] S103: The data storage system receives data from the first service from the first client and stores the data of the first service in the first RAID.

[0197] After determining the first RAID and its configuration information, the data storage system can send a creation success message to the first client, notifying the user to use the first RAID. Upon receiving the creation success message, the user sends the data for the first service to the data storage system through the first client. The data storage system receives the data for the first service from the first client and stores it in the first RAID according to its RAID configuration information. The process of the data storage system storing the data for the first service according to the RAID configuration information can be compared to configuring a RAID for a single user's data storage system and then using that system to store the user's service data; for the sake of brevity, this will not be elaborated upon here.

[0198] S104: The second client sends a QoS request for the second service to the data storage system.

[0199] Accordingly, the data storage system receives a QoS request for the second service from the second client.

[0200] The second client can be client 10 in Figure 1 or Figure 2, which is used to send the QoS request for the second service. The second client and the first client can be the same client or different clients.

[0201] The QoS request for the second service is used to indicate the quality of service requirements for the storage, access, processing, or transmission of data for the second service in the data storage system. Specifically, the QoS request for the second service may include one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of service input / output (IO), number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements.

[0202] S105: The data storage system, based on the QoS request of the second service, obtains the second storage space of each of the Q hard drives from the M hard drives, and combines the Q second storage spaces into a second RAID.

[0203] Where 2 ≤ Q < M, or Q = M.

[0204] In some possible implementations, the process of the data storage system obtaining the second storage space of each of the Q hard drives from M hard drives according to the QoS request of the second service, and assembling the Q second storage spaces into a second RAID, includes: the data storage system determining the specific value of Q and the size of the second storage space according to the QoS request of the second service; determining the Q hard drives from the M hard drives according to the specific value of Q; determining the address used to indicate the second storage space on each of the Q hard drives, establishing a correspondence between the address and the second RAID, thereby assembling the Q second storage spaces into a second RAID; and finally determining the RAID configuration information of the second RAID according to the QoS request of the second service. Here, the second storage space is less than the storage capacity of the hard drives, or the second storage space is equal to the storage capacity of the hard drives. The second RAID is used to store the data of the second service. The RAID configuration information of the second RAID is used to indicate how the data of the second service is stored in the second RAID.

[0205] The process of determining the specific value of Q and the size of the second storage space based on the QoS request of the second service can refer to the process in step S1021 where the data storage system determines the specific value of P and the size of the first storage space based on the QoS request; the process of determining Q hard disks from M hard disks based on the specific value of Q can refer to the process in step S1022 where the data storage system determines P hard disks from M hard disks based on the specific value of P; the process of determining the address used to indicate the second storage space in each of the Q hard disks, establishing the correspondence between the address and the second RAID, and thus forming the second RAID from the Q second storage spaces can refer to the process in step S1023 where the data storage system determines the address used to indicate the first storage space in each of the P hard disks, establishes the correspondence between the address and the first RAID, and thus forming the first RAID from the P first storage spaces; the process of determining the RAID configuration information of the second RAID based on the QoS request of the second service can refer to the process in step S1024 where the data storage system determines the RAID configuration information of the first RAID based on the QoS request; for the sake of brevity, these details will not be elaborated here.

[0206] It should be understood that the RAID configuration information of the first RAID is determined based on the QoS request of the first service, and the RAID configuration information of the second RAID is determined based on the QoS request of the second service. Since the specific content of the QoS requests of different services is usually different, the RAID configuration information of the first RAID and the RAID configuration information of the second RAID are usually different.

[0207] S106: The data storage system receives data from the second service from the second client and stores the data of the second service in the second RAID.

[0208] After determining the second RAID and its configuration information, the data storage system can send a creation success message to the second client, notifying the user to use the second RAID. Upon receiving the creation success message, the user sends the data for the second service to the data storage system through the second client. The data storage system receives the data for the second service from the second client and stores the data for the second service in the second RAID according to the RAID configuration information.

[0209] It should be understood that this technical solution can either execute steps S101 to S102 first, followed by steps S104 to S105; or execute steps S104 to S105 first, followed by steps S101 to S102; or execute steps S101 and S104 first, followed by steps S102 and S105. In short, in this application, the creation processes of the first RAID and the second RAID have no specific order; the creation processes of the first RAID and the second RAID are independent of each other and do not affect each other.

[0210] After completing steps S102 and S105, both the first RAID and the second RAID exist simultaneously in the data storage system. The hard drives included in the first RAID and the second RAID primarily fall into the following three categories:

[0211] Scenario 1: The first RAID and the second RAID contain the exact same hard drives.

[0212] Scenario 2: The first RAID and the second RAID include completely different hard drives.

[0213] Scenario 3: The first RAID and the second RAID do not include the same hard drives.

[0214] In case 1, P = Q, and the P hard drives in the first RAID are exactly the same as the Q hard drives in the second RAID.

[0215] Taking the example of step S1022 above, where P is 4, we can illustrate how the P hard drives are specifically defined as hard drives 1 through 4. When the P hard drives are specifically defined as hard drives 1 through 4, the Q hard drives included in the second RAID are also hard drives 1 through 4, indicating that the hard drives included in the first RAID and the second RAID are exactly the same.

[0216] In scenario 2, P and Q are unrelated; the P hard drives in the first RAID are completely different from the Q hard drives in the second RAID.

[0217] Let's continue with the example of P hard drives, specifically drives 1 through 4. When the P hard drives are specifically drives 1 through 4, and the Q hard drives do not include drives 1, 2, 3, and 4, it indicates that the hard drives included in the first RAID and the second RAID are completely different.

[0218] When the hard drives included in the first RAID and the second RAID do not belong to either case 1 or case 2, it indicates that the hard drives included in the first RAID and the second RAID are not completely the same, that is, it belongs to case 3.

[0219] Specifically, the first RAID includes a portion of the same hard drives as the second RAID, while the other portion differs. In a data storage system with M hard drives, including a first hard drive, a second hard drive, and a third hard drive, where the first, second, and third hard drives are different hard drives, the first RAID includes the first and second hard drives but excludes the third hard drive; the second RAID includes the first and third hard drives but excludes the second hard drive. Therefore, it indicates that the hard drives included in the first RAID and the second RAID are not entirely identical. The first hard drive can be the first hard drive described in steps S1023 and S1024 above, and the second hard drive can be the second hard drive described in step S1024 above.

[0220] Let's continue with the example of P hard drives, specifically drives 1 through 4. Assume the first hard drive is drive 1, the second is drive 2, and the third is drive 7. When the P hard drives are specifically drives 1 through 4, the P hard drives include drives 1 and 2, but not drive 3. However, when the Q hard drives are specifically drives 1, 3, 5, and 7, the Q hard drives include drives 1 and 3, but not drive 2. This indicates that the first RAID and the second RAID do not include the same number of hard drives.

[0221] In some potential application scenarios, when a user needs to terminate the first service, the user sends a termination request to the data storage system through a first client. Correspondingly, the data storage system receives the termination request from the first client. This termination request instructs the data storage system to terminate its storage service for the data from the first service.

[0222] Next, the data storage system releases the P first storage spaces used to form the first RAID according to the termination request of the first service. Specifically, the data storage system instructs each of the P hard disks to clear the data of the first service from its respective first storage space and delete the correspondence between the address used to indicate the first storage space and the first RAID, so that these addresses switch from a marked state to an unmarked state. In a specific implementation, corresponding to the scenario in step S1023 above where the first storage space is indicated by a continuous address segment of a hard disk, the data storage system instructs each of the P hard disks to delete the correspondence between the start address and end address of its continuous address segment and the first RAID, so that all addresses included in the continuous address segment switch from a marked state to an unmarked state. When the P hard disks include the first hard disk, the data storage system specifically instructs the first hard disk to delete the correspondence between the start address and end address of its continuous address segment and the first RAID.

[0223] In some potential application scenarios, after releasing P first storage spaces, the data storage system receives a QoS request for a third service from a third client. Based on the QoS request, the data storage system retrieves third storage space from each of the R hard drives out of the M hard drives, forming a third RAID. Specifically, the data storage system determines the specific value of R and the size of the third storage space based on the QoS request; it then determines R hard drives from the M hard drives based on the specific value of R; it determines the address on each of the R hard drives used to indicate the third storage space, establishing a correspondence between the address and the third RAID, thus forming the third RAID; finally, it determines the RAID configuration information of the third RAID based on the QoS request. The third storage space is either less than or equal to the storage capacity of the hard drives. The third RAID is used to store the data for the third service. The RAID configuration information of the third RAID indicates the method of storing the data for the third service within the third RAID. The specific process of creating the third RAID can be referred to in step S102 above, where the data storage system obtains the first storage space of each of the P hard drives from the M hard drives according to the QoS request of the first service, and combines the P first storage spaces into the first RAID. For the sake of brevity, it will not be described in detail here. The third client can be client 10 in Figure 1 or Figure 2, which is used to send the QoS request of the third service. The third client and the first client can be the same client or different clients. The third client and the second client can be the same client or different clients.

[0224] In some possible implementations, since P first storage spaces have been freed before the third RAID is created, these P first storage spaces can be used during the creation of the third RAID, allowing the third RAID to include part or all of the P first storage spaces. Specifically, when determining R hard drives, the first hard drive is selected, and then one or more addresses originally used to indicate the first storage spaces on the first hard drive are selected. A correspondence between these addresses and the third RAID is established, so that part or all of the first storage spaces on the first hard drive are used to form the third RAID.

[0225] In summary, after the first service runs out, the storage space originally provided to the first service (i.e., the first RAID) can be reclaimed and then provided to the new service (i.e., the third service), thus realizing the on-demand allocation and scheduling of storage resources.

[0226] In some possible implementations, if a second RAID exists in the data storage system, the data storage system migrates the data for the second service. Migration scenarios include passive migration and active migration. Passive migration can be referenced in scenario 21 below, and active migration can be referenced in scenario 22 below.

[0227] Scenario 21: Passive Migration

[0228] During the creation of a RAID in a data storage system, if the storage space required by the RAID needs to be occupied by an existing RAID, the data storage system determines whether the existing RAID contains business data. If it does, the data storage system migrates the business data to a designated location to ensure the successful creation of the new RAID without affecting the normal operation of existing services.

[0229] The following example uses the third RAID as the new RAID and the second RAID as the existing RAID to illustrate the passive migration process.

[0230] During the creation of the third RAID in the data storage system, if the R third storage spaces include part or all of the Q second storage spaces, the data storage system determines whether the second RAID stores data for the second service. If the second RAID stores data for the second service, the data storage system migrates all data for the second service to the designated location to ensure successful creation of the third RAID without affecting the normal operation of the second service. If the second RAID does not store data for the second service, the data storage system does not need to trigger migration and can directly create the third RAID.

[0231] Scenario 22: Active Migration

[0232] During the continuous operation of a data storage system, RAID arrays are constantly added. The storage space of a single hard drive is continuously divided into different storage spaces, which are used to form different RAID arrays to store data for different services. Therefore, the performance of the hard drive dynamically changes according to the changes in the service data it stores. When the data storage system detects that the performance of a hard drive cannot meet the QoS requirements of a certain service, the system can migrate all data for that service to a designated location to ensure that the service continues to operate while still meeting its requirements.

[0233] The following example uses the first hard drive as the hard drive, the third RAID as a newly added RAID on the first hard drive, and the second RAID as an existing RAID on the first hard drive to illustrate the active migration process.

[0234] If the second storage space of the first hard drive is already used to store data for the second service to support read and write operations related to the second service, and the data storage system successfully creates a third RAID, and the third RAID uses the third storage space of the first hard drive to store data for the third service, then the first hard drive needs to support both read and write operations related to the second and third services simultaneously. If the first hard drive's read and write performance for the second service degrades due to performing read and write operations related to the third service, thus failing to meet the QoS requirements of the second service, then the data storage system will migrate all data for the second service to a designated location to ensure that the second service operates while still meeting its requirements.

[0235] It should be understood that the degraded read / write performance of the first hard drive for the second service in the above example is merely one example of failing to meet the QoS requirements of the second service. In practical applications, there may be other aspects that fail to meet the QoS requirements of the second service when the second RAID uses the first hard drive, which is not specifically limited in this application.

[0236] In summary, this technical solution provides a way to resolve conflicts between multiple business processes.

[0237] It should be understood that when the data storage system receives more QoS requests from various services, it can also create corresponding RAID arrays for different services to store their data based on their QoS requests. The process of the data storage system creating a corresponding RAID array for a service based on its QoS request can be referenced from step S102 above, where the data storage system obtains the first storage space of each of the P hard drives from the M hard drives based on the QoS request of the first service, and then combines the P first storage spaces into a first RAID array. For the sake of brevity, this will not be elaborated further here.

[0238] In one specific implementation, the operation steps performed by the data storage system in steps S101-S106 are executed by the processor in the data storage system.

[0239] There are two existing RAID schemes in pooled systems: The first scheme groups SSDs of the same type in the pooled system into a single RAID, giving the pooled system multiple fixed RAID arrays; the second scheme divides each SSD in the pooled system into multiple blocks according to a specified storage capacity, assigns these blocks to different block groups, and ensures that each block group includes blocks from all SSDs, then configures RAID for each block group. Both schemes require configuring multiple fixed RAID arrays in the pooled system before deployment, and then directly assigning one of the RAID arrays to a new service when it is needed.

[0240] In summary, implementing the embodiments of this application has the following advantages:

[0241] Firstly, this technical solution dynamically allocates and schedules storage resources based on business needs, satisfying the access or processing requirements of different business data. The existing first-method RAID configuration does not match the storage needs of the business, easily leading to the RAID providing more storage space than the business requires, wasting storage resources in the pooled system. This technical solution first obtains the business's QoS request to determine its specific requirements, and then creates a RAID configuration adapted to the business based on the QoS request. This ensures that the RAID meets the business's storage space requirements without occupying other storage space on the hard drive. This not only improves the utilization rate of storage resources in the data storage system but also enhances the performance, reliability, and efficiency of the data storage system in storing and managing various business data.

[0242] Furthermore, when creating the first RAID, the first storage space used can be equal to or less than the hard drive's storage capacity. The size of the first storage space is determined based on the first business requirement, thereby meeting the access or processing requirements of the first business data. When the first storage space is less than the hard drive's storage capacity, it does not prevent other storage spaces on the hard drive from being used for other RAID configurations, thus improving the utilization rate of storage resources in the data storage system.

[0243] Secondly, this technical solution supports dynamically configuring different RAID arrays based on the QoS requests of different services, ensuring that each RAID array meets the needs of its corresponding service and thus provides better storage services. The two existing solutions configure multiple RAID arrays in the pooling system before it is deployed, and these configurations remain unchanged during system operation. This can lead to incomplete matching between the RAID arrays and the requirements of some services when they are used later. This technical solution determines the RAID configuration information based on the QoS requests of the services, ensuring that the created RAID arrays meet the needs of the corresponding services.

[0244] Thirdly, this technical solution supports dynamically adjusting the mapping between addresses and RAID arrays based on business needs. This means it allows the same storage space to be used to form different RAID arrays at different times. Compared to the existing first solution where the mapping between hard drives and RAID arrays is fixed, or the existing second solution where the mapping between blocks and RAID arrays is fixed, leading to a mismatch between RAID arrays and business needs and wasting storage resources, this technical solution allows for the establishment and deletion of mappings between addresses and RAID arrays based on business requirements. Therefore, this solution supports dynamically adjusting the mapping between addresses and RAID arrays based on business needs, allowing the same storage space to be used to form different RAID arrays at different times. Consequently, this technical solution can dynamically allocate and schedule storage resources according to business needs, offering greater flexibility and improving storage resource utilization.

[0245] Fourth, this technical solution supports flexible allocation of storage resources in the data storage system and supports the creation of multiple RAID arrays with complex correspondences. Specifically, this technical solution supports the creation of two RAID arrays with identical disk usage, two RAID arrays with completely different disk usage, and two RAID arrays with slightly different disk usage. It can be understood that the probability of creating two RAID arrays with identical disk usage and the probability of creating two RAID arrays with completely different disk usage are both lower than the probability of creating two RAID arrays with slightly different disk usage. This means that in the data storage system, most RAID arrays will have some identical disks and some different disks. The existing first solution only allows each SSD to store data for a single service for a period of time, resulting in many SSDs allocated to a single service remaining idle due to the small amount of data during service operation. However, this technical solution creates RAID arrays where the first and second RAID arrays do not have identical disk usage; specifically, the first and second RAID arrays have some identical disks and some different disks. For hard drives included in both the first and second RAID configurations, the different storage spaces on these hard drives form different RAID arrays. This allows the hard drive to be used simultaneously to store data from different business applications, reducing the probability of the hard drive being idle, improving its storage space utilization, and enhancing the uniformity of business data distribution within the data storage system. The existing second scheme configures each RAID to include blocks on all SSDs. Due to the excessive dispersion of blocks within the RAID, the business data stored on that RAID is also too dispersed. This results in an excessively large data range involved in accessing and maintaining business data (such as data consistency verification and fault recovery), requiring too many SSDs to be read and written, thus impacting the efficiency of data read / write tasks. The first and second RAID arrays created by this technical solution do not contain identical hard drives. This means that both the first and second RAID arrays only occupy a portion of the hard drives in the data storage system. Therefore, the distribution range of business data in the first RAID (or second RAID) is smaller than that in any RAID array in the existing second solution. Consequently, the number of hard drives that need to be read and written when accessing and maintaining business data in the first RAID (or second RAID) in this technical solution is also less than the number of SSDs that need to be read and written when accessing and maintaining business data in any RAID array in the existing second solution. Therefore, this technical solution reduces the difficulty and overhead of accessing and maintaining business data, making the execution efficiency of data read and write tasks higher than that of the existing second solution. In summary, this technical solution can be considered a compromise between the existing first and second solutions, possessing the advantages of both solutions while eliminating their disadvantages.

[0246] The following will further elaborate on the scenarios where the first RAID created using this technical solution includes the first and second hard drives, but excludes the third hard drive; and the second RAID created includes both the first and third hard drives, but excludes the second hard drive. While the existing first solution can enhance the fault tolerance and recovery capabilities of the pooling system, it leads to uneven distribution of business data and uneven utilization of SSD storage space, resulting in performance imbalances in the pooling system. This technical solution supports using different storage spaces on the same hard drive to form different RAID configurations, including using a portion of the storage space on the first (or second) hard drive to form the first RAID and using another portion of the storage space on the first (or second) hard drive to form the second RAID. This allows different business data to be stored on a single hard drive, improving hard drive storage space utilization, enhancing the uniformity of business data distribution in the data storage system, improving the system's parallel read / write performance and throughput, and enhancing system balance. While the existing second solution achieves a more uniform distribution of business data in the pooling system and enhances its parallel read / write performance and throughput, the excessively dispersed blocks in the RAID configuration make accessing and maintaining business data difficult and costly, impacting the execution efficiency of data read / write tasks. The first RAID created by this technical solution only occupies the first and second hard drives, not the third hard drive. Therefore, the data for the first service in the first RAID will be distributed across the first and second hard drives, not the third hard drive. Accessing and maintaining the data for the first service in the first RAID requires reading and writing to the first and second hard drives, but not the third hard drive. If the existing second solution is continued in the data storage system, the service data in any RAID will be distributed across the first, second, and third hard drives. Accessing and maintaining the service data in that RAID will require reading and writing to all three hard drives. It is understandable that the second RAID created by this technical solution has a similar situation compared to the RAID in the existing second solution, which will not be elaborated here. It can be seen that the distribution range of service data and the number of hard drives required to read and write when accessing and maintaining service data in a RAID are both smaller in this technical solution than in the existing second solution. Therefore, this technical solution reduces the difficulty and overhead of accessing and maintaining service data, making the execution efficiency of data read and write tasks higher than that of the existing second solution.

[0247] Referring to Figure 6, which is a schematic diagram of a storage device provided in an embodiment of this application, the storage device 600 can be used to implement the RAID creation method of Figure 3. The storage device 600 can be applied to the data storage system 20 of Figure 1 or Figure 2. As shown in Figure 6, the storage device 600 includes: a first acquisition unit 601, a second acquisition unit 602, and a creation unit 603.

[0248] The first acquisition unit 601 is used to acquire a Quality of Service (QoS) request for a first service. The QoS request indicates the quality of service requirements for the storage, access, processing, or transmission of data for the first service in the data storage system.

[0249] The second acquisition unit 602 is used to acquire the first storage space of each of the P hard disks from the M hard disks in the data storage system according to the QoS request. Wherein, P≥2, and the first storage space is less than the storage capacity of the hard disk.

[0250] The creation unit 603 is used to form a first RAID from P first storage spaces. The first RAID is used to store data for the first service.

[0251] In some possible implementations, QoS requests include one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of business input / output IO, number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements.

[0252] In some possible implementations, the second acquisition unit 602 is specifically used to acquire consecutive address segments of each of the P hard disks from the M hard disks according to the QoS request, and use the storage space indicated by the P consecutive address segments as the P first storage spaces.

[0253] In some possible implementations, the first hard disk among the P hard disks stores the correspondence between the start address and end address of the first hard disk's continuous address segment and the first RAID.

[0254] In some possible implementations, the storage device 600 includes a deletion unit. This deletion unit is used to obtain a termination request for the first service, and, based on the termination request, instructs the first hard disk to delete the correspondence between the start and end addresses of a consecutive address segment of the first hard disk and the first RAID. The termination request is used to instruct the data storage system to terminate the storage service for the data of the first service.

[0255] In some possible implementations, the creation unit 603 is further configured to determine the RAID configuration information of the first RAID based on the QoS request after P first storage spaces are assembled into a first RAID. The RAID configuration information indicates the method of storing the data of the first service in the first RAID.

[0256] In some possible implementations, RAID configuration information includes one or more of the following: RAID algorithm, stripe width, stripe unit size, and stripe arrangement.

[0257] In some possible implementations, the stripe width in the RAID configuration information of the first RAID is K, where K is a positive integer. The first RAID includes multiple subgroups. Each subgroup includes at least K hard drives. The hard drives included in each subgroup are different, and the data blocks and parity blocks included in the stripes of each subgroup are provided by the hard drives in the subgroup to which the stripe belongs.

[0258] In some possible implementations, multiple subgroups include a first subgroup. The first subgroup includes a first hard disk. The first hard disk stores first data. The storage device 600 includes a reconstruction unit. The reconstruction unit is used to, in the event of a failure of the first hard disk, retrieve data blocks and check blocks from a first stripe, perform calculations on the data blocks and check blocks to obtain the first data, and store the first data on a second hard disk. The first stripe is arranged within the first subgroup. The first stripe is the stripe to which the first data belongs. Check blocks are used to store check data for the first data. The first hard disk and the second hard disk are different.

[0259] In some possible implementations, the first acquisition unit 601 is further configured to acquire a QoS request for the second service. The QoS request for the second service indicates the quality of service requirements for storing, accessing, processing, or transmitting data of the second service in the data storage system. The second acquisition unit 602 is further configured to acquire second storage space for each of the Q hard drives from the M hard drives according to the QoS request for the second service. Here, Q ≥ 2. The second storage space is less than the storage capacity of the hard drive, or the second storage space is equal to the storage capacity of the hard drive. The creation unit 603 is further configured to assemble the Q second storage spaces into a second RAID. The second RAID is used to store data of the second service. Furthermore, the P hard drives of the first RAID include the first hard drive and the second hard drive, but not the third hard drive; the Q hard drives of the second RAID include the first hard drive and the third hard drive, but not the second hard drive.

[0260] In some possible implementations, the deletion unit is further configured to obtain a termination request for the first service and release P units of the first storage space based on the termination request. The first acquisition unit 601 is further configured to obtain a QoS request for the third service after releasing the P units of the first storage space. The creation unit 603 is further configured to create a third RAID based on the QoS request of the third service. The third RAID includes some or all of the P units of the first storage space.

[0261] In some possible implementations, the third RAID includes a third storage space for each of the R hard drives, where 2 ≤ R < M, or R = M. The storage device 600 includes a migration unit. This migration unit is used to migrate the data of the second service when the R third storage spaces include part or all of the Q second storage spaces and the second RAID stores data for the second service, or when the QoS requirements of the second service are not met.

[0262] The aforementioned first acquisition unit 601, second acquisition unit 602, creation unit 603, deletion unit, reconstruction unit, and migration unit can be implemented in software or hardware. For example, the implementation of the first acquisition unit 601 will be described below. Similarly, the implementation of the second acquisition unit 602, creation unit 603, deletion unit, reconstruction unit, and migration unit can refer to the implementation of the first acquisition unit 601.

[0263] The first acquisition unit 601, as an example of a software functional unit, may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the aforementioned computing instance may be one or more. For example, the first acquisition unit 601 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0264] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0265] The first acquisition unit 601, as an example of a hardware functional unit, may include at least one computing device, such as a server. Alternatively, the first acquisition unit 601 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0266] The multiple computing devices included in the first acquisition unit 601 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the first acquisition unit 601 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the first acquisition unit 601 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0267] It should be noted that, in other embodiments, the first acquisition unit 601 can be used to execute any step in the RAID creation method of FIG3, the second acquisition unit 602 can be used to execute any step in the RAID creation method of FIG3, the creation unit 603 can be used to execute any step in the RAID creation method of FIG3, the deletion unit can be used to execute any step in the RAID creation method of FIG3, the reconstruction unit can be used to execute any step in the RAID creation method of FIG3, and the migration unit can be used to execute any step in the RAID creation method of FIG3. The steps implemented by the first acquisition unit 601, the second acquisition unit 602, the creation unit 603, the deletion unit, the reconstruction unit, and the migration unit can be specified as needed. The storage device 600 can achieve all functions by implementing different steps in the RAID creation method of FIG3 through the first acquisition unit 601, the second acquisition unit 602, the creation unit 603, the deletion unit, the reconstruction unit, and the migration unit respectively.

[0268] This application also provides a chip system including a processor and a power supply circuit. The power supply circuit supplies power to the processor, which executes the operation steps performed by the data storage system in the RAID creation method described in Figure 3. For simplicity, further details are omitted here. The processor can be implemented using computing devices such as CPUs, DPUs, GPUs, NPUs, XPUs, system-on-chips (SoCs), offloading cards, accelerator cards, or AI chips.

[0269] Referring to Figure 7, which is a schematic diagram of a storage device cluster provided in an embodiment of this application, the storage device cluster provided in this application includes at least one storage device. This storage device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the storage device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0270] As shown in Figure 7, the storage device cluster includes at least one storage device 700.

[0271] The storage device 700 includes a bus 701, a processor 702, a memory 703, and a communication interface 704. The processor 702, memory 703, and communication interface 704 communicate via the bus 701. It should be understood that this application does not limit the number of processors and memories in the storage device 700.

[0272] Bus 701 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. The Unified Bus is also known as the Lingqu Bus. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7 uses only one line, but this does not imply that there is only one bus or one type of bus. Bus 701 can include pathways for transmitting information between various components of storage device 700 (e.g., memory 703, processor 702, communication interface 704).

[0273] The processor 702 may include any one or more of the following storage devices: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP) or digital signal processor (DSP), ASIC, FPGA, CPLD, NPU, SoC, offload card, accelerator card, etc.

[0274] Memory 703 may include volatile memory, such as random access memory (RAM). Processor 702 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 703 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.

[0275] It is worth noting that the same type of storage medium can be configured in the same storage device to realize the function of memory 703, or two or more types of storage media can be configured to realize the function of memory 703. This application does not limit this.

[0276] The memory 703 stores executable program code, and the processor 702 executes the executable program code to implement the functions of the first acquisition unit 601, the second acquisition unit 602, and the creation unit 603 in the storage device 600 of FIG. 6, thereby realizing the RAID creation method of FIG. 3. That is, the memory 703 stores instructions for executing the RAID creation method of FIG. 3.

[0277] The communication interface 704 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the storage device 700 and other storage devices or communication networks.

[0278] The memory 703 of one or more storage devices 700 in the storage device cluster may contain the same instructions for executing the RAID creation method of Figure 3 above.

[0279] In some possible implementations, the memory 703 of one or more storage devices 700 in the storage device cluster may also store partial instructions for executing the RAID creation method of Figure 3. In other words, a combination of one or more storage devices 700 can jointly execute the instructions for executing the RAID creation method of Figure 3.

[0280] It should be noted that the memory 703 in different storage devices 700 in the storage device cluster can store different instructions, which are used to execute some of the functions of the storage device 600 in Figure 6. That is, the instructions stored in the memory 703 in different storage devices 700 can realize the functions of one or more units among the first acquisition unit 601, the second acquisition unit 602, the creation unit 603, the deletion unit, the reconstruction unit, and the migration unit.

[0281] Referring to Figure 8, which is a schematic diagram of another storage device cluster structure provided in an embodiment of this application. In some possible implementations, one or more storage devices in the storage device cluster can be connected via a network. The network can be a wide area network (WAN) or a local area network (LAN), etc. As shown in Figure 8, two storage devices 700A and 700B are connected via a network. Specifically, they are connected to the network through the communication interfaces in each storage device. In this type of possible implementation, the memory 703 in storage device 700A stores instructions for executing the function of the first acquisition unit 601. Simultaneously, the memory 703 in storage device 700B stores instructions for executing the functions of the second acquisition unit 602 and the creation unit 603.

[0282] The connection method between the storage device clusters shown in Figure 8 can be considered as follows: taking into account that the RAID creation method provided in this application needs to receive a large number of QoS requests from services, the function implemented by the first acquisition unit 601 is considered to be executed by the storage device 700A.

[0283] It should be understood that the function of storage device 700A shown in Figure 8 can also be performed by multiple storage devices 700. Similarly, the function of storage device 700B can also be performed by multiple storage devices 700.

[0284] This application embodiment also provides another storage device cluster. The connection relationship between the storage devices in this storage device cluster can be similarly referred to the connection method of the storage device cluster described in Figures 7 and 8. The difference is that the memory 703 in one or more storage devices 700 in this storage device cluster can store the same instructions for executing the RAID creation method of Figure 3.

[0285] This application also provides a computer program product containing instructions. This computer program product may be a software or program product containing instructions capable of running on a storage device or being stored on any available medium. When the computer program product runs on the storage device, it causes the storage device to execute the RAID creation method described in FIG3.

[0286] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a storage device can store, or a data storage device such as a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the storage device to execute the RAID creation method described in Figure 3.

[0287] It should be understood that in the embodiments of the present invention, "when" and "if" both refer to the device making corresponding processing under certain objective circumstances, and are not limited to a time, nor do they require the device to make a judgment action when it implements the process, nor do they imply any other limitations.

[0288] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

A method for creating a redundant array of independent disks (RAID), characterized by, Applied to a data storage system, the data storage system comprising M hard disks, the method includes: Obtain a Quality of Service (QoS) request for a first service, wherein the QoS request is used to indicate the quality of service requirements for the storage, access, processing, or transmission of data of the first service in the data storage system; According to the QoS request, the first storage space of each of the P hard disks from the M hard disks is obtained, where P≥2, and the first storage space is less than the storage capacity of the hard disk; P first storage spaces are combined to form a first RAID, wherein the first RAID is used to store the data of the first service. The method of claim 1, wherein The QoS request includes one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of business input / output IO, number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements. The method according to claim 1 or 2, characterized in that, The step of obtaining the first storage space of each of the P hard disks from the M hard disks according to the QoS request includes: According to the QoS request, obtain the continuous address range of each of the P hard disks from the M hard disks, and use the storage space indicated by the P continuous address ranges as the P first storage spaces. The method according to claim 3, characterized in that, The first hard disk among the P hard disks stores the correspondence between the start address and end address of the continuous address segment of the first hard disk and the first RAID. The method according to claim 4, characterized in that The method further includes: Obtain the termination request of the first service, wherein the termination request is used to instruct the data storage system to terminate the data storage service for the first service; The termination request instructs the first hard disk to delete the correspondence between the start and end addresses of the continuous address segment of the first hard disk and the first RAID. The method according to any one of claims 1-5 is characterized in that, After assembling the P first storage spaces into a first RAID, the method further includes: The RAID configuration information of the first RAID is determined based on the QoS request, wherein the RAID configuration information is used to indicate the method of storing the data of the first service in the first RAID. The method according to claim 6, characterized in that The RAID configuration information includes one or more of the following: RAID algorithm, stripe width, stripe unit size, and stripe arrangement. The method of claim 7, wherein The stripe width in the RAID configuration information of the first RAID is K, where K is a positive integer. The first RAID includes multiple subgroups, each subgroup including at least K hard drives. The hard drives included in each subgroup are different, and the data blocks and parity blocks included in the stripes in each subgroup are provided by the hard drives in the subgroup to which the stripe belongs. The method of claim 8, wherein The plurality of subgroups includes a first subgroup, the first subgroup includes a first hard disk, the first hard disk stores first data, and the method further includes: In the event of a failure of the first hard drive, the data block and the check block in the first stripe are obtained, the data block and the check block are calculated to obtain the first data, and the first data is stored in the second hard drive; The first stripe is arranged within the first subgroup, and the first stripe is the stripe to which the first data belongs. The check block is used to store the check data of the first data. The first hard disk is different from the second hard disk. The method according to any one of claims 1 to 9, characterized in that The method further includes: Obtain a QoS request for a second service, wherein the QoS request for the second service is used to indicate the quality of service requirements for the storage, access, processing or transmission of data of the second service in the data storage system; According to the QoS request of the second service, the second storage space of each of the Q hard disks in the M hard disks is obtained, where Q≥2, the second storage space is less than the storage capacity of the hard disk, or the second storage space is equal to the storage capacity of the hard disk. The Q second storage spaces are combined into a second RAID, which is used to store the data for the second service. Wherein, the P hard drives include the first hard drive and the second hard drive, but not the third hard drive; the Q hard drives include the first hard drive and the third hard drive, but not the second hard drive. The method of claim 10, wherein The method further includes: Obtain the termination request of the first service, and release the P first storage spaces according to the termination request; After releasing the P first storage spaces, the QoS request of the third service is obtained, and a third RAID is created according to the QoS request of the third service, wherein the third RAID includes part or all of the P first storage spaces. The method of claim 11, wherein The third RAID includes the third storage space of each of the R hard drives, where 2 ≤ R < M, or R = M; The method further includes: In the case where R third storage spaces include part or all of Q second storage spaces, and the second RAID stores data for the second service, or in the case where the QoS requirements of the second service are not met, the data for the second service is migrated. A data storage system, characterized by This includes multiple independent disk redundant arrays (RAID), with different RAIDs used to store data for different services; The first RAID and the second RAID in the plurality of RAID arrays do not include the exact same hard drives. The system of claim 13, wherein The data storage system includes M hard drives, which are used to provide the multiple RAID configurations. The M hard disks include a first hard disk, a second hard disk, and a third hard disk, wherein the first hard disk, the second hard disk, and the third hard disk are different hard disks; The first RAID includes the first hard drive and the second hard drive, but does not include the third hard drive; The second RAID includes the first hard drive and the third hard drive, but does not include the second hard drive. The system of claim 14, wherein The first RAID comprises P hard drives, including the first hard drive and the second hard drive, where 2 ≤ P < M. The system of claim 15, wherein The first RAID includes a first storage space for each of P hard drives, where P ≥ 2, the first storage space is less than the storage capacity of the hard drive, or the first storage space is equal to the storage capacity of the hard drive. The system according to claim 16 is characterized in that, The first storage space is the storage space indicated by a continuous address segment in the hard disk. The system of claim 17, wherein The first hard disk stores the correspondence between the start and end addresses of the continuous address segments of the first hard disk and the first RAID. The system of claim 18, wherein The first RAID is used to store data for the first service, and the data storage system includes a processor. After receiving the termination request of the first service, the processor is used to instruct the first hard disk to delete the correspondence between the start address and end address of the continuous address segment of the first hard disk and the first RAID. The termination request is used to instruct the data storage system to terminate the data storage service for the first service. The system according to any of claims 13-19, characterized in that The RAID configuration information of the first RAID is different from that of the second RAID. The RAID configuration information of the first RAID is used to indicate the method of storing the data of the first service in the first RAID, and the RAID configuration information of the second RAID is used to indicate the method of storing the data of the second service in the second RAID. The system of claim 20, wherein The RAID configuration information of the first RAID includes one or more of the following: RAID algorithm, stripe width, stripe unit size, and stripe arrangement. The system according to claim 20 or 21 is characterized in that, The RAID configuration information of the first RAID is determined based on the Quality of Service (QoS) request of the first service. The QoS request is used to indicate the quality of service requirements for accessing, processing, or transmitting data of the first service in the data storage system. The system according to claim 22 is characterized in that, The QoS request includes one or more of the following: storage space requirements, reliability requirements, privacy requirements, read / write performance requirements, average size of business input / output IO, number of concurrent IOs, storage space utilization, bandwidth requirements, latency requirements, throughput requirements, and priority requirements. The system of claim 21, wherein The stripe width in the RAID configuration information of the first RAID is K, where K is a positive integer. The first RAID includes multiple subgroups, each subgroup including at least K hard drives. The hard drives included in each subgroup are different, and the data blocks and parity blocks included in the stripes in each subgroup are provided by the hard drives in the subgroup to which the stripe belongs. The system of claim 24, wherein The plurality of subgroups includes a first subgroup, the first subgroup including a first hard disk, the first hard disk storing first data. In the event of a failure of the first hard drive, the processor is used to acquire data blocks and check blocks in the first stripe, perform calculations on the data blocks and check blocks to obtain the first data, and store the first data on the second hard drive. The first strip is arranged in the first sub-group, the first strip is a strip to which the first data belongs, the check block is used for storing check data of the first data, and the first hard disk is different from the second hard disk. The system according to any one of claims 16-19, characterized in that The data storage system comprises a processor, The processor is configured to release the P first storage spaces after obtaining the end request of the first service, and to create a third RAID, the third RAID comprising part or all of the P first storage spaces. The system according to claim 26, wherein The second RAID comprises a second storage space of each of Q hard disks, 2≤Q The third RAID comprises a third storage space of each of R hard disks, 2≤R In a case where the R third storage spaces comprise part or all of the Q second storage spaces and the second RAID stores data of the second service, or in a case where the QoS request of the second service is not met, the processor is configured to migrate the data of the second service. A storage device characterized by comprising: The method comprises the following steps: The first obtaining unit is configured to obtain a quality of service (QoS) request of a first service, wherein the QoS request is used to indicate a service quality requirement for storage, access, processing or transmission of data of the first service in a data storage system. The second obtaining unit is configured to obtain a first storage space of each of P hard disks from M hard disks of the data storage system according to the QoS request, wherein P≥2, and the first storage space is smaller than a storage capacity of the hard disk. The creating unit is configured to group the P first storage spaces into a first RAID, wherein the first RAID is used to store the data of the first service. A chip characterized by The method comprises the following steps: A storage device cluster, characterized by The at least one storage device comprises a processor and a memory; The processor of the at least one storage device is configured to execute instructions stored in the memory of the at least one storage device, so that the storage device cluster executes the method according to any one of claims 1-12.