This invention provides a method and
system for distributing I / O across SAS expanders between a controller and a disk. The method includes: an ITS module retrieving I / O requests from an I / O
request queue and encapsulating them into
SCSI commands; selecting a target device address; selecting the local expander channel address for odd-numbered slots and the peer expander channel address for even-numbered slots; the SAS driver transmitting the
SCSI command to the local expander via the SAS
bus; the local expander selecting the corresponding channel for transmission based on the SAS address encapsulated in the
SCSI command; and when the local expander fails to distribute the I / O, it returns a corresponding I / O error to the ITS module, which modifies the SAS address in the SCSI command to the corresponding channel address on the peer expander and re-distributes the I / O. This invention provides a method and
system for distributing I / O across SAS expanders between a controller and a disk, allowing I / O to be distributed to the storage disk via the expander belonging to the peer controller when I / O distribution between the current controller and the expander / storage disk fails.