Storage device communication architecture, method, system, computer device and storage medium
By setting up a two-layer data synchronization architecture in the storage device, using horizontal interaction SAS extender and vertical upper and lower level communication, the data transmission and information collection problems in the SAS extender failure are solved, and the reliability of the storage device is improved and redundancy.
Patent Information
- Application Number
- CN202411141100.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Existing high-density storage devices cannot achieve data transmission and fault location information collection when the SAS extender fails, resulting in low reliability of storage devices.
Set up a dual-layer data synchronization architecture in the storage device, through the horizontal interaction SAS extender and the vertical upper and lower level communication architecture, ensure the dual redundancy of data in the controller layer and the pallet layer, and realize the reliable management of data in the event of failure .
Improves the reliability of storage devices, ensures redundancy of data at the controller level and pallet level, avoids data loss caused by single point of failure, and enhances disk array management capabilities.
Smart Images

Figure CN118656333B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a storage device communication architecture, method, system, computer device and storage medium. Background Art
[0002] In order to meet the storage needs of massive data, high-density data storage technology is used to store more data in related storage devices. High-density storage devices refer to storage that can accommodate more hard disk data. In order to realize disk array management, such storage devices often require multiple SAS expanders (Serial Attached SCSI Expander, SAS expander for short) to be used in coordination, thus forming an information interaction network to realize complex functions.
[0003] In some related technologies, basic management of high-density storage in the vertical direction is achieved by associating other SAS expanders in the upstream and downstream directions of one of the SAS expanders. However, in actual use, if one of the SAS expanders in the controller fails, data transmission in the upstream and downstream directions of the SAS expander cannot be achieved; and, in an architecture with two SAS expanders at the same level, if one of the SAS expanders fails, it is impossible to collect information about the location of the failed SAS expander. Summary of the invention
[0004] In order to solve at least one of the problems mentioned in the above background technology, the present application provides a storage device communication architecture, method, system, computer device and storage medium, by setting SAS expanders that interact horizontally at the same level, and establishing a SAS expander architecture for upper and lower level communication in the vertical direction of the SAS expander, so as to achieve double-layer data synchronization of the controller layer and the tray layer in the storage device, thereby ensuring data security and improving the reliability of the storage device.
[0005] The specific technical solutions provided by the embodiments of this application are as follows:
[0006] In a first aspect, a storage device communication architecture is provided, wherein the storage device includes dual controllers and trays connected to the dual controllers, each of the controllers is configured with at least one controller-level expander, a first tray-level expander and a second tray-level expander are configured on the tray, the first tray-level expander and the second tray-level expander are communicatively connected, and the first tray-level expander and the second tray-level expander are respectively communicatively connected to the controller-level expander associated therewith.
[0007] In a specific embodiment, the two controller-level expanders are communicatively connected via a hardware link or a SAS link, the first tray-level expander is communicatively connected to the second tray-level expander via a SAS link, and the controller-level expander is communicatively connected to the first tray-level expander or the second tray-level expander via a SAS link.
[0008] In a second aspect, a storage device communication method is provided, wherein a first tray-level expander and a second tray-level expander in the storage device communication architecture are communicatively connected via a SAS link, and the method comprises: the first tray-level expander collects its own data of the tray in which it is located; in response to the controller receiving a collection information instruction, the controller sends the collection information instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party via the SAS link; the own data and the exclusive data are merged to form complete disk data, and the complete disk data is uploaded to the controller-level expander communicatively connected to the first tray-level expander.
[0009] In a specific embodiment, the controller is also communicatively connected to a central processing unit, and the method further includes: the central processing unit sends an information collection instruction to the controller, so that the controller sends the information collection instruction to the first tray level expander or the second tray level expander.
[0010] In a specific embodiment, in response to the controller not receiving the information collection instruction from the central processing unit, a periodic collection instruction is sent to the controller-level expander; and the periodic collection instruction is sent to the first pallet-level expander or the second pallet-level expander through the controller-level expander, so that the first pallet-level expander or the second pallet-level expander collects its own data of the pallet according to a preset period.
[0011] In a specific embodiment, after receiving the information collection instruction, the first pallet-level expander sends an access instruction to the second pallet-level expander, so that the second pallet-level expander refreshes the exclusive data according to the access instruction, and returns the refreshed exclusive data to the first pallet-level expander through the second pallet-level expander.
[0012] In a specific embodiment, before the first pallet-level expander obtains the exclusive data of the other party's second pallet-level expander through the SAS link, the method also includes: enabling the clock of the physical link between the first pallet-level expander and the second pallet-level expander, and configuring the general input and output pins of the clock as a multiplexing function; in response to the completion of the initialization of the general input and output pins, configuring the universal asynchronous receiver and transmitter parameters of the clock communication protocol; performing function initialization on the universal asynchronous receiver and transmitter; in response to the completion of the function initialization, sending test data through the universal asynchronous receiver and transmitter parameters; and confirming that the communication link between the first pallet-level expander and the second pallet-level expander is in a connected state by receiving the test data at the receiving end.
[0013] In a specific embodiment, after configuring the universal asynchronous receiver / transmitter parameters of the clock communication protocol, the universal asynchronous receiver / transmitter function is called, and the universal asynchronous receiver / transmitter function is initialized using the universal asynchronous receiver / transmitter parameters provided by the microcontroller; in response to the completion of the initialization of the universal asynchronous receiver / transmitter function, the enable register of the universal asynchronous receiver / transmitter is configured to start the universal asynchronous receiver / transmitter peripheral.
[0014] In a specific embodiment, in response to an abnormality in one of the controller-level expanders, the first tray-level expander or the second tray-level expander that is communicatively connected to the abnormal controller-level expander is obtained; initialization of the SAS link between the first tray-level expander or the second tray-level expander is performed; in response to completion of initialization of the SAS link, mode page information is queried through a preset command to obtain exclusive data in the first tray-level expander or the second tray-level expander.
[0015] In a specific embodiment, initialization of the SAS link between the first tray-level expander or the second tray-level expander is performed, specifically including: confirming that the tray-level expander at the other end and the tray-level expander at this end are in a normal connection state; collecting the device types of the two tray-level expanders, and confirming the data transmission rate of the two tray-level expanders based on the device types.
[0016] In a specific embodiment, a SAS controller is connected between the central processing unit and the controller-level expander, and the SAS controller is communicatively connected to the central processing unit via a PCIE link; the information collection instruction is converted into a SAS signal by the SAS controller, and the SAS signal is transmitted to the controller-level expander.
[0017] In a specific embodiment, in response to an exception occurring in the first tray-level expander, the device address of the second tray-level expander that is in communication connection with the abnormal first tray-level expander is obtained; the controller-level expander associated with the first tray-level expander establishes a communication connection with the second tray-level expander through the device address to obtain the complete disk data of the second tray-level expander.
[0018] In a third aspect, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the method described below:
[0019] Step A: The first tray-level expander collects its own data of the tray where it is located;
[0020] Step B: in response to the controller receiving the information acquisition instruction, sending the information acquisition instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link;
[0021] Step C: merging the own data and the exclusive data to form complete disk data, and uploading the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander.
[0022] In a fourth aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0023] Step A: The first tray-level expander collects its own data of the tray where it is located;
[0024] Step B: in response to the controller receiving the information acquisition instruction, sending the information acquisition instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link;
[0025] Step C: merging the own data and the exclusive data to form complete disk data, and uploading the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander.
[0026] In a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0027] Step A: The first tray-level expander collects its own data of the tray where it is located;
[0028] Step B: in response to the controller receiving the information acquisition instruction, sending the information acquisition instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link;
[0029] Step C: merging the own data and the exclusive data to form complete disk data, and uploading the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander.
[0030] The embodiments of the present application have the following beneficial effects:
[0031] 1. The embodiment of the present application provides a method based on setting two controller-level expanders in a controller, configuring a tray-level expander in a tray connected to the controller, and connecting the two tray-level expanders in the same tray end-to-end in a horizontal manner. At the same time, the controller-level expander is connected to the tray-level expander vertically associated with it through a communication link. The tray-level expander is used to collect its own data of the tray in which it is located, and at the same time, obtains the exclusive data in the second tray-level expander through the link through the first tray-level expander, merges its own data and the exclusive data to form complete disk data, and uploads the complete disk data to the controller-level expander associated with the first tray-level expander, so that the controller-level expanders on both sides can obtain the data collected by the tray-level controller on the opposite side.
[0032] 2. A communication link is configured between the controller-level expanders in the two controllers, and data synchronization between the two controller-level expanders is achieved through the link between the two, so that both controller-level expanders can obtain relevant data of the tray to ensure that if one of the controller-level expanders fails, the disk array can still be managed. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 A schematic diagram showing a storage device communication architecture according to the present application;
[0035] Figure 2 A schematic diagram showing the connection between the tray-level expander and the controller-level expander according to the present application is shown;
[0036] Figure 3 A schematic diagram showing a storage device communication method according to the present application;
[0037] Figure 4 A schematic diagram showing a computer device according to the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] This embodiment provides a storage device communication architecture, such as Figure 1 and Figure 2 As shown, a storage device is arranged in the chassis, and the storage device includes dual controllers and trays connected to the dual controllers, wherein the two controllers are respectively connected to a central processing unit in communication, and the two central processing units are connected in communication; each of the controllers is configured with at least one controller-level expander, and two controller-level expanders are configured in this embodiment, and the two controller-level expanders are connected in communication through a horizontal link, and the tray is configured with a first tray-level expander and a second tray-level expander, and the first tray-level expander and the second tray-level expander are connected in communication through a horizontal link, and the first tray-level expander and the second tray-level expander are respectively connected in communication with the controller-level expander associated with them, so as to realize the collection of the own data of the tray in which they are located through the first tray-level expander; in response to the controller receiving the collection information instruction, the collection information instruction is sent to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link; the own data and the exclusive data are merged to form complete disk data, and the complete disk data is uploaded to the controller-level expander connected in communication with the first tray-level expander.
[0040] It should be noted that, in this embodiment, the two controller-level expanders are connected via a hardware link or a SAS link, the first tray-level expander and the second tray-level expander are connected via a SAS link, and the controller-level expander and the first tray-level expander or the second tray-level expander are connected via a SAS link.
[0041] In a specific embodiment, the storage device communication architecture also includes a central processing unit, which sends an information collection instruction to the controller so that the controller sends the information collection instruction to the first tray-level expander or the second tray-level expander; at the same time, a SAS controller is connected between the central processing unit and the controller-level expander, and the SAS controller is connected to the central processing unit via a PCIE link communication; the information collection instruction is converted into a SAS signal by the SAS controller, and the SAS signal is transmitted to the controller-level expander.
[0042] Furthermore, the tray in this embodiment is provided with one or more, and each tray is provided with two communicatively connected tray-level expanders, so there are multiple lower tray-level expanders connected to the same controller-level expander, and the tray-level expanders are numbered in sequence according to the trays they are located in. When the tray-level expander uploads the complete disk data of the disk it is located in to the controller-level expander, the complete disk data in the controller-level expander is marked with a corresponding number, so as to accurately locate the source of the relevant data during data processing and query.
[0043] Through the communication architecture in this embodiment, a controller-level expander and a tray-level expander vertically associated with it are provided to communicate through a communication link. The tray-level expander is used to collect its own data of the tray in which it is located, and at the same time obtain the exclusive data in the second tray-level expander through the link through the first tray-level expander, merge its own data and exclusive data to form complete disk data, and upload the complete disk data to the controller-level expander associated with the first tray-level expander, so that the controller-level expanders on both sides can obtain the data collected by the tray-level controller on the opposite side, thereby forming data redundancy at the tray level and data redundancy at the controller level, so that both controller-level expanders can obtain relevant data of the tray, to ensure that if one of the controller-level expanders or the tray-level expander fails, the disk array can still be managed.
[0044] In one embodiment, Figure 3 As shown, a storage device communication method is provided, which is applied to the storage device communication architecture as described above, and includes the following steps:
[0045] Step 101: The first tray-level expander collects data of the tray where it is located.
[0046] Specifically, in this embodiment, the tray-level expander receives the information collection instruction from the central processor to collect the self data of the tray where it is located according to the information collection instruction. It also includes sending a periodic collection instruction to the controller-level expander in response to the controller not receiving the information collection instruction from the central processor, and sending the periodic collection instruction to the first tray-level expander or the second tray-level expander through the controller-level expander, so that both tray-level expanders collect the self data of the tray where they are located according to the preset period.
[0047] It should be noted that the central processing unit sends the information collection instruction to the controller, so that the controller sends the information collection instruction to the tray-level expander.
[0048] Specifically, in this embodiment, the controller-level expander is used to collect component information within the controller, including but not limited to component temperature, component voltage, LED and component current, and the tray-level expander is used to collect the tray's own data, including but not limited to the tray's port information and tray operating status information, wherein the tray operating status information includes the tray operating temperature, tray operating voltage and tray LDE status; further, operation instructions are sent to the tray-level expander through the controller-level expander, so that the tray-level expander can perform operations such as lighting, kicking the disk and firmware upgrade according to the operation instructions.
[0049] It should be noted that the data of the pallet itself can be obtained through two pallet-level expanders in the same pallet.
[0050] Step 102: In response to the controller receiving the information collection instruction, the controller sends the information collection instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link.
[0051] It should be noted that the pallet's own data can be obtained through the first pallet-level expander and the second pallet-level expander in the same pallet; while the exclusive data can only be obtained by the pallet-level expander in the pallet. Specifically, the exclusive data includes the information of the associated pallet-level expander itself, including operating status, firmware version number, etc. Therefore, a preset storage space is reserved in each pallet-level expander, wherein the preset storage space is used to store the exclusive data of the first pallet-level expander.
[0052] In a specific embodiment, after receiving the information collection instruction, the first pallet-level expander sends an access instruction to the second pallet-level expander, so that the second pallet-level expander refreshes the exclusive data according to the access instruction, and returns the refreshed exclusive data to the first pallet-level expander through the second pallet-level expander.
[0053] In this embodiment, the first pallet-level expander communicates with the second pallet-level expander. After receiving the access instruction, the second pallet-level expander obtains the latest collected data of itself from its own database and returns the data to the pallet-level expander on this end; after receiving the exclusive data synchronized from the other end, the first pallet-level expander refreshes the exclusive information in its own database to ensure that the data of itself obtained by the first pallet-level expander is also the latest.
[0054] In a specific embodiment, before the first pallet-level expander obtains the exclusive data of the other party's second pallet-level expander through the SAS link, the clock of the physical link between the first pallet-level expander and the second pallet-level expander is enabled, and the general input and output pins of the clock are configured as multiplexing functions; in response to the completion of the initialization of the general input and output pins, the universal asynchronous receiver and transmitter parameters of the clock communication protocol are configured; the universal asynchronous receiver and transmitter are function initialized; in response to the completion of the function initialization, test data is sent through the universal asynchronous receiver and transmitter parameters; and by receiving the test data at the receiving end, it is confirmed that the communication link between the first pallet-level expander and the second pallet-level expander is in a connected state.
[0055] It should be noted that in order to ensure that the first pallet-level expander can obtain exclusive data in the second pallet-level expander through the link, it is necessary to ensure that the communication link in this embodiment is in a normal state, wherein the first pallet-level expander and the second pallet-level expander are communicatively connected via a hardware link or a SAS link.
[0056] The horizontal link between the first tray-level expander and the second tray-level expander in this embodiment is an I2C link or a UART link. Taking the UART link as an example, the clocks of UART and GPIO are enabled. The UART link communication involves GPIO pins, and the specific GPIO pins include TX and RX pins. Before initializing the UART link, it is necessary to adjust to ensure that the GPIO pins and the clocks of the UART peripherals have been enabled, which is usually achieved by configuring the clock management register of the microcontroller.
[0057] Furthermore, the general input and output pins of the clock are configured as multiplexing functions, specifically including configuring the GPIO pins used for communication as multiplexing functions, wherein the multiplexing function is marked as "USARTx_TX" or "USARTx_RX", wherein x represents the number of the UART, and setting appropriate electrical characteristics, such as push-pull output or floating input. The universal asynchronous receiver and transmitter parameters include setting the baud rate, setting the data bit, stop bit and check bit, setting the required baud rate value by configuring the baud rate register of the UART, setting the number of data bits and stop bits of each character and whether to use the check bit according to the requirements of the communication protocol, wherein the data bit is usually set to 5 to 8 bits, and the stop bit is usually set to 1 or 2 bits; and also including configuring other parameters, configuring the hardware flow control, interrupt flow control and interrupt enable parameters according to the specific application scenario.
[0058] In this embodiment, after configuring the universal asynchronous receiver / transmitter parameters of the clock communication protocol, a universal asynchronous receiver / transmitter function is called, and the universal asynchronous receiver / transmitter function is initialized using the universal asynchronous receiver / transmitter parameters provided by the microcontroller; in response to completion of the initialization of the universal asynchronous receiver / transmitter function, an enable register of the universal asynchronous receiver / transmitter is configured to start the universal asynchronous receiver / transmitter peripheral.
[0059] Exemplarily, a UART initialization function is called, and the UART initialization function provided by the microcontroller is used to apply the above-configured parameters to the UART peripheral. After the initialization is completed, the UART peripheral is started by configuring the UART enable register.
[0060] Step 103: Merge the own data and the exclusive data to form complete disk data, and upload the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander.
[0061] Specifically, by the same token, after the second tray-level expander obtains the complete disk data, it will also upload the complete disk data to the controller-level expander vertically associated with it through the communication link; thereby achieving tray-level data redundancy and controller-level data redundancy.
[0062] Furthermore, after one of the controller-level expanders receives the complete disk data, the firmware running on the expander will refresh the data to its own database for storage; and after the complete disk data of the controller-level expander on this end is saved, the controller-level expander on the other end will be accessed to obtain the data of the other controller-level expander, thereby achieving data synchronization between the two controller-level expanders.
[0063] In this embodiment, the two controller-level expanders are connected by hardware links or SAS links, the first tray-level expander is connected by SAS links, the controller-level expander is connected by SAS links, the first tray-level expander is connected by SAS links, and the two levels of expanders are connected by SAS links, and information is exchanged through this SAS link; and when synchronizing the running data in the chassis through this link, a Uart link or an I2C link can be used. The controller-level expander and the tray-level expander are connected by SAS links, and information is exchanged through this SAS link.
[0064] In a specific embodiment, in response to an abnormality in one of the controller-level expanders, the first tray-level expander or the second tray-level expander that is communicatively connected to the abnormal controller-level expander is obtained; initialization of the SAS link between the first tray-level expander and the second tray-level expander is performed; in response to completion of initialization of the SAS link, mode page information is queried through a preset command to obtain exclusive data in the first tray-level expander or the second tray-level expander.
[0065] In this embodiment, initialization of the SAS link between the first pallet-level expander and the second pallet-level expander is performed, specifically including: confirming that the first pallet-level expander and the second pallet-level expander are in a normal connection state; collecting the device types of the first pallet-level expander and the second pallet-level expander, and confirming the data transmission rate of the two pallet-level expanders based on the device types.
[0066] Exemplarily, the initialization of the SAS link includes hardware initialization and software initialization. The purpose of hardware initialization is to obtain the device type and rate of the other end to ensure the stability of subsequent data transmission, wherein the hardware initialization specifically includes detecting connected devices. First, it is necessary to detect whether there is a device connected to this storage device system and confirm the device type of this device, such as a SAS device or a SATA device; negotiate and confirm the highest common transmission rate. According to the confirmed device type, the system selects a method suitable for the device type to negotiate and confirm the highest transmission rate supported by the two devices to ensure the efficiency and stability of data transmission; further, collect device information. The system will identify and collect information on connected devices, wherein the device information includes a SAS address to ensure communication with the corresponding device according to the SAS address.
[0067] Specifically, the software initialization includes a process in which the first tray-level expander or the second tray-level expander obtains information from the other device, and queries the mode page information through a SCSI command to obtain data from the other device.
[0068] Furthermore, in response to an exception occurring in one of the controller-level expanders, the device address of the tray-level expander associated with the abnormal controller-level expander is obtained, so that the controller-level expander where no exception has occurred can monitor the tray-level expander at the other end according to the device address, and when it is necessary to obtain data in the tray-level expander at the other end, the controller-level expander where no exception has occurred sends an access instruction to the tray-level expander according to the device address of the tray-level expander, so that the tray-level expander at the other end sends the complete disk data of its tray to the controller-level expander where no exception has occurred.
[0069] In a specific embodiment, in response to an exception occurring in the first tray-level expander, the device address of the second tray-level expander that is in communication connection with the abnormal first tray-level expander is obtained; the controller-level expander associated with the first tray-level expander establishes a communication connection with the second tray-level expander through the device address to obtain the complete disk data of the second tray-level expander.
[0070] Similarly, when an abnormality occurs in the second tray-level expander, the device address of the first tray-level expander that is in communication connection with the abnormal second tray-level expander is obtained; the controller-level expander associated with the second tray-level expander establishes a communication connection with the first tray-level expander through the device address to obtain the complete disk data of the first tray-level expander.
[0071] Furthermore, there are several trays in the storage device, and the trays are provided with hard disk slots to enable the hard disk to be inserted into the hard disk slots; since there are multiple trays, a tray-level expander is correspondingly provided on each tray, so there are multiple lower tray-level expanders connected to the same controller-level expander, and the tray-level expanders are numbered in sequence according to the trays they are located in. When the tray-level expander uploads the complete disk data of the disk it is located in to the controller-level expander, the complete disk data in the controller-level expander is marked with a corresponding number, so that the source of the relevant data can be accurately located when processing and querying data.
[0072] In a specific embodiment, a SAS controller is connected between the central processing unit and the controller-level expander, and the SAS controller is connected to the central processing unit through a PCIE link communication; the information acquisition instruction is converted into a SAS signal by the SAS controller, and the SAS signal is transmitted to the controller-level expander. The information acquisition instruction is converted into a SAS signal by the SAS controller, and the SAS signal output by the SAS controller is expanded by the expander and then connected to an external hard disk.
[0073] Through the scheme in this embodiment, SAS expanders that interact horizontally are set at the same level, and a SAS expander architecture for upper and lower level communication is established in the vertical direction of the SAS expander, so as to achieve double-layer data synchronization between the controller layer and the tray layer in the storage device, thereby ensuring data security and improving the reliability of the storage device.
[0074] It should be understood that although Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0075] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the method described below:
[0076] Step 201, the first tray-level expander collects data of the tray where it is located;
[0077] Step 202: In response to the controller receiving the information collection instruction, the controller sends the information collection instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link;
[0078] Step 203: Merge the own data and the exclusive data to form complete disk data, and upload the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander.
[0079] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0080] The controller is also communicatively connected to a central processing unit, and the central processing unit sends an information collection instruction to the controller, so that the controller sends the information collection instruction to the first tray level expander or the second tray level expander.
[0081] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0082] In response to the controller not receiving the information collection instruction from the central processing unit, the controller sends a periodic collection instruction to the controller-level expander; and sends a periodic collection instruction to the first pallet-level expander or the second pallet-level expander through the controller-level expander, so that the first pallet-level expander or the second pallet-level expander collects its own data of the pallet according to a preset period.
[0083] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0084] After receiving the information collection instruction, the first pallet-level expander sends an access instruction to the second pallet-level expander, so that the second pallet-level expander refreshes the exclusive data according to the access instruction, and returns the refreshed exclusive data to the first pallet-level expander through the second pallet-level expander.
[0085] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0086] Before the first pallet-level expander obtains the exclusive data of the other party's second pallet-level expander through the SAS link, the clock of the physical link between the first pallet-level expander and the second pallet-level expander is enabled, and the general input and output pins of the clock are configured as a multiplexing function; in response to the completion of the initialization of the general input and output pins, the universal asynchronous receiver and transmitter parameters of the clock communication protocol are configured; the universal asynchronous receiver and transmitter are function initialized; in response to the completion of the function initialization, test data is sent through the universal asynchronous receiver and transmitter parameters; and by receiving the test data at the receiving end, it is confirmed that the communication link between the first pallet-level expander and the second pallet-level expander is in a connected state.
[0087] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0088] After configuring the universal asynchronous receiver / transmitter parameters of the clock communication protocol, calling the universal asynchronous receiver / transmitter function, and initializing the universal asynchronous receiver / transmitter function using the universal asynchronous receiver / transmitter parameters provided by the microcontroller; in response to completion of the initialization of the universal asynchronous receiver / transmitter function, configuring the enable register of the universal asynchronous receiver / transmitter to start the universal asynchronous receiver / transmitter peripheral.
[0089] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0090] In response to an abnormality in one of the controller-level expanders, the first tray-level expander or the second tray-level expander that is communicatively connected to the abnormal controller-level expander is obtained; initialization of the SAS link between the first tray-level expander and the second tray-level expander is performed; in response to completion of initialization of the SAS link, mode page information is queried through a preset command to obtain exclusive data in the first tray-level expander or the second tray-level expander.
[0091] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0092] Execute initialization of the SAS link between the first tray-level expander and the second tray-level expander, specifically including: confirming that the first tray-level expander and the second tray-level expander are in a normal connection state; collecting device types of the first tray-level expander and the second tray-level expander, and confirming the data transmission rate of the two tray-level expanders based on the device types.
[0093] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0094] A SAS controller is connected between the central processing unit and the controller-level expander, and the SAS controller is connected to the central processing unit through a PCIE link communication; the information collection instruction is converted into a SAS signal by the SAS controller, and the SAS signal is transmitted to the controller-level expander.
[0095] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0096] In response to an exception occurring in the first tray-level expander, the device address of the second tray-level expander that is in communication connection with the abnormal first tray-level expander is obtained; the controller-level expander associated with the first tray-level expander establishes a communication connection with the second tray-level expander through the device address to obtain the complete disk data of the second tray-level expander.
[0097] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store tray-level expander address data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a storage device communication method is implemented.
[0098] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0099] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0100] Step 301: The first tray-level expander collects data of the tray where it is located;
[0101] Step 302: In response to the controller receiving the information collection instruction, the controller sends the information collection instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link;
[0102] Step 303: merge the own data and the exclusive data to form complete disk data, and upload the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander.
[0103] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0104] The controller is also communicatively connected to a central processing unit, and the central processing unit sends an information collection instruction to the controller, so that the controller sends the information collection instruction to the first tray level expander or the second tray level expander.
[0105] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0106] In response to the controller not receiving the information collection instruction from the central processing unit, the controller sends a periodic collection instruction to the controller-level expander; and sends a periodic collection instruction to the first pallet-level expander or the second pallet-level expander through the controller-level expander, so that the first pallet-level expander or the second pallet-level expander collects its own data of the pallet according to a preset period.
[0107] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0108] After receiving the information collection instruction, the first pallet-level expander sends an access instruction to the second pallet-level expander, so that the second pallet-level expander refreshes the exclusive data according to the access instruction, and returns the refreshed exclusive data to the first pallet-level expander through the second pallet-level expander.
[0109] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0110] Before the first pallet-level expander obtains the exclusive data of the other party's second pallet-level expander through the SAS link, the clock of the physical link between the first pallet-level expander and the second pallet-level expander is enabled, and the general input and output pins of the clock are configured as a multiplexing function; in response to the completion of the initialization of the general input and output pins, the universal asynchronous receiver and transmitter parameters of the clock communication protocol are configured; the universal asynchronous receiver and transmitter are function initialized; in response to the completion of the function initialization, test data is sent through the universal asynchronous receiver and transmitter parameters; and by receiving the test data at the receiving end, it is confirmed that the communication link between the first pallet-level expander and the second pallet-level expander is in a connected state.
[0111] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0112] After configuring the universal asynchronous receiver / transmitter parameters of the clock communication protocol, calling the universal asynchronous receiver / transmitter function, and initializing the universal asynchronous receiver / transmitter function using the universal asynchronous receiver / transmitter parameters provided by the microcontroller; in response to completion of the initialization of the universal asynchronous receiver / transmitter function, configuring the enable register of the universal asynchronous receiver / transmitter to start the universal asynchronous receiver / transmitter peripheral.
[0113] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0114] In response to an abnormality in one of the controller-level expanders, the first tray-level expander or the second tray-level expander that is communicatively connected to the abnormal controller-level expander is obtained; initialization of the SAS link between the first tray-level expander and the second tray-level expander is performed; in response to completion of initialization of the SAS link, mode page information is queried through a preset command to obtain exclusive data in the first tray-level expander or the second tray-level expander.
[0115] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0116] Execute initialization of the SAS link between the first tray-level expander and the second tray-level expander, specifically including: confirming that the first tray-level expander and the second tray-level expander are in a normal connection state; collecting device types of the first tray-level expander and the second tray-level expander, and confirming the data transmission rate of the two tray-level expanders based on the device types.
[0117] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0118] A SAS controller is connected between the central processing unit and the controller-level expander, and the SAS controller is connected to the central processing unit through a PCIE link communication; the information collection instruction is converted into a SAS signal by the SAS controller, and the SAS signal is transmitted to the controller-level expander.
[0119] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0120] In response to an exception occurring in the first tray-level expander, the device address of the second tray-level expander that is in communication connection with the abnormal first tray-level expander is obtained; the controller-level expander associated with the first tray-level expander establishes a communication connection with the second tray-level expander through the device address to obtain the complete disk data of the second tray-level expander.
[0121] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0122] Step 401, the first tray level expander collects data of the tray where it is located;
[0123] Step 402: In response to the controller receiving the information collection instruction, the controller sends the information collection instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link;
[0124] Step 403: merge the own data and the exclusive data to form complete disk data, and upload the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander.
[0125] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0126] The controller is also communicatively connected to a central processing unit, and the central processing unit sends an information collection instruction to the controller, so that the controller sends the information collection instruction to the first tray level expander or the second tray level expander.
[0127] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0128] In response to the controller not receiving the information collection instruction from the central processing unit, the controller sends a periodic collection instruction to the controller-level expander; and sends a periodic collection instruction to the first tray-level expander or the second tray-level expander through the controller-level expander, so that the first tray-level expander or the second tray-level expander collects the disk data of the tray where it is located according to a preset period, and collects its own data according to a preset period.
[0129] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0130] After receiving the information collection instruction, the first pallet-level expander sends an access instruction to the second pallet-level expander, so that the second pallet-level expander refreshes the exclusive data according to the access instruction, and returns the refreshed exclusive data to the first pallet-level expander through the second pallet-level expander.
[0131] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0132] Before the first pallet-level expander obtains the exclusive data of the other party's second pallet-level expander through the SAS link, the clock of the physical link between the first pallet-level expander and the second pallet-level expander is enabled, and the general input and output pins of the clock are configured as a multiplexing function; in response to the completion of the initialization of the general input and output pins, the universal asynchronous receiver and transmitter parameters of the clock communication protocol are configured; the universal asynchronous receiver and transmitter are function initialized; in response to the completion of the function initialization, test data is sent through the universal asynchronous receiver and transmitter parameters; and by receiving the test data at the receiving end, it is confirmed that the communication link between the first pallet-level expander and the second pallet-level expander is in a connected state.
[0133] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0134] After configuring the universal asynchronous receiver / transmitter parameters of the clock communication protocol, calling the universal asynchronous receiver / transmitter function, and initializing the universal asynchronous receiver / transmitter function using the universal asynchronous receiver / transmitter parameters provided by the microcontroller; in response to completion of the initialization of the universal asynchronous receiver / transmitter function, configuring the enable register of the universal asynchronous receiver / transmitter to start the universal asynchronous receiver / transmitter peripheral.
[0135] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0136] In response to an abnormality in one of the controller-level expanders, the first tray-level expander or the second tray-level expander that is communicatively connected to the abnormal controller-level expander is obtained; initialization of the SAS link between the first tray-level expander and the second tray-level expander is performed; in response to completion of initialization of the SAS link, mode page information is queried through a preset command to obtain exclusive data in the first tray-level expander or the second tray-level expander.
[0137] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0138] Execute initialization of the SAS link between the first tray-level expander and the second tray-level expander, specifically including: confirming that the first tray-level expander and the second tray-level expander are in a normal connection state; collecting device types of the first tray-level expander and the second tray-level expander, and confirming the data transmission rate of the two tray-level expanders based on the device types.
[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0140] A SAS controller is connected between the central processing unit and the controller-level expander, and the SAS controller is connected to the central processing unit through a PCIE link communication; the information collection instruction is converted into a SAS signal by the SAS controller, and the SAS signal is transmitted to the controller-level expander.
[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0142] In response to an exception occurring in the first tray-level expander, the device address of the second tray-level expander that is in communication connection with the abnormal first tray-level expander is obtained; the controller-level expander associated with the first tray-level expander establishes a communication connection with the second tray-level expander through the device address to obtain the complete disk data of the second tray-level expander.
[0143] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0144] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0145] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A storage device communication method, based on a storage device communication architecture, characterized in that: The storage device comprises a dual controller and a tray connected to the dual controllers, each of the controllers is configured with at least one controller-level expander, a first tray-level expander and a second tray-level expander are configured on the tray, the first tray-level expander and the second tray-level expander are communicatively connected, and the first tray-level expander and the second tray-level expander are communicatively connected to the controller-level expander associated therewith, respectively, and the first tray-level expander and the second tray-level expander are communicatively connected to each other via a SAS link, and the method comprises: The first pallet-level expander collects its own data on the pallet it is on; In response to the controller receiving the information acquisition instruction, sending the information acquisition instruction to the first tray-level expander, so that the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link; Merging the own data and the exclusive data to form complete disk data, and uploading the complete disk data to the controller-level expander that is communicatively connected to the first tray-level expander; There are multiple trays, and a tray-level expander is correspondingly arranged on each tray. The tray-level expanders are numbered in sequence according to the trays they are located in. When the tray-level expander uploads the complete disk data of the disk it is located in to the controller-level expander, the complete disk data in the controller-level expander is marked with a corresponding number.
2. The storage device communication method according to claim 1, characterized in that: The two controller-level expanders are communicatively connected via a hardware link or a SAS link, and the controller-level expander is communicatively connected to the first tray-level expander or the second tray-level expander via a SAS link.
3. The storage device communication method according to claim 1, characterized in that: The controller is also communicatively connected to a central processing unit, and the method further comprises: The central processor sends an information collection instruction to the controller, so that the controller sends the information collection instruction to the first tray level expander or the second tray level expander.
4. The storage device communication method according to claim 3, characterized in that: The method comprises: In response to the controller not receiving the information collection instruction from the central processor, sending a periodic collection instruction to the controller-level expander; The controller-level expander sends a periodic collection instruction to the first tray-level expander or the second tray-level expander, so that the first tray-level expander or the second tray-level expander collects its own data of the tray according to a preset period.
5. The storage device communication method according to claim 4, characterized in that: The method further comprises: After receiving the information collection instruction, the first pallet-level expander sends an access instruction to the second pallet-level expander; The second tray-level expander is enabled to refresh the exclusive data according to the access instruction, and the refreshed exclusive data is returned to the first tray-level expander through the second tray-level expander.
6. The storage device communication method according to any one of claims 1 to 4, characterized in that: Before the first tray-level expander obtains the exclusive data of the second tray-level expander of the other party through the SAS link, the method further includes: Enabling a clock of a physical link between the first tray level expander and the second tray level expander, and configuring a general purpose input and output pin of the clock as a multiplexing function; In response to completion of the initialization of the general purpose input and output pins, configuring a universal asynchronous receiver / transmitter parameter of a communication protocol of the clock; Performing function initialization on the universal asynchronous receiver and transmitter; In response to completion of the function initialization, sending test data through the universal asynchronous receiver transmitter parameters; By receiving the test data at the receiving end, it is confirmed that the communication link between the first tray level expander and the second tray level expander is in a connected state.
7. The storage device communication method according to claim 6, characterized in that: After configuring the universal asynchronous receiver / transmitter parameters of the clock communication protocol, the method comprises: Calling a universal asynchronous receiver-transmitter function, and initializing the universal asynchronous receiver-transmitter function using the universal asynchronous receiver-transmitter parameters provided by the microcontroller; In response to completion of the initialization of the universal asynchronous receiver transmitter function, an enable register of the universal asynchronous receiver transmitter is configured to start the universal asynchronous receiver transmitter peripheral.
8. The storage device communication method according to claim 6, characterized in that: The method further comprises: In response to an abnormality occurring in one of the controller-level expanders, acquiring the first tray-level expander or the second tray-level expander that is communicatively connected to the abnormal controller-level expander; performing initialization of the SAS link between the first tray level expander and the second tray level expander; In response to completion of initialization of the SAS link, mode page information is queried through a preset command to obtain exclusive data in the first tray-level expander or the second tray-level expander.
9. The storage device communication method according to claim 8, characterized in that: Initializing the SAS link between the first tray level expander and the second tray level expander includes: Confirming that the first tray level expander and the second tray level expander are in a normal connection state; The device types of the first tray-level expander and the second tray-level expander are collected, and data transmission rates of the two tray-level expanders are confirmed according to the device types.
10. The storage device communication method according to claim 3, characterized in that: A SAS controller is connected between the central processing unit and the controller-level expander, and the SAS controller is connected to the central processing unit through a PCIE link communication; The information collection instruction is converted into a SAS signal by the SAS controller, and the SAS signal is transmitted to the controller-level expander.
11. The storage device communication method according to claim 8, characterized in that: The method further comprises: In response to an abnormality occurring in the first tray-level expander, acquiring a device address of the second tray-level expander in communication connection with the abnormal first tray-level expander; The controller-level expander associated with the first tray-level expander establishes a communication connection with the second tray-level expander through the device address to obtain the complete disk data of the second tray-level expander.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
13. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
