CN105760262A - Method for carrying out cross validation on stability of hard disk based on dc and reboot under linux - Google Patents

Method for carrying out cross validation on stability of hard disk based on dc and reboot under linux Download PDF

Info

Publication number
CN105760262A
CN105760262A CN201510856421.9A CN201510856421A CN105760262A CN 105760262 A CN105760262 A CN 105760262A CN 201510856421 A CN201510856421 A CN 201510856421A CN 105760262 A CN105760262 A CN 105760262A
Authority
CN
China
Prior art keywords
node
test
hard disk
reboot
total
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
Application number
CN201510856421.9A
Other languages
Chinese (zh)
Inventor
刘智刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201510856421.9A priority Critical patent/CN105760262A/en
Publication of CN105760262A publication Critical patent/CN105760262A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2284Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]

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 for carrying out cross validation on stability of a hard disk based on dc and reboot under linux, and relates to the technical field of computer servers. A specific realizing process of the method comprises the following step: 1, at least establishing two node linux testing environments; 2, using each node not only as a server side, but also as a client side, and changing the role of each node in turns during testing; 3, carrying out dc and reboot testing on nodes under a dd pressure state; 4, detecting a slot position, the capacity and the velocity of the hard disk after completing dc and reboot under dd pressure every time, and confirming whether the working state of the hard disk is normal or not. The support of resources such as additional control nodes and interchangers are not needed, the allocation of a testing resource is optimized, and testing contents are more enriched in minimized resource allocation.

Description

A kind of based on the method for dc and reboot cross validation hard disk stability under linux
Technical field
The present invention relates to computer server technical field, particularly relate to a kind of optimum resource distribution, hard disk carries out the hard disk Detection of Stability method of dc and reboot cross-beta under dd pressure.
Background technology
In the client of current each big manufacturer server and each big IT field, the stability of hard disk is the most important thing that everybody pays close attention to all the time, and the stable work of hard disk is also the most basic guarantee of the safety to customer data.
Conventional dc test needs one control node and be with outer transmission switching on and shutting down order to realize test machine by switch, test resource is had certain requirement, will be seemed trouble when only to 2 nodes or little node test time, in addition it is also necessary to extra coordination one controls node and a switch.Reboot test is then the reboot test that continuous print is under OS, and this continuous print reboot test is single, less meets practical application scene.
Summary of the invention
In order to solve above technical problem, this paper presents a kind of based on the method for dc and reboot cross validation hard disk stability under linux.The technical assignment of the present invention is that the one for traditional test methods is warm with improvement, and simulation is to the hard disk stability verification method of Client application scene further.The present invention 2 nodes of minimum needs can be carried out dc, reboot and dd stress test.Do not need extra additional resource demand, closing to reality application scenarios after test event mixing.
The technical scheme is that
A kind of based on the method for dc and reboot cross validation hard disk stability under linux:
One, 2 node linux test environments are built: according to the actual requirements, it is possible to select different types of hard disk, SATA, SAS or SSD;
Two, configuration systematic parameter: 2 test machine are installed operating system, it is possible to install RedHat, SUSE etc., it is proposed that install completely.
Three, test environment configuration: require that 2 nodes open ipmi service, chkconfigipmion.Then row performs serviceipmistart, initializes ipmi state;
Four, hard disk Detection of Stability: after preparation completes, by dc and reboot test that the node in dd pressure is hocketed, detects the slot position of hard disk, capacity, speed and smartctllog state every time after having tested;
Need powerstatus and Total_Power is judged at dc test phase, when test node having been performed be with outer poweroff order, need to go to obtain the powerstatus of node every 20s, when powerstatus is off, then to sending poweron order outside node band;If node powerstatus is on, controls node and will carry out dd stress test, after dd pressure surveys full 120s, perform reboot.
After test node completes OSinitialization after dc, dd stress test will be entered.And judge controlling node Total_Power, if within Total_Power value ± 5% that Total_Power value is when dd pressure time, node will be performed poweroff order.If Total_Power value is less than Total_Power value-5%, by sleep10, and then obtain Total_Power value and judge.
Each slot position detecting hard disk after being inducted into OS, capacity, speed and smartctllog state.Exception record is made mark, it is simple to the inspection after test.
The described step that realizes completes in being provided with the server of operating system of linux kernel, and during operation, user carries out with root identity logs.
The invention have the advantages that
One complete cycle of one dc and reboot cross validation test, this cross-beta closing to reality Client application scene.Dc under dd pressure is restarted analog hard disk and is tackled the stability test of electricity order under extremely when high speed operation state, the abnormal restarting test in normal operation of the reboot analog hard disk under dd pressure.
Accompanying drawing explanation
Fig. 1Be the present invention realize flow processFigure
Detailed description of the invention
Below present disclosure is carried out more detailed elaboration:
Test has been built, and system can normally detect the hard disc apparatus of node;Single-deck is detected by logical hard disk detection instrument, scan toolWhether passableProperly functioning;
1) test environment detection
Proceed to sign under OS by test machine, confirm that hard disk is current completely in place, check that hard disk state indicator lamp is all working properly;All hard disks correctly can be identified by OS, disk identifier of hard disk and hard disk SLOT one_to_one corresponding, and corresponding relation is correct;Chkconfigipmi list confirms that ipmi starts in system service.
2) test starts
According to different application scenarios, installing different operating system, the method supports the OS of RHEL, Centos, SUSE series;System is installed completely, after system installation, carries out test case as follows;
A, Node1, node2 is respectively provided with static BMCip address, writes into self-starting script at/etc/rc.local.
B, self-starting script 1 synopsis are as follows:
#/bin/bash
The current script of # is used for confirming that whether disk identifier of hard disk normal with hard disk corresponding relation after restarting every time
If [-f "/root/hdd.csv "] # judges whether that the hdd generating test records log
then
Fe=ok# normal recordings mark
else
Echo " count, sda, sdb, sdc, sdd, sde, sdf, sdg, sdh, sdi, sdj, sdk, sdl, status " > >/root/hddinfo.csv# initialize generate each drive to hdd record log
sleep1
fi
count=`cat/root/hddinfo.csv|wc-l`
foriin{a..l}
do
smartctl-i/dev/sd$i|grepSerial|awk'{print$3","}'>>/root/temp.txt
done
If [-f "/root/stander.txt "] # determines whether the correct node hard disk information record of standard
then
flag=ok
else
Cp/root/temp.txt/root/stander.txt# will be if it did not, file will be generated for standard with this
fi
The interim hard disk information that diff/root/temp.txt/root/stander.txt# produces every time and standard information compare
if[!$-eq0] # judges whether return value is 0
then
Sort=" error " # is non-zero is abnormal
else
Sort=" ok " # be 0 normal
fi
Echo " $ count, " `cat/root/temp.txt` $ sort > >/root/hddinfo.csv# is stored to each data in hddinfo.csv
Rm-rf/root/temp.txt# deletes temporary file
C, self-starting script 2 synopsis are as follows:
#!/bin/bash
Foriin{a..l}# is as the criterion with practical situation, and testing hard disk is 12 pieces herein
do
Echo " Disk/dev/sd $ i " > > root/HDD_INFO.log# print disk identifier of hard disk in log
Smartctl-i/dev/sd $ i | grep-E'SerialNumber | Capacity | Speed' > > root/cap_speed.log# obtains the string number of hard disk, capacity and speed information
done
Foriin{a..l}# is as the criterion with practical situation, and testing hard disk is 12 pieces herein
do
All of hard disk is carried out dd and reads test by ddif=/dev/sd $ iof=/dev/null&#
done
sleep30
Stand_power=`ipmitoolsdr | grepTotal_Power`# presses measurement of power to consume for standard power consumption with the dd of the machine
Stand_power_x=`echo $ stand_power*0.95 | bc`# power consumption-5%
Stand_power_y=`echo $ stand_power*1.05 | bc`# power consumption+5%
Stress_power=`ipmitool Ilanplus H192.168.1.2 Uadmin PadminTotal_Power`# is with outer initialization test node power consumption
[$ stress_power gt $ stand_power_x] && [$ stress_power lt $ stand_power_y] # judges that test node is whether in positive and negative 5% power consumption range to while
do
Stress_power=`ipmitool Ilanplus H192.168.1.2 Uadmin PadminTotal_Power`# band is outer regains up-to-date test node power consumption
The outer shutdown of ipmitool Ilanplus H192.168.1.2 Uadmin Padminpoweroff# band
Sleep20# adds time delay
The outer start of ipmitool Ilanplus H192.168.1.2 Uadmin Padminpoweron# band
done
Sleep60# adds time delay
After reboot# completes above action, control node is probably pressed and has been surveyed 120s, now restarts
D, entered in loop test from opening two test nodes of script by two above.
3) interpretation of result
Disk identifier of hard disk corresponding with slot log as follows:
By above it can be seen that start the hard disk SN that drive is corresponding every time, changing if there is hard disk drift or connection speed, then status will record error, very clear.
4) testing scheme assessment
The method of this cross validation is applicable to the hard disk compatibility test that a small amount of node carries out, and optimizes resource distribution, enriches test content, it is possible to make test machine repeating query test in different application scenarios, it is prevented that single test environment makes test machine produce inertia.It addition, this method is simple to operate, it is only necessary to test script is write start self-starting file/etc/rc.local, and test machine will be tested automatically, test can detect hard disk stability under multiple test condition mixes.

Claims (4)

1. one kind based on the method for dc and reboot cross validation hard disk stability under linux, it is characterised in that
The process of implementing is:
1) 2 node linux test environments, are built: according to the actual requirements, select different types of hard disk, SATA, SAS or SSD;
2), configuration systematic parameter: 2 test machine are installed operating system, installs RedHat, SUSE;
3), test environment configuration: require that 2 nodes open ipmi service, chkconfigipmion;Then row performs serviceipmistart, initializes ipmi state;
4), hard disk Detection of Stability: after preparation completes, by dc and reboot test that the node in dd pressure is hocketed, detect the slot position of hard disk, capacity, speed and smartctllog state after every time having tested.
2. method according to claim 1, it is characterised in that
Need powerstatus and Total_Power is judged at dc test phase, when test node having been performed be with outer poweroff order, need to go to obtain the powerstatus of node every 20s, when powerstatus is off, then to sending poweron order outside node band;If node powerstatus is on, controls node and will carry out dd stress test, after dd pressure surveys full 120s, perform reboot.
3. method according to claim 2, it is characterised in that
After test node completes OSinitialization after dc, dd stress test will be entered;And judge controlling node Total_Power, if within Total_Power value ± 5% that Total_Power value is when dd pressure time, node will be performed poweroff order;If Total_Power value is less than Total_Power value-5%, by sleep10, and then obtain Total_Power value and judge;
Each slot position detecting hard disk after being inducted into OS, capacity, speed and smartctllog state;Exception record is made mark, it is simple to the inspection after test.
4. method according to claim 3, it is characterised in that
The described step that realizes completes in being provided with the server of operating system of linux kernel, and during operation, user carries out with root identity logs.
CN201510856421.9A 2015-11-30 2015-11-30 Method for carrying out cross validation on stability of hard disk based on dc and reboot under linux Pending CN105760262A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510856421.9A CN105760262A (en) 2015-11-30 2015-11-30 Method for carrying out cross validation on stability of hard disk based on dc and reboot under linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510856421.9A CN105760262A (en) 2015-11-30 2015-11-30 Method for carrying out cross validation on stability of hard disk based on dc and reboot under linux

Publications (1)

Publication Number Publication Date
CN105760262A true CN105760262A (en) 2016-07-13

Family

ID=56341726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510856421.9A Pending CN105760262A (en) 2015-11-30 2015-11-30 Method for carrying out cross validation on stability of hard disk based on dc and reboot under linux

Country Status (1)

Country Link
CN (1) CN105760262A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201799A (en) * 2016-07-14 2016-12-07 浪潮电子信息产业股份有限公司 A kind of service based on ipmi carries out, to server, the method for testing that DC is restarted
CN106776256A (en) * 2016-12-21 2017-05-31 郑州云海信息技术有限公司 SAS Switch whole machine cabinet blend pressure automated testing methods
CN109783293A (en) * 2019-01-23 2019-05-21 郑州云海信息技术有限公司 A kind of alternating blend pressure test method based on AEP memory
CN112035301A (en) * 2020-08-19 2020-12-04 深圳市国鑫恒运信息安全有限公司 Shell-based automatic server testing method and system
CN112416670A (en) * 2020-11-12 2021-02-26 宁畅信息产业(北京)有限公司 Hard disk test method, device, server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133749A (en) * 2014-07-23 2014-11-05 浪潮电子信息产业股份有限公司 Verification method for HDD detecting failure and HDD out-of-order defect of server
CN104360919A (en) * 2014-10-24 2015-02-18 浪潮电子信息产业股份有限公司 Method for automatically testing performance, function and stability of SSD (solid state drive)
CN104536875A (en) * 2015-01-16 2015-04-22 浪潮电子信息产业股份有限公司 Automatic server restart testing method based on IPMI
CN104899119A (en) * 2015-05-21 2015-09-09 浪潮电子信息产业股份有限公司 Method for automatically detecting hard disk abnormality

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104133749A (en) * 2014-07-23 2014-11-05 浪潮电子信息产业股份有限公司 Verification method for HDD detecting failure and HDD out-of-order defect of server
CN104360919A (en) * 2014-10-24 2015-02-18 浪潮电子信息产业股份有限公司 Method for automatically testing performance, function and stability of SSD (solid state drive)
CN104536875A (en) * 2015-01-16 2015-04-22 浪潮电子信息产业股份有限公司 Automatic server restart testing method based on IPMI
CN104899119A (en) * 2015-05-21 2015-09-09 浪潮电子信息产业股份有限公司 Method for automatically detecting hard disk abnormality

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201799A (en) * 2016-07-14 2016-12-07 浪潮电子信息产业股份有限公司 A kind of service based on ipmi carries out, to server, the method for testing that DC is restarted
CN106776256A (en) * 2016-12-21 2017-05-31 郑州云海信息技术有限公司 SAS Switch whole machine cabinet blend pressure automated testing methods
CN109783293A (en) * 2019-01-23 2019-05-21 郑州云海信息技术有限公司 A kind of alternating blend pressure test method based on AEP memory
CN109783293B (en) * 2019-01-23 2022-02-18 郑州云海信息技术有限公司 AEP memory-based alternating mixed pressure testing method
CN112035301A (en) * 2020-08-19 2020-12-04 深圳市国鑫恒运信息安全有限公司 Shell-based automatic server testing method and system
CN112416670A (en) * 2020-11-12 2021-02-26 宁畅信息产业(北京)有限公司 Hard disk test method, device, server and storage medium
CN112416670B (en) * 2020-11-12 2024-02-09 宁畅信息产业(北京)有限公司 Hard disk testing method, device, server and storage medium

Similar Documents

Publication Publication Date Title
CN105760262A (en) Method for carrying out cross validation on stability of hard disk based on dc and reboot under linux
US8910172B2 (en) Application resource switchover systems and methods
JP6291248B2 (en) Firmware upgrade error detection and automatic rollback
US9652326B1 (en) Instance migration for rapid recovery from correlated failures
CN104536875A (en) Automatic server restart testing method based on IPMI
CN104317693A (en) Method for automatically testing hard disk performance fluctuation
US9021294B2 (en) Discovering boot order sequence of servers belonging to an application
US20090319653A1 (en) Server configuration management method
CN104133749A (en) Verification method for HDD detecting failure and HDD out-of-order defect of server
CN104216743B (en) Configurable virtual machine starts the method and system of completeness maintaining
US8347142B2 (en) Non-disruptive I/O adapter diagnostic testing
KR20100050380A (en) Automated firmware recovery
CN112769922B (en) Device and method for self-starting micro service cluster
US10102088B2 (en) Cluster system, server device, cluster system management method, and computer-readable recording medium
CN109491889A (en) The method and apparatus of automatic test in NFV
CN105354102B (en) A kind of method and apparatus of file system maintenance and reparation
CN109062623A (en) The setting method and device of hard disk lighting mode
CN111338881B (en) Automatic testing method and device for parallel reading and writing of NAS file system
CN106095680A (en) A kind of out of order automated testing method of checking disk being applied to Linux
CN106201812A (en) A kind of BMCSensor pressure monitor method of testing based on IPMI service
US20100251029A1 (en) Implementing self-optimizing ipl diagnostic mode
CN105653408A (en) Test method for carrying out POWER CYCLE startup and shutdown on the basis of BMC (Baseboard Management Controller) IPMITOOL (Intelligent Platform Management Interface) command single-node batch control
CN107357700A (en) A kind of method and system of test NVME hard disk order stability
CN108365987B (en) Management system and management method of multiple servers
US7979238B2 (en) System, method and computer program product for evaluating a test of an alternative system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160713