Data storage systems, methods, apparatuses, products, and media

CN122653528APending Publication Date: 2026-08-28HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510249061.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2026-08-28

Smart Images

  • Figure CN122653528A_ABST
    Figure CN122653528A_ABST
Patent Text Reader

Abstract

The application provides a data storage system, method, device, product and medium. The system comprises a first stripe, the first stripe comprises a plurality of blocks, different blocks are from different hard disks, the plurality of blocks comprise a plurality of data blocks and a check block, the data block is a physical block for storing data, the check block is a physical block for storing first check data, the first check data is used for checking the stored data in the plurality of data blocks; the data storage system is used for receiving a first read request in the case of receiving a first notification of upgrading the firmware of the first hard disk, the first read request is used for reading first data in the first data block; the data storage system is also used for calculating the first data block based on the first read request using the data in the data blocks in the first stripe except the first data block and the first check data, and reading the first data from the first data block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of storage technology, and in particular relates to a data storage system, method, apparatus, product and medium. Background Technology

[0002] To provide reliable data services, data storage systems require processors to do more than simply write data to the solid-state drives (SSDs). Instead, when writing data, the processors must use a redundant array of independent disks (RAID) algorithm to encode the data into checksum data, which is then distributed across multiple SSDs. This way, if one SSD fails and the data stored on it is corrupted, the damaged data can be recovered using the data and checksum data stored on the remaining SSDs.

[0003] Because the SSD cannot respond to read and write operations during firmware upgrades, the current SSD stops responding to read and write operations during firmware upgrades and only resumes read and write operations after the firmware upgrade is successful. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a data storage system, method, apparatus, product, and medium that can still respond to read and write operations when the solid-state drive is upgraded.

[0005] In a first aspect, a data storage system is provided. The data storage system includes a first stripe, which includes multiple blocks. Different blocks in the multiple blocks originate from different hard disks. The multiple blocks include multiple data blocks and a check block, wherein the data blocks are physical blocks used to store data, and the check block is a physical block used to store first check data, which is used to check the data stored in the multiple data blocks.

[0006] The data storage system is configured to receive a first read request upon receiving a first notification to upgrade the firmware of the first hard disk, wherein the first read request is used to read first data in the first data block.

[0007] The data storage system is also used to, upon receiving the first read request, calculate a first data block based on the data in the data blocks other than the first data block in the first stripe and the first check data, and read the first data from the first data block.

[0008] In the above solution, even when the first hard drive is being upgraded, the first data in the first data block of the first hard drive can still be recovered through other data blocks and checksum blocks in the stripe, and the first read request can be responded to. This maintains read operation responsiveness during the hard drive upgrade process, ensuring that the data is always available and avoiding work stoppages or decision delays due to data unavailability. Furthermore, the storage system does not need to be shut down for hard drive upgrades, eliminating the need to choose specific off-peak periods for upgrades to avoid business interruptions. Instead, upgrades can be performed at any suitable time based on actual needs, improving the stability of the storage system. At the same time, it significantly reduces downtime due to hardware upgrades, avoiding economic losses caused by business interruptions, such as transaction losses and customer churn, thus ensuring the normal operation of the enterprise.

[0009] In some possible designs, the data storage system is configured to receive a first write request upon receiving a first notification to upgrade the firmware of the first hard drive, wherein the first write request is used to write second data into the first data block. The data storage system is further configured to, upon receiving the first write request, calculate a first data block based on the first write request using data from data blocks in the first stripe excluding the first data block and the first checksum data; write the second data into the first data block to obtain a second data block; calculate second checksum data using the second data block and data from data blocks in the first stripe excluding the first data block; and write the second checksum data into the checksum block to replace the first checksum data.

[0010] In the above solution, the ability to continuously write means that the integrity of data is better guaranteed during the upgrade process. Traditional upgrade methods may result in data loss or damage due to unexpected interruptions, but this solution allows for continuous updates and backups of data during the upgrade process, reducing the risk of losing the latest data due to upgrade failure and ensuring data security and reliability.

[0011] In some possible designs, the data storage system is also used to, upon receiving the first write request, set the region marker to which the first data block belongs to as a first marker, and upon receiving a second notification that the firmware upgrade of the first hard disk is complete, calculate a second data block based on the first marker using data blocks in the first stripe other than the first data block and the second check data, and replace the first data block with the second data block.

[0012] In the above scheme, when the first data block is written and updated, the region tag to which the first data block belongs will be set to the first tag. After the firmware upgrade of the first hard drive is completed, only the region tag set to the first tag needs to be rebuilt, thereby improving the reconstruction efficiency and avoiding rebuilding the entire first hard drive, thus avoiding unnecessary waste.

[0013] In some possible designs, after replacing the first data block with the second data block, the second data block can be read and written in the following ways:

[0014] The data storage system is further configured to receive a second read request, wherein the second read request is for reading second data from the second data block; the data storage system is further configured to read the second data from the second data block based on the second read request. The data storage system is further configured to receive a second write request, wherein the second write request is for writing third data into the second data block; the data storage system is further configured to write the third data into the second data block based on the second write request.

[0015] In the above scheme, when reading and writing data in the first data block after reconstruction is completed, the original reading and writing method can be restored, thereby effectively improving the efficiency of reading and writing.

[0016] Secondly, a data storage method is provided. The storage system includes a first stripe, which includes multiple blocks. Different blocks in the multiple blocks come from different hard disks. The multiple blocks include multiple data blocks and a check block. The data blocks are physical blocks used to store data, and the check block is a physical block used to store first check data, which is used to check the data stored in the multiple data blocks.

[0017] Upon receiving a first notification to upgrade the firmware of the first hard disk, the data storage system receives a first read request, wherein the first read request is used to read the first data in the first data block;

[0018] Upon receiving the first read request, the data storage system calculates the first data block based on the data in the data blocks other than the first data block in the first stripe and the first check data, and reads the first data from the first data block.

[0019] In some possible designs, the method further includes:

[0020] Upon receiving a first notification to upgrade the firmware of the first hard disk, the data storage system receives a first write request, wherein the first write request is used to write second data into the first data block;

[0021] Upon receiving the first write request, the data storage system calculates a first data block based on the first write request using data from data blocks in the first stripe excluding the first data block and the first check data. It then writes the second data into the first data block to obtain a second data block. Using the second data block and data from data blocks in the first stripe excluding the first data block, it calculates second check data and writes the second check data into the check block to replace the first check data.

[0022] In some possible designs, upon receiving the first write request, the data storage system calculates second check data based on the first write request, using the second data and data from data blocks in the first stripe excluding the first data block, and replaces the first check data with the second check data, including:

[0023] Upon receiving the first write request, the data storage system sets the region marker to which the first data block belongs to the first marker;

[0024] Upon receiving a second notification that the firmware upgrade of the first hard drive is complete, the second data block is calculated based on the first marker using the data blocks in the first stripe excluding the first data block and the second check data;

[0025] Replace the first data block with the second data block.

[0026] In some possible designs, the method further includes:

[0027] The data storage system receives a second read request, wherein the second read request is used to read the second data in the second data block;

[0028] The data storage system reads the second data from the second data block based on the second read request.

[0029] In some possible designs, after storing the second data in the first data block, the method further includes:

[0030] The data storage system receives a second write request, wherein the second write request is used to write third data into the second data block;

[0031] The data storage system writes the third data to the second data block based on the second write request.

[0032] Thirdly, a data storage device is provided, the data storage device including units for implementing the method as described in any one of the second aspects.

[0033] Fourthly, a computer program product containing instructions is provided, which, when executed by a hard disk, cause the hard disk to perform the method as described in any one of the second aspects.

[0034] Fifthly, a computer-readable storage medium is provided, including computer program instructions that, when executed by a hard disk, implement the method as described in any one of the second aspects. Attached Figure Description

[0035] Figure 1 This is a structural diagram of a data storage system provided in an embodiment of this application;

[0036] Figure 2 This is a structural diagram of a data storage system according to an embodiment of this application;

[0037] Figure 3 This is a flowchart illustrating a data storage method provided in this application;

[0038] Figure 4 This is a schematic diagram of the structure of a data storage device provided in this application. Detailed Implementation

[0039] This application pertains to a data storage system. The data storage system is used to store data, specifically to implement data read and write functions. The data storage system includes a processor, a hard disk, and a communication bus. The processor and hard disk communicate via the communication bus.

[0040] The data storage system can be either a computing device or a cluster of computing devices. Computing devices are electronic devices used to compute, process, and store data, including servers, supercomputers, personal computers, workstations, industrial control computers, and so on.

[0041] A processor 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.

[0042] A hard drive 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. Virtual hard drives can be created on a physical hard drive or on network storage devices (such as direct-attached storage, network-attached storage, and storage area networks), such as virtual hard drives in virtual machines (e.g., VMDK, VHD, VDI formats) or cloud storage services.

[0043] Communication buses can be high-speed interconnect buses, peripheral component interconnect express (PCIe) buses, network buses, extended industry standard architecture (EISA) buses, unified buses (UB buses), compute express links (CXL) buses, cache coherent interconnect for accelerators (CCIX) buses, and so on. The unified bus is also known as the Lingqu bus. Buses can be divided into address buses, data buses, control buses, etc.

[0044] Due to the variety of hard drive and communication bus product types, for ease of explanation, the following text will use solid-state drives (SSDs) as hard drives and high-speed interconnect buses (HS-B) as communication buses for illustration.

[0045] The specific components and functions of the data storage system will be further described below with reference to the accompanying drawings.

[0046] See Figure 1 , Figure 1 This is a structural diagram of a data storage system provided in an embodiment of this application. For example... Figure 1 As shown, the data storage system 10 includes a processor 11, a solid-state drive 12, and a high-speed interconnect bus 13. The processor 11 and the solid-state drive 12 communicate within the data storage system 10 via the high-speed interconnect bus 13.

[0047] When the data storage system 10 is a computing device, the processor 11, solid-state drive 12, and high-speed interconnect bus 13 are deployed on the same computing device.

[0048] When the data storage system 10 is a cluster of computing devices, it can be that the processor 11 and at least one solid-state drive 12 are deployed on the same computing device, while the remaining solid-state drives 12 are deployed on another computing device; or the processor 11 and at least one solid-state drive 12 are deployed on the same computing device, while the remaining solid-state drives 12 are distributed across multiple computing devices; or the processor 11 is deployed on a single computing device, while multiple solid-state drives 12 are deployed on another computing device; or the processor 11 is deployed on a single computing device, while multiple solid-state drives 12 are distributed across multiple computing devices, and so on. In practical applications, the processor 11 and solid-state drives 12 can be deployed as needed according to the actual application scenario, and this application does not impose specific limitations.

[0049] The processor 11 can be a CPU, DPU, GPU, etc., or an ASIC, or one or more integrated circuits. The solid-state drive 12 (SSD) is a storage device built from flash memory chips. Each flash memory chip can be divided into several physical chunks of a fixed size. Therefore, each physical chunk has a standard capacity, for example, 2 to the power of N (M), where N is a positive integer. The high-speed interconnect bus 13 refers to the communication bus connecting the processor 11, the solid-state drive 12, and other devices. The processor 11, solid-state drive 12, and other devices connected via the high-speed interconnect bus 13 have the same status, thus allowing direct data exchange and communication between these devices. The high-speed interconnect bus 13 can be, for example, a UB bus, an NV-LINK bus, a PCIe bus, etc.

[0050] In the data storage system 10, the processor 11 typically uses physical blocks on multiple solid-state drives 12 to create logical unit numbers (LUNs). Furthermore, the processor 11 can either use all physical blocks on a single solid-state drive 12 to form a LUN, or it can use only a portion of the physical blocks on a single solid-state drive 12 to form a LUN. The size of the LUN depends on the business requirements.

[0051] In this application, the storage space provided by all physical blocks used to form a LUN can be referred to as the first storage space. When performing data read / write tasks, physical blocks in the first storage space can be addressed based on the LUN. Specifically, all physical blocks in the first storage space are mapped into multiple logical blocks, and logical block addresses (LBAs) are assigned to all logical blocks, establishing a mapping relationship between LBAs and physical block addresses (PBAs). When the mapping between physical blocks and logical blocks is one-to-one, one PBA corresponds to one LBA; when the mapping is one-to-many, one PBA corresponds to multiple LBAs; and when the mapping is many-to-one, multiple PBAs correspond to one LBA. The mapping relationship between physical blocks and logical blocks is determined by the user. Therefore, the solid-state drive 12 can determine the PBA corresponding to a specific LBA by looking up the mapping relationship between LBAs and PBAs. Thus, in practical applications, LBAs can be used in the LUN to indicate physical blocks in the first storage space. For ease of explanation, the following description of LBA will consistently use the example of a one-to-one correspondence between LBA and PBA.

[0052] The following section will introduce the existing data storage solutions in data storage system 10.

[0053] To provide reliable data services, RAID algorithms are typically used in data storage systems 10 to write data to LUNs. Data reliability refers to the stability and reliability of data during storage, transmission, and processing. Data reliability requires that data can be correctly accessed, used, and recovered when needed. RAID is a high-performance, highly reliable storage technology that combines multiple independent solid-state drives (SSDs) in different ways to create a large-capacity SSD group. RAID algorithms primarily utilize data striping, mirroring, and data verification technologies to achieve high performance, reliability, fault tolerance, and scalability in data processing. RAID algorithms include RAID5, RAID6, RAID50, and RAID60, among others.

[0054] Writing data using the RAID algorithm primarily refers to encoding the data using the RAID algorithm to obtain parity data, and then storing the data and its parity data in the first storage space. Writing data to a LUN using the RAID algorithm requires dividing the logical blocks in the LUN into multiple stripes for management. Each stripe includes data blocks and parity blocks. Data blocks are physical blocks used to store data, and parity blocks are physical blocks used to store parity data; the data blocks and parity blocks come from different solid-state drives (SSDs). The parity data in a stripe is used to verify the data in that stripe, ensuring the reliability of the data within that stripe. Multiple stripes are distributed across multiple SSDs to achieve parallel data read / write and redundant verification, thus providing a certain degree of redundancy and fault tolerance. Even if one SSD fails, the data on that SSD can still be recovered using data from the other SSDs.

[0055] Taking RAID5 as an example of the RAID algorithm, the relationship between data blocks and parity blocks in a stripe is n:1, meaning n data blocks correspond to one parity block. Furthermore, RAID5 distributes both data blocks and parity blocks across multiple solid-state drives (SSDs). This way, if one SSD fails, causing data blocks stored on that SSD to become corrupted, the corrupted data blocks can be recovered using data blocks and parity blocks from the remaining SSDs that belong to the same stripe as the corrupted data blocks.

[0056] The following will combine Figure 1 The data storage system 10 describes the existing process of storing data in a LUN using RAID 5.

[0057] See Figure 2 , Figure 2 This is a structural diagram of a data storage system according to an embodiment of this application. Figure 2 As shown, the data storage system 20 includes a processor 21, a solid-state drive 22, and a high-speed interconnect bus 23. The processor 21 and the solid-state drive 22 communicate within the data storage system 20 via the high-speed interconnect bus 23. The deployment of the processor 21, solid-state drive 22, and high-speed interconnect bus 23 can be referred to the above description. Figure 1 The details regarding the deployment methods of processor 11, solid-state drive 12, and high-speed interconnect bus 13 are not repeated here.

[0058] In the data storage system 20, four solid-state drives (SSD 1, SSD 2, SSD 3, and SSD 4) correspond to different solid-state drives (SSD 22).

[0059] The process of implementing RAID 5 storage on SSD 1, SSD 2, SSD 3, and SSD 4 is as follows:

[0060] The parity block PA is calculated using erasure coding (EC) algorithm with data blocks A1, A2, and A3. Then, data blocks A1, A2, A3 and parity block PA are stored in SSD 1, SSD 2, SSD 3 and SSD 4 respectively. The stripe S1 is composed of data blocks A1, A2, A3 and parity block PA.

[0061] The check block PB is calculated using the EC encoding algorithm using data blocks B1, B2, and B3. Then, data blocks B1, B2, B3, and PB are stored on SSD 1, SSD 2, SSD 4, and SSD 3 respectively. The stripe S2 is composed of data blocks B1, B2, B3, and PB.

[0062] The check block PC is calculated using the EC encoding algorithm using data blocks C1, C2, and C3. Then, data blocks C1, C2, C3, and check block PC are stored on SSD 1, SSD 3, SSD 4, and SSD 2 respectively. The stripe S3 is composed of data blocks C1, C2, C3, and check block PC.

[0063] It should be understood that for other data blocks, a check block is still calculated from three data blocks, and the different check blocks are distributed and stored in different solid-state drives 22.

[0064] It should be understood that the number of processors 21 and solid-state drives 22 in the data storage system 20 is based on... Figure 2 The data storage system 20 shown is illustrated using one processor 21 and four solid-state drives 22 as an example. In practical applications, the number of processors 21 and solid-state drives 22 in the data storage system 20 can be more, and this application does not make a specific limitation.

[0065] The following will use stripe 1 as an example to explain in detail how, when one of the solid-state drives (SSDs) fails and the data blocks stored on that SSD are corrupted, the corrupted data blocks can be recovered using the data blocks and checksum blocks on the other SSDs that belong to the same stripe as the corrupted data blocks.

[0066] When data block A1 is lost, the acquired data blocks A2 and A3, along with the parity block PA, are input into the same erasure coding decoding algorithm used to generate parity block PA. Since the erasure coding algorithm establishes the mathematical relationships between data blocks A1, A2, A3, and PA when generating parity block PA, the decoding algorithm can utilize these known data blocks A2, A3, and PA, and reconstruct data block A1 through specific calculations.

[0067] When data block A2 is lost, the acquired data blocks A1, A3, and parity block PA are input into the same erasure coding decoding algorithm used to generate parity block PA. Since the erasure coding algorithm establishes the mathematical relationship between data blocks A1, A2, A3, and PA when generating parity block PA, the decoding algorithm can utilize these known data blocks A1, A3, and PA, and reconstruct data block A2 through specific calculations.

[0068] When data block A3 is lost, the acquired data blocks A1, A2, and parity block PA are input into the same erasure coding decoding algorithm used to generate parity block PA. Since the erasure coding algorithm establishes the mathematical relationship between data blocks A1, A2, A3, and PA when generating parity block PA, the decoding algorithm can utilize these known data blocks A1, A2, and PA, and reconstruct data block A3 through specific calculations.

[0069] The above example only uses stripe 1 as an example. In practical applications, if data blocks in other stripes are lost, they can also be recovered using the same method.

[0070] Since data read and write operations on SSD 1 are not possible during the firmware upgrade process, the following methods must be used if data read and write operations on SSD 1 are required during the upgrade process. The upgrade process refers to the time period from the start of the upgrade to its completion.

[0071] (1) When upgrading SSD 1, if a read request to read data from SSD 1 is received, it can be handled in the following way:

[0072] Suppose a read request is received to read data A from data block A1 in SSD 1. Since SSD 1 is undergoing an upgrade and cannot directly read data A from data block A1, the obtained data blocks A2, A3, and parity block PA can be input into the same erasure coding decoding algorithm used to generate parity block PA. Because the erasure coding algorithm establishes the mathematical relationship between data blocks A1, A2, A3, and PA when generating parity block PA, the decoding algorithm can use these known data blocks A2, A3, and PA to reconstruct data block A1 through specific calculations, thereby obtaining data A from data block A1.

[0073] Suppose a read request is received to read data B from data block B1 in SSD 1. Since SSD 1 is undergoing an upgrade and cannot directly read data B from data block B1, the obtained data blocks B2, B3, and parity block PB can be input into the same erasure coding decoding algorithm used to generate parity block PB. Because the erasure coding algorithm establishes the mathematical relationship between data blocks B1, B2, B3, and PB when generating parity block PB, the decoding algorithm can use these known data blocks B2, B3, and PB, and through specific calculations, reconstruct data block B1, thereby obtaining data B from data block B1.

[0074] Suppose a read request is received to read data C from data block C1 in SSD 1. Since SSD 1 is undergoing an upgrade and cannot directly read data C from data block C1, the obtained data blocks C2, C3, and parity block PC can be input into the same erasure coding decoding algorithm used to generate the parity block PC. Because the erasure coding algorithm establishes the mathematical relationship between data blocks C1, C2, C3, and PC when generating the parity block PC, the decoding algorithm can use these known data blocks C2, C3, and PC to reconstruct data block C1 through specific calculations, thereby obtaining data C from data block C1.

[0075] It is understandable that when the SSD 1 contains more data blocks, the same method can be used for processing, and no specific limitation is made here.

[0076] (2) When upgrading SSD 1, if a write request to write data to SSD 1 is received, it can be handled in the following way:

[0077] Suppose a write request is received to write data A to data block A1 in SSD 1. Since SSD 1 is undergoing an upgrade and cannot directly write data A to data block A1, the obtained data blocks A2, A3, and parity block PA can be input into the same erasure coding decoding algorithm used to generate parity block PA. Because the erasure coding algorithm establishes the mathematical relationship between data blocks A1, A2, A3, and PA when generating parity block PA, the decoding algorithm can use these known data blocks A2, A3, and PA to reconstruct data block A1 through specific calculations. Data A is written to data block A1 to obtain data block A1'. Parity block PA' is calculated using data blocks A1', A2, and A3, and then PA' is used to replace parity block PA.

[0078] Suppose a write request is received to write data B to data block B1 in SSD 1. Since SSD 1 is undergoing an upgrade and cannot directly write data B to data block B1, the obtained data blocks B2, B3, and parity block PB can be input into the same erasure coding decoding algorithm used to generate parity block PB. Because the erasure coding algorithm establishes the mathematical relationship between data blocks B1, B2, B3, and PB when generating parity block PB, the decoding algorithm can use these known data blocks B2, B3, and PB, and reconstruct data block B1 through specific calculations. Data B is then written to data block B1 to obtain data block B1'. Parity block PB' is calculated using data blocks B1', B2, and B3, and then PB' is used to replace parity block PB.

[0079] Suppose a write request is received to write data C to data block C1 in SSD 1. Since SSD 1 is undergoing an upgrade and cannot directly write data C to data block C1, the obtained data blocks C2, C3, and parity block PC can be input into the same erasure coding decoding algorithm used to generate parity block PC. Because the erasure coding algorithm establishes the mathematical relationship between data blocks C1, C2, C3, and PC when generating parity block PC, the decoding algorithm can use these known data blocks C2, C3, and PC to reconstruct data block C1 through specific calculations. Data C is then written to data block C1 to obtain data block C1'. Parity block PC' is calculated using data blocks C1', C2, and C3, and then PC' is used to replace parity block PC.

[0080] It is understandable that when the SSD 1 contains more data blocks, the same method can be used for processing, and no specific limitation is made here.

[0081] After upgrading the firmware of SSD 1, it needs to be rebuilt. During the rebuild, you can rebuild the entire SSD 1 or only rebuild the updated portion. The following is a detailed explanation of how to rebuild the updated portion of SSD 1.

[0082] A solid-state drive (SSD) 1 can be divided into multiple regions, each containing one or more data blocks. For example, suppose SSD 1 includes region 1, region 2, and region 3. Region 1 contains data block A1, region 2 contains data block B1, and region 3 contains data block C1. Each region corresponds to a region marker. When the region marker is the first marker, it indicates that the data blocks in the corresponding region were modified during an SSD 1 upgrade. When the region marker is the second marker, it indicates that the data blocks in the corresponding region were not modified during an SSD 1 upgrade. For example, region 1 corresponds to region marker 1, region 2 corresponds to region marker 2, and region 3 corresponds to region marker 3.

[0083] In the initial state, region marker 1, region marker 2, and region marker 3 are all set as the second marker.

[0084] During the upgrade of SSD 1, assuming a write request is received to write data A to data block A1 in SSD 1, in addition to using data blocks A2, A3, and parity block PA to reconstruct data block A1 through specific calculations, writing data A to data block A1', calculating parity block PA' using data blocks A1', replacing parity block PA with parity block PA', region marker 1 can also be set as the first marker. Therefore, after the upgrade of SSD 1 is complete, data blocks A2, A3, and PA' can be used to reconstruct data block A1' through specific calculations.

[0085] During the upgrade of SSD 1, assuming a write request is received to write data B to data block B1 in SSD 1, in addition to using data blocks B2, B3, and parity block PB to reconstruct data block B1 through specific calculations, writing data B to data block B1 to obtain data block B1', using data blocks B1', B2, and B3 to calculate parity block PB', and replacing parity block PB with parity block PB', region marker 2 can also be set as the first marker. Therefore, after the upgrade of SSD 1 is complete, data blocks B2, B3, and PB' can be used to reconstruct data block B1' through specific calculations.

[0086] During the upgrade of SSD 1, assuming a write request is received to write data C to data block C1 in SSD 1, in addition to using data blocks C2, C3, and the parity block PC and reconstructing data block C1 through specific calculations, writing data C to data block C1 to obtain data block C1', calculating the parity block PC' using data blocks C1', C2, and C3, and replacing the parity block PC with the parity block PC', region marker 3 can also be set as the first marker. Therefore, after the upgrade of SSD 1 is completed, data blocks C2, C3, and PC' can be used to reconstruct the data blocks through specific calculations.

[0087] It is understandable that the above examples are all based on the example of only one region marker being set as the first marker. In other methods, there may be two or even more region markers being set as the first marker at the same time. In that case, we can simply reconstruct the data blocks under the regions corresponding to these region markers.

[0088] After the reconstruction is complete, when it is necessary to read or write data blocks on SSD 1, the read and write operations can be performed directly on the data blocks in SSD 1. Here, performing read and write operations directly on the data blocks in SSD 1 is the opposite of indirectly performing read and write operations on the data blocks in SSD 1 by performing read and write operations on the data blocks in other SSDs as described above.

[0089] After the reconstruction is completed, if a read request is received to read data A from data block A1' in SSD 1, data A can be read directly from data block A1' in SSD 1; if a write request is received to write data A' to data block A1' in SSD 1, data A' can be written directly to data block A1' in SSD 1.

[0090] After the reconstruction is complete, if a read request is received to read data B from data block B1' in SSD 1, data B can be read directly from data block B1' in SSD 1; if a write request is received to write data B' to data block B1' in SSD 1, data B' can be written directly to data block B1' in SSD 1.

[0091] After the reconstruction is complete, if a read request is received to read data C from data block C1' in SSD 1, data C can be read directly from data block C1' in SSD 1; if a write request is received to write data C' to data block C1' in SSD 1, data C' can be written directly to data block C1' in SSD 1.

[0092] See Figure 3 , Figure 3 This is a flowchart illustrating a data storage method provided in this application. Figure 3 As shown, the data storage method of this application includes:

[0093] S101: The data storage system receives a first notification to upgrade the firmware of the first hard drive.

[0094] The first hard disk can be one or more hard disks in a data storage system. The first hard disk includes a first data block, which, along with other data blocks from different hard disks and a parity block, forms a first stripe. The data block is a physical block used to store data, and the parity block is a physical block used to store first parity data. The first parity data is used to verify the data stored in the multiple data blocks, including the first data block.

[0095] Firmware is a set of program code stored in the flash memory chip inside a hard drive. It acts like the "brain" of the hard drive, controlling and managing its various hardware components to ensure proper functioning and effective communication with the computer system. As technology advances and usage demands increase, the initial firmware may not fully realize the hard drive's potential. Therefore, upgrading the firmware optimizes data read / write algorithms and improves data transfer rates.

[0096] S102: The data storage system determines whether it has received the first read request or the first write request.

[0097] The first read request is a request to read first data from the first data block in the first hard drive during the firmware upgrade of the first hard drive. The first data can be all or part of the data in the first data block. For example, when the size of the first data block is 4 kilobytes, the length of the first data can be 4 kilobytes, or it can be one byte, or some other length.

[0098] The first write request is a request to write second data to a first data block on the first hard drive during a firmware upgrade. The second data can be all or part of the data in the first data block. For example, when the size of the first data block is 4 kilobytes, the length of the second data can be 4 kilobytes, one byte, or another length.

[0099] If the first read request is received, proceed to step S103; if the first write request is received, proceed to step S104.

[0100] S103: The data storage system calculates the first data block based on the data in the data blocks other than the first data block in the first stripe and the first check data, and reads the first data from the first data block.

[0101] When a read request is received to read the first data from the first data block in the first hard disk, since the first hard disk is undergoing an upgrade and cannot directly read the first data from the first data block, the data from the data blocks other than the first data block in the first stripe and the first parity data from the parity block can be input into the erasure coding decoding algorithm, which is the same as that used when generating the parity block. Because the erasure coding algorithm establishes the mathematical relationships between the data blocks in the first stripe when generating the parity block, the decoding algorithm can use the data blocks other than the first data block in the first stripe and the parity block, and reconstruct the first data block through specific calculations, thereby obtaining the first data from the first data block.

[0102] S104: The data storage system calculates a first data block based on the first write request using data from data blocks other than the first data block in the first stripe and the first check data. It writes the second data into the first data block to obtain a second data block. It calculates the second check data using the second data block and data from data blocks other than the first data block in the first stripe. It writes the second check data into the check block to replace the first check data and sets the region tag to which the first data block belongs to the first tag.

[0103] The first hard drive can be divided into multiple regions, each containing one or more data blocks. Each region corresponds to a region marker. When the region marker is the first marker, it indicates that the data blocks in the corresponding region were modified during the first hard drive upgrade. When the region marker is the second marker, it indicates that the data blocks in the corresponding region were not modified during the first hard drive upgrade.

[0104] Upon receiving a write request to write second data to the first data block in the first hard disk, since the first hard disk is undergoing an upgrade and cannot directly write the second data to the first data block, the data from the data blocks other than the first data block in the first stripe and the first check data from the check block can be input into the same erasure coding decoding algorithm used when generating the check block. Because the erasure coding algorithm establishes the mathematical relationships between the data blocks in the first stripe when generating the check block, the decoding algorithm can use the data blocks other than the first data block in the first stripe and the check block, and reconstruct the first data block through specific calculations. The second data is then written into the first data block to obtain the second data block. The second check data is calculated using the second data block and the data from the data blocks other than the first data block in the first stripe, and written into the check block to replace the first check data. The region marker to which the first data block belongs is then set to the first marker.

[0105] S105: The data storage system receives a second notification that the firmware upgrade of the first hard drive is complete.

[0106] S106: The data storage system calculates a second data block based on the first mark using the data blocks in the first strip other than the first data block and the second check data, and replaces the first data block with the second data block.

[0107] S107: The data storage system determines whether it has received a second read request or a second write request.

[0108] The second read request is a request to read second data from the second data block in the first hard drive after the firmware upgrade of the first hard drive is completed.

[0109] The second write request is a request to write third data into the first data block of the first hard drive after the firmware upgrade of the first hard drive is completed. The third data can be all or part of the data in the first data block. For example, when the size of the first data block is 4 kilobytes, the length of the third data can be 4 kilobytes, one byte, or another length.

[0110] If a second read request is received, proceed to step S108; if a second write request is received, proceed to step S109.

[0111] S108: The data storage system reads the second data from the second data block based on the second read request.

[0112] S109: The data storage system writes third data to the second data block based on the second write request.

[0113] See Figure 4 , Figure 4This is a schematic diagram of a data storage device provided in an embodiment of this application. The data storage device can be used to implement the aforementioned... Figure 3 The data storage method. The data storage device can be applied to the aforementioned Figure 2 Data storage system 20. For example... Figure 4 As shown, the data storage device includes:

[0114] The receiving module 110 is configured to receive a first read request upon receiving a first notification to upgrade the firmware of the first hard disk, wherein the first read request is used to read first data in the first data block;

[0115] The reading module 120 is used to, upon receiving a first read request, calculate a first data block based on the data in the data blocks of the first strip (excluding the first data block) and the first check data, and read the first data from the first data block.

[0116] The receiving module 110 is used to receive a first write request when a first notification to upgrade the firmware of the first hard disk is received, wherein the first write request is used to write second data into the first data block.

[0117] The write module 130 is configured to, upon receiving a first write request, calculate a first data block based on the first write request using data from data blocks in the first stripe excluding the first data block and first check data, write second data into the first data block to obtain a second data block, calculate second check data using the second data block and data from data blocks in the first stripe excluding the first data block, and write the second check data into a check block to replace the first check data.

[0118] The receiving module 110, reading module 120, and writing module 130 can all be implemented in software or in hardware. For example, the implementation of the reading module 120 will be described below. Similarly, the implementation of the receiving module 110 and writing module 130 can refer to the implementation of the reading module 120.

[0119] As an example of a software functional unit, the reading module 120 includes executable code.

[0120] As an example of a hardware functional unit, the reading module 120 is implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0121] It should be noted that, in other embodiments, the receiving module 110 can be used to perform... Figure 3 The read module 120 can be used to execute any step in the data storage method. Figure 3 The write module 130 can be used to execute any step in the data processing method. Figure 3 In the data storage method, any step implemented by the receiving module 110, reading module 120, and writing module 130 can be specified as needed, and implemented by the receiving module 110, reading module 120, and writing module 130 respectively. Figure 3 Different steps in the data storage method are used to realize the full function of the data storage device.

[0122] 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 solid-state drive or stored on any usable medium. When the computer program product runs on the hard drive, it causes the hard drive to perform the aforementioned actions. Figure 3 Data storage method.

[0123] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any usable medium that a computing device can store, or a data storage device such as a data center containing one or more usable media. The usable 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 hard disk to perform the aforementioned actions. Figure 3 Data storage method.

[0124] It should be understood that in the embodiments of this application, "when," "...when," and "if" all refer to the device making corresponding processing under certain objective circumstances, and are not time-limited, nor do they require the device to make a judgment action, nor do they imply any other limitations.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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. Such 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 this application.

Claims

1. A data storage system, characterized in that, The system includes a first stripe, which comprises multiple blocks, each originating from a different hard drive. The multiple blocks include multiple data blocks and a check block. The data blocks are physical blocks used to store data, and the check blocks are physical blocks used to store first check data. The first check data is used to check the data stored in the multiple data blocks. The data storage system is configured to receive a first read request upon receiving a first notification to upgrade the firmware of the first hard disk, wherein the first read request is configured to read first data in the first data block; The data storage system is also used to, upon receiving the first read request, calculate the first data block based on the data in the data blocks other than the first data block in the first stripe and the first check data, and read the first data from the first data block.

2. The method according to claim 1, characterized in that, The data storage system is used to receive a first write request upon receiving a first notification to upgrade the firmware of the first hard disk, wherein the first write request is used to write second data into the first data block; The data storage system is also configured to, upon receiving the first write request, calculate a first data block based on the first write request using data from data blocks in the first stripe excluding the first data block and the first check data, write the second data into the first data block to obtain a second data block, calculate second check data using the second data block and data from data blocks in the first stripe excluding the first data block, and write the second check data into the check block to replace the first check data.

3. The system according to claim 2, characterized in that, The data storage system is also configured to, upon receiving the first write request, set the region tag to which the first data block belongs to the first tag; The data storage system is also used to calculate a second data block based on the first marker using data blocks other than the first data block in the first stripe and the second check data, upon receiving a second notification that the firmware upgrade of the first hard disk is complete; Replace the first data block with the second data block.

4. The system according to claim 3, characterized in that, The data storage system is also used to receive a second read request, wherein the second read request is used to read second data in the second data block; The data storage system is also used to read the second data from the second data block based on the second read request.

5. The system according to claim 3, characterized in that, The data storage system is also used to receive a second write request, wherein the second write request is used to write third data into the second data block; The data storage system is also used to write the third data to the second data block based on the second write request.

6. A data storage method, characterized in that, The system includes a first stripe, which comprises multiple blocks, each originating from a different hard drive. The multiple blocks include multiple data blocks and a check block. The data blocks are physical blocks used to store data, and the check blocks are physical blocks used to store first check data. The first check data is used to check the data stored in the multiple data blocks. Upon receiving a first notification to upgrade the firmware of the first hard disk, the data storage system receives a first read request, wherein the first read request is used to read the first data in the first data block; Upon receiving the first read request, the data storage system calculates the first data block based on the data in the data blocks other than the first data block in the first stripe and the first check data, and reads the first data from the first data block.

7. The method according to claim 6, characterized in that, The method further includes: Upon receiving a first notification to upgrade the firmware of the first hard disk, the data storage system receives a first write request, wherein the first write request is used to write second data into the first data block; Upon receiving the first write request, the data storage system calculates a first data block based on the first write request using data from data blocks in the first stripe excluding the first data block and the first check data. It then writes the second data into the first data block to obtain a second data block. Using the second data block and data from data blocks in the first stripe excluding the first data block, it calculates second check data and writes the second check data into the check block to replace the first check data.

8. The method according to claim 7, characterized in that, Upon receiving the first write request, the data storage system calculates second check data based on the first write request using the second data and data from data blocks in the first stripe excluding the first data block, and replaces the first check data with the second check data, including: Upon receiving the first write request, the data storage system sets the region marker to which the first data block belongs to the first marker; Upon receiving a second notification that the firmware upgrade of the first hard drive is complete, the second data block is calculated based on the first marker using the data blocks in the first stripe excluding the first data block and the second check data; Replace the first data block with the second data block.

9. The method according to claim 8, characterized in that, After replacing the first data block with the second data block, the method further includes: The data storage system receives a second read request, wherein the second read request is used to read the second data in the second data block; The data storage system reads the second data from the second data block based on the second read request.

10. The method according to claim 8, characterized in that, After replacing the first data block with the second data block, the method further includes: The data storage system receives a second write request, wherein the second write request is used to write third data into the second data block; The data storage system writes the third data to the second data block based on the second write request.

11. A data storage device, characterized in that, The data storage device includes units for implementing the method as described in any one of claims 6-10.

12. A computer program product containing instructions, characterized in that, When the instruction is executed by the hard disk, the hard disk performs the method as described in any one of claims 6-10.

13. A computer-readable storage medium, characterized in that, It includes computer program instructions that, when executed by a hard disk, implement the method as described in any one of claims 6-10.