Data processing method and system and related equipment
By recording the writing status and corresponding relationship of the storage device in the controller, the performance consumption of bitmap operations in soft RAID is avoided, the problem of prolonged writing time of existing soft RAID is solved, and data reliability recovery and processor are achieved. Performance optimization.
Patent Information
- Application Number
- CN202310283422.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-13
- Publication Date
- 2024-09-13
AI Technical Summary
Existing software RAID requires additional operations to modify and save bitmaps when the processor writes data to the storage device, causing the processor to generate 1 to 2 times the amount of IO, severely reducing processor performance and increasing latency.
Obtain the monitoring results of data being written to the storage device through the controller, record the correspondence between the storage unit and its status, and store it in the persistent storage medium to avoid consuming computing and memory resources to perform bitmap modifications during the writing process. Operation, the processor recovers data according to the corresponding relationship during exception recovery.
It reduces the impact of data writing on processor performance, reduces processor power consumption, and ensures reliable recovery of data under abnormal circumstances.
Smart Images

Figure CN118642645A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, system and related equipment. Background Art
[0002] Currently, computing devices such as servers are usually configured with multiple hard disks to improve the storage capacity, storage reliability and other performance of the computing devices. The multiple hard disks can logically form a hard disk group.
[0003] Multiple hard disks on a computing device can be combined in a specified way to form a redundant array of independent disks (RAID). Generally speaking, RAID can be divided into two types: hard RAID and soft RAID. Among them, hard RAID refers to the use of independent hard RAID cards to implement RAID functions. Soft RAID refers to the use of computing devices' operating systems, processors, memory and other resources to implement RAID functions. Compared with hard RAID, soft RAID has advantages in compatibility, hardware cost and hardware maintenance, but its performance is lower than that of hard RAID.
[0004] A bitmap needs to be created and maintained in advance in the soft RAID. For example, a write-intent bitmap can be created in the soft RAID. The bitmap is used to identify the data storage area in the hard disk where data needs to be updated. When multiple hard disks on a computing device constitute a soft RAID, the processor needs to generate and submit additional input / output (IO) to modify the bitmap for each byte written to the soft RAID during the process of writing data to the soft RAID. After completing the bitmap modification, the processor writes the byte to the corresponding storage location in the soft RAID. In this way, if the processor or the soft RAID has an abnormality such as power failure during the process of storing data, the computing device can also synchronize the data on multiple hard disks in the software RAID according to the bitmap stored in the soft RAID during the abnormal recovery process to ensure the reliability of data storage in the soft RAID.
[0005] However, the additional operation of modifying and saving the bitmap causes the processor to generate 1 to 2 times the IO volume, which seriously reduces the performance of the processor in processing services, such as increasing the latency of the processor in processing services. Therefore, there is an urgent need for a data processing method to minimize the impact of data writing on the performance of the processor in processing services when the processor writes data to a storage device. Summary of the invention
[0006] The present application provides a data processing method to minimize the impact of data writing on the performance of the processor in the computing device in processing services during the process of the processor writing data to the storage device. In addition, the present application also provides a corresponding data processing system, a storage device, a computer-readable storage medium, and a computer program product.
[0007] In a first aspect, the present application provides a data processing method, which is executed by a controller. Specifically, the controller obtains a monitoring result of data being written to a first storage device, and the monitoring result is used to indicate a first storage state of a first storage unit of the first storage device where data is written, wherein the first storage device may generally include multiple storage units, and the first storage unit is a storage unit among the multiple storage units for storing the data, and the first storage unit is a storage unit in RAID for supporting data write operations, such as a storage unit of 512B in RAID, or a storage unit of 4KB in RAID, and the first storage state of the first storage unit is used to identify the saturation of the first storage unit for storing data, such as identifying that all storage space in the first storage unit is used to store data, or identifying that part of the storage space (85% of the storage space) in the first storage unit is used to store data, etc.; then, the controller records a first corresponding relationship between the first storage unit and the first storage state, such as recording the first corresponding relationship in the form of a key-value pair, etc., and stores the first corresponding relationship in a persistent storage medium of the controller, and the first corresponding relationship is used to recover the data written to the first storage device by the processor when a data write exception occurs.
[0008] In this way, if the first storage device or the processor that writes data to the first storage device subsequently experiences an abnormality such as power failure, during the abnormality recovery process, the processor can recover the data in the first storage device that was not successfully written due to abnormalities such as power failure based on the first corresponding relationship of persistent storage to ensure the reliability of data storage. In addition, during the data writing process, the processor only needs to send the data to be stored to the storage device, and does not need to consume computing and memory resources to perform operations to modify and save the bitmap, so that the processor can have more computing, cache and other resources to process services, which can effectively reduce the impact of data writing on the performance of the processor in processing services and reduce the power consumption of the processor.
[0009] In a possible implementation mode, RAID may further include more storage devices, for example, including a second storage device, the processor may also write data to the second storage device, then, the controller may also obtain the monitoring result of data being written to the second storage device, the monitoring result is used to indicate the second storage state of the second storage unit of the second storage device, the second storage unit is a storage unit in RAID for supporting data writing operations, such as a storage unit of 512B length in RAID, the second storage state is used to identify the saturation of the second storage unit storing data; then, the controller may record the second corresponding relationship between the second storage unit and the second storage state in the form of a key-value pair or other forms, and store the second corresponding relationship to the persistent storage medium of the controller, the second corresponding relationship is used to restore the data written by the processor to the second storage device when a data writing exception occurs. In this way, the subsequent processor can restore the data that was not successfully written in the second storage device due to abnormalities such as power failure according to the second corresponding relationship of persistent storage to ensure the reliability of data storage. Moreover, during the data writing process, the processor can send the data to be stored to the second storage device, which can effectively reduce the impact of data writing on the performance of the processor in processing services and reduce the power consumption of the processor.
[0010] Optionally, the first storage device and the second storage device may form a soft RAID based on RAID1.
[0011] In a possible implementation, the controller is deployed outside the first storage device and the second storage device. In this case, the controller can be deployed separately from each storage device. In this way, the corresponding relationship between each storage unit and the storage state in multiple storage devices in the RAID can be managed and controlled by deploying one controller.
[0012] In a possible implementation, the controller includes a first controller and a second controller, wherein the first controller is deployed inside the first storage device, and the second controller is deployed inside the second storage device. In this way, the controller in each storage device is also responsible for managing the correspondence between each storage unit in the storage device and its storage state during the process of writing data to the persistent storage medium, thereby reducing the difficulty of improving the internal hardware of the storage device and reducing the improvement cost.
[0013] In a possible implementation, the controller can also obtain the first correspondence and the second correspondence stored in the persistent storage medium of the controller after a data write exception occurs, and recover the data that failed to be written to the RAID when the data write exception occurs based on the first correspondence and the second correspondence. In this way, the processor can implement abnormal recovery of data writing based on the first correspondence and the second correspondence stored in persistent storage to ensure the reliability of data storage.
[0014] In one possible implementation, the controller can specifically determine the data to be recovered that failed to be written in the first storage device and the second storage device based on the first correspondence and the second correspondence, that is, the data that was not successfully written when the data writing exception occurred, so that the processor can write the data to be recovered to the first storage device and the second storage device respectively, to achieve abnormal recovery of data writing, thereby ensuring the reliability of data storage.
[0015] In a possible implementation, the first storage device provides a query interface for processing, and when the processor obtains the first corresponding relationship stored in the persistent storage medium, it may specifically call the query interface to obtain the first corresponding relationship stored in the persistent storage medium. In this way, the processor may obtain the corresponding relationship by calling the interface.
[0016] In a possible implementation, the first storage device may further provide a deletion interface for the processor, so that the processor may call the deletion interface to delete the first correspondence stored in the persistent storage medium to release the storage space occupied by the first correspondence.
[0017] In the second aspect, the present application provides a data processing system, including a processor, a controller and a first storage unit, the first storage unit belongs to a first storage device, the controller can be deployed outside the first storage device, or can be deployed inside the first storage device; wherein the processor is used to write data to the first storage device; the controller is used to obtain the monitoring result of the data being written to the first storage device, the monitoring result is used to indicate the first storage state of the data being written to the first storage unit, the first storage unit is a storage unit in RAID for supporting data writing operations, and the first storage state is used to identify the saturation of the data stored in the first storage unit; and the controller is also used to record the first corresponding relationship between the first storage unit and the first storage state, and store the first corresponding relationship to the persistent storage medium of the controller; the processor is also used to use the first corresponding relationship to restore the data written by the processor to the first storage device when a data writing exception occurs. In this way, if the subsequent first storage device or the processor that writes data to the first storage device has an exception such as power failure, in the abnormal recovery process, the processor can restore the data in the first storage device that was not successfully written due to the abnormality such as power failure according to the first corresponding relationship of persistent storage to ensure the reliability of data storage. Moreover, during the data writing process, the processor only needs to send the data to be stored to the storage device, and does not need to consume computing and memory resources to perform operations such as modifying and saving the bitmap. As a result, the processor can have more computing, cache and other resources to handle business, which can effectively reduce the impact of data writing on the performance of the processor in handling business and reduce the power consumption of the processor.
[0018] In one possible implementation, the RAID also includes a second storage device; then, the controller is further used to obtain a monitoring result of data being written to the second storage device, the monitoring result of the second storage device is used to indicate a second storage state of a second storage unit of the second storage device in which data is written, the second storage unit is a storage unit in the RAID for supporting data write operations, and the second storage state is used to identify the saturation of data stored in the second storage unit; the controller is further used to record a second correspondence between the second storage unit and the second storage state, and store the second correspondence to a persistent storage medium, the second correspondence is used to restore the processor to write data to the first storage device when a data write exception occurs, that is, the processor can also be used to restore the data written by the processor to the second storage device according to the second correspondence.
[0019] In a possible implementation, the controller is deployed outside the first storage device and the second storage device.
[0020] In a possible implementation, the RAID further includes a second storage device, and the controller includes a first controller and a second controller, wherein the first controller is deployed inside the first storage device, and the second controller is deployed inside the second storage device.
[0021] In a possible implementation, the processor is specifically used to obtain a first correspondence relationship and a second correspondence relationship stored in a persistent storage medium after a data write exception occurs; and based on the first correspondence relationship and the second correspondence relationship, recover data that failed to be written to the RAID when the data write exception occurs.
[0022] In a possible implementation, the processor is specifically configured to determine the data to be recovered that failed to be written in the first storage device and the second storage device according to the first corresponding relationship and the second corresponding relationship, and write the data to be recovered to the first storage device and the second storage device respectively.
[0023] In a possible implementation, the first storage device provides a query interface to the processor, and the processor is specifically configured to call the query interface to obtain the first corresponding relationship stored in the persistent storage medium.
[0024] In a possible implementation, the first storage device provides a deletion interface to the processor, and the processor is further configured to: call the deletion interface to delete the first corresponding relationship stored in the persistent storage medium.
[0025] In a third aspect, the present application provides a storage device, which includes a storage unit and a controller; the storage unit is used to store data and serves as a storage unit in an independent disk redundant array RAID for supporting data write operations; the controller is used to obtain monitoring results of data being written to the storage device, the monitoring results are used to indicate the storage status of the storage unit of the storage device where the data is written, and the storage status is used to identify the saturation of the storage unit storing data; record the correspondence between the storage unit and the storage status; store the correspondence in the persistent storage medium of the controller, and the correspondence is used to recover the data written to the storage device by the processor when a data write exception occurs.
[0026] In a possible implementation, the storage device provides a query interface for the processor, where the query interface is used to support the processor calling so that the processor obtains the corresponding relationship stored in the persistent storage medium.
[0027] In a possible implementation, the storage device provides a deletion interface for the processor, and the deletion interface is used to support the processor to call, so that the processor deletes the corresponding relationship stored in the persistent storage medium.
[0028] In a fourth aspect, the present application provides a controller comprising modules for executing the data processing method in the first aspect or any possible implementation manner of the first aspect.
[0029] In a fifth aspect, the present application provides a RAID comprising at least one storage device as described in the third aspect or any implementation manner of the third aspect.
[0030] In a sixth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a computing device, the computing device executes the operating steps of the data processing method described in the first aspect or any one of the implementations of the first aspect.
[0031] In a seventh aspect, the present application provides a computer program product comprising instructions, which, when executed on a computing device, enables the computing device to execute the operational steps of the data processing method described in the first aspect or any one of the implementations of the first aspect.
[0032] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of the structure of an exemplary data processing system provided by the present application;
[0034] Figure 2 A schematic diagram of the structure of another exemplary data processing system provided by the present application;
[0035] Figure 3 A flowchart of a data processing method provided in this application;
[0036] Figure 4 A schematic diagram of combining the storage device 200 and the storage device 300 provided in the present application based on the RAID1 technology;
[0037] Figure 5 A schematic diagram of the storage device 200 and the storage device 300 provided in the present application using 10 storage units to store 40KB of data respectively;
[0038] Figure 6 A schematic diagram of the correspondence between storage units and storage states respectively recorded in the storage device 200 and the storage device 300 provided in the present application. DETAILED DESCRIPTION
[0039] In order to minimize the impact of data writing on the performance of the processor in processing business during the process of the processor writing data to the storage device, the present application provides a data processing method, which records the storage address and storage status during the data writing process through a controller in the storage device or a separately deployed controller, instead of the processor recording this information by modifying and saving a bitmap, thereby effectively reducing the impact of data writing on the performance of the processor in processing business.
[0040] The technical solution in the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0041] See also Figure 1 , is a schematic diagram of the structure of an exemplary data processing system provided by this application. Figure 1 As shown, the data processing system 10 includes a processor 100 and a plurality of storage devices. Figure 1 In the example, the storage device 200 and the storage device 300 are included. In addition, the storage device 200 and the storage device 300 can be connected to the processor 100 through a bus, for example, through a compute express link (CXL) bus, a peripheral component interconnect express (PCIE) bus, an inter-integrated circuit (I2C) bus, a unified bus (UB or Ubus) and one or more buses connected to the processor 100. When the processor 100 and each storage device are connected using a high-speed bus such as PCIe, the speed at which the processor 100 writes data to the storage device can be increased and the delay can be reduced.
[0042] The processor 100 may be, for example, a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete device components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0043] The storage device 200 may include a controller 201 and a persistent storage medium 202 .
[0044] The controller 201 is used to write data to the persistent storage medium 202 and read data from the persistent storage medium 202. Exemplarily, the controller 201 may be, for example, a CPU, or may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an artificial intelligence (AI) chip, a data processing unit (DPU), or any combination thereof.
[0045] The persistent storage medium 202 is used to store data written by the processor 100. Specifically, the persistent storage medium 202 may include multiple storage units, each of which may be a storage area of a fixed size, such as a size of 512B (bytes) or 4KB (kilobytes). Exemplarily, the persistent storage medium 202 may be, for example, a non-volatile storage medium, such as a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
[0046] Further, the storage device 200 may also include a storage medium 203, which may be used to cache data, such as caching the storage address and storage status corresponding to the data written into the persistent storage medium 202. Exemplarily, the storage medium 203, for example, may be a volatile storage medium, such as a random access memory (RAM). By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DR RAM).
[0047] Similarly, the storage device 300 may include a controller 301 , a persistent storage medium 302 , a storage medium 303 , and the like.
[0048] Exemplarily, the storage device 200 and the storage device 300 can form a storage array, such as any type of soft RAID such as RAID0, RAID1, etc. At this time, the data stored between the storage device 200 and the storage device 300 can be kept synchronized to ensure the reliability of data storage. Among them, the storage device 200 and the storage device 300, for example, can be a solid state disk (SSD); according to the interface type, the SSD can be divided into one or more of a serial advanced technology attachment (SATA) SSD, a serial attached small computer system interface (SAS) SSD, a PCIe SSD, and a fast non-volatile memory (NVMe) SSD. Alternatively, the storage device 200 and the storage device 300 can also be other types of devices such as a mechanical hard disk (HDD), which is not limited here.
[0049] In order to minimize the impact of data writing on the performance of the processor in processing services, in the data processing system 10 provided by the present application, when the processor 100 writes data to the storage device 200, the controller 201 records the storage status of the written data in the storage device 200, and the storage status is used to indicate the saturation of the storage unit in the data storage device 200 storing data. Specifically, the controller 201 obtains the storage status of the storage unit where the data is written in the storage device 200, and records and persistently stores the corresponding relationship 1 between the storage unit and the storage status. In this way, if the subsequent processor 100 or the storage device 200 has an abnormality such as power failure, during the abnormal recovery process, the processor 100 can recover the data in the storage device 200 that was not successfully written due to abnormalities such as power failure according to the persistently stored corresponding relationship 1, so as to ensure the reliability of data storage. Moreover, during the data writing process, the processor 100 only needs to send the data to be stored to the storage device 200, and does not need to consume computing and memory resources to perform operations such as modifying and saving the bitmap. Thus, the processor 100 can have more computing, cache and other resources to process services, which can effectively reduce the impact of data writing on the performance of the processor 100 in processing services and reduce the power consumption of the processor 100.
[0050] Similarly, during the process of the processor 100 writing data to the storage device 300, the controller 301 obtains the storage status of the storage unit in the storage device 300 where the data is written, and records and persistently stores a correspondence 2 between the storage unit and the storage status, so that when an abnormality such as power failure occurs in the processor 100 or the storage device 300, the processor 100 can recover the data in the storage device 300 that was not successfully written due to abnormalities such as power failure based on the persistently stored correspondence 2.
[0051] exist Figure 1 In the data processing system 10 shown, the controller in the storage device (the controller 201 or the controller 301) executes the data processing method. In other possible data processing systems, the data processing method may be executed by a controller that is independently deployed from the storage device.
[0052] Specifically, see Figure 2 , shows a schematic diagram of the structure of another data processing system 20. Figure 1Based on the structure of the data processing system 10 shown, the data processing system 20 also includes a controller 400, which is deployed independently of each storage device. Then, in the process of the processor 100 writing data to the storage device 200 and the storage device 300 respectively, the controller 400 respectively obtains the storage state of the storage unit of the data written into the storage device 200, and records and persistently stores the corresponding relationship 1 between the storage unit and the storage state; and obtains the storage state of the storage unit of the data written into the storage device 300, and records and persistently stores the corresponding relationship 2 between the storage unit and the storage state.
[0053] It should be noted that the above Figure 1 as well as Figure 2 The data processing system shown is only used as some exemplary illustrations and is not used to limit the specific implementation of the data processing system. For example, in other possible implementations, the data processing system may include a larger number of storage devices, so that multiple storage devices in the data processing system can constitute RAID5 or other types of soft RAID. Moreover, the types of multiple storage devices in the data processing system can be the same or different. For another example, the storage device 200 (and the storage device 300) may further include a cache, so that when the controller 201 writes data to the persistent storage medium 202, it can first write the data to the cache, and then write the data in the cache to the persistent storage medium 202.
[0054] For ease of understanding, an embodiment of the data processing method provided by the present application is described below in conjunction with the accompanying drawings.
[0055] See also Figure 3 , Figure 3 A flowchart of a data processing method provided in an embodiment of the present application, which can be applied to Figure 1 The data processing system 10 or Figure 2 The data processing system 20 shown in FIG. 1 may be applied to other applicable data processing systems. Figure 1 The data processing system 10 shown in FIG. Figure 1 In the data processing system 10 shown, the controller may specifically include a controller 201 and a controller 202 , and the controller 201 is deployed inside the storage device 200 , and the controller 301 is deployed inside the storage device 300 .
[0056] in, Figure 3 The data processing method shown may specifically include:
[0057] S301: The processor 100 writes data to the storage device 200 and the storage device 300 respectively.
[0058] In this embodiment, the storage device 200 and the storage device 300 can be combined based on RAID technology to form a soft RAID, which is used to jointly store the data that the processor 100 needs to write, so as to ensure the reliability of the data stored in the data processing system 10. Taking the combination of the storage device 200 and the storage device 300 based on RAID1 technology as an example, the storage device 200 and the storage device 300 achieve data redundancy through data mirroring. That is, when the processor 100 writes data a, data b, and data c to the storage device 200, the mirrored data of these data will be written to the storage device 300, such as Figure 4 In this way, when one of the storage devices fails, the processor 100 can also read the required data from another storage device, thereby improving the reliability of data storage.
[0059] In actual application, one or more services may be run on the processor 100, and the data sent by the processor 100 to the storage device 200 and the storage device 300 may be data generated by the processor 100 in the process of processing the service. Alternatively, the processor 100 may establish a communication connection with a user-oriented client or user terminal, so that the data sent by the processor 100 to the storage device 200 and the storage device 300 may be data uploaded by the user through the client or user terminal.
[0060] Exemplarily, when sending data to a storage device, an operating system may be running on the processor 100, and a kernel in the operating system may generate one or more input / output (IO) including data to be written and a storage address corresponding to the data, and send the one or more IOs to the storage device 200 and the storage device 300, respectively.
[0061] S302: The controller 201 obtains the monitoring result of data being written to the storage device 200, and the monitoring result is used to indicate the first storage state of the first storage unit of the storage device 200 where data is written. The first storage unit is a storage unit in the RAID for supporting data writing operations, and the first storage state is used to identify the saturation of the data stored in the first storage unit.
[0062] For each IO issued by the processor 100, the controller 201 can write the data carried by the IO into one or more corresponding storage units in the persistent storage medium 202 according to the storage address indicated by the IO. For ease of understanding and description, the following uses an example of using a storage unit to store the data carried in an IO, and the storage unit is called a first storage unit, which is used to persistently store the data.
[0063] Exemplarily, the storage address carried in the IO may be, for example, the starting address of the first storage unit. In this case, the length of the first storage unit may be a default value, such as a default length of 4KB. Thus, after receiving the IO, the controller 201 may use the continuous 4KB storage address starting from the starting address as the first storage unit for storing the data, and write the data into the first storage unit.
[0064] During the process of storing data in IO in the first storage unit, the controller 201 can continuously monitor the data storage situation of the first storage unit and generate corresponding monitoring results, which are used to indicate the first storage state of the data being written into the first storage unit, and the first storage state is used to identify the saturation of the data stored in the first storage unit.
[0065] Among them, the saturation of the data stored in the first storage unit can reflect the proportion of storage space used by the first storage unit when storing data. In the first implementation example, the saturation value can be 0 or 1, and when the saturation value is 0, it indicates that the first storage unit has not stored the data in the IO, and at this time, the first storage state is incomplete storage; when the saturation value is 1, it indicates that the first storage unit has completed the storage of all the data in the IO, and at this time, the first storage state is data storage is complete. Normally, all storage space in the first storage unit is used to store the data in the IO. In the second implementation example, the saturation value can be multiple values between 0 and 1. At this time, the saturation value can not only indicate whether the data in the IO is completely stored in the first storage unit, but also reflect the proportion of the storage space used to store data in the first storage unit to the total storage space.
[0066] S303: The controller 201 records a first corresponding relationship between the first storage unit and the first storage state according to the monitoring result.
[0067] S304 : the controller 201 stores the first corresponding relationship in a persistent storage medium of the controller 201 .
[0068] During the process of storing data in the storage device 200 , the controller 201 may record a first corresponding relationship between the first storage unit and the first storage state of the first storage unit according to the monitoring result.
[0069] As a first example, the controller 201 may record the corresponding relationship between the storage unit and the storage status in a key-value format, such as the format of the recorded corresponding relationship may be <storage unit identifier, storage status identifier>. In this way, the controller 201 may determine, based on the monitoring results, that before all the data in IO is written into the first storage unit, the first storage status of the first storage unit is incomplete storage (that is, the storage space of the first storage unit is not fully occupied). At this time, the first corresponding relationship recorded by the controller 201 may specifically be <first storage unit, incomplete storage>. When it is determined based on the results of continuous monitoring that all the data in IO are written into the first storage unit, the controller 201 may modify the value of the first storage status in the corresponding relationship, and update the recorded first corresponding relationship to <first storage unit, storage completed>.
[0070] When recording the first correspondence between the first storage unit and the first storage state, the controller 201 may first cache the first correspondence in the storage medium 203 in the storage device 200. In this way, before writing data, the controller 201 may first cache the first correspondence <first storage unit, storage not completed> in the storage medium 203. Then, the controller 201 writes data to the persistent storage medium 202, and after the data is written, updates the first correspondence to <first storage unit, storage completed> in the storage medium 203.
[0071] As a second example, before the first storage unit completes the storage of all data in the IO, or before all storage space of the first storage unit is occupied, the controller 201 may not record the correspondence between the first storage unit and the first storage state, that is, the first storage unit is assumed to have not completed data storage. When it is determined according to the result of continuous monitoring that the first storage unit has completed data storage, the controller 201 generates a first correspondence between the first storage unit and the first storage state, and the recorded first correspondence is <first storage unit, storage completed>. The controller 201 may record the first correspondence in the storage medium 203, etc.
[0072] Typically, the storage capacity of the storage medium 203 is limited, for example, only 4KB, and the controller 201 may cache the correspondence between multiple storage units and their storage states in the storage medium 203. Therefore, when the data volume of the correspondence cached in the storage medium 203 reaches a threshold, such as 3.5KB, etc., the controller 201 may send the cached first correspondence (and the correspondence between other storage units and storage states) to the persistent storage medium 202 to persistently store the first correspondence.
[0073] Alternatively, when an abnormality occurs in the processor 100 or the storage device 200, such as a power failure, the controller 201 may write the first correspondence in the storage medium 203 to the persistent storage medium 202. In this embodiment, the storage medium 203 has a power preservation feature, so that when the storage device 200 loses power (such as disconnecting from the power supply in the processor 100), the capacitor or battery in the storage device 200 can support the controller 201 to complete writing the first correspondence cached in the storage medium 203 to the persistent storage medium 202, so as to avoid the loss of the first correspondence recorded in the cache medium 203.
[0074] Alternatively, after the controller 201 generates the first correspondence in the storage medium 203, it can send the first correspondence to the persistent storage medium 202 for persistent storage. In this embodiment, the specific implementation method for triggering the controller 201 to write the first correspondence to the persistent storage medium 202 is not limited.
[0075] Exemplarily, the first correspondence recorded by the controller 201 may be stored in the persistent storage medium 202 in a file format. For example, the controller 201 may record the first correspondence in a file, such as a file named recent_writes. Then, the controller 201 may write the file into the persistent storage medium 202. In other implementation examples, the controller 201 may also write the first correspondence into the persistent storage medium 202 in an object format or a block format, which is not limited in this embodiment.
[0076] In this embodiment, the persistent storage medium of the controller 201 is the persistent storage medium 202. In other embodiments, a separately configured storage medium may also be integrated in the controller 201 to perform persistent storage of the first corresponding relationship.
[0077] It can be understood that when the processor 100 continuously sends multiple IOs, the controller 201 can use the multiple storage units in the persistent storage medium 202 to store the data in the multiple IOs respectively based on the above process, and record and persist the corresponding relationship between each storage unit and its storage state. In addition, when the data carried in a single IO needs to be stored using multiple storage units in the persistent storage medium 202, the controller 201 can also record and persist the corresponding relationship between each storage unit storing the data in the IO and its storage state based on the above process.
[0078] S305: The controller 301 obtains the monitoring result of data being written to the storage device 300, and the monitoring result is used to support the second storage state of the second storage unit of the storage device 300 where data is written. The second storage unit is a storage unit in the RAID for indicating a data write operation, and the second storage state is used to identify the saturation of the data stored in the second storage unit.
[0079] S306: The controller 301 records a second corresponding relationship between the second storage unit and the second storage state according to the monitoring result.
[0080] S307 : The controller 301 stores the second corresponding relationship in a persistent storage medium of the controller 301 .
[0081] The specific implementation of steps S305 to S307 can refer to the relevant description of steps S302 to S304 above, which will not be repeated here. When storing the second corresponding relationship, the controller 301 can specifically store the second corresponding relationship in the persistent storage medium 302 .
[0082] After completing the data storage, the storage device 200 and the storage device 300 can feed back a notification of successful data writing to the processor 100 so that the processor 100 can learn the storage status of the data. If the storage device 200 or the storage device 300 fails to store data, a notification of data writing failure can also be fed back to the processor 100. In actual application, the processor 100 can also record the storage address and storage status of the data in the storage device 200 and the storage device 300 respectively during the process of storing data to the storage device, so that the processor 100 performs corresponding processing operations according to the storage status of the data. For example, when the data is successfully stored in the storage device 200 and the storage device 300, the processor 100 can continue to determine to write the next set of data to the two storage devices, or the processor 100 can end the data writing process. When the data fails to be stored in the storage device 200 (or the storage device 300), the processor 100 can re-send the data to the storage device 200 (or the storage device 300), or issue an alarm for data storage anomalies.
[0083] In this way, during the entire data writing process, the processor 100 does not need to consume computing, memory and other resources to perform the operation of modifying and saving the bitmap, so that the processor 100 can have more computing, cache and other resources to process the business, which can effectively reduce the impact of data writing on the performance of the processor 100 in processing the business. For the storage device 200 and the storage device 300, the storage space required to record the corresponding relationship between the storage unit and its storage state is also small, so the performance impact on the storage device 200 and the storage device 300 is also small. For example, the storage device 200 uses a storage block as a storage unit to persistently store data, each storage block can be used to store 4KB of data, and for each storage block, 16B (bits) are required to record the corresponding relationship between the storage block and the storage state. Then, when 8GB of data is written to the storage device 200, the storage space required to record each storage block is 8GB / 4KB*16B=32MB, that is, for 8GB of data writing, only 32M of storage space is consumed additionally, and the performance impact on the storage device 200 is also small. In this way, the latency of the processor 100 writing data can be reduced, and the performance of the soft RAID constructed based on the storage device 200 and the storage device 300 can reach the same level as the hard RAID, thereby reducing the hardware cost of the data processing system 100.
[0084] Furthermore, if the processor 100 or any storage device experiences an abnormality such as power failure, the processor 100 can also recover the data in the storage device 200 and the storage device 300 that failed to be written due to the power failure through the file 1 and the file 2 recorded in the storage device 200 and the storage device 300 respectively. The specific implementation process of the processor 100 recovering the data that failed to be written is introduced below. Figure 3 As shown, the method may also include:
[0085] S308: After a data write exception occurs in the data processing system 10, the processor 100 obtains the first corresponding relationship stored in the storage device 200 and the second corresponding relationship stored in the storage device 300.
[0086] In actual application scenarios, the data processing system 10 may experience power failure and other abnormalities during operation, such as the entire data processing system 10 losing power, or the storage device 200 / storage device 300 losing power, or the processor 100 failing and restarting, etc. In the process of writing data to the storage device 200 and the storage device 300, if the data processing system 10 loses power and other abnormalities, data writing failure may occur in the storage device 200 and the storage device 300, such as some data not completing persistent storage in time due to the device power failure, etc.
[0087] Therefore, it is usually necessary to perform abnormal recovery on the data processing system 10, specifically, first restore the normal power supply to the data processing system 10, or restore the connection between the storage device 200 and the storage device 300 and the processor 100, etc. After the processor 100 can communicate normally with the storage device 200 and the storage device 300 respectively, the processor 100 can restore data writing according to the corresponding relationship between the storage unit and the storage state recorded by the storage device 200 and the storage device 300 when writing data.
[0088] As an implementation example, the storage device 200 may provide a query interface 1 to the processor 100, such as Figure 1 and the processor 100 can obtain the data in the storage device 200 by calling the query interface 1. Thus, during the abnormal recovery of the data processing system 10, the processor 100 can obtain the first corresponding relationship stored in the persistent storage medium 202 by calling the query interface 1.
[0089] Similarly, the storage device 300 can provide the processor 100 with the following information: Figure 1 The query interface 2 shown is used so that during the abnormal recovery of the data processing system 10 , the processor 100 can obtain the second corresponding relationship stored in the persistent storage medium 202 by calling the query interface 2 .
[0090] S309: The processor 100 recovers the data that failed to be written to the storage device 200 and the storage device 300 when a data writing exception occurs in the data processing system 10 according to the first corresponding relationship and the second corresponding relationship.
[0091] Since the storage status in the first correspondence and the second correspondence indicates whether the data is successfully written into the corresponding storage unit in the storage device, the processor 100 can determine the data A that needs to be written into the first storage unit in the storage device 200 according to the first correspondence, and determine the data B that needs to be written into the second storage unit in the storage device 300 according to the second correspondence, and determine whether the data A is successfully written into the first storage unit according to the storage status 1 recorded in the first correspondence, and determine whether the data B is successfully written into the second storage unit according to the storage status 2 recorded in the second correspondence. In this way, if it is determined that the data A is not successfully written into the first storage unit or the data B is not successfully written into the second storage unit, the processor 100 can rewrite the data A or the data B into the corresponding storage device, thereby realizing the recovery of the data that was not successfully written into the storage device 200 and the storage device 300.
[0092] For example, the storage device 200 and the storage device 300 are combined based on RAID1 technology, and the data written by the processor 100 to the storage device 200 needs to be backed up and stored in the storage device 300. Assume that the processor 100 needs to continuously write 40KB of data to the storage device 200 and the storage device 300 respectively. Figure 5 As shown, the storage device 200 and the storage device 300 can respectively use 10 storage units to store 40KB of data ( Figure 5 Each small rectangle in represents a storage unit), each storage unit can be a storage block, for example, and the storage space size of each storage unit is 4KB, which can store 4KB of data. During the data writing process, if the processor 100 loses power (such as the processor 100 restarts), the storage device 200 and the storage device 300 may only store part of the 40KB data, such as Figure 5 At this time, the corresponding relationship in the storage device 200 (including the first corresponding relationship) can record the storage status corresponding to each storage unit in the storage device 200, and the corresponding relationship in the storage device 300 (including the second corresponding relationship) can record the storage status corresponding to each storage unit in the storage device 300. Figure 5 The "C" in some of the storage units in the storage device 200 is used to identify that the storage status corresponding to the storage unit indicates that data storage is completed; correspondingly, some storage units that do not have a "C" represent that the storage status corresponding to the storage unit indicates that data storage is not completed. In this way, the processor 100 can determine that storage units 1 and 2 in the storage device 200 and the storage device 300 have completed data storage, while the data in storage units 3 to 10 are not synchronized (that is, the backup storage of this part of the data has not been completed in the two storage devices) based on the corresponding relationship obtained from the storage device 200 and the corresponding relationship obtained from the storage device 300. At this time, in the first implementation method, the processor 100 can re-send the data corresponding to storage units 3 to 10 to the storage device 200 and the storage device 300, so that the 40KB of data is backed up and stored on these two storage devices. In a second implementation, the processor 100 may send data required to be stored in a storage unit that does not have a "C" mark to the storage device 200 alone and to the storage device 300 alone, such as the processor 100 sends data required to be stored in storage units 4, 5, 8, 9, and 10 to the storage device 200, and sends data required to be stored in storage units 3, 7, 9, and 10 to the storage device 300, and so on.
[0093] After determining that the storage device 200 and the storage device 300 have successfully completed the storage of the corresponding data, it is not necessary to continue to store the storage units and storage states recorded in the first corresponding relationship and the second corresponding relationship.
[0094] Therefore, in a further possible implementation, the processor 100 may instruct the storage device 200 and the storage device 300 to delete the recorded storage unit and storage state. Figure 1 As shown, the storage device 200 may provide a deletion interface 1 to the processor 100; and the processor 100 may generate a deletion instruction 1 for the first corresponding relationship, and call the deletion interface 1 to send the deletion instruction 1 to the storage device 200. In this way, the storage device 200 may delete the first corresponding relationship according to the received deletion instruction 1 to release the storage space occupied by the first corresponding relationship in the storage device 200.
[0095] Similarly, the storage device 300 may provide a deletion interface 2 to the processor 100, and the processor 100 may send the generated deletion instruction 2 for the first correspondence to the storage device 300 by calling the deletion interface 2. In this way, the storage device 300 may delete the second correspondence according to the received deletion instruction 2 to release the storage space occupied by the second correspondence in the storage device 300.
[0096] The processor 100 may periodically send a deletion instruction to the storage device 200 and the storage device 300 to periodically maintain the correspondence of the records. Alternatively, the processor 100 may send a deletion instruction to each storage device under the operation control of the user.
[0097] The following example illustrates the implementation process of the processor 100 deleting the correspondence between the storage units and the storage states recorded in the two storage devices.
[0098] Assume that the storage device 200 and the storage device 300 are combined into a soft RAID based on the RAID1 technology, and the storage units and storage states recorded in the storage device 200 and the storage device 300 are as follows: Figure 6 As shown, Figure 6The "C" in some of the storage units in the storage device 200 is used to indicate that the storage status is completed storage; correspondingly, some storage units that do not have "C" indicate that the storage unit has not completed data storage. The processor 100 can read the corresponding relationships stored in the storage device 200 and the storage device 300 respectively, and determine, based on the read corresponding relationships, that the data required to be stored in the storage unit 1, the storage unit 2, and the storage unit 6 of the two storage devices are successfully stored in the soft RAID, while the data required to be stored in the remaining storage units have not yet been stored in the soft RAID (the same data is considered to be successfully written to the soft RAID only when the storage is completed in both storage devices). Therefore, the processor 100 can call the deletion interface 1 and the deletion interface 2 respectively, and send a deletion instruction to each storage device through the called deletion interface to control each storage device to delete the corresponding relationship between the storage unit and the storage status recorded for the storage unit 1, the storage unit 2, and the storage unit 6.
[0099] In another implementation example, the processor 100 can traverse from the starting storage unit according to the corresponding relationships read from the storage device 200 and the storage device 300 respectively, and determine whether the storage status corresponding to the storage unit indicates that the storage is completed. If so, the processor 100 continues to traverse the storage status corresponding to the next storage unit to determine whether the storage status indicates that the storage is completed, until the storage status corresponding to the first storage unit obtained by the traversal indicates that the storage is not completed, that is, Figure 6 The processor 100 may then send a deletion instruction including the identification of the storage unit (such as the storage address of the storage unit, etc.) to the storage device 200 and the storage device 300, respectively. In this way, the storage device 200 may delete the correspondence between all storage units and their storage states before the storage unit based on the received deletion instruction, that is, delete the correspondence between storage unit 1 and its storage state, and the correspondence between storage unit 2 and its storage state. Similarly, the storage device 300 may delete the correspondence between storage unit 1 and its storage state, and the correspondence between storage unit 2 and its storage state recorded in file 2 based on the received deletion instruction. In this way, the definition of deletion interface 1 and deletion interface 2 may be simplified, and the difficulty of defining the deletion interface may be reduced.
[0100] It is worth noting that Figure 3The execution order between steps S301 to S309 shown is not intended to be limiting. For example, in other embodiments, before the processor 100 writes data to the storage device 200 and the storage device 300, the storage device 200 and the storage device 300 may first record the correspondence between the storage unit and the storage status. At this time, the storage status is used to indicate that the data has not been stored. Then, the processor 100 can write data to the storage device 200 and the storage device 300, and after the data is written, the storage device 200 and the storage device 300 can update the recorded storage status, and the updated storage status is used to indicate that the data has been stored. Alternatively, in other embodiments, the two data storage processes of steps S302 to S304 and steps S305 to S307 can also be executed in parallel.
[0101] In addition, in this embodiment, the example of the processor 100 connecting to two storage devices is used for explanation. When the processor 100 is connected to a larger number of storage devices, the processor 100 can write data to each storage device based on the above-mentioned similar implementation method, and when the data processing system performs abnormal recovery, the data that has not been successfully written in each storage device is restored according to the correspondence between the storage units and the storage status recorded in each storage device. For details, please refer to the relevant description of the above-mentioned embodiment, which will not be repeated here.
[0102] Above Figure 3 The embodiment shown is applied to Figure 1 The data processing system 10 shown in FIG. 1 is used as an example for illustrative purposes. Figure 2 In the data processing system 20 shown, the operations performed by the controller 201 and the controller 301 can be performed by the controller 400. Specifically, in the process of the processor 100 writing data to the storage device 200 and the storage device 300 respectively, the controller 400 can respectively obtain the monitoring result of the data being written to the storage device 200 and the monitoring result of the data being written to the storage device 300, and record the corresponding relationship 1 between the storage unit and the storage state in the storage device 200 and the corresponding relationship 2 between the storage unit and the storage state in the storage device 300 according to the obtained monitoring results, so that the controller 400 writes the corresponding relationship 1 and the corresponding relationship 2 to the persistent storage medium of the controller 400, which can be, for example, a storage medium configured separately for the controller 400 (which can be integrated in the controller 400).
[0103] Correspondingly, during the data writing process, if the processor 100, the storage device 200 or the storage device 300 experiences an abnormality such as power failure, then after the processor 100 resumes normal communication with the storage device 200 and the storage device 300 respectively, the processor 100 can read the stored correspondence 1 and correspondence 2 from the persistent storage medium of the controller 400, and determine the data on which writing failed in the storage device 200 or the storage device 300 based on the correspondence 1 and the correspondence 2, and rewrite the data to the storage device 200 and the storage device 300, thereby recovering data writing.
[0104] It is worth noting that other reasonable step combinations that can be thought of by those skilled in the art based on the above description also fall within the scope of protection of this application. Secondly, those skilled in the art should also be familiar with the fact that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by this application.
[0105] The present application also provides a controller, including an acquisition unit, a recording unit and a storage unit, wherein:
[0106] an acquisition unit, configured to acquire a monitoring result of data being written into a first storage device, wherein the monitoring result is used to indicate a first storage state of a first storage unit of the first storage device in which the data is written, wherein the first storage unit is a storage unit in a redundant array of independent disks (RAID) for supporting a data writing operation, and the first storage state is used to identify a saturation degree of storing data in the first storage unit;
[0107] a recording unit, configured to record a first corresponding relationship between the first storage unit and the first storage state;
[0108] A storage unit is used to store the first corresponding relationship in a persistent storage medium of the controller, wherein the first corresponding relationship is used to restore the data written by the processor to the first storage device when a data writing exception occurs.
[0109] It should be understood that the controller of the embodiment of the present invention can be implemented by a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD), and the above PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC) or any combination thereof. It can also be implemented by software Figure 3 When the data processing method is shown, the controller and its various modules can also be software modules.
[0110] The controller according to the present invention may correspond to the method described in the embodiment of the present invention, and the above and other operations and / or functions of each unit in the controller are respectively to realize Figures 3 to 6 For the sake of brevity, the corresponding processes of each method in are not repeated here.
[0111] The present application also provides a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned data processing method.
[0112] The present application also provides a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the process or function described in the embodiment of the present application is generated in whole or in part.
[0113] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer or data center to another website, computer or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0114] The computer program product may be a software installation package, which may be downloaded and executed on a computing device when any of the aforementioned data processing methods is required.
[0115] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0116] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A data processing method, It is characterized in that The method is executed by a controller and includes: Acquire a monitoring result of data being written into a first storage device, the monitoring result being used to indicate a first storage state of a first storage unit of the first storage device in which the data is written, the first storage unit being a storage unit in a redundant array of independent disks RAID for supporting a data write operation, and the first storage state being used to identify a saturation of the first storage unit storing data; Recording a first corresponding relationship between the first storage unit and the first storage state; The first correspondence relationship is stored in a persistent storage medium of the controller, and the first correspondence relationship is used to restore the data written by the processor to the first storage device when a data writing exception occurs.
2. The method according to claim 1, It is characterized in that The RAID further includes a second storage device, and the method further includes: Acquire a monitoring result of data being written into the second storage device, where the monitoring result of the second storage device is used to indicate a second storage state of a second storage unit of the second storage device in which the data is written, where the second storage unit is a storage unit in the RAID for supporting a data writing operation, and the second storage state is used to identify a saturation of the data stored in the second storage unit; Recording a second corresponding relationship between the second storage unit and the second storage state; The second correspondence relationship is stored in the persistent storage medium, and the second correspondence relationship is used to restore the processor to write data to the first storage device when a data writing exception occurs.
3. The method according to claim 2, It is characterized in that The controller is deployed outside the first storage device and the second storage device.
4. The method according to claim 2, It is characterized in that The controller includes a first controller and a second controller, the first controller is deployed inside the first storage device, and the second controller is deployed inside the second storage device.
5. The method according to any one of claims 2 to 4, It is characterized in that The method further comprises: After a data writing exception occurs, the processor obtains the first corresponding relationship and the second corresponding relationship stored in the persistent storage medium; The processor recovers data that fails to be written into the RAID when a data writing exception occurs according to the first corresponding relationship and the second corresponding relationship.
6. The method according to claim 5, It is characterized in that The processor recovers data that fails to be written to the RAID when a data writing exception occurs according to the first corresponding relationship and the second corresponding relationship, including: The processor determines, according to the first corresponding relationship and the second corresponding relationship, the data to be recovered that failed to be written in the first storage device and the second storage device; The processor writes the data to be recovered to the first storage device and the second storage device respectively.
7. The method according to claim 5 or 6, It is characterized in that The first storage device provides a query interface to the processor, and the processor obtains the first corresponding relationship stored in the persistent storage medium, including: The processor calls the query interface to obtain the first corresponding relationship stored in the persistent storage medium.
8. The method according to any one of claims 5 to 7, It is characterized in that The first storage device provides a deletion interface to the processor, and the method further includes: The processor calls the deletion interface to delete the first corresponding relationship stored in the persistent storage medium.
9. A data processing system, It is characterized in that The data processing system includes a processor, a controller and a first storage unit, wherein the first storage unit belongs to a first storage device; The processor is used to write data to the first storage device; The controller is configured to obtain a monitoring result of the data being written into the first storage device, the monitoring result being used to indicate a first storage state of the data being written into the first storage unit, the first storage unit being a storage unit in a redundant array of independent disks RAID for supporting a data write operation, and the first storage state being used to identify a saturation of the data stored in the first storage unit; and record a first corresponding relationship between the first storage unit and the first storage state; and store the first corresponding relationship in a persistent storage medium of the controller; The processor is further configured to, when a data writing exception occurs, use the first corresponding relationship to restore the data written by the processor to the first storage device.
10. The data processing system according to claim 9, It is characterized in that The RAID also includes a second storage device; The controller is further used to obtain a monitoring result of data being written into the second storage device, the monitoring result of the second storage device is used to indicate a second storage state of a second storage unit of the second storage device in which the data is written, the second storage unit being a storage unit in the RAID used to support a data writing operation, and the second storage state is used to identify a saturation of the second storage unit storing data; Recording a second corresponding relationship between the second storage unit and the second storage state; The second corresponding relationship is stored in the persistent storage medium, and the second corresponding relationship is used to restore the processor to write data to the first storage device when a data writing exception occurs.
11. The data processing system according to claim 10, It is characterized in that The controller is deployed outside the first storage device and the second storage device.
12. The data processing system according to claim 10, It is characterized in that The RAID also includes a second storage device, and the controller includes a first controller and a second controller, the first controller is deployed inside the first storage device, and the second controller is deployed inside the second storage device.
13. A storage device, It is characterized in that The storage device includes a storage unit and a controller; The storage unit is used to store data and serves as a storage unit in a redundant array of independent disks RAID for supporting data writing operations; The controller is used to obtain a monitoring result of data being written into the storage device, wherein the monitoring result is used to indicate a storage state of a storage unit of the storage device where the data is written, and the storage state is used to identify a saturation of the storage unit storing data; Recording the corresponding relationship between the storage unit and the storage state; The corresponding relationship is stored in a persistent storage medium of the controller, and the corresponding relationship is used to restore the data written by the processor to the storage device when a data writing exception occurs.
14. A redundant array of independent disks RAID, It is characterized in that The RAID includes at least one storage device as claimed in claim 13.
15. A computer-readable storage medium, It is characterized in that The method comprises instructions which, when executed on a computing device, cause the computing device to perform the steps of the method according to any one of claims 1 to 8.
