CN113746895B - Method and device for acquiring multipath disk target port group information - Google Patents

Method and device for acquiring multipath disk target port group information Download PDF

Info

Publication number
CN113746895B
CN113746895B CN202110838256.XA CN202110838256A CN113746895B CN 113746895 B CN113746895 B CN 113746895B CN 202110838256 A CN202110838256 A CN 202110838256A CN 113746895 B CN113746895 B CN 113746895B
Authority
CN
China
Prior art keywords
current detection
path
target port
recovery
detection path
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.)
Active
Application number
CN202110838256.XA
Other languages
Chinese (zh)
Other versions
CN113746895A (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 multipath disk target port group information, wherein the method comprises the following steps: setting a recovery processing mark as true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not; in response to the multipath disk recovery flag being true, setting the recovery processing flag to false; judging whether the command response of the current detection path displays the offline state of the storage volume or not; and responding to the command response of the current detection path to the offline state of the undisplayed storage volume, and acquiring and updating the target port group information. According to the invention, the fault recovery mark is set when the node is in fault or the storage node is updated and restarted, the fault recovery scene is perceived when the path is detected, and the fault recovery is detected for 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 further influenced, and the user experience is improved.

Description

Method and device for acquiring multipath 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 information of a target port group of a multipath disk.
Background
For SAN (Storage Area Networking, storage area network) network storage, high availability is critical, so storage multipath 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 storage components of the host operating system is to provide multipath driving, which functions as follows: load balanced selection paths (which path should be used by a given I/O (input/output) if there are multiple paths) and failover (I/O switches to another path when a path is not through).
The validity detection of the paths of the multipath disk is a precondition for the multipath to complete the failover and the failback. The host multipath drive periodically performs validity detection on paths of multipath disks, and before failover (failover) or failback, validity detection on paths to be switched to or paths to be switched back is needed to ensure that new paths can process I/O requests.
The traditional multipath disk path effectiveness detection method comprises the steps of firstly inquiring whether an array supports an ALUA function, directly acquiring target port group information of a multipath disk if the array supports the ALUA function, and updating path optimization controller information. The traditional path effectiveness detection method is not perceived on a storage node upgrading or storage node fault recovery scene, so that multipath disk target port group information cannot be timely and accurately given, the multipath fault switching and recovery are affected, and the user service is affected.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, a system, a computer device and a computer readable storage medium for obtaining information of a target port group of a multipath disk. When path detection is carried out, a fault recovery scene is perceived, and small-period detection is carried out on fault recovery, so that multipath disk target port group information is timely and accurately given, multipath fault switching and recovery are further affected, and user experience is improved.
Based on the above objects, an aspect of the embodiments of the present invention provides a method for obtaining information about a target port group of a multipath disk, including the following steps: setting a recovery processing mark as true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not; in response to the multipath disk recovery flag being true, setting the recovery processing flag to false; judging whether the command response of the current detection path displays the offline state of the storage volume or not; and responding to the command response of the current detection path to the offline state of the undisplayed storage volume, and acquiring and updating the target port group information.
In some embodiments, the method further comprises: responding to the multipath disk recovery mark not being true, judging whether all valid 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 replies not being ready.
In some embodiments, the recovering the access state of the target port of each active path includes: setting the multipath disk recovery mark as true, and setting the recovery processing mark as false; judging whether the number of times of attempting to recover the access state of the target port of the current detection path reaches a threshold value or not; detecting whether the command response of the current detection path is not ready or not in response to the number of times that the access state of the target port of the current detection path is attempted to be recovered does not reach a threshold value; and in response to the command reply of the current detection path not being ready, delaying for a predetermined time and adding one to the number of attempts, and returning again to judge whether the number of attempts to recover reaches the threshold.
In some embodiments, the obtaining and updating the destination port group information includes: judging whether the command response of the current detection path shows that the storage volume has other errors or not; and responding to the command response of the current detection path to display 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 embodiment of the present invention, a system for acquiring information of a target port group of a multipath disk is provided, including: the first adjusting module is configured to set the recovery processing flag to be true, acquire a multipath disk recovery flag, and judge whether the multipath disk recovery flag is true or not; 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 shows the offline state of the storage volume; and the acquisition module is configured to respond to the command response of the current detection path to the offline state of the non-displayed 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 multipath disk recovery mark not being true, judging whether all valid 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 replies not being ready.
In some embodiments, the detection module is configured to: setting the multipath disk recovery mark as true, and setting the recovery processing mark as false; judging whether the number of times of attempting to recover the access state of the target port of the current detection path reaches a threshold value or not; detecting whether the command response of the current detection path is not ready or not in response to the number of times that the access state of the target port of the current detection path is attempted to be recovered does not reach a threshold value; and in response to the command reply of the current detection path not being ready, delaying for a predetermined time and adding one to the number of attempts, and returning again to judge whether the number of attempts to recover reaches the threshold.
In some embodiments, the acquisition module is configured to: judging whether the command response of the current detection path shows that the storage volume has other errors or not; and responding to the command response of the current detection path to display 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 yet another aspect of the embodiment of the present invention, there is also provided a computer apparatus, including: at least one processor; and a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method as above.
In yet another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method steps as described above.
The invention has the following beneficial technical effects: by setting the failure recovery flag when a node fails or when a storage node is upgraded and restarted. When path detection is carried out, a fault recovery scene is perceived, and small-period detection is carried out on fault recovery, so that multipath disk target port group information is timely and accurately given, multipath fault switching and recovery are further affected, and user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an embodiment of a method for obtaining information about a target port group of a multi-path disk according to the present invention;
FIG. 2 is a flowchart of a method for obtaining information about a target port group of a multi-path disk according to the present invention;
FIG. 3 is a schematic diagram of an embodiment of a system for obtaining information about a target port group of a multi-path disk according to the present invention;
FIG. 4 is a schematic hardware architecture diagram of an embodiment of a computer device for obtaining information about a target port group of a multi-path disk according to the present invention;
fig. 5 is a schematic diagram of an embodiment of a computer storage medium for obtaining multipath disk destination 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 will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
In a first aspect of the embodiment of the present invention, an embodiment of a method for acquiring information of a target port group of a multipath disk is provided. Fig. 1 is a schematic diagram of an embodiment of a method for obtaining information about a target port group of a multipath disk according to the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s1, setting a recovery processing mark as true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not;
s2, in response to the multipath disk recovery mark being true, setting the recovery processing mark to be 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 to the offline state of the non-displayed storage volume, and acquiring and updating the target port group information.
The paths are detected in the bus layer period, and in a large number of volume scenes, the detection period cannot be set smaller due to the consideration of host resources; the traditional multi-path target port group information is acquired according to a detection period, the detection period cannot be acquired, and the acquisition of the target port information can be limited in timeliness only when the acquisition of the next period can be waited. Compared with the traditional method for acquiring the multipath disk target port information, the method for acquiring the multipath disk target port information sets the fault recovery mark when the node is in fault or when the storage node is updated and restarted. When path detection is carried out, a fault recovery scene is perceived, and small-period detection is carried out on fault recovery, so that multipath disk target port group information is timely and accurately given, multipath fault switching and recovery are further affected, and user experience is improved.
And setting the recovery processing flag to be true, acquiring a multipath disk recovery flag, and judging whether the multipath disk recovery flag is true or not. If the multi-path disk recovery flag is not true, it indicates that the multi-path disk is initialized or the previous storage upgrade is restarted or the storage node fails, and if the multi-path disk recovery flag is true, it indicates that the above problem is not solved.
In some embodiments, the method further comprises: responding to the multipath disk recovery mark not being true, judging whether all valid 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 replies not being ready. If all valid path command replies are not ready-target port inaccessible, indicating that recovery processing is required.
In some embodiments, the recovering the access state of the target port of each active path includes: setting the multipath disk recovery mark as true, and setting the recovery processing mark as false; judging whether the number of times of attempting to recover the access state of the target port of the current detection path reaches a threshold value or not; detecting whether the command response of the current detection path is not ready or not in response to the number of times that the access state of the target port of the current detection path is attempted to be recovered does not reach a threshold value; and in response to the command reply of the current detection path not being ready, delaying for a predetermined time and adding one to the number of attempts, and returning again to judge whether the number of attempts to recover reaches the threshold.
And 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 acquiring and updating the target port group information in response to the command response of the current detection path not showing the offline state of the storage volume.
In some embodiments, the obtaining and updating the destination port group information includes: judging whether the command response of the current detection path shows that the storage volume has other errors or not; and responding to the command response of the current detection path to display 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 of a method for obtaining information of a target port group of a multipath disk according to the present invention. An embodiment of the invention is described in connection with fig. 2.
Firstly, executing a block S101, setting a Recovery processing flag as true, executing a block S102, and acquiring a multipath disk Recovery flag; then, a decision block S103 is executed to determine 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 a previous storage upgrade restart or storage node failure, block S104 is skipped, otherwise block S106 is skipped.
If the multipath disk Recovery flag is not true, then executing a block S104, sending a turn command to all the valid paths of the multipath disk, executing a decision block S105, and determining whether all valid path command responses are not ready, that is, a target port inaccessible state; if all valid path command responses are not ready, indicating that Recovery processing is required, jumping to block S107; otherwise, block S106 is skipped.
Decision block S107 is performed to determine whether the Recovery processing flag is true, and if the Recovery processing flag is true, block S108 is skipped, and if the Recovery processing flag is not true, block S114 is skipped.
Executing a block S108, setting a multipath disk Recovery flag as true, and setting a Recovery processing flag as false; then, a decision block S109 is performed to determine whether the maximum number of attempts is reached, and if the maximum number of attempts is reached, the process goes to S114, and if the maximum number of attempts is not reached, the process goes to block S110.
Executing a block S110, transmitting a TUR instruction to the current detection path, and then executing a judging block S111, judging whether the command response of the current detection path is not ready-the target port is inaccessible; if the command response of the current detection path is not ready-the target port is not accessible, the fault is not completely recovered, and the process goes to the block S112, otherwise, the process goes to the block S114.
Executing a block S112 and delaying for 6 seconds; block S113 is executed, the number of attempts is increased by 1, and then block S109 is returned to again determine whether the maximum number of attempts is reached.
Executing a block S114, sending an INQUERY instruction to the current detection path; executing a judging block S115, judging whether the command response of the current detection path displays the offline state of the storage volume; if the command reply indicates a storage volume offline status, then end, otherwise block S116 is skipped.
Executing a block S116, and sending a TUR instruction to the current detection path; executing a judging block S117, judging whether the command response of the current detection path displays other errors on the storage volume; ending if there are other errors; otherwise block S118 is skipped.
Executing block S118, the array support ALUA sends an RTPG instruction to the current detection path, and obtains and updates the target port group information.
The embodiment of the invention sets the fault recovery mark when the node is in fault or when the storage node is updated and restarted. When path detection is carried out, a fault recovery scene is perceived, and small-period detection is carried out on fault recovery, so that multipath disk target port group information is timely and accurately given, multipath fault switching and recovery are further affected, and user experience is improved.
It should be noted that, in the foregoing embodiments of the method for acquiring multi-path disk target port group information, the steps may be intersected, replaced, added and subtracted, so that the method for acquiring multi-path disk target port group information by using these reasonable permutation and combination transformations shall also belong to the protection scope of the present invention, and shall not limit the protection scope of the present invention to the embodiments.
Based on the above objective, a second aspect of the embodiments of the present invention provides a system for acquiring information of a target port group of a multipath disk. As shown in fig. 3, the system 200 includes the following modules: the first adjusting module is configured to set the recovery processing flag to be true, acquire a multipath disk recovery flag, and judge whether the multipath disk recovery flag is true or not; 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 shows the offline state of the storage volume; and the acquisition module is configured to respond to the command response of the current detection path to the offline state of the non-displayed 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 multipath disk recovery mark not being true, judging whether all valid 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 replies not being ready.
In some embodiments, the detection module is configured to: setting the multipath disk recovery mark as true, and setting the recovery processing mark as false; judging whether the number of times of attempting to recover the access state of the target port of the current detection path reaches a threshold value or not; detecting whether the command response of the current detection path is not ready or not in response to the number of times that the access state of the target port of the current detection path is attempted to be recovered does not reach a threshold value; and in response to the command reply of the current detection path not being ready, delaying for a predetermined time and adding one to the number of attempts, and returning again to judge whether the number of attempts to recover reaches the threshold.
In some embodiments, the acquisition module is configured to: judging whether the command response of the current detection path shows that the storage volume has other errors or not; and responding to the command response of the current detection path to display 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 is in fault or when the storage node is updated and restarted. When path detection is carried out, a fault recovery scene is perceived, and small-period detection is carried out on fault recovery, so that multipath disk target port group information is timely and accurately given, multipath fault switching and recovery are further affected, and 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 a recovery processing mark as true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not; s2, in response to the multipath disk recovery mark being true, setting the recovery processing mark to be 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 to the offline state of the non-displayed storage volume, and acquiring and updating the target port group information.
In some embodiments, the steps further comprise: responding to the multipath disk recovery mark not being true, judging whether all valid 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 replies not being ready.
In some embodiments, the recovering the access state of the target port of each active path includes: setting the multipath disk recovery mark as true, and setting the recovery processing mark as false; judging whether the number of times of attempting to recover the access state of the target port of the current detection path reaches a threshold value or not; detecting whether the command response of the current detection path is not ready or not in response to the number of times that the access state of the target port of the current detection path is attempted to be recovered does not reach a threshold value; and in response to the command reply of the current detection path not being ready, delaying for a predetermined time and adding one to the number of attempts, and returning again to judge whether the number of attempts to recover reaches the threshold.
In some embodiments, the obtaining and updating the destination port group information includes: judging whether the command response of the current detection path shows that the storage volume has other errors or not; and responding to the command response of the current detection path to display 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 is in fault or when the storage node is updated and restarted. When path detection is carried out, a fault recovery scene is perceived, and small-period detection is carried out on fault recovery, so that multipath disk target port group information is timely and accurately given, multipath fault switching and recovery are further affected, and user experience is improved.
Fig. 4 is a schematic hardware structure of an embodiment of the computer device for obtaining the target port group information of the multipath disk according to the present invention.
Taking the example of the apparatus shown in fig. 4, a processor 301 and a memory 302 are included in the apparatus.
The processor 301 and the memory 302 may be connected by a bus or otherwise, for example in fig. 4.
The memory 302 is used as a non-volatile computer readable storage medium, and may be used to store a non-volatile software program, a non-volatile computer executable program, and a module, such as program instructions/modules corresponding to a method for acquiring multipath disk destination port group information in the embodiments of the present application. The processor 301 executes various functional applications of the server and data processing by executing nonvolatile software programs, instructions and modules stored in the memory 302, that is, implements the method for acquiring multipath disk target port group information according to the above method embodiment.
Memory 302 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of a method of acquiring multi-path disk target port group information, or the like. In addition, 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 may optionally include memory located remotely from processor 301, which may be connected to the 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.
One or more computer instructions 303 corresponding to a method for obtaining multipath disk destination port group information are stored in the memory 302, which when executed by the processor 301, perform the method for obtaining multipath disk destination port group information in any of the method embodiments described above.
Any one embodiment of the computer device executing the method for acquiring the multipath disk target port group information can achieve the same or similar effect as any one embodiment of the method corresponding to the embodiment.
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 multipath disk target port group information as described above.
Fig. 5 is a schematic diagram of an embodiment of the computer storage medium for obtaining the target port group information of the multipath disk according to the present invention. Taking a computer storage medium as shown in fig. 5 as an example, the computer readable storage medium 401 stores a computer program 402 that when executed by a processor performs the above method.
Finally, it should be noted that, as will be appreciated by those skilled in the art, all or part of the procedures in the methods of the foregoing embodiments may be implemented by a computer program to instruct related hardware, and the program of the method for obtaining the multipath disk destination port group information may be stored in a computer readable storage medium, where the program may include the procedures of the embodiments of the foregoing methods when executed. 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 computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
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 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 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 foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages 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 for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (8)

1. The method for acquiring the multipath disk target port group information is characterized by comprising the following steps:
setting a recovery processing mark as true, acquiring a multipath disk recovery mark, and judging whether the multipath disk recovery mark is true or not;
in response to the multipath disk recovery flag being true, setting the recovery processing flag to false;
judging whether the command response of the current detection path displays the offline state of the storage volume or not; and
responding the command response of the current detection path to the offline state of the non-displayed storage volume, acquiring and updating the target port group information,
the method further comprises the steps of:
responding to the multipath disk recovery mark not being true, judging whether all valid path command responses are not ready; and
and responding that all the valid path command replies are not ready, and recovering the access state of the target port of each valid path.
2. The method of claim 1, wherein the restoring the access state of the destination port of each active path comprises:
setting the multipath disk recovery mark as true, and setting the recovery processing mark as false;
judging whether the number of times of attempting to recover the access state of the target port of the current detection path reaches a threshold value or not;
detecting whether the command response of the current detection path is not ready or not in response to the number of times that the access state of the target port of the current detection path is attempted to be recovered does not reach a threshold value; and
in response to the command reply of the current detection path not being ready, delaying for a predetermined time and adding one to the number of attempts, and returning again to judge whether the number of attempts to recover reaches the threshold.
3. The method of claim 1, wherein the obtaining and updating the destination port group information comprises:
judging whether the command response of the current detection path shows that the storage volume has other errors or not; and
and responding to the command response of the current detection path to display 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.
4. A system for obtaining multipath disk target port group information, comprising:
the first adjusting module is configured to set the recovery processing flag to be true, acquire a multipath disk recovery flag, and judge whether the multipath disk recovery flag is true or not;
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 shows the offline state of the storage volume; and
an acquisition module configured to respond to the command of the current detection path to acquire and update the target port group information in response to the offline state of the non-displayed storage volume,
the system further comprises a detection module configured to:
responding to the multipath disk recovery mark not being true, judging whether all valid path command responses are not ready; and
and responding that all the valid path command replies are not ready, and recovering the access state of the target port of each valid path.
5. The system of claim 4, wherein the detection module is configured to:
setting the multipath disk recovery mark as true, and setting the recovery processing mark as false;
judging whether the number of times of attempting to recover the access state of the target port of the current detection path reaches a threshold value or not;
detecting whether the command response of the current detection path is not ready or not in response to the number of times that the access state of the target port of the current detection path is attempted to be recovered does not reach a threshold value; and
in response to the command reply of the current detection path not being ready, delaying for a predetermined time and adding one to the number of attempts, and returning again to judge whether the number of attempts to recover reaches the threshold.
6. The system of claim 4, wherein the acquisition module is configured to:
judging whether the command response of the current detection path shows that the storage volume has other errors or not; and
and responding to the command response of the current detection path to display 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.
7. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which instructions when executed by the processor implement the steps of the method of any one of claims 1-3.
8. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any of claims 1-3.
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 CN113746895A (en) 2021-12-03
CN113746895B true 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)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5948504B2 (en) * 2013-08-20 2016-07-06 株式会社日立製作所 Storage system and storage system control method
CN111090545B (en) * 2019-11-28 2022-07-26 苏州浪潮智能科技有限公司 Method, device and medium for recovering failed CPLD

Also Published As

Publication number Publication date
CN113746895A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
US11110347B2 (en) Game server switching method, apparatus, and system
US10972336B2 (en) Technique for resolving a link failure
EP3336695B1 (en) Method and device for reloading system service
US20120137012A1 (en) Method for Dynamic On Demand Startup of a Process or Resource
US10038593B2 (en) Method and system for recovering virtual network
US20150215156A1 (en) Method and apparatus for network failure restoration
US20170264587A1 (en) Method for Synchronizing Virtual Machine Location Information Between Data Center Gateways, Gateway, and System
JP6379013B2 (en) Network control system, network control method and program
CN106411945B (en) A kind of access method and device of Web
CN112218342A (en) Method, device and system for realizing core network sub-slice disaster tolerance
US10635562B2 (en) Fault tolerance in distributed graph processing networks
CN110784549A (en) Network node selection method and device, first network node and storage medium
CN110391940A (en) Response method, device, system, equipment and the storage medium of address of service
US20170238273A1 (en) Application registration methods and apparatuses
US20050083855A1 (en) Method and system for identifying the health of virtual routers
CN113746895B (en) Method and device for acquiring multipath disk target port group information
US20170296928A1 (en) Method and apparatus for storing user data
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN112492030B (en) Data storage method, device, computer equipment and storage medium
CN113886291B (en) Path disabling method and system
US20180176072A1 (en) Method and Apparatus for Protecting Active and Standby Access Network Elements in Data Communications Network
US10887206B2 (en) Interconnect port link state monitoring utilizing unstable link state analysis
WO2015021827A1 (en) Method,device and system for offline reconnection of a web application
CN109428814B (en) Multicast traffic transmission method, related equipment and computer readable storage medium
CN110932878A (en) Management method, equipment and system of distributed network

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