CN105843720A - Method and device for testing hot-plug stability of hard disks - Google Patents
Method and device for testing hot-plug stability of hard disks Download PDFInfo
- Publication number
- CN105843720A CN105843720A CN201610318411.4A CN201610318411A CN105843720A CN 105843720 A CN105843720 A CN 105843720A CN 201610318411 A CN201610318411 A CN 201610318411A CN 105843720 A CN105843720 A CN 105843720A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- hot plug
- drive
- capacity
- pulled out
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2247—Verification or detection of system hardware configuration
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method and device for testing the hot-plug stability of hard disks. The method comprises the steps that disk identifier, serial numbers and the capacity of all the hard disks are acquired separately, and a standard status file including corresponding relations of the disk identifier, the serial numbers and the capacity of all the hard disks is formed; whether at least one of at least two hard disks is plugged in a hot-plug mode or not is detected in real time; if yes, the disk identifier, the serial numbers and the capacity of all the hard disks are acquired, and a current status file including the corresponding relations of the disk identifier, the serial numbers and the capacity of all the hard disks is formed according to the disk identifier, the serial numbers and the capacity of all the hard disks; whether the current status file is the same as the standard status file or not is judged; if yes, a notification message that a server does not generate hard disk disordering is sent, and otherwise, a notification message that the server generate hard disk disordering is sent. According to the method and device, the efficiency of testing the hot-plug stability of the hard disks can be improved.
Description
Technical field
The present invention relates to field of computer technology, particularly to the side of a kind of testing hard disk hot plug stability
Method and device.
Background technology
Along with development and the progress of computer technology, conventional informationization service and the cloud become stronger day by day
Calculate service more and more higher to the storage demand of server, thus be generally provided with multiple on server
Hard disk.In order to ensure that on server, business does not rolls off the production line, server all hard disk hot-plug support technology, thus
In the case of non-stop-machine, hard disk can be replaced.
For the server of hard disk hot-plug support technology, when hard disk is carried out hot plug operations, may
Causing hard disk out of order, hard disk is out of order causes server OS to occur extremely, and then causes server to be sent out
Raw machine of delaying, causes the business run on server to roll off the production line.In order to ensure that server is not sent out when changing hard disk
Stiff dish is out of order, needs to test the hard disk hot-plug stability of server.
At present, when testing hard disk hot plug stability, repeatedly hard disk is carried out hot plug operations, record
The number of times of hot plug operations, and detect whether to occur hard disk out of order.
The method being directed to prior art testing hard disk hot plug stability, logical after hot plug operations each time
Cross and manually check that the mode of each hard disk serial number detects whether each hard disk occurs hard disk continuous, the most every
One detection circulation is required for expending the longer time, and carries out hard disk hot-plug stability testing needs
Carry out multiple detection circulation, thus hard disk hot-plug stability is tested inefficient.
Summary of the invention
Embodiments provide the method and device of a kind of testing hard disk hot plug stability, it is possible to carry
The high efficiency that hard disk hot-plug stability is tested.
A kind of method embodiments providing testing hard disk hot plug stability, be applied to have to
The server of few two hard disks, including:
Obtain the drive of each described hard disk, sequence number and capacity respectively;
According to the drive of hard disk, sequence number and capacity each described, form the dish including each described hard disk
Symbol and sequence number and the standard state file of capacity corresponding relation;
Detect in described at least two hard disk whether there is at least one hard disk by the way of hot plug in real time
It is inserted into;
If it is, obtain the described drive of each hard disk, sequence number and capacity respectively, and according to each institute
State the drive of hard disk, sequence number and capacity, form the drive including each described hard disk and sequence number and appearance
The current state file of amount corresponding relation;
Judge that described current state file is the most identical with described standard state file;
If it is, send described server the out of order notification message of hard disk does not occurs, otherwise send described clothes
The notification message that business device generation hard disk is out of order.
Preferably, in described real-time detection described at least two hard disk, whether there is at least one hard disk lead to
Cross the mode of hot plug to be inserted into and farther include afterwards:
It is directed to each hard disk being inserted into, obtains the drive of this hard disk and start to currently from detection
The total degree that till time, this hard disk is inserted into by the way of hot plug, and send the dish including this hard disk
Accord with and be inserted into the notification message of total degree.
Preferably, the method farther includes:
Detect in described at least two hard disk whether there is at least one hard disk by the way of hot plug in real time
It is pulled out, if it is, be directed to each hard disk being pulled out, obtains the drive of this hard disk and from inspection
Survey and start to current time the total degree that this hard disk is pulled out by the way of hot plug, and send bag
Include the drive of this hard disk and be pulled out the notification message of total degree.
Preferably, whether described real-time detection described at least two hard disk exists at least one hard disk to pass through
The mode of hot plug is inserted into and includes:
Detect the first keyword whether described server system occurs presetting in real time, if it is, judge to deposit
It is inserted into by the way of hot plug at least one hard disk, otherwise judges do not have hard disk to pass through hot plug
Mode is inserted into, and wherein said first keyword is included in hard disk and is inserted into rear system by hot plug mode
Among the information produced.
Preferably, whether described real-time detection described at least two hard disk exists at least one hard disk to pass through
The mode of hot plug is pulled out and includes:
Detect the second keyword whether described server system occurs presetting in real time, if it is, judge to deposit
Store up at least one hard disk to be pulled out by the way of hot plug, otherwise judge do not have hard disk to pass through hot plug
Mode is pulled out, ask described in the second keyword be included in hard disk and be pulled out rear system by hot plug mode
Among the information produced.
Preferably, the method farther includes:
Described standard state file and each described current state file are stored default test result
In file.
The embodiment of the present invention additionally provides the device of a kind of testing hard disk hot plug stability, is applied to have
The server of at least two hard disk, including: the first acquiring unit, detector unit, second acquisition unit,
Judging unit and performance element;
Described first acquiring unit, for obtaining the drive of each described hard disk, sequence number and capacity respectively,
And according to the drive of hard disk, sequence number and capacity each described, form the drive including each described hard disk
Standard state file with sequence number and capacity corresponding relation;
Whether described detector unit, exist at least one hard in described detection described at least two hard disk
Dish is inserted into by the way of hot plug;
Described second acquisition unit, for the testing result according to described detector unit, if it is, respectively
Obtain the described drive of each hard disk, sequence number and capacity, and according to the drive of hard disk, sequence each described
Row number and capacity, formed and include the current of the drive of each described hard disk and sequence number and capacity corresponding relation
Status file;
Described judging unit, for judging that current state file that described second acquisition unit formed is with described
The standard state file that first acquiring unit is formed is the most identical;
Described performance element, for the judged result according to described judging unit, if it is, send described
There is not the notification message that hard disk is out of order in server, otherwise sends out of order the leading to of described server generation hard disk
Know message.
Preferably, described detector unit, it is further used for being directed to each hard disk being inserted into, obtains
The drive of this hard disk and start to current time this hard disk from detection and inserted by the way of hot plug
The total degree entered, and send include the drive of this hard disk and be inserted into the notification message of total degree.
Preferably, described detector unit, whether it is further used for detecting in real time in described at least two hard disk
There is at least one hard disk to be pulled out by the way of hot plug, be pulled out if it is, be directed to each
Hard disk, obtain this hard disk drive and from detection start to current time this hard disk by heat insert
The total degree that the mode pulled out is pulled out, and send and include the drive of this hard disk and be pulled out the logical of total degree
Know message.
Preferably, described detector unit, in real time detecting what whether described server system occurred presetting
First keyword, if it is, judge that there is at least one hard disk is inserted into by the way of hot plug, no
Then judging do not have hard disk to be inserted into by the way of hot plug, wherein said first keyword is included in hard disk
It is inserted among the information that rear system produces by hot plug mode.
Preferably, described detector unit, in real time detecting what whether described server system occurred presetting
Second keyword, if it is, judge that there is at least one hard disk is pulled out by the way of hot plug, no
Then judging do not have hard disk to be pulled out by the way of hot plug, wherein said second keyword is included in hard disk
It is pulled out among the information that rear system produces by hot plug mode.
Preferably, this device farther includes: memory cell;
Described memory cell, for the standard state file and described described first acquiring unit formed
Each current state file that second acquisition unit is formed stores in default test result file.
Embodiments provide the method and device of a kind of testing hard disk hot plug stability, obtain each
The drive of individual hard disk, sequence number and capacity, form the drive including each hard disk and sequence number and capacity pair
The standard state file that should be related to, during hard disk is carried out hot plug operations, has detected whether in real time
Hard disk is inserted into by the way of hot plug, and hard disk is inserted into the dish all obtaining once each hard disk each time
Symbol, sequence number and capacity, formed according to drive, sequence number and the capacity of each hard disk got and include
The drive of each hard disk and sequence number and the current state file of capacity corresponding relation, by current state file
Compare with standard state file, if current state file is identical with standard state file, this is described
Secondary hard disk inserts and does not cause hard disk out of order, and transmission server does not occurs the notification message that hard disk is out of order, as
Really current state file is different from standard state file, illustrates that this hard disk insertion causes hard disk out of order,
Send the notification message that server generation hard disk is out of order.So, just may determine that according to notification message each
Whether secondary hot plug occurs hard disk out of order, it is not necessary to manually contrast hard disk after hot-plug hard disk each time
The mode of sequence number judges whether to occur hard disk out of order, reduces the time needed for each test loop, from
And improve the efficiency that hard disk hot-plug stability is tested.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality
Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that below,
Accompanying drawing in description is some embodiments of the present invention, for those of ordinary skill in the art, not
On the premise of paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the method flow of a kind of testing hard disk hot plug stability that one embodiment of the invention provides
Figure;
Fig. 2 is the method stream of a kind of testing hard disk hot plug stability that another embodiment of the present invention provides
Cheng Tu;
Fig. 3 is the device place of a kind of testing hard disk hot plug stability that one embodiment of the invention provides
The schematic diagram of equipment;
Fig. 4 is the device signal of a kind of testing hard disk hot plug stability that one embodiment of the invention provides
Figure;
Fig. 5 is that the device of a kind of testing hard disk hot plug stability that another embodiment of the present invention provides shows
It is intended to.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this
Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments, based on
Embodiment in the present invention, those of ordinary skill in the art are institute on the premise of not making creative work
The every other embodiment obtained, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, a kind of method embodiments providing testing hard disk hot plug stability,
Being applied to include the server of at least two hard disk, the method may comprise steps of:
Step 101: obtain the drive of each described hard disk, sequence number and capacity respectively;
Step 102: according to the drive of hard disk, sequence number and capacity each described, is formed and includes each institute
State drive and sequence number and the standard state file of capacity corresponding relation of hard disk;
Step 103: detect in real time in described at least two hard disk and whether there is at least one hard disk by heat
The mode of plug is inserted into, if it is, perform step 104, otherwise continues executing with step 103;
Step 104: obtain the described drive of each hard disk, sequence number and capacity respectively, and according to each
The drive of described hard disk, sequence number and capacity, formed include the drive of each described hard disk and sequence number and
The current state file of capacity corresponding relation;
Step 105: judge that described current state file is the most identical with described standard state file, if
It is carried out step 106, otherwise performs step 107;
Step 106: send described server and the out of order notification message of hard disk does not occurs, and terminate current stream
Journey;
Step 107: send the notification message that described server generation hard disk is out of order.
A kind of method embodiments providing testing hard disk hot plug stability, obtains each hard disk
Drive, sequence number and capacity, formed and include the drive of each hard disk and sequence number and capacity corresponding relation
Standard state file, during hard disk is carried out hot plug operations, detected whether in real time hard disk lead to
The mode crossing hot plug is inserted into, and hard disk is inserted into and all obtains once the drive of each hard disk, sequence each time
Row number and capacity, formed according to drive, sequence number and the capacity of each hard disk got and include that each is hard
The drive of dish and sequence number and the current state file of capacity corresponding relation, by current state file and standard
Status file compares, if current state file is identical with standard state file, this hard disk is described
Inserting does not causes hard disk out of order, and transmission server does not occurs the notification message that hard disk is out of order, if currently
Status file is different from standard state file, illustrates that this hard disk insertion causes hard disk out of order, sends clothes
The notification message that business device generation hard disk is out of order.So, just may determine that according to notification message that heat is inserted each time
Pull out and whether occur hard disk out of order, it is not necessary to after hot-plug hard disk each time, manually contrast hard disk serial number
Mode judge whether occur hard disk out of order, reduce the time needed for each test loop, thus improve
Efficiency that hard disk hot-plug stability is tested.
In an embodiment of the invention, after detecting that hard disk is inserted into by the way of hot plug,
Obtain the drive of this hard disk and start to current time this hard disk by the way of hot plug from detection
The total degree being inserted into, and send include the drive of this hard disk and be inserted into the notification message of total degree.
So, just may determine that hard disk has carried out the number of times of hot plug test according to this notification message, thus can
To determine that the number of times testing hard disk stability has reached the number of times of requirement, it is to avoid pass through people
The situation such as the labour intensity that work record testing time causes is big and data are inaccurate, reduces tester
Labour intensity, and improve the accuracy of test.
In an embodiment of the invention, it is also possible to detect whether that hard disk is by the way of hot plug in real time
Be pulled out, after detecting that hard disk is pulled out by the way of hot plug, obtain the drive of this hard disk with
And start to current time, from detection, the total degree that this hard disk is pulled out by the way of hot plug, and
Send and include the drive of this hard disk and found the notification message of total degree.So, disappeared by this notice
Breath may determine that the drive being pulled out hard disk and the cycle-index that this hard disk carries out hot plug test, root
May insure that the hard-disk interface that again same hard disk is turned back to correspondence according to the drive of this hard disk, point out user
The hard disk that should insert, occurs when preventing from existing multiple hard disk that the hard disk inserted and the hard disk pulled up are not same
The situation of one hard disk occurs, thus realizes same hard disk is carried out Continuous Heat plug, improves firmly
Dish hot plug stability carries out the accuracy tested.
In an embodiment of the invention, when detecting whether that hard disk is inserted into by the way of hot plug,
The information that server system produces when hard disk is inserted into by hot plug mode in advance determines first
Keyword, whether detection server system there is the first keyword in real time, if it is, judge have hard disk to lead to
The mode crossing hot plug is inserted into, and otherwise judges do not have hard disk to be inserted into by the way of hot plug.So,
Achieve and automatically detect the hard disk being inserted into by hot plug mode, it is ensured that follow-up judging whether occurs hard disk
Out of order can be normally carried out.
In an embodiment of the invention, when detecting whether that hard disk is pulled out by the way of hot plug,
In the information that server system produces when hard disk is pulled out by hot plug mode the most in advance
Determining the second keyword, whether detection server system there is the second keyword in real time, if it is, judge
There is hard disk to be pulled out by the way of hot plug, otherwise judge do not have hard disk to be pulled out by the way of hot plug
Go out.So, it is achieved that automatically detect the hard disk being pulled out by hot plug mode, such that it is able to prompting is used
Family needs to carry out the hard disk inserted and the cycle-index that this hard disk carries out hot plug operations, improves
The ease for use of the method for this testing hard disk hot plug stability.
In an embodiment of the invention, the standard state file of formation and each hard disk can be inserted
In the test result file being pre-created in the current state file storage of fashionable generation.As such, it is possible to will
Hard disk hot-plug stability carries out the status information of hard disk in test process preserve, facilitate the later stage pair
Test process is checked, it is possible to judge whether hard disk hot-plug stability closes according to test result file
Lattice.
Below one to be included the server of multiple hard disk carries out hard disk hot-plug stability and carry out test being
Example, illustrates the method for the testing hard disk hot plug stability that the embodiment of the present invention provides.Such as Fig. 2
Shown in, a kind of method embodiments providing testing hard disk hot plug stability, the method is permissible
Comprise the following steps:
Step 201: obtain the drive of each hard disk, sequence number and capacity respectively.
In an embodiment of the invention, the hard disk hot-plug stability on a server is being surveyed
Before examination, obtain the drive of each hard disk, sequence number and capacity on server the most respectively, to determine
Each hard disk state in the case of not occurring hard disk out of order on server.
Such as, one needs to be provided with 10 on the server testing hard disk hot-plug stability firmly
Dish, respectively hard disk 1 to hard disk 10, obtain the drive of 10 hard disks, sequence number and capacity respectively.
In embodiments of the present invention, can realize hard disk hot-plug stability is surveyed by shell script
Examination, the shell script obtaining each disk identifier of hard disk, sequence number and capacity is as follows:
function generate_baseline()
{
echo"Disk_name">base.txt
echo"Serial_Number">>base.txt
echo"Capacity">>base.txt
fdisk-l|grep"Disk/dev/sd"|awk'{print$2|"cut-b8"}'|sort>/root/disk.txt
2>&1
for Dev_name in`cat/root/disk.txt`
do
echo"sd$Dev_name">$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"serial number"|awk'{print
$3}'>>$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"capacity"|awk'{print$3}'>>
$Dev_name.txt
done
By above-mentioned shell script, each hard disk generates a corresponding $ Dev_name.txt file, should
File records the drive of this correspondence hard disk, sequence number and capacity.
Step 202: according to drive, sequence number and the capacity of each hard disk, is formed and includes each hard disk
Drive and sequence number and the standard state file of capacity corresponding relation.
In an embodiment of the invention, according to drive, the sequence of each hard disk got in step 201
Row number and capacity, form a standard state file, and in this standard state file, record has each dish
The hard disk serial number of symbol correspondence and hard-disk capacity, the drive of record and hard disk sequence in this standard state file
Row number and the corresponding relation of hard disk people's capacity be on server when each hard disk is in normal condition drive with
Sequence number and the corresponding relation of capacity, as the follow-up standard judging whether and occurring hard disk out of order.
Such as, according to drive, sequence number and the capacity of 10 hard disks, form a file entitled
The standard state file of baseline.xls, in baseline.xls, record has the drive of 10 hard disks with hard
Dish sequence number and the corresponding relation of capacity, wherein sequence number 1 and the capacity 1 of hard disk 1 are relative with drive 1
Should, sequence number 2 and the capacity 2 of hard disk 2 are corresponding with drive 2, by that analogy, and the sequence of hard disk 10
Numbers 10 and capacity 10 corresponding with drive 10.
In embodiments of the present invention, standard state file baseline.xls can be formed by shell script,
Concrete shell script is as follows:
echo
for Dev_name in`cat/root/disk.txt`
do
paste-d""base.txt$Dev_name.txt>temp_base.txt
cat temp_base.txt>base.txt
done
cat base.txt>>baseline.xls
}
By above-mentioned shell script, $ Dev_name.txt file corresponding for each hard disk is merged, shape
Become baseline.xls file.
Step 203: the one or more hard disks on server are circulated hot plug operations.
In an embodiment of the invention, manually or by relevant device on server or
Multiple hard disks are repeated circulation hot plug operations.
Such as, repeatedly the hard disk 1 on server is carried out hot plug operations.
Step 204: whether detection server system the first keyword or the second keyword occurs in real time, as
Fruit is, performs step 205, otherwise continues executing with step 204;
In an embodiment of the invention, whether cycle detection server system occurs the first keyword or
Second keyword, wherein the first keyword is included in server system when hard disk is inserted into by hot plug mode
Among the information that system produces, take when the second keyword includes being pulled out by hot plug mode with hard disk
Among the information that business device system produces, server system when only hard disk is inserted into by hot plug mode
System just there will be server system when the first keyword, the most only hard disk are pulled out by hot plug mode
System just there will be the second keyword.When the first keyword occurs in server system, illustrate that hard disk passes through
The mode of hot plug is inserted into, and when the second keyword occurs in server system, has illustrated that hard disk passes through heat
The mode of plug is pulled out, and is correspondingly performed both by step 205, and otherwise explanation does not has hard disk to pass through hot plug
Mode be inserted into or be pulled out, continue detection the first keyword and the second keyword, correspondingly perform step
Rapid 204.
Such as, presetting the first keyword is Attached SCSI disk, set the second keyword as
Whether removing, there is Attached SCSI disk or removing in detection server system in real time,
Step 205 is performed, otherwise after server system occurs Attached SCSI disk or removing
Continue executing with step 204.
Step 205: judge to occur that in server system that no is the first keyword, if it is, perform
Step 206, otherwise performs step 210.
In an embodiment of the invention, when server system occurs the first keyword or the second keyword
After, determine whether server system occurring that, no is the first keyword, if it is, explanation has hard
Dish is inserted into by the form of hot plug, correspondingly performs step 206;If it does not, explanation has hard disk to lead to
The form crossing hot plug is pulled out, and correspondingly performs step 210.
Such as, when detecting, performing after Attached SCSI disk occurs step 206 in server system,
When detecting, performing after removing occurs step 210 in server system.
Step 206: obtain and be inserted into the drive of hard disk and this hard disk is inserted into by hot plug mode
Total degree, and send include the drive of this hard disk and be inserted into the notification message of total degree.
In an embodiment of the invention, after detecting that hard disk is inserted into by the way of hot plug,
Obtain and be inserted into the drive of hard disk, and obtain this hard disk is circulated hot plug operations and be inserted into total
Number of times, by get this hard disk drive and be inserted into total degree with the form of notification message be sent to service
On the display of device, the drive showing this hard disk in the realization of server and the total degree being inserted into.
Such as, after detecting that hard disk 1 is inserted into by the way of hot plug, obtain the drive of hard disk 1
A, and the total degree X being inserted into current time hard disk 1 is started by hot plug mode from test,
Drive A and total degree X is shown on the display of server.
In embodiments of the present invention, obtain and show be inserted into the drive of hard disk and be inserted into total degree permissible
Being realized by shell script, concrete shell script is as follows:
function plug_in()
{
local i;
In=$ (tail-n 3/var/log/messages | grep-i " Attached SCSI disk " | awk'{print
$8}');
Length_in=$ (echo " $ In " | awk'{print length ($ 0) } ');
I=$ (expr $ length_in-1);
DEV_name_in=$ (echo " $ In " | cut-b 2-$ i);
echo-e"\033[44;37;5m$DEV_name_in\033[0m is pluged in";
Flag_plug=1;
By above-mentioned shell script, show being inserted into the drive of hard disk with blue end wrongly written or mispronounced character the form that flashes
Show on the display of server;
DEV_name_in_temp_2=$ DEV_name_in_temp_1;
DEV_name_in_temp_1=$ DEV_name_in;
If [" $ DEV_name_in " x=" $ DEV_name_in_temp_2 " x];then
I=$ (expr $ i+1);
echo-e"This is\033[44;37;5m$i\033[0m times";
else
I=1;
echo-e"This is\033[44;37;5m$i\033[0m times";
fi
continue;
fi
done
By above-mentioned shell script, the total degree that is inserted into being inserted into hard disk with blue end wrongly written or mispronounced character and is flashed
Form shows on the display of server;
Step 207: obtain the drive of each hard disk, sequence number and capacity, is formed and includes each hard disk
Drive and sequence number and the current state file of capacity corresponding relation.
In an embodiment of the invention, after judging to have hard disk to be inserted into by the way of hot plug, weight
The new acquisition drive of each hard disk, sequence number and capacity, according to the dish reacquiring each hard disk arrived
Symbol, sequence number and capacity form a current state file, and in current state file, record has current
Hard disk serial number that each drive of time is corresponding and hard-disk capacity.
Such as, after detecting server system occurs Attached SCSI disk, obtain current time
The drive of 10 hard disks, sequence number and capacity on server, according to drive, the sequence of these 10 hard disks
Number and capacity formed an entitled 1.txt of file current state file, in 1.txt file record have 10 dishes
The hard disk serial number of symbol correspondence and hard-disk capacity.
In embodiments of the present invention, the process forming current state file 1.txt can be real by shell script
Existing, concrete shell script is as follows:
echo"Disk_name">1.txt
echo"Serial_Number">>1.txt
echo"Capacity">>1.txt
fdisk-l|grep"Disk/dev/sd"|awk'{print$2|"cut-b8"}'|sort>/root/disk.txt
2>&1
for Dev_name in`cat/root/disk.txt`
do
echo"sd$Dev_name">$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"serial number"|awk'{print
$3}'>>$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"capacity"|awk'{print$3}'>>
$Dev_name.txt
done
echo
for Dev_name in`cat/root/disk.txt`
do
paste-d""1.txt$Dev_name.txt>temp_in.txt
cat temp_in.txt>1.txt
done
By above-mentioned shell script, formed and include that each drive of current time holds with hard disk serial number and hard disk
The 1.txt file of amount corresponding relation.
Step 208: judge that current state file is the most identical with standard state file, if identical transmission
There is not the notification message that hard disk is out of order in server, if the different server generation hard disk continuous print that sends leads to
Know message.
In an embodiment of the invention, by the current state file formed in step 207 and step 202
The standard state file of middle formation contrasts, it is judged that each drive and hard disk serial in current state file
Number and hard-disk capacity corresponding relation the most all with each drive in standard state file and hard disk serial number and
The corresponding relation of hard-disk capacity is identical, if it is, explanation does not occur hard disk out of order, and showing to server
Show that device sends server and the out of order notification message of hard disk, display server in server display do not occur
There is not the information that hard disk is out of order;If it does not, explanation there occurs that hard disk is continuous, showing to server
Show that device sends the notification message that server generation hard disk is out of order, display server on the display of server
There is the information that hard disk is out of order.
Such as, 1.txt file is contrasted with baseline.xls file, if hard disk in 1.txt file
Sequence number 1 and the capacity 1 of 1 are corresponding with drive 1, the sequence number 2 of hard disk 2 and capacity 2 and drive 2
Corresponding, by that analogy, sequence number 10 and the capacity 10 of hard disk 10 are corresponding with drive 10, i.e. 1.txt
File is identical with baseline.xls file, then show OK character on the display of server;As
Really there is at least one hard disk serial number and drive corresponding to capacity and baseline.xls file in 1.txt file
In same hard disk serial number and drive corresponding to capacity different, then show on the display of server
ERROR character.
In embodiments of the present invention, 1.txt file and baseline.xls literary composition can be judged by shell script
Part is the most identical, and shows the character of correspondence over the display, and concrete shell script is as follows:
diff baseline.xls 1.txt
if[!$?-eq 0];then
echo"error">>status.txt
echo-e"\033[41;37;5m error\033[0m"
else
echo"OK">>status.txt
echo-e"\033[42;37;5m OK\033[0m"
fi
paste 1.txt status.txt>temp_in.txt
cat temp_in.txt>1.txt
By above-mentioned shell script, when 1.txt file is identical with baseline.xls file, white with the red end
Word flickering display ERROR character;When 1.txt file is different from baseline.xls file, white with the green end
Word flickering display OK character.
Step 209: standard state file and current state file are stored default test result file
In, and terminate current process.
In an embodiment of the invention, one is formed after each hard disk is inserted into by the way of hot plug
Current state file, by each current state file formed and the wound in advance of standard state file storage
In the test result file built.
Such as, baseline.xls file and each 1.txt file generated all are stored and be pre-created
Test result file plug.log in.
In embodiments of the present invention, the process stored baseline.xls file and 1.txt file can
To be realized by shell script, concrete shell script is as follows:
echo"Below is the data when$DEV_name_in is pluged out&in for one
cycle!">>plug.log
date>>plug.log
cat 1.txt>>plug.log
}
By above-mentioned shell script, the current state file 1.txt every time formed stored test result literary composition
In part plug.log.
Step 210: obtain and be pulled out the drive of hard disk and this hard disk is pulled out by hot plug mode
Total degree, and send include the drive of this hard disk and be pulled out the notification message of total degree.
In an embodiment of the invention, after detecting that hard disk is pulled out by the way of hot plug,
Obtain and be pulled out the drive of hard disk, and obtain this hard disk is circulated hot plug operations and be pulled out total
Number of times, by the drive of this hard disk got and be pulled out total degree and be sent to clothes with the form of notification message
On the display of business device, the drive showing this hard disk in the realization of server and the total degree being pulled out.
Such as, after detecting that hard disk 2 is pulled out by the way of hot plug, obtain the drive of hard disk 2
B, and start to current time, from test, the total degree Y that hard disk 2 is pulled out by hot plug mode,
Drive B and total degree Y is shown on the display of server.
In embodiments of the present invention, obtain and show be pulled out the drive of hard disk and be pulled out total degree permissible
Being realized by shell script, concrete shell script is as follows:
function plug_out()
{
local i;
Out=$ (tail-n 3/var/log/messages | sed-n'{/removing/{g;p}};h'|awk'{print
$8}');
Length_out=$ (echo " $ Out " | awk'{print length ($ 0) } ');
I=$ (expr $ length_out-1);
DEV_name_out=$ (echo " $ Out " | cut-b 2-$ i);
echo-e"\033[44;37;5m$DEV_name_out\033[0m is pluged out";
Flag_plug=0;
}
By above-mentioned shell script, show on the display of server with blue end wrongly written or mispronounced character the form that flashes
The drive being currently pulled out;
DEV_name_out_temp_2=$ DEV_name_out_temp_1;
DEV_name_out_temp_1=$ DEV_name_out;
If [" $ DEV_name_out " x=" $ DEV_name_out_temp_2 " x];then
J=$ (expr $ j+1);
echo-e"This is\033[44;37;5m$j\033[0m times";
else
J=1;
echo-e"This is\033[44;37;5m$j\033[0m times""
fi
continue;
fi
By above-mentioned shell script, show on the display of server with blue end wrongly written or mispronounced character the form that flashes
The hard disk being currently pulled out be pulled out total degree.
In an embodiment of the invention, the method for testing hard disk hot plug stability can pass through script journey
Sequence realizes, and a kind of shell script that can test hard disk hot-plug stability, wherein # are given below
Content shown in rear is notes content:
#main
Flag_plug=1;# be used for auxiliary judgment hard disk into and out
J=0;
I=0;
DEV_name_out_temp_1=1;
DEV_name_out_temp_2=1;
DEV_name_in_temp_1=1;
DEV_name_in_temp_2=1;
# calls generate_baseline function and generates baseline.xls file
generate_baseline;
echo"Baseline is generated successfully!"
Whether # enters endless loop, continue to monitor and have hard disk to be pulled out or insert.
while:;
do
# explanation when the value having removing keyword flag_plug simultaneously is 1 has hard disk to be pulled out, and adjusts
Using plug_out function, then calculating this hard disk is which time of continuous print is pulled out.
Temp_out=$ (tail-n 1/var/log/messages | grep-i " removing ");
If [-n " $ Temp_out "] && [" $ flag_plug " x=1x];then
plug_out;
DEV_name_out_temp_2=$ DEV_name_out_temp_1;
DEV_name_out_temp_1=$ DEV_name_out;
If [" $ DEV_name_out " x=" $ DEV_name_out_temp_2 " x];then
J=$ (expr $ j+1);
echo-e"This is\033[44;37;5m$j\033[0m times";
else
J=1;
echo-e"This is\033[44;37;5m$j\033[0m times""
fi
continue;
fi
# explanation when the value having Attached SCSI disk keyword flag_plug simultaneously is 0 has hard disk quilt
Inserting, call plug_in function, then calculating this hard disk is which time of continuous print is inserted into.
Temp_in=$ (tail-n 1/var/log/messages | grep-i " Attached SCSI disk ");
If [-n " $ Temp_in "] && [" $ flag_plug " x=0x];then
plug_in;
DEV_name_in_temp_2=$ DEV_name_in_temp_1;
DEV_name_in_temp_1=$ DEV_name_in;
If [" $ DEV_name_in " x=" $ DEV_name_in_temp_2 " x];then
I=$ (expr $ i+1);
echo-e"This is\033[44;37;5m$i\033[0m times";
else
I=1;
echo-e"This is\033[44;37;5m$i\033[0m times";
fi
continue;
fi
done
Wherein, the function generate_baseline generating baseline.xls file is as follows:
function generate_baseline()
{
echo"Disk_name">base.txt
echo"Serial_Number">>base.txt
echo"Capacity">>base.txt
# each drive comparison as above one file of three generations.
fdisk-l|grep"Disk/dev/sd"|awk'{print$2|"cut-b8"}'|sort>/root/disk.txt
2>&1
for Dev_name in`cat/root/disk.txt`
do
echo"sd$Dev_name">$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"serial number"|awk'{print
$3}'>>$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"capacity"|awk'{print$3}'>>
$Dev_name.txt
done
# merges file generated baseline.xls.
echo
for Dev_name in`cat/root/disk.txt`
do
paste-d""base.txt$Dev_name.txt>temp_base.txt
cat temp_base.txt>base.txt
done
cat base.txt>>baseline.xls
}
Wherein, the function plug_out for the operation after having hard disk to be pulled out is as follows:
function plug_out()
{
local i;
According to keyword removing, # determines whether that hard disk is extracted, and identify the drive of the hard disk extracted,
Then print.
Out=$ (tail-n 3/var/log/messages | sed-n'{/removing/{g;p}};h'|awk'{print
$8}');
Length_out=$ (echo " $ Out " | awk'{print length ($ 0) } ');
I=$ (expr $ length_out-1);
DEV_name_out=$ (echo " $ Out " | cut-b 2-$ i);
The drive that wrongly written or mispronounced character flickering display at the bottom of # basket are currently pulled out
echo-e"\033[44;37;5m$DEV_name_out\033[0m is pluged out";
Flag_plug=0;
}
Wherein, the function plug_in for the operation after having hard disk to insert is as follows:
function plug_in()
{
According to keyword Attached SCSI disk, # determines whether that hard disk inserts, and identify the hard of insertion
The drive of dish, then prints.
local i;
In=$ (tail-n 3/var/log/messages | grep-i " Attached SCSI disk " | awk'{print
$8}');
Length_in=$ (echo " $ In " | awk'{print length ($ 0) } ');
I=$ (expr $ length_in-1);
DEV_name_in=$ (echo " $ In " | cut-b 2-$ i);
The drive that wrongly written or mispronounced character flickering display at the bottom of # basket are currently pulled out
echo-e"\033[44;37;5m$DEV_name_in\033[0m is pluged in";
Flag_plug=1;
# gauge outfit
echo"Disk_name">1.txt
echo"Serial_Number">>1.txt
echo"Capacity">>1.txt
# each drive comparison as above one file of three generations
fdisk-l|grep"Disk/dev/sd"|awk'{print$2|"cut-b8"}'|sort>/root/disk.txt
2>&1
for Dev_name in`cat/root/disk.txt`
do
echo"sd$Dev_name">$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"serial number"|awk'{print
$3}'>>$Dev_name.txt
smartctl-a/dev/sd$Dev_name|grep-i"capacity"|awk'{print$3}'>>
$Dev_name.txt
done
# merges file.
echo
for Dev_name in`cat/root/disk.txt`
do
paste-d""1.txt$Dev_name.txt>temp_in.txt
cat temp_in.txt>1.txt
done
# judges newly-generated file with baseline.xls the most unanimously, if just exporting OK, the most defeated
Go out ERROR.
diff baseline.xls 1.txt
if[!$?-eq 0];then
echo"error">>status.txt
# red end wrongly written or mispronounced character, flickering display ERROR character.
echo-e"\033[41;37;5m error\033[0m"
else
echo"OK">>status.txt
# green end wrongly written or mispronounced character, flickering display OK character.
echo-e"\033[42;37;5m OK\033[0m"
fi
paste 1.txt status.txt>temp_in.txt
cat temp_in.txt>1.txt
The last all of information of # is aggregated in plug.log file.
echo"Below is the data when$DEV_name_in is pluged out&in for one
cycle!">>plug.log
date>>plug.log
cat 1.txt>>plug.log
}
As shown in Figure 3, Figure 4, a kind of testing hard disk hot plug stability is embodiments provided
Device.Device embodiment can be realized by software, it is also possible to by hardware or the side of software and hardware combining
Formula realizes.For hardware view, as it is shown on figure 3, the testing hard disk heat provided for the embodiment of the present invention
A kind of hardware structure diagram of device place equipment of plug stability, except the processor shown in Fig. 3, interior
Deposit, outside network interface and nonvolatile memory, in embodiment, the equipment at device place is generally also
Other hardware can be included, such as the forwarding chip etc. of responsible process message.As a example by implemented in software, as
Shown in Fig. 4, as the device on a logical meaning, it is that the CPU by its place equipment is by non-volatile
Property memory in corresponding computer program instructions read internal memory runs and formed.The present embodiment provides
The device of testing hard disk hot plug stability, including: the first acquiring unit 401, detector unit 402,
Second acquisition unit 403, judging unit 404 and performance element 405;
First acquiring unit 401, for obtaining the drive of each hard disk, sequence number and capacity respectively, and
Drive, sequence number and capacity according to each hard disk, formed include the drive of each hard disk and sequence number and
The standard state file of capacity corresponding relation;
Detector unit 402, is used for detecting at least two hard disk whether there is at least one hard disk by heat
The mode of plug is inserted into;
Second acquisition unit 403, for the testing result according to detector unit 402, if it is, respectively
Obtain the drive of each hard disk, sequence number and capacity, and according to drive, sequence number and the appearance of each hard disk
Amount, forms the drive including each hard disk and sequence number and the current state file of capacity corresponding relation;
Judging unit 404, for judging the current state file and first that second acquisition unit 403 is formed
The standard state file that acquiring unit 401 is formed is the most identical;
Performance element 405, for the judged result according to judging unit 404, if it is, send service
There is not the notification message that hard disk is out of order in device, otherwise sends the notification message that server generation hard disk is out of order.
In an embodiment of the invention, detector unit 402, it is further used for being directed to each and is inserted
The hard disk entered, obtains the drive of this hard disk and starts to current time this hard disk by heat from detection
The total degree that is inserted into of mode of plug, and send and include the drive of this hard disk and be inserted into total degree
Notification message.
In an embodiment of the invention, detector unit 402, it is further used for detecting in real time at least two
Whether hard disk exists at least one hard disk be pulled out by the way of hot plug, if it is, be directed to every
One hard disk being pulled out, obtains the drive of this hard disk and to start to current time this from detection hard
The total degree that dish is pulled out by the way of hot plug, and send include the drive of this hard disk and be pulled out
The notification message of total degree.
In an embodiment of the invention, whether detector unit 402, detect server system in real time
The first keyword preset occurs, if it is, judge to there is at least one hard disk by the way of hot plug
Being inserted into, otherwise judge do not have hard disk to be inserted into by the way of hot plug, wherein the first keyword includes
It is inserted among the information that rear system produces by hot plug mode in hard disk.
In an embodiment of the invention, whether detector unit 402, detect server system in real time
The second keyword preset occurs, if it is, judge to there is at least one hard disk by the way of hot plug
Being pulled out, otherwise judge do not have hard disk to be pulled out by the way of hot plug, wherein the second keyword includes
It is pulled out among the information that rear system produces by hot plug mode in hard disk.
In an embodiment of the invention, as it is shown in figure 5, this device farther includes: memory cell 406;
Memory cell 406, for the standard state file and second the first acquiring unit 401 formed
Each current state file that acquiring unit 403 is formed stores in default test result file.
The contents such as the information between each unit in said apparatus is mutual, execution process, due to the present invention
Embodiment of the method is based on same design, and particular content can be found in the narration in the inventive method embodiment, this
Place repeats no more.
Each embodiment that the present invention provides, at least has the advantages that
1, in the embodiment of the present invention, obtain the drive of each hard disk, sequence number and capacity, formed and include respectively
The drive of individual hard disk and sequence number and the standard state file of capacity corresponding relation, insert hard disk carries out heat
Pull out in operating process, detect whether that hard disk is inserted into by the way of hot plug in real time, each time hard disk
It is inserted into and all obtains once the drive of each hard disk, sequence number and capacity, according to each hard disk got
Drive, sequence number and capacity form the drive including each hard disk and sequence number and capacity corresponding relation
Current state file, compares current state file with standard state file, if current state is civilian
Part is identical with standard state file, illustrates that this hard disk inserts and does not cause hard disk out of order, sends server
There is not the notification message that hard disk is out of order, if current state file is different from standard state file, explanation
It is out of order that this hard disk insertion causes hard disk, sends the notification message that server generation hard disk is out of order.So,
Just may determine that according to notification message whether hot plug each time occurs hard disk out of order, it is not necessary in heat each time
The mode manually contrasting hard disk serial number after plug hard disk judges whether to occur hard disk out of order, reduces every
Time needed for one test loop, thus improve the efficiency that hard disk hot-plug stability is tested.
2, in the embodiment of the present invention, obtain and be inserted into the drive of hard disk and that this hard disk is inserted into continuously is total
Number of times, by drive and be inserted into total degree and show user, user to pass through by modes such as display show
The content that display shows may determine that hard disk has carried out the number of times of hot plug test, may thereby determine that
The number of times testing hard disk stability has reached the number of times of requirement, it is to avoid pass through manual record
The situation such as the labour intensity that testing time causes is big and data are inaccurate, reduces the work of tester
Intensity.
3, in the embodiment of the present invention, in addition to obtaining the drive being inserted into hard disk and being inserted into total degree, also
Can obtain and be pulled out the drive of hard disk and total degree that this hard disk is pulled out continuously, real by display
Now etc. approach shows user, and user, can be true according to the drive being pulled out hard disk of display on display
Protect the hard-disk interface that again same hard disk is turned back to correspondence, when preventing from existing multiple hard disk, insertion occurs
Hard disk and the hard disk pulled up are not that the situation of same hard disk occurs, play foolproof function, thus realize same
One hard disk carries out Continuous Heat plug, improves the accuracy testing hard disk hot-plug stability.
4, in the embodiment of the present invention, standard state file and each current state file store the most at last
In the test result file being pre-created, can be hard by hard disk hot-plug stability being carried out in test process
The status information of dish preserves, and facilitates the later stage to check test process, it is possible to according to test knot
Really file judges that hard disk hot-plug stability is the most qualified.
It should be noted that in this article, the relational terms of such as first and second etc be used merely to by
One entity or operation separate with another entity or operating space, and not necessarily require or imply this
Relation or the order of any this reality is there is between a little entities or operation.And, term " includes ",
" comprise " or its any other variant is intended to comprising of nonexcludability, so that include that one is
The process of row key element, method, article or equipment not only include those key elements, but also include the brightest
Other key elements really listed, or also include intrinsic for this process, method, article or equipment
Key element.In the case of there is no more restriction, statement " include one " and limit
Key element, it is not excluded that there is also another in including the process of described key element, method, article or equipment
Outer identical factor.
One of ordinary skill in the art will appreciate that: realize all or part of step of said method embodiment
Can be completed by the hardware that programmed instruction is relevant, aforesaid program can be stored in embodied on computer readable
Storage medium in, this program upon execution, performs to include the step of said method embodiment;And it is aforementioned
Storage medium include: various Jie that can store program code such as ROM, RAM, magnetic disc or CD
In matter.
Last it should be understood that the foregoing is only presently preferred embodiments of the present invention, it is merely to illustrate this
The technical scheme of invention, is not intended to limit protection scope of the present invention.All spirit in the present invention and former
Any modification, equivalent substitution and improvement etc. done within then, are all contained in protection scope of the present invention.
Claims (10)
1. the method for a testing hard disk hot plug stability, it is characterised in that be applied to have at least two
The server of individual hard disk, including:
Obtain the drive of each described hard disk, sequence number and capacity respectively;
According to the drive of hard disk, sequence number and capacity each described, form the dish including each described hard disk
Symbol and sequence number and the standard state file of capacity corresponding relation;
Detect in described at least two hard disk whether there is at least one hard disk by the way of hot plug in real time
It is inserted into;
If it is, obtain the described drive of each hard disk, sequence number and capacity respectively, and according to each institute
State the drive of hard disk, sequence number and capacity, form the drive including each described hard disk and sequence number and appearance
The current state file of amount corresponding relation;
Judge that described current state file is the most identical with described standard state file;
If it is, send described server the out of order notification message of hard disk does not occurs, otherwise send described clothes
The notification message that business device generation hard disk is out of order.
Method the most according to claim 1, it is characterised in that
In described real-time detection described at least two hard disk, whether there is at least one hard disk pass through hot plug
Mode be inserted into and farther include afterwards:
It is directed to each hard disk being inserted into, obtains the drive of this hard disk and start to currently from detection
The total degree that till time, this hard disk is inserted into by the way of hot plug, and send the dish including this hard disk
Accord with and be inserted into the notification message of total degree.
Method the most according to claim 1, it is characterised in that farther include:
Detect in described at least two hard disk whether there is at least one hard disk by the way of hot plug in real time
It is pulled out, if it is, be directed to each hard disk being pulled out, obtains the drive of this hard disk and from inspection
Survey and start to current time the total degree that this hard disk is pulled out by the way of hot plug, and send bag
Include the drive of this hard disk and be pulled out the notification message of total degree.
Method the most according to claim 3, it is characterised in that
Whether described real-time detection described at least two hard disk exists at least one hard disk by hot plug
Mode is inserted into and includes:
Detect the first keyword whether described server system occurs presetting in real time, if it is, judge to deposit
It is inserted into by the way of hot plug at least one hard disk, otherwise judges do not have hard disk to pass through hot plug
Mode is inserted into, and wherein said first keyword is included in hard disk and is inserted into rear system by hot plug mode
Among the information produced;
And/or,
Whether described real-time detection described at least two hard disk exists at least one hard disk by hot plug
Mode is pulled out and includes:
Detect the second keyword whether described server system occurs presetting in real time, if it is, judge to deposit
Store up at least one hard disk to be pulled out by the way of hot plug, otherwise judge do not have hard disk to pass through hot plug
Mode is pulled out, ask described in the second keyword be included in hard disk and be pulled out rear system by hot plug mode
Among the information produced.
5. according to described method arbitrary in Claims 1-4, it is characterised in that farther include:
Described standard state file and each described current state file are stored default test result
In file.
6. the device of a testing hard disk hot plug stability, it is characterised in that be applied to have at least two
The server of individual hard disk, including: the first acquiring unit, detector unit, second acquisition unit, judgement list
Unit and performance element;
Described first acquiring unit, for obtaining the drive of each described hard disk, sequence number and capacity respectively,
And according to the drive of hard disk, sequence number and capacity each described, form the drive including each described hard disk
Standard state file with sequence number and capacity corresponding relation;
Whether described detector unit, exist at least one hard in described detection described at least two hard disk
Dish is inserted into by the way of hot plug;
Described second acquisition unit, for the testing result according to described detector unit, if it is, respectively
Obtain the described drive of each hard disk, sequence number and capacity, and according to the drive of hard disk, sequence each described
Row number and capacity, formed and include the current of the drive of each described hard disk and sequence number and capacity corresponding relation
Status file;
Described judging unit, for judging that current state file that described second acquisition unit formed is with described
The standard state file that first acquiring unit is formed is the most identical;
Described performance element, for the judged result according to described judging unit, if it is, send described
There is not the notification message that hard disk is out of order in server, otherwise sends out of order the leading to of described server generation hard disk
Know message.
Device the most according to claim 6, it is characterised in that
Described detector unit, is further used for being directed to each hard disk being inserted into, obtains this hard disk
Drive and start to current time that this hard disk is inserted into by the way of hot plug from detection total time
Count, and transmission includes the drive of this hard disk and is inserted into the notification message of total degree.
Device the most according to claim 6, it is characterised in that
Whether described detector unit, be further used for detecting in real time in described at least two hard disk and exist at least
One hard disk is pulled out by the way of hot plug, if it is, be directed to each hard disk being pulled out,
Obtain the drive of this hard disk and start to current time this hard disk by the way of hot plug from detection
The total degree being pulled out, and send include the drive of this hard disk and be pulled out the notification message of total degree.
Device the most according to claim 8, it is characterised in that
Described detector unit, detects the first key whether described server system occurs presetting in real time
Word, if it is, judge that there is at least one hard disk is inserted into by the way of hot plug, otherwise judges not
Having hard disk to be inserted into by the way of hot plug, wherein said first keyword is included in hard disk and is inserted by heat
The mode of pulling out is inserted among the information that rear system produces;
And/or,
Described detector unit, detects the second key whether described server system occurs presetting in real time
Word, if it is, judge that there is at least one hard disk is pulled out by the way of hot plug, otherwise judges not
Having hard disk to be pulled out by the way of hot plug, wherein said second keyword is included in hard disk and is inserted by heat
The mode of pulling out is pulled out among the information that rear system produces.
10. according to described device arbitrary in claim 6 to 9, it is characterised in that farther include:
Memory cell;
Described memory cell, for the standard state file and described described first acquiring unit formed
Each current state file that second acquisition unit is formed stores in default test result file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610318411.4A CN105843720A (en) | 2016-05-12 | 2016-05-12 | Method and device for testing hot-plug stability of hard disks |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610318411.4A CN105843720A (en) | 2016-05-12 | 2016-05-12 | Method and device for testing hot-plug stability of hard disks |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105843720A true CN105843720A (en) | 2016-08-10 |
Family
ID=56591887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610318411.4A Pending CN105843720A (en) | 2016-05-12 | 2016-05-12 | Method and device for testing hot-plug stability of hard disks |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105843720A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106502843A (en) * | 2016-10-09 | 2017-03-15 | 郑州云海信息技术有限公司 | A kind of hard disk plug stability test method suitable for raid card |
CN106844119A (en) * | 2017-01-25 | 2017-06-13 | 郑州云海信息技术有限公司 | A kind of detection method of equipment, device and system |
CN107329914A (en) * | 2017-06-29 | 2017-11-07 | 郑州云海信息技术有限公司 | It is a kind of that the out of order method and device of hard disk is detected based on linux system |
CN107402855A (en) * | 2017-06-30 | 2017-11-28 | 郑州云海信息技术有限公司 | A kind of detection method of hard disk, device and server |
CN107423177A (en) * | 2017-06-30 | 2017-12-01 | 郑州云海信息技术有限公司 | The method of testing and device of a kind of SAS link |
CN107423184A (en) * | 2017-07-28 | 2017-12-01 | 郑州云海信息技术有限公司 | The method of automatic test server hard-disk interface speed when a kind of hot-swappable |
CN108304292A (en) * | 2018-01-17 | 2018-07-20 | 郑州云海信息技术有限公司 | A kind of method and system of nodal test hard disk disk sequence |
CN108733501A (en) * | 2017-04-14 | 2018-11-02 | 优估(上海)信息科技有限公司 | A kind of drive bearing calibration, device, equipment and computer readable storage medium |
CN109783031A (en) * | 2019-01-23 | 2019-05-21 | 郑州云海信息技术有限公司 | Drive and slot method of calibration, device, terminal and storage medium for RAID card |
CN109815074A (en) * | 2019-01-22 | 2019-05-28 | 郑州云海信息技术有限公司 | A kind of method and system checking hard disk sequence in disk plug test process |
CN110335637A (en) * | 2019-04-18 | 2019-10-15 | 深圳市德名利电子有限公司 | The method and apparatus and equipment that a kind of pair of storage equipment is tested |
CN112068998A (en) * | 2019-06-10 | 2020-12-11 | 山东华芯半导体有限公司 | Automatic solid state disk testing method based on USB (universal serial bus) flash disk PE (provider edge) system |
CN112463464A (en) * | 2019-09-06 | 2021-03-09 | 英业达科技有限公司 | Hard disk detection method and hard disk detection system |
TWI744692B (en) * | 2019-09-11 | 2021-11-01 | 英業達股份有限公司 | Hard disk examination method and system of the same |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201222244A (en) * | 2010-11-30 | 2012-06-01 | Askey Computer Corp | Device and method for examining USB port of test apparatus |
CN102521092A (en) * | 2011-12-31 | 2012-06-27 | 曙光信息产业股份有限公司 | Hard disk test method and device |
CN103198034A (en) * | 2013-02-26 | 2013-07-10 | 北京航空航天大学 | Hot-plug power management device based on CPCI (compact peripheral component interconnect) bus device board card |
CN104133749A (en) * | 2014-07-23 | 2014-11-05 | 浪潮电子信息产业股份有限公司 | Verification method for HDD detecting failure and HDD out-of-order defect of server |
CN104536860A (en) * | 2015-01-16 | 2015-04-22 | 浪潮电子信息产业股份有限公司 | Hard disk sequence marshalling method based on real-time JBOD monitoring mode |
CN105260274A (en) * | 2015-10-23 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Linux-based hard disk random hot plug stability detection method |
-
2016
- 2016-05-12 CN CN201610318411.4A patent/CN105843720A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201222244A (en) * | 2010-11-30 | 2012-06-01 | Askey Computer Corp | Device and method for examining USB port of test apparatus |
CN102521092A (en) * | 2011-12-31 | 2012-06-27 | 曙光信息产业股份有限公司 | Hard disk test method and device |
CN103198034A (en) * | 2013-02-26 | 2013-07-10 | 北京航空航天大学 | Hot-plug power management device based on CPCI (compact peripheral component interconnect) bus device board card |
CN104133749A (en) * | 2014-07-23 | 2014-11-05 | 浪潮电子信息产业股份有限公司 | Verification method for HDD detecting failure and HDD out-of-order defect of server |
CN104536860A (en) * | 2015-01-16 | 2015-04-22 | 浪潮电子信息产业股份有限公司 | Hard disk sequence marshalling method based on real-time JBOD monitoring mode |
CN105260274A (en) * | 2015-10-23 | 2016-01-20 | 浪潮电子信息产业股份有限公司 | Linux-based hard disk random hot plug stability detection method |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106502843A (en) * | 2016-10-09 | 2017-03-15 | 郑州云海信息技术有限公司 | A kind of hard disk plug stability test method suitable for raid card |
CN106844119A (en) * | 2017-01-25 | 2017-06-13 | 郑州云海信息技术有限公司 | A kind of detection method of equipment, device and system |
CN108733501A (en) * | 2017-04-14 | 2018-11-02 | 优估(上海)信息科技有限公司 | A kind of drive bearing calibration, device, equipment and computer readable storage medium |
CN107329914A (en) * | 2017-06-29 | 2017-11-07 | 郑州云海信息技术有限公司 | It is a kind of that the out of order method and device of hard disk is detected based on linux system |
CN107402855A (en) * | 2017-06-30 | 2017-11-28 | 郑州云海信息技术有限公司 | A kind of detection method of hard disk, device and server |
CN107423177A (en) * | 2017-06-30 | 2017-12-01 | 郑州云海信息技术有限公司 | The method of testing and device of a kind of SAS link |
CN107423184A (en) * | 2017-07-28 | 2017-12-01 | 郑州云海信息技术有限公司 | The method of automatic test server hard-disk interface speed when a kind of hot-swappable |
CN108304292A (en) * | 2018-01-17 | 2018-07-20 | 郑州云海信息技术有限公司 | A kind of method and system of nodal test hard disk disk sequence |
CN109815074A (en) * | 2019-01-22 | 2019-05-28 | 郑州云海信息技术有限公司 | A kind of method and system checking hard disk sequence in disk plug test process |
CN109783031A (en) * | 2019-01-23 | 2019-05-21 | 郑州云海信息技术有限公司 | Drive and slot method of calibration, device, terminal and storage medium for RAID card |
CN109783031B (en) * | 2019-01-23 | 2022-02-18 | 郑州云海信息技术有限公司 | Method, device, terminal and storage medium for checking drive letter and slot number of RAID card |
CN110335637A (en) * | 2019-04-18 | 2019-10-15 | 深圳市德名利电子有限公司 | The method and apparatus and equipment that a kind of pair of storage equipment is tested |
CN112068998A (en) * | 2019-06-10 | 2020-12-11 | 山东华芯半导体有限公司 | Automatic solid state disk testing method based on USB (universal serial bus) flash disk PE (provider edge) system |
CN112463464A (en) * | 2019-09-06 | 2021-03-09 | 英业达科技有限公司 | Hard disk detection method and hard disk detection system |
TWI744692B (en) * | 2019-09-11 | 2021-11-01 | 英業達股份有限公司 | Hard disk examination method and system of the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105843720A (en) | Method and device for testing hot-plug stability of hard disks | |
AU2008264197B2 (en) | Image selection method | |
CN109491990A (en) | A kind of method of detection data quality and the device of detection data quality | |
CN109376592A (en) | Biopsy method, device and computer readable storage medium | |
CN105446864B (en) | Method and device for verifying influence of deletion of cache file and mobile terminal | |
CN106469350A (en) | The generation method of inspection task, system server | |
CN112035376B (en) | Method, device, equipment and storage medium for generating coverage rate report | |
CN107391333A (en) | A kind of OSD disk failures method of testing and system | |
CN105893230A (en) | Method and device for detecting IOPS performance of hard disks | |
CN109345200A (en) | Automatic auditing method and device, computer readable storage medium based on high-volume report | |
CN106021084A (en) | Method and apparatus for testing server performance | |
CN106649020A (en) | Detecting method and device for storage case burn information | |
CN106021048A (en) | Out-of-order verification method and device of disk pack | |
CN112052160A (en) | Code case obtaining method and device, electronic equipment and medium | |
CN106407164A (en) | Data display method and device | |
CN107807869A (en) | A kind of test system and method for testing | |
CN108875317A (en) | Software clone detection method and device, detection device and storage medium | |
CN106528665B (en) | AOI equipment test file lookup method and system | |
CN108572895A (en) | Automatically the stability test method of software and hardware configuration is checked under a kind of Linux | |
CN106021047A (en) | Method and apparatus for processing hard disk test data | |
CN108287791A (en) | The detection method and storage medium of the texture resource configuration of virtual reality software | |
CN107608841A (en) | Hard disk test document generating method, device, equipment and readable storage medium storing program for executing | |
CN107145412A (en) | The detection method and detection means of a kind of disk state | |
CN106407836A (en) | Method and device for automatically detecting illegal data modification behavior | |
CN103914377B (en) | Interface test method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160810 |
|
RJ01 | Rejection of invention patent application after publication |