Disk extension cabinet management method and device, computer equipment and storage medium

By implementing soft restart of the extender and alternate port switching in the JBOD system, the disk loss problem caused by SAS extender failure is solved, and the system reliability and storage service continuity is improved.

CN119322705APending Publication Date: 2025-01-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411463360.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

When there is a problem with the SAS extender in the JBOD system, all disks will be lost, affecting the reliability of the disk expansion cabinet.

Method used

By implementing soft restart, alternate port switching and fault light management between the host and the extender, ensuring that when the extender fails, the host can relink and take over the hard disk mounted on the failed extender through another extender, improving the system reliability.

Benefits of technology

It realizes automatic switching and failure recovery without data loss when the extender fails, improving the reliability of the JBOD system and the continuity of storage services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322705A_ABST
    Figure CN119322705A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a disk extension cabinet management method and device, computer equipment and a storage medium, the method comprises the following steps: if extension exception information is received, determining an exceptional extension according to the extension exception information, and sending a soft restart command to the exceptional extension; acquiring first expander state information from the abnormal expander to judge whether the abnormal expander is successfully subjected to soft restart or not; if the soft restart is not successful, closing the abnormal expander, and sending expander fault information to the host; if a standby port opening command sent by the host is received, opening a standby port linked with the hard disk mounted under the abnormal expander, and identifying the hard disk mounted under the abnormal expander through the standby port; and indicating the host to re-link and identify the hard disk mounted under the abnormal expander through the first expander. The problem that when the SAS expander goes wrong, all the disks mounted under the SAS expander are lost, and the reliability of the disk expansion cabinet is affected is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a disk expansion cabinet management method, device, computer equipment and storage medium. Background Art

[0002] JBOD (Just bunch of Disk) logically connects multiple physical disks one by one in series to provide a large logical disk. The storage capacity of JBOD is equal to the sum of the capacities of all disks that make up JBOD, and data can be stored in JBOD. SAS (Serial Attached SCSI) Expander chip is a key component in JBOD, which enables massive storage infrastructure for data-intensive applications. Servers, controller cards, and external storage devices are connected to multiple physical disks in JBOD through SAS Expander.

[0003] When JBOD contains many disks, two or more SAS expanders will be used for disk expansion. However, in addition to the disk expansion function, JBOD does not have a high availability mechanism between SAS expanders. When a SAS expander fails, all disks mounted under the SAS expander will be lost, affecting the reliability of JBOD.

[0004] Therefore, the related art has the problem that when a problem occurs in the SAS expander, all disks mounted under the SAS expander will be lost, affecting the reliability of the disk expansion cabinet. Summary of the invention

[0005] In view of this, the present invention provides a disk expansion cabinet management method, device, computer equipment and storage medium to solve the problem that when a SAS expander has a problem, all disks mounted under the SAS expander will be lost, affecting the reliability of the disk expansion cabinet.

[0006] In a first aspect, the present invention provides a disk expansion cabinet management method, which is applied to a first expander and includes:

[0007] In the case of receiving the expander abnormality information sent by the host, determining the abnormal expander according to the expander abnormality information, and sending a soft restart command to the abnormal expander;

[0008] Sending a first status acquisition command to the abnormal expander, acquiring first expander status information from the abnormal expander, and judging whether the abnormal expander is soft-restarted successfully according to the first expander status information;

[0009] If the soft restart is not successful, a power supply shutdown command is sent to the abnormal expander to shut down the abnormal expander, and expander fault information is sent to the host;

[0010] In the case of receiving a command to open a standby port sent by the host, opening a standby port linked to the hard disk mounted under the abnormal expander through a first preset command, and identifying the hard disk mounted under the abnormal expander through the standby port, wherein the command to open the standby port is generated by the host after receiving the expander failure information;

[0011] Sending a standby port opening success message to the host, wherein the standby port opening success message is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the first expander.

[0012] The disk expansion cabinet management method provided in this embodiment is that after the first expander receives the expander abnormality information sent by the host, it determines the abnormal expander and repairs the abnormal expander by soft restart. If the abnormal expander cannot be repaired, it notifies the host and opens the backup link according to the host's command to open the backup port and identifies the hard disk mounted under the abnormal expander through the backup port, so that the host can relink and identify the hard disk mounted under the abnormal expander through the first expander. When one expander fails, another expander is switched to work and take over the hard disk mounted under the failed expander, thereby improving the reliability of JBOD. It solves the problem that when a SAS expander has a problem, all disks mounted under the SAS expander will be lost, affecting the reliability of the disk expansion cabinet.

[0013] In some optional implementations, after sending the backup port opening success information to the host, the method further includes:

[0014] Detecting whether a second expander is inserted, wherein the second expander is used to replace the abnormal expander;

[0015] If the second expander has been inserted, sending a first status acquisition command to the second expander, receiving second expander status information from the second expander, and determining whether the second expander is in a normal state according to the second expander status information;

[0016] If the second expander is in a normal state, the fault light of the abnormal expander is turned off through the second preset command, and abnormal expander repair success information is sent to the host, wherein the fault light is turned on through the third preset command after the first expander sends a power off command to the abnormal expander, and the abnormal expander repair success information is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the second expander;

[0017] When receiving a command to close the standby port sent by the host, the standby port is closed and a soft restart command is sent to the second expander, wherein the soft restart command is used to instruct the second expander to soft restart and restore the link with the hard disk mounted under the abnormal expander. The command to close the standby port is generated by the host after receiving the information that the abnormal expander has been repaired successfully.

[0018] In this embodiment, after replacing the abnormal expander with the second expander, the first expander performs a status detection on the second expander. If the second expander is in normal status, the first expander turns off the fault light of the abnormal expander, turns off the standby port, releases the hard disk mounted under the abnormal expander that has been taken over, and mounts it by the second expander, and notifies the host, instructing the host to reconnect and identify the hard disk mounted under the abnormal expander through the second expander. Through the above process, the abnormal expander with a hard fault can be replaced, and during the replacement process, the host can identify the hard disk mounted under the abnormal expander through the first expander, and can continue to provide storage services, thereby improving the reliability of JBOD.

[0019] In some optional implementations, after determining whether the abnormal expander is soft-restarted successfully according to the first expander status information, the method further includes:

[0020] Determine whether a soft restart success message sent by the abnormal extender is received;

[0021] If the soft restart is determined to be successful according to the first expander status information, or if the soft restart success information is received, abnormal expander status normal information is sent to the host, wherein the abnormal expander status normal information is used to instruct the host to reconnect the abnormal expander.

[0022] In this embodiment, after the host detects the abnormal expander, it instructs the first expander to repair the abnormal expander by soft restart. If the abnormal expander is successfully repaired, the first expander notifies the host and instructs the host to reconnect to the abnormal expander and continue to use the abnormal expander. The above method repairs the abnormal expander in time without interrupting the storage service of the host, thereby improving the reliability of the JBOD.

[0023] In a second aspect, the present invention provides a disk expansion cabinet management method, which is applied to a host and includes:

[0024] Sending a second status acquisition command to each expander, receiving third expander status information from the expander, judging whether there is an abnormal expander according to the third expander status information, and if so, generating expander abnormal information corresponding to the abnormal expander, and sending the expander abnormal information to the first expander, wherein the expander abnormal information is used to instruct the first expander to soft-restart the abnormal expander;

[0025] In the case of receiving the expander failure information sent by the first expander, generating an alarm message and sending an open standby port command to the first expander, wherein the expander failure information is generated by the first expander when the soft restart of the abnormal expander fails, and the open standby port command is used to instruct the first expander to open a standby port linked to the hard disk mounted under the abnormal expander through a preset command;

[0026] When receiving the backup port opening success information sent by the first expander, the hard disk mounted under the abnormal expander is relinked and identified through the first expander, wherein the backup port opening success information is generated after the first expander identifies the hard disk mounted under the abnormal expander through the backup port.

[0027] The disk expansion cabinet management method provided in this embodiment is that after the host detects an abnormal expander, it instructs the first expander to repair the abnormal expander by soft restart. If the abnormal expander cannot be repaired, the host instructs the first expander to open a backup link and identify the hard disk mounted under the abnormal expander through the backup port, so that the host can relink and identify the hard disk mounted under the abnormal expander through the first expander. When one expander fails, another expander is switched to work and take over the hard disk mounted under the failed expander, thereby improving the reliability of the JBOD. It solves the problem that when a SAS expander has a problem, all disks mounted under the SAS expander will be lost, affecting the reliability of the disk expansion cabinet.

[0028] In some optional implementations, after relinking and identifying the hard disk mounted under the abnormal expander through the first expander, the method further includes:

[0029] In the case of receiving the abnormal expander repair success information sent by the first expander, sending a close standby port command to the first expander, wherein the close standby port command is used to instruct the first expander to close the standby port;

[0030] The hard disk mounted under the abnormal expander is relinked and identified through the second expander, and fault repair information is generated, wherein the second expander is used to replace the abnormal expander.

[0031] In this embodiment, the first expander performs a status check on the second expander. If the second expander is in normal status, the host relinks and identifies the hard disk mounted under the abnormal expander through the second expander, thereby replacing the abnormal expander that has a hard failure. During the replacement process, the host can identify the hard disk mounted under the abnormal expander through the first expander and can continue to provide storage services, thereby improving the reliability of JBOD.

[0032] In some optional embodiments, the method further comprises:

[0033] Relinking the abnormal expander when receiving the normal state information of the abnormal expander sent by the first expander;

[0034] Identify the hard disk mounted under the abnormal expander.

[0035] In this embodiment, if the abnormal expander is successfully repaired, the first expander notifies the host and instructs the host to reconnect to the abnormal expander and continue to use the abnormal expander. The above method repairs the abnormal expander in time without interrupting the storage service of the host, thereby improving the reliability of the JBOD.

[0036] In some optional implementations, receiving second expander state information from the expander includes:

[0037] receiving a response field corresponding to the second state acquisition command from the extender;

[0038] The second expander status information is obtained by parsing the response field through the preset parsing page.

[0039] In a third aspect, the present invention provides a disk expansion cabinet management device, which is deployed on a first expander and includes:

[0040] A determination module, configured to determine an abnormal expander according to the expander abnormal information when receiving the expander abnormal information sent by the host, and send a soft restart command to the abnormal expander;

[0041] A judgment module, used for sending a first status acquisition command to the abnormal expander, acquiring first expander status information from the abnormal expander, and judging whether the abnormal expander is soft-restarted successfully according to the first expander status information;

[0042] A first sending module is used for sending a power supply shutdown command to the abnormal expander to shut down the abnormal expander if the soft restart is not successful, and sending expander fault information to the host;

[0043] an opening module, configured to, when receiving a command to open a standby port sent by the host, open a standby port linked to the hard disk mounted under the abnormal expander through a first preset command, and identify the hard disk mounted under the abnormal expander through the standby port, wherein the command to open the standby port is generated by the host after receiving the expander failure information;

[0044] The second sending module is used to send a standby port opening success message to the host, wherein the standby port opening success message is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the first expander.

[0045] In a fourth aspect, the present invention provides a disk expansion cabinet management device, which is deployed on a host and includes:

[0046] A third sending module is used to send a second status acquisition command to each expander, receive third expander status information from the expander, determine whether there is an abnormal expander according to the third expander status information, and if so, generate expander abnormal information corresponding to the abnormal expander, and send the expander abnormal information to the first expander, wherein the expander abnormal information is used to instruct the first expander to soft restart the abnormal expander;

[0047] a fourth sending module, configured to generate an alarm message and send an open standby port command to the first expander when receiving expander failure information sent by the first expander, wherein the expander failure information is generated by the first expander when the soft restart of the abnormal expander fails, and the open standby port command is used to instruct the first expander to open a standby port linked to the hard disk mounted under the abnormal expander through a preset command;

[0048] The identification module is used to relink and identify the hard disk mounted under the abnormal expander through the first expander when receiving the backup port opening success information sent by the first expander, wherein the backup port opening success information is generated after the first expander identifies the hard disk mounted under the abnormal expander through the backup port.

[0049] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the disk expansion cabinet management method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions, or executes the disk expansion cabinet management method of the above-mentioned second aspect or any corresponding embodiment thereof.

[0050] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the disk expansion cabinet management method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the disk expansion cabinet management method of the above-mentioned second aspect or any corresponding embodiment thereof.

[0051] In the seventh aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the disk expansion cabinet management method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the disk expansion cabinet management method of the above-mentioned second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 is a physical connection diagram of a host and a disk expansion cabinet according to an embodiment of the present invention;

[0054] Figure 2 is a flow chart of a disk expansion cabinet management method applied to a first expander according to an embodiment of the present invention;

[0055] Figure 3 is an overall block diagram of a disk expansion cabinet management system according to an embodiment of the present invention;

[0056] Figure 4 is a flow chart of repairing an expander hard failure according to an embodiment of the present invention;

[0057] Figure 5 is a flowchart of replacing an exception expander according to an embodiment of the present invention;

[0058] Figure 6 is a flow chart of repairing a soft fault of an expander according to an embodiment of the present invention;

[0059] Figure 7 It is a flow chart of a disk expansion cabinet management method applied to a host according to an embodiment of the present invention;

[0060] Figure 8 is a schematic diagram of a defined sespage page according to an embodiment of the present invention;

[0061] Fig. 9 is a structural block diagram of a disk expansion cabinet management device deployed in a first expander according to an embodiment of the present invention;

[0062] Fig.10 is a structural block diagram of a disk expansion cabinet management device deployed on a host according to an embodiment of the present invention;

[0063] Fig.11 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0065] JBOD uses 35X40, 35X48 and other SAS Expander chips as SAS expanders to perform disk expansion. When a JBOD contains more disks, it exceeds the expansion capacity of a single SAS expander, and two or more SAS expanders must be used to expand more HDDs. However, in product design, in addition to the disk expansion function, JBOD does not have a high availability mechanism between SAS expanders, that is, when a SAS expander has a problem, all the disks mounted under this SAS expander will be lost, affecting the reliability of the JBOD.

[0066] Based on the above content, the embodiment of the present invention provides a disk expansion cabinet management method, and designs a redundancy mechanism, such as Figure 1 As shown, the host Host contains key server components such as CPU (Central Processing Unit), memory, HBA (Host bus adapter) storage card, and the host can install an operating system (OS). The host is connected to the SAS Expander (abbreviated as SAS Exp, SAS expander) of the JBOD through a SAS link. Each SAS expander links multiple hard disks (HDDs), and the SAS expander is connected to the hard disks connected to other SAS expanders through a spare link through a physical connection reserved to the other SAS expander at the opposite end. An I2C (Inter-Integrated Circuit) link is reserved between two SAS expanders. When the host detects that a certain SAS expander is abnormal, the host instructs other SAS expanders to open the spare link and identify the hard disk mounted under the abnormal expander through the spare port, so that the host can re-link and identify the hard disk mounted under the abnormal expander through other SAS expanders. When a SAS expander fails, it will switch to another SAS expander to work without losing the disk, thereby improving the reliability of the JBOD.

[0067] According to an embodiment of the present invention, a disk expansion cabinet management embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in the first expander, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0068] In this embodiment, a disk expansion cabinet management method is provided, which can be used to: Figure 2 FIG. 1 is a flow chart of a disk expansion cabinet management method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0069] Step S201: upon receiving expander abnormality information sent by the host, determining an abnormal expander according to the expander abnormality information, and sending a soft restart command to the abnormal expander.

[0070] Specifically, the disk expansion cabinet management system is as follows: Figure 3 As shown, in terms of system management, the present embodiment sets a monitoring module, an execution module, and a storage management module in the host. The host also includes a computing module and a cache module. The monitoring module of the host is responsible for monitoring the JBOD status and monitoring the two SAS expanders or multiple SAS expanders included in the JBOD. In the system management of the JBOD, a monitoring module and an execution module are provided in the SAS expander, and the monitoring module of the SAS expander is used to monitor other SAS expanders. The execution module is responsible for sending commands to control the execution of commands by the target object through a CPLD (Complex Programmable Logic Device). The monitoring module is implemented through a low-speed I2C link.

[0071] The first expander is a normal expander. Take the first expander as SAS Expander1 and the abnormal expander as SAS Expander2 as an example for explanation. The host operating system can instruct the monitoring module to monitor the operating status of the SAS expander included in the JBOD through an in-band command. The host monitoring module sends a command to read the operating status of the SAS expander, and the read command is implemented through the sg_ses command.

[0072] If the host monitoring module detects that a SAS expander is not responding, the expander that is not responding is an abnormal expander, for example, SAS Expander 2. The host sends the expander abnormality information to SAS Expander 1 through a command, for example, the host operating system sends the command storcli / cx set sesmultipathcfg=<on|off> Give SASExpander1, where storcli is a command line tool for managing and configuring storage controllers; storcli is the main program name of the command, which is used to call the storcli tool. / cx is the controller identifier, which specifies the storage controller to be operated. set is a command keyword used to set the configuration options of the controller. Sesmultipathcfg is a configuration option used to set the SES (SCSI Enclosure Services) multipath configuration.<on|off> It is a parameter used to specify the state of SES multipath configuration. On enables SES multipath configuration; off disables SES multipath configuration. This command sends expander exception information to SAS Expander1. The expander exception information is SAS Expander2 exception. SASExpander1 receives SAS Expander2 fault information.

[0073] The first controller determines the abnormal expander according to the expander abnormal information, for example, the abnormal expander is SASExpander2. The first controller sends a command to SAS Expander2 through the execution module to trigger a soft restart, for example, the execution module sends a soft restart command to SAS Expander2 through the sg_ses command sg_senddiag-pr 10,0,0,1,6 / dev / sgX, instructing SAS Expander2 to perform a soft restart, wherein sg_senddiag is a tool for sending diagnostic commands to devices, which is often used to test and diagnose storage devices; sg_senddiag is the main program name of the command, which is used to send diagnostic commands to the specified device; -p is an option flag, which is used to specify the parameters of the diagnostic command to be sent; -r 10,0,0,1,6 is a parameter option, which is used to specify the specific content of the diagnostic command to be sent, and -r is followed by a series of hexadecimal values ​​separated by commas, which represent the specific instructions of the diagnostic command; 10 represents the opcode (operation code) of the diagnostic command, which usually corresponds to a specific diagnostic command.

[0074] Step S202: Send a first status acquisition command to the abnormal expander, acquire first expander status information from the abnormal expander, and determine whether the abnormal expander is soft-restarted successfully according to the first expander status information.

[0075] Specifically, the first expander contains a SAS Expander monitoring module for monitoring the operating status of other SAS Expanders. Each SAS Expander has this monitoring module. The monitoring module of the first expander sends a first status acquisition command to the abnormal expander, and obtains hexadecimal response data from the abnormal expander. An example of the first status acquisition command is: sg_ses-p / dev / sgx, where sg_ses is a command line tool for interacting with devices, commonly used to manage and monitor storage devices. sg_ses is the main program name of the command, which is used to interact with SES devices; -p is an option flag used to specify the SES command to be executed. The parameters following -p are usually the specific operations of the SES command, such as reading the device status, etc.; / dev / sgx is the specified device file.

[0076] The first expander parses the response data based on the Page information defined by itself to obtain the first expander status information. It is determined whether the abnormal expander is soft-restarted successfully based on the first expander status information. In addition, the first expander status information may also include SAS Expander2 restart success information. If the first expander receives the first expander status information including SASExpander2 restart success information after a delay of 30 seconds, it is directly confirmed that the abnormal expander is soft-restarted successfully.

[0077] Step S203: If the soft restart is not successful, a power off command is sent to the abnormal expander to shut down the abnormal expander, and expander fault information is sent to the host.

[0078] Specifically, if the soft restart is not successful, it indicates that a hard fault occurs in the abnormal expander, and a hard fault is a fault that cannot be repaired by a soft reset.

[0079] The first expander cuts off the power supply of the abnormal expander and turns on the fault light through the execution module. For example: the execution module sends the power shutdown command sg_senddiag-pr 10,0,0,3,2,5,1 / dev / sgX to shut down the power supply of the abnormal expander, where the parameter 3,2,5,1 is used to instruct the abnormal expander to shut down the power supply. At the same time, the first expander uses the sg command through the execution module to turn on the fault light of Expander2 to start the fault alarm. The command to turn on the fault light can be customized through the Page page.

[0080] The first expander feeds back expander fault information to the host through the monitoring module, and the expander fault information is SASexpander 2fatal Error information.

[0081] The above process is as follows Figure 4As shown, EXP2 has a hard fault, EXP1 cuts off the power supply to EXP2, and EXP1 turns on the fault light of EXP2. EXP1 returns the EXP hard fault information to the Host, and the Host sends the fault information to the operation and maintenance personnel, and the process ends.

[0082] Step S204, when receiving the command to open the backup port sent by the host, open the backup port linked to the hard disk mounted under the abnormal expander through the first preset command, and identify the hard disk mounted under the abnormal expander through the backup port, wherein the command to open the backup port is generated after the host receives the expander failure information.

[0083] Specifically, after the host's monitoring module receives the expander fault information sent by the first expander, it determines that the abnormal expander has a hard fault. The host triggers the BMC to send an alarm message to the operation and maintenance personnel, notifying the operation and maintenance personnel to replace the damaged Expander. The host sends an open backup port command to the first expander through the monitoring module, instructing the first expander to open the backup port.

[0084] When the first expander receives the command to open the standby port sent by the host through the monitoring module, the first expander controls the execution module to open the standby port linked to the hard disk (HDD) mounted under the abnormal expander through the first preset command, and the first preset command is, for example: sg_senddiag-pr 10,0,0,2,5,8 / dev / sgX, and the parameters 2,5,8 are used to instruct the execution module to open the standby port. The first expander identifies the hard disk mounted under the abnormal expander through the standby port.

[0085] The above process is as follows Figure 4 As shown in Figure 1, Host notifies EXP1 to open a backup link. EXP1 opens a backup link.

[0086] Step S205 , sending a standby port opening success message to the host, wherein the standby port opening success message is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the first expander.

[0087] Specifically, the first expander sends a backup port opening success message to the host through the monitoring module. After receiving the backup port opening success message, the host reconnects and identifies the hard disk mounted under the abnormal expander through the first expander to realize the identification of all hard disks (HDD) in the JBOD.

[0088] The above process is as follows Figure 4 As shown, the Host receives the backup link opening notification, and the Host identifies all HDDs through EXP1.

[0089] The disk expansion cabinet management method provided in this embodiment is that after the first expander receives the expander abnormality information sent by the host, it determines the abnormal expander and repairs the abnormal expander by soft restart. If the abnormal expander cannot be repaired, the host is notified, and the backup link is opened according to the host's command to open the backup port and the hard disk mounted under the abnormal expander is identified through the backup port, so that the host can relink and identify the hard disk mounted under the abnormal expander through the first expander. When one expander fails, another expander is switched to work and take over the hard disk mounted under the failed expander, thereby improving the reliability of the JBOD. The problem that when a SAS expander has a problem, all disks mounted under the SAS expander will be lost, affecting the reliability of the disk expansion cabinet is solved.

[0090] In some optional implementations, after sending the backup port opening success information to the host, the method further includes:

[0091] Detecting whether a second expander is inserted, wherein the second expander is used to replace the abnormal expander;

[0092] If the second expander has been inserted, sending a first status acquisition command to the second expander, receiving second expander status information from the second expander, and determining whether the second expander is in a normal state according to the second expander status information;

[0093] If the second expander is in a normal state, the fault light of the abnormal expander is turned off through the second preset command, and abnormal expander repair success information is sent to the host, wherein the fault light is turned on through the third preset command after the first expander sends a power off command to the abnormal expander, and the abnormal expander repair success information is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the second expander;

[0094] When receiving a command to close the standby port sent by the host, the standby port is closed and a soft restart command is sent to the second expander, wherein the soft restart command is used to instruct the second expander to soft restart and restore the link with the hard disk mounted under the abnormal expander. The command to close the standby port is generated by the host after receiving the information that the abnormal expander has been repaired successfully.

[0095] Specifically, after receiving the alarm information sent by the host and the first expander, the operation and maintenance personnel unplug the abnormal expander, insert the second expander to replace the abnormal expander, and automatically power on after the second expander is inserted.

[0096] The first expander detects whether the second expander is inserted through the monitoring module. If the second expander is inserted, the first status acquisition command is sent to the second expander, the second expander status information is received from the second expander, and whether the second expander is in normal state is determined according to the second expander status information.

[0097] If the status of the second expander is normal, the execution module of the first expander turns off the fault light of the abnormal expander through the second preset command, and the second preset command can be customized through the Page page. In addition, the first expander can send the sg_senddiag-pr 11,0,0,3,2,5,1 / dev / sg2 command to turn on the power of the second expander, so that the second expander is powered on and starts working. The first expander monitoring module sends the abnormal expander repair success information to the host. After the host receives the abnormal expander repair success information, the host sends the first expander a command to close the backup link through the monitoring module. The command to close the backup link is, for example: sg_senddiag-pr 10,0,0,2,2,8 / dev / sgX, where 2,2,8 is used to instruct the first expander to close the backup link. The host identifies all hard disks in the JBOD through the first expander and the second expander, and sends the fault information to the operation and maintenance personnel through the monitoring module.

[0098] Upon receiving a command from the host to close the backup port, the execution module of the first expander closes the backup port, releases the hard disk mounted under the abnormal expander that has taken over, and sends a soft restart command to the second expander, instructing the second expander to soft restart and restore the link with the hard disk mounted under the abnormal expander.

[0099] The above process is as follows Figure 5 As shown, EXP2 is damaged; a new EXP2 is inserted; EXP1 monitors the insertion of EXP2 and restarts EXP2. It determines whether EXP2 is reset successfully. If not, it enters the EXP2 hard fault path; if successful, EXP1 turns off the EXP2 fault light; EXP1 returns the normal status of EXP2 to the Host; the Host notifies EXP1 to close the standby link; EXP1 closes the standby link; the Host receives the standby link closure notification and sends the fault repair information. The Host identifies all HDDs through EXP1 and ends.

[0100] In this embodiment, after replacing the abnormal expander with the second expander, the first expander performs a status detection on the second expander. If the second expander is in normal status, the first expander turns off the fault light of the abnormal expander, turns off the standby port, releases the hard disk mounted under the abnormal expander that has been taken over, and mounts it by the second expander, and notifies the host, instructing the host to reconnect and identify the hard disk mounted under the abnormal expander through the second expander. Through the above process, the abnormal expander with a hard fault can be replaced, and during the replacement process, the host can identify the hard disk mounted under the abnormal expander through the first expander, and can continue to provide storage services, thereby improving the reliability of JBOD.

[0101] In some optional implementations, after determining whether the abnormal expander is soft-restarted successfully according to the first expander status information, the method further includes:

[0102] Determine whether a soft restart success message sent by the abnormal extender is received;

[0103] If the soft restart is determined to be successful according to the first expander status information, or if the soft restart success information is received, abnormal expander status normal information is sent to the host, wherein the abnormal expander status normal information is used to instruct the host to reconnect the abnormal expander.

[0104] Specifically, the first expansion module determines through the monitoring module whether the soft restart success information sent by the abnormal expander is received within a preset delay, such as 30 seconds, and if so, determines that the abnormal expander soft restart is successful and successfully repairs the abnormal expander. Alternatively, the operation of the abnormal expander is determined according to the first expander status information, and then determines whether the soft restart is successful.

[0105] If the soft restart is successful according to the first expander status information, or if the soft restart success information is received, the first expander sends abnormal expander normal status information to the host through the monitoring module. After receiving the abnormal expander normal status information, the host will reconnect the abnormal expander and identify the hard disk under the abnormal expander.

[0106] The above process is as follows Figure 6 As shown, it is determined whether SAS Expander2 has a soft fault. If a soft fault occurs, the host OS sends fault information to SAS Expander1; SAS Expander1 soft resets SAS Expander2; it is determined whether SASExpander2 is reset successfully. If yes, it ends; if not, the Expander hard fault repair process is executed.

[0107] In this embodiment, after the host detects the abnormal expander, it instructs the first expander to repair the abnormal expander by soft restart. If the abnormal expander is successfully repaired, the first expander notifies the host and instructs the host to reconnect to the abnormal expander and continue to use the abnormal expander. The above method repairs the abnormal expander in time without interrupting the storage service of the host, thereby improving the reliability of the JBOD.

[0108] According to an embodiment of the present invention, an embodiment of a disk expansion cabinet management method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a host, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0109] In this embodiment, a disk expansion cabinet management method is provided, which can be used in a host. Figure 7 FIG. 1 is a flow chart of a disk expansion cabinet management method according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:

[0110] Step S701, send a second status acquisition command to each expander, receive third expander status information from the expander, determine whether there is an abnormal expander based on the third expander status information, if so, generate expander abnormal information corresponding to the abnormal expander, and send the expander abnormal information to the first expander, wherein the expander abnormal information is used to instruct the first expander to soft restart the abnormal expander.

[0111] Specifically, the host operating system can instruct the monitoring module to monitor the operating status of the SAS expander included in the JBOD through an in-band command. The host monitoring module sends a second status acquisition command to each expander to read the third expander status information of the SAS expander. The read command is implemented through the sg_ses command. The second status acquisition command can be the same as the first status acquisition command.

[0112] The host operating system determines whether there is an abnormal expander according to the third expander status information. For example, if a SAS expander is monitored to have no communication response, the communication response is an abnormal expander. For example, the first expander is SASExpander1 and the abnormal expander is SAS Expander2.

[0113] The host sends expander abnormal information to SAS Expander 1 through a command, and the expander abnormal information is SASExpander 2 abnormal, so that SAS Expander 1 receives SAS Expander 2 fault information.

[0114] Step S702, when the expander failure information sent by the first expander is received, an alarm message is generated, and an open backup port command is sent to the first expander, wherein the expander failure information is generated by the first expander when the soft restart of the abnormal expander fails, and the open backup port command is used to instruct the first expander to open a backup port linked to the hard disk mounted under the abnormal expander through a preset command.

[0115] Specifically, the first expander performs a soft restart operation on the abnormal expander. If the soft restart fails, it indicates that a hard fault occurs in the abnormal expander. The first expander feeds back expander fault information to the host through the monitoring module. The expander fault information is SAS expander 2 fatal Error information.

[0116] When the host receives the expander fault information sent by the first expander, the host triggers the BMC to generate an alarm message to the operation and maintenance personnel. The host sends an open standby port command to the first expander through the monitoring module, instructing the first expander to open the standby port.

[0117] Step S703, upon receiving the backup port opening success information sent by the first expander, relink and identify the hard disk mounted under the abnormal expander through the first expander, wherein the backup port opening success information is generated after the first expander identifies the hard disk mounted under the abnormal expander through the backup port.

[0118] Specifically, the first expander sends a backup port opening success message to the host through the monitoring module. After receiving the backup port opening success message, the host reconnects and identifies the hard disk mounted under the abnormal expander through the first expander to realize the identification of all hard disks (HDD) in the JBOD.

[0119] The disk expansion cabinet management method provided in this embodiment is that after the host detects an abnormal expander, it instructs the first expander to repair the abnormal expander by soft restart. If the abnormal expander cannot be repaired, the host instructs the first expander to open a backup link and identify the hard disk mounted under the abnormal expander through the backup port, so that the host can relink and identify the hard disk mounted under the abnormal expander through the first expander. When one expander fails, another expander is switched to work and take over the hard disk mounted under the failed expander, thereby improving the reliability of the JBOD. It solves the problem that when a SAS expander has a problem, all disks mounted under the SAS expander will be lost, affecting the reliability of the disk expansion cabinet.

[0120] In some optional implementations, after relinking and identifying the hard disk mounted under the abnormal expander through the first expander, the method further includes:

[0121] In the case of receiving the abnormal expander repair success information sent by the first expander, sending a close standby port command to the first expander, wherein the close standby port command is used to instruct the first expander to close the standby port;

[0122] The hard disk mounted under the abnormal expander is relinked and identified through the second expander, and fault repair information is generated, wherein the second expander is used to replace the abnormal expander.

[0123] Specifically, after receiving the alarm information sent by the host and the first expander, the operation and maintenance personnel unplug the abnormal expander, insert the second expander to replace the abnormal expander, and automatically power on after the second expander is inserted. The first expander detects whether the second expander is inserted through the monitoring module. If the second expander is inserted, the first expander performs a status detection on the second expander. If the second expander is in normal status, the first expander sends a successful repair message of the abnormal expander to the host through the detection module.

[0124] After the host receives the abnormal expander repair success information sent by the first expander, the host sends a shutdown backup link instruction to the first expander through the monitoring module. The shutdown backup link instruction is, for example: sg_senddiag-pr 10,0,0,2,2,8 / dev / sgX, where 2,2,8 is used to instruct the first expander to shut down the backup link.

[0125] The host reconnects and identifies the hard disk mounted under the abnormal expander through the second expander, and realizes the identification of all hard disks in the JBOD through the first expander and the second expander. Fault repair information is generated and sent to the operation and maintenance personnel through the monitoring module.

[0126] In this embodiment, the first expander performs a status check on the second expander. If the second expander is in normal status, the host relinks and identifies the hard disk mounted under the abnormal expander through the second expander, thereby replacing the abnormal expander that has a hard failure. During the replacement process, the host can identify the hard disk mounted under the abnormal expander through the first expander and can continue to provide storage services, thereby improving the reliability of JBOD.

[0127] In some optional embodiments, the method further comprises:

[0128] Relinking the abnormal expander when receiving the normal state information of the abnormal expander sent by the first expander;

[0129] Identify the hard disk mounted under the abnormal expander.

[0130] Specifically, if the abnormal expander status is normal information is received, it means that the first expander successfully repairs the abnormal expander by soft restart. After receiving the abnormal expander status normal information, the host will reconnect to the abnormal expander and identify the hard disk under the abnormal expander.

[0131] In this embodiment, if the abnormal expander is successfully repaired, the first expander notifies the host and instructs the host to reconnect to the abnormal expander and continue to use the abnormal expander. The above method repairs the abnormal expander in time without interrupting the storage service of the host, thereby improving the reliability of the JBOD.

[0132] In some optional implementations, receiving second expander state information from the expander includes:

[0133] receiving a response field corresponding to the second state acquisition command from the extender;

[0134] The second expander status information is obtained by parsing the response field through the preset parsing page.

[0135] Specifically, the host receives a response field corresponding to the second status acquisition command from the expander, and the response field is a hexadecimal number.

[0136] 1 byte has 8 bits. For example, the default parsing page is: Figure 8 As shown, the 1st to 8th bits of the 0th byte of the response field represent Vendor Spec Status, where Vendor refers to the manufacturer that produces or provides the hardware device, Spec refers to the technical specification or standard of the device, and Status refers to the current working status or health of the device. The 0th to 7th bits of the 1st byte are reserved. The 0th to 7th bits of the 2nd to 3rd bytes represent Page Length. Bits 0-7 of the 4th to 7th bytes represent Generation Code, bits 0-7 of the 8th to 23rd bytes represent Expander logic ID (serial number), bits 0-7 of the 24th to 31st bytes represent Expander logic ID (board ID), bits 0-7 of the 32nd to 39th bytes represent Attached HBA card SAS address, bits 0-7 of the 40th byte represent HBA card Port; bit 0 of the 41st byte represents Hot / Cold Storage, bits 1-3 represent Reserved space, bits 4-6 represent Boot cause, and bit 7 represents ReadyFlag; bits 0-7 of the 42nd byte represent MAX power on HDD numbers (maximum power-on times of the hard disk), the 0th to 7th bits of the 43rd byte represent the Reserved space, the 0th to 7th bits of the 44th to 52nd bytes represent the Expander firmware version (expander firmware version), and the 0th to 7th bits of the 53rd to 60th bytes represent the CPLD version (CPLD version information). For details, see Figure 8, I will not go into details here.

[0137] The response fields are parsed by the preset parsing page to obtain the second extender status information, such as the supplier, specification, status, generated code, version information, etc. of the second extender.

[0138] In some optional implementations, the method for a host to monitor an expander may further include step A1 and step A2.

[0139] Step A1, after the host is connected to the JBOD via the SAS link, the information of the expander in the JBOD is obtained periodically.

[0140] Specifically, since the current expander technology has developed zone functions, hard disk power on and off functions, hard disk power supply quantity setting functions, hard disk power consumption detection functions, etc., the expander information to be detected includes at least one of zone configuration information, storage configuration information, configuration version information and mounted disk information.

[0141] Preset the inspection cycle. After the host connects to the JBOD through the SAS link, obtain the information of the expander in the JBOD at regular intervals. Specifically, the required information can be obtained by obtaining the configuration page of the expander. According to the preset rules, such as searching keywords, locating bytes, etc., find the location that describes the required information, compare the expander information with the pre-recorded correct information or correct form, obtain the comparison result, further analyze the comparison result, obtain the inspection result, and perform the corresponding operation preset with the inspection result. If the version of some configuration items of the expander is incorrect, it may not affect the use. At this time, the expander version error prompt processing can be used or the expander version error information can be recorded for staff to view. If the hard disk information recorded in the expander does not match the hard disk information recorded in the operating system, it is very likely to cause system failure. At this time, error reporting processing is required to prompt the staff to check in time.

[0142] Step A2: Check the information of the extender according to the preset rules, and perform corresponding operations according to the check result.

[0143] Optionally, when the information of the expander to be checked is storage configuration information, step A2 may include steps A21 to A25.

[0144] Step A21, determine whether the storage device in the configuration information of the expander is cold storage or hot storage; if it is cold storage, proceed to step A22; if it is hot storage, proceed to step A25.

[0145] Step A22, checking whether the number of powered-on hard disks of the cold storage is correct in the configuration information of the expander;

[0146] If yes, go to step A23; if no, go to step A24.

[0147] Step A23, the storage configuration information passes the inspection.

[0148] Step A24, sending a storage configuration information error signal.

[0149] Step A25, check whether the power-on status of all hard disks is normal after power-on; if yes, go to step A23; if not, go to step A24.

[0150] Specifically, cold storage generally refers to storage where data is seldom accessed. Hot storage generally refers to storage where data is more active. The hot and cold storage settings can be found in the configuration information of the expander. Specifically, you can check the identifiers at the corresponding bytes, such as "0" for cold storage and "1" for hot storage. Different inspection methods are performed for different hot and cold storage settings of the expander. That is, for cold storage, check whether the number of powered-on hard disks of the cold storage is correct. For hot storage, check whether the power-on status of all hard disks is normal after power-on.

[0151] In this embodiment, for at least one of the expander information such as zone configuration information, storage configuration information, configuration version information and mounted disk information, after the host is connected to the JBOD through a SAS link, the expander information of these JBODs is periodically obtained, the expander information is checked according to preset rules, and corresponding operations are performed according to the inspection results. This enables the expander in the JBOD to be monitored after the JBOD is put into use, so that failures of the expander can be promptly prompted or resolved, effectively maintaining the performance of the JBOD device after it is put into use, improving the security of the operation of the JBOD device, and optimizing the user experience.

[0152] In this embodiment, a disk expansion cabinet management device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0153] This embodiment provides a disk expansion cabinet management device, which is deployed in a first expander, such as Fig. 9 As shown, including:

[0154] The determination module 901 is used to determine the abnormal expander according to the expander abnormal information when receiving the expander abnormal information sent by the host, and send a soft restart command to the abnormal expander;

[0155] The judging module 902 is used to send a first status acquisition command to the abnormal expander, obtain first expander status information from the abnormal expander, and judge whether the abnormal expander is soft-restarted successfully according to the first expander status information;

[0156] The first sending module 903 is used to send a power supply shutdown command to the abnormal expander to shut down the abnormal expander if the soft restart is not successful, and send expander fault information to the host;

[0157] The opening module 904 is used to open the standby port connected to the hard disk mounted under the abnormal expander through a first preset command when receiving the standby port opening command sent by the host, and identify the hard disk mounted under the abnormal expander through the standby port, wherein the standby port opening command is generated by the host after receiving the expander failure information;

[0158] The second sending module 905 is used to send a standby port opening success message to the host, wherein the standby port opening success message is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the first expander.

[0159] In some optional implementations, after sending the backup port opening success information to the host, the device is used to:

[0160] Detecting whether a second expander is inserted, wherein the second expander is used to replace the abnormal expander;

[0161] If the second expander has been inserted, sending a first status acquisition command to the second expander, receiving second expander status information from the second expander, and determining whether the second expander is in a normal state according to the second expander status information;

[0162] If the second expander is in a normal state, the fault light of the abnormal expander is turned off through the second preset command, and abnormal expander repair success information is sent to the host, wherein the fault light is turned on through the third preset command after the first expander sends a power off command to the abnormal expander, and the abnormal expander repair success information is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the second expander;

[0163] When receiving a command to close the standby port sent by the host, the standby port is closed and a soft restart command is sent to the second expander, wherein the soft restart command is used to instruct the second expander to soft restart and restore the link with the hard disk mounted under the abnormal expander. The command to close the standby port is generated by the host after receiving the information that the abnormal expander has been repaired successfully.

[0164] In some optional implementations, after determining whether the abnormal expander is soft-restarted successfully according to the first expander status information, the device is further configured to:

[0165] Determine whether a soft restart success message sent by the abnormal extender is received;

[0166] If the soft restart is determined to be successful according to the first expander status information, or if the soft restart success information is received, abnormal expander status normal information is sent to the host, wherein the abnormal expander status normal information is used to instruct the host to reconnect the abnormal expander.

[0167] This embodiment provides a disk expansion cabinet management device, which is deployed on a host, such as Fig.10 As shown, including:

[0168] The third sending module 1001 is used to send a second status acquisition command to each expander, receive third expander status information from the expander, determine whether there is an abnormal expander according to the third expander status information, and if so, generate expander abnormal information corresponding to the abnormal expander, and send the expander abnormal information to the first expander, wherein the expander abnormal information is used to instruct the first expander to soft restart the abnormal expander;

[0169] The fourth sending module 1002 is used to generate alarm information and send an open standby port command to the first expander when receiving expander failure information sent by the first expander, wherein the expander failure information is generated by the first expander when the soft restart of the abnormal expander fails, and the open standby port command is used to instruct the first expander to open a standby port linked to the hard disk mounted under the abnormal expander through a preset command;

[0170] The identification module 1003 is used to relink and identify the hard disk mounted under the abnormal expander through the first expander when receiving the backup port opening success information sent by the first expander, wherein the backup port opening success information is generated after the first expander identifies the hard disk mounted under the abnormal expander through the backup port.

[0171] In some optional implementations, after relinking and identifying the hard disk mounted under the abnormal expander through the first expander, the device is used to:

[0172] In the case of receiving the abnormal expander repair success information sent by the first expander, sending a close standby port command to the first expander, wherein the close standby port command is used to instruct the first expander to close the standby port;

[0173] The hard disk mounted under the abnormal expander is relinked and identified through the second expander, and fault repair information is generated, wherein the second expander is used to replace the abnormal expander.

[0174] In some optional embodiments, the device is also used for:

[0175] Relinking the abnormal expander when receiving the normal state information of the abnormal expander sent by the first expander;

[0176] Identify the hard disk mounted under the abnormal expander.

[0177] In some optional implementations, the third sending module 1001 receives the second extender state information from the extender, including:

[0178] receiving a response field corresponding to the second state acquisition command from the extender;

[0179] The second expander status information is obtained by parsing the response field through the preset parsing page.

[0180] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0181] The disk expansion cabinet management device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0182] The embodiment of the present invention also provides a computer device having the above Fig. 9 or Fig.10 The disk expansion cabinet management device is shown.

[0183] See also Fig.11 , Fig.11 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.11 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.11 A processor 10 is taken as an example.

[0184] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0185] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0186] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0187] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0188] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0189] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0190] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0191] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined in this application.

Claims

1. A disk expansion cabinet management method, characterized in that: The method is applied to a first expander, and the method comprises: In the case of receiving the expander abnormality information sent by the host, determining the abnormal expander according to the expander abnormality information, and sending a soft restart command to the abnormal expander; Sending a first status acquisition command to the abnormal expander, acquiring first expander status information from the abnormal expander, and judging whether the abnormal expander is soft-restarted successfully according to the first expander status information; If the soft restart is not successful, sending a power off command to the abnormal expander to shut down the abnormal expander, and sending expander fault information to the host; In the case of receiving the command to open the standby port sent by the host, opening the standby port linked to the hard disk mounted under the abnormal expander through a first preset command, and identifying the hard disk mounted under the abnormal expander through the standby port, wherein the command to open the standby port is generated by the host after receiving the expander failure information; Sending backup port opening success information to the host, wherein the backup port opening success information is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the first expander.

2. The method according to claim 1, characterized in that After sending the standby port opening success information to the host, the method further comprises: Detecting whether a second expander is inserted, wherein the second expander is used to replace the abnormal expander; If the second expander has been inserted, sending the first status acquisition command to the second expander, receiving second expander status information from the second expander, and determining whether the second expander is in a normal state according to the second expander status information; If the second expander is in a normal state, the fault light of the abnormal expander is turned off through a second preset command, and abnormal expander repair success information is sent to the host, wherein the fault light is turned on through a third preset command after the first expander sends a power off command to the abnormal expander, and the abnormal expander repair success information is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the second expander; Upon receiving the command to close the backup port sent by the host, the backup port is closed, and the soft restart command is sent to the second expander, wherein the soft restart command is used to instruct the second expander to soft restart and restore the link with the hard disk mounted under the abnormal expander, and the command to close the backup port is generated by the host after receiving the successful repair information of the abnormal expander.

3. The method according to claim 1, characterized in that After determining whether the abnormal expander is soft-restarted successfully according to the first expander status information, the method further includes: Determining whether the soft restart success information sent by the abnormal expander is received; If the soft restart is determined to be successful according to the first expander status information, or if the soft restart success information is received, abnormal expander status normal information is sent to the host, wherein the abnormal expander status normal information is used to instruct the host to reconnect the abnormal expander.

4. A disk expansion cabinet management method, characterized in that: The method is applied to a host, and the method comprises: Sending a second status acquisition command to each expander, receiving third expander status information from the expander, judging whether there is an abnormal expander according to the third expander status information, and if so, generating expander abnormal information corresponding to the abnormal expander, and sending the expander abnormal information to the first expander, wherein the expander abnormal information is used to instruct the first expander to soft-restart the abnormal expander; In the case of receiving the expander failure information sent by the first expander, generating alarm information and sending an open standby port command to the first expander, wherein the expander failure information is generated by the first expander when the soft restart of the abnormal expander fails, and the open standby port command is used to instruct the first expander to open a standby port linked to the hard disk mounted under the abnormal expander through a preset command; When receiving the backup port opening success information sent by the first expander, the hard disk mounted under the abnormal expander is relinked and identified through the first expander, wherein the backup port opening success information is generated after the first expander identifies the hard disk mounted under the abnormal expander through the backup port.

5. The method according to claim 4, characterized in that After relinking and identifying the hard disk mounted under the abnormal expander through the first expander, the method further includes: In the case of receiving the abnormal expander repair success information sent by the first expander, sending a close standby port command to the first expander, wherein the close standby port command is used to instruct the first expander to close the standby port; The hard disk mounted under the abnormal expander is relinked and identified through the second expander to generate fault repair information, wherein the second expander is used to replace the abnormal expander.

6. The method according to claim 4, characterized in that The method further comprises: Relinking the abnormal expander upon receiving the normal state information of the abnormal expander sent by the first expander; Identify the hard disk mounted under the abnormal expander.

7. The method according to claim 4, characterized in that The receiving second expander status information from the expander comprises: receiving a response field corresponding to the second status acquisition command from the extender; The response field is parsed through a preset parsing page to obtain the second expander status information.

8. A disk expansion cabinet management device, characterized in that: The device is deployed in a first extender, and the device includes: A determination module, configured to, upon receiving the expander abnormality information sent by the host, determine the abnormal expander according to the expander abnormality information, and send a soft restart command to the abnormal expander; A judging module, configured to send a first status acquisition command to the abnormal expander, obtain first expander status information from the abnormal expander, and judge whether the abnormal expander is soft-restarted successfully according to the first expander status information; A first sending module, configured to send a power-off command to the abnormal expander to shut down the abnormal expander if the soft restart fails, and send expander fault information to the host; an opening module, configured to, upon receiving an open standby port command sent by the host, open a standby port linked to the hard disk mounted under the abnormal expander through a first preset command, and identify the hard disk mounted under the abnormal expander through the standby port, wherein the open standby port command is generated by the host after receiving the expander failure information; The second sending module is used to send a backup port opening success message to the host, wherein the backup port opening success message is used to instruct the host to re-link and identify the hard disk mounted under the abnormal expander through the first expander.

9. A disk expansion cabinet management device, characterized in that: The device is deployed on a host, and includes: A third sending module is used to send a second status acquisition command to each expander, receive third expander status information from the expander, determine whether there is an abnormal expander according to the third expander status information, and if so, generate expander abnormal information corresponding to the abnormal expander, and send the expander abnormal information to the first expander, wherein the expander abnormal information is used to instruct the first expander to soft-restart the abnormal expander; a fourth sending module, configured to generate alarm information and send an open standby port command to the first expander when receiving expander failure information sent by the first expander, wherein the expander failure information is generated by the first expander when the soft restart of the abnormal expander fails, and the open standby port command is used to instruct the first expander to open a standby port linked to the hard disk mounted under the abnormal expander through a preset command; An identification module is used to relink and identify the hard disk mounted under the abnormal expander through the first expander when receiving the backup port opening success information sent by the first expander, wherein the backup port opening success information is generated after the first expander identifies the hard disk mounted under the abnormal expander through the backup port.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the disk expansion cabinet management method according to any one of claims 1 to 7 by executing the computer instructions.

Citation Information

Patent Citations

  • Electrostatic interference processing method and device, storage medium and electronic equipment

    CN114443396A

  • Expansion chip management method and device, storage medium and electronic equipment

    CN116150068A

  • Storage device and disk restart control method and device

    CN117234437A