CN107547240A - A kind of chain circuit detecting method and device - Google Patents

A kind of chain circuit detecting method and device Download PDF

Info

Publication number
CN107547240A
CN107547240A CN201710330153.6A CN201710330153A CN107547240A CN 107547240 A CN107547240 A CN 107547240A CN 201710330153 A CN201710330153 A CN 201710330153A CN 107547240 A CN107547240 A CN 107547240A
Authority
CN
China
Prior art keywords
detection
storage
detection section
port
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710330153.6A
Other languages
Chinese (zh)
Other versions
CN107547240B (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.)
New H3C Cloud Technologies Co Ltd
Original Assignee
New H3C Cloud Technologies 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 New H3C Cloud Technologies Co Ltd filed Critical New H3C Cloud Technologies Co Ltd
Priority to CN201710330153.6A priority Critical patent/CN107547240B/en
Publication of CN107547240A publication Critical patent/CN107547240A/en
Application granted granted Critical
Publication of CN107547240B publication Critical patent/CN107547240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a kind of chain circuit detecting method and device, and this method is applied to storage client, and the storage link at storage client connection storage service end is divided into multiple detection sections;The starting point of each detection section corresponding port in storage client, port of interchanger or the port at storage service end that each terminal for detecting section passes through for storage link for storage link.Method is:Operated at least one detection section perform detection, and comprehensive each testing result localization of faults;Detecting operation is:Loopback attribute is configured in the destination county of detection section to be measured;Pass through the detection stream that detection section sending destination location to be measured is storage service end;If receiving the detection stream of the destination county loopback from detection section to be measured, the detection stream received is redirected to the logic storage unit in storage client;Determine that detection section to be measured is normal when detection stream is successfully processed by logic storage unit;Determine that detection section to be measured is abnormal if not receiving from the detection stream of the destination county loopback of detection section to be measured.

Description

A kind of chain circuit detecting method and device
Technical field
The application is related to storage area network (Storage Area Network, SAN) technology, more particularly to a kind of link Detection method and device.
Background technology
SAN be it is a kind of exclusively for storage establish independently of transmission control protocol and Internet protocol Dedicated network outside (Transmission Control Protocol/Internet Protocol, TCP/IP) network. SAN typically may include storage client, interchanger and storage service end, and the path stored between client and storage service end claims To store link.The storage service end of storage client is connected to, the storage device that is directly connected to will be considered as by storage client.
In practical business operation, it is possible that the feelings for causing storage service end not access because storing link failure Condition.It is which node in SAN there is a problem that current storage chain circuit detecting method, which can not typically be oriented,.
The content of the invention
In view of this, the application provides a kind of chain circuit detecting method and device, to storage client and storage service Storage link between end is detected, and orients the trouble point on storage link.
Specifically, the application is achieved by the following technical solution:
The application first aspect, there is provided a kind of chain circuit detecting method, methods described can apply to store client, deposit The storage link at storage client connection storage service end is divided into multiple detection sections;The starting point of each detection section is the storage Link corresponding port in storage client, the port for the interchanger that each terminal for detecting section passes through for the storage link Or the port at storage service end;Methods described includes:
For at least one detection section difference perform detection operation in the multiple detection section;
According to the testing result localization of faults of at least one detection section;
Wherein, it is described detection operation be:
Loopback attribute is configured in the destination county of detection section to be measured;The loopback attribute of configuration is used for the end for indicating detection section to be measured The stream is looped back to storage client by the equipment where point when detecting the stream that destination address is storage service end;
Pass through the detection stream that the detection section sending destination location to be measured is storage service end;
If receiving the detection stream of the destination county loopback from the detection section to be measured, the detection stream received is redirected to this Logic storage unit in storage client is handled;When the detection stream is successfully processed by logic storage unit, it is determined that should Detection section to be measured is normal;
If the detection stream of the destination county loopback from the detection section to be measured is not received, it is determined that the detection Duan Buzheng to be measured Often.
The application second aspect, there is provided a kind of link detecting device, described device can apply to store in client, The storage link at the storage client connection storage service end is divided into multiple detection sections;The starting point of each detection section is institute State storage link corresponding port in storage client, the interchanger that each terminal for detecting section passes through for the storage link Port or storage service end port;Described device has the function of realizing the above method, and the function can pass through hardware Realize, corresponding software can also be performed by hardware and is realized.The hardware or software include one or more and above-mentioned function Corresponding module or unit.
In a kind of possible implementation, described device includes:
Detection unit, for at least one detection section difference perform detection operation in the multiple detection section;Its In, the detection operation is:Loopback attribute is configured in the destination county of detection section to be measured;The loopback attribute of configuration is to be measured for indicating The stream is looped back to storage client by the equipment where detecting the terminal of section when detecting the stream that destination address is storage service end End;Pass through the detection stream that the detection section sending destination location to be measured is storage service end;If receive from the detection section to be measured The detection stream of destination county loopback, then the detection stream received is redirected at the logic storage unit in the storage client Reason;When the detection stream is successfully processed by logic storage unit, determine that the detection section to be measured is normal;Treated if do not received from this Survey the detection stream of the destination county loopback of detection section, it is determined that the detection section to be measured is abnormal;
Failure location unit, for the testing result localization of faults according at least one detection section.
In alternatively possible implementation, described device includes processor, memory, communication interface and bus, described It is connected with each other between processor, the memory and the communication interface by bus;The processing is by reading the storage The logical order stored in device, perform the chain circuit detecting method of the application first aspect.
The method provided using the application, by being multiple detection sections by storage chains k-path partition, in the terminal pair of detection section Loopback attribute is configured at the port answered, the starting point of detection stream from detection section is sent rear and section after testing terminal and is looped back to storage On the logic storage unit disposed in advance in client, so that by the access to storage service end, be converted to storing client The access of upper logic storage unit, it can be successfully processed according to detection stream by logic storage unit to judge whether just to detect section Often, the testing result of at least one detection section is finally integrated, determines to store the trouble point on link.
Brief description of the drawings
Fig. 1 is the networking schematic diagram of SAN shown in the exemplary embodiment of the application one a kind of;
Fig. 2 is a kind of flow chart of chain circuit detecting method shown in the exemplary embodiment of the application one;
Fig. 3 is a kind of detection section division schematic diagram of three node storage link shown in the exemplary embodiment of the application one;
Fig. 4 is a kind of detection section division schematic diagram of four node storage link shown in the exemplary embodiment of the application one;
Fig. 5 is the schematic diagram of a kind of inloop and outloop shown in the exemplary embodiment of the application one;
Fig. 6 is the networking schematic diagram of IP-SAN shown in the exemplary embodiment of the application one a kind of;
Fig. 7 is the networking schematic diagram of FC-SAN shown in the exemplary embodiment of the application one a kind of;
Fig. 8 is a kind of functional block diagram of link detecting device shown in the exemplary embodiment of the application one;
Fig. 9 is a kind of hardware architecture diagram of link detecting device shown in the exemplary embodiment of the application one.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is only merely for the purpose of description specific embodiment in term used in this application, and is not intended to be limiting the application. " one kind " of singulative used in the application and appended claims, " described " and "the" are also intended to including majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped Containing the associated list items purpose of one or more, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing from In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
Technical scheme is illustrated with reference to Figure of description and each embodiment.
At present when whether the storage link in detecting SAN is normal, storage client can be allowed directly to access storage service End, such as passes through ping methods, Internet Small Computer Systems Interface (Internet Small Computer System Interface, iSCSI) instruction set etc., and determine whether storage link is normal according to result is accessed.But this mode is at least Following defect be present:
1st, can only determine store link whether failure, can not judge store link which node there is a problem.
2nd, conventional ping methods and iSCSI instruction set are only applicable to IP-SAN, are not suitable for FC-SAN.
Therefore, present applicant proposes a kind of chain circuit detecting method and device, by being multiple detections by storage chains k-path partition Section, loopback attribute is configured corresponding to the terminal in detection section at port, detection stream is sent from the starting point for detecting section rear again through inspection The terminal for surveying section is looped back in storage client on the logic storage unit disposed in advance, so as to by the visit to storage service end Ask, be converted to the access to logic storage unit in storage client, can successfully be located by logic storage unit according to detection stream Whether reason is normal to judge detection section, finally integrates the testing result of at least one detection section, determines to store the event on link Barrier point.
It is a kind of SAN networking schematic diagram with reference to figure 1, including storage client, interchanger and storage service end.
Storage service end, can be disk array (Redundant Arrays of for providing storage service Independent Disks, RAID) storage device such as system.
Client is stored, in connection behind storage service end, storage service end can be considered as to the storage device being directly connected to, it is right Storage service end is written and read.In the application, store and be also deployed with logic storage unit in advance in client, logic here is deposited Storage unit can be considered a kind of analog storage service end;Client is stored by configuring loopback link on store path, and is being deposited Corresponding network address translation (Network Address Translation, NAT) rule or modulus of conversion are configured in storage client Block, it is possible to achieve by the access to actual storage service end, be converted to the access to analog storage service end.
Because storage client and logic storage unit are located on same physical host, therefore store client and stored with logic Both units are intercommunication in itself, without being attached again to storage client and logic storage unit, in order to detect Change existing line configuring.
It is to store link to store the path between client and storage service end.On carrying medium, storage link can To be wire medium, such as optical fiber, coaxial cable, netting twine etc.;Can also be wireless medium, such as millimeter wave, microwave etc..
Storage client can have one or more storage link to storage service end;In the situation for having a plurality of storage link Under, this plurality of storage link can main/slave link each other, can also load balancing link each other.
Client is stored to each storage link between storage service end, the method that the application can be used to provide Carry out fault detect and fault location.Below by Fig. 2, the chain circuit detecting method provided the application is described.
Referring to Fig. 2, Fig. 2 is the method flow diagram that the application provides.As shown in Fig. 2 this method may include following steps:
Step 201:It is multiple detection sections to store the storage chains k-path partition that this client is connected storage service end by client; The starting point of each detection section corresponding port in storage client for the storage link, each terminal for detecting section is described Store the port of interchanger or the port at storage service end that link passes through.
In the application, multiple detection sections for being obtained from storage chains k-path partition, starting point is identical and terminal is different.
For example, with reference to Fig. 3, when including three nodes on storage link, that is, client, interchanger and storage service end are stored When, the port that the storage link passes through has:Store the port A, the port B and port C of interchanger of client, and storage service The port D at end;Then the storage link can be divided into 3 detection sections altogether, be respectively:Port A is to port B path, and port A is to holding Mouthful C path, and port A is to port D path.
Similarly, referring to Fig. 4, when including four nodes on storage link, the port that the storage link passes through has:Storage The port A of client, the port B and port C of interchanger 1, the port D and port E of interchanger 2, and the end at storage service end Mouth F;Then the storage link can be divided into 5 detection sections altogether, be respectively:Port A is to port B path, and port A is to port C's Path, port A to port D path, port A to port E path, and port A are to port F path.
Optionally, operation of the storage chains k-path partition for multiple detection sections can also be deposited by manually performing in step 201 Storage client can be directly based upon the detection section division result being manually entered and perform step 202 and 203.
Step 202:Client is stored at least one detection section difference perform detection behaviour in the multiple detection section Make;Wherein, it is described detection operation be:
1) loopback attribute, is configured in the destination county of detection section to be measured, the loopback attribute of configuration is used to indicate detection section to be measured Terminal where equipment the stream is looped back to storage client when detecting the stream that destination address is storage service end;
For example, storage client can log on interchanger by safety shell protocol (Secure Shell, SSH) or deposit Service end is stored up, the loopback attribute of port is configured.
Loopback attribute may include inloop attribute and outloop attribute.As shown in figure 5, configure inloop category if port A Property, then detection stream flows to execution inloop inside network element device after reaching port A;Outloop attribute is configured if port B, then Detection stream flows to execution outloop outside network element device after reaching port B.
By taking the storage link shown in Fig. 3 as an example, if being detected to port A to port B detection section, friendship can be configured The port B to change planes is outloop attribute, and remaining port does not configure;When the detection stream that subsequently A is sent from port is by port B, Outloop will be performed to flow to outside interchanger, return to port A.Similarly, if being detected to port A to port C detection section, The port C that interchanger can then be configured is inloop attribute, and remaining port does not configure;The detection stream that subsequently A is sent from port During by port C, inloop will be performed and flowed to inside interchanger, then flowed out from port B, return to port A.
As for specifically what type of loopback attribute is configured in the destination county of detection section, can typically have but be not limited to following Several ways:
Mode one, storage client can determine according to the port pre-set and the mapping relations of loopback attribute type.
Mode two, storage client can be according to the access ports from the stream locally sent on interchanger or storage service end Mouthful situation determines, if port corresponding to the terminal of some detection section is the stream sent from storage client in interchanger or deposited The inbound port in service end is stored up, then outloop attribute can be configured in the destination county of the detection section, if the end of some detection section Port corresponding to point is the exit port flowed on switches sent from storage client, then can be in the destination county of the detection section Configure inloop attribute.
It should be noted that from the destination of stream that storage client is sent be storage service end, therefore from storage client The stream sent is held there was only inbound port on storage service end, without exit port.
2), the detection stream by the detection section sending destination location to be measured for storage service end;
3), if receiving the detection stream of the destination county loopback from the detection section to be measured, the detection stream received is redirected Logic storage unit on to the storage client is handled;When the detection stream is successfully processed by logic storage unit, really The fixed detection section to be measured is normal;
4), if not receiving the detection stream of the destination county loopback from the detection section to be measured, it is determined that the detection section to be measured It is abnormal.
Logic storage unit mentioned here can be considered a kind of storage service end of simulation.The embodiment of the present application will be by that will examine Can flow measurement be converted to access analog storage service end from actual storage service end is accessed, so as to be modeled according to detection stream Storage service end is successfully read and write to judge whether detection section is normal.
Wherein, logic storage unit is established process and can be summarized as follows:Storage client selects on affiliated physical host One block device or a file, by one logic storage unit of the block device or document creation, creating, logic storage is single LUN (Logical Unit Number, LUN) is distributed for the logic storage unit when first, and is stored for the logic Unit distributes an address (when storage client is located in IP-SAN) or a virtual port (when storage client is located at When in FC-SAN).
When storage client to storage service end has a plurality of storage link, this plurality of storage link can share one and patrol Memory cell is collected, to realize the detection to link.
It is described below, wouldn't repeats as how detection stream being redirected into logic storage unit here.
Further need exist for it is noted that storing client has often detected a detection section, it is necessary to first cancel in the detection section Destination county configuration loopback attribute, then detect next detection section again.
Step 203:Store the testing result localization of faults of the client according at least one detection section.
If for example, it is above-mentioned performed detection operation at least one detection section in exist first detection section, described first The testing result for detecting section is abnormal, and described first detects in multiple detection sections that Duan Weicong storage chains k-path partitions obtain most Short detection section, then storing client can be with the localization of faults between the beginning and end of the described first detection section.
By taking Fig. 3 as an example, port A to port B detection section 1 detects detection section most short in sections to divide 3 obtained;Such as Fruit finds to detect the failure of section 1 after testing, then directly the localization of faults between the beginning and end of detection section 1, that is, can held Mouthful A is on the path between the B of port.
In another example if the second detection section and the 3rd inspection in the above-mentioned at least one detection section for performing detection operation be present Survey section, the testing result of the second detection section is that the testing result of normal, described 3rd detection section is abnormal, and described the Other ports are not present between the terminal of two detection sections and the terminal of the 3rd detection section, then event can be determined by storing client Barrier point is between the terminal of the described second detection section and the terminal of the 3rd detection section.
Still by taking Fig. 3 as an example, detecting between the terminal of section 1 and the terminal of detection section 2 does not have other ports, detects the end of section 1 Point and the terminal of detection section 3 then also have port C.If finding that detection section 1 is normal after testing, the failure of section 3 is detected, due to detecting section There is port C between 1 and detection section 3, therefore substantially the localization of faults can only be located at the terminal (port B) for detecting section 1 and detection Between the terminal (port D) of section 3, needing further to detect detection section 2 as more accurate positioning result can just obtain; If further detection finds the detection failure of section 2, terminal (port B) and detection of the trouble point positioned at detection section 1 can be determined Between the terminal (port C) of section 2, i.e., on interchanger.
It should be noted that the application is not intended to limit the detection ordering of each detection section.For example, storage client can be according to Detection section detects from order long or from long to short is short to each detection section;The detection section that can also never detect In randomly select detection section detected;And there can also be other detection orderings.
By taking the storage link shown in Fig. 3 as an example, if according to detection section from long order is short to, then detection ordering is:First Port A to port B detection section is detected, then detects port A to port C detection section, finally detects port A to port D's Detect section.
Due to each detection section only terminal difference obtained in the application from same storage chains k-path partition, starting point is identical , therefore a part for some shorter detection section necessarily some longer detection section;If so as to some shorter detection section Failure is found after testing, then longer detection section is also necessarily obstructed.Therefore to improve detection efficiency, when storage client hair , can be without detecting other remaining detection sections than detection segment length again during some existing detection segment fault.
SAN common at present has IP-SAN and netted channel (Fibre Channel, FC) two kinds of-SAN.In IP-SAN, Storage client uses Ethernet card, and storage service end is accessed by ethernet switch (i.e. IP interchangers);In FC-SAN, deposit Store up client using host bus adaptor (Host Bus Adapter, HBA) to block, pass through FC switch-access storage services End.
Illustrate respectively below by way of Fig. 6 and Fig. 7 at the detection stream when storing client and being located in IP-SAN or FC-SAN Reason process.
Referring to Fig. 6, now exemplified by detecting port A to port B this detection section, illustrate when storage client is located at IP-SAN Detection stream processing procedure when middle.In IP-SAN, detection stream is made up of detection messages.
The detection unit generation detection messages in client are stored, the source address of the detection messages is the ground of storage client Location IP1, destination address are the address ip 2 at storage service end, and source port is the port A of storage client, and destination interface is storage The port D of service end, type of message are iSCSI (Internet Small Computer System Interface, internet Small computer system interface) agreement.
Store in client, virtual switch (vswitch) receives the detection report that detection unit sends from virtual network port a Text, and sent the detection messages to physical port A, virtual network port b and the destination address of the detection messages by virtual network port b IP2 is in the same network segment.After physical port A receives detection messages, the detection messages are sent to the end of connected IP interchangers Mouth B.
The port B of IP interchangers is configured with outloop attribute, after port B receives detection messages, performs outloop and examines this Observe and predict text and return to port A.
The detection messages of return are sent to vswitch by port A by corresponding virtual network port b.
Be provided with a NAT rule on vswitch in advance, the matching condition of NAT rules is:1) message direction is into side To;2) source port is storage link corresponding port, i.e., port A herein in storage client;3) type of message is iSCSI Agreement.The NAT rules are used for:Message for meeting matching condition, the destination address of message is converted in storage client The address ip 3 for the logic storage unit disposed in advance.
Optionally, to improve matching rate, above-mentioned NAT rules can also increase a matching condition:4) destination address is to deposit Store up the address ip 2 of service end.
Vswitch determines the detection messages of loopback and above-mentioned NAT rule match, so as to by the destination address of detection messages by IP2 is modified to IP3.Afterwards, amended detection messages are sent to logic storage unit, virtual network port c from virtual network port c The same network segment is in the destination address IP3 of amended detection messages.
It follows that in IP-SAN, storage client is regular by the NAT pre-set, by the detection stream weight of reception The logic storage unit being directed in the storage client is handled.
Logic storage unit is handled the detection messages of reception, produces response message.The source address of the response message For the address ip 3 of logic storage unit, destination address is the address ip 1 of storage client, and source port is the end at storage service end Mouth D, destination interface are the port A of storage client, and type of message is iSCSI protocol.
Vswitch receives the response message that logic storage unit sends from virtual network port c, and should by virtual network port a Response message is sent to the detection unit in storage client, and the destination address IP1 of virtual network port a and response message is in same The network segment.
Optionally, vswitch is upper can also set a NAT rule, for the source address modification of response message to be deposited Store up the address ip 2 of service end.The matching condition of this NAT rules could be arranged to:1) message direction is outgoing direction;2) destination interface To store link corresponding port, i.e., port A herein in storage client;3) type of message is iSCSI protocol.
In this way, after vswitch receives response message by virtual network port c, this can be responded according to this NAT rule The source address of message is revised as the address ip 2 at storage service end by the address ip 3 of logic storage unit, can so allow storage Client perceives the presence less than logic storage unit.
So far, the description to Fig. 6 is completed.
Referring to Fig. 7, the present embodiment illustrates when storage client equally exemplified by detecting port A to port B this detection section Detection stream processing procedure when in FC-SAN.In FC-SAN, detection stream is made up of detection frame.
The detection module generation detection frame in client is stored, the source ID (i.e. source FC addresses) of the detection frame is storage client The port A at end, purpose ID (i.e. purpose FC addresses) are the port D at storage service end, and frame type is FC agreements.
Detection module is forwarded by inside, and detection frame is sent to the HBA cards of storage client, and HBA cards will by port A The detection frame is sent to the port B of FC interchangers.
The port B of FC interchangers is configured with outloop attribute, therefore after port B receives detection frame, performing outloop should Detection frame returns to port A.
Modular converter is previously provided with storage client, modular converter can be realized by computer program code.Conversion Module be used for will meet frame direction be direction, source ID be storage link storage client on corresponding port (i.e. herein Port A), the frame that frame type is FC agreements, the purpose ID of the frame is converted to the virtual port e of logic storage unit.
Optionally, to improve matching rate, modular converter can also increase a matching condition:The purpose ID of frame takes for storage The port at business end, i.e. port D.
The detection messages of return are sent to modular converter by port A, and modular converter is handled the detection frame of loopback, will The purpose ID of the detection frame is revised as port e by port D.Afterwards, amended detection frame is sent to by modular converter from port e Logic storage unit.
It follows that in FC-SAN, storage client is by the modular converter that pre-sets, by the detection stream weight of reception The logic storage unit being directed in the storage client is handled.
Logic storage unit is handled the detection frame of reception, produces response frame.The source ID of the response frame deposits for logic The virtual port e of storage unit, purpose ID are the port A of storage client, and frame type is FC agreements.
After modular converter receives the response frame that logic storage unit is sent, response frame is sent to by storage by inside forwarding Detection module in client.
Optionally, modular converter can be also used for meeting frame direction be outgoing direction, purpose ID be that storage link is storing Corresponding port (i.e. port A), the frame that frame type is FC agreements, storage service end is converted to by the source ID of the frame in client Port D.
In this way, modular converter can be handled response frame after receiving response frame, by the source ID of the response frame by logic The virtual port e of memory cell, is revised as the port D at storage service end, can so allow storage client to perceive less than logic The presence of memory cell.
So far, the description to Fig. 7 is completed.
No matter in IP-SAN or in FC-SAN, message or the quantity of frame that detection stream includes are adjustable, sheets Storage client in application can be by configuring the quantity of message that detection stream includes or frame, to reach self-defined detection pressure The purpose of power.
For example, storage client can improve the quantity of the message that detection stream includes or frame, as detection stream included The quantity of message or frame is arranged to 10000 (initiating storage service end 10000 read-writes), according to the response received The quantity of message and the message set or the ratio of the quantity of frame, the operation effect of test storage link in high load situations Rate.
Flow shown in Fig. 2 is described below by a specific embodiment.It should be noted that this embodiment is only It is a kind of implementation of the application, does not form the restriction to the application.
Referring to Fig. 3, exemplified by storing client and be located in IP-SAN, it is assumed that the IP address at storage service end is 1.1.1.1; There is webmaster mouth between storage client and interchanger, storage service end, three is in same management net, energy intercommunication, stores client End can operate interchanger and storage service end by SSH.
The detection process for storing link is as follows:
1st, storage client establishes logic storage unit on affiliated physical host, and IP is specified for the logic storage unit Address is 192.168.1.1.
2nd, store client to obtain to storing the related port sequence of link and corresponding loopback attribute, and link will be stored It is divided into multiple detection sections.
In Fig. 3, the link paths that storage service end is accessed from storage client are:Port A- ports B- ports C- ports D; Port B need to configure outloop attribute, and port C need to configure inloop attribute, and D ports need to configure outloop attribute.
Dividing obtained detection section is:
Section 1 is detected, for port A to port B path;
Section 2 is detected, for port A to port C path;
Section 3 is detected, for port A to port D path.
3rd, client is stored to detect detection section 1.
Specifically, in storage client, configuration NAT is regular, and the NAT rules are:For meeting that message direction is into side To, source port be port A, destination address 1.1.1.1, the message that type of message is iSCSI messages, by the destination of the message Location is converted to 192.168.1.1.
And storage client logs in interchanger by SSH, outloop attribute is configured at the B of port.
Store client and access 1.1.1.1, by sending iSCSI read write commands, produce iSCSI messages.In detection section 1 just In the case of often, the processing procedure of message is:
1) client is stored by port A, and message is sent to the port B of interchanger;
2) because the port B of interchanger is configured with outloop, old friend changes planes and outloop can be performed at the B of port returns to message To the port A of storage client;
3) storage client receive the message of loopback after, by inside NAT change, by the destination address of message by 1.1.1.1 192.168.1.1 is converted to;
4) storage client deposits logic corresponding to amended message redirecting to the amended destination address of the message Storage unit is handled;
If logic storage unit treats the message, then it represents that detection section 1 is normal;If logic storage unit is untreated Cross the message, then it represents that the detection failure of section 1.
If the 4, finding that detection section 1 is normal after testing, storage client continues to detect detection section 2.
Specifically, storage client logs in interchanger by SSH, cancel port B outloop attribute, configured for port C Inloop attribute.
Store client and access 1.1.1.1, by sending iSCSI read write commands, produce iSCSI messages.In detection section 2 just In the case of often, the processing procedure of message is:
1) client is stored by port A, and message is sent to the port B of interchanger;
2) interchanger carries out internal forwarding to message, is sent to the port C of interchanger;
3) because the port C of interchanger is configured with inloop, old friend changes planes and inloop can be performed at the C of port returns to message To the port B of interchanger;
4) interchanger returns to message by port B the port A of storage client;
5) storage client receive the message of loopback after, by inside NAT change, by the destination address of message by 1.1.1.1 192.168.1.1 is converted to;
6) storage client deposits logic corresponding to amended message redirecting to the amended destination address of the message Storage unit is handled;
If logic storage unit treats the message, then it represents that detection section 2 is normal;If logic storage unit is untreated Cross the message, then it represents that the detection failure of section 2.
If the 5, finding that detection section 2 is normal after testing, storage client continues to detect detection section 3.
Specifically, storage client logs in interchanger by SSH, cancel port C inloop attribute;And pass through SSH Storage service end is logged in, outloop attribute is configured at the D of port.
Store client and access 1.1.1.1, by sending iSCSI read write commands, produce iSCSI messages.In detection section 3 just In the case of often, the processing procedure of message is:
1) client is stored by port A, and message is sent to the port B of interchanger;
2) interchanger carries out internal forwarding to message, is sent to the port C of interchanger;
3) message is sent to the port D at storage service end by port C by interchanger;
4) because the port D at storage service end is configured with outloop, therefore storage service end can perform outloop at the D of port and incite somebody to action Message returns to the port C of interchanger;
5) interchanger carries out internal forwarding to the message of loopback, is sent to the port B of interchanger;
6) interchanger returns to message by port B the port A of storage client;
7) storage client receive the message of loopback after, by inside NAT change, by the destination address of message by 1.1.1.1 192.168.1.1 is converted to;
8) storage client deposits logic corresponding to amended message redirecting to the amended destination address of the message Storage unit is handled;
If logic storage unit treats the message, then it represents that detection section 3 is normal;If logic storage unit is untreated Cross the message, then it represents that the detection failure of section 3.
6th, the testing result of each detection section of client synthesis is stored, it is determined that the trouble point of storage link.
7th, after the completion of detecting, storage client logs in storage service end by SSH, cancels port D outloop attribute, with And cancel the NAT rules configured in above-mentioned 3rd step.
So far, the description of this specific embodiment is completed.
In summary, the technical scheme that the application provides is by being multiple detection sections by storage chains k-path partition, in detection section Terminal corresponding to loopback attribute is configured at port, the starting point of detection stream from detection section is sent the rear terminal ring of section after testing again Return in storage client on the logic storage unit disposed in advance, so that by the access to storage service end, be converted to depositing The access of logic storage unit in client is stored up, can be successfully processed according to detection stream by logic storage unit to judge to detect section It is whether normal, the testing result of at least one detection section is finally integrated, determines to store the trouble point on link.
Also, the technical scheme that the application provides does not need auxiliary equipment, it is not necessary to packet capturing equipment, it is not necessary in order to detect Change existing configuration equipment, it is not necessary to plug circuit, can when SAN breaks down so as to more flexible on detection opportunity To detect in time., can be with self-defined detection pressure meanwhile detection mode is flexible.The technical scheme that the application provides is applicable simultaneously In the two kinds of networks of IP-SAN and FC-SAN.
The method provided above the application is described.The device provided below the application is described.
Referring to Fig. 8, the figure be the embodiment of the present application provide a kind of link detecting device functional block diagram, the device It can apply to store client, the storage link at storage client connection storage service end is divided into multiple detection sections; The starting point of each detection section corresponding port in storage client for the storage link, each terminal for detecting section is described Store the port of interchanger or the port at storage service end that link passes through.Described device can include inspection unit 801 and event Hinder positioning unit 802.
The detection unit 801, for distinguishing perform detection at least one detection section in the multiple detection section Operation.
Wherein, it is described detection operation be:
Loopback attribute is configured in the destination county of detection section to be measured;The loopback attribute of configuration is used for the end for indicating detection section to be measured The stream is looped back to storage client by the equipment where point when detecting the stream that destination address is storage service end;
Pass through the detection stream that the detection section sending destination location to be measured is storage service end;
If receiving the detection stream of the destination county loopback from the detection section to be measured, the detection stream received is redirected to this Logic storage unit in storage client is handled;When the detection stream is successfully processed by logic storage unit, it is determined that should Detection section to be measured is normal;
If the detection stream of the destination county loopback from the detection section to be measured is not received, it is determined that the detection Duan Buzheng to be measured Often.
The failure location unit 802, for the testing result localization of faults according at least one detection section.
Optionally, the failure location unit 802 is specifically used for:If in the presence of the first detection section, the first detection section Testing result is abnormal, and the first detection section is detection section most short in the multiple detection section, it is determined that trouble point Between the beginning and end of the described first detection section;
If in the presence of the second detection section and the 3rd detection section, the testing result of the second detection section is the normal, described 3rd The testing result for detecting section is abnormal, and is not deposited between the terminal of the second detection section and the terminal of the 3rd detection section In other ports, it is determined that trouble point is between the terminal of the described second detection section and the terminal of the 3rd detection section.
Optionally, when the storage client is located in IP-SAN, the detection unit 801 is specifically used for:By pre- The NAT rules first set, the logic storage unit that the detection stream received is redirected in the storage client is handled;
The NAT rules are:For meet message direction be into direction, source port be it is described storage link storage client Port, the message that type of message is iSCSI protocol corresponding on end, are converted to the logic by the destination address of the message and store The address of unit.
Optionally, when the storage client is located in FC-SAN, the detection unit 801 is specifically used for:By pre- The modular converter first set, the logic storage unit that the detection stream received is redirected in the storage client is handled;
Wherein, the modular converter is used for:For meet frame direction be into direction, source ID be it is described storage link storing Corresponding port, the frame that frame type is FC agreements, the logic storage unit is converted to by the purpose ID of the frame in client Virtual port.
Optionally, the message or the quantity of frame that the detection stream includes are the detection list in the storage client The configuration of member 801.
It should be noted that the division in the embodiment of the present invention to unit is schematical, only a kind of logic function Division, can there is other dividing mode when actually realizing.Each functional unit in embodiments herein can be integrated in In one processing unit or unit is individually physically present, can also two or more units be integrated in one In individual unit.Above-mentioned integrated unit can both be realized in the form of hardware, can also use the form of SFU software functional unit Realize.Exemplified by implemented in software, as the device on a logical meaning, being will by the processor of storage client where it Corresponding computer program instructions read what operation in internal memory was formed in memory.For hardware view, as shown in figure 9, A kind of hardware structure diagram of storage client where the detection means of the storage link provided for the application.
Wherein, the detection logical order of storage link can be stored with memory, the memory for example can be easy with right and wrong The property lost memory (non-volatile memory).Processor can call the detection for performing the storage link in memory to patrol Instruction is collected, to perform the function that client is stored in the detection method of above-mentioned storage link.
As shown in figure 9, the embodiment of the present application also provides a kind of link detecting device, described device includes processor 901, deposited Reservoir 902, communication interface 903 and bus 904;Wherein, by total between processor 901, memory 902 and communication interface 903 Line 904 completes mutual communication.
Wherein, communication interface 903, for sending and receiving detection stream.Processor 901 can be central processor CPU, deposit Reservoir 902 can be nonvolatile memory (non-volatile memory), and is stored with logic in memory 902 and refers to Order, processor 901 can perform the link detecting logical order stored in memory 902, to realize above-mentioned link detecting side The function of client is stored in method, for details, reference can be made to the flow shown in Fig. 2.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is real referring to method Apply the part explanation of example.Device embodiment described above is only schematical, wherein described be used as separating component The unit of explanation can be or may not be physically separate, can be as the part that unit is shown or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Need to select some or all of module therein to realize the purpose of application scheme.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, not limiting the application, all essences in the application God any modification, equivalent substitution and improvements done etc., should be included within the scope of the application protection with principle.

Claims (10)

1. a kind of chain circuit detecting method, it is characterised in that methods described is applied to storage client, storage client connection storage The storage link of service end is divided into multiple detection sections;The starting point of each detection section is the storage link in storage client Port corresponding to upper, the port of interchanger or the end at storage service end that each terminal for detecting section passes through for the storage link Mouthful;Methods described includes:
For at least one detection section difference perform detection operation in the multiple detection section;
According to the testing result localization of faults of at least one detection section;
Wherein, it is described detection operation be:
Loopback attribute is configured in the destination county of detection section to be measured;The loopback attribute of configuration is used for the terminal institute for indicating detection section to be measured Equipment detecting the stream that destination address is storage service end when the stream is looped back to storage client;
Pass through the detection stream that the detection section sending destination location to be measured is storage service end;
If receiving the detection stream of the destination county loopback from the detection section to be measured, the detection stream received is redirected to the storage Logic storage unit in client is handled;When the detection stream is successfully processed by logic storage unit, determine that this is to be measured It is normal to detect section;
If the detection stream of the destination county loopback from the detection section to be measured is not received, it is determined that the detection section to be measured is abnormal.
2. the method as described in claim 1, it is characterised in that event is determined according to the testing result of at least one detection section Barrier point, including:
If in the presence of the first detection section, the testing result of the first detection section is abnormal, and the first detection section is described Most short detection section in multiple detection sections, it is determined that trouble point is between the beginning and end of the described first detection section;
If in the presence of the second detection section and the 3rd detection section, the testing result of the second detection section is normal, described 3rd detection The testing result of section is abnormal, and it is not present between the terminal of the second detection section and the terminal of the 3rd detection section Its port, it is determined that trouble point is between the terminal of the described second detection section and the terminal of the 3rd detection section.
3. the method as described in claim 1, it is characterised in that described that the detection stream received is redirected to the storage client On logic storage unit handled, specifically include:
When the storage client is located in Internet protocol storage area network IP-SAN, by the network that pre-sets Location conversion NAT rules, the logic storage unit that the detection stream received is redirected in the storage client is handled;
The NAT rules are:For meet message direction be direction, source port be it is described storage link storage client on Corresponding port, the message that type of message is Internet Small Computer Systems Interface iSCSI protocol, by the destination of the message Location is converted to the address of the logic storage unit.
4. the method as described in claim 1, it is characterised in that described that the detection stream received is redirected to the storage client On logic storage unit handled, specifically include:
When the storage client is located in netted Channel Storage Area Network FC-SAN, pass through the modulus of conversion pre-set Block, the logic storage unit that the detection stream received is redirected in the storage client is handled;
Wherein, the modular converter is used for:For meet frame direction be into direction, source ID be it is described storage link storage client Port, the frame that frame type is FC agreements, the virtual of the logic storage unit is converted to by the purpose ID of the frame corresponding on end Port.
5. the method as described in claim 1, it is characterised in that the message or the quantity of frame that the detection stream includes are described Store client configuration.
6. a kind of link detecting device, it is characterised in that described device is applied to storage client, storage client connection storage The storage link of service end is divided into multiple detection sections;The starting point of each detection section is the storage link in storage client Port corresponding to upper, the port of interchanger or the end at storage service end that each terminal for detecting section passes through for the storage link Mouthful;Described device includes:
Detection unit, for at least one detection section difference perform detection operation in the multiple detection section;Wherein, institute Stating detection operation is:Loopback attribute is configured in the destination county of detection section to be measured;The loopback attribute of configuration is used to indicate detection to be measured The stream is looped back to storage client by the equipment where the terminal of section when detecting the stream that destination address is storage service end;It is logical Cross the detection stream that the detection section sending destination location to be measured is storage service end;If receive the destination county from the detection section to be measured The detection stream of loopback, then the logic storage unit that the detection stream received is redirected in the storage client is handled;When When the detection stream is successfully processed by logic storage unit, determine that the detection section to be measured is normal;If do not receive from the inspection to be measured Survey the detection stream of the destination county loopback of section, it is determined that the detection section to be measured is abnormal;
Failure location unit, for the testing result localization of faults according at least one detection section.
7. device as claimed in claim 6, it is characterised in that the failure location unit is specifically used for:
If in the presence of the first detection section, the testing result of the first detection section is abnormal, and the first detection section is described Most short detection section in multiple detection sections, it is determined that trouble point is between the beginning and end of the described first detection section;
If in the presence of the second detection section and the 3rd detection section, the testing result of the second detection section is normal, described 3rd detection The testing result of section is abnormal, and it is not present between the terminal of the second detection section and the terminal of the 3rd detection section Its port, it is determined that trouble point is between the terminal of the described second detection section and the terminal of the 3rd detection section.
8. device as claimed in claim 6, it is characterised in that the detection stream received is being redirected in the storage client Logic storage unit when being handled, the detection unit is specifically used for:
When the storage client is located in Internet protocol storage area network IP-SAN, by the network that pre-sets Location conversion NAT rules, the logic storage unit that the detection stream received is redirected in the storage client is handled;
The NAT rules are:For meet message direction be direction, source port be it is described storage link storage client on Corresponding port, the message that type of message is Internet Small Computer Systems Interface iSCSI protocol, by the destination of the message Location is converted to the address of the logic storage unit.
9. device as claimed in claim 6, it is characterised in that the detection stream received is being redirected in the storage client Logic storage unit when being handled, the detection unit is specifically used for:
When the storage client is located in netted Channel Storage Area Network FC-SAN, pass through the modulus of conversion pre-set Block, the logic storage unit that the detection stream received is redirected in the storage client is handled;
Wherein, the modular converter is used for:For meet frame direction be into direction, source ID be it is described storage link storage client Port, the frame that frame type is FC agreements, the virtual of the logic storage unit is converted to by the purpose ID of the frame corresponding on end Port.
10. device as claimed in claim 6, it is characterised in that the message or the quantity of frame that the detection stream includes are institute State the detection unit configuration in storage client.
CN201710330153.6A 2017-05-11 2017-05-11 Link detection method and device Active CN107547240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710330153.6A CN107547240B (en) 2017-05-11 2017-05-11 Link detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710330153.6A CN107547240B (en) 2017-05-11 2017-05-11 Link detection method and device

Publications (2)

Publication Number Publication Date
CN107547240A true CN107547240A (en) 2018-01-05
CN107547240B CN107547240B (en) 2021-02-26

Family

ID=60966851

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710330153.6A Active CN107547240B (en) 2017-05-11 2017-05-11 Link detection method and device

Country Status (1)

Country Link
CN (1) CN107547240B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108400894A (en) * 2018-03-06 2018-08-14 深圳互联先锋科技有限公司 A kind of server cluster network failure locating method and system
CN109245819A (en) * 2018-07-19 2019-01-18 郑州云海信息技术有限公司 A kind of Fault Locating Method and relevant apparatus
CN110830325A (en) * 2019-11-05 2020-02-21 北京云杉世纪网络科技有限公司 Adaptive network bypass path network flow direction speculation method and system
CN111010319A (en) * 2019-12-20 2020-04-14 锐捷网络股份有限公司 VSF-based link detection method and device
CN111083009A (en) * 2019-11-29 2020-04-28 北京云测信息技术有限公司 Packet capturing method and device and mobile terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924659A (en) * 2009-06-12 2010-12-22 中兴通讯股份有限公司 Network equipment and method for detecting links of physical ports of same
CN101986604A (en) * 2010-10-29 2011-03-16 中兴通讯股份有限公司 Link fault positioning method and system of packet transport network (PTN)
CN103684918A (en) * 2013-12-16 2014-03-26 华为技术有限公司 Method and device for detecting link failure
CN104518911A (en) * 2014-11-20 2015-04-15 毕节供电局 MPLS (multi-protocol label switching)-TP (transport profile)-based PTN (packet transport network) fault detection method
CN103259685B (en) * 2013-05-24 2016-03-09 杭州华三通信技术有限公司 Detect method and the network equipment of link failure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924659A (en) * 2009-06-12 2010-12-22 中兴通讯股份有限公司 Network equipment and method for detecting links of physical ports of same
CN101986604A (en) * 2010-10-29 2011-03-16 中兴通讯股份有限公司 Link fault positioning method and system of packet transport network (PTN)
CN103259685B (en) * 2013-05-24 2016-03-09 杭州华三通信技术有限公司 Detect method and the network equipment of link failure
CN103684918A (en) * 2013-12-16 2014-03-26 华为技术有限公司 Method and device for detecting link failure
CN104518911A (en) * 2014-11-20 2015-04-15 毕节供电局 MPLS (multi-protocol label switching)-TP (transport profile)-based PTN (packet transport network) fault detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴少勇等: "以太网的环路检测技术", 《中兴通讯技术》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108400894A (en) * 2018-03-06 2018-08-14 深圳互联先锋科技有限公司 A kind of server cluster network failure locating method and system
CN108400894B (en) * 2018-03-06 2021-02-05 深圳互联先锋科技有限公司 Server cluster network fault positioning method and system
CN109245819A (en) * 2018-07-19 2019-01-18 郑州云海信息技术有限公司 A kind of Fault Locating Method and relevant apparatus
CN110830325A (en) * 2019-11-05 2020-02-21 北京云杉世纪网络科技有限公司 Adaptive network bypass path network flow direction speculation method and system
CN111083009A (en) * 2019-11-29 2020-04-28 北京云测信息技术有限公司 Packet capturing method and device and mobile terminal
CN111083009B (en) * 2019-11-29 2021-08-24 北京云测信息技术有限公司 Packet capturing method and device and mobile terminal
CN111010319A (en) * 2019-12-20 2020-04-14 锐捷网络股份有限公司 VSF-based link detection method and device
CN111010319B (en) * 2019-12-20 2021-11-16 锐捷网络股份有限公司 VSF-based link detection method and device

Also Published As

Publication number Publication date
CN107547240B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN107547240A (en) A kind of chain circuit detecting method and device
US10243826B2 (en) Diagnosis and throughput measurement of fibre channel ports in a storage area network environment
CN104135433B (en) The failure of communication between router and the network switch shifts and fault recovery
Liu et al. Data center networks: Topologies, architectures and fault-tolerance characteristics
US9515903B2 (en) Switching module
US8996720B2 (en) Method and apparatus for mirroring frames to a remote diagnostic system
CN105610710B (en) The method and apparatus for the standard agreement authentication mechanism disposed in switching fabric system
US8830819B2 (en) Network switch with by-pass tap
WO2016054028A1 (en) Data center network
CN108683632A (en) Firewall security policy method of adjustment and device
EP3389224B1 (en) Method for generating and controlling test traffic, associated switch input or output port and switch
CN101484880A (en) Electronic device, system on chip and method for monitoring a data flow
CN101485147B (en) On chip system and method of monitoring data traffic
US20160057043A1 (en) Diagnostic routing system and method for a link access group
CN109639488A (en) A kind of more outer nets shunt accelerated method and system
Bermudez et al. On the infiniband subnet discovery process
US20110141917A1 (en) Protocol free testing of a fabric switch
CN109379760A (en) A kind of MEC bypath system and method
Chun et al. System area network mapping
CN106506265A (en) Detection fpga chip hangs dead method and device
CN116418595A (en) Security verification system and security verification method for accessing Web server
CN103023723B (en) The method of iSCSI multipath test is carried out under a kind of linux environment
CN105634839B (en) A kind of method and apparatus for obtaining network reachable address space
CN109951353A (en) A kind of cloud platform flow rate testing methods and resource pool system
US9521066B2 (en) vStack enhancements for path calculations

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