CN113760184A - Unified storage case topology information collection method and device - Google Patents

Unified storage case topology information collection method and device Download PDF

Info

Publication number
CN113760184A
CN113760184A CN202110855749.4A CN202110855749A CN113760184A CN 113760184 A CN113760184 A CN 113760184A CN 202110855749 A CN202110855749 A CN 202110855749A CN 113760184 A CN113760184 A CN 113760184A
Authority
CN
China
Prior art keywords
case
expansion card
controller
address
sas
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110855749.4A
Other languages
Chinese (zh)
Other versions
CN113760184B (en
Inventor
宋以强
黄玉龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110855749.4A priority Critical patent/CN113760184B/en
Publication of CN113760184A publication Critical patent/CN113760184A/en
Application granted granted Critical
Publication of CN113760184B publication Critical patent/CN113760184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and a device for collecting topology information of a unified storage case, wherein the method comprises the following steps: s1, building a physical environment of a unified storage case; s2, configuring the SAS expansion cards of the cases to send broadcast when the SAS link of the case changes; s3, when the main cabinet case receives the broadcast or does not receive the broadcast after exceeding a set time threshold, the main cabinet case starts inquiry on all cases to acquire physical information of all cases; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case; and S4, starting from the main cabinet, sequentially searching the lower-level cabinets of the current cabinet through connecting addresses corresponding to the SAS expansion cards, and recording path information until the cabinet topology information of each link is established, thereby completing the collection of the cabinet topology information of the unified storage system. The invention realizes the automatic collection of the topology information of the uniformly stored case, improves the efficiency of collecting the topology information of the case and avoids the probability of human errors.

Description

Unified storage case topology information collection method and device
Technical Field
The invention belongs to the technical field of storage case management, and particularly relates to a method and a device for collecting topology information of a unified storage case.
Background
Unified storage, also known as network unified storage or NUS, is a storage system that can run and manage files and applications on a single device.
When a set of unified storage is applied to a customer site, the unified storage often consists of dozens or even hundreds of cabinets, and the cabinet topology information necessary for managing the cabinets is indispensable. The topology information of the chassis is lacked, the cascade connection of the chassis cannot be known, the chain on which the chassis is located cannot be known, and whether the connection error exists between the chassis cannot be judged.
Based on the importance of the cabinet topology information, accurate cabinet topology information needs to be acquired, at present, a manual counting mode is mainly used, the efficiency is low, the probability is easy to achieve, and particularly when dozens of cabinets or even hundreds of cabinets are subjected to manual counting, the difficulty in manually counting the cabinet topology information is quite large.
Therefore, it is very necessary to provide a method and an apparatus for collecting topology information of a unified storage enclosure in order to overcome the above-mentioned drawbacks in the prior art.
Disclosure of Invention
Aiming at the defects that the prior art has high importance of the topological information of the chassis, but the prior art depends on a manual statistics mode, has low efficiency and is easy to make mistakes, the invention provides a method and a device for collecting the topological information of the uniformly-stored chassis, so as to solve the technical problems.
In a first aspect, the present invention provides a method for collecting topology information of a unified storage enclosure, including the following steps:
s1, establishing a physical environment of a unified storage cabinet, and establishing a physical connection line between a main cabinet and an expansion cabinet;
s2, powering on a main cabinet case and an expansion cabinet case, and sending broadcast in a unified storage system when an SAS expansion card configured with each case changes in an SAS link of the case;
s3, when the main cabinet case receives the broadcast or does not receive the broadcast after exceeding a set time threshold, the main cabinet case starts inquiry on all cases to acquire physical information of all cases; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case;
and S4, starting from the main cabinet, taking the SAS expansion card address of the current cabinet as a tail address, sequentially searching lower-level cabinets of the current cabinet by searching the SAS expansion card connection address corresponding to the tail address, and recording path information until cabinet topology information of each link is established, thereby completing the collection of the cabinet topology information of the unified storage system.
Further, the step S1 specifically includes the following steps:
s11, establishing physical connection between the SAS expansion card of each controller of the main cabinet case and the SAS expansion card of one controller of the expansion cabinet case;
and S12, establishing physical connection between the SAS expansion cards of the controllers of the extension cabinet chassis and the SAS expansion card of one controller of the corresponding descending extension cabinet chassis. The SAS expansion card interfaces of the main cabinet chassis are all downlink interfaces, and the SAS expansion card interfaces of the expansion cabinet chassis are generally two, one is an uplink interface and the other is a downlink interface.
Furthermore, the main cabinet case and the expansion cabinet case both adopt double-control storage, namely comprise two controllers; the SAS expansion card of one controller of the main cabinet case has four interfaces, and the SAS expansion card of one controller of the expansion cabinet case has two interfaces. The dual-control storage two controllers are standby each other.
Further, the step S2 specifically includes the following steps:
s21, powering on the main cabinet case and the expansion cabinet case, starting the unified storage system to work, and completing system initialization;
s22, binding each controller of the main cabinet case with a node respectively;
s23, recording the ID number of the controller where the node is located by the node;
and S24, when the SAS expansion cards of each controller of each chassis are configured to detect that the SAS link of the controller in which the SAS expansion cards are located changes, broadcasting is sent in the unified storage system. The preconfiguration SAS expander card has a function of discovering a change in topology information.
Further, the step S3 specifically includes the following steps:
s31, the main cabinet case judges whether a broadcast sent by a certain case is received;
if yes, go to step S33;
if not, go to step S32;
s32, the main cabinet case judges whether the unreceived broadcasting time exceeds a set time threshold value;
if yes, go to step S33;
if not, returning to the step S31;
s33, the main cabinet case starts inquiry on all cases in the unified storage system through the nodes bound by the controllers of the main cabinet case, and physical information of all cases is obtained and stored; the physical information comprises PSU information, fan information and controller information in the case; the controller information includes an SAS expansion card address and an SAS expansion card connection address of the controller. When the topology information is found to be changed according to the function configured by the SAS expansion card or the topology information is not acquired for a long time, the inquiry can be started, and the physical information of each case is updated.
Further, the step S4 specifically includes the following steps:
s41, starting from the main cabinet case, positioning an interface of an SAS expansion card of a controller of the main cabinet case;
s42, judging whether the positioning interface is connected with equipment or not;
if yes, inquiring the address of the SAS expansion card of the positioning interface, and taking the address of the SAS expansion card as a tail address;
if not, go to step S47;
s43, acquiring all SAS expansion card connection addresses from the stored physical information of each chassis;
s44, judging whether an SAS expansion card connection address identical to the tail address can be found;
if yes, go to step S45;
if not, go to step S47;
s45, acquiring a case where the SAS expansion card connection address is located and a controller where the SAS expansion card connection address is located, and storing the SAS expansion card connection address corresponding to the case, the controller and the link level where the SAS expansion card connection address is located;
s46, the SAS expansion card connecting address is taken as a tail address, a downlink interface of a controller where the SAS expansion card connecting address is located is taken as a positioning interface, and the step S43 is returned;
s47, judging that the current interface of the current controller of the current case is the tail end of the current link;
s48, judging whether all controllers of the main cabinet chassis are positioned completely;
if not, positioning an interface of the next controller of the main cabinet case, and returning to the step S42;
if yes, counting the case, the controller, the interface and the link level of each stored SAS expansion card connection address corresponding to the case, the controller and the interface, generating the topology information of the unified storage case, and ending. And by setting a tail address from the main cabinet case and combining with SAS expansion card connection address query, positioning all levels of cases on one link step by step until the topological information of the whole link is completed, and then completing the establishment of the topological information of all links, thereby realizing the final collection of the topological information of the uniformly stored cases.
Further, the step S45 specifically includes the following steps:
s451, creating a path topology array at each controller node of the main cabinet case;
s452, acquiring a case where a current SAS expansion card connection address is located and a controller where the current SAS expansion card connection address is located, recording the ID of the case where the current SAS expansion card connection address is located and the ID of the controller where the current SAS expansion card connection address is located, distributing a link ID, and generating a path record;
s453, judging whether the chassis where the current SAS expansion card connecting address is located is a primary chassis in the current link or not;
if yes, go to step S454;
if not, acquiring the previous link ID of the chassis where the current SAS expansion card connection address is located in the current link, writing the previous link ID into the path record, and entering step S454;
s454, putting the path record into a path topology array. Each controller-bound node in the main cabinet chassis maintains an array for storing topology information related to the controller's links.
In a second aspect, the present invention provides a unified storage enclosure topology information collecting device, including:
the physical environment building module is used for building a physical environment of the unified storage cabinet and building a physical connection line between the main cabinet case and the expansion cabinet case;
the SAS expansion card configuration module is used for electrifying the main cabinet case and the expansion cabinet case, and transmitting broadcast in the unified storage system when an SAS link of each case is configured to change;
the physical information query module is used for starting query on all the cabinets by the main cabinet when the main cabinet receives the broadcast or does not receive the broadcast after the set time threshold is exceeded, and acquiring the physical information of each cabinet; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case;
and the case topology information establishing module is used for starting from the main case, taking the SAS expansion card address of the current case as a tail address, sequentially searching the next-level cases of the current case by searching the SAS expansion card connection address corresponding to the tail address, and recording path information until the case topology information of each link is established, thereby completing the collection of the case topology information of the unified storage system.
Further, the physical environment building module comprises:
the primary connection establishing unit is used for establishing physical connection between the SAS expansion card of each controller of the main cabinet case and the SAS expansion card of one controller of the expansion cabinet case;
the second-level connection establishing unit is used for establishing physical connection between the SAS expansion card of each controller of the expansion cabinet case and the SAS expansion card of one controller of the corresponding descending expansion cabinet case;
the SAS expansion card configuration module comprises:
the system initialization unit is used for electrifying the main cabinet case and the expansion cabinet case, starting the unified storage system and completing system initialization;
the controller and node binding unit is used for binding each controller of the main cabinet case with a node respectively;
a controller ID recording unit used for recording the ID number of the controller where the node is located by the node;
and the SAS expansion card configuration unit is used for configuring the SAS expansion cards of all the controllers of all the chassis to send broadcast in the unified storage system when detecting that the SAS link of the controller in which the SAS expansion cards are located changes.
Further, the physical information query module comprises:
the broadcast receiving and judging unit is used for judging whether a broadcast sent by a certain case is received by the main cabinet case;
the time length judging unit is used for judging whether the broadcast non-receiving time exceeds a set time threshold value or not by the main cabinet case when the broadcast is not received;
the physical information query unit is used for starting query on all the cases in the unified storage system by the nodes bound by the controllers of the main cabinet case when the main cabinet case receives the broadcast or does not receive the broadcast for a time period exceeding a set time threshold value, and acquiring and storing the physical information of each case; the physical information comprises PSU information, fan information and controller information in the case; the controller information comprises an SAS expansion card address and an SAS expansion card connection address of the controller;
the case topology information establishing module comprises:
the interface positioning unit is used for positioning one interface of the SAS expansion card of one controller of the main cabinet case from the main cabinet case;
the positioning interface is connected with the equipment judgment unit and is used for judging whether equipment is connected with the positioning interface or not;
the tail address setting unit is used for inquiring the SAS expansion card address of the positioning interface when the positioning interface is connected with equipment, and taking the SAS expansion card address as a tail address;
the SAS expansion card connection address acquisition unit is used for acquiring all SAS expansion card connection addresses from the stored physical information of each chassis;
the tail address comparison unit is used for judging whether the SAS expansion card connection address same as the tail address can be found or not;
the case and controller positioning unit is used for acquiring a case where the SAS expansion card connection address is located and a controller where the SAS expansion card connection address is located when the SAS expansion card connection address identical to the tail address is found, and storing the SAS expansion card connection address corresponding to the case, the controller and the link level where the SAS expansion card connection address is located;
the tail address resetting unit takes the SAS expansion card connecting address as a tail address and takes a downlink interface of a controller where the SAS expansion card connecting address is located as a positioning interface;
the link end judging unit is used for judging that the current interface of the current controller of the current case is the end of the current link when the positioning interface has no equipment connection or when an SAS expansion card connection address which is the same as the tail address is found;
the controller positioning completion judging unit is used for judging whether all the controllers of the main cabinet chassis are positioned completely;
the controller relocation unit is used for locating one interface of the next controller of the main cabinet when the controller of the main cabinet is not located;
and the case topology information generating unit is used for counting the case, the controller, the interface and the link level of each stored SAS expansion card connecting address corresponding to the case, the controller and the interface when all the controllers of the main cabinet case are positioned, and generating the unified storage case topology information.
The beneficial effect of the invention is that,
the method and the device for collecting the topology information of the unified storage case realize the automatic collection of the topology information of the unified storage case, can collect the topology information of the case at regular time, and can collect the topology information of the case when the topology information of the case changes, thereby improving the efficiency of collecting the topology information of the case and avoiding the probability of human errors.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a method for collecting topology information of a unified storage enclosure according to the present invention.
Fig. 2 is a schematic flow chart of a unified storage enclosure topology information collection method according to the present invention.
Fig. 3 is a third schematic flow chart of a unified storage enclosure topology information collection method according to the present invention.
FIG. 4 is a schematic diagram of a unified storage enclosure topology connection of the present invention.
FIG. 5 is a schematic diagram of a method for collecting topology information of a unified storage enclosure according to the present invention.
In the figure, 1-physical environment building module; 1.1-a primary connection establishing unit; 1.2-a secondary connection establishing unit; 2-SAS expansion card configuration module; 2.1-a system initialization unit; 2.2-controller and node binding unit; 2.3-controller ID recording unit; 2.4-SAS expansion card configuration unit; 3-a physical information query module; 3.1-broadcast reception judging unit; 3.2-duration judging unit; 3.3-a physical information query unit; 3.4-; 4-a chassis topology information establishing module; 4.1-interface positioning unit; 4.2-positioning the interface connection equipment judging unit; 4.3-tail address setting unit; 4.4-SAS expansion card connecting address obtaining unit; 4.5-tail address comparison unit; 4.6-case and controller positioning unit; 4.7-tail address resetting unit; 4.8-link end decision unit; 4.9-a controller positioning completion judging unit; 4.10-controller relocation unit; 4.11-a chassis topology information generating unit; m1-main cabinet; k1 — first extension cabinet; k2 — second expansion cabinet; k3-third expansion cabinet; c1 — first controller; c2 — first controller; a1 — first interface; a2 — second interface; a3 — third interface; a 4-fourth interface.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The SAS is a Serial Attached SCSI (Small computer System interface) which is short for Serial Attached SCSI (Small computer System interface), is a Serial disk interface oriented to enterprise-level application, integrates the advantages of parallel SCSI and Serial connection technology, and is a multi-level point-to-point protocol taking a Serial communication protocol as a basic framework.
Example 1:
as shown in fig. 1, the present invention provides a method for collecting topology information of a unified storage enclosure, including the following steps:
s1, establishing a physical environment of a unified storage cabinet, and establishing a physical connection line between a main cabinet and an expansion cabinet;
s2, powering on a main cabinet case and an expansion cabinet case, and sending broadcast in a unified storage system when an SAS expansion card configured with each case changes in an SAS link of the case;
s3, when the main cabinet case receives the broadcast or does not receive the broadcast after exceeding a set time threshold, the main cabinet case starts inquiry on all cases to acquire physical information of all cases; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case;
and S4, starting from the main cabinet, taking the SAS expansion card address of the current cabinet as a tail address, sequentially searching lower-level cabinets of the current cabinet by searching the SAS expansion card connection address corresponding to the tail address, and recording path information until cabinet topology information of each link is established, thereby completing the collection of the cabinet topology information of the unified storage system.
Example 2:
as shown in fig. 2 and fig. 3, the present invention provides a method for collecting topology information of a unified storage enclosure, including the following steps:
s1, establishing a physical environment of a unified storage cabinet, and establishing a physical connection line between a main cabinet and an expansion cabinet; the method comprises the following specific steps:
s11, establishing physical connection between the SAS expansion card of each controller of the main cabinet case and the SAS expansion card of one controller of the expansion cabinet case;
s12, establishing physical connection between the SAS expansion cards of all controllers of the extension cabinet chassis and the SAS expansion card of one controller of the corresponding descending extension cabinet chassis;
s2, powering on a main cabinet case and an expansion cabinet case, and sending broadcast in a unified storage system when an SAS expansion card configured with each case changes in an SAS link of the case; the method comprises the following specific steps:
s21, powering on the main cabinet case and the expansion cabinet case, starting the unified storage system to work, and completing system initialization;
s22, binding each controller of the main cabinet case with a node respectively;
s23, recording the ID number of the controller where the node is located by the node;
s24, when the SAS expansion card of each controller of each chassis is configured to detect that the SAS link of the controller is changed, broadcasting is sent in the unified storage system;
s3, when the main cabinet case receives the broadcast or does not receive the broadcast after exceeding a set time threshold, the main cabinet case starts inquiry on all cases to acquire physical information of all cases; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case; the method comprises the following specific steps:
s31, the main cabinet case judges whether a broadcast sent by a certain case is received;
if yes, go to step S33;
if not, go to step S32;
s32, the main cabinet case judges whether the unreceived broadcasting time exceeds a set time threshold value;
if yes, go to step S33;
if not, returning to the step S31;
s33, the main cabinet case starts inquiry on all cases in the unified storage system through the nodes bound by the controllers of the main cabinet case, and physical information of all cases is obtained and stored; the physical information comprises PSU information, fan information and controller information in the case; the controller information comprises an SAS expansion card address and an SAS expansion card connection address of the controller;
s4, starting from the main cabinet, taking the SAS expansion card address of the current cabinet as a tail address, sequentially searching lower-level cabinets of the current cabinet by searching the SAS expansion card connection address corresponding to the tail address, and recording path information until cabinet topology information of each link is established, so as to complete the collection of the cabinet topology information of the unified storage system; the method comprises the following specific steps:
s41, starting from the main cabinet case, positioning an interface of an SAS expansion card of a controller of the main cabinet case;
s42, judging whether the positioning interface is connected with equipment or not;
if yes, inquiring the address of the SAS expansion card of the positioning interface, and taking the address of the SAS expansion card as a tail address;
if not, go to step S47;
s43, acquiring all SAS expansion card connection addresses from the stored physical information of each chassis;
s44, judging whether an SAS expansion card connection address identical to the tail address can be found;
if yes, go to step S45;
if not, go to step S47;
s45, acquiring a case where the SAS expansion card connection address is located and a controller where the SAS expansion card connection address is located, and storing the SAS expansion card connection address corresponding to the case, the controller and the link level where the SAS expansion card connection address is located; the method comprises the following specific steps:
s451, creating a path topology array at each controller node of the main cabinet case;
s452, acquiring a case where a current SAS expansion card connection address is located and a controller where the current SAS expansion card connection address is located, recording the ID of the case where the current SAS expansion card connection address is located and the ID of the controller where the current SAS expansion card connection address is located, distributing a link ID, and generating a path record;
s453, judging whether the chassis where the current SAS expansion card connecting address is located is a primary chassis in the current link or not;
if yes, go to step S454;
if not, acquiring the previous link ID of the chassis where the current SAS expansion card connection address is located in the current link, writing the previous link ID into the path record, and entering step S454;
s454, putting the path records into a path topology array;
s46, the SAS expansion card connecting address is taken as a tail address, a downlink interface of a controller where the SAS expansion card connecting address is located is taken as a positioning interface, and the step S43 is returned;
s47, judging that the current interface of the current controller of the current case is the tail end of the current link;
s48, judging whether all controllers of the main cabinet chassis are positioned completely;
if not, positioning an interface of the next controller of the main cabinet case, and returning to the step S42;
if yes, counting the case, the controller, the interface and the link level of each stored SAS expansion card connection address corresponding to the case, the controller and the interface, generating the topology information of the unified storage case, and ending.
In the above embodiment 2, taking fig. 4 as an example, the main cabinet chassis and the extension cabinet chassis both adopt dual-control storage, that is, include two controllers; the SAS expansion card of one controller of the main cabinet case is provided with four interfaces, and the SAS expansion card of one controller of the expansion cabinet case is provided with two interfaces; the main cabinet M1, the first expansion cabinet M1, the second expansion cabinet M2 and the third expansion cabinet M3 all comprise two controllers, namely a first controller C1 and a second controller C2, and the two controllers are redundant with each other; the first controller C1 and the second controller C2 of the main cabinet M1 respectively include four interfaces, a first interface a1, a second interface a2, a third interface A3 and a fourth interface a4, and the four interfaces are downlink interfaces; the first controller C1 and the second controller C2 of the first expansion cabinet K1, the second expansion cabinet K2 and the third expansion cabinet K3 respectively comprise two interfaces, namely a first interface a1 and a second interface a2, wherein one of the two interfaces is a downlink interface, and the other interface is an upper interface and a lower interface;
after the main cabinet case and the extension cabinet case are powered on, the storage system software starts to work, after the system initialization is completed, the first controller C1 of the main cabinet K1 is bound with the node 1, the second controller C2 of the main cabinet K1 is bound with the node 2, the node 1 records that the ID of the first controller is 1, and the node 2 records that the ID of the second controller is 2;
because the SAS expansion card is configured in advance and can trigger broadcast when the SAS link of the controller where the SAS expansion card is located changes, when storage software running in the main cabinet receives the broadcast or does not receive the broadcast for more than 30 minutes, the main cabinet starts query, the query is carried out through the node 1 and the node 2, and the query is realized through a standard SES protocol;
because all the expansion cabinets are connected out from the downlink ports of the SAS expansion cards of the main cabinet, the establishment of topology information starts from the main cabinet at first;
the SAS expansion card of each controller of the main cabinet is provided with four interface ports, and the expansion cabinets connected from the same port of the main cabinet are considered to be on the same link;
taking the fourth interface a4 of the second controller C2 of the master cabinet M1 as an example, when traversing the interface, a device connection can be detected, and the storage system can query an SAS expansion card address and use the address as a tail address;
and after the tail address is taken, traversing all controllers of all chassis, acquiring the previously stored SAS expansion card connection addresses of all controllers, comparing the SAS expansion card connection addresses of all controllers with the tail address, and if the two are the same, determining that the uplink interface of the controller is connected with the interface. The first interface A1 of the first controller C1 of the first extension cabinet K1 is connected with the four-interface A4 of the first controller C1 of the main cabinet M1 in FIG. 1;
and next, the SAS expansion card address of the C1 of the first controller of the first expansion cabinet K1 is used as a tail address to inquire the first controller C1 of the third expansion cabinet K3, and the first controller C1 of the third expansion cabinet K3 has no equipment connection, so that the link search is finished.
Example 3:
as shown in fig. 5, the present invention provides a unified storage enclosure topology information collecting device, including:
the physical environment building module 1 is used for building a physical environment of the unified storage cabinet and building a physical connection line between the main cabinet case and the expansion cabinet case; the physical environment construction module 1 includes:
the primary connection establishing unit 1.1 is used for establishing physical connection between an SAS expansion card of each controller of the main cabinet case and an SAS expansion card of one controller of the expansion cabinet case;
the second-level connection establishing unit 1.2 is used for establishing physical connection between the SAS expansion cards of the controllers of the expansion cabinet chassis and the SAS expansion card of one controller of the corresponding descending expansion cabinet chassis;
the SAS expansion card configuration module 2 is used for electrifying the main cabinet case and the expansion cabinet case, and transmitting broadcast in the unified storage system when the SAS link of each case is configured to change; the SAS expander card configuration module 2 includes:
the system initialization unit 2.1 is used for electrifying the main cabinet case and the expansion cabinet case, starting the unified storage system and completing system initialization;
the controller and node binding unit 2.2 is used for binding each controller of the main cabinet case with a node respectively;
a controller ID recording unit 2.3, which is used for recording the ID number of the controller where the node is located by the node;
the SAS expansion card configuration unit 2.4 is used for configuring that when the SAS expansion card of each controller of each chassis detects that the SAS link of the controller in which the SAS expansion card is located changes, the SAS expansion card sends broadcast in the unified storage system;
the physical information query module 3 is used for starting query on all the cabinets by the main cabinet when the main cabinet receives the broadcast or does not receive the broadcast after the set time threshold is exceeded, and acquiring the physical information of each cabinet; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case; the physical information inquiry module 3 includes:
a broadcast receiving judgment unit 3.1, configured to judge, by the main cabinet, whether a broadcast sent by a certain cabinet is received;
the duration judging unit 3.2 is used for judging whether the broadcast non-receiving time exceeds a set time threshold value or not by the main cabinet case when the broadcast is not received;
a physical information query unit 3.3, configured to, when the main cabinet receives a broadcast or does not receive a broadcast for a time period exceeding a set time threshold, start, by a node bound by each controller of the main cabinet, a query on all cabinets in the unified storage system by the main cabinet, and acquire and store physical information of each cabinet; the physical information comprises PSU information, fan information and controller information in the case; the controller information comprises an SAS expansion card address and an SAS expansion card connection address of the controller;
the case topology information establishing module 4 is used for starting from the main case, taking the SAS expansion card address of the current case as a tail address, sequentially searching the next-level cases of the current case by searching the SAS expansion card connection address corresponding to the tail address, and recording path information until case topology information of each link is established, so as to complete case topology information collection of the unified storage system; the case topology information establishing module 4 includes:
the interface positioning unit 4.1 is used for positioning an interface of an SAS expansion card of a controller of the main cabinet from the main cabinet;
a positioning interface connection device judgment unit 4.2, which is used for judging whether the positioning interface has device connection;
a tail address setting unit 4.3, configured to query the SAS expansion card address of the location interface when the location interface has a device connection, and use the SAS expansion card address as a tail address;
the SAS expansion card connection address acquisition unit 4.4 is used for acquiring all SAS expansion card connection addresses from the stored physical information of each chassis;
a tail address comparison unit 4.5, configured to determine whether an SAS expansion card connection address identical to the tail address can be found;
the case and controller positioning unit 4.6 is used for acquiring the case where the SAS expansion card connection address is located and the controller where the SAS expansion card connection address is located when the SAS expansion card connection address identical to the tail address is found, and storing the SAS expansion card connection address corresponding to the case, the controller and the link level where the SAS expansion card connection address is located;
a tail address resetting unit 4.7, taking the SAS expansion card connecting address as a tail address, and taking a downlink interface of a controller where the SAS expansion card connecting address is located as a positioning interface;
a link end determination unit 4.8, configured to determine that a current interface of a current controller of a current chassis is an end of a current link when the positioning interface has no device connection or when an SAS expansion card connection address identical to the tail address is found;
a controller positioning completion judging unit 4.9, which is used for judging whether all the controllers of the main cabinet chassis are positioned completely;
the controller relocation unit 4.10 is used for locating an interface of the next controller of the main cabinet when the controller of the main cabinet is not located;
and the case topology information generating unit 4.11 is used for counting the case, the controller, the interface and the link level of each stored SAS expansion card connection address corresponding to the case, the controller and the interface when all the controllers of the main cabinet case are positioned, and generating the unified storage case topology information.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A unified storage case topology information collection method is characterized by comprising the following steps:
s1, establishing a physical environment of a unified storage cabinet, and establishing a physical connection line between a main cabinet and an expansion cabinet;
s2, powering on a main cabinet case and an expansion cabinet case, and sending broadcast in a unified storage system when an SAS expansion card configured with each case changes in an SAS link of the case;
s3, when the main cabinet case receives the broadcast or does not receive the broadcast after exceeding a set time threshold, the main cabinet case starts inquiry on all cases to acquire physical information of all cases; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case;
and S4, starting from the main cabinet, taking the SAS expansion card address of the current cabinet as a tail address, sequentially searching lower-level cabinets of the current cabinet by searching the SAS expansion card connection address corresponding to the tail address, and recording path information until cabinet topology information of each link is established, thereby completing the collection of the cabinet topology information of the unified storage system.
2. The method for collecting topology information of a unified storage enclosure according to claim 1, wherein the step S1 comprises the following steps:
s11, establishing physical connection between the SAS expansion card of each controller of the main cabinet case and the SAS expansion card of one controller of the expansion cabinet case;
and S12, establishing physical connection between the SAS expansion cards of the controllers of the extension cabinet chassis and the SAS expansion card of one controller of the corresponding descending extension cabinet chassis.
3. The method for collecting topology information of a unified storage cabinet according to claim 1, wherein the main cabinet and the expansion cabinet both use dual-control storage, that is, comprise two controllers; the SAS expansion card of one controller of the main cabinet case has four interfaces, and the SAS expansion card of one controller of the expansion cabinet case has two interfaces.
4. The method for collecting topology information of a unified storage enclosure according to claim 1, wherein the step S2 comprises the following steps:
s21, powering on the main cabinet case and the expansion cabinet case, starting the unified storage system to work, and completing system initialization;
s22, binding each controller of the main cabinet case with a node respectively;
s23, recording the ID number of the controller where the node is located by the node;
and S24, when the SAS expansion cards of each controller of each chassis are configured to detect that the SAS link of the controller in which the SAS expansion cards are located changes, broadcasting is sent in the unified storage system.
5. The method for collecting topology information of a unified storage enclosure according to claim 4, wherein the step S3 comprises the following steps:
s31, the main cabinet case judges whether a broadcast sent by a certain case is received;
if yes, go to step S33;
if not, go to step S32;
s32, the main cabinet case judges whether the unreceived broadcasting time exceeds a set time threshold value;
if yes, go to step S33;
if not, returning to the step S31;
s33, the main cabinet case starts inquiry on all cases in the unified storage system through the nodes bound by the controllers of the main cabinet case, and physical information of all cases is obtained and stored; the physical information comprises PSU information, fan information and controller information in the case; the controller information includes an SAS expansion card address and an SAS expansion card connection address of the controller.
6. The method for collecting topology information of a unified storage enclosure according to claim 5, wherein the step S4 comprises the following steps:
s41, starting from the main cabinet case, positioning an interface of an SAS expansion card of a controller of the main cabinet case;
s42, judging whether the positioning interface is connected with equipment or not;
if yes, inquiring the address of the SAS expansion card of the positioning interface, and taking the address of the SAS expansion card as a tail address;
if not, go to step S47;
s43, acquiring all SAS expansion card connection addresses from the stored physical information of each chassis;
s44, judging whether an SAS expansion card connection address identical to the tail address can be found;
if yes, go to step S45;
if not, go to step S47;
s45, acquiring a case where the SAS expansion card connection address is located and a controller where the SAS expansion card connection address is located, and storing the SAS expansion card connection address corresponding to the case, the controller and the link level where the SAS expansion card connection address is located;
s46, the SAS expansion card connecting address is taken as a tail address, a downlink interface of a controller where the SAS expansion card connecting address is located is taken as a positioning interface, and the step S43 is returned;
s47, judging that the current interface of the current controller of the current case is the tail end of the current link;
s48, judging whether all controllers of the main cabinet chassis are positioned completely;
if not, positioning an interface of the next controller of the main cabinet case, and returning to the step S42;
if yes, counting the case, the controller, the interface and the link level of each stored SAS expansion card connection address corresponding to the case, the controller and the interface, generating the topology information of the unified storage case, and ending.
7. The method for collecting topology information of a unified storage enclosure according to claim 6, wherein the step S45 comprises the following steps:
s451, creating a path topology array at each controller node of the main cabinet case;
s452, acquiring a case where a current SAS expansion card connection address is located and a controller where the current SAS expansion card connection address is located, recording the ID of the case where the current SAS expansion card connection address is located and the ID of the controller where the current SAS expansion card connection address is located, distributing a link ID, and generating a path record;
s453, judging whether the chassis where the current SAS expansion card connecting address is located is a primary chassis in the current link or not;
if yes, go to step S454;
if not, acquiring the previous link ID of the chassis where the current SAS expansion card connection address is located in the current link, writing the previous link ID into the path record, and entering step S454;
s454, putting the path record into a path topology array.
8. A unified storage chassis topology information collection device, comprising:
the physical environment building module (1) is used for building a physical environment of the unified storage cabinet and building a physical connection line between the main cabinet case and the expansion cabinet case;
the SAS expansion card configuration module (2) is used for electrifying the main cabinet case and the expansion cabinet case, and configuring the SAS expansion cards of all cases to send broadcast in the unified storage system when the SAS link of the case is changed;
the physical information query module (3) is used for starting query on all the cabinets by the main cabinet when the main cabinet receives the broadcast or does not receive the broadcast after the set time threshold is exceeded, and acquiring the physical information of each cabinet; the physical information comprises an SAS expansion card address and an SAS expansion card connection address of the case;
and the case topology information establishing module (4) is used for starting from the main case, taking the SAS expansion card address of the current case as a tail address, sequentially searching the next-level cases of the current case by searching the SAS expansion card connection address corresponding to the tail address, and recording path information until case topology information of each link is established, thereby completing the collection of the case topology information of the unified storage system.
9. The unified storage chassis topology information collection apparatus according to claim 8, wherein the physical environment construction module (1) comprises:
the primary connection establishing unit (1.1) is used for establishing physical connection between the SAS expansion card of each controller of the main cabinet case and the SAS expansion card of one controller of the expansion cabinet case;
the second-level connection establishing unit (1.2) is used for establishing the physical connection between the SAS expansion card of each controller of the expansion cabinet case and the SAS expansion card of one controller of the corresponding descending expansion cabinet case;
the SAS expander card configuration module (2) comprises:
the system initialization unit (2.1) is used for electrifying the main cabinet case and the expansion cabinet case, starting the unified storage system and completing system initialization;
the controller and node binding unit (2.2) is used for binding each controller of the main cabinet case with a node respectively;
a controller ID recording unit (2.3) for recording the ID number of the controller where the node is located by the node;
and the SAS expansion card configuration unit (2.4) is used for configuring the SAS expansion cards of all the controllers of all the chassis to send broadcast in the unified storage system when detecting that the SAS link of the controller in which the SAS expansion cards are positioned changes.
10. The unified storage enclosure topology information collection apparatus according to claim 8, wherein the physical information query module (3) comprises:
a broadcast receiving judgment unit (3.1) for judging whether a broadcast sent by a certain case is received by the main cabinet case;
the time length judging unit (3.2) is used for judging whether the broadcast non-receiving time exceeds a set time threshold value or not by the main cabinet case when the broadcast is not received;
the physical information query unit (3.3) is used for starting query on all the cases in the unified storage system by the nodes bound by the controllers of the main cabinet case when the broadcasting receiving or non-receiving time of the main cabinet case exceeds a set time threshold, and acquiring and storing the physical information of each case; the physical information comprises PSU information, fan information and controller information in the case; the controller information comprises an SAS expansion card address and an SAS expansion card connection address of the controller;
the chassis topology information establishing module (4) comprises:
the interface positioning unit (4.1) is used for positioning one interface of the SAS expansion card of one controller of the main cabinet from the main cabinet case;
the positioning interface is connected with a device judging unit (4.2) and used for judging whether a device is connected with the positioning interface or not;
a tail address setting unit (4.3) for inquiring the SAS expansion card address of the positioning interface when the positioning interface has equipment connection, and using the SAS expansion card address as a tail address;
the SAS expansion card connection address acquisition unit (4.4) is used for acquiring all SAS expansion card connection addresses from the stored physical information of each chassis;
a tail address comparison unit (4.5) for judging whether the SAS expansion card connection address same as the tail address can be found;
the case and controller positioning unit (4.6) is used for obtaining the case where the SAS expansion card connection address is located and the controller where the SAS expansion card connection address is located when the SAS expansion card connection address identical to the tail address is found, and storing the SAS expansion card connection address corresponding to the case, the controller and the link level where the SAS expansion card connection address is located;
a tail address resetting unit (4.7) which takes the SAS expansion card connecting address as a tail address and takes a downlink interface of the controller where the SAS expansion card connecting address is positioned as a positioning interface;
a link end judging unit (4.8) for judging that the current interface of the current controller of the current case is the end of the current link when the positioning interface has no equipment connection or when the SAS expansion card connection address same as the tail address is found;
a controller positioning completion judging unit (4.19) for judging whether all the controllers of the main cabinet are positioned completely;
the controller relocation unit (4.10) is used for locating an interface of the next controller of the main cabinet when the controller of the main cabinet is not located;
and the case topology information generating unit (4.11) is used for counting the case, the controller, the interface and the link level of each stored SAS expansion card connecting address when all the controllers of the main cabinet case are positioned, and generating the unified storage case topology information.
CN202110855749.4A 2021-07-28 2021-07-28 Unified storage chassis topology information collection method and device Active CN113760184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110855749.4A CN113760184B (en) 2021-07-28 2021-07-28 Unified storage chassis topology information collection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110855749.4A CN113760184B (en) 2021-07-28 2021-07-28 Unified storage chassis topology information collection method and device

Publications (2)

Publication Number Publication Date
CN113760184A true CN113760184A (en) 2021-12-07
CN113760184B CN113760184B (en) 2023-08-25

Family

ID=78788120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110855749.4A Active CN113760184B (en) 2021-07-28 2021-07-28 Unified storage chassis topology information collection method and device

Country Status (1)

Country Link
CN (1) CN113760184B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170242815A1 (en) * 2014-11-11 2017-08-24 Huawei Technologies Co.,Ltd. Sas system, sas system traversal method, and apparatus
CN109189627A (en) * 2018-10-08 2019-01-11 郑州云海信息技术有限公司 A kind of hard disk failure monitor and detection method, apparatus, terminal and storage medium
CN110580235A (en) * 2018-06-08 2019-12-17 杭州宏杉科技股份有限公司 SAS expander communication method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170242815A1 (en) * 2014-11-11 2017-08-24 Huawei Technologies Co.,Ltd. Sas system, sas system traversal method, and apparatus
CN110580235A (en) * 2018-06-08 2019-12-17 杭州宏杉科技股份有限公司 SAS expander communication method and device
CN109189627A (en) * 2018-10-08 2019-01-11 郑州云海信息技术有限公司 A kind of hard disk failure monitor and detection method, apparatus, terminal and storage medium

Also Published As

Publication number Publication date
CN113760184B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN109391647B (en) Storage resource recovery method, device and system
CN108830389A (en) A kind of method and system of information system automatic detecting
CN111031491B (en) Method and system for reporting power failure in real time
CN109005094B (en) Zigbee intelligent household equipment management method and device based on Internet of things
CN106959820A (en) A kind of data extraction method and system
CN101605132A (en) A kind of method for identifying network data stream
CN105959078B (en) A kind of cluster method for synchronizing time, cluster and clock synchronization system
CN101567014B (en) Equipment information retrieval method, device and cable fastener
CN103778120A (en) Global file identification generation method, generation device and corresponding distributed file system
CN108877188A (en) A kind of environment protection digital concurrently acquires and Multi net voting dissemination method and device
CN103856511A (en) Data packet upload method, client terminal, nodes, information server and system
CN103368703A (en) Data packet retransmission method, data packet receiving method and device
CN108089934A (en) Cluster management method and cluster server
CN113760184A (en) Unified storage case topology information collection method and device
CN104205730A (en) Network element data access method, device and network management system
US8243606B2 (en) Information acquisition device and method
CN106648984A (en) Data backup method and device
CN111061893A (en) Method and device for determining fault influence range
CN110677316A (en) Distributed storage server network card detection method and system
CN104639585A (en) Real-time data transmission system and data synchronization method thereof
CN100395706C (en) Automatic start method of switchboard plate
CN104581901B (en) A kind of foundation of clustering data network and transmission method for energy monitoring
CN112667698A (en) MongoDB data synchronization method based on converged media platform
WO2019237543A1 (en) Database switching method and system
CN112510825B (en) Real-time power failure active reporting and de-duplication method and system for high-speed power line carrier communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant