Disk light management method, device, electronic device and readable storage medium
By establishing a disk light management database and interface, the problem of binding disk light management method and product name is solved, and efficient disk light management under different models and topological structures is realized, which simplifies the update and maintenance process.
Patent Information
- Application Number
- CN202310780245.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-06-29
AI Technical Summary
In the prior art, the disk light management method is bound to the product name, which makes it inefficient and difficult to maintain during software upgrades or system updates.
Establish a disk light management database, record and store the corresponding relationship between product name, topology structure and disk light management commands, and realize disk light operation and fault detection through the disk light management interface.
It realizes efficient disk light management under different models and topology structures, simplifies the update and maintenance process, and improves the efficiency and practicality of disk light management.
Smart Images

Figure CN116795917B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a disk light management method, device, electronic device and readable storage medium. Background Art
[0002] Disks are memory devices that use magnetic recording technology to store data. Storage systems typically include multiple disks. As storage system clusters grow, such as distributed storage systems, the number of disks within the system also increases. Disk lights identify disks, allowing users to quickly locate desired disks within the storage system. Therefore, managing disk lights is an essential component of storage systems.
[0003] Related technologies use separate logic to manage disk light indicators based on product names. In other words, there's a correspondence between product names and disk light management methods, with the corresponding disk light management method directly invoked based on the product name. This management approach results in excessive branching logic, making it difficult to maintain. Adding new product types or changing the corresponding disk light management method, such as adding a new topology, requires code modification and re-adaptation. For scenarios with frequent software upgrades or system device updates, these disk light management methods are inefficient and impractical.
[0004] In view of this, efficient management of disk lights is a technical problem that needs to be solved by technical personnel in the relevant field. Summary of the Invention
[0005] The present application provides a disk light management method, device, electronic device and readable storage medium to achieve efficient management of disk lights.
[0006] To solve the above technical problems, this application provides the following technical solutions:
[0007] On one hand, the present application provides a disk light management method, comprising:
[0008] Pre-establish a disk light management database and create a disk light management interface; the disk light management database is used to record the corresponding relationship between storage product names, topology structures and disk light management commands;
[0009] Pre-create fault detection threads and their corresponding operation mechanisms;
[0010] When it is detected that the user issues a disk light management instruction through the device view interface, the disk light management interface is called to operate the disk light of the corresponding disk based on the corresponding relationship; the device view interface is used to display storage product view information including disk information;
[0011] The fault detection thread is automatically run based on the operation mechanism, the disk light management interface is called according to the fault detection situation, and the disk fault light of the corresponding disk is operated based on the corresponding relationship.
[0012] Exemplarily, after establishing the disk light management database, the method further includes:
[0013] When a new storage product is detected, obtaining a target disk light management command corresponding to the new storage product;
[0014] The disk light management interface is called to add a corresponding relationship between the product name of the new storage product, the topology structure of the new storage product and the target disk light management command in the disk light management database.
[0015] Exemplarily, after establishing the disk light management database, the method further includes:
[0016] When detecting that the topology structure of the target storage product has changed, obtaining the new topology structure of the target storage product;
[0017] Based on the new topology, the disk light management interface is called to update the corresponding relationship between the product name, topology and disk light management command of the target storage product in the disk light management database.
[0018] Exemplarily, after establishing the disk light management database, the method further includes:
[0019] When detecting that the disk light management command of the target storage product has changed, obtaining a new disk light management command of the target storage product;
[0020] Based on the new disk light management command, the disk light management interface is called to update the corresponding relationship between the product name and topology structure of the target storage product and the disk light management command in the disk light management database.
[0021] Exemplarily, when detecting that a user issues a disk light management instruction through a device view interface, calling the disk light management interface, and operating the disk light of the corresponding disk based on the corresponding relationship includes:
[0022] When it is detected that the user issues a disk positioning instruction through the device view interface, the target product name and the target topology structure of the storage product to which the target disk belongs are read based on the disk positioning instruction; the disk light management interface is called, and a target disk positioning light lighting command is obtained from the disk light management database according to the target product name and the target topology structure, and the positioning light of the target disk is lit according to the target disk light positioning lighting command;
[0023] When it is detected that the user issues a disk light off command through the device view interface, the destination product name and destination topology structure of the storage product to which the destination disk belongs are read based on the disk off command; the disk light management interface is called, and the destination disk positioning light off command is obtained from the disk light management database according to the destination product name and the destination topology structure, and the positioning light of the destination disk is turned on according to the destination disk light positioning off command.
[0024] Exemplarily, when detecting that a user issues a disk light management instruction through a device view interface, calling the disk light management interface, and operating the disk light of the corresponding disk based on the corresponding relationship includes:
[0025] When it is detected that the user sends a disk light status query instruction through the device view interface, the target product name and target topology structure of the storage product to which the target disk belongs are read based on the disk light status query instruction;
[0026] Call the disk light management interface, and obtain the destination disk light status acquisition command from the disk light management database according to the destination product name and the destination topology structure; obtain the current status of the disk light of the destination disk according to the destination disk light status acquisition command, and display it in the corresponding position of the device view interface.
[0027] Exemplarily, automatically running the fault detection thread based on the operation mechanism, calling the disk light management interface according to the fault detection situation, and operating the disk fault light of the corresponding disk based on the corresponding relationship includes:
[0028] Automatically running the fault detection thread based on the operation mechanism;
[0029] When a failure of a destination disk is detected, the destination product name and destination topology of the storage product to which the destination disk belongs are obtained; the disk light management interface is called, and a destination disk fault light lighting command is obtained from the disk light management database according to the destination product name and the destination topology, and the fault light of the destination disk is lit according to the destination disk fault light lighting command;
[0030] When the failure recovery of the destination disk is detected, the disk light management interface is called, and the destination disk fault light extinguishing command is obtained from the disk light management database according to the destination product name and the destination topology structure, and the fault light of the destination disk is extinguished according to the destination disk fault light extinguishing command.
[0031] Another aspect of the present application provides a disk light management device, comprising:
[0032] A database establishment module is used to establish a disk light management database and create a disk light management interface; the disk light management database is used to record the corresponding relationship between storage product names, topological structures and disk light management commands;
[0033] Thread building module, used to pre-create fault detection threads and their corresponding operation mechanisms;
[0034] The disk light management module is used to call the disk light management interface when it detects that the user has issued a disk light management instruction through the device view interface, and operate the disk light of the corresponding disk based on the corresponding relationship; the device view interface is used to display storage product view information containing disk information; based on the operating mechanism, the fault detection thread is automatically run, and according to the fault detection situation, the disk light management interface is called to operate the disk fault light of the corresponding disk based on the corresponding relationship.
[0035] The present application also provides an electronic device, comprising a processor, wherein the processor is configured to implement the steps of the disk light management method as described in any of the preceding items when executing a computer program stored in a memory.
[0036] Finally, the present application also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the disk light management method as described in any of the above items are implemented.
[0037] The technical solution provided by this application has the advantage of configuring disk light management commands, recording them in a disk light management database, and providing an externally callable disk light management interface. For different models and different topologies, the disk light management interface can call corresponding disk light management commands to implement the management functions of the disk location light and disk fault light. When updates are needed, only the relevant data in the disk light management database needs to be updated based on the existing framework. This simple operation significantly improves the efficiency of disk light management, facilitates subsequent expansion and maintenance, and improves practicality.
[0038] In addition, the present application also provides corresponding implementation devices, electronic devices and readable storage media for the disk light management method, further making the method more practical, and the devices, electronic devices and readable storage media have corresponding advantages.
[0039] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0041] Figure 1 A flowchart of a disk light management method provided in this application;
[0042] Figure 2 A flowchart of another disk light management method provided in this application;
[0043] Figure 3 A structural diagram of a specific implementation of the disk light management device provided by this application;
[0044] Figure 4 This is a structural diagram of a specific implementation of the electronic device provided in this application. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the embodiments described are only a part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present application.
[0046] The terms "including," "having," and any variations thereof in the specification and claims of this application, as well as in the accompanying drawings, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed. Various non-limiting embodiments of the present application are described in detail below.
[0047] First see Figure 1 , Figure 1 This is a flowchart of a disk light management method provided in this application. This application may include the following contents:
[0048] S101: Pre-establish a disk light management database and create a disk light management interface.
[0049] The disk light management database of this application is used to record the correspondence between storage product names, topologies, and disk light management commands. Specifically, the data required for disk light management, including model names, topologies, and disk light management commands, is maintained in the disk light management database. For example, the disk light management database may include multiple data tables or a single data table, as shown in Table 1. The correspondence between storage product names, topologies, and disk light management commands is recorded in a data table format. To facilitate maintenance and management, each storage product may correspond to a data table, which can store disk light management commands corresponding to different topologies of the same storage product. The storage product name identifies the storage product model, and the topology represents the connection method for different disk array cards and expansion cards. Different topologies correspond to different disk light management methods. Disk light management can include the management of disk locator lights and disk fault lights, and is applied to storage system operation and maintenance. Controlling the disk locator light on or off in the device view interface can illuminate or turn off the disk locator light on a physical device. The disk fault light is activated when the backend program proactively detects disk failures. Disk light management commands include but are not limited to disk light status acquisition commands, disk positioning light lighting commands, disk positioning light off commands, disk fault light lighting commands, and disk fault light off commands. The disk light management interface is a disk light management script program. The disk light management interface can be used to manage and maintain the disk light management database, and the corresponding disk light management commands can be executed through the disk light management interface to complete the management of the disk light. When the disk light management interface is called, the corresponding disk light management command is obtained according to the model name and the corresponding topology structure to perform disk light management operations. Accordingly, the disk light management operations include but are not limited to disk light (including disk fault light and disk positioning light) status query, lighting the disk positioning light, turning off the disk positioning light, lighting the disk fault light, and turning off the disk fault light. When new models or topologies are added later, or when the original disk light management method is modified, the user only needs to call the disk light management interface through the device view interface to maintain the disk light management commands, which is convenient for subsequent maintenance and expansion.
[0050] Table 1 Correspondence between storage product names, topology structures, and disk light management commands
[0051]
[0052] S102: Pre-create a fault detection thread and its corresponding operation mechanism.
[0053] In this step, the fault detection thread is a task automatically executed by the storage system. The number of fault detection threads can be determined based on the number of nodes in the current storage system. If the storage system is a distributed storage cluster system, a fault detection thread can be started on each node in the cluster to periodically detect disk failures. The operation mechanism includes, but is not limited to, the fault detection thread's operation mode, runtime, startup method, running nodes, and information related to the disks to be tested. Based on the operation mechanism, the storage system can automatically trigger the execution of the disk detection task in a specified manner.
[0054] S103: When it is detected that the user issues a disk light management instruction through the device view interface, the disk light management interface is called to operate the disk light of the corresponding disk based on the corresponding relationship.
[0055] The device view interface in this step displays storage product information, including but not limited to disk information such as the drive letter, disk status, and disk location. The device view interface is a human-computer interface, allowing users to manage the disk locator light, such as turning it on and off.
[0056] S104: Automatically run the fault detection thread based on the operation mechanism, call the disk light management interface according to the fault detection situation, and operate the disk fault light of the corresponding disk based on the corresponding relationship.
[0057] In this step, the fault detection situation includes whether a fault has occurred and whether the fault has been repaired. The operation of the disk fault light may include lighting up the disk fault light and turning off the disk fault light. The storage system background can determine whether to turn on or off the disk fault light or not process it based on the disk fault detection situation.
[0058] The technical solution provided by this application configures disk light management commands, records them in a disk light management database, and provides a callable disk light management interface. For different machine models and different topologies, the disk light management interface can call corresponding disk light management commands to implement the management functions of the disk position light and disk fault light. When updates are needed, only the relevant data in the disk light management database needs to be updated based on the existing framework. This simple operation significantly improves the efficiency of disk light management, facilitates subsequent expansion and maintenance, and improves practicality.
[0059] After the above embodiment maintains the management commands for the locator lights and fault lights corresponding to different storage models and different topologies in the disk light database, when the software environment or hardware environment of the subsequent storage system is updated or modified, such as when a new model or new topology is added, the present application only needs to maintain the new commands in the data of the disk light database through the disk light management interface to complete the adaptation. This embodiment provides corresponding explanations for different update situations, which may include the following content:
[0060] In the case of new models of storage systems, when a new storage product is detected, the target disk light management command corresponding to the new storage product is obtained; the disk light management interface is called to add the product name of the new storage product, the topology structure of the new storage product and the correspondence between the target disk light management command in the disk light management database.
[0061] In the case of a new topology of the storage system, when it is detected that the topology structure of the target storage product has changed, the new topology structure of the target storage product is obtained; based on the new topology structure, the disk light management interface is called to update the correspondence between the product name, topology structure and disk light management command of the target storage product in the disk light management database.
[0062] In the case where the storage system modifies the original disk light management method, when it is detected that the disk light management command of the target storage product has changed, the new disk light management command of the target storage product is obtained; based on the new disk light management command, the disk light management interface is called to update the correspondence between the product name, topology structure and disk light management command of the target storage product in the disk light management database.
[0063] In this embodiment, the target disk light management command is a disk light management command for a newly added storage product. The topology of the newly added storage product is obtained, and the correspondence between the newly added storage product's product name, topology, and corresponding disk management command, i.e., the target disk light management command, is added to the disk light management database via the disk light management interface, thereby updating the data in the disk light management database. A target storage product is a storage product whose topology has changed, including modifications or additions, and whose disk light management command has changed. The original topology of the target storage product in the disk light management database is modified to the new topology via the disk light management interface, and the original disk management command is modified to the new disk light management command, thereby completing the update and maintenance of the disk light management database data.
[0064] This shows that when new models or topologies are added later or the original disk light management method is modified, it is only necessary to maintain the disk light management commands through the disk light management interface, which facilitates subsequent maintenance and expansion.
[0065] The above embodiments do not limit how to manage and operate the disk light. This application also provides corresponding explanations and descriptions of the operation of the disk light in different situations, which may include the following:
[0066] When the user wants to find the actual location of the disk, he can send a positioning light request through the device view interface to perform a disk positioning operation on the disk. For the sake of convenience of description, the disk that the user wants to locate is called the destination disk. Exemplarily, the storage system detects that the user sends a disk positioning instruction through the device view interface, and reads the destination product name and destination topology of the storage product to which the destination disk belongs based on the disk positioning instruction. Among them, the destination product name is the product name of the storage product to which the destination disk belongs, and the destination topology is the topology of the storage product to which the destination disk belongs. After determining the product name and topology, the disk light management interface can be called to obtain the corresponding disk positioning light lighting command of the destination disk from the disk light management database according to the destination product name and destination topology, that is, the destination disk light positioning lighting command, and light up the positioning light of the destination disk according to the destination disk light positioning lighting command.
[0067] If there are too many disk locating lights on in the current storage system, it is inconvenient for users to find the currently required disk, or when the user wants to turn off the disk locating light, for the sake of convenience, the disk whose locating light the user wants to turn off is called the destination disk. A request to turn off the locating light can be issued through the device view interface. The storage system detects that the user has issued an instruction to turn off the locating light through the device view interface, reads the destination product name and destination topology of the storage product to which the destination disk belongs based on the instruction to turn off the locating light, calls the disk light management interface, and obtains the disk locating light turning off command of the corresponding destination disk from the disk light management database according to the destination product name and destination topology, and then turns off the locating light of the destination disk based on the command.
[0068] When the user wants to find out the status of the disk light of the queried disk, he can send a disk light status query request through the device view interface to query the disk light status of the disk. The device view interface of the present application can also display the status of the disk light. After the storage system obtains the disk light status through the disk light management interface, it can display the status information obtained by the query at the position of the corresponding disk in the device view interface. The status of the disk light includes whether the disk positioning light is on or off, and whether the disk fault light is on or off. Exemplarily, the storage system detects that the user sends a disk light status query instruction through the device view interface, reads the target product name and target topology of the storage product to which the target disk belongs based on the disk light status query instruction; calls the disk light management interface, and obtains the target disk light status acquisition command from the disk light management database according to the target product name and target topology; obtains the current status of the disk light of the target disk according to the target disk light status acquisition command, and displays it at the corresponding position of the device view interface.
[0069] The disk fault indicator is a self-detection mechanism of the storage system. If the storage system background uses a scheduled task to monitor disk status, the task will periodically invoke the disk fault detection command to detect disk failures. Upon detecting a disk failure, the disk indicator management interface will be called to illuminate the fault indicator and generate an alarm to notify maintenance personnel of the disk failure. The fault indicator allows users to locate the faulty disk and perform further actions, such as replacing or repairing the disk. Once the disk failure is detected and resolved, the disk indicator management interface will be called to deactivate the fault indicator and restore the disk failure alarm. Exemplarily, the fault detection thread is automatically run based on the operation mechanism; when a failure of the destination disk is detected, the destination product name and destination topology structure of the storage product to which the destination disk belongs are obtained; the disk light management interface is called, and the destination disk fault light lighting command is obtained from the disk light management database according to the destination product name and destination topology structure, and the fault light of the destination disk is lit according to the destination disk fault light lighting command; when the failure recovery of the destination disk is detected, the disk light management interface is called, and the destination disk fault light extinguishing command is obtained from the disk light management database according to the destination product name and destination topology structure, and the fault light of the destination disk is extinguished according to the destination disk fault light extinguishing command.
[0070] It can be seen that this embodiment can achieve efficient management of disk lights through the disk light management interface and the disk light database, and has a good user experience and strong practicality.
[0071] In order to make those skilled in the art more clearly understand the technical solution of this application, this application also provides an exemplary embodiment. This embodiment takes the storage system as a distributed storage cluster as an example, and deploys a disk light management platform on the control node of the distributed storage cluster. The disk light management platform is used to manage the disk lights of all disks in the entire distributed storage cluster. Figure 2 As shown, the disk light management platform includes a disk light management database, a disk light management module, a device view interface, a disk fault detection module, and a disk light management interface that provides external access and maintenance of the disk light management database. The disk light management interface is provided on the device view interface. This embodiment may include the following:
[0072] The disk light management module first maintains the locator light and fault light management commands corresponding to different models and topologies in the disk light management database through the disk light management interface on the device view interface. The data in the disk light management database includes, but is not limited to, the model name, topology, disk light status query commands, locator light commands, and fault light commands. Locator light commands include the disk locator light on command and the disk locator light off command, and fault light commands include the disk fault light on command and the disk fault light off command. When new models or topologies are added later, adaptation is completed by simply maintaining the new commands in the data through the disk light management interface.
[0073] The device view interface is used to display device view information, such as disk information. This interface can display the status of the disk light and perform management operations on the disk positioning light, such as turning the disk positioning light on and off.
[0074] The disk failure detection module deploys a scheduled disk failure detection task on each node in the distributed storage cluster. After the task is started, it periodically calls the disk failure detection command to detect disk failures. When a disk failure is detected, the disk indicator management interface is called to illuminate the faulty disk's fault indicator and an alarm is generated to notify maintenance personnel of the disk failure. When the fault is detected and recovered, the disk indicator management interface is called to extinguish the fault indicator and restore the disk failure alarm.
[0075] As can be seen from the above, this embodiment records the disk management commands in a configured manner into a database. For different models and different topologies, the corresponding disk light management commands are called to implement the disk light management function, which is easy to expand and maintain and has strong practicality.
[0076] It should be noted that there is no strict order in which the steps in this application are performed. As long as they comply with the logical order, these steps can be performed simultaneously or in a predetermined order. Figure 1-Figure 2 This is just a schematic and does not mean that this is the only execution order.
[0077] This application also provides a corresponding device for the disk light management method, further enhancing the practicality of the method. The device can be described from the perspective of functional modules and hardware. The following describes the disk light management device provided by this application, which is used to implement the disk light management method provided by this application. In this embodiment, the disk light management device may include or be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to implement the disk light management method disclosed in Example 1. The program module referred to in this application refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the disk light management device in a storage medium than the program itself. The following description will specifically introduce the functions of each program module in this embodiment. The disk light management device described below and the disk light management method described above can be referenced in a corresponding manner.
[0078] From the perspective of functional modules, see Figure 3 , Figure 3 This is a structural diagram of a disk light management device provided by this application in a specific embodiment. The device may include:
[0079] The database establishment module 301 is used to establish a disk light management database and create a disk light management interface; the disk light management database is used to record the corresponding relationship between the storage product name, topology structure and disk light management command;
[0080] A thread construction module 302 is used to pre-create a fault detection thread and its corresponding operation mechanism;
[0081] The disk light management module 303 is used to call the disk light management interface when it detects that the user has issued a disk light management instruction through the device view interface, and operate the disk light of the corresponding disk based on the corresponding relationship; the device view interface is used to display the storage product view information containing disk information; based on the operation mechanism, the fault detection thread is automatically run, and according to the fault detection situation, the disk light management interface is called to operate the disk fault light of the corresponding disk based on the corresponding relationship.
[0082] Exemplarily, in some implementations of this embodiment, the above-mentioned database establishment module 301 includes a database maintenance unit, which is used to obtain the target disk light management command corresponding to the new storage product when a new storage product is detected; call the disk light management interface, and add the product name of the new storage product, the topological structure of the new storage product and the correspondence between the target disk light management command in the disk light management database.
[0083] As an exemplary implementation of the above embodiment, the above database maintenance unit is also used to: when it is detected that the topology structure of the target storage product has changed, obtain the new topology structure of the target storage product; based on the new topology structure, call the disk light management interface to update the correspondence between the product name, topology structure and disk light management command of the target storage product in the disk light management database.
[0084] As another exemplary implementation of the above embodiment, the above database maintenance unit can also be used to: when it is detected that the disk light management command of the target storage product has changed, obtain the new disk light management command of the target storage product; based on the new disk light management command, call the disk light management interface to update the correspondence between the product name, topology structure and disk light management command of the target storage product in the disk light management database.
[0085] Illustratively, in some other implementations of this embodiment, the disk light management module 303 may also be used to: upon detecting that a user has issued a disk positioning instruction through the device view interface, read the destination product name and destination topology of the storage product to which the destination disk belongs based on the disk positioning instruction; call the disk light management interface, obtain the destination disk positioning light lighting command from the disk light management database based on the destination product name and destination topology, and light up the positioning light of the destination disk according to the destination disk light positioning lighting command. Upon detecting that a user has issued a disk light off command through the device view interface, read the destination product name and destination topology of the storage product to which the destination disk belongs based on the disk off instruction; call the disk light management interface, obtain the destination disk positioning light off command from the disk light management database based on the destination product name and destination topology, and light up the positioning light of the destination disk according to the destination disk light positioning off command.
[0086] Exemplarily, in some other implementations of this embodiment, the above-mentioned disk light management module 303 can also be used for: when it is detected that the user issues a disk light status query instruction through the device view interface, reading the destination product name and destination topology structure of the storage product to which the destination disk belongs based on the disk light status query instruction; calling the disk light management interface, and obtaining the destination disk light status acquisition command from the disk light management database according to the destination product name and destination topology structure; obtaining the current status of the disk light of the destination disk according to the destination disk light status acquisition command, and displaying it in the corresponding position of the device view interface.
[0087] Exemplarily, in some other implementations of this embodiment, the above-mentioned disk light management module 303 can also be used to: automatically run the fault detection thread based on the operation mechanism; when a fault is detected on the destination disk, obtain the destination product name and destination topology structure of the storage product to which the destination disk belongs; call the disk light management interface, obtain the destination disk fault light lighting command from the disk light management database according to the destination product name and destination topology structure, and light up the fault light of the destination disk according to the destination disk fault light lighting command; when the fault recovery of the destination disk is detected, call the disk light management interface, obtain the destination disk fault light extinguishing command from the disk light management database according to the destination product name and destination topology structure, and turn off the fault light of the destination disk according to the destination disk fault light extinguishing command.
[0088] The functions of the functional modules of the disk light management device of the present application can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0089] As can be seen from the above, this embodiment can achieve efficient management of disk lights.
[0090] The disk light management device mentioned above is described from the perspective of functional modules. Furthermore, the present application also provides an electronic device, which is described from the perspective of hardware. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application in one embodiment. Figure 4 As shown, the electronic device includes a memory 40 for storing computer programs; a processor 41 for implementing the steps of the disk light management method mentioned in any of the above embodiments when executing the computer program.
[0091] The processor 41 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 41 may also be a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 41 may be implemented in at least one hardware form selected from the group consisting of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 41 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 41 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 41 may also include an AI (Artificial Intelligence) processor, which is used to handle computing operations related to machine learning.
[0092] The memory 40 may include one or more computer-readable storage media, which may be non-transitory. The memory 40 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the memory 40 may be an internal storage unit of the electronic device, such as a server's hard drive. In other embodiments, the memory 40 may also be an external storage device of the electronic device, such as a plug-in hard drive equipped on a server, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 40 may include both an internal storage unit and an external storage device of the electronic device. The memory 40 may be used not only to store application software installed in the electronic device and various data, such as program code used in executing the disk light management method, but also to temporarily store data that has been output or is about to be output. In this embodiment, the memory 40 is used to store at least the following computer program 401, which, when loaded and executed by the processor 41, is capable of implementing the relevant steps of the disk light management method disclosed in any of the aforementioned embodiments. In addition, the resources stored in memory 40 may also include an operating system 402 and data 403, which may be stored in a temporary or permanent manner. Operating system 402 may include Windows, Unix, Linux, etc. Data 403 may include, but is not limited to, data corresponding to disk light management results.
[0093] In some embodiments, the electronic device may further include a display screen 42, an input / output interface 43, a communication interface 44 or a network interface, a power supply 45 and a communication bus 46. Among them, the display screen 42 and the input / output interface 43, such as a keyboard, belong to the user interface, and the user interface may also include a standard wired interface, a wireless interface, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 44 may include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which is generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 46 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0094] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, for example, it may also include a sensor 47 to realize various functions.
[0095] The functions of the various functional modules of the electronic device described in this application can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0096] As can be seen from the above, this embodiment can achieve efficient management of disk lights.
[0097] It is understood that if the disk light management method in the above-mentioned embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the portion that contributes to the relevant technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable ROM, a register, a hard drive, a multimedia card, a card-type memory (such as an SD or DX memory), a magnetic memory, a removable disk, a CD-ROM, a magnetic disk, or an optical disk, and other media that can store program code.
[0098] Based on this, the present application also provides a readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the disk light management method described in any of the above embodiments.
[0099] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. References to the same or similar parts between the various embodiments are sufficient. The hardware disclosed in the embodiments, including devices and electronic devices, is described briefly because it corresponds to the methods disclosed in the embodiments. For relevant details, refer to the method description.
[0100] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0101] The above describes in detail the disk light management method, device, electronic device, and readable storage medium provided by this application. Specific examples are used herein to illustrate the principles and implementation methods of this application. The above examples are intended only to facilitate understanding of the method and its core concept. It should be noted that those skilled in the art may make various improvements and modifications to this application without departing from the principles of this application, and such improvements and modifications fall within the scope of protection of the claims of this application.
Claims
1. A disk light management method, characterized in that: include: Establish a disk light management database in advance and create a disk light management interface; The disk light management database is used to record the corresponding relationship between the storage product name, topology structure and disk light management command; wherein the topology structure includes the connection mode of different disk array cards and expansion cards, and different connection modes correspond to different disk light management commands; Pre-create fault detection threads and their corresponding operation mechanisms; When it is detected that the user issues a disk light management instruction through the device view interface, the disk light management interface is called to operate the disk light of the corresponding disk based on the corresponding relationship; the device view interface is used to display storage product view information including disk information; Automatically running the fault detection thread based on the operation mechanism, calling the disk light management interface according to the fault detection situation, and operating the disk fault light of the corresponding disk based on the corresponding relationship; After the disk light management database is established, the following steps are also included: When a new storage product is detected, obtaining a target disk light management command corresponding to the new storage product; The disk light management interface is called to add a corresponding relationship between the product name of the new storage product, the topology structure of the new storage product and the target disk light management command in the disk light management database.
2. The disk light management method according to claim 1, characterized in that: After the disk light management database is established, the following steps are also included: When detecting that the topology structure of the target storage product has changed, obtaining the new topology structure of the target storage product; Based on the new topology, the disk light management interface is called to update the corresponding relationship between the product name, topology and disk light management command of the target storage product in the disk light management database.
3. The disk light management method according to claim 1, characterized in that: After the disk light management database is established, the following steps are also included: When detecting that the disk light management command of the target storage product has changed, obtaining a new disk light management command of the target storage product; Based on the new disk light management command, the disk light management interface is called to update the corresponding relationship between the product name and topology structure of the target storage product and the disk light management command in the disk light management database.
4. The disk light management method according to any one of claims 1 to 3, characterized in that: When it is detected that the user issues a disk light management instruction through the device view interface, the disk light management interface is called, and the disk light of the corresponding disk is operated based on the corresponding relationship, including: When it is detected that the user issues a disk positioning instruction through the device view interface, the target product name and the target topology structure of the storage product to which the target disk belongs are read based on the disk positioning instruction; the disk light management interface is called, and a target disk positioning light lighting command is obtained from the disk light management database according to the target product name and the target topology structure, and the positioning light of the target disk is lit according to the target disk light positioning lighting command; When it is detected that the user issues a disk light off command through the device view interface, the destination product name and destination topology structure of the storage product to which the destination disk belongs are read based on the disk off command; the disk light management interface is called, and the destination disk positioning light off command is obtained from the disk light management database according to the destination product name and the destination topology structure, and the positioning light of the destination disk is turned on according to the destination disk light positioning off command.
5. The disk light management method according to any one of claims 1 to 3, characterized in that: When it is detected that the user issues a disk light management instruction through the device view interface, the disk light management interface is called, and the disk light of the corresponding disk is operated based on the corresponding relationship, including: When it is detected that the user sends a disk light status query instruction through the device view interface, the target product name and target topology structure of the storage product to which the target disk belongs are read based on the disk light status query instruction; Call the disk light management interface, and obtain the destination disk light status acquisition command from the disk light management database according to the destination product name and the destination topology structure; obtain the current status of the disk light of the destination disk according to the destination disk light status acquisition command, and display it in the corresponding position of the device view interface.
6. The disk light management method according to any one of claims 1 to 3, characterized in that: The method of automatically running the fault detection thread based on the operation mechanism, calling the disk light management interface according to the fault detection situation, and operating the disk fault light of the corresponding disk based on the corresponding relationship includes: Automatically running the fault detection thread based on the operation mechanism; When a failure of a destination disk is detected, the destination product name and destination topology of the storage product to which the destination disk belongs are obtained; the disk light management interface is called, and a destination disk fault light lighting command is obtained from the disk light management database according to the destination product name and the destination topology, and the fault light of the destination disk is lit according to the destination disk fault light lighting command; When the failure recovery of the destination disk is detected, the disk light management interface is called, and the destination disk fault light extinguishing command is obtained from the disk light management database according to the destination product name and the destination topology structure, and the fault light of the destination disk is extinguished according to the destination disk fault light extinguishing command.
7. A disk light management device, characterized in that: include: Database establishment module, used to establish disk light management database and create disk light management interface; The disk light management database is used to record the corresponding relationship between the storage product name, topology structure and disk light management command; wherein the topology structure includes the connection mode of different disk array cards and expansion cards, and different connection modes correspond to different disk light management commands; Thread building module, used to pre-create fault detection threads and their corresponding operation mechanisms; The disk light management module is configured to, upon detecting that a user has issued a disk light management instruction through a device view interface, call the disk light management interface and operate the disk light of the corresponding disk based on the corresponding relationship; the device view interface is configured to display storage product view information containing disk information; automatically run the fault detection thread based on the operation mechanism, call the disk light management interface according to the fault detection result, and operate the disk fault light of the corresponding disk based on the corresponding relationship; The disk light management device is also used to: when a new storage product is detected, obtain the target disk light management command corresponding to the new storage product; call the disk light management interface, and add the corresponding relationship between the product name of the new storage product, the topological structure of the new storage product and the target disk light management command to the disk light management database.
8. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the processor is configured to implement the steps of the disk light management method according to any one of claims 1 to 6 when executing a computer program stored in the memory.
9. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the disk light management method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Disk positioning method and device
CN105512003A
Hard disk positioning method and device, electronic equipment and storage medium
CN110427308A
Disk fault notification method and device and computer readable medium
CN113094201A
Hard disk status lamp control method, device and equipment and readable storage medium
CN116126643A