WO2017067382A1 - Disk state detection method, disk expander, and disk control system - Google Patents

Disk state detection method, disk expander, and disk control system Download PDF

Info

Publication number
WO2017067382A1
WO2017067382A1 PCT/CN2016/101390 CN2016101390W WO2017067382A1 WO 2017067382 A1 WO2017067382 A1 WO 2017067382A1 CN 2016101390 W CN2016101390 W CN 2016101390W WO 2017067382 A1 WO2017067382 A1 WO 2017067382A1
Authority
WO
WIPO (PCT)
Prior art keywords
disk
expander
state detection
controller
detection result
Prior art date
Application number
PCT/CN2016/101390
Other languages
French (fr)
Chinese (zh)
Inventor
吴小祥
王昕�
朱炫鹏
舒坦
梁庆永
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017067382A1 publication Critical patent/WO2017067382A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Definitions

  • the SAS network provides a high-speed, scalable, and highly reliable information-bearing network for the Small Computer System Interface (SCSI) protocol.
  • SCSI protocol defines the access criteria for fast devices.
  • the disk controller acts as a small computer system interface initiator (SCSI Initiator).
  • the disk acts as a small computer system interface target (SCSI Target).
  • the disk controller is implemented according to the Initiator and Target models. Access to the disk.
  • the disk expander receives a disk state detection result fed back by the disk to be detected
  • the disk expander sends a disk state detection request to the to-be-detected disk according to a preset detection time interval.
  • the disk state detection request includes a unit state test request; and the disk state detection result includes a disk availability detection result.
  • the detection initiation module includes a timing submodule and an initiation submodule
  • FIG. 7 is a schematic structural diagram of a disk controller according to Embodiment 2 of the present disclosure.
  • FIG. 8 is a schematic structural diagram of another disk controller according to Embodiment 2 of the present disclosure.
  • FIG. 10 is a schematic flowchart of a disk controller processing availability state detection result according to Embodiment 3 of the present disclosure
  • the disk expander directly initiates a disk state detection request to the disk, instead of the disk controller initiating a disk state detection request, because The disk expander is closer to the disk (generally directly connected to the disk), so initiating state detection requests is more straightforward and more efficient.
  • the disk in this embodiment can detect the relevant state of the corresponding disk unit.
  • the disk state detection request initiated by the disk expander in this embodiment may be detected for multiple states of the disk, and may be the availability state of the disk; the disk state detection request initiated at this time includes a unit state test (TUR).
  • the request that is, the availability detection request of the disk; after receiving the request, the disk can detect its current availability status, and the disk status detection result that the disk to be detected feeds back to the disk expander includes the disk availability detection result.
  • the disk availability test result may be one of Good and Check Condition. When Good, the disk availability status is available; when Check Condition, the disk availability status is unavailable.
  • the disk expander when the disk expander sends the received disk state detection result to the disk controller, the disk expander may be passively sent according to the requirements of the disk controller, or may be actively sent according to relevant rules.
  • the disk expander first stores the disk state detection result of the feedback of the disk to be detected, and can be stored in the local data area, and the data area can be the storage disk state detection result.
  • the dedicated data area set may also be a data area shared with other data; after receiving the disk state query request sent by the disk controller, the disk expander sends the stored disk state detection result to the disk control. Device.
  • This embodiment provides a disk control system, as shown in Figure 4, the package disk expander 1 and the disk controller 2;
  • the disk controller 2 is configured to receive the disk state detection result sent by the disk expander 1, and obtain the state information of the corresponding disk according to the disk state detection result.
  • the sending module 13 is configured to send the disk state detection result to the disk controller 2.
  • the detection initiating module 11 initiates a disk state detection request to the disk to be detected; the rule may be set according to an application scenario.
  • the disk expander sends a disk state detection request to the to-be-detected disk according to a preset detection time interval.
  • a disk state detection request is initiated to the disk to be detected every 1 second or 5 seconds.
  • the value of this time interval can be considered according to factors such as the current detection requirement and the current detection status.
  • the to-be-detected disk is at least one disk directly connected to the disk expander.
  • the disk state detection request initiated by the detection initiating module 11 can detect multiple states of the disk, which can be a disk availability state; the disk state detection request initiated at this time includes a unit state test (TUR) request, that is, a disk.
  • the availability detection request after the disk receives the request, it can detect its current availability status, and the disk status detection result fed back to the disk expander includes the disk availability detection result.
  • the disk availability test result may be one of Good and Check Condition. When Good, the disk availability status is available; when Check Condition, the disk availability status is unavailable.
  • the sending module 13 sends the disk state detection result to the disk controller, the sending module 13 can directly send the received Good or Check Condition result to the disk controller, and the disk controller analyzes the disk available according to the Good or Check Condition result.
  • the sending module 13 can also analyze the disk as available or unavailable according to the received Good or Check Condition, and then feed back the analyzed available or unavailable state to the disk controller.
  • the sending module 13 in this embodiment sends the disk state detection result to the disk controller in an optional manner to send the disk state detection result to the disk controller for the disk controller to analyze.
  • the sending module 13 can directly send the disk state detection result fed back by the disk to the disk controller after receiving the disk state detection result of the disk feedback to be detected.
  • the receiving module 12 may receive the disk state detection result and store it before sending it to the disk controller.
  • the disk state detection request initiated by the disk expander 1 in this embodiment may be the availability state of the disk; the state detection result received by the disk controller 2 includes the disk availability detection result.
  • the disk availability test result may be one of Good and Check Condition, at this time disk control
  • the state analysis module 23 of the controller 2 can analyze by itself that when the value is Good, it indicates that the disk availability state is available; when it is Check Condition, it indicates that the disk availability state is unavailable.
  • the disk availability test result may also be that disk expander 1 analyzes the available or unavailable information of the disk according to Good or Check Condition.
  • the status analysis module 23 directly obtains available or unavailable information from the disk availability test results.
  • the disk expander receives the return result of the disk according to the TUR command
  • the disk controller receives the disk availability information returned by the disk expander
  • the disk controller determines the number of disks that need to be processed for disk availability information. If it is 0, go to S1006, if not 0, go to S1004;
  • Embodiment 4 of the present disclosure further provides a non-transitory computer readable storage medium storing computer executable instructions configured to perform disk state detection on a disk expander side in any of the above embodiments. method.
  • Embodiment 6 of the present disclosure also provides a schematic structural diagram of a disk expander.
  • the disk expander includes:
  • At least one processor 1110 which is exemplified by a processor 1110 in FIG. 11; and a memory 1120, may further include a communication interface 1130 and a bus 1140.
  • the processor 1110, the memory 1120, and the communication interface 1130 can complete communication with each other through the bus 1140.
  • Communication interface 1130 can be used for information transmission.
  • the processor 1110 can call the logic instructions in the memory 1120 to perform the disk state detecting method on the disk expander side of the above embodiment.
  • the memory 1120 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 1120 may include a high speed random access memory, and may also include a nonvolatile memory.
  • logic instructions in the memory 1220 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the memory 1220 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; and the storage data area may be stored according to the terminal device Use the data created, etc. Further, the memory 1220 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method of the embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • Embodiments of the present disclosure provide a disk state detection method, a disk expander, and a disk control system, which are initiated by a disk expander directly connected to a disk during disk state detection, and a detection process initiated by a disk controller in the related art. More direct and faster, more efficient; then the disk controller only needs to obtain the corresponding status detection result from the limited disk expander, no need to initiate a status detection request to each disk, so the disk controller and disk can be greatly reduced
  • the number of message interactions between the expanders makes the link between the disk controller and the disk expander not long and heavily occupied, thereby improving the access efficiency of the disk and improving the overall performance of the disk array.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A disk state detection method, a disk expander, and a disk control system. The disk state detection method comprises: a disk expander initiates a disk state detection request to disks to be detected; the disk expander receives disk state detection results fed back by the disks to be detected; and the disk expander sends the disk state detection results to a disk controller.

Description

磁盘状态检测方法、磁盘扩展器及磁盘控制系统Disk status detection method, disk expander, and disk control system 技术领域Technical field
本公开涉及通信领域,例如涉及一种磁盘状态检测方法、磁盘扩展器及磁盘控制系统。The present disclosure relates to the field of communications, for example, to a disk state detection method, a disk expander, and a disk control system.
背景技术Background technique
随着信息技术的不断发展,人们日常生产和生活过程中产生的数据呈爆炸性方式增长,这些海量数据需要独立的专业设备来管理,因此磁盘阵列应运而生。With the continuous development of information technology, the data generated by people's daily production and life processes has exploded in an explosive way. These massive amounts of data need to be managed by independent professional equipment, so disk arrays have emerged.
当前主流的磁盘阵列都是通过串行小型计算机系统接口(Serial Attached SCSI,SAS)网络将大量磁盘连接起来,对用户提供大容量、高可靠性和高可用性的数据存储与备份功能。The current mainstream disk arrays connect a large number of disks through a Serial Small Attached System (SAS) network to provide users with high-capacity, high-reliability and high-availability data storage and backup functions.
SAS网络可包括三个元素:磁盘控制器、磁盘扩展器和磁盘,三者之间的连接示意图请参见图1所示。磁盘控制器负责扫描SAS网络的拓扑、发起对磁盘的访问以及对磁盘扩展器进行管理;磁盘扩展器负责连磁盘接磁盘控制器和至少一个磁盘,转发磁盘控制器与至少一个磁盘间传输的信息,磁盘扩展器是一个起交换作用的器件;磁盘连接磁盘扩展器后,即接入SAS网络,可以提供块存储服务。The SAS network can include three elements: a disk controller, a disk expander, and a disk. See Figure 1 for a schematic diagram of the connection between the three. The disk controller is responsible for scanning the topology of the SAS network, initiating access to the disk, and managing the disk expander; the disk expander is responsible for connecting the disk controller to the disk controller and at least one disk, and forwarding information transmitted between the disk controller and at least one disk. The disk expander is a device that acts as a switch; after the disk is connected to the disk expander, it is connected to the SAS network and can provide a block storage service.
SAS网络为小型计算机系统接口(Small Computer System Interface,SCSI)协议提供了高速率、可扩展和高可靠的信息承载网络。SCSI协议则定义了快设备的访问标准,磁盘控制器做为小型计算机系统接口发起者(SCSI Initiator),磁盘做为小型计算机系统接口目标(SCSI Target),依照Initiator和Target的模型实现磁盘控制器对磁盘的访问。The SAS network provides a high-speed, scalable, and highly reliable information-bearing network for the Small Computer System Interface (SCSI) protocol. The SCSI protocol defines the access criteria for fast devices. The disk controller acts as a small computer system interface initiator (SCSI Initiator). The disk acts as a small computer system interface target (SCSI Target). The disk controller is implemented according to the Initiator and Target models. Access to the disk.
在磁盘控制器上的SCSI Initiator为了确认磁盘可用性,会定时向磁盘发送SCSI命令:单元状态测试(Test Unit Ready,TUR)指令,磁盘收到TUR指令 后根据自身状态进行返回。当磁盘可以提供服务,接收SCSI命令处理时,收到TUR指令后返回准备就绪状态(Good状态);当磁盘不能提供服务,不能处理SCSI命令时,收到TUR指令后返回检查条件状态(Check Condition状态)。磁盘控制器根据TUR指令的返回状态就可以判断磁盘是否处于可用状态。In order to confirm disk availability, the SCSI Initiator on the disk controller periodically sends SCSI commands to the disk: the Test Unit Ready (TUR) command, and the disk receives the TUR command. Then return according to its own state. When the disk can provide services, it receives the TUR command and returns to the ready state (Good state) when receiving the TUR command; when the disk cannot provide the service and cannot process the SCSI command, it returns the check condition after receiving the TUR command (Check Condition) status). The disk controller can determine whether the disk is available based on the return status of the TUR instruction.
在数据量激增的情况下,磁盘阵列为了能够扩大存储容量,接入的磁盘越来越多,单个磁盘阵列能够接入的磁盘最大可以达到几千块。如此众多的磁盘在一个阵列中,要获取每个磁盘的可用状态,磁盘控制器需定时发送TUR指令给每个磁盘,那么在磁盘可用性检测时间间隔内就需要至少发送几千个TUR指令,这给系统带来了很大的负担;且SAS技术是个面向连接的技术,即需要发送TUR时,需要打开连接,在磁盘控制器、磁盘扩展器和磁盘间建立一个连接,且该连接是一个禁止其它数据传输的专用连接,在此次检测完毕后,再关闭连接。这样的特性使得TUR频繁发送严重占用了磁盘控制器和磁盘扩展器的资源,严重影响正常数据的读写,降低了磁盘阵列的性能。In the case of a surge in data volume, in order to expand storage capacity, more and more disks are accessed, and a single disk array can access up to several thousand disks. With so many disks in an array, to get the available state of each disk, the disk controller needs to send TUR commands to each disk periodically, so at least several thousand TUR commands need to be sent during the disk availability detection interval. It imposes a heavy burden on the system; and SAS technology is a connection-oriented technology, that is, when a TUR needs to be sent, the connection needs to be opened, a connection is established between the disk controller, the disk expander and the disk, and the connection is prohibited. For other dedicated connections for data transmission, close the connection after this test is completed. Such a feature makes the TUR frequently send resources that seriously occupy the disk controller and the disk expander, seriously affecting the reading and writing of normal data, and reducing the performance of the disk array.
由此可见,在相关技术中的磁盘阵列系统中,通过磁盘控制器向每个磁盘发起TUR来检测磁盘的可用性,存在效率低,占用资源大、会影响对磁盘的正常数据访问,以及降低磁盘阵列的整体性能的问题。Therefore, in the disk array system of the related art, the disk controller is used to initiate a TUR to each disk to detect the availability of the disk, which is inefficient, consumes a large amount of resources, affects normal data access to the disk, and reduces the disk. The overall performance of the array is a problem.
发明内容Summary of the invention
本公开提供一种磁盘状态检测方法、磁盘扩展器及磁盘控制系统,解决相关技术中的磁盘状态检测存在的效率低、占用资源大,以及降低了磁盘阵列整体性能的问题。The present disclosure provides a disk state detection method, a disk expander, and a disk control system, which solve the problems of low efficiency, large resource consumption, and overall performance of the disk array in the related art.
第一方面,本公开提供一种磁盘状态检测方法,包括:In a first aspect, the present disclosure provides a disk state detection method, including:
磁盘扩展器向待检测磁盘发起磁盘状态检测请求;The disk expander initiates a disk state detection request to the to-be-detected disk;
所述磁盘扩展器接收待检测磁盘反馈的磁盘状态检测结果;以及The disk expander receives a disk state detection result fed back by the disk to be detected;
所述磁盘扩展器将所述磁盘状态检测结果发给磁盘控制器。 The disk expander sends the disk state detection result to the disk controller.
在本公开的一种实施例中,所述待检测磁盘为与所述磁盘扩展器直连的至少一个磁盘。In an embodiment of the present disclosure, the to-be-detected disk is at least one disk directly connected to the disk expander.
在本公开的一种实施例中,磁盘扩展器向待检测磁盘发起磁盘状态检测请求包括:In an embodiment of the present disclosure, the disk expander initiating a disk state detection request to the to-be-detected disk includes:
磁盘扩展器根据预设的检测时间间隔向所述待检测磁盘发送磁盘状态检测请求。The disk expander sends a disk state detection request to the to-be-detected disk according to a preset detection time interval.
在本公开的一种实施例中,所述磁盘状态检测请求包括单元状态测试请求;以及,所述磁盘状态检测结果包括磁盘可用性检测结果。In an embodiment of the present disclosure, the disk state detection request includes a unit state test request; and the disk state detection result includes a disk availability detection result.
在本公开的一种实施例中,所述磁盘扩展器将所述磁盘状态检测结果发给磁盘控制器包括:In an embodiment of the present disclosure, the disk expander sending the disk state detection result to the disk controller includes:
所述磁盘扩展器接收到待检测磁盘反馈的磁盘状态检测结果后进行存储,并在接收到所述磁盘控制器下发的磁盘状态查询请求后,将所述磁盘状态检测结果发给所述磁盘控制器;Receiving, after receiving the disk state detection result sent by the disk controller, the disk expander sends the disk state detection result to the disk after receiving the disk state query result sent by the disk controller. Controller
或所述磁盘扩展器接收到待检测磁盘反馈的磁盘状态检测结果后,将所述磁盘状态检测结果主动发给所述磁盘控制器。After the disk expander receives the disk state detection result of the disk feedback to be detected, the disk state detection result is actively sent to the disk controller.
第二方面,本公开还提供了一种磁盘扩展器,包括:In a second aspect, the present disclosure also provides a disk expander, including:
检测发起模块,设置为向待检测磁盘发起磁盘状态检测请求;The detection initiation module is configured to initiate a disk state detection request to the to-be-detected disk;
接收模块,设置为接收待检测磁盘反馈的磁盘状态检测结果;以及,a receiving module, configured to receive a disk state detection result of the disk feedback to be detected; and
发送模块,设置为将所述磁盘状态检测结果发给磁盘控制器。The sending module is configured to send the disk state detection result to the disk controller.
在本公开的一种实施例中,所述待检测磁盘为与所述磁盘扩展器直连的至少一个磁盘。In an embodiment of the present disclosure, the to-be-detected disk is at least one disk directly connected to the disk expander.
在本公开的一种实施例中,所述检测发起模块包括计时子模块和发起子模块; In an embodiment of the present disclosure, the detection initiation module includes a timing submodule and an initiation submodule;
其中,所述计时子模块设置为对检测时间间隔进行计时;以及,The timing submodule is configured to time the detection time interval; and,
所述发起子模块设置为在所述检测时间间隔到达时,向所述待检测磁盘发送磁盘状态检测请求。The initiator module is configured to send a disk state detection request to the to-be-detected disk when the detection time interval arrives.
在本公开的一种实施例中,所述磁盘状态检测请求包括单元状态测试请求;以及,所述磁盘状态检测结果包括磁盘可用性检测结果。In an embodiment of the present disclosure, the disk state detection request includes a unit state test request; and the disk state detection result includes a disk availability detection result.
第三方面,本公开还提供了一种磁盘控制系统,包括本公开实施例提供的任一的磁盘扩展器和磁盘控制器;In a third aspect, the present disclosure further provides a disk control system, including any of the disk expanders and disk controllers provided by the embodiments of the present disclosure;
其中,所述磁盘扩展器设置为向待检测磁盘发起磁盘状态检测请求,接收待检测磁盘反馈的磁盘状态检测结果,并将所述磁盘状态检测结果发给磁盘控制器;以及,The disk expander is configured to initiate a disk state detection request to the to-be-detected disk, receive a disk state detection result fed back by the disk to be detected, and send the disk state detection result to the disk controller; and
所述磁盘控制器设置为接收所述磁盘扩展器发送的磁盘状态检测结果,根据所述磁盘状态检测结果获取相应磁盘的状态信息。The disk controller is configured to receive a disk state detection result sent by the disk expander, and obtain state information of the corresponding disk according to the disk state detection result.
第四方面,本公开还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一磁盘扩展器侧的磁盘状态检测方法。In a fourth aspect, the present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform a disk state detection method on any of the disk expander sides.
第五方面,本公开还提供了一种电子设备,该设备包括:In a fifth aspect, the disclosure further provides an electronic device, the device comprising:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述任一磁盘扩展器侧的磁盘状态检测方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform a disk state detection method on any of the disk expander sides described above .
本公开实施例提供的磁盘状态检测方法、磁盘扩展器及磁盘控制系统,通过磁盘扩展器直接向待检测的磁盘发起磁盘状态检测请求,待检测磁盘根据该磁盘状态检测请求将检测结果直接反馈给磁盘扩展器;然后磁盘扩展器将该磁 盘状态检测结果反馈给磁盘控制器。本公开实施例进行磁盘状态检测时由磁盘扩展器发起,相对相关技术中由磁盘控制器发起的检测流程,更为直接快速,效率更高;然后磁盘控制器只需从有限的磁盘扩展器上获取对应的状态检测结果即可,无需向每个磁盘发起状态检测请求,因此相对相关技术中的检测方式可大量减少磁盘控制器和磁盘扩展器之间消息交互数量,使得磁盘控制器和磁盘扩展器间的连接不会长时间和大量占用,因此可提升对磁盘的访问效率,提高磁盘整列的整体性能。The disk state detecting method, the disk expander, and the disk control system provided by the embodiment of the present disclosure directly initiate a disk state detection request to the disk to be detected through the disk expander, and the to-be-detected disk directly feeds back the detection result according to the disk state detection request. Disk expander; then the disk expander will magneticize The disc status detection result is fed back to the disk controller. When the disk state detection is performed by the disk expander in the embodiment of the present disclosure, the detection process initiated by the disk controller in the related art is more direct and faster, and the efficiency is higher; then the disk controller only needs to be from a limited disk expander. Obtaining the corresponding state detection result, it is not necessary to initiate a state detection request to each disk, so the detection method in the related art can greatly reduce the number of message interactions between the disk controller and the disk expander, so that the disk controller and the disk expansion The connection between the devices will not be used for a long time and in a large amount, so the access efficiency to the disk can be improved, and the overall performance of the entire column of the disk can be improved.
附图说明DRAWINGS
图1为一种SAS网络结构示意图;1 is a schematic structural diagram of a SAS network;
图2为本公开实施例一提供的磁盘状态检测方法流程示意图;2 is a schematic flowchart of a disk state detecting method according to Embodiment 1 of the present disclosure;
图3为本公开实施例一提供的磁盘状态获取方法流程示意图;3 is a schematic flowchart of a method for acquiring a disk state according to Embodiment 1 of the present disclosure;
图4为本公开实施例二提供的磁盘控制系统结构示意图;4 is a schematic structural diagram of a disk control system according to Embodiment 2 of the present disclosure;
图5为本公开实施例二提供的磁盘扩展器结构示意图;FIG. 5 is a schematic structural diagram of a disk expander according to Embodiment 2 of the present disclosure;
图6为图5中检测发起模块的结构示意图;6 is a schematic structural diagram of a detection initiation module in FIG. 5;
图7为本公开实施例二提供的磁盘控制器结构示意图;FIG. 7 is a schematic structural diagram of a disk controller according to Embodiment 2 of the present disclosure;
图8为本公开实施例二提供的另一磁盘控制器结构示意图;8 is a schematic structural diagram of another disk controller according to Embodiment 2 of the present disclosure;
图9为本公开实施例三提供的磁盘扩展器发起可用性状态检测流程示意图;FIG. 9 is a schematic flowchart of a disk expander initiating an availability state detection process according to Embodiment 3 of the present disclosure;
图10为本公开实施例三提供的磁盘控制器处理可用性状态检测结果流程示意图;10 is a schematic flowchart of a disk controller processing availability state detection result according to Embodiment 3 of the present disclosure;
图11为本公开实施例六提供了一种磁盘扩展器的结构示意图;以及,FIG. 11 is a schematic structural diagram of a disk expander according to Embodiment 6 of the present disclosure; and
图12为公开实施例七提供了一种磁盘控制器的结构示意图。FIG. 12 is a schematic structural diagram of a disk controller according to a seventh embodiment of the disclosure.
具体实施方式detailed description
下面通过可选实施方式结合附图对本公开作详细说明。在不冲突的情况下, 实施例和实施例中的特征可以相互任意组合。The present disclosure is described in detail below with reference to the accompanying drawings in the accompanying drawings. In the absence of conflict, The features in the embodiments and the embodiments may be arbitrarily combined with each other.
实施例一:Embodiment 1:
本实施例提供了一种磁盘状态检测方法,请参见图2所示,包括:This embodiment provides a disk state detection method, which is shown in FIG. 2, and includes:
在S210中,磁盘扩展器向待检测磁盘发起磁盘状态检测请求;In S210, the disk expander initiates a disk state detection request to the to-be-detected disk;
在S220中,磁盘扩展器接收待检测磁盘反馈的磁盘状态检测结果;In S220, the disk expander receives the disk state detection result of the disk feedback to be detected;
在S230中,磁盘扩展器将收到的磁盘状态检测结果发给磁盘控制器。In S230, the disk expander sends the received disk state detection result to the disk controller.
本实施例通过在磁盘扩展器上增加磁盘状态检测功能,例如增加磁盘状态检测代理模块,使的磁盘扩展器直接向磁盘发起磁盘状态检测请求,而不是由磁盘控制器发起磁盘状态检测请求,由于磁盘扩展器离磁盘更近(一般直接与磁盘连接),因此发起状态检测请求更为直接,效率更高。In this embodiment, by adding a disk state detection function to the disk expander, for example, adding a disk state detection proxy module, the disk expander directly initiates a disk state detection request to the disk, instead of the disk controller initiating a disk state detection request, because The disk expander is closer to the disk (generally directly connected to the disk), so initiating state detection requests is more straightforward and more efficient.
本实施例中的磁盘在接收到磁盘状态检测请求后,即可对相应的磁盘单元的相关状态进行检测。应当理解的是,本实施例中磁盘扩展器发起的磁盘状态检测请求可针对磁盘的多种状态进行检测,可以为磁盘的可用性状态;此时发起的磁盘状态检测请求包括单元状态测试(TUR)请求,也即磁盘的可用性检测请求;磁盘收到该请求后即可对自身当前的可用性状态进行检测,待检测磁盘向磁盘扩展器反馈的磁盘状态检测结果包括磁盘可用性检测结果。该磁盘可用性检测结果可能是Good和Check Condition中的一种,当为Good时,表明磁盘可用性状态为可用;为Check Condition时,表明磁盘可用性状态为不可用。磁盘扩展器将磁盘状态检测结果发给磁盘控制器时,磁盘扩展器可直接将收到的Good或Check Condition结果发给磁盘控制器,由磁盘控制器根据Good或Check Condition结果分析出磁盘可用或不可用;磁盘扩展器也可根据收到的Good或Check Condition分析出磁盘为可用或不可用状态,然后将分析出的可用或不可用状态反馈给磁盘控制器。另外,本实施例中的磁盘扩展器在将磁盘状 态检测结果发送给磁盘控制器时,可选的将磁盘状态检测结果组织成信息列表的方式发送给磁盘控制器,以便于磁盘控制器分析。After receiving the disk state detection request, the disk in this embodiment can detect the relevant state of the corresponding disk unit. It should be understood that the disk state detection request initiated by the disk expander in this embodiment may be detected for multiple states of the disk, and may be the availability state of the disk; the disk state detection request initiated at this time includes a unit state test (TUR). The request, that is, the availability detection request of the disk; after receiving the request, the disk can detect its current availability status, and the disk status detection result that the disk to be detected feeds back to the disk expander includes the disk availability detection result. The disk availability test result may be one of Good and Check Condition. When Good, the disk availability status is available; when Check Condition, the disk availability status is unavailable. When the disk expander sends the disk status detection result to the disk controller, the disk expander can directly send the received Good or Check Condition result to the disk controller, and the disk controller analyzes the disk available according to the Good or Check Condition result. Not available; the disk expander can also analyze the disk as available or unavailable based on the received Good or Check Condition and then feed back the analyzed available or unavailable status to the disk controller. In addition, the disk expander in this embodiment is in the form of a disk When the state detection result is sent to the disk controller, the disk state detection result is optionally organized into a message list and sent to the disk controller for disk controller analysis.
另外,本实施例中磁盘扩展器向待检测磁盘发起磁盘状态检测请求的规则可根据应用场景设定。例如磁盘扩展器根据预设的检测时间间隔向待检测磁盘发送磁盘状态检测请求。例如每间隔1秒或5秒等向待检测磁盘发起磁盘状态检测请求。该时间间隔的取值可根据当前检测需求以及当前检测的状态等因素考虑。In addition, the rule that the disk expander initiates a disk state detection request to the disk to be detected in this embodiment may be set according to an application scenario. For example, the disk expander sends a disk state detection request to the to-be-detected disk according to a preset detection time interval. For example, a disk state detection request is initiated to the disk to be detected every 1 second or 5 seconds. The value of this time interval can be considered according to factors such as the current detection requirement and the current detection status.
为了提升检测效率,本实施例中的待检测磁盘可以为与磁盘扩展器直连的至少一个磁盘。本实施例中的磁盘扩展器可选的向与磁盘扩展器直连的磁盘发起磁盘状态检测请求;且磁盘扩展器可选择向与磁盘扩展器直连的一个或多个磁盘发起磁盘状态检测请求。In order to improve the detection efficiency, the disk to be detected in this embodiment may be at least one disk directly connected to the disk expander. The disk expander in this embodiment optionally initiates a disk state detection request to a disk directly connected to the disk expander; and the disk expander can select to initiate a disk state detection request to one or more disks directly connected to the disk expander. .
本实施例中,磁盘扩展器将收到的磁盘状态检测结果发给磁盘控制器时,磁盘扩展器可应磁盘控制器的要求被动发送,也可根据相关规则主动发送。应磁盘控制器的要求被动发送时,磁盘扩展器接收到至少一个待检测磁盘反馈的磁盘状态检测结果后先进行存储,可以存储在本地数据区中,该数据区可以为存储磁盘状态检测结果而设置的专用数据区,也可以是与存储其他数据共用的数据区;然后磁盘扩展器在接收到磁盘控制器下发的磁盘状态查询请求后,将存储的相应的磁盘状态检测结果发给磁盘控制器。In this embodiment, when the disk expander sends the received disk state detection result to the disk controller, the disk expander may be passively sent according to the requirements of the disk controller, or may be actively sent according to relevant rules. When the disk controller is passively sent according to the requirements of the disk controller, the disk expander first stores the disk state detection result of the feedback of the disk to be detected, and can be stored in the local data area, and the data area can be the storage disk state detection result. The dedicated data area set may also be a data area shared with other data; after receiving the disk state query request sent by the disk controller, the disk expander sends the stored disk state detection result to the disk control. Device.
磁盘扩展器将磁盘状态检测结果主动发送磁盘控制器时,磁盘扩展器在接收到待检测磁盘反馈的磁盘状态检测结果后,可直接将接收到的磁盘反馈的磁盘状态检测结果发给磁盘控制器,也可进行存储后再发给磁盘控制器。例如先在本地存储后,然后按照一定的时间间隔主动发送给磁盘控制器,例如每间隔1秒或2秒等将相应的磁盘状态检测结果反馈给磁盘控制器。 When the disk expander actively sends the disk state detection result to the disk controller, the disk expander can directly send the disk state detection result of the received disk feedback to the disk controller after receiving the disk state detection result of the disk feedback to be detected. It can also be stored and sent to the disk controller. For example, after being stored locally, and then actively sending to the disk controller at a certain time interval, for example, the corresponding disk state detection result is fed back to the disk controller every 1 second or 2 seconds.
本实施例还提供了一种磁盘状态获取方法,请参见图3所示,包括:This embodiment also provides a disk state obtaining method, as shown in FIG. 3, including:
在S310中,磁盘控制器接收磁盘扩展器发送的磁盘状态检测结果,该磁盘状态检测结果为本公开实施例提供的任一磁盘状态检测方法获取的,可选的为所磁盘扩展器通过如图2所示的磁盘状态检测方法获取的;In S310, the disk controller receives the disk state detection result sent by the disk expander, and the disk state detection result is obtained by any disk state detection method provided by the embodiment of the disclosure, optionally, the disk expander is as shown in the figure. Obtained by the disk state detection method shown in 2;
在S320中,磁盘控制器根据收到的磁盘状态检测结果进行分析获取到相应磁盘的状态信息。In S320, the disk controller analyzes the received disk state detection result to obtain status information of the corresponding disk.
本实施例中的磁盘控制器从磁盘扩展器获取磁盘状态检测结果时,磁盘控制器可主动向磁盘扩展器发起请求获取,也可以直接接收磁盘扩展器直接反馈的磁盘状态检测结果。当主动向磁盘扩展器发起请求获取时,在上述S310之前,还包括磁盘控制器向磁盘扩展器下发磁盘状态查询请求;磁盘控制器下发磁盘状态查询请求的规则可以是按一定的时间间隔下发,且该时间间隔可以与磁盘扩展器下发的磁盘状态检测请求的时间间隔相同,自然也可不同,例如取1秒、2秒等,取值也可根据当前检测的状态和检测需求设定。When the disk controller in this embodiment obtains the disk state detection result from the disk expander, the disk controller may initiate a request acquisition to the disk expander, or directly receive the disk state detection result directly fed back by the disk expander. When the request is obtained from the disk expander, the disk controller sends a disk status query request to the disk expander before the S310; the disk controller sends the disk status query request to the rule at a certain time interval. The time interval may be the same as the time interval of the disk state detection request delivered by the disk expander, and may be different, for example, 1 second, 2 seconds, etc., and the value may also be set according to the current detected state and detection requirements. set.
本实施例中磁盘扩展器发起的磁盘状态检测请求可以为磁盘的可用性状态;磁盘控制器收到的状态检测结果包括磁盘可用性检测结果。该磁盘可用性检测结果可能是Good和Check Condition中的一种,此时磁盘控制器可自己分析出当为Good时,表明磁盘可用性状态为可用;为Check Condition时,表明磁盘可用性状态为不可用。该磁盘可用性检测结果也可能是由磁盘扩展器根据Good或Check Condition分析出磁盘可用或不可用信息。然后将分析出的可用或不可用状态信息给磁盘控制器。In this embodiment, the disk state detection request initiated by the disk expander may be the availability state of the disk; the state detection result received by the disk controller includes the disk availability detection result. The disk availability test result may be one of Good and Check Condition. At this time, the disk controller can analyze itself as Good, indicating that the disk availability status is available; when it is Check Condition, it indicates that the disk availability status is unavailable. The disk availability test result may also be that the disk expander analyzes the available or unavailable information of the disk according to Good or Check Condition. The analyzed available or unavailable status information is then sent to the disk controller.
本公开实施例进行磁盘状态检测时由磁盘扩展器发起,相对相关技术中由磁盘控制器发起的检测流程,更为直接快速,效率更高;然后磁盘控制器在需要时,只需从有限的磁盘扩展器上获取对应的状态检测结果即可,无需向每个 磁盘发起状态检测请求,相对相关技术中的检测方式可大量减少磁盘控制器和磁盘扩展器之间消息交互数量,使得磁盘控制器和磁盘扩展器间的连接不会长时间和大量占用,提升对磁盘的访问效率,提高磁盘整列的整体性能。When the disk state detection is performed by the disk expander in the embodiment of the present disclosure, the detection process initiated by the disk controller in the related art is more direct and faster, and the efficiency is higher; then the disk controller only needs to be limited when needed. Get the corresponding status detection result on the disk expander, no need to go to each The disk initiates a state detection request. Compared with the detection method in the related art, the number of message interactions between the disk controller and the disk expander can be greatly reduced, so that the connection between the disk controller and the disk expander is not occupied for a long time and is greatly occupied. The access efficiency of the disk improves the overall performance of the entire array of disks.
实施例二:Embodiment 2:
本实施例提供了磁盘控制系统,请参见图4所示,包磁盘扩展器1和磁盘控制器2;This embodiment provides a disk control system, as shown in Figure 4, the package disk expander 1 and the disk controller 2;
磁盘扩展器1设置为向待检测磁盘发起磁盘状态检测请求,接收待检测磁盘反馈的磁盘状态检测结果,并将磁盘状态检测结果发给磁盘控制器2;The disk expander 1 is configured to initiate a disk state detection request to the disk to be detected, receive the disk state detection result fed back by the disk to be detected, and send the disk state detection result to the disk controller 2;
磁盘控制器2设置为接收磁盘扩展器1发送的磁盘状态检测结果,根据磁盘状态检测结果获取相应磁盘的状态信息。The disk controller 2 is configured to receive the disk state detection result sent by the disk expander 1, and obtain the state information of the corresponding disk according to the disk state detection result.
作为一种示例,请参见图5所示,磁盘扩展器1包括:As an example, referring to FIG. 5, the disk expander 1 includes:
检测发起模块11,设置为向待检测磁盘发起磁盘状态检测请求;The detecting and initiating module 11 is configured to initiate a disk state detection request to the to-be-detected disk;
接收模块12,设置为接收待检测磁盘反馈的磁盘状态检测结果;The receiving module 12 is configured to receive a disk state detection result fed back by the disk to be detected;
发送模块13,设置为将所述磁盘状态检测结果发给磁盘控制器2。The sending module 13 is configured to send the disk state detection result to the disk controller 2.
检测发起模块11向待检测磁盘发起磁盘状态检测请求;规则可根据应用场景设定。例如磁盘扩展器根据预设的检测时间间隔向待检测磁盘发送磁盘状态检测请求。例如每间隔1秒或5秒等向待检测磁盘发起磁盘状态检测请求。该时间间隔的取值可根据当前检测需求以及当前检测的状态等因素考虑。The detection initiating module 11 initiates a disk state detection request to the disk to be detected; the rule may be set according to an application scenario. For example, the disk expander sends a disk state detection request to the to-be-detected disk according to a preset detection time interval. For example, a disk state detection request is initiated to the disk to be detected every 1 second or 5 seconds. The value of this time interval can be considered according to factors such as the current detection requirement and the current detection status.
可选的,所述待检测磁盘为与所述磁盘扩展器直连的至少一个磁盘。Optionally, the to-be-detected disk is at least one disk directly connected to the disk expander.
可选的,请参见图6所示,检测发起模块11包括计时子模块111和发起子模块112;Optionally, as shown in FIG. 6, the detection initiation module 11 includes a timing sub-module 111 and an initiation sub-module 112;
计时子模块111设置为对检测时间间隔进行计时;The timing sub-module 111 is configured to time the detection time interval;
发起子模块112设置为在检测时间间隔到达时,向待检测磁盘发送磁盘状 态检测请求。The initiating submodule 112 is configured to send a disk shape to the to-be-detected disk when the detection time interval arrives State detection request.
本实施例中检测发起模块11发起的磁盘状态检测请求可针对磁盘的多种状态进行检测,可以为磁盘可用性状态;此时发起的磁盘状态检测请求包括单元状态测试(TUR)请求,也即磁盘的可用性检测请求;磁盘收到该请求后即可对自身当前的可用性状态进行检测,向磁盘扩展器反馈的磁盘状态检测结果包括磁盘可用性检测结果。该磁盘可用性检测结果可能是Good和Check Condition中的一种,当为Good时,表明磁盘可用性状态为可用;为Check Condition时,表明磁盘可用性状态为不可用。发送模块13将磁盘状态检测结果发给磁盘控制器时,发送模块13可直接将收到的Good或Check Condition结果发给磁盘控制器,由磁盘控制器根据Good或Check Condition结果分析出磁盘可用或不可用;发送模块13也可根据收到的Good或Check Condition分析出磁盘为可用或不可用状态,然后将分析出的可用或不可用状态反馈给磁盘控制器。另外,本实施例中的发送模块13在将磁盘状态检测结果发送给磁盘控制器时,可选的将磁盘状态检测结果组织成信息列表的方式发送给磁盘控制器,以便于磁盘控制器分析。In this embodiment, the disk state detection request initiated by the detection initiating module 11 can detect multiple states of the disk, which can be a disk availability state; the disk state detection request initiated at this time includes a unit state test (TUR) request, that is, a disk. The availability detection request; after the disk receives the request, it can detect its current availability status, and the disk status detection result fed back to the disk expander includes the disk availability detection result. The disk availability test result may be one of Good and Check Condition. When Good, the disk availability status is available; when Check Condition, the disk availability status is unavailable. When the sending module 13 sends the disk state detection result to the disk controller, the sending module 13 can directly send the received Good or Check Condition result to the disk controller, and the disk controller analyzes the disk available according to the Good or Check Condition result. Not available; the sending module 13 can also analyze the disk as available or unavailable according to the received Good or Check Condition, and then feed back the analyzed available or unavailable state to the disk controller. In addition, the sending module 13 in this embodiment sends the disk state detection result to the disk controller in an optional manner to send the disk state detection result to the disk controller for the disk controller to analyze.
为了提升检测效率,本实施例中的待检测磁盘可设为与磁盘扩展器直连的至少一个磁盘。本实施例中的检测发起模块11可选的向与磁盘扩展器直连的磁盘发起磁盘状态检测请求;且检测发起模块11可选择向与磁盘扩展器直连的一个或多个磁盘发起磁盘状态检测请求。In order to improve the detection efficiency, the to-be-detected disk in this embodiment may be set to be at least one disk directly connected to the disk expander. The detection initiating module 11 in this embodiment may optionally initiate a disk state detection request to a disk directly connected to the disk expander; and the detection initiating module 11 may select to initiate a disk state to one or more disks directly connected to the disk expander. Detect the request.
本实施例中,发送模块13将磁盘状态检测结果发给磁盘控制器2时,发送模块13可应磁盘控制器的要求被动发送,也可根据相关规则主动发送。应磁盘控制器的要求被动发送时,接收模块12接收到至少一个待检测磁盘反馈的磁盘状态检测结果后先进行存储,可以存储在本地数据区中,该数据区可以为存储 磁盘状态检测结果而设置的专用数据区,也可以是与存储其他数据共用的数据区;然后发送模块13在接收到磁盘控制器下发的磁盘状态查询请求后,将存储的相应的磁盘状态检测结果发给磁盘控制器。In this embodiment, when the sending module 13 sends the disk state detection result to the disk controller 2, the sending module 13 may be passively sent according to the requirements of the disk controller, or may be actively sent according to relevant rules. When the passive controller sends the request to the disk controller, the receiving module 12 stores the disk state detection result of the at least one disk to be detected, and then stores the data in the local data area, where the data area can be stored. The dedicated data area set by the disk state detection result may also be a data area shared with other data; then the sending module 13 detects the corresponding disk state after receiving the disk state query request sent by the disk controller. The result is sent to the disk controller.
发送模块13将磁盘状态检测结果主动发送磁盘控制器时,发送模块13可在接收模块12接收到待检测磁盘反馈的磁盘状态检测结果后,直接将磁盘反馈的磁盘状态检测结果发给磁盘控制器,也可在接收模块12接收到磁盘状态检测结果并进行存储后再发给磁盘控制器。When the sending module 13 actively sends the disk state detection result to the disk controller, the sending module 13 can directly send the disk state detection result fed back by the disk to the disk controller after receiving the disk state detection result of the disk feedback to be detected. Alternatively, the receiving module 12 may receive the disk state detection result and store it before sending it to the disk controller.
请参见图7所示,磁盘控制器2包括状态获取模块22和状态分析模块23;Referring to FIG. 7, the disk controller 2 includes a state obtaining module 22 and a state analyzing module 23;
状态获取模块22设置为接收本公开实施例提供的任一磁盘状态检测结果,可选的为图5所示磁盘扩展器1发送的磁盘状态检测结果;The state obtaining module 22 is configured to receive any disk state detection result provided by the embodiment of the present disclosure, optionally, the disk state detection result sent by the disk expander 1 shown in FIG. 5;
状态分析模块23设置为对磁盘状态检测结果进行分析得到相应磁盘的状态信息。The state analysis module 23 is configured to analyze the disk state detection result to obtain state information of the corresponding disk.
本实施例中的磁盘控制器2从磁盘扩展器1获取磁盘状态检测结果时,磁盘控制器2可主动向磁盘扩展器1发起请求获取,也可以直接接收磁盘扩展器1直接反馈的磁盘状态检测结果。当主动向磁盘扩展器2发起请求获取时,可选的,请参见图8所示,磁盘控制器2还包括请求模块21,设置为向磁盘扩展器下发磁盘状态查询请求;请求模块21下发磁盘状态查询请求的规则可以是按一定的时间间隔下发,且该时间间隔可以与磁盘扩展器1下发磁盘状态检测请求的时间间隔相同,自然也可不同,例如取1秒、2秒等,取值也可根据当前检测的状态和检测需求设定。When the disk controller 2 in this embodiment obtains the disk state detection result from the disk expander 1, the disk controller 2 can initiate a request acquisition to the disk expander 1 or directly receive the disk state detection directly fed back by the disk expander 1. result. When the request is obtained from the disk expander 2, the disk controller 2 further includes a requesting module 21, which is configured to send a disk status query request to the disk expander. The rule of the disk status query request may be sent at a certain interval, and the time interval may be the same as the time interval for the disk expander 1 to deliver the disk state detection request, and may be different, for example, 1 second, 2 seconds, etc. The value can also be set according to the current detection status and detection requirements.
如上分析,本实施例中磁盘扩展器1发起的磁盘状态检测请求可以为磁盘的可用性状态;磁盘控制器2收到的状态检测结果包括磁盘可用性检测结果。该磁盘可用性检测结果可能是Good和Check Condition中的一种,此时磁盘控 制器2的状态分析模块23可自己分析出当为Good时,表明磁盘可用性状态为可用;为Check Condition时,表明磁盘可用性状态为不可用。该磁盘可用性检测结果也可能是由磁盘扩展器1根据Good或Check Condition分析出磁盘可用或不可用信息。状态分析模块23从磁盘可用性检测结果直接获取可用或不可用信息。As described above, the disk state detection request initiated by the disk expander 1 in this embodiment may be the availability state of the disk; the state detection result received by the disk controller 2 includes the disk availability detection result. The disk availability test result may be one of Good and Check Condition, at this time disk control The state analysis module 23 of the controller 2 can analyze by itself that when the value is Good, it indicates that the disk availability state is available; when it is Check Condition, it indicates that the disk availability state is unavailable. The disk availability test result may also be that disk expander 1 analyzes the available or unavailable information of the disk according to Good or Check Condition. The status analysis module 23 directly obtains available or unavailable information from the disk availability test results.
本公开实施例进行磁盘状态检测时由磁盘扩展器发起,相对相关技术中由磁盘控制器发起的检测流程,更为直接快速,效率更高;然后磁盘控制器在需要时,只需从有限的磁盘扩展器上获取对应的状态检测结果即可,无需向每个磁盘发起状态检测请求,相对相关技术中的检测方式可大量减少磁盘控制器和磁盘扩展器之间消息交互数量,使得磁盘控制器和磁盘扩展器间的连接不会长时间和大量占用,提升对磁盘的访问效率,提高磁盘整列的整体性能。When the disk state detection is performed by the disk expander in the embodiment of the present disclosure, the detection process initiated by the disk controller in the related art is more direct and faster, and the efficiency is higher; then the disk controller only needs to be limited when needed. Obtaining the corresponding state detection result on the disk expander does not need to initiate a state detection request to each disk. Compared with the detection method in the related art, the number of message interactions between the disk controller and the disk expander can be greatly reduced, so that the disk controller The connection with the disk expander will not be used for a long time and a large amount, which improves the access efficiency of the disk and improves the overall performance of the disk array.
实施例三:Embodiment 3:
为了更好的理解本公开,下面结合一个应用场景对本公开做示例说明。For a better understanding of the present disclosure, the present disclosure is exemplified below in conjunction with an application scenario.
请参见图9所示,该图所示为磁盘扩展器对单个磁盘的可用性状态进行检测的过程,包括:See Figure 9, which shows the process by which the disk expander detects the availability status of a single disk, including:
在S901中,磁盘扩展器向单个磁盘发送TUR命令;In S901, the disk expander sends a TUR command to a single disk;
在S902中,磁盘扩展器接收磁盘根据TUR命令的返回结果;In S902, the disk expander receives the return result of the disk according to the TUR command;
在S903中,返回结果是否是Good,如是,转至S905;当返回结果不是Good,转至S904;In S903, whether the result is Good, if yes, go to S905; when the returned result is not Good, go to S904;
在S904中,判定磁盘状态为不可用;In S904, it is determined that the disk status is unavailable;
在S905中,判定磁盘状态为可用;In S905, it is determined that the disk status is available;
在S906中,将磁盘的可用状态写入磁盘可用性检测代理模块的数据区中;In S906, the available state of the disk is written into the data area of the disk availability detection proxy module;
在S907中,延时1秒,转至S901,向磁盘发起TUR命令,重复S901~S907。 In S907, the delay is 1 second, and the process goes to S901, and a TUR command is issued to the disk, and S901 to S907 are repeated.
请参见图10所示,该图所示是磁盘控制器处理磁盘可用性检测结果流程图,包括:See Figure 10, which shows a flowchart of the disk controller processing disk availability test results, including:
在S1001中,磁盘控制器(作为SCSI Initiator)向磁盘扩展器发起查询磁盘可用性状态请求;In S1001, the disk controller (as a SCSI Initiator) initiates a query for a disk availability status request to the disk expander;
在S1002中,磁盘控制器接收磁盘扩展器返回的磁盘可用性信息;In S1002, the disk controller receives the disk availability information returned by the disk expander;
在S1003中,磁盘控制器判断当前需要处理的磁盘可用性信息的磁盘个数,如果为0,转至S1006,不为0则转至S1004;In S1003, the disk controller determines the number of disks that need to be processed for disk availability information. If it is 0, go to S1006, if not 0, go to S1004;
在S1004中,处理单个磁盘的磁盘可用性信息;In S1004, processing disk availability information of a single disk;
在S1005中,将需要处理磁盘可用性信息的磁盘数减一,转至S1003;In S1005, the number of disks that need to process disk availability information is reduced by one, and the process proceeds to S1003;
在S1006中,延时1秒,转至S1001,再次向磁盘扩展器发起查询磁盘可用性状态。In S1006, the delay is 1 second, and the process goes to S1001, and the disk expander status is inquired again to the disk expander.
本公开实施例在磁盘扩展器上增加的检测机制能够将磁盘控制器和磁盘扩展器间的TUR数量大幅减少,避免了由于磁盘控制器发送TUR给磁盘而长时间占用磁盘控制器和磁盘扩展器间SAS链路的情况,提高了SAS网络的使用效率,提升了磁盘阵列的性能。The detection mechanism added to the disk expander in the embodiment of the present disclosure can greatly reduce the number of TURs between the disk controller and the disk expander, and avoids occupying the disk controller and the disk expander for a long time because the disk controller sends the TUR to the disk. The situation of the SAS link improves the efficiency of the SAS network and improves the performance of the disk array.
实施例四Embodiment 4
本公开实施例四还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的磁盘扩展器侧的磁盘状态检测方法。Embodiment 4 of the present disclosure further provides a non-transitory computer readable storage medium storing computer executable instructions configured to perform disk state detection on a disk expander side in any of the above embodiments. method.
实施例五Embodiment 5
本公开实施例五还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的磁盘控制器侧的磁盘状态获取方法。 Embodiment 5 of the present disclosure further provides a non-transitory computer readable storage medium storing computer executable instructions configured to perform disk state acquisition on a disk controller side in any of the above embodiments. method.
实施例六Embodiment 6
本公开实施例六还提供了一种磁盘扩展器的结构示意图。参见图11,该磁盘扩展器包括:Embodiment 6 of the present disclosure also provides a schematic structural diagram of a disk expander. Referring to Figure 11, the disk expander includes:
至少一个处理器(processor)1110,图11中以一个处理器1110为例;和存储器(memory)1120,还可以包括通信接口(Communications Interface)1130和总线1140。其中,处理器1110、存储器1120、通信接口1130可以通过总线1140完成相互间的通信。通信接口1130可以用于信息传输。处理器1110可以调用存储器1120中的逻辑指令,以执行上述实施例的磁盘扩展器侧的磁盘状态检测方法。At least one processor 1110, which is exemplified by a processor 1110 in FIG. 11; and a memory 1120, may further include a communication interface 1130 and a bus 1140. The processor 1110, the memory 1120, and the communication interface 1130 can complete communication with each other through the bus 1140. Communication interface 1130 can be used for information transmission. The processor 1110 can call the logic instructions in the memory 1120 to perform the disk state detecting method on the disk expander side of the above embodiment.
此外,上述的存储器1120中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the logic instructions in the memory 1120 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
存储器1120作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本公开实施例中执行磁盘扩展器侧的磁盘状态检测方法对应的程序指令/模块(如图5所示的检测发起模块11、接收模块12和发送模块13)。处理器1110通过运行存储在存储器1120中的软件程序、指令以及模块,从而执行功能应用以及数据处理,即实现上述方法实施例中的磁盘扩展器侧的磁盘状态检测方法。The memory 1120 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, and a module, such as a program instruction/module corresponding to the disk state detection method on the disk expander side in the embodiment of the present disclosure (FIG. 5). The detection initiation module 11, the receiving module 12 and the transmitting module 13) are shown. The processor 1110 executes the function application and the data processing by executing the software program, the instruction, and the module stored in the memory 1120, that is, the disk state detection method on the disk expander side in the above method embodiment.
存储器1120可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器1120可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 1120 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 1120 may include a high speed random access memory, and may also include a nonvolatile memory.
本公开实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例的所述方法的 全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) Apparatus, etc.) performing the method of the embodiments of the present disclosure All or part of the steps. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
实施例七Example 7
本公开实施例七还提供了一种磁盘控制器的结构示意图。参见图12,该磁盘控制器包括:Embodiment 7 of the present disclosure also provides a schematic structural diagram of a disk controller. Referring to Figure 12, the disk controller includes:
至少一个处理器(processor)1210,图12中以一个处理器1210为例;和存储器(memory)1220,还可以包括通信接口(Communications Interface)1230和总线1240。其中,处理器1210、存储器1220、通信接口1230可以通过总线1240完成相互间的通信。通信接口1230可以用于信息传输。处理器1210可以调用存储器1220中的逻辑指令,以执行上述实施例的磁盘控制器侧的磁盘状态获取方法。At least one processor 1210 is illustrated by one processor 1210 in FIG. 12; and a memory 1220 may further include a communication interface 1230 and a bus 1240. The processor 1210, the memory 1220, and the communication interface 1230 can complete communication with each other through the bus 1240. Communication interface 1230 can be used for information transfer. The processor 1210 can call the logic instructions in the memory 1220 to perform the disk state acquisition method on the disk controller side of the above embodiment.
此外,上述的存储器1220中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the logic instructions in the memory 1220 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
存储器1220作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本公开实施例中执行磁盘控制器侧的磁盘状态获取方法对应的程序指令/模块(如图7所示的状态获取模块22和状态分析模块23)。处理器1210通过运行存储在存储器1220中的软件程序、指令以及模块,从而执行功能应用以及数据处理,即实现上述方法实施例中的磁盘控制器侧的磁盘状态获取方法。The memory 1220 is used as a computer readable storage medium, and can be used to store a software program, a computer executable program, and a module, such as a program instruction/module corresponding to a disk state acquisition method on the disk controller side in the embodiment of the present disclosure (see FIG. 7). The state acquisition module 22 and the state analysis module 23) are shown. The processor 1210 performs the function application and the data processing by executing the software program, the instruction and the module stored in the memory 1220, that is, the disk state acquisition method on the disk controller side in the above method embodiment.
存储器1220可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使 用所创建的数据等。此外,存储器1220可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 1220 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; and the storage data area may be stored according to the terminal device Use the data created, etc. Further, the memory 1220 may include a high speed random access memory, and may also include a nonvolatile memory.
本公开实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例的所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method of the embodiments of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
以上内容是结合可选实施方式对本公开所作的详细说明,不能认定本公开的可选实施例只局限于这些说明。The above is a detailed description of the present disclosure in connection with the alternative embodiments, and it is not considered that the alternative embodiments of the present disclosure are limited to the description.
工业实用性Industrial applicability
本公开实施例提供一种磁盘状态检测方法、磁盘扩展器及磁盘控制系统,在进行磁盘状态检测时由与磁盘直接连接的磁盘扩展器发起,相对相关技术中由磁盘控制器发起的检测流程,更为直接快速,效率更高;然后磁盘控制器只需从有限的磁盘扩展器上获取对应的状态检测结果即可,无需向每个磁盘发起状态检测请求,因此可大量减少磁盘控制器和磁盘扩展器之间消息交互数量,使得磁盘控制器和磁盘扩展器间的链路不会长时间和大量占用,因此可提升对磁盘的访问效率,提高磁盘整列的整体性能。 Embodiments of the present disclosure provide a disk state detection method, a disk expander, and a disk control system, which are initiated by a disk expander directly connected to a disk during disk state detection, and a detection process initiated by a disk controller in the related art. More direct and faster, more efficient; then the disk controller only needs to obtain the corresponding status detection result from the limited disk expander, no need to initiate a status detection request to each disk, so the disk controller and disk can be greatly reduced The number of message interactions between the expanders makes the link between the disk controller and the disk expander not long and heavily occupied, thereby improving the access efficiency of the disk and improving the overall performance of the disk array.

Claims (11)

  1. 一种磁盘状态检测方法,包括:A disk state detection method includes:
    磁盘扩展器向待检测磁盘发起磁盘状态检测请求;The disk expander initiates a disk state detection request to the to-be-detected disk;
    所述磁盘扩展器接收待检测磁盘反馈的磁盘状态检测结果;以及,The disk expander receives a disk state detection result of the disk feedback to be detected; and,
    所述磁盘扩展器将所述磁盘状态检测结果发给磁盘控制器。The disk expander sends the disk state detection result to the disk controller.
  2. 如权利要求1所述的磁盘状态检测方法,其中,所述待检测磁盘为与所述磁盘扩展器直连的至少一个磁盘。The disk state detecting method according to claim 1, wherein the disk to be detected is at least one disk directly connected to the disk expander.
  3. 如权利要求1或2所述的磁盘状态检测方法,其中,磁盘扩展器向待检测磁盘发起磁盘状态检测请求包括:The disk state detecting method according to claim 1 or 2, wherein the disk expander initiating a disk state detecting request to the disk to be detected includes:
    磁盘扩展器根据预设的检测时间间隔向所述待检测磁盘发送磁盘状态检测请求。The disk expander sends a disk state detection request to the to-be-detected disk according to a preset detection time interval.
  4. 如权利要求1-3任一项所述的磁盘状态检测方法,其中,所述磁盘状态检测请求包括单元状态测试请求;以及,所述磁盘状态检测结果包括磁盘可用性检测结果。The disk state detecting method according to any one of claims 1 to 3, wherein the disk state detecting request includes a cell state test request; and the disk state detecting result includes a disk usability detecting result.
  5. 如权利要求1-3任一项所述的磁盘状态检测方法,其中,所述磁盘扩展器将所述磁盘状态检测结果发给磁盘控制器包括:The disk state detecting method according to any one of claims 1 to 3, wherein the disk expander sends the disk state detection result to the disk controller, including:
    所述磁盘扩展器接收到待检测磁盘反馈的磁盘状态检测结果后进行存储,并在接收到所述磁盘控制器下发的磁盘状态查询请求后,将所述磁盘状态检测结果发给所述磁盘控制器;Receiving, after receiving the disk state detection result sent by the disk controller, the disk expander sends the disk state detection result to the disk after receiving the disk state query result sent by the disk controller. Controller
    或所述磁盘扩展器接收到待检测磁盘反馈的磁盘状态检测结果后,将所述磁盘状态检测结果主动发给所述磁盘控制器。After the disk expander receives the disk state detection result of the disk feedback to be detected, the disk state detection result is actively sent to the disk controller.
  6. 一种磁盘扩展器,包括:A disk expander that includes:
    检测发起模块,设置为向待检测磁盘发起磁盘状态检测请求;The detection initiation module is configured to initiate a disk state detection request to the to-be-detected disk;
    接收模块,设置为接收待检测磁盘反馈的磁盘状态检测结果;以及,a receiving module, configured to receive a disk state detection result of the disk feedback to be detected; and
    发送模块,设置为将所述磁盘状态检测结果发给磁盘控制器。The sending module is configured to send the disk state detection result to the disk controller.
  7. 如权利要求6所述的磁盘扩展器,其中,所述待检测磁盘为与所述磁盘扩展器直连的至少一个磁盘。The disk expander of claim 6, wherein the disk to be detected is at least one disk directly connected to the disk expander.
  8. 如权利要求6或7所述的磁盘扩展器,其中,所述检测发起模块包括计时子模块和发起子模块;The disk expander according to claim 6 or 7, wherein the detection initiation module comprises a timing sub-module and an initiation sub-module;
    其中,所述计时子模块设置为对检测时间间隔进行计时;以及,The timing submodule is configured to time the detection time interval; and,
    所述发起子模块设置为在所述检测时间间隔到达时,向所述待检测磁盘发送磁盘状态检测请求。 The initiator module is configured to send a disk state detection request to the to-be-detected disk when the detection time interval arrives.
  9. 如权利要求6-8任一项所述的磁盘扩展器,其中,所述磁盘状态检测请求包括单元状态测试请求;以及,所述磁盘状态检测结果包括磁盘可用性检测结果。The disk expander according to any one of claims 6 to 8, wherein the disk state detection request includes a unit state test request; and the disk state detection result includes a disk usability detection result.
  10. 一种磁盘控制系统,包括如权利要求6-9任一项所述的磁盘扩展器和磁盘控制器;A disk control system comprising the disk expander and disk controller of any one of claims 6-9;
    其中,所述磁盘扩展器设置为向待检测磁盘发起磁盘状态检测请求,接收待检测磁盘反馈的磁盘状态检测结果,并将所述磁盘状态检测结果发给磁盘控制器;以及,The disk expander is configured to initiate a disk state detection request to the to-be-detected disk, receive a disk state detection result fed back by the disk to be detected, and send the disk state detection result to the disk controller; and
    所述磁盘控制器设置为接收所述磁盘扩展器发送的磁盘状态检测结果,根据所述磁盘状态检测结果获取相应磁盘的状态信息。The disk controller is configured to receive a disk state detection result sent by the disk expander, and obtain state information of the corresponding disk according to the disk state detection result.
  11. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-5中任一项的方法。 A non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of claims 1-5.
PCT/CN2016/101390 2015-10-19 2016-09-30 Disk state detection method, disk expander, and disk control system WO2017067382A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510683007.2 2015-10-19
CN201510683007.2A CN106598476A (en) 2015-10-19 2015-10-19 Disk state detection and acquisition method, controller, expander, and control system

Publications (1)

Publication Number Publication Date
WO2017067382A1 true WO2017067382A1 (en) 2017-04-27

Family

ID=58554828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/101390 WO2017067382A1 (en) 2015-10-19 2016-09-30 Disk state detection method, disk expander, and disk control system

Country Status (2)

Country Link
CN (1) CN106598476A (en)
WO (1) WO2017067382A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936586A (en) * 2017-12-15 2019-06-25 腾讯科技(深圳)有限公司 Communication processing method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291640B (en) * 2017-06-30 2021-01-12 苏州浪潮智能科技有限公司 Data transmission method and device based on SAS technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070061632A1 (en) * 2005-09-13 2007-03-15 Lsi Logic Corporation Methods and structure for verifying domain functionality
CN102081572A (en) * 2009-11-30 2011-06-01 英业达股份有限公司 Hard disk speed indicating system
CN104166611A (en) * 2013-05-17 2014-11-26 鸿富锦精密工业(深圳)有限公司 Hard disk temperature information acquisition device and method
CN104516681A (en) * 2013-09-26 2015-04-15 纬创资通股份有限公司 Data storage system and control method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070061632A1 (en) * 2005-09-13 2007-03-15 Lsi Logic Corporation Methods and structure for verifying domain functionality
CN102081572A (en) * 2009-11-30 2011-06-01 英业达股份有限公司 Hard disk speed indicating system
CN104166611A (en) * 2013-05-17 2014-11-26 鸿富锦精密工业(深圳)有限公司 Hard disk temperature information acquisition device and method
CN104516681A (en) * 2013-09-26 2015-04-15 纬创资通股份有限公司 Data storage system and control method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936586A (en) * 2017-12-15 2019-06-25 腾讯科技(深圳)有限公司 Communication processing method and device

Also Published As

Publication number Publication date
CN106598476A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
CN110311831B (en) Container cloud-based system resource monitoring method and related equipment
EP3029912B1 (en) Remote accessing method and corresponding system
CN110267314B (en) Method and device for switching network slices
CN108965383B (en) File synchronization method and device, computer equipment and storage medium
CN104756080A (en) Augmenting capabilities of a host device
KR101719500B1 (en) Acceleration based on cached flows
CN113505272B (en) Control method and device based on behavior habit, electronic equipment and storage medium
US20140310434A1 (en) Enlightened Storage Target
CN110808877A (en) Statistical analysis method and device based on interface response duration and computer equipment
CN111341315A (en) Voice control method, device, computer equipment and storage medium
CN101388039B (en) Response message executing method and device
CN107861691B (en) Load balancing method and device of multi-control storage system
WO2017067382A1 (en) Disk state detection method, disk expander, and disk control system
CN114996134A (en) Containerized deployment method, electronic equipment and storage medium
CN110955390A (en) Data processing method and device and electronic equipment
US10853892B2 (en) Social networking relationships processing method, system, and storage medium
CN111125168B (en) Data processing method and device, electronic equipment and storage medium
CN113791792A (en) Application calling information acquisition method and device and storage medium
CN103500108A (en) System memory access method, node processor and multi-processor system
CN117407159A (en) Memory space management method and device, equipment and storage medium
KR102246581B1 (en) Method for uploading file via cloud computing environment, and proxy server for executing the same
CN113840313B (en) Network mode control method and device of mobile terminal and computer equipment
CN112764897B (en) Task request processing method, device and system and computer readable storage medium
CN105519055A (en) Dynamic equilibrium method and apparatus for QoS of I/O channel
CN114501046A (en) Hotspot mining method and system based on electronic commerce

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16856815

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16856815

Country of ref document: EP

Kind code of ref document: A1