STORAGE SYSTEM, DATA PROCESSING METHOD, AND APPARATUS - Patent application
The shared interface device in dual controller storage systems addresses redundant data transmission by asynchronously writing data to memory, improving efficiency and reliability through cache partitioning and reduced latency.
Patent Information
- Application Number
- JP2024532931
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-02-24
- Filing Date
- 2022-11-05
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-11-05
AI Technical Summary
Dual controller storage systems waste resources due to redundant data transmission between controller nodes for data synchronization, leading to inefficiency and reduced reliability.
Implement a shared interface device with a cache that asynchronously writes data to memory, reducing redundant transmission by using cache latency advantages and partitioning data storage to improve resource utilization and reliability.
This approach enhances data service efficiency and reliability by minimizing redundant data transmission and ensuring data availability without cache failures, thus optimizing storage system performance.
Smart Images

Figure 2024541654000001_ABST
Abstract
Description
[Technical field]
[0001] The present application relates to the field of computer technology, and in particular to storage systems, data processing methods and apparatus. [Background technology]
[0002] Dual controller storage systems are widely used to provide reliable data services to users. A dual controller storage system includes at least one dual controller unit, and each dual controller unit includes at least two controllers that share storage resources. FIG. 1 shows an example of a dual controller storage system. As shown in FIG. 1, the dual controller unit may include a first controller and a second controller, and the first controller and the second controller share at least one memory. The first controller may write data to the shared memory based on a write request sent by an application server. If the first controller fails, the second controller may query the shared memory for data written by the first controller to ensure availability of the data written by the first controller.
[0003] Since the memory access latency of a cache is usually much shorter than that of an external memory, a controller usually uses the cache of the controller to asynchronously store data in a shared memory. In the dual controller unit shown in FIG. 1, in order to guarantee the availability of data in the cache of the first controller after the failure of the first controller, the data updated by the first controller in the local cache needs to be synchronized to the cache of the second controller in real time. In this way, the second controller can find the data in the cache of the second controller and in the shared memory and return the query result to the application server. In the synchronization process, the transmission of redundant data needs to be performed between the controller nodes in the storage system, resulting in the waste of transmission and storage resources of the storage system. Summary of the Invention [Means for solving the problem]
[0004] The present application provides a storage system, a data processing method and an apparatus to improve the efficiency and reliability of data services without performing redundant data transmission between controller nodes.
[0005] According to a first aspect, the present application provides a storage system. The storage system includes a first controller and a second controller, the first controller and the second controller separately communicating with at least one memory through a shared interface device in which a cache is disposed. The first controller is configured to send a write command to the shared interface device. The shared interface device is configured to temporarily store in the cache first data to be written as instructed by the write command, and is further configured to asynchronously write the first data temporarily stored in the cache to the first memory in the at least one memory. The first memory may include one or more memories.
[0006] The first data may be all or a part of the data to be written as instructed by the write instruction. When the first data is a part of the data to be written as instructed by the write instruction, the method of storing other data (excluding the first data) to be written as instructed by the write instruction by the shared interface device is not limited in the present application. Optionally, the shared interface device may synchronously write the other data to be written as instructed by the write instruction to the first memory or a memory (other than the first memory) in the at least one memory.
[0007] Optionally, the second controller is configured to send a write command to the shared interface device to instruct the shared interface device to write the third data. The shared interface device is further configured to temporarily store the third data in a cache, and further configured to asynchronously write the third data temporarily stored in the cache to one or more memories in the at least one memory. For example, the shared interface device may asynchronously write the third data to the first memory.
[0008] The third data may be all or a part of the data to be written as instructed by the write instruction. When the third data is a part of the data to be written as instructed by the write instruction, the method of storing the other data (excluding the third data) to be written as instructed by the write instruction by the shared interface device is not limited in the present application. Optionally, the shared interface device may synchronously write the other data to be written as instructed by the write instruction to the first memory or a memory (other than the first memory) in the at least one memory.
[0009] The first controller and the second controller may use a cache of the shared interface device together to asynchronously write data to a first memory connected to the shared interface device, which helps to improve utilization of the cache resources of the shared interface device and utilization of the memory resources connected to the shared interface device.
[0010] Optionally, the second controller is configured to send a read instruction to the shared interface device after the first controller fails, the read instruction instructs to query the second data, the second data may be all or a portion of the first data. The shared interface device is further configured to retrieve all or a portion of the second data from the cache and provide all or a portion of the second data to the second controller according to the read instruction. When the shared interface device retrieves a portion of the second data from the cache and other data in the second data is retained or backed up, the shared interface device may query and retrieve other data in the second data from a memory (e.g., the first memory) connected to the shared interface device.
[0011] The second data may be all or a part of the data to be read as instructed by the read instruction. When the second data is a part of the data to be read as instructed by the read instruction, the method of obtaining other data (excluding the second data) to be read as instructed by the read instruction by the shared interface device is not limited in the present application. Optionally, the shared interface device may obtain other data from one or more memories in the at least one memory.
[0012] Meanwhile, since the access latency of the cache of the shared interface device is shorter than the access latency of the memory connected to the shared interface device, the shared interface device uses the cache to temporarily store the first data for the first controller and asynchronously writes the first data to the first memory connected to the shared interface device. This helps to reduce the storage latency of the first data and improve the efficiency of the data service provided by the storage system. Meanwhile, the second controller does not need to perform mirror backup for the data written to the cache by the first controller. After the first controller fails, the shared interface device can provide the data written for the first controller in the cache to the second controller. This helps to ensure the availability of the data in the cache without adding redundant data transmission between nodes, and improves the reliability of the data service provided by the storage system.
[0013] Optionally, the cache includes a first partition and a second partition, the first partition is used to temporarily store data for the first controller and the second partition is used to temporarily store data for the second controller, and a query range from which the shared interface device obtains all or a portion of the second data in the cache includes the first partition and the second partition.
[0014] The first partition being different from the second partition means that the storage space corresponding to the first partition in the cache does not overlap with the storage space corresponding to the second partition in the cache. This helps to reduce the contention that occurs when the shared interface device writes data for different controllers to the cache, and improves the reliability of the data service provided by the storage system. After the shared interface device receives a read command, it may be difficult for the shared interface device to determine the location of the second data in the cache. In order to improve the availability of the data in the cache, the query range in which the shared interface device queries the second data may look at the first partition and the second partition. This helps to obtain the data written for the first controller and the second controller in the cache for the second controller.
[0015] Optionally, the write instruction instructs writing data to the first memory.
[0016] Optionally, the shared interface device is specifically configured to temporarily store the first data in the first partition, temporarily store the third data in the second partition, and successively transmit the first data temporarily stored in the first partition and the third data temporarily stored in the second partition to the first memory. Optionally, the write instruction sent by the first controller may instruct the first data to be written to the first memory, and the write instruction sent by the second controller may instruct the third data to be written to the first memory.
[0017] The data in the first partition and the data in the second partition that are to be written to the same memory are sent to the first memory in succession. This helps the first memory to execute the writing task of the first data and the second data in succession. If the storage locations of the first data and the second data in the first memory are adjacent or even consecutive, the change of the writing location of the first memory is reduced, and the storage efficiency of the first memory is improved.
[0018] Optionally, the at least one memory further includes a second memory, and a memory access latency of the second memory is shorter than a memory access latency of the first memory. The shared interface device is further configured to synchronously back up the first data to the second memory after receiving a write instruction. Optionally, the shared interface device may obtain all or a portion of the second data from the second memory according to a read instruction when the cache is abnormal, and provide all or a portion of the second data to the second controller.
[0019] The data written to the cache is synchronously backed up in the second memory connected to the shared interface device. In this way, even if the cache is abnormal, for example, not retained, and the data in the cache is lost, the shared interface device can still find the data in the second memory. This helps to improve the availability of the data in the cache and improve the reliability of the data service provided by the storage system.
[0020] Optionally, the storage system further includes a third memory connected to the first controller. The first controller is further configured to back up the first data in the third memory, and transfer the data backed up in the third memory to a fourth memory in the at least one memory through the shared interface device when the cache is abnormal. Optionally, the shared interface device is further configured to obtain all or a part of the second data from the fourth memory according to the read command when the cache is abnormal, and provide all or a part of the second data to the second controller. The fourth memory may be the first memory, the second memory, or another memory connected to the shared interface device.
[0021] In this way, even if the cache is abnormal, for example, not retained, and data in the cache is lost, the shared interface device can still find the data in the cache in at least one memory, which helps to improve the availability of the data in the cache and improve the reliability of the data service provided by the storage system.
[0022] Optionally, the data includes service data and / or metadata of the service data, the service data being data to be written as requested by a data write request received by the first controller.
[0023] Optionally, the shared interface device is an interface card or a disk enclosure, the interface card being disposed (eg, inserted) in the first controller or the second controller, and the disk enclosure being configured to incorporate at least one memory.
[0024] Optionally, the shared interface device communicates with the first controller using a Peripheral Component Interconnect Express PCIe protocol or a Serial Attached Small Computer System Interface SAS protocol.
[0025] Optionally, the shared interface device communicates with the second controller using a Peripheral Component Interconnect Express PCIe protocol or a SAS protocol.
[0026] Optionally, each memory in the at least one memory has only a single port for communicating with the shared interface device, and port reconfiguration does not need to be performed on the memory, which helps to reduce costs.
[0027] According to a second aspect, the present application provides a data processing method, which may be applied to a storage system. The storage system includes a first controller and a second controller, and the first controller and the second controller communicate separately with at least one memory through a shared interface device in which a cache is arranged. The method may include the first controller sending a write command to the shared interface device. The shared interface device temporarily stores first data to be written in the cache as instructed by the write command, and then asynchronously writes the first data temporarily stored in the cache to the first memory in the at least one memory.
[0028] Optionally, the second controller may send a write command to the shared interface device to instruct the shared interface device to write the third data. The shared interface device may temporarily store the third data in a cache and asynchronously write the third data temporarily stored in the cache to one or more memories in the at least one memory. For example, the shared interface device may asynchronously write the third data to the first memory.
[0029] Optionally, the second controller sends a read instruction to the shared interface device after the first controller fails, the read instruction instructs the shared interface device to query second data, the second data being all or a portion of the first data. The shared interface device retrieves all or a portion of the second data from a cache according to the read instruction, and provides all or a portion of the second data to the second controller.
[0030] Optionally, the cache includes a first partition and a second partition, the first partition is used to temporarily store data for the first controller and the second partition is used to temporarily store data for the second controller, and a query range from which the shared interface device obtains all or a portion of the second data in the cache includes the first partition and the second partition.
[0031] Optionally, the shared interface device temporarily storing the first data in the cache includes the shared interface device temporarily storing the first data in the first partition. The shared interface device temporarily storing the third data in the cache includes the shared interface device temporarily storing the third data in the second partition. The shared interface device asynchronously writing the first data and the third data temporarily stored in the cache to the first memory may include the shared interface device continuously transmitting the first data temporarily stored in the first partition and the third data temporarily stored in the second partition to the first memory. Optionally, the write instruction sent by the first controller may instruct the first data to be written to the first memory and the write instruction sent by the second controller may instruct the third data to be written to the first memory.
[0032] Optionally, the at least one memory further includes a second memory, and a memory access latency of the second memory is shorter than a memory access latency of the first memory. The method further includes the shared interface device synchronously backing up the first data to the second memory after receiving the write instruction. The shared interface device obtains all or a portion of the second data from the second memory according to the read instruction when the cache is abnormal, and provides all or a portion of the second data to the second controller.
[0033] Optionally, the storage system further includes a third memory connected to the first controller, and the method further includes the first controller backing up the first data in the third memory. The first controller transfers the data backed up in the third memory to a fourth memory in the at least one memory via the shared interface device when the cache is abnormal. The shared interface device obtains all or a part of the second data from the fourth memory according to the read command when the cache is abnormal after the shared interface device receives the read command, and provides all or a part of the second data to the second controller.
[0034] Optionally, the data includes service data and / or metadata of the service data, the service data being data to be written as requested by a data write request received by the first controller.
[0035] Optionally, the shared interface device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate at least one memory.
[0036] Optionally, the shared interface device communicates with the first controller and / or the second controller using a Peripheral Component Interconnect Express PCIe protocol.
[0037] Optionally, each memory in the at least one memory has only a single port for communicating with the shared interface device.
[0038] The first controller, the second controller, and the shared interface device in the storage system provided in the first aspect can be configured to execute the method provided in the second aspect. Therefore, for the technical effects provided by the method provided in the second aspect, please refer to the technical effects provided by the corresponding storage system described above. Details will not be described again here.
[0039] According to a third aspect, the present application provides a data processing method, which may be applied to a shared interface device in a storage system. The storage system includes a first controller and a second controller, and the first controller and the second controller separately communicate with at least one memory through a shared interface device in which a cache is arranged. The method includes the shared interface device receiving a write command sent by the first controller to instruct the first controller to write first data. The shared interface device temporarily stores the first data in the cache, and then asynchronously writes the first data temporarily stored in the cache to the first memory in the at least one memory.
[0040] Optionally, the method further includes receiving, by the shared interface device, a write command sent by the second controller instructing the shared interface device to write the third data. The shared interface device temporarily stores the third data in a cache, and then asynchronously writes the third data temporarily stored in the cache to one or more memories (e.g., the first memory) in the at least one memory.
[0041] Optionally, the shared interface device receives a read instruction sent by the second controller after the first controller fails, the read instruction instructs to query second data, the second data being all or a portion of the first data, and the shared interface device retrieves all or a portion of the second data from a cache according to the read instruction, and provides all or a portion of the second data to the second controller.
[0042] Optionally, the cache includes a first partition and a second partition, the first partition is used to temporarily store data for the first controller and the second partition is used to temporarily store data for the second controller, and a query range from which the shared interface device obtains all or a portion of the second data in the cache includes the first partition and the second partition.
[0043] Optionally, the shared interface device temporarily storing the first data in the cache includes the shared interface device temporarily storing the first data in the first partition. The shared interface device temporarily storing the third data in the cache includes the shared interface device temporarily storing the third data in the second partition. The shared interface device asynchronously writing the first data and the third data temporarily stored in the cache to the first memory may include the shared interface device continuously transmitting the first data temporarily stored in the first partition and the third data temporarily stored in the second partition to the first memory. Optionally, the write instruction sent by the first controller may instruct the first data to be written to the first memory and the write instruction sent by the second controller may instruct the third data to be written to the first memory.
[0044] Optionally, the at least one memory further includes a second memory, and a memory access latency of the second memory is shorter than a memory access latency of the first memory. The method further includes the shared interface device synchronously backing up the first data to the second memory after receiving the write instruction. The shared interface device obtains all or a portion of the second data from the second memory according to the read instruction when the cache is abnormal, and provides all or a portion of the second data to the second controller.
[0045] Optionally, the storage system further includes a third memory connected to the first controller. The method further includes, when the cache is abnormal after the shared interface device receives the read command, the shared interface device obtains all or a part of the second data from the connected fourth memory according to the read command and provides all or a part of the second data to the second controller. All or a part of the second data in the fourth memory is transferred by the first controller from the third memory to the fourth memory via the shared interface device after the cache becomes abnormal, and the data in the third memory includes the first data backed up by the first controller.
[0046] Optionally, the data includes service data and / or metadata of the service data, the service data being data to be written as requested by a data write request received by the first controller.
[0047] Optionally, the shared interface device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate at least one memory.
[0048] Optionally, the shared interface device communicates with the first controller and / or the second controller using a Peripheral Component Interconnect Express PCIe protocol.
[0049] Optionally, each memory in the at least one memory has only a single port for communicating with the shared interface device.
[0050] The shared interface device provided in the first aspect can be configured to execute the method provided in the third aspect. Therefore, for the technical effects provided by the method provided in the third aspect, please refer to the technical effects provided by the corresponding storage system described above. Details will not be described again here.
[0051] According to a fourth aspect, the present application provides a shared interface device, and a cache may be disposed in the shared interface device. The shared interface device may include a receiving module, a storage module, and a query module. The receiving module is configured to receive a write command sent by a first controller, the write command instructing to write first data. The first controller and the second controller separately communicate with at least one memory through the shared interface device. The storage module is configured to temporarily store the first data in a cache of the storage module, and is further configured to asynchronously write the first data temporarily stored in the cache to the first memory in the at least one memory.
[0052] Optionally, the receiving module is further configured to receive a write command sent by the second controller, instructing to write the third data. The storage module is configured to temporarily store the first data in a cache of the storage module, and is further configured to asynchronously write the third data temporarily stored in the cache to one or more memories in the at least one memory. For example, the storage module may asynchronously write the third data to the first memory.
[0053] Optionally, the receiving module is further configured to receive a read instruction sent by the second controller after the first controller fails, the read instruction instructing to query second data, the second data being all or a portion of the first data. The querying module is configured to obtain all or a portion of the second data from the cache according to the read instruction, and provide all or a portion of the second data to the second controller.
[0054] Optionally, the cache includes a first partition and a second partition, the first partition is used to temporarily store data for the first controller, and the second partition is used to temporarily store data for the second controller, and a query range over which the query module obtains all or a portion of the second data in the cache includes the first partition and the second partition.
[0055] Optionally, the storage module is specifically configured to temporarily store the first data in the first partition, temporarily store the third data in the second partition, and successively transmit the first data temporarily stored in the first partition and the third data temporarily stored in the second partition to the first memory. Optionally, the write instruction sent by the first controller may instruct the first data to be written to the first memory, and the write instruction sent by the second controller may instruct the third data to be written to the first memory.
[0056] Optionally, the at least one memory further includes a second memory, and a memory access latency of the second memory is shorter than a memory access latency of the first memory. The storage module is further configured to synchronously back up the first data to the second memory after receiving a write instruction, and obtain all or a part of the second data from the second memory according to a read instruction when the cache is abnormal, and provide all or a part of the second data to the second controller.
[0057] Optionally, the storage system further includes a third memory connected to the first controller. The inquiry module is further configured to obtain all or a part of the second data from the connected fourth memory according to the read command when the cache is abnormal after the receiving module receives the read command, and provide all or a part of the second data to the second controller. All or a part of the second data in the fourth memory is transferred by the first controller from the third memory to the fourth memory via the shared interface device after the cache becomes abnormal, and the data in the third memory includes the first data backed up by the first controller.
[0058] Optionally, the data includes service data and / or metadata of the service data, the service data being data to be written as requested by a data write request received by the first controller.
[0059] Optionally, the shared interface device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate at least one memory.
[0060] Optionally, the shared interface device communicates with the first controller and / or the second controller using a Peripheral Component Interconnect Express PCIe protocol.
[0061] Optionally, each memory in the at least one memory has only a single port for communicating with the shared interface device.
[0062] The shared interface device provided in the fourth aspect may have the function of the shared interface device in the storage system provided in the first aspect. Therefore, for the technical effects provided by the shared interface device provided in the fourth aspect, please refer to the technical effects provided by the corresponding shared interface device described above. Details will not be described again here.
[0063] According to a fifth aspect, the present application provides a computing device, wherein a first controller and a second controller are in separate communication with at least one memory via the computing device, the computing device including a memory and a processor, the memory including a cache, and the processor executes computer instructions stored in the memory to enable the computing device to perform the method described in any possible implementation of the third aspect.
[0064] Optionally, the computing device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate at least one memory.
[0065] Optionally, the computing device communicates with the first controller and / or the second controller using a Peripheral Component Interconnect Express PCIe protocol.
[0066] According to a sixth aspect, the present application provides a computer-readable storage medium comprising instructions which, when executed on a computing device, enable the computing device to perform a method as set forth in any possible implementation of the third aspect.
[0067] An eleventh aspect of the present application provides a computer program product, the program code of which, when executed by a computing device, is capable of implementing the method as described in any possible implementation of the third aspect of the present application.
[0068] The apparatus provided in the present application may be configured to execute the method steps executed by the shared interface device in the aforementioned storage system. Therefore, for the technical effects that can be obtained by the apparatus of the present application, please refer to the technical effects obtained by the aforementioned storage system. Details will not be described again here.
[0069] The first controller and the second controller in the claims and the summary of the invention of this application may be, for example, any two different controllers of the storage nodes in the description of the embodiments of this application. For example, the first controller may be controller a and the second controller may be controller b, or the first controller may be controller b and the second controller may be controller a.
[0070] The shared interface device in the claims and summary of the present application may be any shared interface device connected to at least two controllers of a storage node in the description of the embodiments of the present application. For example, the shared interface device may be a shared interface device a or a shared interface device b. For example, the shared interface device is a shared interface device a, and the shared interface device may specifically be an interface card a or a disk enclosure a.
[0071] The at least one memory in the claims and the summary of the invention of the present application may be, for example, at least one memory connected to the shared interface device a or the shared interface device b in the description of the embodiments of the present application. For example, the shared interface device is an interface card a. The at least one memory may include a memory a1, a memory a2, and a memory a3.
[0072] The first memory in the claims and the summary of the invention of this application may be, for example, any one or more memories connected to the shared interface device a or the shared interface device b in the description of the embodiments of this application. For example, the shared interface device is the interface card a. The first memory may include memory a2.
[0073] For example, the first controller and the second controller are the controller a and the controller b, respectively, mentioned in the description of the embodiments of the present application. The write command sent by the first controller in the claims and the summary of the invention of the present application may be, for example, the write command 1 or the write command 1-1 mentioned in the description of the embodiments of the present application, and the write command sent by the second controller may be, for example, the write command 2 or the write command 2-2 mentioned in the description of the embodiments of the present application.
[0074] It is still used as an example that the first controller and the second controller are the controller a and the controller b mentioned in the description of the embodiment of this application, respectively. The first data and the third data in the claims and the summary of the invention of this application may be, for example, the target data 1 and the target data 2 mentioned in the description of the embodiment of this application, respectively.
[0075] The read instruction in the claims and the summary of the invention of the present application may be, for example, the read instruction 1, the read instruction 1-1, the read instruction 2, or the read instruction 2-1 mentioned in the description of the embodiments of the present application. The second data in the claims and the summary of the invention of the present application may be, for example, the target data 3 or the target data 4 mentioned in the description of the embodiments of the present application. Optionally, the target data 3 or the target data 4 may be all or a part of the target data 1, or the target data 3 or the target data 4 may be all or a part of the target data 2.
[0076] For example, in the description of the embodiment of the present application, the first controller is the controller a. The third memory in the claims and the summary of the invention of the present application may include, for example, a memory c1 connected to the controller a in the description of the embodiment of the present application.
[0077] For example, in the description of the embodiment of the present application, the first controller is controller b. The third memory in the claims and summary of the invention of the present application may include, for example, memory c2 connected to controller b in the description of the embodiment of the present application.
[0078] For example, in the description of the embodiments of the present application, the first controller is the controller a. The second memory in the claims and the summary of the invention of the present application may include, for example, the memory a1 in the description of the embodiments of the present application.
[0079] For example, the shared interface device in the claims and summary of the present application is the interface card a in the description of the embodiments of the present application, and the first partition and the second partition may be, for example, partition 1 and partition 2 in the cache of the interface card a, respectively. [Brief description of the drawings]
[0080] [Figure 1] 1 shows an example of the structure of an existing storage system. [Diagram 2] 1 illustrates an example of a possible system architecture to which an embodiment of the present application is applicable. [Figure 3-1] 2 shows an example of a possible structure of storage nodes in a storage system in the present application. [Figure 3-2] 2 shows an example of a possible structure of storage nodes in a storage system in the present application. [Figure 3-3] 2 shows an example of a possible structure of storage nodes in a storage system in the present application. [Figure 4] 4 shows an example of a possible data processing method performed by a storage node in the present application. [Diagram 5] 1 shows an example of a process in which interface card a stores cached data in memory. [Figure 6] 4 illustrates an example of another possible data processing method performed by a storage node in the present application. [Figure 7] 4 illustrates an example of another possible data processing method performed by a storage node in the present application. [Figure 8] 4 illustrates an example of another possible data processing method performed by a storage node in the present application. [Figure 9] 1 shows examples of possible structures of a shared interface device in the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0081] The embodiments of the present application provide a storage system, a data processing method and an apparatus. The following first describes an example of a system architecture to which the embodiments of the present application are applicable, with reference to FIG.
[0082] FIG. 2 shows an example of a system architecture to which an embodiment of the present application is applicable. The system architecture corresponding to FIG. 2 includes a storage system and at least one application server. The application server and the storage system may be connected via a communication network. See FIG. 2. The storage system may include one storage node, in which a storage control unit and one or more memories are disposed. The memory may be a hard disk drive (HDD), a solid-state drive (SSD), a storage class memory (SCM), or another type of storage disk. Alternatively, the memory may be a storage server, or another type of computing device configured to provide storage services.
[0083] FIG. 2 is not a limitation on a system architecture to which an embodiment of the present application is applicable, but merely illustrates an example thereof. The system architecture corresponding to FIG. 2 may include more or fewer application servers or storage nodes. The embodiment of the present application may be applied to a central storage system or a distributed storage system. Optionally, the system architecture to which the embodiment of the present application is applicable may include one or more storage nodes, for example, the storage nodes shown in FIG. 2. The storage nodes shown in FIG. 2 may be understood as a storage array or a storage server. It is not limited in this embodiment of the present application that each storage node in the distributed storage system is the storage node shown in FIG. 2.
[0084] In order to improve the reliability of the storage system, the storage control unit of the storage node shown in Fig. 2 can include at least two controllers. An example is used in which two controllers are arranged in the storage control unit. The storage node shown in Fig. 2 can be specifically shown in Fig. 3-1.
[0085] Please refer to FIG. 3-1. The storage node may include a controller a and a controller b. The controller a and the controller b may be understood as controllers in a storage array or controllers in a storage server. The storage node may further include a shared interface device a and a shared interface device b. The shared interface device a and the shared interface device b are separately configured to connect to at least one memory. For ease of distinction, the memory connected to the shared interface device a is called memory a, and the memory connected to the shared interface device b is called memory b. The memory a and the memory b may be understood as memories in at least one memory shown in FIG. 2. The controller a and the controller b may communicate with at least one memory a under the shared interface device a through the shared interface device a, and the controller a and the controller b may communicate with at least one memory b under the shared interface device b through the shared interface device b.
[0086] See Figure 3-1. The cache may be located in the shared interface device a and the shared interface device b. The controller a and the controller b may both be connected to the shared interface device a to jointly access the cache in the shared interface device a and the connected memory a. The controller a and the controller b may further both be connected to the shared interface device b to jointly access the cache in the shared interface device b and the connected memory b.
[0087] Optionally, power protection of the cache in shared interface device a may be implemented via controller a and / or controller b, and power protection of the cache in shared interface device b may be implemented via controller a and / or controller b. For example, when both controller a and controller b are normal, power protection of the cache in shared interface device a may be implemented via controller a, and power protection of the cache in shared interface device b may be implemented via controller b. After controller a fails, power protection of the cache in shared interface device a and power protection of the cache in shared interface device b may be implemented via controller b.
[0088] FIG. 3-1 is not a limitation on the structure of the storage node, but an example thereof. Optionally, the storage node corresponding to FIG. 3-1 may include more controllers, may include more or less shared interface devices, and may include more or less memories a or b. For example, the storage node corresponding to FIG. 3-1 may not include the shared interface device b or the memory b subordinate to the shared interface device b.
[0089] The shared interface device a or the shared interface device b shown in FIG. 3-1 is configured to perform at least one of the following operations on data between the controller and the memory: cache, process, and transfer. "Transfer" may refer to transparent transmission or protocol format conversion. FIG. 3-2 and FIG. 3-3 respectively show examples of possible structures of storage nodes corresponding to FIG. 3-1. The following describes two different types of shared interface devices with reference to the storage nodes shown in FIG. 3-2 and FIG. 3-3.
[0090] 1. The shared interface device is an interface card.
[0091] In the storage node corresponding to FIG. 3-2, the shared interface device a may be an interface card a connected to the controller a, and the shared interface device b may be an interface card b connected to the controller b. Optionally, the shared interface device a is connected to the controller a in a plug-in manner. For example, the interface card a may be connected to a peripheral component interconnect (PCI) riser device of the controller a. Similarly, the shared interface device b may be connected to the controller b in a plug-in manner. For example, the interface card b may be connected to a PCIe riser device of the controller b.
[0092] See Figure 3-2. The controller a and the controller b may each include a processor, a cache, and a riser device, and the interface card a and the interface card b may each include a processor, a cache, and multiple ports.
[0093] The processor may include one or more general-purpose processors, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0094] In FIG. 3-2, the riser device in the controller a or the controller b is used as an example of a PCIe riser device. The riser device may be another type of riser device, for example, an extended industry standard architecture (EISA) riser device. The riser device may be called a bus, and may include an address bus, a data bus, and a control bus, etc.
[0095] The cache may include volatile memory, such as random access memory (RAM). Alternatively, the cache may include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). Alternatively, the cache may include a combination of the aforementioned types.
[0096] The PCIe riser device may include multiple ports. In FIG. 3-2, each numbered square represents a port. See FIG. 3-2. The multiple ports in the PCIe riser device may include port 11, port 12, port 13, and port 14. The multiple ports of interface card a and interface card b may include port 21, port 22, and port 23, respectively.
[0097] Please refer to the solid connection lines in FIG. 3-2. The processor of the controller a may access the interface card a sequentially through the port 11 and the port 12 in the controller a and the port 21 of the interface card a to implement the communication connection between the controller a and the interface card a. Please refer to the dashed connection lines in FIG. 3-2. The processor of the controller b may access the interface card a sequentially through the port 11 and the port 14 in the controller b, the port 14 and the port 13 in the controller a, and the port 22 of the interface card a to implement the communication connection between the controller b and the interface card a.
[0098] Similarly, optionally, the processor of controller b may access interface card b sequentially via ports 11 and 12 in controller b and port 21 of interface card b to implement a communication connection between controller b and interface card b. The processor of controller a may access interface card b sequentially via ports 11 and 14 in controller a, ports 14 and 13 in controller b, and port 22 of interface card b to implement a connection between controller a and interface card b.
[0099] As described above, the interface card a and the interface card b may be connected to the controller a and the controller b, respectively, at the top. In addition, the interface card a may be further connected to one or more memories a at the bottom through a port, and the interface card b may be further connected to one or more memories b at the bottom through a port. See FIG. 3-2. The interface card a may be connected to the port 31 of the disk enclosure a through the port 23 to access the memory a1, the memory a2, and the memory a3 built into the disk enclosure a. The interface card b may be connected to the disk enclosure b through the port 23 to access the memory b1, the memory b2, and the memory b3 in the disk enclosure b. Each of the memory a1, the memory a2, and the memory a3 may be understood as one memory a, and each of the memory b1, the memory b2, and the memory b3 may be understood as one memory b.
[0100] Optionally, the interface card a and / or the interface card b may be a serial attached SCSI (SAS) card or a redundant array of independent disks (RAID) card, where SCSI is an abbreviation of small computer system interface. In the storage node corresponding to FIG. 3-2, optionally, the connection between the interface card a and the controller a may be based on a peripheral component interconnect express (PCIe) protocol, and the connection between the interface card a and the memory a may be based on a SAS protocol, a Fibre Channel (FC) protocol, or a Gigabit Ethernet (GE) protocol, etc. Similarly, the connection between the interface card b and the controller b may be based on a PCIe protocol, and the connection between the interface card b and the memory b may be based on a SAS protocol, a FC protocol, or a GE protocol, etc.
[0101] Since the cache is located in interface card a and controller a and controller b are both connected to interface card a, controller a and controller b may not only share memory a under interface card a but also share the cache in interface card a. Similarly, since the cache is located in interface card b and controller a and controller b are both connected to interface card b, controller a and controller b may not only share memory b under interface card b but also share the cache in interface card b.
[0102] Please refer to FIG. 3-2 further. Through only one port of one interface card (e.g., interface card a or interface card b), controller a and controller b can share the memory under the interface card. This helps to save the port resource of the interface card. In this way, the interface card can be connected to more memory, and the storage resource shared by controller a and controller b is expanded. In addition, the memory connected to the interface card may have only one port used to connect to the interface card to communicate with controller a and controller b separately, and port reconfiguration does not need to be performed for the memory. This helps to reduce the cost. For example, the disk enclosure and the memory under the disk enclosure in FIG. 3-2 may be understood as one memory. The disk enclosure may have only one port connected to the interface card to communicate with controller a and controller b separately, and port reconfiguration does not need to be performed for the disk enclosure.
[0103] In FIG. 3-2, the interface card communicates with the storage disk through the disk enclosure is used as an example and not a limitation. Optionally, the interface card may be directly connected to a single-port hard disk. Optionally, the interface card may communicate with another type of computing device configured to provide storage services, such as a storage server.
[0104] FIG. 3-2 is an example, not a limitation, of the structure of a storage node. Optionally, a storage node corresponding to FIG. 3-2 may include more controllers, more or less interface cards, and more or less memory. For example, a storage node may not include interface card b or memory under interface card b.
[0105] 2. The shared interface device is a disk enclosure.
[0106] In the storage node corresponding to FIG. 3-3, the shared interface device a may be a disk enclosure a, and the shared interface device b may be a disk enclosure b. Optionally, one or more memories a connected to the disk enclosure may be incorporated in the disk enclosure a, and one or more memories b connected to the disk enclosure may be incorporated in the disk enclosure b. Optionally, the one or more memories a may include at least one type of storage disk, HDD and SSD. Similarly, optionally, the one or more memories b may include at least one type of storage disk, HDD and SSD.
[0107] Please refer to FIG. 3-3. The controller a and the controller b may each include a processor and a cache, and the disk enclosure a and the disk enclosure b may each include a processor, a cache, a plurality of ports, and a hard disk mounting mechanism (for example, a groove shown in FIG. 3-3). For the processor and the cache, please refer to the relevant contents of FIG. 3-2. The details will not be described again here. Please refer to FIG. 3-3. The plurality of ports of the disk enclosure a and the disk enclosure b may include a port 21 and a port 22 separately. A memory (for example, a memory a1, a memory a2, or a memory a3) may be arranged behind the mounting mechanism of the disk enclosure a and may communicate with the processor of the disk enclosure a separately. A memory (for example, a memory b1, a memory b2, or a memory b3) may be arranged behind the mounting mechanism of the disk enclosure b and may communicate with the processor of the disk enclosure b separately.
[0108] Optionally, controller a may access disk enclosure a sequentially via ports 21 and 22 of interface card a and port 31 of disk enclosure a to implement a communication connection between controller a and disk enclosure a. Controller b may access disk enclosure a sequentially via ports 21 and 23 of interface card b and port 32 of disk enclosure a to implement a communication connection between controller b and disk enclosure a.
[0109] Similarly, optionally, controller b may access disk enclosure b sequentially via ports 21 and 22 of interface card b and port 31 of disk enclosure b to implement a communication connection between controller b and disk enclosure b. Controller a may access disk enclosure b sequentially via ports 21 and 23 of interface card a and port 32 of disk enclosure b to implement a communication connection between controller a and disk enclosure b.
[0110] As described above, the disk enclosure a and the disk enclosure b may be connected to the controller a and the controller b, respectively, at the top. In addition, the disk enclosure a may be further connected to one or more memories a at the bottom through a port, and the disk enclosure b may be further connected to one or more memories b at the bottom through a port. See FIG. 3-3. The disk enclosure a may access the memory a1, the memory a2, and the memory a3 incorporated in the disk enclosure a, and the disk enclosure b may access the memory b1, the memory b2, and the memory b3 incorporated in the disk enclosure b. Each of the memory a1, the memory a2, and the memory a3 may be understood as one memory a, and each of the memory b1, the memory b2, and the memory b3 may be understood as one memory b.
[0111] Because a cache is located in disk enclosure a and controller a and controller b are both connected to disk enclosure a, controller a and controller b may not only share memory a under disk enclosure a, but also share the cache in disk enclosure a. Similarly, because a cache is located in disk enclosure b and controller a and controller b are connected to disk enclosure b, controller a and controller b may not only share memory b under disk enclosure b, but also share the cache in disk enclosure b.
[0112] Disk enclosure a and disk enclosure b may both be connected to controller a, and the connection between disk enclosure a and controller a and the connection between disk enclosure b and controller a may be based on a SAS protocol, a Fibre Channel (FC) protocol, or a Gigabit Ethernet (GE) protocol, etc. Similarly, disk enclosure b and disk enclosure a are both connected to controller b, and the connection between disk enclosure b and controller b may be based on a SAS protocol, a Fibre Channel (FC) protocol, or a Gigabit Ethernet (GE) protocol, etc.
[0113] FIG. 3-3 is an example, not a limitation, of the structure of a storage node. Optionally, a storage node corresponding to FIG. 3-3 may include more controllers, more or less interface cards, more or less disk enclosures, and more or less memory. For example, a storage node corresponding to FIG. 3-3 may not include disk enclosure b or memory in disk enclosure b. For example, interface card a or interface card b may be connected to more memory.
[0114] In the storage node shown in FIG. 3-1, FIG. 3-2, or FIG. 3-3, one connection line between ports may represent one or more connection links. The connection line between port 12 and port 21 in FIG. 3-2 is used as an example. The connection link represented by the connection line may include a PCIe bus used for transmitting data signals and a control bus used for transmitting control signals. For example, the transmission of control signals, handshake information, and status information of controller a and interface card a may be performed via the control bus. The control signal may include a start signal that enables interface card a to start operation. The start signal may include, for example, a predetermined position signal (used to determine whether interface card a is inserted into the correct slot), a power-on permission signal, a clock signal, and a reset signal of interface card a. The handshake information may be used by controller a and interface card a to perform port negotiation to determine the transmission bandwidth and transmission rate of the transmission channel between controller a and interface card a, etc.
[0115] Optionally, in the storage nodes shown in Figure 3-1, Figure 3-2, or Figure 3-3, there may be a connection link between controller a and controller b. For example, the connection link is used to transmit heartbeat information to monitor each other's status in real time.
[0116] The above describes the connection links required by controller a and controller b to call a shared interface device (e.g., shared interface device a and shared interface device b) using Figures 3-1, 3-2, and 3-3. The following describes the control logic of calling the shared interface device by the controllers using an example with reference to the mode of calling the shared interface device by controller a and controller b.
[0117] In this embodiment of the present application, the mode of invoking the shared interface device by the controller in the storage node is not limited. Optionally, the invocation mode may be an active / standby mode or an active-active mode.
[0118] (1) Active / standby mode In the active / standby mode, the controllers in the storage nodes have different positions with respect to the shared interface device and are classified as active controllers and standby controllers of the shared interface device.
[0119] The controller a and the controller b are assumed to be the active controller and the standby controller of the shared interface device a, respectively. In a normal operating state, the controller a can call the shared interface device a to perform data storage services and data query services, and the controller b cannot call the shared interface device a to perform data storage services or data query services. When the controller a fails, the controller b can take over the shared interface device a and call the shared interface device a to perform data storage services and / or data query services, so as to ensure the availability of data in the cache of the shared interface device a and the availability of data in the memory a.
[0120] The storage node shown in FIG. 3-2 is used as an example to explain a possible specific active / standby switching process. In normal operation, port 21 of interface card a is in an active state and port 22 is in an inactive state. In this way, interface card a can be called by controller a but cannot be called by controller b. When controller a fails, controller a can notify controller b using a heartbeat signal or a power-off interrupt signal between controller a and controller b, and controller b can compete to become the active controller of interface card a. Controller b can notify interface card a of an active / standby switching event to allow port 21 of interface card a to enter an inactive state and stop being called by controller a, and port 22 of interface card a to enter an active state and start being called by controller b.
[0121] (2) Active-active mode In active-active mode, the controllers in the storage nodes have the same position with respect to the shared interface device. Optionally, the controller a and the controller b may alternately call the shared interface device a or the shared interface device b at different times. When the controller a is abnormal and cannot operate, the controller b may call the shared interface device a and / or the shared interface device b to perform data query services to ensure the availability of data in the cache of the shared interface device a and / or the shared interface device b and the availability of data in the connected memory.
[0122] When the conditions for invoking a shared interface device are met, a controller in a storage node may take over the corresponding shared interface device to provide data storage services and data query services using the cache of the corresponding shared interface device and the memory connected to the shared interface device. The following describes a process by which the controller in a storage node invokes a shared interface device to provide data storage services and data query services.
[0123] The following describes the process in which controller a provides data storage services via interface card a.
[0124] FIG. 4 shows an example of a method procedure in which the controller a stores data through the interface card a. The structure other than the application server in FIG. 4 may be, for example, the storage node shown in FIG. 3-2. To simplify the accompanying drawings, FIG. 4 does not specifically show the controller b, the interface card b, and the memory under the interface card b, and does not show the PCIe riser device in the controller a. A possible embodiment of the data processing method provided in the present application may include the following steps S401 to S404.
[0125] S401: The application server sends a write request 1 to the controller a.
[0126] An application server may send a data write request 1 (short for write request 1) to a controller a, and the write request 1 is used to request to store service data 1. The storage system in this embodiment of the present application may provide data storage services through a software system, for example, a file system, a block storage system, or an object storage system. Correspondingly, the service data to be written as requested by the write request 1 may be data in the form of a file, a data block, an object, or the like.
[0127] Step S401 is an optional step. It is not limited in this embodiment of the present application that the write request 1 is sent by the application server. Optionally, the write request 1 may be sent by the client of the terminal, or by the software system used by the storage system. Optionally, the service data 1 may be user data or system data generated by the software system. The location of the software system is not limited in this embodiment of the present application. For example, the software system may be located in the controller a, the controller b, or another controller, the software system may be located in the application server, or the software system is located in an independent server.
[0128] S402: Controller a sends write command 1 to interface card a.
[0129] Controller a may send write command 1 to interface card a based on write request 1, where write command 1 instructs interface card a to store data 1.
[0130] The data 1 includes, but is not limited to, the service data 1. Optionally, the controller a may generate metadata 1 describing the service data 1. Correspondingly, the data 1 may include the service data 1 and the metadata 1. For example, when the service data 1 is held in the memory a2, the metadata 1 may describe the storage location of the service data 1 in the memory a2. The storage location may be a logical address or a physical address.
[0131] S403: Interface card a uses cache and memory a2 to store data 1 to be written as instructed by write command 1.
[0132] After receiving the write command, the interface card a may use the cache and the memory a2 to store the data 1. Because the controller a and the controller b share the cache of the interface card a, in order to reduce the contention caused by the controller a and the controller b writing data to the cache of the interface card a, the cache of the interface card a may be optionally divided into a write partition of the controller a (called partition 1) and a write partition of the controller b (called partition 2). The partition 1 and the partition 2 are two different storage spaces in the cache of the interface card a. The difference between the partition 1 and the partition 2 may mean that the storage space corresponding to the partition 1 and the storage space corresponding to the partition 2 do not overlap. For example, in step S403, the interface card a may use the partition 1 and the memory a2 in the cache of the interface card a to store the data 1.
[0133] After receiving the write command 1, the interface card a can asynchronously write the target data 1 in the data 1 to the memory a2 using the cache. Optionally, the write command 1 may indicate a storage address of the data to be written, and the storage address may point to at least one memory under the interface card a. In this embodiment of the present application, an example is used in which the write command 1 indicates that the storage address of the target data 1 points to the memory a2. The storage address may be a logical address or a physical address in the memory a2. For example, the storage address may be in a logical block addressing (LBA) mode.
[0134] The interface card a asynchronously writes the target data 1 to the memory a2 using the cache may mean that the interface card a first temporarily stores the target data 1 in the cache (e.g., partition 1) and then writes the target data 1 to the memory a2. In addition, after writing the target data 1 to the cache and before writing the target data 1 to the memory a2, the interface card a sends a success notification to the controller a, which is used to notify the controller a that the write command 1 is completed and the target data 1 is stored. Optionally, the controller a may consider the target data 1 to be retained in the memory a2 based on the success notification.
[0135] Optionally, the target data 1 may be all data in the data 1. Alternatively, optionally, the target data 1 may be a portion of the data in the data 1, and the interface card a may store other data in the data 1 (except the target data 1) in another storage method. For example, the interface card a may synchronously write the other data to the memory a2.
[0136] The interface card a synchronously writing the other data to the memory a2 means that the interface card a sends a success notification to the controller a only after writing the other data to the memory a2 to notify the controller a that the other data has been stored.
[0137] In this embodiment of the present application, an example is used in which the interface card a holds the target data 1 and other data in the memory a2. Optionally, the interface card a may store data to be written in multiple memories a as instructed by the write command 1, for example, the target data 1 may be held in the memory a2 and other data may be held in the memory a3.
[0138] In this embodiment of the present application, the write instruction 1 may include one or more instructions. For example, the write instruction 1 may include a write instruction 1-1 for instructing to write target data 1 and a write instruction 1-2 for instructing to write other data.
[0139] Optionally, the interface card a may determine the target data 1 based on the data type. For example, the target data 1 may be metadata 1, and the other data may be service data 1. Alternatively, optionally, the interface card a may determine the target data 1 based on the data length. For example, assuming that the data length of the write command 1-1 is less than the length threshold and the data length of the write command 1-2 is less than the length threshold, the interface card a may use a cache to asynchronously hold the data to be written as instructed by the write command 1-1 and synchronously hold the data to be written as instructed by the write command 1-2. Since the data length of the metadata is usually small, when the length of the service data 1 is also small, the target data 1 may include both the metadata 1 and the service data 1.
[0140] Optionally, the write command 1 may indicate a storage method, and the interface card a may store data in the storage method indicated by the write command 1. For example, the write command 1-1 indicates asynchronous storage, and the write command 1-2 indicates synchronous storage. By using the cache of the interface card a, the interface card a may asynchronously store data to be written as instructed by the write command 1-1 in the memory a2, and synchronously store data to be written as instructed by the write command 1-2 in the memory a2.
[0141] In this embodiment of the present application, the interface card a uses the cache to asynchronously write the target data 1 to the memory a2, and is not limited to only storing the target data 1 in the cache after the interface card a extracts the target data 1 from the write command 1-1. Optionally, the interface card a may store the write command 1-1 in the cache and send the write command 1-1 in the cache to the memory a2 after sending a success notification to the controller a. The memory a2 may parse the target data 1 from the write command 1-1 and store the target data 1.
[0142] Similarly, the interface card a is not limited to synchronously writing other data to the memory a2, and the interface card a extracts the other data from the write command 1-2 and then transmits only the other data to the memory a2. Optionally, the interface card a may transmit the write command 1-2 to the memory a2, and the memory a2 may analyze the other data from the write command 1-2 and store the other data.
[0143] Because the communication protocol (e.g., PCIe protocol) between the interface card a and the controller a is typically different from the communication protocol (e.g., SAS protocol) between the interface card a and the memory a2 or the disk enclosure a, before sending the write command sent by the controller a to the memory a2, the interface card a may convert the format of the write command, for example, converting the format of the write command 1 from the PCIe protocol format to the SAS protocol format.
[0144] Steps S4031 to S4033 shown in Fig. 4 show an example of a possible procedure in which the interface card a uses a cache to asynchronously write the target data 1 to the memory a2. Please refer to Fig. 4. Possible detailed steps of step S403 may include the following steps:
[0145] S4031: Interface card a temporarily stores target data 1 in partition 1.
[0146] After receiving the write command 1, the interface card a may write the target data 1 to be written to the partition 1 as instructed by the write command 1. Referring to the above description, optionally, the cache of the interface card a may include the partition 1 and the partition 2. In S4031, the interface card a writing the target data 1 to the partition 1 in the cache of the interface card a is used as an example and not a limitation.
[0147] Optionally, the write command 1 may further indicate a cache address of the target data 1 in the partition 1. The cache address may be a logical address or a physical address. The interface card a may store the target data 1 in the partition 1 based on the cache address indicated by the write command 1.
[0148] S4032: Interface card a transmits a success notification 1 to controller a.
[0149] After the target data 1 is successfully written to the cache, interface card a may send a success notification to controller a to notify controller a that write command 1 is completed and target data 1 has been successfully stored.
[0150] S4033: The interface card a writes the target data 1 in the partition 1 to the memory a2.
[0151] The interface card a may asynchronously write the first data temporarily stored in the cache to a memory connected to the interface card a. For example, after notifying the controller a that the target data 1 has been successfully stored, the interface card a may write the target data 1 in the cache to the memory a2 to hold the target data 1. Optionally, see FIG. 4. The interface card a may store the target data 1 in the memory a2 through the disk enclosure a.
[0152] Optionally, after notifying the controller a that the target data 1 has been successfully stored, the interface card a may write the target data 1 to the memory a2 when a retention condition is met. The retention condition may be related to at least one of the following factors: the size of the available storage space of the cache, the total length of the data in the cache to be written to the memory a2, and whether the memory a2 is idle.
[0153] In order to improve the storage efficiency of the memory a2, optionally, the interface card a may send the target data 1 in the partition 1 and the other data in the cache to the memory a2 collectively. The other data may include data to be written as instructed by another received write command other than the write command 1 of S402. The location of the other data in the cache is not limited in this embodiment of the present application. For example, the other data may include data in the partition 1 and / or data in the partition 2.
[0154] See Fig. 5. It is assumed that partition 2 of the cache of interface card a further stores target data 2 to be written as instructed by write command 2 sent by controller b. In addition, partition 1 further stores target data m to be written as instructed by write command m and target data n to be written as instructed by write command n sent by controller a, and partition 2 further stores target data p to be written as instructed by write command p sent by controller b. Here, m, n, and p are positive integers greater than 2, and m, n, and p are not equal to each other. Optionally, interface card a may collectively send target data 1 and target data m in partition 1 and target data 2 in partition 2 to memory a2.
[0155] In one example, the storage address (LBA1) of the target data 1, the storage address (LBA2) of the target data 2, and the storage address (LBAm) of the target data m are all assumed to point to the memory a2. When the total length of the target data 1, the target data 2, and the target data m reaches a threshold, the interface card a may collectively send the target data 1, the target data 2, and the target data m to the memory a2. Optionally, the storage address of the target data in the cache may be the storage address indicated by the corresponding write command described above.
[0156] In order to further improve the storage efficiency of memory a2, optionally, interface card a may send data adjacent to the storage address to memory a2 in an aggregated manner. Please refer to Fig. 5 again. The storage address (LBAn) of target data n and the storage address (LBAp) of target data p also point to memory a2, but it is assumed that the storage space indicated by LBA1 is adjacent to the storage space indicated by LBA2 and LBAm, and the storage space indicated by LBA1 is not adjacent to the storage space indicated by LBAn or LBAp. Therefore, interface card a may not send target data 1 and target data n or target data p in an aggregated manner to memory a2.
[0157] The interface card a collectively transmits the target data 1, the target data 2, and the target data m to the memory a2 may mean that the interface card a uses one instruction to distribute the target data 1, the target data 2, and the target data m to the memory a2. Optionally, the interface card a may use another instruction to distribute the target data n and the target data p to the memory a2. Alternatively, the interface card a collectively transmits the target data 1, the target data 2, and the target data m to the memory a2 may mean that the interface card a uses multiple consecutive instructions to distribute the target data 1, the target data 2, and the target data m to the memory a2. The multiple instructions do not include instructions used to store other data (e.g., the target data n, the target data p, or data synchronously stored in the memory a2).
[0158] It can be known that the interface card a collectively transmits the target data 1, the target data 2, and the target data m to the memory a2, which can be understood as the interface card a continuously transmits the target data 1, the target data 2, and the target data m to the memory a2. This helps the memory a2 to continuously process the storage tasks of the target data 1, the target data 2, and the target data m. When the holding addresses of the target data 1, the target data 2, and the target data m are adjacent or even continuous, the large jump of the write address of the memory a2 can be reduced, and the addressing period can be reduced. In this way, the storage efficiency of the memory a2 is improved.
[0159] Optionally, the interface card a or the controller a may determine whether a retention condition is met. Optionally, the write instruction 1 may further instruct the target data 1, the target data 2, and the target data m to be collectively sent to the memory a2.
[0160] S404: The controller a sends a write success response 1 to the application server.
[0161] After successfully storing the data 1 through the interface card a, the controller a may send a write success response 1 to the application server, which may notify that the write request 1 is completed and the service data 1 is stored. Optionally, after the interface card a notifies the controller a that the data 1 is stored, the controller a may determine that the service data 1 is successfully stored.
[0162] As mentioned in step S403 above, optionally, the interface card a may use the cache to asynchronously write the data 1 to the memory a2, and after writing the data 1 to the cache and before writing the data 1 to the memory a2, notify the controller a that the data 1 has been stored. Correspondingly, the controller a may send a write success response 1 to the application server after the data 1 is written to the cache of the interface card a and before the data 1 is retained in the memory a2. This helps to reduce the data storage latency perceived by the application server.
[0163] As mentioned in the above step S403, optionally, the interface card a may asynchronously write the target data 1 (e.g., metadata 1) to the memory a2 via the cache, and after writing the target data 1 to the cache and before writing the target data 1 to the memory a2, notify the controller a that the target data 1 has been stored. In addition, the interface card a may synchronously write other data (e.g., service data 1) in the data 1 (except the target data 1) to the memory a2, and after writing the other data to the memory a2, more specifically, after successfully storing the other data in the memory a2, notify the controller a that the other data has been stored. Correspondingly, the controller a may send a write success response 1 to the application server after the target data 1 is written to the cache of the interface card a and after the other data is retained in the memory a2. Compared with synchronously retaining all data in the data 1 in the memory a2, this helps to reduce the data storage latency perceived by the application server.
[0164] In order to avoid the case where the data in the cache is unavailable after a cache error occurs in interface card a, optionally, after step S402, the method in this embodiment of the present application may further include S405.
[0165] S405: The interface card a synchronously backs up the target data 1 to the memory a1.
[0166] After receiving the write command 1, the interface card a may synchronously write the target data 1 to the memory a1. In other words, after writing the target data 1 to both the cache and the memory a1, and before writing the target data 1 to the memory a2, the interface card a executes step S4032. The data written to the cache is backed up in the memory a1 connected to the interface card a. In this way, even if the cache is abnormal, for example, not retained, and the data in the cache is lost, the interface card a can still find the data in the cache in the memory a1. This helps to improve the availability of the data in the cache and improve the reliability of the data service provided by the storage system.
[0167] Optionally, the memory access latency of the memory a1 may be shorter than the memory access latency of the memory a2. For example, the memory a1 may be an SSD, and the memory a2 may be an HDD. In FIG. 4, only an example is used in which the memory a1 and the memory a2 are connected to the interface card a through a disk enclosure. Optionally, the memory a1 and / or the memory a2 may be directly connected to the interface card a.
[0168] In order to avoid the case where the data in the cache is unavailable after a cache error occurs in interface card a, optionally, after step S401, the method in this embodiment of the present application may further include S406 and S407.
[0169] S406: The controller a stores the target data 1 in the memory c1.
[0170] S407: When the cache is abnormal, the controller a transfers the target data 1 to the memory a2 via the interface card a.
[0171] Optionally, the storage system further includes a memory c1 connected to the controller a. After receiving the write request, the controller a is further configured to write the target data 1 to the memory c1. Optionally, the controller a determines that the target data 1 is successfully stored only after the target data 1 is written to both the cache of the interface card a and the memory c1.
[0172] After the cache becomes abnormal, the controller a may transfer the data in the memory c1 (including the target data 1) to a memory under the interface card a, for example, the memory a2 or another memory, via the interface card a. In this way, even if the cache becomes abnormal, for example, the data in the cache is lost, not retained, the interface card a can still find the data in the cache in at least one memory. This helps to improve the availability of the data in the cache and improve the reliability of the data service provided by the storage system.
[0173] The following describes the process in which controller b provides data storage services via interface card a.
[0174] FIG. 6 shows an example of a method procedure in which the controller b stores data through the interface card a. The structure other than the application server in FIG. 6 may be, for example, the storage node shown in FIG. 3-2. To simplify the accompanying drawings, FIG. 6 does not specifically show the interface card b and the memory under the interface card b, and does not show the PCIe riser device in the controller a and the controller b. Another possible embodiment of the data processing method provided in the present application may include the following steps S601 to S604.
[0175] S601: The application server sends a write request 2 to the controller b.
[0176] Step S601 may be understood with reference to the above step S401. For example, write request 2 may be understood with reference to the related description of write request 1.
[0177] In this embodiment of the present application, it is not limited that the write request 1 and the write request 2 are from the same device. For example, the write request 1 and the write request 2 may be from different application servers, or one is from an application server and the other is from a software system.
[0178] In this embodiment of the present application, it is not limited that the service data 1 corresponding to the write request 1 and the service data 2 corresponding to the write request 2 are the same type of data. For example, the service data 1 may be user data, and the service data 2 may be system data.
[0179] S602: The controller b sends a write command 2 to the interface card a.
[0180] The controller b may send a write command 2 to the interface card a based on the write request 2, and the write command 2 instructs the interface card a to store the data 2. Step S602 may be understood with reference to step S402. For example, the write command 2 may be understood with reference to the related description of the write command 1, and the data 2 may be understood with reference to the aforementioned data 1.
[0181] Referring to the connection method shown in FIG. 3-2, unlike S402, since interface card a is inserted into controller a, the line through which controller b sends write command 2 to interface card a is different from the line through which controller a sends write command 1 to interface card a.
[0182] S603: Interface card a uses cache and memory a3 to store data2 to be written as instructed by write command2.
[0183] After receiving the write command 2, the interface card a can use cache and memory a3 to store data 2. In this embodiment of the present application, the memory a3 is different from the memory a2, which is used as an example and not a limitation. Optionally, the interface card a can use cache and memory a2 to store data 2.
[0184] Step S603 may be understood with reference to step S403. For example, after receiving the write command 2, the interface card b may use a cache to asynchronously write the target data 2 in the data 2 to the memory a3. Optionally, the target data 2 may be all data in the data 2. Alternatively, optionally, the target data 2 may be a part of data in the data 2, and the interface card b may store other data in the data 2 (except the target data 2) in another storage method. For example, the interface card b may synchronously write the other data to the memory a3. The write command 2 may include one or more commands. For example, the write command 2 may include a write command 2-1 instructing to write the target data 2 and a write command 2-2 instructing to write the other data.
[0185] Similar to step S403, referring to FIG. 6, possible detailed steps of step S603 may include the following steps:
[0186] S6031: Interface card a temporarily stores target data 2 in partition 2.
[0187] S6032: The interface card a sends a success notification 2 to the controller b.
[0188] S6033: Interface card a writes target data 2 in partition 2 to memory a3.
[0189] Partition 2 may be understood with reference to partition 2 mentioned in step S403, and S6031-S6033 may be understood with reference to S4031-S4033, respectively.
[0190] S604: The controller b sends a write success response 2 to the application server.
[0191] After successfully storing data 2 through interface card a, controller b may send a write success response to the application server to complete the data storage service. Optionally, after interface card a notifies controller b that data 2 has been stored, controller b may determine that data 2 has been successfully stored.
[0192] As mentioned in step S603 above, optionally, the interface card a may use the cache to asynchronously write the data 2 to the memory a3, and after writing the data 2 to the cache and before writing the data 2 to the memory a3, notify the controller b that the data 2 has been stored. Correspondingly, the controller b may send a write success response 2 to the application server after the data 2 is written to the cache of the interface card a and before the data 2 is retained in the memory a3. This helps to reduce the data storage latency perceived by the application server.
[0193] As mentioned in the above step S603, optionally, the interface card a may use the cache to write the target data 2 (e.g., metadata 2) to the memory a3 asynchronously, and after writing the target data 2 to the cache and before writing the target data 2 to the memory a3, notify the controller b that the target data 2 has been stored. In addition, the interface card a may synchronously write other data (e.g., service data 2) (except the target data 2) in the data 2 to the memory a3, and after writing the other data to the memory a3, more specifically, after successfully storing the other data in the memory a3, notify the controller b that the other data has been stored. Correspondingly, the controller b may send a write success response 2 to the application server after the target data 2 is written to the cache of the interface card a and after the other data is retained in the memory a3. Compared with synchronously retaining all data in the data 2 in the memory a3, this helps to reduce the data storage latency perceived by the application server.
[0194] In order to avoid the case where the data in the cache is unavailable after a cache error occurs in interface card a, optionally, after step S602, the method in this embodiment of the present application may further include S605.
[0195] S605: The interface card a synchronously writes the target data 2 to the memory a1.
[0196] For step S605, please refer to step S405. Details will not be described again here. For example, optionally, the memory access latency of memory a1 may be shorter than the memory access latency of memory a2. For example, memory a1 may be an SSD, and memory a2 may be an HDD. In FIG. 6, only an example is used in which memory a1 and memory a2 are connected to interface card a through a disk enclosure. Optionally, memory a1 and / or memory a2 may be directly connected to interface card a.
[0197] In order to avoid the case where the data in the cache is unavailable after a cache error occurs in interface card a, optionally, after step S601, the method in this embodiment of the present application may further include S606 and S607.
[0198] S606: The controller b stores the target data 2 in the memory c.
[0199] S607: When the cache is abnormal, the controller b transfers the target data 2 to the memory a3 via the interface card a.
[0200] Optionally, the storage system further includes a memory c2 connected to the controller b. After receiving the write request, the controller b is further configured to write the target data 2 to the memory c2. After the cache becomes abnormal, the controller b may transfer the data in the memory c2 (including the target data 2) to a memory under the interface card a, for example, the memory a3 or another memory, via the interface card a. In this way, even if the cache becomes abnormal, for example, the data in the cache is lost, not retained, the interface card a can still find the data in the cache in at least one memory. This helps to improve the availability of the data in the cache and improve the reliability of the data service provided by the storage system.
[0201] The controller b may provide a data storage service through the interface card b. See FIG. 3-2. Since the interface card b is inserted into the controller b, the process of the controller b providing a data storage service through the interface card b is referred to the embodiment corresponding to FIG. 4. Specifically, for the steps performed by the controller b, please refer to the steps performed by the controller a in the embodiment corresponding to FIG. 4, and for the steps performed by the interface card b, please refer to the steps performed by the interface card a in the embodiment corresponding to FIG. 4.
[0202] The controller a may provide a data storage service through an interface card b. See FIG. 3-2. Since the interface card b is inserted into the controller b, the process of the controller a providing a data storage service through the interface card b may be referred to the embodiment corresponding to FIG. 6. Specifically, for the steps performed by the controller a, please refer to the steps performed by the controller b in the embodiment corresponding to FIG. 6, and for the steps performed by the interface card b, please refer to the steps performed by the interface card a in the embodiment corresponding to FIG. 6.
[0203] The following describes the process in which controller a provides data query services through interface card a.
[0204] FIG. 7 shows an example of a method procedure in which a controller a inquires about data through an interface card a. The structure other than the application server in FIG. 7 may be, for example, a storage node shown in FIG. 3-2. To simplify the accompanying drawings, FIG. 7 does not specifically show the controller b, the interface card b, and the memory under the interface card b, and does not show the PCIe riser device in the controller a. Another possible embodiment of the data processing method provided in the present application may include the following steps S701 to S704.
[0205] S701: The application server sends a read request 1 to the controller a.
[0206] The application server may send a data read request 1 (short, read request 1) to the controller a, and the read request 1 is used to request to read the service data 3. The service data 3 may be the service data 1 described in S401 or the service data 2 described in S601. In this embodiment of the present application, the read request 1 is sent by the application server is used as an example and not a limitation. For another possible source of the read request 1, please refer to the related content of S401.
[0207] S702: Controller a sends read command 1 to interface card a.
[0208] After receiving the read request 1, the controller a may send a read command 1 to the interface card a, which instructs the interface card a to query the data 3. The data 3 may be the service data 2, or may include the service data 2 and data other than the service data 2.
[0209] S703: Interface card a queries its cache and connected memory for data 3 to be read as instructed by read command 1, and provides data 3 to controller a.
[0210] After receiving the read command 1, the interface card a may inquire about the data 3. The inquiry range may include the cache of the interface card a and the memories connected to the interface card a (e.g., memory a1, memory a2, and memory a3).
[0211] The querying method of the interface card a within the query range is not limited in this embodiment of the present application. Optionally, the interface card a may traverse the cache, the memory a1, the memory a2, and the memory a3 to query the data 3. Then, the interface card a may return one or more query results to the controller a. Alternatively, optionally, the interface card a may sequentially access the cache and the connected memory in a specific order, and when the data 3 is found, the interface card a stops searching for the data 3. For example, the interface card a may first search for the data 3 in the cache. If the data 3 is found, the interface card a returns the data 3 to the controller a, or if the data 3 is not found, the interface card a continues to search for the data 3 in the memory a1. If the interface card a finds the data 3 in the memory a1, the interface card a returns the data 3 to the controller a, or if the interface card a does not find the data 3 in the memory a1, the interface card a continues to search for the target data 3 in the memory a2. By analogy, controller a may return the first found data 3 to controller a and stop searching for data 3. If controller a fails to find data 3 within all search ranges, controller a may notify controller a that the query has failed.
[0212] In this embodiment of the present application, the data 3 may include target data 3, and the target data 3 may be all or a part of the first target data. The first target data may be the target data 1 mentioned in S403, or the target data 2 mentioned in S603. The interface card a uses a cache to temporarily store the first target data, so that when the interface card a receives the read command 1 before the first target data is stored, the interface card a may obtain all or a part of the target data 3 from the cache according to the read command 1.
[0213] Please refer to the contents of S403. The cache of the interface card a may be divided into partition 1 and partition 2 shown in FIG. 7. Partition 1 may be used to store data for the controller a, and partition 2 may be used to store data for the controller b. The query range in which the interface card a queries the target data 3 in the cache may include partition 1 and partition 2. If the target data 3 is all or part of the target data 1, the interface card a may obtain all or part of the target data 3 from partition 1, or if the target data 3 is all or part of the target data 2, the interface card a may obtain all or part of the target data 3 from partition 2. In FIG. 7, a solid line with an arrow between the processor and partition 2 may indicate that the processor finds the target data 3 in partition 2, and a dashed line with an arrow between the processor and partition 1 or disk enclosure a may indicate that the range in which the processor searches for the target data 3 includes partition 1 and disk enclosure a.
[0214] If interface card a receives read command 1 after the first target data is retained, interface card a may retrieve all or part of target data 3 from a connected memory (e.g., memory a1, memory a2, or memory a3) in accordance with read command 1.
[0215] See step S405 or S605. It is assumed that the interface card a synchronously backs up the first target data to the memory a1. In this way, when the target data 3 in the cache is not held or is not held completely and the cache is abnormal, the interface card a can obtain all or part of the target data 3 from the memory a1. This helps to improve the availability of the data in the cache.
[0216] Please refer to steps S406 and S407, or refer to steps S606 and S607. It is assumed that the controller a backs up the target data 1 to the memory c1, or the controller b backs up the target data 2 to the memory c2, and after the cache becomes abnormal, the controller a transfers the backup data to the memory a2, or the controller b transfers the backup data to the memory a3. In this way, when the target data 3 in the cache is not held or is not held completely and the cache is abnormal, the interface card a can obtain all or part of the target data 3 from the memory a2 or the memory a3. This helps to improve the availability of the data in the cache.
[0217] Optionally, the read command 1 may indicate a search range of the data 3, for example, to inquire the cache of the interface card a and the memory under the disk enclosure a for the data 3. In this embodiment of the present application, the manner in which the interface card a inquires about other data (except the target data 3) in the data 3 is not limited. Optionally, the interface card a may also inquire about other data from the cache and the connected memory, or may inquire about other data only from the connected memory. After finding the other data, the interface card a may return the other data to the controller a. If the other data is not found, the controller a may notify the controller that the inquiry has failed.
[0218] In this embodiment of the present application, the read command 1 may include one or more commands. For example, the read command 1 may include a read command 1-1 to instruct to query the target data 3 and a read command 1-2 to instruct to query data other than the target data 3. The read command 1-1 may instruct to inquire the cache of the interface card a and the memory under the interface card a for the target data 3, and the read command 1-2 instructs to inquire the memory under the interface card a for other data.
[0219] For example, the target data 3 is metadata 3 that describes service data 3. It is assumed that the metadata 3 describes a storage location of the service data 3 in memory a3. After retrieving the metadata 3 from the cache, the interface card a may retrieve the service data 3 from the memory a3 based on the metadata 3.
[0220] S704: The controller a sends the query result 1 to the application server.
[0221] When the controller a receives the data 3 returned by the interface card a, the controller a may obtain the service data 3 from the data 3 and send the query result 1 carrying the service data 3 to the application server.
[0222] If controller a does not receive data 3 returned by interface card a within a certain period of time, or interface card a feedbacks a query failure, controller a may send a query result 1 that does not carry service data 3 to the application server, and the query result indicates that the service data 3 cannot be found.
[0223] Please refer to Figure 7. It is assumed that target data 3 is stored in partition 2. It can be understood that target data 3 is data stored by interface card a for controller b. In this way, even if controller b fails, interface card a can query controller a for the data of controller b in partition 2, and controller a will send the data to the application server. This helps to ensure the availability of the data of controller b in the cache of interface card a, and thus helps to improve the reliability of the storage system.
[0224] The following describes the process in which controller b provides data query service through interface card a.
[0225] FIG. 8 illustrates an example of a method procedure in which the controller b queries data through the interface card a. The structure other than the application server in FIG. 8 may be, for example, the storage node illustrated in FIG. 3-2. To simplify the accompanying drawings, FIG. 8 does not specifically illustrate the interface card b and the memory under the interface card b, and does not illustrate the controller a and the PCIe riser device in the controller b. Another possible embodiment of the data processing method provided in the present application may include the following steps S801 to S804.
[0226] S801: The application server sends a read request 2 to the controller b.
[0227] Step S801 may be understood with reference to the above step S701. For example, read request 2 may be understood with reference to the related description of read request 1.
[0228] In this embodiment of the present application, it is not limited that the read request 1 and the read request 2 are from the same device. For example, the read request 1 and the read request 2 may be from different application servers, or one is from an application server and the other is from a software system.
[0229] S802: Controller b sends read command 2 to interface card a.
[0230] After receiving the read request 2, the controller b may send a read command 2 to the interface card a, which instructs it to query for the data 4.
[0231] Step S802 can be understood with reference to step S702. With reference to the connection method shown in FIG. 3-2, unlike S702, because interface card a is inserted into controller a, the line through which controller b sends read command 2 to interface card a is different from the line through which controller a sends read command 1 to interface card a.
[0232] S803: Interface card a queries its cache and connected memory for data 4 to be read as instructed by read command 2, and provides data 4 to controller b.
[0233] After receiving read command 2, interface card a may query the cache and memories connected to interface card a (e.g., memory a1, memory a2, and memory a3) for data 4 to be read as instructed by read command 2.
[0234] Step S803 can be understood with reference to step S703.
[0235] For example, data 4 may include target data 4, and target data 4 may be all or a part of first target data. The first target data may be target data 1 mentioned in S403, or may be target data 2 mentioned in S603. Since interface card a uses a cache to temporarily store the first target data, if interface card a receives read command 2 before the first target data is stored, interface card a may obtain all or a part of target data 4 from the cache according to read command 2.
[0236] For example, the read command 2 may include one or more commands. For example, the read command 2 may include a read command 2-1 that instructs to query the target data 4 and a read command 2-2 that instructs to query data other than the target data 4. The read command 2-1 may instruct to query the cache of the interface card a and a memory subordinate to the interface card a for the target data 4, and the read command 2-2 instructs to query the memory subordinate to the interface card a for other data.
[0237] For example, if interface card a receives read command 2 after the first target data is retained, interface card a may retrieve all or part of the target data 4 from a connected memory (e.g., memory a1, memory a2, or memory a3) in accordance with read command 2.
[0238] For example, see step S405 or S605. It is assumed that the interface card a synchronously backs up the first target data to the memory a1. In this way, when the target data 4 in the cache is not held or is not held completely and the cache is abnormal, the interface card a can retrieve all or part of the target data 4 from the memory a1. This helps to improve the availability of the data in the cache.
[0239] For example, see steps S406 and S407, or see steps S606 and S607. It is assumed that the controller a backs up the target data 1 to the memory c1, or the controller b backs up the target data 2 to the memory c2, and after the cache becomes abnormal, the controller a transfers the backup data to the memory a2, or the controller b transfers the backup data to the memory a3. In this way, when the target data 4 in the cache is not held or is not held completely and the cache is abnormal, the interface card a can obtain all or part of the target data 4 from the memory a2 or the memory a3. This helps to improve the availability of the data in the cache.
[0240] S804: The controller b sends the query result 2 to the application server.
[0241] When the controller b receives the data 4 returned by the interface card a, the controller b may obtain the service data 4 from the data 4, and send the query result carrying the service data 4 to the application server.
[0242] If controller b does not receive data 4 returned by interface card a within a certain period of time, or interface card a feedbacks a query failure, controller b may send a query result to the application server that does not carry service data 4, and the query result indicates that the service data 4 cannot be found.
[0243] Please refer to Figure 8. It is assumed that target data 4 is stored in partition 1. It can be understood that target data 4 is data stored by interface card a for controller a. In this way, even if controller a fails, interface card a can query controller b for controller a's data in partition 1, and controller b will send the data to the application server. This helps to ensure the availability of controller a's data in interface card a's cache, and thus helps to improve the reliability of the storage system.
[0244] The controller b may provide a data query service through the interface card b. See FIG. 3-2. Since the interface card b is inserted into the controller b, the process of the controller b providing a data query service through the interface card b may refer to the embodiment corresponding to FIG. 7. Specifically, the steps performed by the controller b may refer to the steps performed by the controller a in the embodiment corresponding to FIG. 7, and the steps performed by the interface card b may refer to the steps performed by the interface card a in the embodiment corresponding to FIG. 7.
[0245] The controller a may provide a data query service through the interface card b. See FIG. 3-2. As the interface card b is inserted into the controller b, the process of the controller a providing a data storage service through the interface card b may be referred to the embodiment corresponding to FIG. 8. Specifically, for the steps performed by the controller a, please refer to the steps performed by the controller b in the embodiment corresponding to FIG. 8, and for the steps performed by the interface card b, please refer to the steps performed by the interface card a in the embodiment corresponding to FIG. 8.
[0246] For the data storage service and data query service provided by each controller in the storage node corresponding to Figure 3-3, please refer to the corresponding service provided by the corresponding controller in the storage node corresponding to Figure 3-2 described above. For example, by replacing the interface card a in the embodiment corresponding to Figure 4 with a disk enclosure a, a process in which the controller a shown in Figure 3-3 provides a data storage service through the disk enclosure a can be determined.
[0247] The above describes in detail the storage system and the data processing method related to the storage system provided in the embodiment of the present application. In order to better implement the above-mentioned solution in the embodiment of the present application, the following correspondingly further provides related devices configured to cooperate in implementing the above-mentioned solution.
[0248] FIG. 9 is a schematic diagram of the structure of a shared interface device according to an embodiment of the present application. The shared interface device may be the shared interface device a or the shared interface device b in the method embodiment of FIG. 3-1, or the interface card a or the interface card b in the method embodiment of FIG. 3-2 or FIG. 3-3, and may perform the method and steps performed by the corresponding shared interface device in the method of the corresponding embodiment. The first controller and the second controller separately communicate with at least one memory through the shared interface device. As shown in FIG. 9, the shared interface device 900 includes a receiving module 901, a storage module 902, and an inquiry module 903.
[0249] The receiving module 901 is configured to receive the write command sent by the first controller. For specific implementation, please refer to the relevant description of step S402 in Fig. 4 or the relevant description of step S602 in Fig. 6. Details are not described again here.
[0250] The storage module 902 is configured to temporarily store the first data to be written as instructed by the write instruction in a cache of the storage module 902, and is further configured to asynchronously write the first data temporarily stored in the cache to the first memory in at least one memory. For specific implementation, please refer to the relevant description of step S403. For example, for details, please refer to the relevant description of step S4031 or steps S4031 to S4033, or refer to the relevant description of step S603. For example, for details, please refer to the relevant description of step S6031 or steps S6031 to S6033. Details will not be described again here.
[0251] The receiving module 901 is further configured to receive a read command sent by the second controller after the first controller fails, the read command instructs to inquire second data, and the second data is the whole or part of the first data. For specific implementation, please refer to the relevant description of step S702 in Fig. 7 or the relevant description of step S802 in Fig. 8. Details are not described again here.
[0252] The inquiry module 903 is configured to obtain all or part of the second data from the cache according to the read command, and provide all or part of the second data to the second controller. For specific implementation, please refer to the relevant description of step S703 in Fig. 7 or the relevant description of step S803 in Fig. 8. Details are not described again here.
[0253] Optionally, the cache includes a first partition and a second partition. The first partition is used to temporarily store data for the first controller but is not used to temporarily store data for the second controller. The second partition is used to temporarily store data for the second controller but is not used to temporarily store data for the first controller. A query range from which the query module 903 obtains all or a portion of the second data in the cache includes the first partition and the second partition.
[0254] Optionally, the write instruction instructs to write the first data to the first memory, and the storage module 902 is specifically configured to temporarily store the first data in the first partition. The storage module 902 is further configured to sequentially transmit the first data temporarily stored in the first partition and the second data temporarily stored in the second partition to the first memory, the first data including data written to the first memory as instructed by the first controller, and the second data including data written to the first memory as instructed by the second controller.
[0255] Optionally, the at least one memory further includes a second memory, and a memory access latency of the second memory is shorter than a memory access latency of the first memory. The storage module 902 is further configured to: synchronously back up the first data to the second memory after receiving a write instruction, and obtain all or a part of the second data from the second memory according to a read instruction when the cache is abnormal, and provide all or a part of the second data to the second controller.
[0256] Optionally, the storage system further includes a third memory connected to the first controller. The inquiry module 903 is further configured to obtain all or a part of the second data from the connected fourth memory according to the read command when the cache is abnormal after the receiving module 901 receives the read command, and provide all or a part of the second data to the second controller. All or a part of the second data in the fourth memory is transferred by the first controller from the third memory to the fourth memory through the shared interface device after the cache becomes abnormal, and the data in the third memory includes the first data backed up by the first controller.
[0257] Optionally, the data includes service data and / or metadata of the service data, the service data being data to be written as requested by a data write request received by the first controller.
[0258] Optionally, the shared interface device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate at least one memory.
[0259] Optionally, the shared interface device communicates with the first controller and / or the second controller using a Peripheral Component Interconnect Express PCIe protocol.
[0260] An embodiment of the present application further provides a computing device. The first controller and the second controller communicate with at least one memory separately through the computing device. The computing device includes a memory and a processor. The memory includes a cache. The processor executes computer instructions stored in the memory to enable the computing device to execute the method executed by the shared interface device a or the shared interface device b described above. Optionally, the computing device may be, for example, an interface card a or an interface card b shown in FIG. 3-2, or may be, for example, a disk enclosure a or a disk enclosure b shown in FIG. 3-3.
[0261] The present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, some or all of the steps recorded in any one of the above method embodiments can be implemented.
[0262] An embodiment of the present invention further provides a computer program comprising instructions, which when executed by a computer may cause the computer to perform some or all of the steps of any of the methods for provisioning region resources.
[0263] In the above embodiments, the description of each embodiment has its own focus. For the parts not described in detail in one embodiment, please refer to the relevant descriptions of other embodiments.
[0264] Those skilled in the art may understand that the aforementioned computer-readable storage medium includes any non-transitory machine-readable medium capable of storing program code, such as a USB flash drive, a removable hard disk drive, a magnetic disk, an optical disk, a RAM, an SSD, or a non-volatile memory.
[0265] It should be noted that for the sake of simple description, the above method embodiments are represented as a combination of a series of operations. However, those skilled in the art should understand that the present application is not limited to the described order of operations, since some steps may be performed in other orders or simultaneously according to the present application. It should be further appreciated by those skilled in the art that the embodiments described herein all belong to exemplary embodiments, and the related operations and modules are not necessarily required by the present application. "A and / or B" in the embodiments of the present application can be understood as two solutions, namely "A and B" and "A or B".
[0266] In the specification, claims, and accompanying drawings of this application, terms such as "first," "second," "third," and "fourth" are intended to distinguish between similar objects, but do not necessarily indicate a particular sequence or order. It is to be understood that terms so used are interchangeable where appropriate, and are merely a distinguishing method for describing objects having the same attributes in the embodiments of this application.
[0267] In some embodiments provided in the present application, it should be understood that the disclosed device may be implemented in other ways. For example, the described device embodiment is only an example. For example, the division into units is only a logical division of functions, and may be other divisions in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. In addition, the shown or described mutual couplings or direct couplings or communication connections may be implemented through some interfaces. Indirect couplings or communication connections between devices or units may be implemented in electronic or other forms.
[0268] The units described as separate parts may or may not be physically separate, and the parts presented as units may or may not be physical units, and may be located in one location or distributed among multiple network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
[0269] In addition, the functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist physically alone, or two or more units may be integrated into one unit. The integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0270] Finally, it should be noted that the above embodiments are only intended to illustrate the technical solutions of the present application, rather than limiting the present invention. [Explanation of symbols]
[0271] 11 Port 12 ports 13 Ports 14 Ports 21 Port 22 Port 23 Port 31 Port 32 Ports 900 Shared Interface Devices 901 Receiver Module 902 Memory Module 903 Query Module
Claims
1. 1. A storage system, comprising: a first controller and a second controller, the first controller and the second controller separately communicating with at least one memory through a shared interface device in which a cache is disposed; The first controller is configured to send a write command to the shared interface device to instruct the shared interface device to write first data; the shared interface device is configured to temporarily store the first data in the cache and is further configured to asynchronously write the first data temporarily stored in the cache to a first memory in the at least one memory; the second controller is configured to send a read command to the shared interface device after the first controller fails, the read command instructing the shared interface device to query second data, the second data being all or a portion of the first data; The shared interface device is further configured to retrieve all or a portion of the second data from the cache in accordance with the read instruction and provide the all or the portion of the second data to the second controller.
2. The second controller is further configured to send a write command to the shared interface device to instruct the shared interface device to write third data; the shared interface device is further configured to temporarily store the third data in the cache, and is further configured to asynchronously write the third data temporarily stored in the cache to the first memory.
2. The storage system of claim 1.
3. 3. The storage system of claim 2, wherein the cache comprises a first partition and a second partition, the first partition is used to temporarily store data for the first controller, and the second partition is used to temporarily store data for the second controller, and a query range for the shared interface device to obtain the whole or the part of the second data in the cache includes the first partition and the second partition.
4. The shared interface device specifically includes: temporarily storing the first data in the first partition and temporarily storing the third data in the second partition; The first data temporarily stored in the first partition and the third data temporarily stored in the second partition are successively transmitted to the first memory. The storage system of claim 3 , configured to:
5. the at least one memory further comprises a second memory, the second memory having a memory access latency less than a memory access latency of the first memory, and the shared interface device is After receiving the write command, synchronously backing up the first data in the second memory; When the cache is abnormal, obtain the whole or the part of the second data from the second memory in accordance with the read command, and provide the whole or the part of the second data to the second controller. The storage system of claim 1 , further configured to:
6. The storage system further includes a third memory connected to the first controller, the first controller comprising: backing up the first data in the third memory; When the cache is abnormal, the data backed up in the third memory is transferred to a fourth memory in the at least one memory via the shared interface device. The method further comprises: The shared interface device comprises: When the cache is abnormal, obtain the whole or the part of the second data from the fourth memory in accordance with the read command, and provide the whole or the part of the second data to the second controller. The storage system of claim 1 , further configured to:
7. 7. The storage system of claim 1, wherein the data includes service data and / or metadata of the service data, the service data being data to be written as requested by a data write request received by the first controller.
8. 8. The storage system of claim 1, wherein the shared interface device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate the at least one memory.
9. 9. The storage system of claim 1, wherein the shared interface device communicates with the first controller and / or the second controller using a Peripheral Component Interconnect Express PCIe protocol.
10. 10. The storage system of claim 1, wherein each of the at least one memory has only a single port for communicating with the shared interface device.
11. 1. A storage system, comprising: a first controller and a second controller, the first controller and the second controller separately communicating with at least one memory through a shared interface device in which a cache is disposed; The first controller is configured to send a write command to the shared interface device to instruct the shared interface device to write first data; The second controller is configured to send a write command to the shared interface device to instruct the shared interface device to write third data; the shared interface device is further configured to temporarily store the first data and the third data in the cache, and is further configured to asynchronously write the first data and the third data temporarily stored in the cache to a first memory in the at least one memory.
12. A data processing method, comprising: a storage system including a first controller and a second controller, the first controller and the second controller separately communicating with at least one memory through a shared interface device in which a cache is disposed, the method comprising: sending, by the first controller, a write command to the shared interface device, the write command instructing the shared interface device to write first data; temporarily storing, by the shared interface device, the first data in the cache, and asynchronously writing, by the shared interface device, the first data temporarily stored in the cache to a first memory in the at least one memory; sending a read command by the second controller to the shared interface device after the first controller fails, the read command instructing the shared interface device to query second data, the second data being all or a portion of the first data; obtaining, by the shared interface device, all or a portion of the second data from the cache in accordance with the read command and providing the all or the portion of the second data to the second controller; (c) a method for processing data,
13. The method comprises: sending, by the second controller, a write command to the shared interface device, the write command instructing the shared interface device to write third data; temporarily storing, by the shared interface device, the third data in the cache; and asynchronously writing, by the shared interface device, the third data temporarily stored in the cache to the first memory.
13. The method of claim 12, further comprising:
14. 14. The method of claim 13, wherein the cache comprises a first partition and a second partition, the first partition is used to temporarily store data for the first controller, and the second partition is used to temporarily store data for the second controller, and a query range from which the shared interface device obtains the whole or the portion of the second data in the cache includes the first partition and the second partition.
15. The step of temporarily storing, by the shared interface device, the first data and the third data in the cache includes: temporarily storing, by the shared interface device, the first data in the first partition and the third data in the second partition. Including, The step of asynchronously writing, by the shared interface device, the first data and the third data temporarily stored in the cache to the first memory includes: transmitting, by the shared interface device, the first data temporarily stored in the first partition and the third data temporarily stored in the second partition to the first memory in succession.
15. The method of claim 14, comprising:
16. The at least one memory further comprises a second memory, wherein a memory access latency of the second memory is less than a memory access latency of the first memory, and the method further comprises: Synchronizing and backing up the first data to the second memory by the shared interface device after receiving the write command; obtaining, by the shared interface device, all or a portion of the second data from the second memory according to the read command when the cache is abnormal, and providing the all or a portion of the second data to the second controller; 16. The method of any one of claims 12 to 15, further comprising:
17. The storage system further includes a third memory connected to the first controller, and the method further includes: backing up the first data in the third memory by the first controller; transferring, by the first controller, the data backed up in the third memory to a fourth memory in the at least one memory through the shared interface device when the cache is abnormal; obtaining, by the shared interface device, all or a portion of the second data from the fourth memory according to the read command after the shared interface device receives the read command and when the cache is abnormal, and providing the all or a portion of the second data to the second controller; 17. The method of any one of claims 12 to 16, further comprising:
18. 18. The method of claim 12, wherein the data comprises service data and / or metadata of the service data, the service data being data to be written as requested by a data write request received by the first controller.
19. 19. The method of claim 12, wherein the shared interface device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate the at least one memory.
20. 20. The method of claim 12, wherein the shared interface device communicates with the first controller and / or the second controller using a Peripheral Component Interconnect Express PCIe protocol.
21. 21. The method of claim 12, wherein each of the at least one memory has only a single port for communicating with the shared interface device.
22. A data processing method, comprising: a storage system including a first controller and a second controller, the first controller and the second controller separately communicating with at least one memory through a shared interface device in which a cache is disposed, the method comprising: sending, by the first controller, a write command to the shared interface device, the write command instructing the shared interface device to write first data; sending, by the second controller, a write command to the shared interface device, the write command instructing the shared interface device to write third data; temporarily storing, by the shared interface device, the first data and the third data in the cache, and asynchronously writing, by the shared interface device, the first data and the third data temporarily stored in the cache to a first memory in the at least one memory; (c) a method for processing data,
23. A data processing method, comprising: a storage system including a first controller and a second controller, the first controller and the second controller separately communicating with at least one memory through a shared interface device in which a cache is disposed, the method comprising: receiving, by the shared interface device, a write command sent by the first controller, the write command instructing the first controller to write first data; temporarily storing, by the shared interface device, the first data in the cache, and asynchronously writing, by the shared interface device, the first data temporarily stored in the cache to a first memory in the at least one memory; receiving, by the shared interface device, a read command sent by the second controller after the first controller fails, the read command instructing to query second data, the second data being all or a portion of the first data; obtaining, by the shared interface device, all or a portion of the second data from the cache in accordance with the read command and providing the all or the portion of the second data to the second controller; (c) a method for processing data,
24. A shared interface device comprising a receiving module, a storage module, and a query module, The receiving module is configured to receive a write command sent by a first controller to instruct writing first data, the first controller and the second controller separately communicating with at least one memory via the shared interface device; the storage module is configured to temporarily store the first data in a cache of the storage module and asynchronously write the first data temporarily stored in the cache to a first memory in the at least one memory; The receiving module is further configured to receive a read command sent by the second controller after the first controller fails, the read command instructing to query second data, the second data being all or a portion of the first data; A shared interface device, wherein the interrogation module is configured to obtain all or a portion of the second data from the cache in accordance with the read instruction and provide the all or the portion of the second data to the second controller.
25. A data processing method, comprising: a storage system including a first controller and a second controller, the first controller and the second controller separately communicating with at least one memory through a shared interface device in which a cache is disposed, the method comprising: receiving, by the shared interface device, a write command sent by the first controller instructing the writing of first data and a write command sent by the second controller instructing the writing of third data; temporarily storing, by the shared interface device, the first data and the third data in the cache, and asynchronously writing, by the shared interface device, the first data and the third data temporarily stored in the cache to a first memory in the at least one memory; (c) a method for processing data,
26. A shared interface device comprising a receiving module, a storage module, and a query module, The receiving module receives a write command sent by a first controller to instruct writing first data and a write command sent by a second controller to instruct writing third data, the first controller and the second controller separately communicating with at least one memory via the shared interface device; the storage module is configured to temporarily store the first data and the third data in a cache of the storage module and asynchronously write the first data and the third data temporarily stored in the cache to a first memory in the at least one memory, the shared interface device.
27. 26. A computing device, wherein a first controller and a second controller communicate separately with at least one memory via the computing device, the computing device comprising a memory and a processor, the memory comprising a cache, and the processor executing computer instructions stored in the memory to enable the computing device to perform the method of claim 23 or 25.
28. 28. The computing device of claim 27, wherein the computing device is an interface card or a disk enclosure, the interface card being inserted into the first controller or the second controller, and the disk enclosure being configured to incorporate the at least one memory.
Citation Information
Patent Citations
Information processor
JP1995160594A
Storage device system
JP2005043930A
Electronic device, computer system, and control method
JP2019175292A
High availability storage system
US20070294564A1
Methods and systems using solid-state drives as storage controller cache memory
US20120102268A1
