CN106383761A - Test method for supporting hot plugging of NVME hard disk in linux - Google Patents

Test method for supporting hot plugging of NVME hard disk in linux Download PDF

Info

Publication number
CN106383761A
CN106383761A CN201610893191.8A CN201610893191A CN106383761A CN 106383761 A CN106383761 A CN 106383761A CN 201610893191 A CN201610893191 A CN 201610893191A CN 106383761 A CN106383761 A CN 106383761A
Authority
CN
China
Prior art keywords
hard disk
nvme
nvme hard
power
hot
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
CN201610893191.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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201610893191.8A priority Critical patent/CN106383761A/en
Publication of CN106383761A publication Critical patent/CN106383761A/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/2273Test methods
    • 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/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested

Abstract

The invention discloses a test method for supporting hot plugging of an NVME hard disk in linux, and relates to a hard disk test technology. The hot plugging of NVME is supported by controlling power of the NVME hard disk through a command. The method mainly comprises the steps of 1) modifying a grub file of rhel7.0/6.6; 2) searching for the NVME hard disk; and 3) setting the power of the NVME hard disk to be 0, thereby realizing the hot plugging. According to the method, the hot-plugging replacement of the NVME hard disk is realized without influencing a running condition of a server; and the method is simple and easy, is convenient in operation, can replace the NVME hard disk which is damaged or full in storage, and improves the stability of the server.

Description

A kind of method of testing supporting NVME hard disk hot-swappable under Linu
Technical field
The present invention relates to hard disk test technology, specifically a kind of support that NVME hard disk is hot-swappable under linux Method of testing.
Background technology
With the continuous development of IT field technology, conventional informationization service and increasingly powerful cloud computing service are to service The performance requirement more and more higher of device.NVME hard disk presents as data medium, the entirety that its performance directly affects server.NVME Hard disk has the advantage that:1st, lower time delay:NVME has simplified method of calling, does not need to read register during execution order; 2nd, higher transmission performance:Enterprise-level PCIe SSD high-end at present, its queue depth may reach 128, even 256 Highest IOPS performance can have been given play to;And under NVMe standard, maximum queue depth is up to 64000;In addition the queue of NVMe Quantity also from the 1 of AHCI, improves 64000;3rd, lower power consumption control:Batch processing under Shell script and Windows/Dos Similar, it is placed in advance in in a file with all kinds of orders, a program file of convenient disposable execution, facilitate keeper to enter Row setting or management;It is more powerful than the batch processing under Windows, than the program efficiency with other programs editor Higher.
But during server runs, NVME hard disk corruptions often occur, or data storage is full, need more Change the phenomenon of NVME hard disk.NVME hard disk is different from common hard disk, does not support hot-swappable.The hot-swappable blue screen that can cause system Or restart, as server hardware supplier, need in product development to put into the property that great amount of cost removes development NVME hard disk Can test job.Accordingly, it would be desirable to design a kind of method, under the running status not affecting server, support carries out hot-swappable NVME hard disk test.
Content of the invention
The present invention is directed to demand and the weak point of current technology development, provides a kind of support NVME hard disk under linux Hot-swappable method of testing.
A kind of method of testing supporting NVME hard disk hot-swappable under linux of the present invention, solves above-mentioned technical problem Using technical scheme as follows:A kind of described method of testing supporting NVME hard disk hot-swappable under linux, by order control The power of NVME hard disk, to support that NVME's is hot-swappable, mainly comprises the steps:1)The grub literary composition of modification rhel7.0/6.6 Part, 2)Lookup NVME hard disk, 3)By the power of NVME hard disk is set to 0, to realize hot-swappable.
Preferably, described step 1)In the grub file of modification rhel7.0/6.6, under grub file respective guide menu The boot parameter of kernel at increase " pci=pcie_bus_perf ", modification finishes and preserving and exiting, and restarts OS.
Preferably, described step 2) search NVME hard disk, run order in linux system:cd /sys/bus/pci/ Slots, in execution ls, shows all of hard disk digital, by order:Cat n/power implementing result is 1, is expressed as NVME hard disk, n represents described hard disk digital.
Preferably, described step 3)By the power of NVME hard disk is set to 0, to realize hot-swappable, main process is such as Under:
1)echo 0 >/ sys/bus/pci/slots/n/power, the power making NVME hard disk is 0;
2)After upper bar order is finished and waits the 2-3 second, normally extract corresponding NVME hard disk;
3)Wait and again this hard disk being plugged for 10 seconds about, wait the power supply indicator on hard disk to light;
4)echo 1 >/ sys/bus/pci/slots/n/power, the power making NVME hard disk is 1;
5)Now, system has identified that the nvme disk of new insertion, and this disk normally can be read and write.
A kind of method of testing supporting that NVME hard disk is hot-swappable under linux of the present invention compared with prior art has Beneficial effect be:The present invention under the operation conditions not affecting server, can control the power of NVME hard disk by order To realize the support to NVME hard disk it is achieved that the hot-swappable replacing of NVME hard disk, and the method is simple, operation side Just, can change to damaging or storing full NVME hard disk, improve the stability of server.
Specific embodiment
For making the object, technical solutions and advantages of the present invention become more apparent, below in conjunction with specific embodiment, to this A kind of bright described method of testing supporting that NVME hard disk is hot-swappable under linux further describes.
Embodiment:
Described in the present embodiment, server is done with the automated testing method of AC switching on and shutting down, NVME hard disk is controlled by order Power, to support that NVME's is hot-swappable, mainly comprises the steps:1)The grub file of modification rhel7.0/6.6,2)Search NVME hard disk, 3)By the power of NVME hard disk is set to 0, to realize hot-swappable.
Described step 1)In the grub file of modification rhel7.0/6.6, rhel7.0:/boot/grub2/grub.cfg ; rhel 6.6:/boot/grub/grub.conf;The step for refer to, the kernel under grub file respective guide menu Boot parameter at increase " pci=pcie_bus_perf ", modification finishes and preserving and exiting, and restarts OS.RHEL, i.e. Red Hat The abbreviation of Enterprise Linux, is the linux system of Red Hat company.Rhel7.0/6.6 is a linux system version.
Described step 2) search NVME hard disk, it is primarily referred to as, run order in linux system:cd /sys/bus/pci/ Slots, in execution ls, shows all of hard disk digital (0 0-1 0-10 0-2 23,24,25,26 etc.), by order:cat N/power implementing result is 1, is expressed as NVME hard disk, and what n represented is exactly hard disk digital above.
Described step 3)By the power of NVME hard disk is set to 0, to realize hot-swappable, main process is as follows:
1)echo 0 > /sys/bus/pci/slots/n/power n:The NVME hard disk number that expression is above found, makes NVME hard The power of disk is 0;
2)After upper bar order is finished and waits the 2-3 second, you can normally extract corresponding NVME hard disk;
3)Wait and again this hard disk being plugged for 10 seconds about, wait the power supply indicator on hard disk to light;
4)echo 1 >It is 1 that/sys/bus/pci/slots/n/power makes the power of NVME hard disk;
5)Now, system has identified that the nvme disk of new insertion, and this disk normally can be read and write.
Above-mentioned specific embodiment is only the concrete case of the present invention, and the scope of patent protection of the present invention includes but is not limited to Above-mentioned specific embodiment, any person of an ordinary skill in the technical field that meet claims of the present invention and any The suitable change or replacement that it is done, all should fall into the scope of patent protection of the present invention.

Claims (4)

1. a kind of method of testing supporting that NVME hard disk is hot-swappable under linux is it is characterised in that control NVME by order The power of hard disk, to support that NVME's is hot-swappable, mainly comprises the steps:1)The grub file of modification rhel7.0/6.6,2) Lookup NVME hard disk, 3)By the power of NVME hard disk is set to 0, to realize hot-swappable.
2. according to claim 1 a kind of method of testing supporting that NVME hard disk is hot-swappable under linux it is characterised in that Described step 1)In the grub file of modification rhel7.0/6.6, the guiding of the kernel under grub file respective guide menu Increase " pci=pcie_bus_perf ", modification finishes and preserves and exit, and restarts OS at parameter.
3. according to claim 2 a kind of method of testing supporting that NVME hard disk is hot-swappable under linux it is characterised in that Described step 2) search NVME hard disk, run order in linux system:Cd/sys/bus/pci/slots, in execution ls, shows Show all of hard disk digital, by order:Cat n/power implementing result is 1, is expressed as NVME hard disk, and n represents described Hard disk digital.
4. according to claim 3 a kind of method of testing supporting that NVME hard disk is hot-swappable under linux it is characterised in that Described step 3)By the power of NVME hard disk is set to 0, to realize hot-swappable, main process is as follows:
1)echo 0 >/ sys/bus/pci/slots/n/power, the power making NVME hard disk is 0;
2)After upper bar order is finished and waits the 2-3 second, normally extract corresponding NVME hard disk;
3)Wait and again this hard disk being plugged for 10 seconds about, wait the power supply indicator on hard disk to light;
4)echo 1 >/ sys/bus/pci/slots/n/power, the power making NVME hard disk is 1;
5)The identified nvme disk to new insertion of system, normally can be read and write to this disk.
CN201610893191.8A 2016-10-13 2016-10-13 Test method for supporting hot plugging of NVME hard disk in linux Pending CN106383761A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610893191.8A CN106383761A (en) 2016-10-13 2016-10-13 Test method for supporting hot plugging of NVME hard disk in linux

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610893191.8A CN106383761A (en) 2016-10-13 2016-10-13 Test method for supporting hot plugging of NVME hard disk in linux

Publications (1)

Publication Number Publication Date
CN106383761A true CN106383761A (en) 2017-02-08

Family

ID=57936404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610893191.8A Pending CN106383761A (en) 2016-10-13 2016-10-13 Test method for supporting hot plugging of NVME hard disk in linux

Country Status (1)

Country Link
CN (1) CN106383761A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357700A (en) * 2017-07-11 2017-11-17 郑州云海信息技术有限公司 A kind of method and system of test NVME hard disk order stability

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017472A (en) * 2007-03-01 2007-08-15 华为技术有限公司 Hard disk hot swap system in multiple hard disks system and method
CN102346699A (en) * 2010-07-27 2012-02-08 英业达股份有限公司 Method for testing hard disks
CN105260274A (en) * 2015-10-23 2016-01-20 浪潮电子信息产业股份有限公司 Linux-based hard disk random hot plug stability detection method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017472A (en) * 2007-03-01 2007-08-15 华为技术有限公司 Hard disk hot swap system in multiple hard disks system and method
CN102346699A (en) * 2010-07-27 2012-02-08 英业达股份有限公司 Method for testing hard disks
CN105260274A (en) * 2015-10-23 2016-01-20 浪潮电子信息产业股份有限公司 Linux-based hard disk random hot plug stability detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ORACLE: "Oracle Sever X5-4 Service Manual", 《HTTPS://DOCS.ORACLE.COM/CD/E56388_01/HTML/E56396/INDEX.HTML》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357700A (en) * 2017-07-11 2017-11-17 郑州云海信息技术有限公司 A kind of method and system of test NVME hard disk order stability

Similar Documents

Publication Publication Date Title
US9778844B2 (en) Installation of operating system on host computer using virtual storage of BMC
CN102439565B (en) Method and device for starting recovery
US20160291958A1 (en) Methods of updating software components, computer systems and memory apparatus
CN103746833A (en) PXE-based RAID automatic configuration method and system
DE102012100378A1 (en) System and method for accelerated boot performance
US20140181811A1 (en) Hypervisor modification of advanced configuration and power interface (acpi) tables
CN101604246A (en) A kind of automatic batch refreshing method of general mainboard bios
CN103955405A (en) Application management method and device
CN104572387A (en) Method and device for debugging terminal in engineering mode
CN104572061A (en) UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Loongson server
CN104572161A (en) UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Loongson portable computer
EP3120241A1 (en) Selectively enabling platform-specific features
CN104731617A (en) Server starting device determining method
CN106598637B (en) Method for selective loading of components within a node
WO2017193964A1 (en) Component upgrade method, apparatus and system
CN105468390A (en) BOOT online upgrade apparatus and method
CN106095680A (en) A kind of out of order automated testing method of checking disk being applied to Linux
CN109086081B (en) Method, system and medium for instantly prompting in-place change of SATA (Serial advanced technology attachment) and NVMe (network video recorder) equipment
US20150082014A1 (en) Virtual Storage Devices Formed by Selected Partitions of a Physical Storage Device
CN205986931U (en) Switch based on NVMeSSD
CN103984572A (en) Method and equipment for realizing computer installation and operating system switch without CD driver
CN105607869B (en) A kind of quick formatting and the method using magnetic disk of virtual machine
CN105808440A (en) Application low memory test method, apparatus and system
CN106383761A (en) Test method for supporting hot plugging of NVME hard disk in linux
US20110202903A1 (en) Apparatus and method for debugging a shared library

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

RJ01 Rejection of invention patent application after publication