Summary of the invention
The object of the present invention is to provide cable self checking method, system and the servers of a kind of storage system, greatly reduceArtificial participation, it is time saving and energy saving, detection efficiency is improved, and error rate is low.
In order to solve the above technical problems, the present invention provides a kind of cable self checking methods of storage system, comprising:
To currently stored control module send initial command, so as to the currently stored control module by CPLD control andThe present hard discs indicator light of the currently stored control module connection is in original state;
Sense command is sent to the currently stored control module, so that the currently stored control module is controlled by CPLDIt makes the present hard discs indicator light and executes detection operation, to be determined to work as with described according to the state of the present hard discs indicator lightWhether the corresponding cable of preceding hard disk indication lamp connects correctly.
Preferably, the original state is OFF state.
Preferably, described to send sense command to the currently stored control module, so as to the currently stored control mouldBlock controls the present hard discs indicator light by CPLD and executes detection operation, comprising:
The first sense command is sent to the currently stored control module, so that the currently stored control module passes throughCPLD controls the present hard discs indicator light and lights;
After a preset time lapses, the second sense command is sent to the currently stored control module, so as to described currentStorage control module controls the present hard discs indicator light by CPLD and extinguishes.
Preferably, it is controlled in the currently stored control module by CPLD after the present hard discs indicator light lights, toThe currently stored control module is sent before the second sense command, further includes:
Obtain the state of the present hard discs indicator light;
Judge whether the state of the present hard discs indicator light is identical as preset state, if it is, subsequent step is executed,Otherwise, stop detection, and issue the corresponding cable of the present hard discs indicator light and connect wrong prompt information.
Preferably, it is controlled in the currently stored control module by CPLD after the present hard discs indicator light lights, toThe currently stored control module is sent before the second sense command, further includes:
Obtain the state of all hard disk indication lamps of all storage control modules;
Judge whether the hard disk indication lamp lighted is the current indicator light, if it is, subsequent step is executed, otherwise,Stop detection, and issues the corresponding cable of the present hard discs indicator light and connect wrong prompt information.
Preferably, the state of all hard disk indication lamps of all storage control modules detected in judgement with it is defaultAfter state is identical, further includes:
The cable for issuing the storage system of detection connects errorless prompt information.
In order to solve the above technical problems, the present invention also provides a kind of cable self-checking systems of storage system, comprising:
First transmission unit, for sending initial command to currently stored control module, so as to the currently stored controlModule is in original state by the present hard discs indicator light that CPLD control is connect with the currently stored control module;
Second transmission unit, for sending sense command to the currently stored control module, so as to described currently storedControl module controls the present hard discs indicator light by CPLD and executes detection operation, according to the present hard discs indicator lightState determines whether cable corresponding with the present hard discs indicator light connects correctly.
In order to solve the above technical problems, the present invention also provides a kind of server, including storage system, the storage systemIncluding CPLD, multiple storage control modules, multiple hard disks and multiple hard disk indication lamps, further includes:
Processor realizes the cable self-checking system of storage system as described above when for executing the computer programThe step of method.
Preferably, further includes:
The communication bus being set between the CPU and the CPLD;
The processor is also used to control the present hard discs indicator light by CPLD in the currently stored control moduleAfter lighting, before sending the second sense command to the currently stored control module, the shape of the present hard discs indicator light is obtainedState;Judge whether the state of the present hard discs indicator light is identical as preset state, if it is, subsequent step is executed, otherwise,Stop detection, and issues the corresponding cable of the present hard discs indicator light and connect wrong prompt information.
Preferably, all hard disks instruction for all storage control modules that the processor is also used to be detected in judgementAfter the state of lamp is identical as preset state, the cable for issuing the storage system of detection connects errorless prompt information.
The present invention provides a kind of cable self checking methods of storage system, including send initially to currently stored control moduleOrder is in original state with the present hard discs indicator light connecting by CPLD control with currently stored control module;To currentStorage control module sends sense command, detection operation is executed to control present hard discs indicator light by CPLD, according to currentThe state of hard disk indication lamp determines whether cable corresponding with present hard discs indicator light connects correctly.
As it can be seen that cable self checking method provided by the present application, it is contemplated that hard disk indication lamp is to correspond with cable to be detected, therefore, to detect some or certain or whole cables, the corresponding hard disk indication lamp of these cables need to only be examinedIt is wrong that survey can determine whether cable connects.The process greatly reduces artificial participation, time saving and energy saving, improves detection effectRate, and error rate is low.
The present invention also provides the cable self-checking systems and server of a kind of storage system, have same as mentioned aboveBeneficial effect.
Specific embodiment
Core of the invention is to provide cable self checking method, system and the server of a kind of storage system, greatly reducesArtificial participation, it is time saving and energy saving, detection efficiency is improved, and error rate is low.
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present inventionIn attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment isA part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the artEvery other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Referring to figure 2., Fig. 2 is a kind of process flow diagram flow chart of the cable self checking method of storage system provided by the invention, shouldMethod includes:
S11: to currently stored control module send initial command, so as to currently stored control module by CPLD control andThe present hard discs indicator light of currently stored control module connection is in original state;
S12: sending sense command to currently stored control module, so that currently stored control module is worked as by CPLD controlPreceding hard disk indication lamp executes detection operation, corresponding with present hard discs indicator light to be determined according to the state of present hard discs indicator lightCable whether connect correctly.
Firstly the need of explanation, the CPU on mainboard connects one or more storage control module, storage control moduleFor signal, SGPIO (Serial General Purpose Input Output, serial universal input/output) letter will to be storedIt number is sent on each connector of hard disk backboard by connector, cable.Each storage control module connection two is moreA cable (cable and hard disk and hard disk indication lamp correspond).On hard disk backboard, storage signal is connect to each hard disk,SGPIO signal, which connects, connects the indicator light of each hard disk to CPLD, CPLD to carry out lighting operation.In server design, storageThe state of each hard disk indication lamp is arranged by SGPIO signal to SPLD for control control module, and CPLD believes according to the SGPIO transmittedNumber control hard disk indication lamp is lighted and is extinguished.
When to cable self-test, initial command is sent to currently stored control module first, storage control module is receivingCan be sent after to initial command initial SG PIO signal to CPLD, CPLD can be controlled after receiving initial SG PIO signal with currentlyThe present hard discs indicator light (namely the corresponding hard disk indication lamp of current cable to be detected) of storage control module connection is in initialState.Sense command, storage control are sent after present hard discs indicator light is in original state, then to currently stored control moduleModule sends detection SGPIO signal to present hard discs indicator light again after receiving sense command, and CPLD is receiving detectionPresent hard discs indicator light can be controlled after SGPIO signal and executes detection operation, can be sentenced according to the state of present hard discs indicator lightWhether fixed cable corresponding with present hard discs indicator light is correct.
It should be noted that in practical applications, can be detected according to the actual situation to cable, for example, can be withTo one or partly or completely one of storage control module or partly or completely hard disk indication lamp is examinedIt surveys.When whole hard disk indication lamps to whole storage control modules detect, following scheme can be used:
Each storage control module is proceeded as follows according to the first preset order:
Initial command is sent to currently stored control module, so as to currently stored control module by CPLD control and currentlyAll hard disk indication lamps of storage control module connection are in original state;
It is proceeded as follows according to the hard disk indication lamp that the second preset order pair is connect with currently stored control module:
Sense command is sent to currently stored control module, so as to currently stored control module by CPLD control and currentlyThe present hard discs indicator light of storage control module connection executes detection operation.
Or use following scheme:
To all storage control modules send initial command, so as to each storage control module by CPLD control with it is eachAll hard disk indication lamps of storage control module connection are in original state;
It is proceeded as follows according to the hard disk indication lamp that preset order pair is connect with currently stored control module:
Sense command is sent to currently stored control module, so as to currently stored control module by CPLD control and currentlyThe present hard discs indicator light of storage control module connection executes detection operation.
Here preset order, the first preset order and the second preset order can in the light of actual conditions determine, this ShenIt does not limit particularly herein please.As it can be seen that cable self checking method provided by the present application, it is contemplated that hard disk indication lamp and survey line to be checkedCable be it is one-to-one, therefore, only need to be to the corresponding hard disk of these cables to detect some or certain or whole cablesIndicator light carries out detection, and can to determine whether cable connects wrong.The process greatly reduces artificial participation, time saving and energy saving,Detection efficiency is improved, and error rate is low.
On the basis of the above embodiments:
As a kind of preferred embodiment, original state is OFF state.
As a kind of preferred embodiment, sense command is sent to currently stored control module, so as to currently stored controlModule controls present hard discs indicator light by CPLD and executes detection operation, comprising:
The first sense command is sent to currently stored control module, so that currently stored control module is worked as by CPLD controlPreceding hard disk indication lamp is lighted;
After a preset time lapses, the second sense command is sent to currently stored control module, so as to currently stored controlModule controls present hard discs indicator light by CPLD and extinguishes.
Specifically, original state here can be OFF state, it is of course also possible to be arranged to other states, such asFor illuminating state, behind control when detecting each hard disk indication lamp first go out again it is bright.
In the present embodiment, when being detected to present hard discs indicator light, it can first control present hard discs indicator light and light,After preset time, then control the extinguishing of present hard discs indicator light.As successively being carried out to multiple hard disk indication lampsDetection, then the effect come out should be that each hard disk indication lamp successively carries out light on and off.Specific length of the application for preset timeIt is short do not limit particularly, determine according to the actual situation.
It is arranged as one example below with reference to Fig. 1 to illustrate:
1, operator operates server at the scene, connects checking mode into cable;
2, CPU sends to all storage control modules and orders, and extinguishes all hard disk indication lamps;
3, CPU sends to storage control module 1 and orders, and lights the indicator light of the corresponding hard disk of connector 1 above it, and 1 secondThe order for closing indicator light is retransmited afterwards;
4, CPU sends to storage control module 1 and orders, and lights the indicator light of the corresponding hard disk of connector 2 above it, and 1 secondThe order for closing indicator light is retransmited afterwards;
5, and so on, until all indicator lights are all lighted and extinguished;
6, whether the bright sequence of operator's site inspection indicator light and predetermined order are identical, that is, are determining cable connection justWhether really.
As a kind of preferred embodiment, present hard discs indicator light is controlled by CPLD in currently stored control module and is lightedAfterwards, before sending the second sense command to currently stored control module, further includes:
Obtain the state of present hard discs indicator light;
Judge whether the state of present hard discs indicator light is identical as preset state, if it is, subsequent step is executed, it is noThen, stop detection, and issue the corresponding cable of present hard discs indicator light and connect wrong prompt information.
As a kind of preferred embodiment, present hard discs indicator light is controlled by CPLD in currently stored control module and is lightedAfterwards, before sending the second sense command to currently stored control module, further includes:
Obtain the state of all hard disk indication lamps of all storage control modules;
Judge whether the hard disk indication lamp lighted is the current indicator light, if it is, subsequent step is executed, otherwise,Stop detection, and issues the corresponding cable of present hard discs indicator light and connect wrong prompt information.
In order to further increase the degree of automation, in the present embodiment, after control present hard discs indicator light is lighted, CPLDIt reads the state of present hard discs indicator light and stores the state of present hard discs indicator light into bus register, CPU passes through totalLine reads the state of present hard discs indicator light, and judges whether the state of present hard discs indicator light is identical as preset state, ifThen to send next sense command to currently stored control module, controlled by CPLD so as to currently stored control module andNext hard disk indication lamp of currently stored control module connection executes detection operation, otherwise, stops detection, and issues current hardThe corresponding cable of disk indicator light connects wrong prompt information.
Specifically, referring to figure 3., Fig. 3 is a kind of hardware connection structure of the storage system of server provided by the inventionSchematic diagram.
When CPLD is designed, after receiving the SPGIO signal that each connector is sent, it is hard to control not only to be decoded into corresponding valueDisk indicator light, but also by the storage of the state of present hard discs indicator light into I2C register, CPU can be read by I2C busTo the LED status in its register.In practical applications, if all hard disks to all storage control modules indicateLamp is detected, then after detecting to present hard discs indicator light, not only obtains the state of present hard discs indicator light, may be used alsoTo obtain the state of other all hard disk indication lamps,
Below with reference to Fig. 2 column, (example is identical as example in above-described embodiment, and different is only that CPU also as one exampleThe state for reading hard disk indication lamp is judged) illustrate:
1, operator is live or operates server by remote mode, connects checking mode into cable;
2, CPU sends to all storage control modules and orders, and extinguishes all hard disk indication lamps;
3, CPU sends to storage control module 1 and orders, and lights the indicator light of the corresponding hard disk of connector 1 above it;
4, CPU reads hard disk indication lamp by I2C and (can be present hard discs indicator light, be also possible to all hard disksIndicator light) state, and judged.When reading the state of all hard disk indication lamp, if connector 1 connected it is hardDisk indicator light is bright, other hard disk indication lamps extinguish, then continues in next step.Otherwise, stop connection checking, the prompt that reports an error has cableConnection error, and can also prompt in incorrect link to the connector of which hard disk backboard, connected with facilitating staff to correctLine.When only reading the state of present hard discs indicator light, judge whether the state of present hard discs indicator light is identical as preset state,If it is, execute subsequent step, otherwise, stop detection, and issue the corresponding cable of present hard discs indicator light connect it is wrongPrompt information.
Such as when reading the state of all hard disk indication lamps, when the connector 1 of storage control module is connected to hard diskWhen connector 3 (should be the connector 1 on hard disk backboard to be connected to) of backboard, that is, there is connection error.At this point, passing through companyThe point modulating signal for connecing the transmission of device 1 can light the corresponding hard disk indication lamp of hard disk connector 3.CPU reads signal and learns the hard of bright lightDisk is incorrect, i.e., identification makes mistake, and CPU can also prompt 1 incorrect link of connector of storage control module to hard disk backboardConnector 3 on, with facilitate staff correct line.
In another example when only reading present hard discs indicator light, when the connector 1 of storage control module is connected to hard disk backboardConnector 3 when, that is, there is connection error.At this point, it is right to light hard disk connector 3 by the point modulating signal that connector 1 is sentThe hard disk indication lamp answered.CPU reads the state of the corresponding hard disk indication lamp of hard disk connector 1 according to preset order, but due to thisWhen the corresponding hard disk indication lamp of hard disk connector 3 it is bright, and the corresponding hard disk indication lamp of hard disk connector 1 goes out, and can determine to deposit at this timeThe cable connection for storing up the connector 1 of control module is wrong, issues the corresponding cable of present hard discs indicator light and connects wrong promptInformation.
5, CPU sends to storage control module 1 and orders, and extinguishes the indicator light of the corresponding hard disk of connector 1 above it;
6, to all hard disks, 3-5 step is repeated, until terminating.
As it can be seen that self-test scheme provided in this embodiment, may be implemented automatically to detect, does not need operator and grasp at the sceneMake or observe, improves the degree of automation.
As a kind of preferred embodiment, in all hard disk indication lamps for all storage control modules that judgement is detectedState it is identical as preset state after, further includes:
The cable for issuing the storage system of detection connects errorless prompt information.
In order to facilitate the operation of personnel's timely learning cable connection status, in all storage control modules that judgement is detectedAll hard disk indication lamps state it is identical as preset state after, also issue the storage system of detection cable connect it is errorlessPrompt information.It further include step 7 namely in examples detailed above: if midway returns to the result for checking OK without reporting an error.
The present invention also provides a kind of cable self-checking system of storage system, which includes:
First transmission unit, for sending initial command to currently stored control module, so as to currently stored control moduleOriginal state is in by the present hard discs indicator light that CPLD control is connect with currently stored control module;
Second transmission unit, for sending sense command to currently stored control module, so as to currently stored control moduleBy CPLD control present hard discs indicator light execute detection operation, with determined according to the state of present hard discs indicator light with currentlyWhether the corresponding cable of hard disk indication lamp connects correctly.
Above-described embodiment is please referred to for the introduction of the cable self-checking system of storage system provided by the invention, the present invention existsThis is repeated no more.
The present invention also provides a kind of server, including storage system, storage system includes CPLD, multiple storages control mouldBlock, multiple hard disks and multiple hard disk indication lamps, further includes:
Processor realizes the step of the cable self-checking system method such as above-mentioned storage system when for executing computer programSuddenly.
As a kind of preferred embodiment, further includes:
The communication bus being set between CPU and CPLD;
Processor is also used to after currently stored control module is lighted by CPLD control present hard discs indicator light, Xiang DangqianBefore storage control module sends the second sense command, the state of present hard discs indicator light is obtained;Judge present hard discs indicator lightState it is whether identical as preset state, if it is, executing subsequent step, otherwise, stop detection, and issue present hard discs and refer toShow that the corresponding cable of lamp connects wrong prompt information.
As a kind of preferred embodiment, communication bus is I2C bus.
Certainly, communication bus here can also be other buses, and details are not described herein by the application.
As a kind of preferred embodiment, the institute for all storage control modules that processor is also used to be detected in judgementHave the state of hard disk indication lamp it is identical as preset state after, the cable for issuing the storage system of detection connects errorless prompt letterBreath.
Above-described embodiment is please referred to for the introduction of server provided by the invention, details are not described herein by the present invention.
It should be noted that in the present specification, the terms "include", "comprise" or its any other variant are intended toNon-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including thoseElement, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipmentIntrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded thatThere is also other identical elements in process, method, article or equipment including the element.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined hereinGeneral Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the inventionIt is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase oneThe widest scope of cause.