Search

CN-115617716-B - Method and system for transmitting IO (input/output) between controller and disk across SAS expander

CN115617716BCN 115617716 BCN115617716 BCN 115617716BCN-115617716-B

Abstract

The invention provides a method and a system for issuing IO between a controller and a disk through sasexpander. The method comprises the steps that an ITS module takes out an IO request from an IO request queue and packages the IO request into a SCSI command, a target device address is selected, an odd slot selects a local expander channel address, an even slot selects an opposite expander channel address, an SAS driver transmits the SCSI command to the local expander through an SAS bus, the local expander selects corresponding channel transmission according to SASADDRESS packaged by the SCSI command, when the local expanderIO fails to issue, the local expander returns corresponding IOerror to the ITS module, and the ITS module modifies SASADDRESS in the SCSI command to be the corresponding channel address on the opposite expander and issues IO again. According to the method and the system for issuing IO between the controller and the disk through the cross sasexpander, when the IO issuing of the current controller, the expander and the storage disk fails, the IO can be issued to the storage disk through the expander to which the opposite-end controller belongs.

Inventors

  • ZHU YONGBING
  • ZHOU ZEXIANG
  • WEN ZHONGLING

Assignees

  • 北京同有飞骥科技股份有限公司

Dates

Publication Date
20260505
Application Date
20221114

Claims (7)

  1. 1. The method for issuing IO between a controller and a disk across an SAS expander is characterized by comprising the following steps: Service issuing IO operation; The SCHED module encapsulates the IO operation into an IO request frame and inserts the IO request frame into an IO request queue; The ITS module takes out the IO request from the IO request queue, encapsulates the IO request into a SCSI command, selects a target device address, selects a local expander channel address from an odd slot, and selects an opposite expander channel address from an even slot; The SAS driver transmits the SCSI command to the local expander through an SAS bus; The local expander selects a corresponding channel for transmission according to SAS ADDRESS of the SCSI command package, and comprises the following steps: The bottom layer driver transmits a SCSI command to a local-end SAS expander through an SAS bus, an expander routing mechanism judges whether the command is from a local-end phy channel or a phy channel of an opposite-end expander disk according to TARGET SAS addresses, if TARGET SAS ADDRESS is an opposite-end, an IO SCSI frame is forwarded to the opposite-end expander through a wide port between two end controllers expander, the IO frame is sent to the disk through the phy channel, and the IO frame is issued to corresponding disk equipment; when the IO issuing of the local expander fails because the phy link is busy or the connection is abnormal, the local expander returns the corresponding IO error to the ITS module, and the ITS module modifies SAS ADDRESS in the SCSI command to be the corresponding channel address on the opposite expander to issue the IO again.
  2. 2. The method for issuing an IO between a controller and a disk across SAS expanders according to claim 1, wherein the SCHED module encapsulates an IO operation into an IO request frame and inserts the IO request frame into an IO request queue, comprising: And encapsulating the IO operation into an IO request frame by the SCHED module, forwarding the IO request frame to the ITS module, and placing the IO request into an IO request queue and returning by the ITS module to wait for the processing of the ITS module.
  3. 3. The method for issuing IO between a controller and a disk across SAS expander according to claim 1, wherein the ITS module fetches IO requests from IO request queues and encapsulates the IO requests into SCSI commands, and selects target device addresses, comprising: the ITS module completes initialization by creating a global thread.
  4. 4. The method for issuing IO between a controller and a disk across an SAS expander according to claim 3, wherein the global thread is responsible for taking IO requests out of an IO request queue one by one, checking whether the IO requests are legal, returning an illegal IO request to an IO error, and initializing the legal IO requests into a SCSI command format.
  5. 5. The method for issuing IO between a controller and a disk across a SAS expander of claim 4, wherein the target SAS address of the SCSI command frame is initialized according to disk slot id.
  6. 6. The method for issuing IO between a controller and a disk across a SAS expander according to claim 5, wherein initializing a target SAS address of a SCSI command frame according to a disk slot id comprises: The IO request target SAS address of the odd disk is initialized to the SAS address of the phy channel on the home expander, and the IO request target SAS address of the even disk is initialized to the phy channel address on the opposite expander.
  7. 7. An inter-controller and disk cross SAS expander issuing IO system, comprising: The controller is connected with the disk control cabinet through the expander, each controller is connected with one output expander, the controller is connected with the expander through an SAS cable, the expander comprises a local expander and an opposite expander, and the controller, the disk control cabinet and the expander realize the method for issuing IO between the controller and the disk across the SAS expander according to any one of claims 1 to 6.

Description

Method and system for transmitting IO (input/output) between controller and disk across SAS expander Technical Field The invention relates to the technical field of storage systems, in particular to a method and a system for issuing IO (input/output) between a controller and a disk across an SAS expander. Background Since the 21 st century, the society is moving into an informationized big data age with the rise of the internet of things and big data. In the background of the large age, the method brings convenience to us, and meanwhile, brings a plurality of challenges, and how to ensure the safety and the high efficiency of data storage is a common problem facing the storage industry. The current common bottom storage control system architecture mainly comprises a controller and a disk frame, wherein a data interaction path between the controller and the disk determines the data transmission capacity of the storage system to a certain extent, and a reliable IO interaction path ensures the stability of IO transmission and also improves the IO transmission rate to the greatest extent. In most storage systems, in order to improve reliability, data loss caused by failure of a storage controller in the process of transmitting IO data is prevented, and the data is usually realized by using dual controllers, namely, corresponding storage service is completed through redundant interaction of data between two controllers. The two controllers of the dual-controller storage system commonly hold the use right of the storage disk on the storage control cabinet, most of the common storage disks at present are SAS or SATA type disks, and the SAS (Serial Attached SCSI) network supports the SAS and SATA type disks at the same time, so that a transmission network between the storage controllers and the storage devices is usually realized by adopting an SAS network. In order to increase the capacity of the storage devices connected to the controller, the number of the storage devices of the storage system is generally expanded by adopting an SAS expander (storage expansion cabinet), so as to form a transmission network among the controller, the expander and the storage devices. The controllers of the double-control storage control array are connected with the disk cabinets through SAS expanders, each controller is connected with one output Expander, and the controllers are connected with the expanders through SAS cables. SAS expanders can be seen as hard disk switches through which many hard disks can be connected together, and are divided into output expanders (Fan-out expanders) that can be topologically connected to Edge expanders, and Edge expanders (Edge expanders). The data interaction is carried out between the Expander and the device through a transmission port, the transmission port is divided into a wide port and a narrow port, the single wide port comprises a plurality of PHYs, the narrow port is composed of a single PHYs, each PHYs comprises a differential signal pair composed of a transmitter and a receiver, each PHYs has an SAS address and a unique PHY ID, SAS ADDRESS of PHYs in the same transmission port are identical, the transmission rate of the wide port is obtained by overlapping the transmission rate of each PHY in the port, the channels between the Expander and the disk are narrow channels, the connection channels between the Expander are wide channels, and the bandwidth and the stability of the transmission channels determine the performance of IO issuing. Referring to fig. 1, in the conventional storage system, IO interaction is generally performed by the IO issuing between the controllers and the disk through a phy channel under the local expander, or the IO issuing is forwarded to the opposite-end controller through a communication mechanism between the controllers, so that the patents of the high-speed communication mechanism between the controllers are more in the industry, and the patent of the expander IO transmission link between the controllers is less, so that the system is worthy of intensive study. Disclosure of Invention The invention aims to solve the technical problem of providing a method and a system for issuing IO between a controller and a disk across an SAS expander, wherein when the IO between the current controller and the expander and the IO between the current controller and a storage disk fails, the IO can be issued to the storage disk through the expander to which the opposite-end controller belongs. The invention provides a method for transmitting IO between a controller and a disk by crossing SAS expanders, which comprises the steps of transmitting IO operation through a service, packaging the IO operation into IO request frames by a SCHED module and inserting the IO request frames into an IO request queue, taking out the IO request from the IO request queue by an ITS module, packaging the IO request into SCSI commands, selecting a target device address, selecting a local ex