CN115952038A - NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium - Google Patents

NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium Download PDF

Info

Publication number
CN115952038A
CN115952038A CN202211666224.7A CN202211666224A CN115952038A CN 115952038 A CN115952038 A CN 115952038A CN 202211666224 A CN202211666224 A CN 202211666224A CN 115952038 A CN115952038 A CN 115952038A
Authority
CN
China
Prior art keywords
hard disk
disk
bdf
sequence
disk drive
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.)
Pending
Application number
CN202211666224.7A
Other languages
Chinese (zh)
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 CN202211666224.7A priority Critical patent/CN115952038A/en
Publication of CN115952038A publication Critical patent/CN115952038A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

Abstract

The invention belongs to the technical field of servers, and particularly provides an NVMe hard disk drive character disorder diagnosis method, a system, a terminal and a storage medium, wherein the method comprises the following steps: acquiring the disk identifier information and the disk sequence of each current hard disk; sequentially calling BDF numbers corresponding to the hard disk drive symbols according to the drive symbol information and the disk sequence; judging whether the disk sequence and the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols both accord with an expected rule: if so, judging that the reason of disorder of the current hard disk drive characters is server display disorder; if not, judging that the reason of the disorder of the current hard disk drive letter is the drive letter drift. The invention can effectively diagnose the reason of disorder of the hard disks and is convenient for hard disk maintenance of the server.

Description

NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of servers, in particular to an NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium.
Background
In the server system, a hard disk is an indispensable component. Mechanical hard disks and solid state hard disks are often used as server hard disks. NVME hard disks using PC IE bus as medium among solid state disks are known for low latency and high speed. In a server system consisting of a plurality of hard disks, each hard disk is assigned a drive letter. Generally, the disk symbol under the OS and the physical screen printing of the chassis panel are completely corresponding. The hard disks are usually arranged in a certain order (usually from small to large) called hard disk order. Int e l to the strong family of CPUs, each CPU has 5 PE ports, which can be viewed as an RC (Root Compl ex) for one PC IE. Each PE port includes 16 PC IE l ane, which can be flexibly allocated to different PC IE bandwidths to support various peripherals in different scenarios. When the PC IE peripheral is an NVME hard disk, each PE port supports 4 hard disks because each NVME hard disk requires x4PCIE l ane. At the beginning of system design, the disk order of the hard disk is sorted according to the sequence of the serial numbers of different PE ports of a CPU from small to large, the interior of the PE ports is sorted according to the sequence of the serial numbers of the PC IE files in the group from small to large, and the disk order corresponds to the physical disk order of a chassis panel.
Under the l inux operating system, a command line needs to be input to check the related information such as the serial number and the capacity of the currently mounted hard disk. Due to the unique property of the l inux system, the sequence of the disk symbols displayed under the OS is not arranged from small to large as NVME 1, NVME2, NVME3 \8230, but may be displayed in a disordered sequence of NVME2, NVME3, NVME 1 \8230, and the like. Since the disk order of the hard disks in the system design is sequential, and the disk order of the hard disks displayed under the OS is out-of-order, there may be two cases: the drive letter under the OS does not correspond to the actual physical drive letter, namely, the drive letter drifts; 2. the order problem is only displayed for the operating system, and the disk identifier under the actual OS and the physical disk identifier are in one-to-one correspondence (for example, NVME2 still corresponds to the second physical hard disk).
In this case, it is impossible to determine whether the disk order of the hard disk is consistent with the design, and it is impossible to determine which hard disk actually needs to be controlled, which brings inconvenience to identification and operation.
Disclosure of Invention
In order to solve the above technical problems, the present invention provides an NVMe hard disk drive letter disorder diagnosis method, system, terminal and storage medium.
In a first aspect, the invention provides an NVMe hard disk drive letter out-of-order diagnosis method, which comprises the following steps:
acquiring the disk identifier information and the disk sequence of each current hard disk;
sequentially calling BDF numbers corresponding to the hard disk signs according to the disk sign information and the disk sequence;
judging whether the disk sequence and the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols both accord with an expected rule:
if so, judging that the reason of disorder of the current hard disk drive characters is server display disorder;
if not, judging that the reason of the disorder of the current hard disk drive characters is the disk character drift.
Further, acquiring the disk identifier information and the disk sequence of each current hard disk includes:
and sequentially temporarily storing the disk symbols of each hard disk output by the operating system after executing the disk symbol output command to a specified path.
Further, before sequentially calling the BDF number corresponding to each hard disk drive letter according to the drive letter information and the disk order, the method further comprises:
judging whether the arrangement modes of the disk symbols of the current hard disks are arranged from big to small or from small to big in sequence:
if yes, the step of calling the BDF number of each hard disk according to the disk identifier information is not executed;
if not, continuing to execute the step of calling the BDF number of each hard disk according to the disk identifier information.
Further, according to the disk identifier information and the disk sequence, the BDF number corresponding to each hard disk identifier is sequentially called, which includes:
printing a BDF number corresponding to each hard disk drive symbol and a BDF number of a subordinate P2P bridge of the hard disk through a BDF number inquiry command under an operating system;
and constructing an actual PC IE topology based on the BDF number corresponding to each hard disk drive letter and the BDF number of the P2P bridge belonging to the hard disk, and labeling each hard disk drive letter on the actual PC IE topology.
Further, judging whether the arrangement sequence of the disk sequence and the corresponding BDF number of each hard disk drive symbol meets the expected rule or not, including:
confirming that the corresponding BDF numbers of all hard disks in the actual PC IE topology are arranged from small to large;
judging whether the arrangement sequence of the disk symbols of each hard disk in the actual PC IE topology is arranged from small to large:
if so, judging that the arrangement sequence of the disk sequence and the corresponding BDF numbers of the hard disk drive symbols all accord with an expected rule;
if not, the hard disk drive symbol arrangement sequence is judged not to accord with the expected rule.
In a second aspect, the present invention provides an NVMe hard disk drive letter disorder diagnosis system, including:
the first acquisition unit is used for acquiring the disk identifier information and the disk sequence of each current hard disk;
the second acquisition unit is used for sequentially calling the BDF numbers corresponding to the hard disk drive symbols according to the drive symbol information and the disk sequence;
the rule judging unit is used for judging whether the disk sequence and the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols both accord with an expected rule;
the first judging unit is used for judging that the reason of disorder of the current hard disk drive symbols is server display disorder if the disk order and the arrangement order of the corresponding BDF numbers of the hard disk drive symbols accord with an expected rule;
and the second judging unit is used for judging that the reason of disorder of the current hard disk drive symbols is the disk symbol drift if the disk sequence or the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols does not accord with the expected rule.
Further, acquiring the disk identifier information and the disk sequence of each current hard disk includes:
and sequentially temporarily storing the disk symbols of each hard disk output by the operating system after executing the disk symbol output command to a specified path.
Further, before sequentially calling the BDF number corresponding to each hard disk drive letter according to the drive letter information and the disk order, the system further executes:
judging whether the arrangement modes of the disk symbols of the current hard disks are arranged from big to small or from small to big in sequence:
if yes, the step of calling the BDF number of each hard disk according to the disk identifier information is not executed;
if not, continuing to execute the step of calling the BDF number of each hard disk according to the disk identifier information.
Further, the second acquiring unit includes:
the information query module is used for printing the BDF number corresponding to each hard disk drive letter and the BDF number of the upper-subordinate P2P bridge of the hard disk through a BDF number query command under the operating system;
and the topology construction module is used for constructing an actual PCIE topology based on the BDF number corresponding to each hard disk drive letter and the BDF number of the P2P bridge which belongs to the hard disk, and labeling each hard disk drive letter on the actual PC IE topology.
Further, the rule judging unit includes:
the first judgment module is used for confirming that the corresponding BDF numbers of the hard disks in the actual PCIE topology are arranged from small to large;
the second judgment module is configured to judge whether the disk identifier arrangement sequence of each hard disk in the actual PCIE topology is arranged from small to large:
the first judging module is used for judging that the disk sequences and the arrangement sequences of the corresponding BDF numbers of the disk symbols of the hard disks conform to an expected rule if the disk symbol arrangement sequences of the hard disks in the actual PC IE topology are arranged from small to large;
and the second judging module is used for judging that the arrangement sequence of the disk symbols of the hard disks does not conform to the expected rule if the arrangement sequence of the disk symbols of the hard disks in the actual PC IE topology is not arranged from small to large.
In a third aspect, a terminal is provided, which includes:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having instructions stored thereon, which when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
according to the NVMe hard disk drive letter disorder diagnosis method, the system, the terminal and the storage medium, the position of the current NVMe peripheral in the whole system is judged according to the topological relation of a CPU PE port in system design and the BDF relation of each NVMe hard disk, and the position corresponds to the drive letter of the NVMe hard disk, so that whether the display of the NVMe hard disk drive letter under the OS is consistent with the design or not is judged. The real reason of disorder is further known to be due to the fact that the system identifies faults of the hard disk and disk identifier drift of the hard disk; or simply that the disk signatures under the current OS are not displayed in order.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
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 schematic flow diagram of a method of one embodiment of the invention.
Fig. 2 is an exemplary diagram of a PC IE topology.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
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 obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
A Central Processing Unit (CPU) is a final execution unit for information processing and program operation, and serves as an operation and control core of a computer system.
The NVMe hard disk refers to a Non-volatile Memory host controller interface specification (Non-Vol at i l e Memory expres), which is a logical device interface specification.
PCI-express (per i physical component int contains) is a high-speed serial computer expansion bus standard, originally named "3GI O", which was proposed by Intel in 2001 to replace the old PCI, PCI-X and AGP bus standards. The PC ie belongs to high-speed serial point-to-point double-channel high-bandwidth transmission, connected equipment distributes independent channel bandwidth and does not share bus bandwidth, and the functions of active power management, error reporting, end-to-end reliable transmission, hot plug, quality of service (QOS) and the like are mainly supported. The PCI e is only an expansion bus of the south bridge and is irrelevant to an operating system, so that the compatibility of the PCI e and the original PCI is also ensured, namely, the PCI e interface and the PCI interface coexist on the mainboard for a long time, and the convenience is brought to the upgrade of users. Therefore, PC ie has the greatest significance in the universality, and can be used for the connection of a south bridge and other devices, can also be extended to the connection between chip groups, and can even be used for connecting a graphics processor, so that the whole I/O system is unified again, the computer system is further simplified, and the portability and the modularization of the computer are increased. The PCI e connection is created on the basis of a bi-directional serial (1-bi t) point-to-point connection, which is called a "transmission channel". In contrast to PCI connectivity, PCI is based on bus control, a unidirectional 32-bit parallel bus that all devices share. PCI e is a multi-layer protocol consisting of a session layer, a data exchange layer and a physical layer. The physical layer may be further divided into a logical sublayer and an electrical sublayer. The logical sublayer may in turn be divided into a Physical Code Sublayer (PCS) and a medium access control sublayer (MAC).
In PC I Expre s (PC I e) systems, a root comp device connects a processor and memory subsystem to a PC I Expre s switch fabric consisting of one or more switch devices. Like the host bridge in a PCI system, the root complex generates transaction requests on behalf of the processors, interconnected by a local bus. The root complex functionality may be implemented in a discrete device or may be integrated in the processor. One root complex may contain multiple PCI express s ports and multiple switching devices may be connected to the root complex or cascaded ports.
The L inux is called GNU/L inux in full, is a UNIX-like operating system which is free to use and spread freely, the kernel of the operating system is firstly released by Linnass Bennax Kett Towaz in 1991 at 10.5.M, is mainly inspired by minix and Unix ideas, and is a multi-user, multi-task, multi-thread and multi-CPU supporting operating system based on POS IX. It can run the main Un ix tool software, applications and network protocols. It supports 32-bit and 64-bit hardware. The L inux inherits the design idea that Un ix takes a network as a core, and is a multi-user network operating system with stable performance. There are hundreds of different releases for L inux, such as deb i an, archl inux based on community development, and Red Hat Ent erpr i s eL inux, SUSE, orac L e L i nux based on commercial development, and so on.
Displaying out-of-order drive characters under the OS requires a method to confirm whether the drive characters actually drift (i.e., the drive characters and the design under the OS do not match), or only whether the order of the arrangement and display of the drive characters is out of order, and whether the drive characters and the design (i.e., the drive characters/CPU PE port number of the chassis panel) are actually consistent.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be an NVMe hard disk drive character out-of-order diagnostic system.
As shown in fig. 1, the method includes:
step 110, acquiring the disk signature information and the disk sequence of each current hard disk;
step 120, sequentially calling BDF numbers corresponding to the hard disk drive symbols according to the drive symbol information and the disk sequence;
step 130, judging whether the disk sequence and the arrangement sequence of the corresponding BDF numbers of the disk symbols of the hard disks conform to the expected rule:
step 140, if yes, judging that the reason of disorder of the current hard disk drive characters is server display disorder;
and 150, if not, judging that the reason of the disorder of the current hard disk drive symbols is disk symbol drift.
In order to facilitate understanding of the present invention, the principle of the NVMe hard disk drive letter disorder diagnosis method of the present invention is combined with the process of diagnosing the NVMe hard disk drive letter disorder in the embodiment, and the NVMe hard disk drive letter disorder diagnosis method provided by the present invention is further described below.
Specifically, the NVMe hard disk drive character disorder diagnosis method comprises the following steps:
s1, acquiring the disk identifier information and the disk sequence of each current hard disk.
Specifically, the disk signatures of the hard disks output by the operating system after executing the disk signature output command are temporarily stored to the designated path in sequence. That is, the disk identifier output command l sb l k is used to output the current status results of the disk identifier and capacity of each hard disk, but the status information of the hard disk is temporarily stored and edited again without being printed immediately.
And S2, sequentially calling BDF numbers corresponding to the hard disk drives according to the drive letter information and the disk sequence.
Before sequentially calling the BDF number corresponding to each hard disk drive letter according to the drive letter information and the disk sequence, the following steps are also required to be executed: judging whether the arrangement modes of the disk symbols of the current hard disks are arranged from big to small or from small to big in sequence: if yes, the step of calling the BDF number of each hard disk according to the disk identifier information is not executed; if not, continuing to execute the step of calling the BDF number of each hard disk according to the disk identifier information.
Before diagnosis, it is necessary to judge whether the disk signature information output by the CPU has the disorder problem, and if not, the diagnosis is not needed.
If the hard disk needs to be diagnosed, the BDF number corresponding to each hard disk drive letter and the BDF number of the upper-part P2P bridge of the hard disk are printed out through a BDF number query command under an operating system; and constructing an actual PCIE topology based on the BDF number corresponding to each hard disk drive letter and the BDF number of the P2P bridge belonging to the hard disk, and labeling each hard disk drive letter on the actual PC IE topology.
Generally, when the computer is started, the CPU performs PC IE enumeration in sequence from small to large according to the BUS number of the internal PCIE log i cal. However, in some Int e l CPU internal architectures, the serial number of the PCIE log i cal BUS and the PE port number of the CPU are not in one-to-one correspondence, and the BI OS needs to be set in one-to-one correspondence. Through the BI OS to s e tup option relevant modification, the CPU will carry out PCIE enumeration according to the order of PE port from small to large. The system design will also correspond the disk order of the hard disk to the order of the CPU PE ports from small to large.
In PCIE initialization, an RC (Root complex ex) scans and identifies all PC IE devices through a depth-first algorithm, and assigns a BDF number to each node. (BDF: bu s, dev i c e, funct i on: bus, device, function) the PC IE has a maximum of 256 buses, 32 devices per bus and 8 functions per device. In the PC IE topology, the BDF number of each node is unique and is an identity card identifying the node in the PCIE topology. The depth-first algorithm, which is simply to say, scans each branch path of the PC IE tree, and goes deep until the tail end can not go deep any more. When all the nodes of a certain branch path are scanned, the next path is scanned in sequence, and each node is scanned only once. Taking fig. 2 as an example, a P2P virtual bridge exists inside each RC or PC IE SWI THC to connect other nodes. The P2P bridge, like the peripherals, has its unique BDF number. The BUS numbers of the nodes hung under the same BUS are the same. The connection of the peripheral is fixed when specific to a certain server configuration. The topology in the CPU PE port group and the PCIE topology between the groups are fixed and unchangeable, and the topology of the corresponding PC IE tree is also fixed. When the system is started, as described above, the enumeration sequence of the PCIE starts from the beginning of the smaller PE port number to the end of the larger PE port, and since enumeration is performed in each PE port according to the order of the l ane number from the smaller PE port to the larger PE port, for a fixed configuration collocation, the depth-first algorithm scanning mode of the PCIE is the same, and the subordinate PCIE peripheral (NVME hard disk) and the P2P bridge on the corresponding RC are allocated to the same BDF number at each start. For example, PE port 0, 4P 2P bridges are hung on BUS 0a, and the BUS numbers of the bridges are all 0a. Since all the 4P 2P bridges have only one function, the BDFs of the 4P 2P bridges are: 0a; 0a; 0a; 0a. And 4P 2P bridges, only one NVME hard disk is mounted under each bridge, and according to the depth-first algorithm, after the P2P bridges mounted under the RC BUS are scanned, peripheral devices mounted under each P2P bridge are scanned, and BDF numbers are distributed in sequence. In this configuration, 4 NVME hard disks under PE0 all exclusively own one BUS, so the BDF number of these 4 hard disks is: 0b; 0c; 0 d; 0 e. Because the PE port of the CPU and the BDF number allocated by the PE port through the depth scanning algorithm are fixed, the PCIE topology and the BDF number of the corresponding peripheral are also fixed. The topology of the PCIE in each PE port and the topology of the PCIE between different PE ports can be identified through the BDF relationship (mainly the bu s relationship and sequence).
And the BDF number of the peripheral in the PC IE topology corresponding to each NVME drive letter under the OS and the BDF number of the P2P bridge of the RC which belongs to the peripheral can be printed out by inquiring the command of the PCIE BDF under the OS. The fixed corresponding relation can be obtained by the drive letter of each NVME hard disk, the BDF number corresponding to the drive letter and the BDF number of the P2P bridge of the upper RC. As can be seen from the above description, the logical correspondence of the peripheral device at the port level of the CPU PE can be deduced according to the BDF number. Therefore, each NVME drive under the OS can construct a fixed connection relationship with the CPU PE port physically corresponding to the NVME drive through the relay of the BDF number.
In the present application, after step S1 is executed, the BDF number command for finding the corresponding BDF number and RC is executed through the acquired NVME drive letter, and a result is output without printing processing.
S3, judging whether the arrangement sequence of the disk sequence and the corresponding BDF numbers of the hard disk drive symbols all accord with an expected rule: if so, judging that the reason of disorder of the current hard disk drive characters is server display disorder; if not, judging that the reason of the disorder of the current hard disk drive characters is the disk character drift.
Specifically, the corresponding BDF numbers of all hard disks in the actual PC IE topology are confirmed to be arranged from small to large; judging whether the arrangement sequence of the disk symbols of each hard disk in the actual PC IE topology is arranged from small to large: if so, judging that the arrangement sequence of the disk sequence and the corresponding BDF numbers of the hard disk drive symbols all accord with an expected rule; if not, the hard disk drive symbol arrangement sequence is judged not to accord with the expected rule.
After the NVME drive letter corresponds to the BDF number of the whole PC IE, the NVME drive letter can be compared with the NVME drive letter according to the sequence of the BDF number. According to whether the sequence comparison result is consistent or not, whether the actual disk order of the NVME is consistent with the designed disk order or not can be seen clearly, and therefore the problem that the disk symbol drifts or the problem that the display sequence is only the problem under the OS is conveniently judged. In an embodiment of the application, after the two results are obtained, a compiling command can be used to combine and output the results of the two operations, and automatic printing is set to print the drive letter information and the corresponding BDF information at the same time. According to the disk identifier under the hard disk OS and all BDF numbers of all hard disks, the topology of the current PCIE and the real disk sequence of the hard disks can be judged.
The existing command line commands can only print the order of the hard disk drive characters. If the disk sequence disorder phenomenon occurs, the true reason of the disorder cannot be known because the system identifies the fault of the hard disk and the disk identifier of the hard disk drifts; or simply that the disk signatures under the current OS are not displayed in order. The existing command line technology cannot be distinguished, and the difficulty of fault positioning is caused to operation and maintenance personnel. The invention designs a method for judging the position of the current nvme peripheral in the whole system according to the topological relation of a CPU PE port in system design and the BDF relation of each nvme hard disk, and the position corresponds to the disk symbol of the nvme hard disk, thereby judging whether the display of the disk symbol of the nvme hard disk under the OS is consistent with the design. The real reason of disorder is further known to be due to the fact that the system identifies faults of the hard disk and disk identifier drift of the hard disk; or simply that the disk signatures under the current OS are not displayed in order. A method for combined printing is designed, BDF addressing of the nvme hard disk and display identification of the disk order of the hard disk are internally processed and uniformly displayed on an output result, and therefore the root cause of disorder of the current system hard disk is seen at a glance. And operation and maintenance personnel can conveniently and directly position the problems.
As shown in fig. 3, the system 300 includes:
a first obtaining unit 310, configured to obtain the disk identifier information and the disk order of each current hard disk;
a second obtaining unit 320, configured to sequentially call BDF numbers corresponding to the hard disk drives according to the drive identifier information and the disk order;
a rule determining unit 330, configured to determine whether the disk order and the arrangement order of the corresponding BDF numbers of the hard disk drives conform to an expected rule;
the first determining unit 340 is configured to determine that the reason why the current hard disk drive letter is out of order is server display out of order if the disk order and the arrangement order of the corresponding BDF numbers of the hard disk drive letters both conform to an expected rule;
the second determining unit 350 is configured to determine that the reason for the disorder of the current hard disk drive symbols is the disk symbol drift if the disk sequence or the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols does not conform to the expected rule.
Optionally, as an embodiment of the present invention, acquiring the drive identifier information and the drive order of each current hard disk includes:
and sequentially temporarily storing the disk identifier of each hard disk output by the operating system after executing the disk identifier output command to the specified path.
Optionally, as an embodiment of the present invention, before sequentially calling the BDF number corresponding to each hard disk drive letter according to the drive letter information and the disk order, the system further performs:
judging whether the arrangement modes of the disk symbols of the current hard disks are arranged from big to small or from small to big in sequence:
if yes, the step of calling the BDF number of each hard disk according to the disk identifier information is not executed;
if not, continuing to execute the step of calling the BDF number of each hard disk according to the disk identifier information.
Optionally, as an embodiment of the present invention, the second obtaining unit includes:
the information query module is used for printing the BDF number corresponding to each hard disk drive letter and the BDF number of the upper-part P2P bridge of the hard disk through the BDF number query command under the operating system;
and the topology construction module is used for constructing an actual PCIE topology based on the BDF number corresponding to each hard disk drive letter and the BDF number of the P2P bridge which belongs to the hard disk, and labeling each hard disk drive letter on the actual PC IE topology.
Optionally, as an embodiment of the present invention, the rule determining unit includes:
the first judgment module is used for confirming that the corresponding BDF numbers of the hard disks in the actual PCIE topology are arranged from small to large;
the second judgment module is configured to judge whether the disk identifier arrangement sequence of each hard disk in the actual PCIE topology is arranged from small to large:
the first judging module is used for judging that the disk sequences and the arrangement sequences of the corresponding BDF numbers of the disk symbols of the hard disks conform to an expected rule if the disk symbol arrangement sequences of the hard disks in the actual PC IE topology are arranged from small to large;
and the second judging module is used for judging that the disk signature arrangement sequence of the hard disks does not accord with the expected rule if the disk signature arrangement sequence of the hard disks in the actual PC IE topology is not arranged from small to large.
Fig. 4 is a schematic structural diagram of a terminal 400 according to an embodiment of the present invention, where the terminal 400 may be used to execute the NVMe hard disk drive letter disorder diagnosis method according to the embodiment of the present invention.
Among them, the terminal 400 may include: a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the server shown in the figures is not intended to be limiting, and that it may be a bus architecture, a star architecture, a combination of more or fewer components than shown, or a different arrangement of components.
The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as a Static Random Access Memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk. The executable instructions in memory 420, when executed by processor 410, enable terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same function or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Therefore, the invention judges the position of the current nvme peripheral in the whole system according to the topological relation of the CPU PE port in the system design and the BDF relation of each nvme hard disk, and the position corresponds to the disk symbol of the nvme hard disk, thereby judging whether the display of the disk symbol of the nvme hard disk under the OS is consistent with the design. The real reason of disorder is further known to be due to the fact that the system identifies faults of the hard disk and disk identifier drift of the hard disk; or only the disk identifiers of the hard disks under the current OS are not displayed in sequence, and the technical effects achieved by this embodiment may refer to the description above, which is not described herein again.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented using software plus any required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and includes several instructions to make a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) perform all or part of the steps of the methods in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the several embodiments provided in the present invention, it should be understood that the disclosed system and method may be implemented in other manners. For example, the above-described system embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
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 claims.

Claims (10)

1. An NVMe hard disk drive character disorder diagnosis method is characterized by comprising the following steps:
acquiring the disk identifier information and the disk sequence of each current hard disk;
sequentially calling BDF numbers corresponding to the hard disk drive symbols according to the drive symbol information and the disk sequence;
judging whether the disk sequence and the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols both accord with an expected rule:
if so, judging that the reason of disorder of the current hard disk drive characters is server display disorder;
if not, judging that the reason of the disorder of the current hard disk drive characters is the disk character drift.
2. The method of claim 1, wherein obtaining drive letter information and drive order of each current hard disk comprises:
and sequentially temporarily storing the disk symbols of each hard disk output by the operating system after executing the disk symbol output command to a specified path.
3. The method according to claim 1, wherein before sequentially calling the BDF number corresponding to each hard disk drive letter according to the drive letter information and the disk order, the method further comprises:
judging whether the disk symbol arrangement modes of the current hard disks are arranged from large to small or from small to large in sequence:
if yes, the step of calling the BDF number of each hard disk according to the disk identifier information is not executed;
if not, continuing to execute the step of calling the BDF number of each hard disk according to the disk identifier information.
4. The method according to claim 1, wherein sequentially calling the BDF number corresponding to each hard disk drive letter according to the drive letter information and the disk order comprises:
the method comprises the steps that a BDF number corresponding to each hard disk drive symbol and a BDF number of a subordinate P2P bridge of the hard disk are printed out through a BDF number inquiry command under an operating system;
and constructing an actual PCIE topology based on the BDF number corresponding to each hard disk drive letter and the BDF number of the P2P bridge of the hard disk, and labeling each hard disk drive letter on the actual PCIE topology.
5. The system of claim 4, wherein determining whether the disk order and the corresponding BDF number of each hard disk drive letter are in accordance with the expected rule comprises:
confirming that corresponding BDF numbers of all hard disks in the actual PCIE topology are arranged from small to large;
judging whether the disk identifier arrangement sequence of each hard disk in the actual PCIE topology is arranged from small to large:
if so, judging that the arrangement sequence of the disk sequence and the corresponding BDF numbers of the hard disk drive symbols all accord with an expected rule;
if not, the hard disk drive symbol arrangement sequence is judged not to accord with the expected rule.
6. An NVMe hard disk drive letter disorder diagnosis system is characterized by comprising:
the first acquisition unit is used for acquiring the disk identifier information and the disk sequence of each current hard disk;
the second acquisition unit is used for sequentially calling BDF numbers corresponding to the hard disk drive symbols according to the drive symbol information and the disk sequence;
the rule judging unit is used for judging whether the disk sequence and the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols both accord with an expected rule;
the first judging unit is used for judging that the reason of disorder of the current hard disk drive symbols is server display disorder if the disk sequence and the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols accord with an expected rule;
and the second judging unit is used for judging that the reason of disorder of the current hard disk drive symbols is the disk symbol drift if the disk sequence or the arrangement sequence of the corresponding BDF numbers of the hard disk drive symbols does not accord with the expected rule.
7. The system of claim 6, wherein the second obtaining unit comprises:
the information query module is used for printing the BDF number corresponding to each hard disk drive letter and the BDF number of the upper-subordinate P2P bridge of the hard disk through a BDF number query command under the operating system;
and the topology construction module is used for constructing an actual PCIE topology based on the BDF number corresponding to each hard disk drive letter and the BDF number of the P2P bridge of the hard disk, and labeling each hard disk drive letter on the actual PCIE topology.
8. The system according to claim 7, wherein the regularity judgment unit includes:
the first judgment module is used for confirming that the corresponding BDF numbers of the hard disks in the actual PCIE topology are arranged from small to large;
the second judgment module is configured to judge whether the disk identifier arrangement order of each hard disk in the actual PCIE topology is arranged from small to large:
the first judging module is used for judging that the disk sequence and the arrangement sequence of the corresponding BDF numbers of the disk symbols of the hard disks conform to an expected rule if the disk symbol arrangement sequence of the hard disks in the actual PCIE topology is arranged from small to large;
and the second judging module is used for judging that the hard disk drive symbol arrangement sequence does not conform to the expected rule if the drive symbol arrangement sequence of each hard disk in the actual PCIE topology is not arranged from small to large.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-5.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202211666224.7A 2022-12-23 2022-12-23 NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium Pending CN115952038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211666224.7A CN115952038A (en) 2022-12-23 2022-12-23 NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211666224.7A CN115952038A (en) 2022-12-23 2022-12-23 NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115952038A true CN115952038A (en) 2023-04-11

Family

ID=87290692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211666224.7A Pending CN115952038A (en) 2022-12-23 2022-12-23 NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115952038A (en)

Similar Documents

Publication Publication Date Title
US8386654B2 (en) System and method for transforming PCIe SR-IOV functions to appear as legacy functions
US9311266B2 (en) Hidden base address register programming in peripheral component interconnect express buses
US9703740B2 (en) Opaque bridge for peripheral component interconnect express bus systems
US10176137B2 (en) Selectively transparent bridge for peripheral component interconnect express bus system
KR20070003954A (en) Simulation circuit of pci express endpoint and downstream port for a pci express switch
CN114116378B (en) Method, system, terminal and storage medium for acquiring PCIe (peripheral component interconnect express) equipment temperature
WO2020132413A1 (en) State-preserving upgrade of an intelligent server adapter
CN115657553A (en) PCIE topology and PCIE equipment simulation method, device, equipment and medium
CN111262753B (en) Method, system, terminal and storage medium for automatically configuring number of NUMA nodes
CN113760667A (en) Hard disk management method and device, readable storage medium and electronic equipment
CN113626276B (en) Method, system, terminal and storage medium for identifying type of server HBA card
CN110968352A (en) PCIE equipment resetting system and server system
CN112084128B (en) Message interrupt communication method, computer device, and storage medium
CN115952038A (en) NVMe hard disk drive character disorder diagnosis method, system, terminal and storage medium
US6591320B1 (en) Method and system for selective disablement of expansion bus slots in a multibus data processing system
CN116450046A (en) Cloud disk implementation method and device, intelligent network card, server and storage medium
CN114253573A (en) PCIe device firmware batch upgrading method, system, terminal and storage medium
CN114579381A (en) Disk array remote debugging method, system, terminal and storage medium
CN114201323A (en) Method, system, terminal and storage medium for recording system exception information by BMC (baseboard management controller)
CN116010316A (en) Interface multiplexing circuit, method, device, equipment and medium
CN105874764A (en) Computer and device accessing method
CN115718633A (en) Screen printing updating method, device, terminal and medium for multi-configuration machine type chassis
CN116055331A (en) Full-function Ethernet physical layer chip simulator and method
CN116954635A (en) Flash memory chip burning method and system, storage medium and electronic equipment
CN115102880A (en) Network card testing method, system, terminal and storage medium

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