CN105302687A - Hard disk sequence detection method based on linux - Google Patents

Hard disk sequence detection method based on linux Download PDF

Info

Publication number
CN105302687A
CN105302687A CN201510906472.8A CN201510906472A CN105302687A CN 105302687 A CN105302687 A CN 105302687A CN 201510906472 A CN201510906472 A CN 201510906472A CN 105302687 A CN105302687 A CN 105302687A
Authority
CN
China
Prior art keywords
testing
disk
hard disk
linux
test
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
CN201510906472.8A
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 CN201510906472.8A priority Critical patent/CN105302687A/en
Publication of CN105302687A publication Critical patent/CN105302687A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a hard disk sequence detection method based on linux and belongs to the technical field of hard disk detection. The method is applicable to an LINUX testing platform, the testing platform is built according to requirements, testing scripts are copied to the testing platform and started for automatic testing, an operation system is detected, a system disk is detected and partitioned, magnetic disk partitions are obtained, a detection disk sequence script is called to be compared with initial magnetic disk SN to process a log, and a script processing log is output. By means of the method, the magnetic disk sequencing disorder situation occurring during pressure restart of a server can be detected, and hard disk stability testing work under the condition that the server is continuously restarted is completed through automatic testing. Besides, the testing method is easy to operate, manpower and material resources can be greatly reduced, manual detection operation and intervention time can be greatly shortened, testing means are enriched, and testing efficiency is improved. Moreover, testing can be flexibly carried out according to testing requirements, and time cost is greatly reduced.

Description

A kind of based on the hard disk dish sequence detection method under linux
Technical field
The present invention discloses a kind of based on the hard disk dish sequence detection method under linux, belongs to hard disk detection technique field.
Background technology
Hard disk is one of main storage medium of computer, and hard disk has solid state hard disc, mechanical hard disk, hybrid hard disk.Solid state hard disc adopts flash memory particle to store, and mechanical hard disk adopts magnetic video disc to store, and hybrid hard disk is a kind of hard disk that magnetic hard-disk and flash memory are integrated together.Most hard disk is all Fixed disk, is fixed in hard disk drive by permanently sealing.
Along with the arrival of cloud computing service, the development that IT industry is swift and violent, service provider to become increasingly complex variation for the process of data.Contradiction between the Exponential growth of data volume also will cause and calculate and store, googol is according under processing pressure, and the work that can hard disk stable directly has influence on server to work efficiency.As provider server, must accomplish that the stable of hard disk should have reliable guarantee, and in hard disk Detection of Stability, it is very important for detecting for dish sequence, does not also have clear and definite method to detect it at present.
The invention discloses a kind of based on the hard disk dish sequence detection method under linux, utilize and build linux test environment; Detect judgement system, detection system dish subregion, all disk partition of acquisition pressurize, obtain all disks, perform and restart and call detection dish sequence script, finally automatically process log; Whether the SN utilizing the present invention that node can be checked to pressurize to restart rear hard disk is normal, and whether the stability can analyzing hard disk has problems, can the error information of analyzing and processing hard disk.
Summary of the invention
The present invention is directed in prior art the problem not having clear and definite method to detect hard disk dish sequence, a kind of Based PC IE bus is provided to realize the multiplexing method of link many points, whether the SN that rear hard disk is restarted in the pressurization of inspection node is normal, whether the stability can analyzing hard disk has problems, can the error information of analyzing and processing hard disk.
The concrete scheme that the present invention proposes is:
A kind of based on the hard disk dish sequence detection method under linux, build test platform according to demand, copy test script to test platform, start test script and automatically start test, detect operating system, detection system dish subregion, obtain disk partition, call detection dish sequence script and initial disks SN to contrast and process log, the daily record of output pin present treatment.
Detect operating system, detection system dish, the disk that cycling is all, differentiate system disk, and give disk partition.
Startup file according to using in test script test judges the difference that different (SuSE) Linux OS files is different.
Different operating system performs reboot order under corresponding Linux.
Described different operating system is Ubuntu or SUSE or redhat.
Usefulness of the present invention is:
The invention provides a kind of based on the hard disk dish sequence detection method under linux, be applicable to LINUX test platform, build test platform according to demand, copy test script to test platform, start test script and automatically start test, detect operating system, detection system dish subregion, obtain disk partition, call detection dish sequence script and initial disks SN and contrast and process log, the daily record of output pin present treatment; Disk sort disorder appears in server situation when pressure is restarted can be detected, automatic test completes the hard disk stability test work of constantly restarting under server conditions, and this method of testing is simple to operate, manpower and materials can be greatly reduced, and the time of manual detection operation and intervention, enrich means of testing, improve testing efficiency, and can test according to test needs flexibly, greatly save time cost.
Accompanying drawing explanation
Fig. 1 the inventive method schematic flow sheet.
Embodiment
A kind of based on the hard disk dish sequence detection method under linux, build test platform according to demand, copy test script to test platform, start test script and automatically start test, detect operating system, detection system dish subregion, obtain disk partition, call detection dish sequence script and initial disks SN to contrast and process log, the daily record of output pin present treatment.
According to said method, the present invention will be further described by reference to the accompanying drawings.
A kind of based on the hard disk dish sequence detection method under linux, build test platform according to demand, copy test script to test platform, start test script and automatically start test, detect operating system, detection system dish subregion, obtain disk partition, call detection dish sequence script and initial disks SN to contrast and process log, the daily record of output pin present treatment;
When wherein detecting operating system, main test script code is as follows:
# detects operating system
functioncheckrc()
{
if[!-d/home/rebootfiles/]
then
mkdir/home/rebootfiles/
fi
if[!-f/home/rebootfiles/rc.local.tmp]
then
#sysname=`uname-a|awk'{print$2}'`
if[$SYS=="Ubuntu"]
then
cp/etc/rc.local/home/rebootfiles/rc.local.tmp
#echo"thesysis$SYSName"
elif[$SYS=="SUSE"]
then
echo"Thesystemis$SYSName"
elif[-f/etc/rc.d/rc.local]
then
#echo"Thesystemis$SYSName"
……
}
Startup file according to using in test script test judges the difference that different (SuSE) Linux OS files is different;
Detection system dish, and give disk partition, main test script code is as follows:
functionpartedisk()
{
……
foriin$DEV_NAME_ALL
do
echo"Scaningthedisk$i"
#echo"TheSYSDiskis$SYSDisk"
if["$i"="$SYSDisk"]
then
#sysdiskparted
ENDsize=`parted$SYSDisk--scriptprint|grep"Disk/dev/sd"|awk'{print$3}'`
partedline=`parted$SYSDisk--scriptprint|awk'{deadline++}END{deadline=deadline-1;printdeadline}'`
echo$partedline
STARTsize=`parted$SYSDisk--scriptprint|sed-n"$partedline,1p"|awk'{print$3}'`
if[$ENDsize!=$STARTsize]
then
parted$SYSDisk--scriptmkpartprimary$STARTsize$ENDsize
fi
echo"ThesysDiskidelendsize$ENDsize"
echo"ThesysDiskidelstartsize$STARTsize"
echo"">/home/rebootfiles/ddisk.txt
else
#echo$i>>/home/rebootfiles/ddisk.txt
#Nosysdiskwillbesettogpt
parted$i--scriptmklabelgpt
parted$i--scriptmkpartprimary0100%
parted$i--scriptprint
fi
done
The disk that cycling is all, differentiates system disk, and gives disk partition, and main test script code is as follows:
# disk pressurizes
functionauto_dd()
{
partedisk
Rebootstart
echo'bashRebootDIR/reboot.shstop
bashRebootDIR/reboot.shyesdd
'>/home/rebootfiles/powercycle.sh
}
functionfdisk_dd()
{……}
Different operating system performs reboot order under corresponding Linux:
The operating system that # is different performs corresponding reboot method
functionSuseReboot()
{
……
functionUbuntuReboot(){……}
functionNormalReboot()
{
cp-f/home/rebootfiles/rc.local.tmp/home/rebootfiles/rc.local.tmp1
cp/root/sort.sh/home/rebootfiles/
echo"sh/home/rebootfiles/sort.sh&">>/home/rebootfiles/rc.local.tmp1
echo"sh/home/rebootfiles/powercycle.sh&">>
/home/rebootfiles/rc.local.tmp1
cp-f/home/rebootfiles/rc.local.tmp1/etc/rc.d/rc.local
}
Mainly in starting up's item, add command script, introduce the sort.sh script of detection dish sequence, in function f unctionReboot (), be written with reboot number, reach the execution that number of times can stop this test.
After testing is complete, execution journal screening script sel.sh, export corresponding log, test completes finally.
This test is applicable to Linux test platform, disk sort disorder appears in server situation when pressure is restarted can be detected, automatic test completes the hard disk stability test work of constantly restarting under server conditions, and this method of testing is simple to operate, can manpower and materials be greatly reduced, and the time of manual detection operation and intervention, enrich means of testing, improve testing efficiency, and can test according to test needs flexibly, greatly save time cost.

Claims (5)

1. one kind based on the hard disk dish sequence detection method under linux, it is characterized in that building test platform according to demand, copy test script to test platform, start test script and automatically start test, detect operating system, detection system dish subregion, obtain disk partition, call detection dish sequence script and initial disks SN to contrast and process log, the daily record of output pin present treatment.
2. method according to claim 1, is characterized in that detecting operating system, detection system dish, the disk that cycling is all, differentiates system disk, and give disk partition.
3. method according to claim 1 and 2, is characterized in that the startup file according to using in test script test judges the difference that different (SuSE) Linux OS files is different.
4. method according to claim 3, is characterized in that different operating system performs reboot order under corresponding Linux.
5. method according to claim 4, is characterized in that described different operating system is Ubuntu or SUSE or redhat.
CN201510906472.8A 2015-12-10 2015-12-10 Hard disk sequence detection method based on linux Pending CN105302687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510906472.8A CN105302687A (en) 2015-12-10 2015-12-10 Hard disk sequence detection method based on linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510906472.8A CN105302687A (en) 2015-12-10 2015-12-10 Hard disk sequence detection method based on linux

Publications (1)

Publication Number Publication Date
CN105302687A true CN105302687A (en) 2016-02-03

Family

ID=55199978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510906472.8A Pending CN105302687A (en) 2015-12-10 2015-12-10 Hard disk sequence detection method based on linux

Country Status (1)

Country Link
CN (1) CN105302687A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021048A (en) * 2016-05-17 2016-10-12 浪潮电子信息产业股份有限公司 Out-of-order verification method and device of disk pack
CN106095633A (en) * 2016-06-23 2016-11-09 浪潮电子信息产业股份有限公司 A kind of whole machine cabinet stability test detects the method that disk is out of order or falls dish
CN106095680A (en) * 2016-06-12 2016-11-09 浪潮电子信息产业股份有限公司 A kind of out of order automated testing method of checking disk being applied to Linux
CN106095634A (en) * 2016-06-21 2016-11-09 浪潮电子信息产业股份有限公司 A kind of out of order automated testing method of checking disk being applied to Windows
CN107273257A (en) * 2017-06-23 2017-10-20 郑州云海信息技术有限公司 A kind of automatic method for carrying out the out of order inspection of hard disk under linux system
CN107451043A (en) * 2017-08-17 2017-12-08 郑州云海信息技术有限公司 A kind of detection method and device of server stability
CN109032901A (en) * 2018-06-28 2018-12-18 郑州云海信息技术有限公司 A kind of monitoring method, device and the controlled terminal of the outer SSD of remote band
CN109815075A (en) * 2019-02-28 2019-05-28 苏州浪潮智能科技有限公司 A kind of detection method and device of GPGPU link speed
CN109815074A (en) * 2019-01-22 2019-05-28 郑州云海信息技术有限公司 A kind of method and system checking hard disk sequence in disk plug test process

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744759A (en) * 2013-12-27 2014-04-23 浪潮电子信息产业股份有限公司 Method for verifying unattended disk performance and stability under Linux system
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744759A (en) * 2013-12-27 2014-04-23 浪潮电子信息产业股份有限公司 Method for verifying unattended disk performance and stability under Linux system
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

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021048A (en) * 2016-05-17 2016-10-12 浪潮电子信息产业股份有限公司 Out-of-order verification method and device of disk pack
CN106095680A (en) * 2016-06-12 2016-11-09 浪潮电子信息产业股份有限公司 A kind of out of order automated testing method of checking disk being applied to Linux
CN106095634A (en) * 2016-06-21 2016-11-09 浪潮电子信息产业股份有限公司 A kind of out of order automated testing method of checking disk being applied to Windows
CN106095633A (en) * 2016-06-23 2016-11-09 浪潮电子信息产业股份有限公司 A kind of whole machine cabinet stability test detects the method that disk is out of order or falls dish
CN107273257A (en) * 2017-06-23 2017-10-20 郑州云海信息技术有限公司 A kind of automatic method for carrying out the out of order inspection of hard disk under linux system
CN107451043A (en) * 2017-08-17 2017-12-08 郑州云海信息技术有限公司 A kind of detection method and device of server stability
CN109032901A (en) * 2018-06-28 2018-12-18 郑州云海信息技术有限公司 A kind of monitoring method, device and the controlled terminal of the outer SSD of remote band
CN109815074A (en) * 2019-01-22 2019-05-28 郑州云海信息技术有限公司 A kind of method and system checking hard disk sequence in disk plug test process
CN109815075A (en) * 2019-02-28 2019-05-28 苏州浪潮智能科技有限公司 A kind of detection method and device of GPGPU link speed
CN109815075B (en) * 2019-02-28 2020-07-03 苏州浪潮智能科技有限公司 Method and device for detecting GPGPU (general purpose graphics processing unit) link speed

Similar Documents

Publication Publication Date Title
CN105302687A (en) Hard disk sequence detection method based on linux
CN106951345B (en) Consistency test method and device for disk data of virtual machine
US8607227B2 (en) Electronic device and method for burning firmware to embedded device
CN110750396B (en) Server operating system compatibility testing method and device and storage medium
CN104375910A (en) Automated startup and shutdown testing method
CN104536875A (en) Automatic server restart testing method based on IPMI
CN103744759A (en) Method for verifying unattended disk performance and stability under Linux system
US9542304B1 (en) Automated operating system installation
CN104317712A (en) Linux-based storage server fatigue testing method
CN104636217A (en) Root file system automatic backup and exception recovery method and partition structure
CN106598796A (en) Method for testing hardware information stability in reboot
CN103593269A (en) Automatic cyclic test method of restart pressure of multiple PCIe devices
CN105718346A (en) Computer mainboard PCIe slot function test method based on UEFI
CN105354122A (en) Function test optimization method of dual-use hard disk backplane of server
KR102545765B1 (en) Method and system for detecting memory errors
CN106095680A (en) A kind of out of order automated testing method of checking disk being applied to Linux
CN113553226B (en) Startup and shutdown testing method, device, testing system, electronic equipment and storage medium
CN108153635B (en) System memory edge testing method, system device and computer readable storage medium
CN111625407B (en) SSD performance test method and related components
CN112527568A (en) Data flow testing method and device, electronic equipment and storage medium
CN107357700A (en) A kind of method and system of test NVME hard disk order stability
CN110045971B (en) System upgrade recovery method and device
CN106649011A (en) Detection method and detection device for server equipment
CN106126487A (en) A kind of journal file method for splitting and device
CN106055445A (en) Method for automatically testing pressure of CPU

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: 20160203

RJ01 Rejection of invention patent application after publication