Storage management software adaptation method, device, equipment and medium of storage system
By identifying the hardware topology of the storage system and calling the corresponding adaptation logic, the problem of repeated adaptation of storage management software when the hardware topology remains unchanged is solved, and storage system adaptation that is easy to expand and maintain is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2026-04-07
AI Technical Summary
Existing storage management software requires re-adaptation with each new product version, even when the hardware topology remains unchanged, making expansion and maintenance difficult.
By identifying the hardware topology of the storage system and calling the corresponding adaptation logic, the correspondence between the disk logical slot number and the disk letter is determined, thereby achieving the adaptation of the storage management software and the storage system under the hardware topology.
It avoids unnecessary adaptation processes, is easy to expand and maintain, and reduces the workload of adaptation when hardware topology changes.
Smart Images

Figure CN115129261B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage system, and particularly relates to a storage management software and storage system adaptation method and device, equipment and medium. BACKGROUND
[0002] With the continuous progress of technology, the storage system is also constantly updated to iterate products. In the updating process, the hardware topology structure may be changed. The storage management software is used to manage the storage system, which is a common storage system management method at present. In this management method, the storage management software needs to be adapted to the corresponding hardware topology structure of the storage system.
[0003] The existing adaptation method usually starts from the product name. Each version of the product has a known topology, and the corresponding adaptation logic is provided according to the known topology. This makes it necessary to re-adapt even if the hardware topology structure does not change when a new product version is added. The hardware adaptation is bound to the product name, which is not easy to extend and maintain. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a storage management software and storage system adaptation method, device, equipment and medium, which can avoid unnecessary adaptation process of the storage management software and the storage system, and is easy to extend and maintain. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a storage management software and storage system adaptation method, comprising:
[0006] identifying the hardware topology structure of the storage system;
[0007] calling the adaptation logic corresponding to the hardware topology structure, and determining the disk logical slot number and the correspondence between the disk drive letter and the disk logical slot number in the storage system by using the adaptation logic, to complete the adaptation of the storage management software and the storage system under the hardware topology structure.
[0008] Optionally, the identification of the hardware topology structure of the storage system comprises:
[0009] identifying the type and number of disk array cards, the number of expansion cards and the connection relationship between the expansion cards and the disk array cards accessed to the storage system, to obtain the hardware topology structure of the storage system.
[0010] Optionally, the calling of the adaptation logic corresponding to the hardware topology structure comprises:
[0011] constructing an adaptation logic name based on the type and number of disk array cards and the number of expansion cards;
[0012] The adaptation logic corresponding to the hardware topology is invoked based on the adaptation logic name.
[0013] Optionally, determining the logical slot number of the disk and the correspondence between the disk drive letter and the logical slot number of the disk in the storage system includes:
[0014] Determine the disk logical slot number and the first correspondence between the disk serial number and the disk logical slot number in the storage system;
[0015] Obtain the second correspondence between disk drive letters and disk serial numbers in the storage system;
[0016] Based on the first correspondence and the second correspondence, the correspondence between the disk drive letter and the disk logical slot number is determined.
[0017] Optionally, determining the disk logical slot number and the first correspondence between the disk serial number in the storage system and the disk logical slot number includes:
[0018] The actual slot number of each expansion card in the storage system is obtained through hardware management commands;
[0019] Based on the hardware topology and the actual slot number, the disk logical slot number is determined, and the first correspondence between the disk serial number and the disk logical slot number is determined.
[0020] Optionally, determining the logical disk slot number based on the hardware topology and the actual slot number includes:
[0021] Based on the hardware topology, the expansion card to be offset and its offset amount are determined;
[0022] The disk logical slot number of the expansion card to be offset is determined based on the offset and the actual slot number of the expansion card to be offset.
[0023] The actual slot number of the non-offset expansion card is determined as the disk logical slot number of the non-offset expansion card.
[0024] Optionally, determining the expansion card to be offset and its offset based on the hardware topology includes:
[0025] If any of the disk array cards is connected to multiple expansion cards, the SAS addresses of the multiple expansion cards are obtained, the expansion card connection relationship of the multiple expansion cards is determined based on the SAS addresses, and the hardware topology determines the expansion card to be offset and the offset of the expansion card to be offset based on the expansion card connection relationship.
[0026] In a second aspect, the application discloses an adaptation device of storage management software and a storage system, comprising:
[0027] a topology structure identification module, configured to identify a hardware topology structure of the storage system;
[0028] an adaptation logic processing module, configured to call adaptation logic corresponding to the hardware topology structure, and determine a disk logical slot number and a correspondence between a disk drive letter and the disk logical slot number in the storage system by using the adaptation logic, so as to complete adaptation of the storage management software and the storage system under the hardware topology structure.
[0029] Optionally, the topology structure identification module is specifically configured to identify a type and a quantity of a disk array card, a quantity of an expansion card and a connection relationship between the expansion card and the disk array card accessed to the storage system, and obtain the hardware topology structure of the storage system.
[0030] Optionally, the adaptation logic processing module is specifically configured to construct an adaptation logic name based on the type and the quantity of the disk array card and the quantity of the expansion card, and call the adaptation logic corresponding to the hardware topology structure based on the adaptation logic name.
[0031] Optionally, the adaptation logic processing module specifically comprises:
[0032] a first correspondence determining submodule, configured to determine a disk logical slot number and a first correspondence between a disk serial number and the disk logical slot number in the storage system;
[0033] a second correspondence obtaining submodule, configured to obtain a second correspondence between a disk drive letter and a disk serial number in the storage system;
[0034] a drive letter slot number correspondence determining submodule, configured to determine a correspondence between the disk drive letter and the disk logical slot number based on the first correspondence and the second correspondence.
[0035] Optionally, the first correspondence determining submodule specifically comprises:
[0036] a real slot number obtaining unit, configured to obtain a real slot number of each of the expansion cards in the storage system by using a hardware management command;
[0037] a first correspondence determining unit, configured to determine a disk logical slot number based on the hardware topology structure and the real slot number, and determine a first correspondence between a disk serial number and the disk logical slot number.
[0038] Optionally, the first correspondence determining unit is specifically configured to determine the to-be-offset expansion card and an offset amount of the to-be-offset expansion card based on the hardware topology; determine a disk logical slot number of the to-be-offset expansion card based on the offset amount and a real slot number of the to-be-offset expansion card; and determine a real slot number of a non-to-be-offset expansion card as a disk logical slot number of the non-to-be-offset expansion card.
[0039] Optionally, the first correspondence determining unit is specifically configured to, if any one of the disk array cards is connected with multiple expansion cards, acquire SAS addresses of the multiple expansion cards, determine expansion card connection relationships of the multiple expansion cards based on the SAS addresses, and determine the to-be-offset expansion card and the offset amount of the to-be-offset expansion card based on the hardware topology and the expansion card connection relationships.
[0040] In a third aspect, the present application discloses an electronic device, comprising a memory and a processor, wherein:
[0041] The memory is configured to store a computer program.
[0042] The processor is configured to execute the computer program to implement the storage management software and storage system adaptation method.
[0043] In a fourth aspect, the present application discloses a computer readable storage medium configured to store a computer program, wherein the computer program is executed by a processor to implement the storage management software and storage system adaptation method.
[0044] It can be seen that the present application first identifies the hardware topology of the storage system, then calls the corresponding adaptation logic of the hardware topology, and determines the corresponding relationship between the disk logical slot number and the disk drive letter in the storage system by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology. That is, the present application identifies the hardware topology of the storage system, calls the corresponding adaptation logic to complete the adaptation of the storage management software and the storage system under the corresponding hardware topology. In this way, when the hardware topology does not change, there is no need to re-adapt, which can avoid unnecessary adaptation process of the storage management software and the storage system. When a new hardware topology is added, the corresponding adaptation logic can be added, which does not affect the original adaptation logic, and is easy to expand and maintain. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only constitute a part of the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0046] Figure 1 A flow chart of an adaptation method of a storage management software and a storage system disclosed by the embodiments of the present application is provided.
[0047] Figure 2 A flow chart of a specific adaptation method of a storage management software and a storage system disclosed by the embodiments of the present application is provided.
[0048] Figure 3 A structural schematic diagram of an adaptation device of a storage management software and a storage system disclosed by the embodiments of the present application is provided.
[0049] Figure 4 A principle structural diagram of an electronic device disclosed by the embodiments of the present application is provided. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only constitute a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0051] The existing adaptation method of a storage management software and a storage system is usually started from a product name, and each version product is under a known topology. The corresponding adaptation logic is provided according to the known topology, which makes it necessary to re-adapt even if the hardware topology structure does not change when a new product version is added. The hardware adaptation and product name are bound, which is not easy to expand and maintain. Therefore, the present application provides an adaptation scheme of a storage management software and a storage system, which can avoid unnecessary adaptation process of the storage management software and the storage system, and is easy to expand and maintain.
[0052] Referring to Figure 1 The embodiments of the present application disclose an adaptation method of a storage management software and a storage system, which comprises:
[0053] Step S11: identifying the hardware topology structure of the storage system.
[0054] In a specific embodiment, the type and number of disk array cards accessing the storage system, the number of expander cards, and the connection relationship between the expander cards and the disk array cards can be identified to obtain the hardware topology of the storage system.
[0055] Further, the type and number of disk array cards connected to the PCI bus of the storage system can be obtained by invoking the lspci hardware command. The number of expander cards accessing the storage system and the connection relationship between the disk array cards and the expander cards can be obtained by invoking the lsscsi command to obtain the hardware topology of the storage system. The disk array cards include but are not limited to RAID (Redundant Arrays of Independent Disks) cards, SAS (Serial Attached SCSI) cards, and PMC (Sierra) cards, and can be extended based on the type of newly added disk array cards. The SAS card can be a SAS2008 and SAS3008 disk array card. The RAID card can be a SAS3408 and SAS3508 disk array card. The lsscsi command is a command for querying device information and can list SCSI (Small Computer System Interface) devices (or hosts) and their attributes. Lspci is a tool for displaying all PCI (Peripheral Component Interconnect) bus devices or all devices connected to the bus in the system.
[0056] Step S12: invoking the adaptation logic corresponding to the hardware topology, and determining the disk logical slot number and the correspondence between the disk drive letter in the storage system and the disk logical slot number by using the adaptation logic, to complete the adaptation of the storage management software and the storage system under the hardware topology.
[0057] In a specific embodiment, the adaptation logic name can be constructed based on the type and number of disk array cards and the number of expander cards, and the adaptation logic corresponding to the hardware topology can be invoked based on the adaptation logic name. The adaptation logic is an adaptation processing class, and accordingly, invoking the adaptation logic corresponding to the hardware topology includes constructing an adaptation processing class name based on the type and number of disk array cards and the number of expander cards, and invoking the adaptation processing class corresponding to the hardware topology based on the adaptation processing class name. For example, when there is one PMC card connected to three expanders, the final processing class name is pmc_one_expander_three.
[0058] It can be understood that the present application can create corresponding adaptation logic based on different hardware topologies, and when any hardware topology is identified, the corresponding adaptation logic is called for adaptation.
[0059] Further, the embodiments of the present application can use the adaptation logic to perform the following steps:
[0060] Step 00: Determine the disk logical slot number and the first correspondence between the disk serial number and the disk logical slot number in the storage system.
[0061] In an embodiment, the real slot number of each of the expansion cards in the storage system can be obtained through a hardware management command; the disk logical slot number is determined based on the hardware topology and the real slot number, and the first correspondence between the disk serial number and the disk logical slot number is determined.
[0062] The determination of the disk logical slot number based on the hardware topology and the real slot number includes: determining the to-be-offset expansion card and the offset amount of the to-be-offset expansion card based on the hardware topology; determining the disk logical slot number of the to-be-offset expansion card based on the offset amount and the real slot number of the to-be-offset expansion card; determining the real slot number of the non-to-be-offset expansion card as the disk logical slot number of the non-to-be-offset expansion card. Furthermore, if any of the disk array cards is connected to multiple expansion cards, the SAS addresses of the multiple expansion cards are obtained, the expansion card connection relationship of the multiple expansion cards is determined based on the SAS addresses, and the hardware topology determines the to-be-offset expansion card and the offset amount of the to-be-offset expansion card based on the expansion card connection relationship.
[0063] It should be noted that, since the slot numbers of the disks connected to each expander obtained by the hardware command are actually the same, that is, the real slot numbers of the disks on each expander are the same, and need to be logically allocated by the adaptation logic, therefore, different hardware topologies need to correspond to different adaptation logics. Taking a storage system with one pmc card and three expanders as an example, each expander is connected with 12 disks. The backplanes of the three expanders correspond to the front upper backplane (logical slot number allocation is 0 to 11), the front lower backplane (logical slot number allocation is 12 to 23), and the rear backplane (logical slot number allocation is 24 to 35) respectively. The rear backplane is connected to the front lower backplane through wiring. The correspondence between the expander disk slot number and the serial number can be obtained by the sg_ses command. The disk slot numbers connected by the three expanders in the correspondence are all 0 to 11. According to different topologies, the obtained slot numbers are further allocated. The sas address of each expander expansion card and the sas address of the expansion card connected thereto are obtained by the sg_inq command. According to the obtained sas address, when the attached sas address of the backplane of a certain expander A is the sas address of the backplane of another expander B, it indicates that the backplane of the expander A is connected to the backplane of the expander B, and it is concluded that the backplane of the expander A is the rear backplane, which needs to be offset by 24 based on the real slot number, that is, from 0 to 11 to 24 to 35, to obtain the logical slot number allocated in the whole system; the backplane of the expander B is the front lower backplane, which needs to be offset by 12 based on the real slot number, that is, from 0 to 11 to 12 to 23, to obtain the logical slot number allocated in the whole system; the remaining one expander corresponds to the front upper backplane and does not need to be offset. Finally, the correspondence between the serial number and the logical slot number of all the disks is obtained. Other topologies are similar, and the correspondence between the serial number and the logical slot number of all the disks is obtained by a certain offset logic. For example, there are multiple disk array cards in the storage system, each disk array card is connected with one expansion card, and each expansion card is connected with 12 disks. The expansion card corresponding to the first disk array card does not need to be offset, the expansion card corresponding to the second disk array card is offset from 0 to 11 to 12 to 23, and the expansion card corresponding to the second disk array card is offset from 0 to 11 to 24 to 35.
[0064] Step 01: Obtain a second correspondence between the disk drive letter and the disk serial number in the storage system.
[0065] Step 02: Based on the first correspondence and the second correspondence, determine the correspondence between the disk drive letter and the logical slot number of the disk.
[0066] In one implementation, the mapping between disk drive letters and disk serial numbers can be obtained using commands such as `lsblk`. This mapping is then combined with the mapping between disk serial numbers and logical disk slot numbers obtained in step 00 to ultimately obtain the mapping between disk drive letters and logical disk slot numbers in the storage system, thus enabling management software adaptation under the corresponding hardware topology. The `lsblk` command is used to list information about all available block devices.
[0067] In other words, in this embodiment, the adaptation logic calls the corresponding hardware management commands based on the hardware topology to obtain the correspondence between the disk serial number and the disk logical slot number; then, by calling the hardware commands related to the disk letter, it obtains the correspondence between the disk letter and the serial number; finally, it associates these two correspondences to obtain the correspondence between the disk letter and the disk logical slot number. When adding a new product type, as long as the topology remains unchanged, no re-adaptation is required. When the topology changes, only the corresponding processing class needs to be added, making it easy to maintain and expand. This overcomes the problem of the original management software adaptation scheme, which, from a product perspective, requires re-adaptation for each new product version, even if the hardware topology is the same, making maintenance cumbersome.
[0068] For example, see Figure 2 As shown, Figure 2 This is a flowchart illustrating a specific method for adapting storage management software to a storage system, as disclosed in an embodiment of this application. The process begins by obtaining the type and quantity of the disk array card (pmc_1 represents one PMC card, with the newly added card type being the type that can be expanded later). Then, the number of expanders is obtained (expander_3 represents three expanders). Next, the processing class is obtained, named pmc_1_expander_3. Further, SAS or PMC cards do not need to list system disk information, while RAID cards do. Finally, the disk and card information are associated, as are the mappings between disk drive letters and disk serial numbers, and between disk serial numbers and disk logical slot numbers. This ultimately yields the mapping between disk drive letters and disk logical slot numbers in the storage system, achieving software adaptation under the corresponding hardware topology.
[0069] It can be seen that the embodiment of the application first identifies the hardware topology of the storage system, then calls the corresponding adaptation logic of the hardware topology, and determines the disk logical slot number and the correspondence between the disk drive letter in the storage system and the disk logical slot number by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology. That is, the application identifies the hardware topology of the storage system, calls the corresponding adaptation logic to complete the adaptation of the storage management software and the storage system under the corresponding hardware topology. In this way, when the hardware topology does not change, there is no need to re-adapt, and unnecessary adaptation process of the storage management software and the storage system can be avoided. When a new hardware topology is added, the corresponding adaptation logic can be added, which does not affect the original adaptation logic, and is easy to expand and maintain.
[0070] Referring to Figure 3 The embodiment of the application discloses an adaptation device of storage management software and a storage system, which comprises:
[0071] The topology identification module 11 is configured to identify the hardware topology of the storage system.
[0072] The adaptation logic processing module 12 is configured to call the adaptation logic corresponding to the hardware topology, and determine the disk logical slot number and the correspondence between the disk drive letter in the storage system and the disk logical slot number by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology.
[0073] It can be seen that the embodiment of the application first identifies the hardware topology of the storage system, then calls the corresponding adaptation logic of the hardware topology, and determines the disk logical slot number and the correspondence between the disk drive letter in the storage system and the disk logical slot number by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology. That is, the application identifies the hardware topology of the storage system, calls the corresponding adaptation logic to complete the adaptation of the storage management software and the storage system under the corresponding hardware topology. In this way, when the hardware topology does not change, there is no need to re-adapt, and unnecessary adaptation process of the storage management software and the storage system can be avoided. When a new hardware topology is added, the corresponding adaptation logic can be added, which does not affect the original adaptation logic, and is easy to expand and maintain.
[0074] In a specific embodiment, the topology identification module 11 is specifically configured to identify the type and number of disk array cards accessed to the storage system, the number of expansion cards, and the connection relationship between the expansion cards and the disk array cards, to obtain the hardware topology of the storage system.
[0075] In a specific embodiment, the type and number of disk array cards connected to the PCI bus of the storage system can be obtained by invoking the lspci hardware command. The lsscsi command is invoked to obtain the number of expansion cards connected to the storage system and the connection relationship between the disk array cards and the expansion cards, and the hardware topology of the storage system is obtained.
[0076] In a specific embodiment, the adaptation logic processing module 12 is specifically configured to construct an adaptation logic name based on the type and number of disk array cards and the number of expansion cards, and invoke the adaptation logic corresponding to the hardware topology based on the adaptation logic name.
[0077] Further, the adaptation logic processing module 12 specifically comprises:
[0078] A first correspondence determining submodule is configured to determine a first correspondence between a disk logical slot number and a disk serial number in the storage system.
[0079] A second correspondence obtaining submodule is configured to obtain a second correspondence between a disk drive letter and a disk serial number in the storage system.
[0080] A drive letter slot number correspondence determining submodule is configured to determine a correspondence between a disk drive letter and the disk logical slot number based on the first correspondence and the second correspondence.
[0081] The first correspondence determining submodule specifically comprises:
[0082] A real slot number obtaining unit is configured to obtain a real slot number of each of the expansion cards in the storage system through a hardware management command.
[0083] A first correspondence determining unit is configured to determine a disk logical slot number based on the hardware topology and the real slot number, and determine a first correspondence between a disk serial number and the disk logical slot number.
[0084] Further, the first correspondence determining unit is specifically configured to determine a to-be-offset expansion card and an offset amount of the to-be-offset expansion card based on the hardware topology, determine a disk logical slot number of the to-be-offset expansion card based on the offset amount and a real slot number of the to-be-offset expansion card, and determine a real slot number of a non-to-be-offset expansion card as a disk logical slot number of the non-to-be-offset expansion card.
[0085] Further, the first correspondence determining unit is specifically configured to: if any one of the disk array cards is connected with multiple expansion cards, acquire SAS addresses of the multiple expansion cards, determine expansion card connection relationships of the multiple expansion cards based on the SAS addresses, and determine the to-be-offset expansion card and the offset amount of the to-be-offset expansion card based on the expansion card connection relationships.
[0086] Referring to Figure 4 As shown in the drawings, the embodiment of the present application discloses an electronic device 20, comprising a processor 21 and a memory 22; wherein the memory 22 is configured to save a computer program; and the processor 21 is configured to execute the computer program to implement the following steps:
[0087] identify the hardware topology of the storage system;
[0088] call the corresponding adaptation logic of the hardware topology, and determine the correspondence between the disk logical slot number and the disk drive letter in the storage system and the disk logical slot number by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology.
[0089] It can be seen that, in the embodiment of the present application, the hardware topology of the storage system is identified first, then the corresponding adaptation logic of the hardware topology is called, and the correspondence between the disk logical slot number and the disk drive letter in the storage system and the disk logical slot number is determined by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology. That is, the hardware topology of the storage system is identified, and the corresponding adaptation logic is called to complete the adaptation of the storage management software and the storage system under the corresponding hardware topology. In this way, when the hardware topology does not change, it is not necessary to re-adapt, and the unnecessary adaptation process of the storage management software and the storage system can be avoided. When a new hardware topology is added, the corresponding adaptation logic can be added, which does not affect the original adaptation logic, and is easy to expand and maintain.
[0090] In the embodiment, when the processor 21 executes the computer program saved in the memory 22, the following steps can be specifically implemented: identifying the type and quantity of the disk array card accessed to the storage system, the quantity of the expansion card, and the connection relationship between the expansion card and the disk array card, to obtain the hardware topology of the storage system.
[0091] In the embodiment, when the processor 21 executes the computer program saved in the memory 22, the following steps can be specifically implemented: constructing an adaptation logic name based on the type and quantity of the disk array card and the quantity of the expansion card; and calling the adaptation logic corresponding to the hardware topology based on the adaptation logic name.
[0092] In the embodiment, the processor 21 executes the computer program stored in the memory 22, and the following steps can be specifically implemented: determining a disk logical slot number and a first correspondence relationship between a disk serial number and the disk logical slot number in the storage system; obtaining a second correspondence relationship between a disk drive letter and a disk serial number in the storage system; and determining a correspondence relationship between the disk drive letter and the disk logical slot number based on the first correspondence relationship and the second correspondence relationship.
[0093] In the embodiment, the processor 21 executes the computer program stored in the memory 22, and the following steps can be specifically implemented: obtaining a real slot number of each of the expansion cards in the storage system through a hardware management command; determining a disk logical slot number based on the hardware topology and the real slot number, and determining a first correspondence relationship between a disk serial number and the disk logical slot number.
[0094] In the embodiment, the processor 21 executes the computer program stored in the memory 22, and the following steps can be specifically implemented: determining a to-be-offset expansion card and an offset amount of the to-be-offset expansion card based on the hardware topology; determining a disk logical slot number of the to-be-offset expansion card based on the offset amount and a real slot number of the to-be-offset expansion card; and determining a real slot number of a non-to-be-offset expansion card as a disk logical slot number of the non-to-be-offset expansion card.
[0095] In the embodiment, the processor 21 executes the computer program stored in the memory 22, and the following steps can be specifically implemented: if any of the disk array cards is connected with multiple expansion cards, obtaining SAS addresses of the multiple expansion cards, determining an expansion card connection relationship of the multiple expansion cards based on the SAS addresses, and determining a to-be-offset expansion card and an offset amount of the to-be-offset expansion card based on the hardware topology and the expansion card connection relationship.
[0096] In addition, the memory 22 as a carrier for storing resources can be a read-only memory, a random access memory, a magnetic disk or an optical disk, and the storage mode can be temporary storage or permanent storage.
[0097] In addition, the electronic device 20 further comprises a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26; the power supply 23 is configured to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited in detail herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited in detail herein.
[0098] Further, the embodiment of the present application discloses a computer readable storage medium for saving a computer program, wherein the computer program is executed by a processor to implement the following steps:
[0099] identifying the hardware topology of the storage system;
[0100] calling the corresponding adaptation logic of the hardware topology, and determining the corresponding relationship between the disk logical slot number and the disk drive letter in the storage system by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology.
[0101] It can be seen that, in the embodiment of the present application, the hardware topology of the storage system is first identified, then the corresponding adaptation logic of the hardware topology is called, and the corresponding relationship between the disk logical slot number and the disk drive letter in the storage system is determined by using the adaptation logic, so as to complete the adaptation of the storage management software and the storage system under the hardware topology. That is, the hardware topology of the storage system is identified, and the corresponding adaptation logic is called to complete the adaptation of the storage management software and the storage system under the corresponding hardware topology. In this way, when the hardware topology does not change, there is no need to re-adapt, which can avoid unnecessary adaptation process of the storage management software and the storage system. When a new hardware topology is added, the corresponding adaptation logic is added, which does not affect the original adaptation logic, and is easy to expand and maintain.
[0102] In the embodiment, the computer program saved in the computer readable storage medium can be executed by the processor to specifically implement the following steps: identifying the type and number of disk array cards, the number of expansion cards and the connection relationship between the expansion cards and the disk array cards accessed to the storage system, to obtain the hardware topology of the storage system.
[0103] In the embodiment, the computer program stored in the computer readable storage medium can realize the following steps when executed by the processor: constructing an adaptation logic name based on the type and quantity of the disk array card and the quantity of the expansion card; and calling the adaptation logic corresponding to the hardware topology based on the adaptation logic name.
[0104] In the embodiment, the computer program stored in the computer readable storage medium can realize the following steps when executed by the processor: determining a disk logical slot number and a first correspondence between a disk serial number and the disk logical slot number in the storage system; obtaining a second correspondence between a disk drive letter and a disk serial number in the storage system; and determining a correspondence between a disk drive letter and the disk logical slot number based on the first correspondence and the second correspondence.
[0105] In the embodiment, the computer program stored in the computer readable storage medium can realize the following steps when executed by the processor: obtaining a real slot number of each of the expansion cards in the storage system through a hardware management command; determining a disk logical slot number based on the hardware topology and the real slot number, and determining a first correspondence between a disk serial number and the disk logical slot number.
[0106] In the embodiment, the computer program stored in the computer readable storage medium can realize the following steps when executed by the processor: determining a to-be-offset expansion card and an offset amount of the to-be-offset expansion card based on the hardware topology; determining a disk logical slot number of the to-be-offset expansion card based on the offset amount and a real slot number of the to-be-offset expansion card; and determining a real slot number of a non-to-be-offset expansion card as a disk logical slot number of the non-to-be-offset expansion card.
[0107] In the embodiment, the computer program stored in the computer readable storage medium can realize the following steps when executed by the processor: if any one of the disk array cards is connected with multiple expansion cards, obtaining SAS addresses of the multiple expansion cards, determining an expansion card connection relationship of the multiple expansion cards based on the SAS addresses, and determining a to-be-offset expansion card and an offset amount of the to-be-offset expansion card based on the hardware topology and the expansion card connection relationship.
[0108] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiments, the description is relatively simple because it corresponds to the method disclosed in the embodiments. The relevant parts can be referred to the description of the method.
[0109] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, hard disk can be used for tangibly embodying the software module.
[0110] The adaptation method, device, equipment and medium of the storage management software and the storage system provided by the present application are described in detail above, and the principles and implementation modes of the present application are described by applying specific examples in the present article. The above description of the embodiments is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as a limitation of the present application.
Claims
1. A method for adapting storage management software to a storage system, characterized in that, include: Identify the hardware topology of the storage system; The adaptation logic corresponding to the hardware topology is invoked, and the adaptation logic is used to determine the disk logical slot number and the correspondence between the disk drive letter and the disk logical slot number in the storage system, so as to complete the adaptation of the storage management software and the storage system under the hardware topology. The identification of the hardware topology of the storage system includes: identifying the type and number of disk array cards connected to the storage system, the number of expansion cards, and the connection relationship between the expansion cards and the disk array cards, to obtain the hardware topology of the storage system; The step of invoking the adaptation logic corresponding to the hardware topology includes: constructing an adaptation logic name based on the type and quantity of the disk array card and the quantity of the expansion card; invoking the adaptation logic corresponding to the hardware topology based on the adaptation logic name; wherein, corresponding adaptation logic is created based on different hardware topologies, and after any hardware topology is identified, the corresponding adaptation logic is invoked for adaptation. The process of determining the disk logical slot number includes: determining the expansion card to be offset and its offset amount based on the hardware topology; determining the disk logical slot number of the expansion card to be offset based on the offset amount and the actual slot number of the expansion card to be offset; and determining the actual slot number of the non-expansion card to be offset as the disk logical slot number of the non-expansion card to be offset. The step of determining the expansion card to be offset and its offset based on the hardware topology includes: if any disk array card is connected to multiple expansion cards, obtaining the SAS addresses of the multiple expansion cards, determining the expansion card connection relationship based on the SAS addresses, and determining the expansion card to be offset and its offset based on the expansion card connection relationship.
2. The method for adapting storage management software to a storage system according to claim 1, characterized in that, Determining the logical slot number of the disk and the correspondence between the disk drive letter and the logical slot number in the storage system includes: Determine the disk logical slot number and the first correspondence between the disk serial number and the disk logical slot number in the storage system; Obtain the second correspondence between disk drive letters and disk serial numbers in the storage system; Based on the first correspondence and the second correspondence, the correspondence between the disk drive letter and the disk logical slot number is determined.
3. The method for adapting storage management software to a storage system according to claim 2, characterized in that, The determination of the disk logical slot number and the first correspondence between the disk serial number and the disk logical slot number in the storage system includes: The actual slot number of each expansion card in the storage system is obtained through hardware management commands; Based on the hardware topology and the actual slot number, the disk logical slot number is determined, and the first correspondence between the disk serial number and the disk logical slot number is determined.
4. An adapter for storage management software and a storage system, characterized in that, include: Topology identification module, used to identify the hardware topology of the storage system; The adaptation logic processing module is used to call the adaptation logic corresponding to the hardware topology and use the adaptation logic to determine the disk logical slot number and the correspondence between the disk drive letter and the disk logical slot number in the storage system, so as to complete the adaptation of the storage management software and the storage system under the hardware topology. The topology identification module is specifically used to: identify the type and number of disk array cards connected to the storage system, the number of expansion cards, and the connection relationship between the expansion cards and the disk array cards, so as to obtain the hardware topology of the storage system. The adaptation logic processing module is specifically used for: constructing an adaptation logic name based on the type and quantity of the disk array card and the quantity of the expansion card; calling the adaptation logic corresponding to the hardware topology based on the adaptation logic name; wherein, corresponding adaptation logic is created based on different hardware topologies, and after any hardware topology is identified, the corresponding adaptation logic is called for adaptation. The process of determining the disk logical slot number includes: determining the expansion card to be offset and its offset amount based on the hardware topology; determining the disk logical slot number of the expansion card to be offset based on the offset amount and the actual slot number of the expansion card to be offset; and determining the actual slot number of the non-expansion card to be offset as the disk logical slot number of the non-expansion card to be offset. The step of determining the expansion card to be offset and its offset based on the hardware topology includes: if any disk array card is connected to multiple expansion cards, obtaining the SAS addresses of the multiple expansion cards, determining the expansion card connection relationship based on the SAS addresses, and determining the expansion card to be offset and its offset based on the expansion card connection relationship.
5. An electronic device, characterized in that, Includes memory and processor, wherein: The memory is used to store computer programs; The processor is configured to execute the computer program to implement the method for adapting storage management software to a storage system as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, Used to store computer programs, wherein the computer programs, when executed by a processor, implement the storage management software and storage system adaptation method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Server hard disk slot positioning and maintaining method
CN111400121A
Hard disk slot positioning method and system for hard disk backplane, equipment and medium
CN113868054A