A storage control method and apparatus applied to a storage device
By using heterogeneous controllers in the storage device and determining the target data channel through negotiation, the reliability problems caused by the same hardware of multiple controllers are solved, achieving higher reliability and business continuity.
Patent Information
- Application Number
- CN202211058841.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Multiple controllers in existing storage devices use the same hardware platform, resulting in the same exception may cause all controllers to fail to work, reducing the reliability and business continuity of the storage devices.
Using at least two heterogeneous controllers, through differentiated design, the target data channel type is determined through negotiation between the controllers and a target data channel is established to ensure that each controller can still work normally under abnormal conditions.
Improve the reliability and business continuity of storage devices. Through the differentiated design of heterogeneous controllers, system crashes caused by simultaneous abnormalities of multiple controllers are avoided, and the flexibility and adaptability of data transmission are enhanced.
Smart Images

Figure CN115391105B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage, and particularly to a storage control method and device applied to a storage device. Background Art
[0002] High-end storage users have relatively high requirements for the reliability of the storage system. The controller is one of the core components of the storage system, which completes key functions such as data transceiver, data storage, and data protection. Generally, to ensure the reliability of the storage device, a storage device is provided with multiple controllers. When any one of the controllers fails, other controllers take over the services of the failed controller to ensure service continuity.
[0003] In the prior art, a storage device includes multiple controllers, such as dual controllers, quad controllers, etc. Generally, the same hardware platform is adopted among the multiple controllers to reduce the complexity of the storage device. However, there is no differentiation among the hardware of the multiple controllers, which may cause all the controllers in the storage device to fail to work due to the same exception, further resulting in service interruption and even data loss, reducing the reliability of the storage device. Summary of the Invention
[0004] This application provides a storage control method and device applied to a storage device to improve the reliability of the storage device.
[0005] According to the first aspect of the embodiments of this application, a storage control method applied to a storage device is provided. The storage device includes N controllers, where N is greater than 1, and at least two of the N controllers adopt different hardware platforms. The hardware platform at least includes a CPU. The method includes:
[0006] The first controller, as the active party, sends a negotiation request to the second controller. The negotiation request carries at least the hardware information of the first controller. The hardware information at least includes: the type of data channel supported by the first controller. The second controller refers to any controller that has been started in the storage device and has not established a data channel with the first controller.
[0007] The second controller determines a target data channel type based on the type of data channel supported by this controller and the type of data channel carried in the negotiation request. The target data channel type is the type of data channel that can be adopted when the first controller and the second controller are interconnected.
[0008] The first controller and the second controller establish a target data channel based on the target data channel type. The target data channel is used for data transmission between the first controller and the second controller.
[0009] In a possible implementation, the negotiation request further carries memory window information of the first controller, and the memory window information includes a memory window start address and a memory window size;
[0010] After the step of determining the target data channel type based on the data channel type supported by this controller and the data channel type carried in the negotiation request, the method further includes: the second controller determines whether the memory window size of this controller is the same as the memory window size of the first controller; if they are the same, the second controller records the memory window start address of the first controller, and continues to execute the step of establishing a target data channel between the first controller and the second controller based on the target data channel type; or,
[0011] Before the step of determining the target data channel type based on the data channel type supported by this controller and the data channel type carried in the negotiation request, the method further includes: the second controller determines whether the memory window size of this controller is the same as the memory window size of the first controller; if they are the same, the second controller records the memory window start address of the first controller, and continues to execute the step of determining the target data channel type based on the data channel type supported by this controller and the data channel type carried in the negotiation request.
[0012] In a possible implementation, after the step of determining the target data channel type based on the data channel type supported by this controller and the data channel type carried in the negotiation request, the method further includes:
[0013] The second controller sends a negotiation response corresponding to the negotiation request to the first controller, and the negotiation response carries the target data channel type, so that the first controller and the second controller establish a target data channel based on the target data channel type.
[0014] In a possible implementation, when the memory window size of the second controller is the same as the memory window size of the first controller, the negotiation response further carries the memory window start address of the second controller; the method further includes: when receiving the negotiation response, the first controller records the memory window start address of the second controller.
[0015] In a possible implementation, the first controller establishes a target data channel with all other controllers that have been started in the storage device and except the first controller.
[0016] In a possible implementation, after the first controller and all other controllers that have been started in the storage device and except the first controller have established target data channels, the method further includes:
[0017] Any one of the controllers in the storage device receives a write request to write target data to the cache space corresponding to the memory window of this controller. The write request carries the target address corresponding to the target data, and the target address is used to represent the cache relative address;
[0018] The controller obtains the start address of the memory window corresponding to each target controller, where the target controller is a controller in the storage device that has established a target data channel with this controller;
[0019] The controller determines the physical memory absolute address corresponding to each target controller according to the target address and the start address of the memory window of each target controller;
[0020] The controller writes the target data into the cache space corresponding to the physical memory absolute address of each controller.
[0021] In a possible implementation manner, the controller determines the physical memory absolute address corresponding to each target controller according to the address space and the start address of the memory window of each target controller, including:
[0022] For each target controller among the target controllers, taking the start address of the memory window corresponding to this target controller as the starting point and the target address as the offset, the physical memory absolute address corresponding to this target controller is determined.
[0023] According to the second aspect of the embodiments of the present application, a storage control device applied to a storage device is provided. The storage device includes N controllers, N>1, and at least two of the N controllers adopt different hardware platforms. The hardware platform at least includes a CPU; the device includes:
[0024] The first controller, as the active party, sends a negotiation request to the second controller. The negotiation request carries at least the hardware information of the first controller, and the hardware information at least includes: the type of data channel supported by the first controller; the second controller refers to any one of the started controllers in the storage device that has not established a data channel with the first controller;
[0025] The second controller determines the target data channel type according to the type of data channel supported by this controller and the type of data channel carried in the negotiation request; the target data channel type is the type of data channel that can be adopted when the first controller and the second controller are interconnected;
[0026] The first controller and the second controller establish a target data channel based on the target data channel type, and the target data channel is used for data transmission between the first controller and the second controller.
[0027] In a possible implementation manner, the negotiation request further carries memory window information of the first controller, and the memory window information includes a memory window start address and a memory window size.
[0028] The second controller is further configured to:
[0029] After determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request, further determine whether the memory window size of this controller is consistent with the memory window size of the first controller; if they are consistent, record the memory window start address of the first controller, and continue to execute the step of the first controller and the second controller establishing a target data channel based on the target data channel type.
[0030] Or,
[0031] Before determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request, the second controller further determines whether the memory window size of this controller is consistent with the memory window size of the first controller; if they are consistent, record the memory window start address of the first controller, and continue to execute the step of determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request.
[0032] In a possible implementation manner, after determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request, the second controller is further configured to send a negotiation response corresponding to the negotiation request to the first controller, and the negotiation response carries the target data channel type, so that the first controller and the second controller establish a target data channel based on the target data channel type.
[0033] In a possible implementation manner, when the memory window size of the second controller is consistent with the memory window size of the first controller, the negotiation response further carries the memory window start address of the second controller, and the first controller is further configured to: when receiving the negotiation response, record the memory window start address of the second controller.
[0034] In a possible implementation, the first controller has established target data channels with all other controllers that have been started in the storage device and are other than the first controller.
[0035] In a possible implementation, any controller in the storage device is configured to:
[0036] Upon receiving a write request to write target data to the cache space corresponding to the memory window of this controller, the write request carries a target address corresponding to the target data, and the target address is used to represent the cache relative address;
[0037] The controller obtains the starting addresses of the memory windows corresponding to each target controller, where the target controller is a controller in the storage device that has established a target data channel with this controller;
[0038] The controller determines the physical memory absolute addresses corresponding to each target controller according to the target address and the starting addresses of the memory windows of each target controller;
[0039] The controller writes the target data into the cache spaces corresponding to the physical memory absolute addresses of each controller.
[0040] In a possible implementation, any controller in the storage device is specifically configured to:
[0041] For each target controller among the target controllers, using the starting address of the memory window corresponding to the target controller as the starting point and the target address as the offset, the physical memory absolute address corresponding to the target controller is determined.
[0042] It can be seen from the above technical solutions that in this application, in the storage device, by adopting at least two heterogeneous controllers and through the differential design of the controllers, the abnormal conditions of each controller in the storage device at the same time are avoided, ensuring business continuity;
[0043] Furthermore, in this embodiment, any controller in the storage device negotiates with other controllers to establish a data channel, improving flexibility and end-to-end adaptability. Description of the Drawings
[0044] Figure 1 is a schematic diagram of the storage device shown in this application;
[0045] Figure 2 is a flowchart of a storage control method applied to a storage device shown in this application;
[0046] Figure 3 is a flowchart of recording the starting address of the memory window of the first controller;
[0047] Figure 4 It is a schematic diagram of the internal storage window specification table shown in this application;
[0048] Figure 5 It is a flow chart of each controller writing target data shown in this application;
[0049] Figure 6 It is a schematic diagram of a storage control device applied to a storage device shown in this application;
[0050] Figure 7 It is a schematic diagram of an electronic device shown in this application. Detailed implementation manners
[0051] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this application and make the above-mentioned objects, features, and advantages of the embodiments of this application more obvious and understandable, the following further elaborates on the prior art solutions and the technical solutions in the embodiments of this application in conjunction with the accompanying drawings.
[0052] The method provided by this application is applied to a storage device. Here, the storage device may include N controllers, where N is greater than 1. As an embodiment, at least two of the N controllers are heterogeneous controllers. Here, a so-called heterogeneous controller can be characterized by the differential design of the controller. For example, controllers with different design schemes are heterogeneous controllers, etc., and this embodiment does not specifically limit.
[0053] As an embodiment, here, when at least two controllers are heterogeneous controllers, for example, the hardware platforms of the at least two controllers are different, etc., they can be referred to as heterogeneous controllers at this time. Optionally, controllers with different hardware platforms can be controllers based on processors (CPUs) from different manufacturers. As for the CPUs in the controllers, they can be set according to the actual situation. For example: Figure 1 CPU-A in it can be a CPU with an X86 architecture, and CPU-B is a CPU with an ARM architecture; or, Figure 1 CPU-A and CPU-B in it can be CPUs with an X86 architecture from different manufacturers; or, Figure 1 CPU-A and CPU-B in it can also be CPUs with an ARM architecture from different manufacturers.
[0054] During application, when there are N controllers in the storage device, the N controllers are respectively connected to the backplane, so that there is at least one communicable data channel and at least one communicable management channel between each controller; the management channel is used to transmit control instructions; the data channel is used to transmit data read and written to the cache space. As Figure 1For example, the storage device 100 includes: a controller 101, a controller 102, and a backplane 103. The controller 101 and the controller 102 are respectively connected to the backplane 103.
[0055] Based on Figure 1 the structure shown above, the method provided in the embodiments of the present application will be described below.
[0056] Refer to Figure 2 , Figure 2 The present application provides a storage control method applied to a storage device. This method is applied to the storage device and includes the following steps:
[0057] Step 201, the first controller, as the active party, sends a negotiation request to the second controller.
[0058] Among them, the negotiation request carries at least the hardware information of the first controller. The hardware information includes: the type of data channels supported by the first controller; the second controller refers to any controller that has been started in the storage device and has not established a data channel with the first controller.
[0059] In the present application, the first controller supports one or more types of data channels, which can be determined by the hardware structure of the first controller. In one embodiment, the types of data channels supported by the first controller are at least one of the Peripheral Component Interconnect Express (PCIE) and Remote Direct Memory Access (RDMA).
[0060] Step 202, the second controller determines the target data channel type according to the type of data channels supported by this controller and the type of data channels carried in the negotiation request.
[0061] Among them, the target data channel type is the type of data channel that can be used when the first controller and the second controller are interconnected.
[0062] In the present application, the type of data channel that can be used when the first controller and the second controller are interconnected is the data channel supported by both the first controller and the second controller. In one embodiment, the types of data channels supported by the controller 101 are: PCIE and RDMA, and the type of data channel supported by the controller 102 is PCIE. Then the determined target data channel type is: PCIE.
[0063] In another embodiment, the types of data channels supported by both the controller 101 and 102 are: PCIE and RDMA. Then one of the data channel types, such as PCIE or RDMA, can be selected according to a preset rule as the target data channel type, or both data channel types can be used as the target data channel type.
[0064] Step 203: The first controller and the second controller establish a target data channel based on the target data channel type.
[0065] The target data channel is used for data transmission between the first controller and the second controller.
[0066] As for how the first controller and the second controller establish the target data channel based on the target data channel type, in one embodiment, the data channel of the target data channel type is used as the target data channel.
[0067] Thus, the description Figure 2 shown is completed.
[0068] It can be seen from the above technical solutions that in this application, in the storage device, by adopting at least two heterogeneous controllers and through the differential design of the controllers, the abnormal conditions of each controller in the storage device at the same time are avoided, ensuring business continuity;
[0069] Furthermore, in this embodiment, any controller in the storage device, such as the first controller, sends the type of data channel supported by the first controller to the second controller. The second controller determines the target data channel type based on the data channel type supported by this controller and the data channel type carried in the negotiation request. The first controller and the second controller establish a corresponding target data channel based on the target data channel type for data transmission, which realizes the establishment of a data channel through active negotiation between different controllers, improving efficiency and end-to-end adaptability.
[0070] As an embodiment, the above negotiation request further carries the memory window information of the first controller, and the memory window information includes the memory window start address and the memory window size. Figure 3 The steps performed by the second controller based on the memory window information are exemplified here and will not be elaborated for the time being.
[0071] It should be noted that in this embodiment, the starting address of the memory window of any controller refers to the physical memory space reserved for the storage system software in this controller, and this part of the space cannot be used by the OS of this controller; however, as an embodiment, this part of the space can be used by the storage system software of this controller, such as for caching to temporarily store user data that has not been written to the disk. As another embodiment, this part of the space can also allow other controllers other than this controller to access. For example, taking this controller as B and other controllers other than this controller as controller A, when controller A writes data to the cache of controller A (i.e., the memory window), controller A also needs to synchronously write the data to the caches of all other controllers other than controller A, such as the cache of controller B (i.e., the storage space starting from the starting address of the memory window corresponding to the above-mentioned controller B), to ensure that the data in the caches of all controllers is the same, so that when a controller takeover occurs, the data is kept consistent, meeting the conditions for controller takeover.
[0072] The starting address of the memory window of the controller needs to meet the requirements for direct access by other controllers. The specific value is determined by the CPU design requirements of this controller. When heterogeneous controllers are used, the starting addresses of the memory windows of controllers with different design schemes may be different. Therefore, the starting address of the memory window of the controller can be defined according to the controller model.
[0073] In this embodiment, any controller can install memory modules of different capacities. For example, a controller provides 4 memory slots. When 8GB memory modules are installed, the capacity is 32GB, and when 16GB memory modules are installed, the capacity is 64GB, etc. In addition, when heterogeneous controllers are used, the memory windows of controllers with different design schemes may also be different. It can be seen that the memory windows supported by the controller are jointly determined by factors such as the physical memory size and CPU design requirements. For example, for a controller using CPU1, when the physical memory size is 32GB, it only supports a 16GB memory window, but for a controller using CPU2, when the physical memory size is 32GB, it can support a 24GB memory window. In order to ensure that the same amount of user data can be stored in the memory windows of all controllers, it is necessary to make the memory window sizes of all controllers the same. Therefore, in this embodiment, according to the characteristics of each controller in the storage device, a memory window specification table as Figure 4 shown can be configured to define the memory window sizes that all controllers in this storage device can use, and its value is the minimum of the memory window sizes actually supported by all controllers. The following will be described in combination with the Figure 3 process shown.
[0074] As Figure 3 shown, this process may include the following steps:
[0075] Step 301, the second controller determines whether the memory window size of this controller is consistent with that of the first controller.
[0076] For example, as Figure 4 shown in the memory window specification table, when the physical memory of the controller is 16 GB, the memory window size of this controller is 8 GB; when the physical memory of the controller is 24 GB, the memory window size of this controller is 16 GB; when the physical memory of the controller is 32 GB, the memory window size of this controller is 24 GB; when the physical memory of the controller is 64 GB, the memory window size of this controller is 56 GB.
[0077] As for the determination method of the pre-set memory window specification table, in one embodiment, the memory window size corresponding to the controller physical memory is defined according to the memory window sizes that can be provided by the physical memories of all controllers supported by the storage device, and its value is the minimum of the memory window space sizes that can be provided by all controllers supported by the storage device. For example: the physical memories of controller 101 and controller 102 are both 64 GB, controller 101 can only provide a 60 GB memory window, and controller 102 can only provide a 56 GB memory window. When the storage device needs to support controller 101 and controller 102, the memory window specification of the controller is min{60 GB, 56 GB} = 56 GB, that is, the memory window sizes of controller 101 and controller 102 are 56 GB.
[0078] Step 302, if they are consistent, record the starting address of the memory window of the first controller.
[0079] It should be noted that the starting addresses of the memory windows of different controllers can be the same or different, and the starting address of the memory window of the controller is set according to the actual situation.
[0080] It should be noted that Step 301 and Step 302 can be executed after Step 202, or can be executed before Step 202. The execution order of Step 301, Step 302 and Step 202 is set according to the actual situation.
[0081] In one embodiment, if the memory window size of this controller is inconsistent with that of the first controller, the second controller sends a negotiation response carrying negotiation failure to the first controller.
[0082] As one embodiment, after determining the target data channel type in Step 202 according to the data channel type supported by this controller and the data channel type carried in the negotiation request, it further includes:
[0083] The second controller sends a negotiation response corresponding to the negotiation request to the first controller, and the negotiation response carries the target data channel type; the first controller determines the target data channel according to the target data channel type.
[0084] In this application, the first controller uses the data channel of the target data channel type as the target data channel. In one embodiment, the target data channel type carried in the negotiation response sent by the second controller to the first controller is PCIE, then the target data channel determined by the first controller is: the PCIE channel.
[0085] In another embodiment, the target data channel type carried in the negotiation response sent by the second controller to the first controller is PCIE and RDMA, then the target data channel determined by the first controller is: PCIE and RDMA.
[0086] When any one of the controllers in the storage device fails, the other controller in the storage device will take over the business of the faulty processor. To ensure that the business of the faulty processor can be taken over normally, it is necessary to ensure that the caches of all the controllers in the storage device store the same dirty data. Based on this, it is necessary to judge the memory window size of the controllers in the storage device. As for how to judge the memory window size of the controllers in the storage device, as one embodiment, when the memory window size of the second controller is the same as the memory window size of the first controller, the negotiation response also carries the starting address of the memory window of the second controller; when the first controller receives the negotiation response, it records the starting address of the memory window of the second controller.
[0087] As one embodiment, the first controller establishes target data channels with all other controllers in the storage device that have been started except the first controller.
[0088] It should be noted that the first controller needs to establish target data channels with all the started controllers in the storage device, and the way for the first controller to establish a target data channel with any one of the started controllers in the storage device can adopt the way of establishing a target data channel between the first controller and the second controller. For details, please refer to the above steps 201-203.
[0089] The process of establishing target data channels between each controller is introduced above. After the first controller and all other controllers in the storage device that have been started except the first controller have established target data channels, as Figure 5 shown, the process of writing target data based on the target data channels established by the above controllers will be specifically described below:
[0090] Step 501, any controller in the storage device receives a write request to write target data to the cache space corresponding to the memory window of this controller.
[0091] As an embodiment, the front-end server can issue read and write commands (taking the write command as an example here) for any LUN (Logic Unit Number) allocated to this server. After the storage device receives the write command for a certain LUN, according to the existing processing flow, if the cache needs to be operated, an operation instruction for the cache is generated. The operation instruction is used to indicate a specified operation such as read or write. Here, taking the operation instruction as a write request and the specified operation as a write operation as an example. That is, finally, the storage device will receive a write request to write target data to the cache space corresponding to the memory window of this controller.
[0092] In this embodiment, the target address refers to the cache address for storing the user data of this LUN, and specifically can be considered as the relative cache address.
[0093] It should be noted that the controller of the storage device has physical memory. Based on this, a part of the space can be divided in the physical memory for use as a cache space to temporarily store user data, such as valid user data that has not been written to the disk.
[0094] As an embodiment, when a controller in the storage device receives a write request to write target data to the cache space corresponding to the memory window of this controller, it will write the target data into the cache space of this controller. As for how the controller writes the target data into the cache space of this controller based on the write request, in one embodiment, the controller obtains the starting address of the memory window corresponding to this controller; the controller determines the absolute physical memory address corresponding to this controller according to the relative address of the cache space of this controller and the starting address of the memory window of this controller; the controller writes the target data into the memory space corresponding to the absolute physical memory address of this controller.
[0095] As another embodiment, when a controller in the storage device receives a write request to write target data to the cache space corresponding to the memory window of this controller, it will also write the target data into other controllers in the storage device. As for how the controller writes the target data into the controller that has established a target data channel with this controller based on the write request, specifically refer to the following steps 502 - step 504.
[0096] Step 502, the controller obtains the starting addresses of the memory windows corresponding to each target controller.
[0097] Among them, the target controller is the controller in the storage device that has established a target data channel with this controller.
[0098] In one embodiment, the memory window represents the physical memory space that the local controller can be accessed by other controllers.
[0099] Step 503, the controller determines the absolute physical memory addresses corresponding to each target controller according to the target address and the start address of the memory window of each target controller.
[0100] As an embodiment, the controller determines the absolute physical memory addresses corresponding to each target controller according to the address space and the start address of the memory window corresponding to each target controller, including:
[0101] For each target controller among the target controllers, taking the start address of the memory window corresponding to the target controller as the starting point and the target address as the offset, the absolute physical memory address corresponding to the target controller is determined.
[0102] Step 504, the controller writes the target data into the cache space corresponding to the absolute physical memory address of each controller.
[0103] It can be seen from the above technical solutions that in this application, the first controller sends a negotiation request carrying the data channel type supported by the first controller to the second controller. The second controller determines the data channel type that can be adopted when the first controller and the second controller are interconnected based on the data channel type supported by this controller and the data channel type supported by the first controller, so that the different controllers in the storage device establish the target data channels corresponding to the data channel types through pairwise negotiation. Based on this, data transmission is performed between the N controllers in the storage device through the target data channels. Therefore, when data is transmitted, there are differences between the N controllers in the storage device, avoiding that all the controllers in the storage device cannot work due to the same exception, thereby improving the reliability of the storage device.
[0104] As Figure 6 shown, the embodiment of this application also provides a storage control device applied to a storage device. The storage device includes N controllers, N>1, and at least two of the N controllers adopt different hardware platforms. The hardware platform at least includes a CPU; the device includes:
[0105] The first controller, as the active party, sends a negotiation request to the second controller. The negotiation request carries at least the hardware information of the first controller. The hardware information at least includes: the type of data channel supported by the first controller; the second controller refers to any controller among the started controllers in the storage device that has not established a data channel with the first controller;
[0106] The second controller determines a target data channel type based on the data channel types supported by this controller and the data channel type carried in the negotiation request; the target data channel type is a data channel type that can be adopted when the first controller and the second controller are interconnected.
[0107] The first controller and the second controller establish a target data channel based on the target data channel type, and the target data channel is used for data transmission between the first controller and the second controller.
[0108] In a possible implementation manner, the negotiation request further carries memory window information of the first controller, and the memory window information includes a memory window start address and a memory window size.
[0109] The second controller is further configured to:
[0110] After the step of determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request, the second controller is further configured to determine whether the memory window size of this controller is consistent with the memory window size of the first controller; if they are consistent, record the memory window start address of the first controller, and continue to execute the step of establishing a target data channel between the first controller and the second controller based on the target data channel type.
[0111] Or,
[0112] Before determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request, the second controller further determines whether the memory window size of this controller is consistent with the memory window size of the first controller; if they are consistent, record the memory window start address of the first controller, and continue to execute the step of determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request.
[0113] In a possible implementation manner, the second controller is further configured to: after determining the target data channel type according to the data channel types supported by this controller and the data channel type carried in the negotiation request, further send a negotiation response corresponding to the negotiation request to the first controller, and the negotiation response carries the target data channel type, so that the first controller and the second controller establish a target data channel based on the target data channel type.
[0114] In a possible implementation, when the memory window size of the second controller is the same as that of the memory window of the first controller, the negotiation response also carries the starting address of the memory window of the second controller, and the first controller is further configured to: when receiving the negotiation response, record the starting address of the memory window of the second controller.
[0115] In a possible implementation, the first controller has established target data channels with all other controllers in the storage device that have been started except the first controller.
[0116] In a possible implementation, any controller in the storage device is configured to:
[0117] Receive a write request to write target data to the cache space corresponding to the memory window of this controller, where the write request carries the target address corresponding to the target data, and the target address is used to represent the relative address of the cache space;
[0118] The controller obtains the starting addresses of the memory windows corresponding to each target controller, where the target controller is a controller in the storage device that has established a target data channel with this controller;
[0119] The controller determines the absolute physical memory addresses corresponding to each target controller according to the target address and the starting addresses of the memory windows of each target controller;
[0120] The controller writes the target data into the cache spaces corresponding to the absolute physical memory addresses of each controller.
[0121] In a possible implementation, any controller in the storage device is specifically configured to:
[0122] For each target controller among the target controllers, using the starting address of the memory window corresponding to the target controller as the starting point and the target address as the offset, determine the absolute physical memory address corresponding to the target controller.
[0123] It can be seen from the above technical solutions that in this application, the first controller sends a negotiation request carrying the data channel type supported by the first controller to the second controller. The second controller determines the data channel type that can be used when the first controller and the second controller are interconnected based on the data channel type supported by this controller and the data channel type supported by the first controller, so that different controllers in the storage device establish target data channels corresponding to the data channel type through pairwise negotiation. Based on this, data transmission is performed between N controllers in the storage device through the target data channels. Therefore, when data is transmitted, there are differences among the N controllers in the storage device, avoiding the situation where all controllers in the storage device cannot work due to the same exception, thereby improving the reliability of the storage device.
[0124] The implementation processes of the functions and roles of each unit in the above device are specifically described in detail in the implementation processes of the corresponding steps in the above method, and will not be elaborated here.
[0125] In terms of the hardware level, the schematic diagram of the hardware architecture of the electronic device provided in the embodiment of the present application can be seen Figure 7 as shown in the figure. It includes: a machine-readable storage medium 701 and a processor 702, where: the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the determination operation applied to the storage software disclosed in the above example.
[0126] The machine-readable storage medium provided in the embodiment of the present application stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the storage control operation applied to the above example.
[0127] Here, the machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Random Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of storage disk (such as an optical disk, DVD, etc.), or a similar storage medium, or a combination thereof.
[0128] The systems, devices, modules or units described in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or a combination of any several of these devices.
[0129] For the convenience of description, the above device is described by dividing it into various units according to functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0130] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0131] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0132] Moreover, these computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0134] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this application. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0135] The above are only the preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included within the scope of protection of this application.
Claims
1. A storage control method applied to a storage device, characterized in that, The storage device includes N controllers, where N is greater than 1, and at least two of the N controllers adopt different hardware platforms, and the hardware platform at least includes a CPU; the method includes: The first controller, as the initiator, sends a negotiation request to the second controller; the negotiation request at least carries the hardware information of the first controller and the memory window information of the first controller, and the hardware information at least includes: the type of data channel supported by the first controller; the memory window information includes the memory window start address and the memory window size; the second controller refers to any controller in the storage device that has been started and has not established a data channel with the first controller; The second controller determines the target data channel type according to the type of data channel supported by this controller and the type of data channel carried in the negotiation request; the target data channel type is the data channel type that can be adopted when the first controller and the second controller are interconnected; before or after determining the target data channel type according to the type of data channel supported by this controller and the type of data channel carried in the negotiation request, the second controller determines whether the memory window size of this controller is consistent with the memory window size of the first controller; if they are consistent, record the memory window start address of the first controller; The first controller and the second controller establish a target data channel based on the target data channel type, and the target data channel is used for data transmission between the first controller and the second controller.
2. The method according to claim 1, wherein After determining the target data channel type according to the type of data channel supported by this controller and the type of data channel carried in the negotiation request, it further includes: The second controller sends a negotiation response corresponding to the negotiation request to the first controller, and the negotiation response carries the target data channel type, so that the first controller and the second controller establish a target data channel based on the target data channel type.
3. The method according to claim 2, characterized in that, When the memory window size of the second controller is consistent with the memory window size of the first controller, the negotiation response also carries the memory window start address of the second controller; the method further includes: when the first controller receives the negotiation response, record the memory window start address of the second controller.
4. The method according to claim 1, wherein The first controller establishes a target data channel with all other controllers in the storage device that have been started and are other than the first controller.
5. The method according to claim 4, wherein After the first controller and all other controllers in the storage device that have been started and are other than the first controller have established a target data channel, the method further includes: Any controller in the storage device receives a write request to write target data to the cache space corresponding to the memory window of this controller; the write request carries the target address corresponding to the target data, and the target address is used to represent the cache relative address; The controller obtains the starting address of the memory window corresponding to each target controller; the target controller is a controller in the storage device that has established a target data channel with the controller. The controller determines the absolute physical memory address corresponding to each target controller according to the target address and the starting address of the memory window of each target controller. The controller writes the target data into the memory space corresponding to the absolute physical memory address of each controller.
6. The method according to claim 5, wherein The controller determines the absolute physical memory address corresponding to each target controller according to the target address and the starting address of the memory window of each target controller, including: For each target controller among the target controllers, using the starting address of the memory window corresponding to the target controller as the starting point and the target address as the offset, the absolute physical memory address corresponding to the target controller is determined.
7. A storage control device applied to a storage device, characterized in that, The storage device includes N controllers, N>1, and at least two of the N controllers adopt different hardware platforms, and the hardware platform at least includes a CPU; the device includes: The first controller, as the active party, sends a negotiation request to the second controller, and the negotiation request carries at least the hardware information of the first controller and the memory window information of the first controller. The hardware information at least includes: the type of data channel supported by the first controller; the memory window information includes the memory window starting address and the memory window size; the second controller refers to any controller that has been started in the storage device and has not established a data channel with the first controller. The second controller determines the target data channel type according to the data channel type supported by the present controller and the data channel type carried in the negotiation request; the target data channel type is the data channel type that can be adopted when the first controller and the second controller are interconnected; before or after determining the target data channel type according to the data channel type supported by the present controller and the data channel type carried in the negotiation request, the second controller determines whether the memory window size of the present controller is consistent with the memory window size of the first controller; if they are consistent, record the memory window starting address of the first controller. The first controller and the second controller establish a target data channel based on the target data channel type, and the target data channel is used for data transmission between the first controller and the second controller.
8. The device according to claim 7, characterized in that The second controller is further configured to, after determining the target data channel type according to the data channel type supported by the present controller and the data channel type carried in the negotiation request, send a negotiation response corresponding to the negotiation request to the first controller, and the negotiation response carries the target data channel type, so that the first controller and the second controller establish a target data channel based on the target data channel type.
Citation Information
Patent Citations
Method, device and system for processing failure in controller where information is transmitted through interface card
CN104410510A
Methods and devices of processing IO request
CN108319430A