CN113746895A - Method and device for acquiring multi-path disk target port group information - Google Patents

Method and device for acquiring multi-path disk target port group information Download PDF

Info

Publication number
CN113746895A
CN113746895A CN202110838256.XA CN202110838256A CN113746895A CN 113746895 A CN113746895 A CN 113746895A CN 202110838256 A CN202110838256 A CN 202110838256A CN 113746895 A CN113746895 A CN 113746895A
Authority
CN
China
Prior art keywords
path
recovery
current detection
target port
disk
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
CN202110838256.XA
Other languages
Chinese (zh)
Other versions
CN113746895B (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 CN202110838256.XA priority Critical patent/CN113746895B/en
Publication of CN113746895A publication Critical patent/CN113746895A/en
Application granted granted Critical
Publication of CN113746895B publication Critical patent/CN113746895B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • 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
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method, a system, equipment and a storage medium for acquiring multi-path disk target port group information, wherein the method comprises the following steps: setting a recovery processing mark to be true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not; setting the recovery processing flag to false in response to the multipath disk recovery flag being true; judging whether the command response of the current detection path shows the offline state of the storage volume; and responding to the command response of the current detection path without displaying the offline state of the storage volume, and acquiring and updating the target port group information. According to the method, the fault recovery mark is set when the node fails or the storage node is upgraded and restarted, and when the path detection is carried out, the fault recovery scene is sensed, and the small-period detection is carried out on the fault recovery, so that the multi-path disk target port group information is accurately given in time, the multi-path fault switching and recovery are influenced, and the user experience is improved.

Description

Method and device for acquiring multi-path disk target port group information
Technical Field
The present invention relates to the field of network storage, and in particular, to a method, system, device, and storage medium for acquiring target port group information of a multi-path disk.
Background
For SAN (Storage Area network) network Storage, high availability is crucial, so that multi-path Storage is essential. Storage multipath refers to multiple transport layer physical connections between a host and a storage device, providing higher availability and performance advantages for a network storage system.
One of the key to the storage components of the host operating system is to provide a multipath driver, which functions as: load balancing select paths (specifying which path an I/O (input/output) should use if there are multiple paths) and failover (I/O switching to another path when the path is not on).
The detection of the validity of the paths of the multi-path disk is a precondition for completing the failover and the failure recovery of the multi-path. On one hand, a host multipath driver periodically performs validity detection on a path of a multipath disk, and on the other hand, before failover (failover) or failover (failover), validity detection needs to be performed on a path to be switched to or a path to be switched back to, so as to ensure that a new path can process an I/O request.
The traditional method for detecting the validity of the multi-path disk path firstly inquires whether an array supports an ALUA function, directly acquires the target port group information of the multi-path disk if the array supports the ALUA function, and updates the path optimization controller information. The traditional path validity detection method cannot sense the storage node upgrading or storage node fault recovery scene, so that the multi-path disk target port group information cannot be timely and accurately given, the multi-path fault switching and recovery are influenced, and the user service is influenced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a system, a computer device, and a computer-readable storage medium for acquiring information of a target port group of a multi-path disk, where a failure recovery flag is set when a node fails or when a storage node is upgraded and restarted. When the path detection is carried out, a fault recovery scene is sensed, and the fault recovery is detected in a small period, so that the information of the target port group of the multi-path disk is timely and accurately given, the multi-path fault switching and recovery are influenced, and the user experience is improved.
Based on the above object, an aspect of the embodiments of the present invention provides a method for acquiring information of a target port group of a multi-path disk, including the following steps: setting a recovery processing mark to be true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not; setting the recovery processing flag to false in response to the multipath disk recovery flag being true; judging whether the command response of the current detection path shows the offline state of the storage volume; and responding to the command response of the current detection path without displaying the offline state of the storage volume, and acquiring and updating the target port group information.
In some embodiments, the method further comprises: responding to the multi-path disk recovery mark not being true, and judging whether all effective path command responses are not ready; and restoring the access state of the target port of each valid path in response to all valid path command responses not being ready.
In some embodiments, the restoring the access state of the target port of each active path includes: setting the multipath disk recovery flag to true, and setting the recovery processing flag to false; judging whether the number of times of trying to recover the access state of the target port of the current detection path reaches a threshold value; responding to the number of times of attempting recovery of the access state of the target port of the current detection path not reaching a threshold value, and detecting whether the command response of the current detection path is not ready; and responding to the command response of the current detection path as not ready, delaying for a preset time, adding one to the number of attempts, and returning again to judge whether the number of attempts for recovery reaches the threshold value.
In some embodiments, the obtaining and updating target port group information includes: judging whether other errors exist in the storage volume or not according to the command response of the current detection path; and responding to the command response of the current detection path to show that the storage volume has no other errors, and sending an instruction to the current detection path to acquire and update the target port group information.
In another aspect of the embodiments of the present invention, a system for acquiring information of a target port group of a multi-path disk is provided, including: the first adjusting module is configured to set a recovery processing flag to true, acquire a multipath disk recovery flag, and determine whether the multipath disk recovery flag is true; a second adjustment module configured to set the recovery processing flag to false in response to the multipath disk recovery flag being true; the judging module is configured to judge whether the command response of the current detection path displays the offline state of the storage volume; and the acquisition module is configured to respond to the command of the current detection path and respond to the offline state of the undisplayed storage volume, and acquire and update the target port group information.
In some embodiments, the system further comprises a detection module configured to: responding to the multi-path disk recovery mark not being true, and judging whether all effective path command responses are not ready; and restoring the access state of the target port of each valid path in response to all valid path command responses not being ready.
In some embodiments, the detection module is configured to: setting the multipath disk recovery flag to true, and setting the recovery processing flag to false; judging whether the number of times of trying to recover the access state of the target port of the current detection path reaches a threshold value; responding to the number of times of attempting recovery of the access state of the target port of the current detection path not reaching a threshold value, and detecting whether the command response of the current detection path is not ready; and responding to the command response of the current detection path as not ready, delaying for a preset time, adding one to the number of attempts, and returning again to judge whether the number of attempts for recovery reaches the threshold value.
In some embodiments, the acquisition module is configured to: judging whether other errors exist in the storage volume or not according to the command response of the current detection path; and responding to the command response of the current detection path to show that the storage volume has no other errors, and sending an instruction to the current detection path to acquire and update the target port group information.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method as above.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has the following beneficial technical effects: the fault recovery mark is set when the node fails or the upgrading and restarting of the storage node are carried out. When the path detection is carried out, a fault recovery scene is sensed, and the fault recovery is detected in a small period, so that the information of the target port group of the multi-path disk is timely and accurately given, the multi-path fault switching and recovery are influenced, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic diagram of an embodiment of a method for acquiring information of a target port group of a multi-path disk according to the present invention;
FIG. 2 is a flowchart of a method for acquiring information of a target port group of a multi-path disk according to the present invention;
FIG. 3 is a diagram illustrating an embodiment of a system for acquiring information of a target port group of a multi-path disk according to the present invention;
FIG. 4 is a schematic diagram of a hardware structure of an embodiment of a computer device for acquiring information of a target port group of a multi-path disk according to the present invention;
FIG. 5 is a diagram of an embodiment of a computer storage medium for acquiring multi-path disk target port group information according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In a first aspect of the embodiments of the present invention, an embodiment of a method for acquiring information of a target port group of a multi-path disk is provided. Fig. 1 is a schematic diagram illustrating an embodiment of a method for acquiring multi-path disk target port group information according to the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s1, setting the recovery processing mark to be true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true;
s2, responding to the multi-path disk recovery mark being true, setting the recovery processing mark as false;
s3, judging whether the command response of the current detection path shows the offline state of the storage volume; and
and S4, responding to the command response of the current detection path without displaying the offline state of the storage volume, and acquiring and updating the target port group information.
The path is detected by the bus layer period, and the detection period cannot be set to be shorter due to the consideration of host resources in a large volume scene; the traditional multipath target port group information acquisition is acquired according to a detection period, the detection period cannot be acquired, only the acquisition of the next period can be waited, and the timeliness of acquiring the target port information is limited. Compared with the traditional method for acquiring the information of the target port of the multi-path disk, the embodiment of the patent sets the fault recovery mark when the node fails or the storage node is upgraded and restarted. When the path detection is carried out, a fault recovery scene is sensed, and the fault recovery is detected in a small period, so that the information of the target port group of the multi-path disk is timely and accurately given, the multi-path fault switching and recovery are influenced, and the user experience is improved.
And setting the recovery processing mark to be true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not. If the multipath disk recovery flag is not true, it indicates that the flag is set at the time of multipath disk initialization or at the time of a previous storage upgrade restart or at the time of a storage node failure, and if the multipath disk recovery flag is true, it indicates that there is no problem as described above.
In some embodiments, the method further comprises: responding to the multi-path disk recovery mark not being true, and judging whether all effective path command responses are not ready; and restoring the access state of the target port of each valid path in response to all valid path command responses not being ready. If all valid path command responses are in a not ready-target port inaccessible state, it is indicated that recovery processing is required.
In some embodiments, the restoring the access state of the target port of each active path includes: setting the multipath disk recovery flag to true, and setting the recovery processing flag to false; judging whether the number of times of trying to recover the access state of the target port of the current detection path reaches a threshold value; responding to the number of times of attempting recovery of the access state of the target port of the current detection path not reaching a threshold value, and detecting whether the command response of the current detection path is not ready; and responding to the command response of the current detection path as not ready, delaying for a preset time, adding one to the number of attempts, and returning again to judge whether the number of attempts for recovery reaches the threshold value.
And setting the recovery processing flag to be false in response to the multipath disk recovery flag being true.
And judging whether the command response of the current detection path shows the offline state of the storage volume, responding to the command response of the current detection path without showing the offline state of the storage volume, and acquiring and updating the target port group information.
In some embodiments, the obtaining and updating target port group information includes: judging whether other errors exist in the storage volume or not according to the command response of the current detection path; and responding to the command response of the current detection path to show that the storage volume has no other errors, and sending an instruction to the current detection path to acquire and update the target port group information.
Fig. 2 is a flowchart illustrating a method for acquiring multi-path disk target port group information according to the present invention. An embodiment of the present invention is described with reference to fig. 2.
Firstly, executing a block S101, setting a Recovery processing mark as true, and executing a block S102, obtaining a multipath disk Recovery mark; then, executing a judgment block S103, and judging whether the multipath disk Recovery flag is true; if the multipath disk Recovery flag is not true, indicating that the flag was set at the time of multipath disk initialization or at the time of restart of previous storage upgrade or at the time of storage node failure, then block S104 is jumped, otherwise block S106 is jumped.
If the multipath disk Recovery flag is not true, then executing a block S104, sending TUR commands to all effective paths of the multipath disk, executing a judgment block S105, and judging whether all effective path command responses are not ready, namely, the target port is in an inaccessible state; if all the effective path command responses are not ready, indicating that Recovery processing needs to be carried out, and jumping to a box S107; otherwise block S106 is skipped.
Executing the decision block S107, deciding whether the Recovery processing flag is true, jumping to block S108 if the Recovery processing flag is true, and jumping to block S114 if the Recovery processing flag is not true.
Executing a block S108, setting a Recovery flag of the multi-path disk as true, and setting a Recovery processing flag as false; next, decision block S109 is performed to determine whether the maximum number of attempts has been reached, and if the maximum number of attempts has been reached, the process jumps to block S114, and if the maximum number of attempts has not been reached, the process jumps to block S110.
Executing a block S110, sending a TUR instruction to the current detection path, then executing a judging block S111, and judging whether the command response of the current detection path is in a non-ready-target port inaccessible state; if the command response of the path detection is in the state of not ready-target port inaccessible, which indicates that the fault is not completely recovered, the block S112 is skipped, otherwise, the block S114 is skipped.
Executing a block S112, delaying for 6 seconds; block S113 is performed, the number of attempts is incremented by 1, and then block S109 is returned to again determine whether the maximum number of attempts has been reached.
Executing a block S114, and sending an INQUERY instruction to the current detection path; executing a judgment block S115, and judging whether the command response of the path detection shows the offline state of the storage volume; if the command reply shows the storage volume offline status, then this is complete, otherwise block S116 is skipped.
Executing a block S116, and sending a TUR instruction to the current detection path; executing a decision block S117 to decide whether or not the command response of the current detection path indicates that there is another error in the storage volume; if other errors exist, ending; otherwise, block S118 is skipped.
And an execution block S118, where the array supports ALUA, sends an RTPG instruction to the detection path, and acquires and updates target port group information.
The embodiment of the invention sets the fault recovery mark when the node fails or the storage node is upgraded and restarted. When the path detection is carried out, a fault recovery scene is sensed, and the fault recovery is detected in a small period, so that the information of the target port group of the multi-path disk is timely and accurately given, the multi-path fault switching and recovery are influenced, and the user experience is improved.
It should be particularly noted that, the steps in the embodiments of the method for acquiring information of a multi-path destination group of a disk described above may be intersected, replaced, added, or deleted, and therefore, these methods for acquiring information of a multi-path destination group of a disk, which are reasonably arranged, combined and transformed, should also belong to the scope of the present invention, and should not limit the scope of the present invention to the embodiments.
In view of the foregoing, a second aspect of the embodiments of the present invention provides a system for acquiring information of a target port group of a multi-path disk. As shown in fig. 3, the system 200 includes the following modules: the first adjusting module is configured to set a recovery processing flag to true, acquire a multipath disk recovery flag, and determine whether the multipath disk recovery flag is true; a second adjustment module configured to set the recovery processing flag to false in response to the multipath disk recovery flag being true; the judging module is configured to judge whether the command response of the current detection path displays the offline state of the storage volume; and the acquisition module is configured to respond to the command of the current detection path and respond to the offline state of the undisplayed storage volume, and acquire and update the target port group information.
In some embodiments, the system further comprises a detection module configured to: responding to the multi-path disk recovery mark not being true, and judging whether all effective path command responses are not ready; and restoring the access state of the target port of each valid path in response to all valid path command responses not being ready.
In some embodiments, the detection module is configured to: setting the multipath disk recovery flag to true, and setting the recovery processing flag to false; judging whether the number of times of trying to recover the access state of the target port of the current detection path reaches a threshold value; responding to the number of times of attempting recovery of the access state of the target port of the current detection path not reaching a threshold value, and detecting whether the command response of the current detection path is not ready; and responding to the command response of the current detection path as not ready, delaying for a preset time, adding one to the number of attempts, and returning again to judge whether the number of attempts for recovery reaches the threshold value.
In some embodiments, the acquisition module is configured to: judging whether other errors exist in the storage volume or not according to the command response of the current detection path; and responding to the command response of the current detection path to show that the storage volume has no other errors, and sending an instruction to the current detection path to acquire and update the target port group information.
The embodiment of the invention sets the fault recovery mark when the node fails or the storage node is upgraded and restarted. When the path detection is carried out, a fault recovery scene is sensed, and the fault recovery is detected in a small period, so that the information of the target port group of the multi-path disk is timely and accurately given, the multi-path fault switching and recovery are influenced, and the user experience is improved.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executable by the processor to perform the steps of: s1, setting the recovery processing mark to be true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true; s2, responding to the multi-path disk recovery mark being true, setting the recovery processing mark as false; s3, judging whether the command response of the current detection path shows the offline state of the storage volume; and S4, responding to the command response of the current detection path without displaying the offline state of the storage volume, and acquiring and updating the target port group information.
In some embodiments, the steps further comprise: responding to the multi-path disk recovery mark not being true, and judging whether all effective path command responses are not ready; and restoring the access state of the target port of each valid path in response to all valid path command responses not being ready.
In some embodiments, the restoring the access state of the target port of each active path includes: setting the multipath disk recovery flag to true, and setting the recovery processing flag to false; judging whether the number of times of trying to recover the access state of the target port of the current detection path reaches a threshold value; responding to the number of times of attempting recovery of the access state of the target port of the current detection path not reaching a threshold value, and detecting whether the command response of the current detection path is not ready; and responding to the command response of the current detection path as not ready, delaying for a preset time, adding one to the number of attempts, and returning again to judge whether the number of attempts for recovery reaches the threshold value.
In some embodiments, the obtaining and updating target port group information includes: judging whether other errors exist in the storage volume or not according to the command response of the current detection path; and responding to the command response of the current detection path to show that the storage volume has no other errors, and sending an instruction to the current detection path to acquire and update the target port group information.
The embodiment of the invention sets the fault recovery mark when the node fails or the storage node is upgraded and restarted. When the path detection is carried out, a fault recovery scene is sensed, and the fault recovery is detected in a small period, so that the information of the target port group of the multi-path disk is timely and accurately given, the multi-path fault switching and recovery are influenced, and the user experience is improved.
Fig. 4 is a schematic hardware structure diagram of an embodiment of the computer device for acquiring information of a target port group of a multi-path disk according to the present invention.
Taking the device shown in fig. 4 as an example, the device includes a processor 301 and a memory 302.
The processor 301 and the memory 302 may be connected by a bus or other means, such as the bus connection shown in fig. 4.
The memory 302 is used as a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for acquiring information of a target port group of a multi-path disk in the embodiment of the present application. The processor 301 executes various functional applications and data processing of the server by running nonvolatile software programs, instructions and modules stored in the memory 302, that is, implements the method for acquiring the information of the target port group of the multipath disk according to the embodiment of the method.
The memory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a method of acquiring the multipath disk target port group information, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 302 optionally includes memory located remotely from processor 301, which may be connected to a local module via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Computer instructions 303 corresponding to one or more methods of obtaining multipath disk target port group information are stored in the memory 302 and, when executed by the processor 301, perform the method of obtaining multipath disk target port group information in any of the above-described method embodiments.
Any embodiment of the computer device executing the method for acquiring the multi-path disk target port group information may achieve the same or similar effects as any corresponding embodiment of the foregoing method.
The present invention also provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the method of acquiring the multi-path disc target port group information as described above.
Fig. 5 is a schematic diagram of an embodiment of a computer storage medium for acquiring information of a multi-path disk target port group according to the present invention. Taking the computer storage medium as shown in fig. 5 as an example, the computer readable storage medium 401 stores a computer program 402 which, when executed by a processor, performs the method as described above.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the program of the method for acquiring the information of the target port group of the multipath disk may be stored in a computer readable storage medium, and when executed, the program may include the processes of the embodiments of the methods described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for obtaining multi-path disk target port group information is characterized by comprising the following steps:
setting a recovery processing mark to be true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not;
setting the recovery processing flag to false in response to the multipath disk recovery flag being true;
judging whether the command response of the current detection path shows the offline state of the storage volume; and
and responding to the command response of the current detection path without displaying the offline state of the storage volume, and acquiring and updating the target port group information.
2. The method of claim 1, further comprising:
responding to the multi-path disk recovery mark not being true, and judging whether all effective path command responses are not ready; and
in response to all valid path command responses not being ready, the access state of the target port of each valid path is restored.
3. The method of claim 2, wherein the restoring the access state of the target port of each active path comprises:
setting the multipath disk recovery flag to true, and setting the recovery processing flag to false;
judging whether the number of times of trying to recover the access state of the target port of the current detection path reaches a threshold value;
responding to the number of times of attempting recovery of the access state of the target port of the current detection path not reaching a threshold value, and detecting whether the command response of the current detection path is not ready; and
and in response to the command response of the current detection path being not ready, delaying for a preset time and adding one to the number of attempts, and returning again to judge whether the number of recovery attempts reaches the threshold value.
4. The method of claim 1, wherein obtaining and updating target port group information comprises:
judging whether other errors exist in the storage volume or not according to the command response of the current detection path; and
and responding to the command response of the current detection path to show that the storage volume has no other errors, and sending an instruction to the current detection path to acquire and update the target port group information.
5. A system for obtaining information of a target port group of a multi-path disk, comprising:
the first adjusting module is configured to set a recovery processing flag to true, acquire a multipath disk recovery flag, and determine whether the multipath disk recovery flag is true;
a second adjustment module configured to set the recovery processing flag to false in response to the multipath disk recovery flag being true;
the judging module is configured to judge whether the command response of the current detection path displays the offline state of the storage volume; and
and the acquisition module is configured to respond to the command of the current detection path and respond to the offline state of the undisplayed storage volume, and acquire and update the target port group information.
6. The system of claim 5, further comprising a detection module configured to:
responding to the multi-path disk recovery mark not being true, and judging whether all effective path command responses are not ready; and
in response to all valid path command responses not being ready, the access state of the target port of each valid path is restored.
7. The system of claim 6, wherein the detection module is configured to:
setting the multipath disk recovery flag to true, and setting the recovery processing flag to false;
judging whether the number of times of trying to recover the access state of the target port of the current detection path reaches a threshold value;
responding to the number of times of attempting recovery of the access state of the target port of the current detection path not reaching a threshold value, and detecting whether the command response of the current detection path is not ready; and
and in response to the command response of the current detection path being not ready, delaying for a preset time and adding one to the number of attempts, and returning again to judge whether the number of recovery attempts reaches the threshold value.
8. The system of claim 5, wherein the acquisition module is configured to:
judging whether other errors exist in the storage volume or not according to the command response of the current detection path; and
and responding to the command response of the current detection path to show that the storage volume has no other errors, and sending an instruction to the current detection path to acquire and update the target port group information.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN202110838256.XA 2021-07-23 2021-07-23 Method and device for acquiring multipath disk target port group information Active CN113746895B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110838256.XA CN113746895B (en) 2021-07-23 2021-07-23 Method and device for acquiring multipath disk target port group information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110838256.XA CN113746895B (en) 2021-07-23 2021-07-23 Method and device for acquiring multipath disk target port group information

Publications (2)

Publication Number Publication Date
CN113746895A true CN113746895A (en) 2021-12-03
CN113746895B CN113746895B (en) 2023-04-21

Family

ID=78729027

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110838256.XA Active CN113746895B (en) 2021-07-23 2021-07-23 Method and device for acquiring multipath disk target port group information

Country Status (1)

Country Link
CN (1) CN113746895B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104981788A (en) * 2013-08-20 2015-10-14 株式会社日立制作所 Storage system and control method for storage system
CN111090545A (en) * 2019-11-28 2020-05-01 苏州浪潮智能科技有限公司 Method, device and medium for recovering failed CPLD

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104981788A (en) * 2013-08-20 2015-10-14 株式会社日立制作所 Storage system and control method for storage system
CN111090545A (en) * 2019-11-28 2020-05-01 苏州浪潮智能科技有限公司 Method, device and medium for recovering failed CPLD

Also Published As

Publication number Publication date
CN113746895B (en) 2023-04-21

Similar Documents

Publication Publication Date Title
US9116749B2 (en) Method for dynamic on demand startup of a process or resource
US10972336B2 (en) Technique for resolving a link failure
US20160306710A1 (en) Method and system for recovering virtual network
EP3336695B1 (en) Method and device for reloading system service
CN112506670B (en) Multi-node automatic operation and maintenance task processing method, system and storage medium
CN109428740B (en) Method and device for recovering equipment failure
CN109391514B (en) High-availability-based equipment deployment method, server, storage medium and device
CN112039710B (en) Service fault processing method, terminal equipment and readable storage medium
JP7345921B2 (en) OTA differential update method and system for master-slave architecture
EP3316555A1 (en) Mac address synchronization method, device and system
CN110391940A (en) Response method, device, system, equipment and the storage medium of address of service
CN106411945B (en) A kind of access method and device of Web
EP3335382B1 (en) Fault tolerance in distributed graph processing networks
JP5617304B2 (en) Switching device, information processing device, and fault notification control program
CN105721203A (en) Upgrade processing method and device
CN107465621B (en) Router discovery method, SDN controller, router and network system
US20180248744A1 (en) Automatic recovery in remote management services
CN110213213B (en) Timing task processing method and system for application
CN113746895A (en) Method and device for acquiring multi-path disk target port group information
CN101674251B (en) Method for upgrade processing for recursive router, device and router therefor
CN113886291B (en) Path disabling method and system
JP2006113754A (en) Software update device and method
US11411829B1 (en) Provisioning managed network nodes and/or managing network nodes
CN110417599B (en) Main/standby node switching method and node server
US10516625B2 (en) Network entities on ring networks

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