CN113886291B - Path disabling method and system - Google Patents

Path disabling method and system Download PDF

Info

Publication number
CN113886291B
CN113886291B CN202110999557.0A CN202110999557A CN113886291B CN 113886291 B CN113886291 B CN 113886291B CN 202110999557 A CN202110999557 A CN 202110999557A CN 113886291 B CN113886291 B CN 113886291B
Authority
CN
China
Prior art keywords
path
disabled
state
active
paths
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
CN202110999557.0A
Other languages
Chinese (zh)
Other versions
CN113886291A (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 CN202110999557.0A priority Critical patent/CN113886291B/en
Publication of CN113886291A publication Critical patent/CN113886291A/en
Application granted granted Critical
Publication of CN113886291B publication Critical patent/CN113886291B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • 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

Abstract

The application discloses a method and a system for disabling a path, wherein the method comprises the following steps: acquiring the state of a path to be disabled in multi-path equipment, and judging whether the path to be disabled can be disabled or not based on the state; in response to the path to be disabled being able to be disabled, acquiring a path in a multi-path device, and judging whether the path is in an active state and is not the path to be disabled; in response to the path being active and not being the path to be disabled, setting the path to be disabled to an offline state to disable the path to be disabled; and acquiring the number of active paths and the total number of paths of the adapter to which the path to be disabled belongs, and updating the state of the adapter based on the number of active paths and the total number of paths to complete the disabling of the path to be disabled. By the scheme of the application, the influence of the forbidden path on the customer service is avoided, and the efficiency and reliability of the forbidden path are improved.

Description

Path disabling method and system
Technical Field
The present application relates to the field of storage technologies, and in particular, to a path disabling method and system.
Background
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. In SAN (Storage Area Network ) network storage applications, it is often necessary to configure the client hosts with multiple paths to ensure traffic sustainability. In terms of multipath disk management, users need the disable and enable functions of the path channels of the multipath device.
The method for disabling paths of the conventional multipath device firstly inquires whether paths to be disabled are already in a disabled state, and if the paths are not in the disabled state, path disabling of the multipath device is directly carried out. According to the conventional path disabling method for the multipath equipment, on one hand, path disabling is directly carried out without analyzing the current state of the path and the state of the multipath equipment, so that the service IO of the multipath is influenced, and the user service is influenced; on the other hand, no post-processing is performed after the disabling path, for example, modifying the state of the host adapter, thereby affecting the user traffic. Aiming at the problems that the traditional direct path disabling can cause interruption influence on user service and the like, how to disable paths in the multipath equipment by an effective method improves the efficiency and the reliability of disabled paths becomes a technical problem.
Disclosure of Invention
In view of the above, the application provides a path disabling method and system, which solve the problem that the conventional direct path disabling can cause interruption to user service and affect user experience, and implement the path disabling of the multipath equipment in a simple and efficient manner, thereby improving the efficiency and reliability of the path disabling.
Based on the above object, an aspect of the embodiments of the present application provides a path disabling method, which specifically includes the following steps:
acquiring the state of a path to be disabled in multi-path equipment, and judging whether the path to be disabled can be disabled or not based on the state;
in response to the path to be disabled being able to be disabled, acquiring a path in a multi-path device, and judging whether the path is in an active state and is not the path to be disabled;
in response to the path being active and not being the path to be disabled, setting the path to be disabled to an offline state to disable the path to be disabled;
and acquiring the number of active paths and the total number of paths of the adapter to which the path to be disabled belongs, and updating the state of the adapter based on the number of active paths and the total number of paths to complete the disabling of the path to be disabled.
In some implementations, determining whether the path to be disabled can be disabled based on the state includes:
judging whether the path to be disabled is in an active state or not according to the fact that the path to be disabled is not in a SCSI reserved state or an initialization state or a removal state;
and in response to the path to be disabled not being in an active state, determining that the path to be disabled cannot be disabled.
In some embodiments, determining whether the path to be disabled may be disabled based on the state further comprises:
and determining that the path to be disabled cannot be disabled in response to the path to be disabled being in a SCSI reserved state or an initialized state or a removed state.
In some implementations, determining whether the path to be disabled can be disabled based on the state further includes:
in response to the path to be disabled being active, it is determined that the path to be disabled may be disabled.
In some embodiments, acquiring a path in a multipath device and determining whether the path is active and not the path to be disabled comprises:
acquiring paths with subscript 0 and the maximum path number in the multipath equipment;
judging whether the path is in an active state and is not the path to be disabled;
adding 1 to the subscript in response to the path not being in an active state and not being the path to be disabled, and judging whether the subscript added with 1 reaches the maximum path number;
and if the subscript added with 1 does not reach the maximum path number, acquiring a path corresponding to the subscript added with 1, and returning to the step of judging whether the path is in an active state and is not the path to be disabled.
In some embodiments, acquiring a path in a multipath device and determining whether the path is active and not the path to be disabled further comprises:
and in response to the 1-added subscript reaching the maximum path number, determining that the path to be disabled cannot be disabled.
In some embodiments, the method further comprises:
after setting the path to be disabled to an offline state to disable the path to be disabled, the number of paths of the adapter is reduced by 1.
In some implementations, updating the state of the adapter based on the number of active paths and the total number of paths includes:
judging whether the number of the active paths of the adapter to which the path to be disabled belongs is 0;
and if the number of the active paths of the adapter to which the path to be disabled belongs is 0, setting the adapter to be in a failure state.
In some implementations, updating the state of the adapter based on the number of active paths and the total number of paths further includes:
if the number of the active paths of the adapter to which the path to be disabled belongs is not 0, judging whether the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of the paths;
and if the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of paths, setting the adapter to be in a degradation state.
In another aspect of the embodiment of the present application, there is also provided a disabling system for a path, including:
the judging module is configured to acquire the state of a path to be disabled in the multipath equipment and judge whether the path to be disabled can be disabled or not based on the state;
the judging module is further configured to respond to the path to be disabled, acquire a path in the multipath equipment, and judge whether the path is in an active state and is not the path to be disabled;
a setting module configured to set the path to be disabled to an offline state to disable the path to be disabled in response to the path being in an active state and not being the path to be disabled;
and the updating module is configured to acquire the number of active paths and the total number of paths of the adapter to which the path to be disabled belongs, and update the state of the adapter based on the number of active paths and the total number of paths so as to complete the disabling of the path to be disabled.
In some embodiments, the determination module is further configured to:
judging whether the path to be disabled is in an active state or not according to the fact that the path to be disabled is not in a SCSI reserved state or an initialization state or a removal state;
and in response to the path to be disabled not being in an active state, determining that the path to be disabled cannot be disabled.
In some embodiments, the determination module is further configured to determine that the path to be disabled cannot be disabled in response to the path to be disabled being in a SCSI reserved state or an initialized state or a removed state.
In some embodiments, the determination module is further configured to determine that the path to be disabled may be disabled in response to the path to be disabled being active.
In some embodiments, the determination module is further configured to:
acquiring paths with subscript 0 and the maximum path number in the multipath equipment;
judging whether the path is in an active state and is not the path to be disabled;
adding 1 to the subscript in response to the path not being in an active state and not being the path to be disabled, and judging whether the subscript added with 1 reaches the maximum path number;
and if the subscript added with 1 does not reach the maximum path number, acquiring a path corresponding to the subscript added with 1, and returning to the step of judging whether the path is in an active state and is not the path to be disabled.
In some embodiments, the determining module is further configured to determine that the path to be disabled cannot be disabled in response to the 1-added subscript reaching a maximum number of paths.
In some implementations, the setting module is further configured to decrease the number of paths of the adapter by 1 after setting the path to be disabled to an offline state to disable the path to be disabled.
In some implementations, updating the state of the adapter based on the number of active paths and the total number of paths includes:
judging whether the number of the active paths of the adapter to which the path to be disabled belongs is 0;
and if the number of the active paths of the adapter to which the path to be disabled belongs is 0, setting the adapter to be in a failure state.
In some implementations, updating the state of the adapter based on the number of active paths and the total number of paths further includes:
if the number of the active paths of the adapter to which the path to be disabled belongs is not 0, judging whether the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of the paths;
and if the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of paths, setting the adapter to be in a degradation state.
The application has the following beneficial technical effects: on one hand, the current state of the path and the state of the multipath equipment are analyzed, so that service interruption caused by the fact that the path is forbidden due to the fact that the forbidden condition is not reached is avoided; on the other hand, after the path is forbidden, the post-processing is carried out on the adapter, so that the influence of the operation of the forbidden path on the failover and recovery is avoided, the influence of the forbidden path on the customer service is avoided through the combination of the two aspects, and the efficiency and the reliability of the forbidden path are improved.
Drawings
In order to more clearly illustrate the embodiments of the application 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 application 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 block diagram of one embodiment of a method for disabling a path provided by the present application;
fig. 2 is a schematic diagram of an embodiment of a path disabling system according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following embodiments of the present application will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present application, 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 application, and the following embodiments are not described one by one.
Based on the above object, in a first aspect of the embodiments of the present application, an embodiment of a path disabling method is provided. As shown in fig. 1, it includes the steps of:
step S101, acquiring a state of a path to be disabled in multi-path equipment, and judging whether the path to be disabled can be disabled or not based on the state;
step S103, responding to the path to be disabled, acquiring a path in the multipath equipment, and judging whether the path is in an active state and is not the path to be disabled;
step S105, setting the path to be disabled to be offline to disable the path to be disabled in response to the path being in an active state and not being the path to be disabled;
step S107, the number of active paths and the total number of paths of the adapter to which the path to be disabled belongs are obtained, and the state of the adapter is updated based on the number of active paths and the total number of paths so as to complete the disabling of the path to be disabled.
According to the embodiment of the application, on one hand, the current state of the path and the state of the multipath equipment are analyzed, so that service interruption caused by the fact that the path is forbidden due to the fact that the forbidden condition is not reached is avoided; on the other hand, after the path is forbidden, the post-processing is carried out on the adapter, so that the influence of the operation of the forbidden path on the failover and recovery is avoided, the influence of the forbidden path on the customer service is avoided through the combination of the two aspects, and the efficiency and the reliability of the forbidden path are improved.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by a computer program for instructing relevant hardware, where the program may be stored on a computer readable storage medium, and where the program, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the method embodiments previously described.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In some implementations, determining whether the path to be disabled can be disabled based on the state includes:
judging whether the path to be disabled is in an active state or not according to the fact that the path to be disabled is not in a SCSI reserved state or an initialization state or a removal state;
and in response to the path to be disabled not being in an active state, determining that the path to be disabled cannot be disabled.
In some implementations, determining whether the path to be disabled can be disabled based on the state further includes:
and determining that the path to be disabled cannot be disabled in response to the path to be disabled being in a SCSI reserved state or an initialized state or a removed state.
In some implementations, determining whether the path to be disabled can be disabled based on the state further includes:
in response to the path to be disabled being active, it is determined that the path to be disabled may be disabled.
Specifically, the state of the path to be disabled may be determined according to the following steps:
and judging whether the path to be disabled is in a SCSI reserved state or not. If the path to be disabled is in the SCSI reserved state, the path to be disabled cannot be disabled, and a message is sent to an upper server to feed back that the path to be disabled cannot be disabled and explain the reason, namely that the path to be disabled is currently in the SCSI reserved state, and the path to be disabled cannot be disabled.
If the path to be disabled is not in the SCSI reserved state, judging whether the path to be disabled is in an initialized state or a removed state. If the path to be disabled is in the initialized state or the removed state, the path to be disabled cannot be disabled, and a message is sent to the upper server to feed back that the path to be disabled cannot be disabled and explain the reason, namely that the path to be disabled is currently in the initialized state or the removed state, and the path to be disabled cannot be disabled.
If the path to be disabled is not in the initialized state or the removed state, judging whether the path to be disabled is in the active state, if the path to be disabled is not in the active state, disabling the path to be disabled, and sending a message to an upper server to feed back that the path to be disabled cannot be disabled and explain the reason, namely that the path to be disabled is not in the active state currently, and disabling the path to be disabled cannot be disabled. The path to be disabled may be disabled if the path to be disabled is currently in an active state.
By identifying the path state to be disabled, the problem that the multipath equipment cannot access due to direct path disabling when the path to be disabled is in a SCSI reserved state or an initialized state or a removed state is avoided.
In some implementations, acquiring a path in a multipath device and determining whether the path is active and not the path to be disabled includes:
acquiring paths with subscript 0 and the maximum path number in the multipath equipment;
judging whether the path is in an active state and is not the path to be disabled;
adding 1 to the subscript in response to the path not being in an active state and not being the path to be disabled, and judging whether the subscript added with 1 reaches the maximum path number;
and if the subscript added with 1 does not reach the maximum path number, acquiring a path corresponding to the subscript added with 1, and returning to the step of judging whether the path is in an active state and is not the path to be disabled.
In some embodiments, acquiring a path in a multipath device and determining whether the path is active and not the path to be disabled further comprises:
and in response to the 1-added subscript reaching the maximum path number, determining that the path to be disabled cannot be disabled.
By judging the remaining available paths in the multi-path device, whether the multi-path device has other paths in an active state except the path to be disabled is checked, so that the situation that the multi-path device cannot be accessed because the multi-path device has no other available paths after the path to be disabled is avoided.
In some embodiments, the method further comprises:
after setting the path to be disabled to an offline state to disable the path to be disabled, the number of paths of the adapter is reduced by 1.
In some implementations, updating the state of the adapter based on the number of active paths and the total number of paths includes:
judging whether the number of the active paths of the adapter to which the path to be disabled belongs is 0;
and if the number of the active paths of the adapter to which the path to be disabled belongs is 0, setting the adapter to be in a failure state.
In some implementations, updating the state of the adapter based on the number of active paths and the total number of paths further includes:
if the number of the active paths of the adapter to which the path to be disabled belongs is not 0, judging whether the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of the paths;
and if the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of paths, setting the adapter to be in a degradation state.
Specifically, how to update the state of the adapter to which the path to be disabled belongs after the path to be disabled is set to the offline state is described below. The method specifically comprises the following steps:
subtracting 1 from the number of adapter paths to which the paths to be disabled belong;
judging whether the number of the adapter active paths to which the paths to be disabled belong is 0; if the number of the active paths of the adapter to which the path to be disabled belongs is 0, indicating that the adapter to which the path to be disabled belongs has no effective path, and the adapter is in a failure state, setting the adapter to be in the failure state; otherwise, judging whether the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of the paths of the adapter; if the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of the paths of the adapter, indicating that the adapter to which the path to be disabled belongs is not in an active state, and setting the adapter to a degradation state; otherwise, indicating that the adapter is in a normal state, and sending a message to an upper server to feed back the success of disabling the path to be disabled.
After the paths to be disabled of the multipath equipment are disabled, the state of the host adapter is updated, so that the situation that the state of the host adapter is not updated to influence the multipath fault switching and fault recovery and influence on customer service is avoided.
Based on the same inventive concept, according to another aspect of the present application, as shown in fig. 2, an embodiment of the present application further provides a disabling system of a path, the system including:
a judging module 110, where the judging module 110 is configured to obtain a state of a path to be disabled in the multipath device, and judge whether the path to be disabled can be disabled based on the state;
the judging module 110 is further configured to obtain a path in the multipath device in response to the path to be disabled being disabled, and judge whether the path is in an active state and is not the path to be disabled;
a setting module 120, the setting module 120 configured to set the path to be disabled to an offline state to disable the path to be disabled in response to the path being active and not being the path to be disabled;
the updating module 130 is configured to obtain the number of active paths and the total number of paths of the adapter to which the path to be disabled belongs, and update the state of the adapter based on the number of active paths and the total number of paths to complete the disabling of the path to be disabled.
In some embodiments, the determination module is further configured to:
judging whether the path to be disabled is in an active state or not according to the fact that the path to be disabled is not in a SCSI reserved state or an initialization state or a removal state;
and in response to the path to be disabled not being in an active state, determining that the path to be disabled cannot be disabled.
In some embodiments, the determination module is further configured to determine that the path to be disabled cannot be disabled in response to the path to be disabled being in a SCSI reserved state or an initialized state or a removed state.
In some embodiments, the determination module is further configured to determine that the path to be disabled may be disabled in response to the path to be disabled being active.
In some embodiments, the determination module is further configured to:
acquiring paths with subscript 0 and the maximum path number in the multipath equipment;
judging whether the path is in an active state and is not the path to be disabled;
adding 1 to the subscript in response to the path not being in an active state and not being the path to be disabled, and judging whether the subscript added with 1 reaches the maximum path number;
and if the subscript added with 1 does not reach the maximum path number, acquiring a path corresponding to the subscript added with 1, and returning to the step of judging whether the path is in an active state and is not the path to be disabled.
In some embodiments, the determining module is further configured to determine that the path to be disabled cannot be disabled in response to the 1-added subscript reaching a maximum number of paths.
In some implementations, the setting module is further configured to decrease the number of paths of the adapter by 1 after setting the path to be disabled to an offline state to disable the path to be disabled.
In some embodiments, the update module is further configured to:
judging whether the number of the active paths of the adapter to which the path to be disabled belongs is 0;
and if the number of the active paths of the adapter to which the path to be disabled belongs is 0, setting the adapter to be in a failure state.
In some embodiments, the update module is further configured to:
if the number of the active paths of the adapter to which the path to be disabled belongs is not 0, judging whether the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of the paths;
and if the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of paths, setting the adapter to be in a degradation state.
Embodiments of the application may also include corresponding computer devices. The computer device includes a memory, at least one processor, and a computer program stored on the memory and executable on the processor, the processor executing any one of the methods described above when the program is executed.
The memory is used as a non-volatile computer readable storage medium, and can be used for storing non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions/modules corresponding to the network resource coordination method in the embodiment of the application. The processor executes various functional applications of the device and data processing by running non-volatile software programs, instructions and modules stored in the memory, i.e. implements the network resource coordination method of the above method embodiments.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the device, etc. In addition, the memory 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, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the local module through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Finally, it should be noted that, as will be appreciated by those skilled in the art, all or part of the procedures in implementing the methods of the embodiments described above may be implemented by a computer program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the methods described above 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.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
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 application 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.
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 application, 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 application, and many other variations of the different aspects of the embodiments of the application 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 application.

Claims (7)

1. A method of disabling a path, comprising:
acquiring the state of a path to be disabled in multi-path equipment, and judging whether the path to be disabled can be disabled or not based on the state;
in response to the path to be disabled being able to be disabled, acquiring a path in a multi-path device, and judging whether the path is in an active state and is not the path to be disabled;
in response to the path being active and not being the path to be disabled, setting the path to be disabled to an offline state to disable the path to be disabled;
acquiring the number of active paths and the total number of paths of an adapter to which the path to be disabled belongs, and updating the state of the adapter based on the number of active paths and the total number of paths to finish the disabling of the path to be disabled;
wherein determining whether the path to be disabled may be disabled based on the state comprises: judging whether the path to be disabled is in an active state or not according to the fact that the path to be disabled is not in a SCSI reserved state or an initialization state or a removal state; in response to the path to be disabled not being in an active state, determining that the path to be disabled cannot be disabled; determining that the path to be disabled cannot be disabled in response to the path to be disabled being in a SCSI reserved state or an initialized state or a removed state; in response to the path to be disabled being active, it is determined that the path to be disabled may be disabled.
2. The method of claim 1, wherein acquiring a path in a multipath device and determining whether the path is active and not the path to be disabled comprises:
acquiring paths with subscript 0 and the maximum path number in the multipath equipment;
judging whether the path is in an active state and is not the path to be disabled;
adding 1 to the subscript in response to the path not being in an active state and not being the path to be disabled, and judging whether the subscript added with 1 reaches the maximum path number;
and if the subscript added with 1 does not reach the maximum path number, acquiring a path corresponding to the subscript added with 1, and returning to the step of judging whether the path is in an active state and is not the path to be disabled.
3. The method of claim 2, wherein acquiring a path in a multipath device and determining whether the path is active and not the path to be disabled further comprises:
and in response to the 1-added subscript reaching the maximum path number, determining that the path to be disabled cannot be disabled.
4. The method as recited in claim 1, further comprising:
after setting the path to be disabled to an offline state to disable the path to be disabled, the number of paths of the adapter is reduced by 1.
5. The method of claim 4, wherein updating the state of the adapter based on the number of active paths and the total number of paths comprises:
judging whether the number of the active paths of the adapter to which the path to be disabled belongs is 0;
and if the number of the active paths of the adapter to which the path to be disabled belongs is 0, setting the adapter to be in a failure state.
6. The method of claim 5, wherein updating the state of the adapter based on the number of active paths and the total number of paths further comprises:
if the number of the active paths of the adapter to which the path to be disabled belongs is not 0, judging whether the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of the paths;
and if the number of the active paths of the adapter to which the path to be disabled belongs is smaller than the total number of paths, setting the adapter to be in a degradation state.
7. A system for disabling a path, comprising:
the judging module is configured to acquire the state of a path to be disabled in the multipath equipment and judge whether the path to be disabled can be disabled or not based on the state;
the judging module is further configured to respond to the path to be disabled, acquire a path in the multipath equipment, and judge whether the path is in an active state and is not the path to be disabled;
a setting module configured to set the path to be disabled to an offline state to disable the path to be disabled in response to the path being in an active state and not being the path to be disabled;
the updating module is configured to acquire the number of active paths and the total number of paths of the adapter to which the path to be disabled belongs, and update the state of the adapter based on the number of active paths and the total number of paths so as to complete the disabling of the path to be disabled;
wherein determining whether the path to be disabled may be disabled based on the state comprises: judging whether the path to be disabled is in an active state or not according to the fact that the path to be disabled is not in a SCSI reserved state or an initialization state or a removal state; in response to the path to be disabled not being in an active state, determining that the path to be disabled cannot be disabled; determining that the path to be disabled cannot be disabled in response to the path to be disabled being in a SCSI reserved state or an initialized state or a removed state; in response to the path to be disabled being active, it is determined that the path to be disabled may be disabled.
CN202110999557.0A 2021-08-29 2021-08-29 Path disabling method and system Active CN113886291B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110999557.0A CN113886291B (en) 2021-08-29 2021-08-29 Path disabling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110999557.0A CN113886291B (en) 2021-08-29 2021-08-29 Path disabling method and system

Publications (2)

Publication Number Publication Date
CN113886291A CN113886291A (en) 2022-01-04
CN113886291B true CN113886291B (en) 2023-08-18

Family

ID=79011548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110999557.0A Active CN113886291B (en) 2021-08-29 2021-08-29 Path disabling method and system

Country Status (1)

Country Link
CN (1) CN113886291B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412486B (en) * 2022-08-26 2023-07-14 苏州浪潮智能科技有限公司 Method, device, equipment and medium for managing path failure in storage multipath

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104115132A (en) * 2011-12-22 2014-10-22 英特尔公司 Power conservation by way of memory channel shutdown
CN106685821A (en) * 2017-02-20 2017-05-17 华为技术有限公司 Multipath selection method and multipath selection equipment
CN109120522A (en) * 2018-08-21 2019-01-01 郑州云海信息技术有限公司 A kind of multipath state monitoring method and device
CN109600315A (en) * 2017-09-30 2019-04-09 阿里巴巴集团控股有限公司 The flow control method and method of adjustment of data channel
CN113052571A (en) * 2021-04-20 2021-06-29 中国工商银行股份有限公司 Method and device for processing workflow critical path
CN113228177A (en) * 2018-12-31 2021-08-06 美光科技公司 Configurable data path for memory modules

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104115132A (en) * 2011-12-22 2014-10-22 英特尔公司 Power conservation by way of memory channel shutdown
CN106685821A (en) * 2017-02-20 2017-05-17 华为技术有限公司 Multipath selection method and multipath selection equipment
CN109600315A (en) * 2017-09-30 2019-04-09 阿里巴巴集团控股有限公司 The flow control method and method of adjustment of data channel
CN109120522A (en) * 2018-08-21 2019-01-01 郑州云海信息技术有限公司 A kind of multipath state monitoring method and device
CN113228177A (en) * 2018-12-31 2021-08-06 美光科技公司 Configurable data path for memory modules
CN113052571A (en) * 2021-04-20 2021-06-29 中国工商银行股份有限公司 Method and device for processing workflow critical path

Also Published As

Publication number Publication date
CN113886291A (en) 2022-01-04

Similar Documents

Publication Publication Date Title
US7907521B2 (en) Method and system of assigning access connections
US10417014B2 (en) System service reloading method and apparatus
CN106713378B (en) Method and system for providing service by multiple application servers
CN102420820B (en) Partition method in a kind of group system and device
US9286170B2 (en) Preventing extreme coresidency hazards in cloud computing
CN113886291B (en) Path disabling method and system
EP1482693B1 (en) Enhanced virtual router redundancy protocol
EP3229413A1 (en) Cross-domain cooperative method, cooperative device and control device for network as a service business
US20150381498A1 (en) Network system and its load distribution method
CN110022236B (en) Message forwarding method and device
CN113037599A (en) Message processing method, device and storage medium
CN110312245A (en) A kind of business monitoring method and device of transnational roaming terminal
CN110138656B (en) Service processing method and device
CN101350772B (en) Method for selecting line of router with multiple WAN interfaces, system and router
CN111314283B (en) Method and device for defending attack
CN111817953A (en) Method and device for electing master equipment based on Virtual Router Redundancy Protocol (VRRP)
US20170279771A1 (en) Packet processing method, network server, and virtual private network system
JP3560552B2 (en) Method and apparatus for preventing a flood attack on a server
CN111447282B (en) Method and device for determining transmission path
US11271859B2 (en) Method and apparatus for realizing intelligent traffic scheduling, computer readable storage medium thereof and computer device
CN113746895B (en) Method and device for acquiring multipath disk target port group information
CN112199176A (en) Service processing method, device and related equipment
KR101717697B1 (en) Intrusion Tolerant System and Method Therefor in Virtualized Environment
CN113489739B (en) CDN-based service stability method and device for resisting DDoS attack
CN110365742B (en) Multi-active load balancing application creation method and device, computer equipment and storage medium

Legal Events

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