[go: up one dir, main page]

CN107766191A - The automatic detecting storage information of Linux systems and the method for testing of health status - Google Patents

The automatic detecting storage information of Linux systems and the method for testing of health status Download PDF

Info

Publication number
CN107766191A
CN107766191A CN201711072413.0A CN201711072413A CN107766191A CN 107766191 A CN107766191 A CN 107766191A CN 201711072413 A CN201711072413 A CN 201711072413A CN 107766191 A CN107766191 A CN 107766191A
Authority
CN
China
Prior art keywords
disk
raid
testing
health status
information
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
CN201711072413.0A
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 CN201711072413.0A priority Critical patent/CN107766191A/en
Publication of CN107766191A publication Critical patent/CN107766191A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

A kind of method of testing of automatic detecting storage information and health status based on linux system of the present application.By the detection instruction in hard disk hardware to the hardware of hard disk as magnetic head, disc, motor, circuit running situation be monitored, record and with manufacturer set by default safety value compared with, if the situation of monitoring by or beyond the safe range of default safety value, can is made from trend user by the monitoring hardware or software of main frame and alerts and carry out slight automatic reparation, to ensure the safety of hard disc data in advance.

Description

Linux系统的自动巡检存储信息及健康状态的测试方法Test method for automatic inspection storage information and health status of Linux system

技术领域technical field

本发明涉及硬盘测试领域,具体涉及一种基于Linux系统的自动巡检存储信息及健康状态的测试方法。The invention relates to the field of hard disk testing, in particular to a Linux system-based automatic inspection storage information and health state testing method.

背景技术Background technique

随着海量存储技术的需求,目前磁盘容量越来越大,通过存储卡或者其他硬件设备将一定容量的磁盘以一种特定的规则建立更大容量存储的技术不断发展,在对大数据的存储过程中,硬件磁盘的健康状态就成为另一个不可或缺的关注点。因此,每一块硬盘(包括IDE、SATA、SCSI)在运行的时候,将自身的若干参数记录下来,这些参数包括型号、容量、温度、密度、扇区、寻道时间、传输、误码率等,当硬盘运行了几千小时后,很多内在的物理参数都会发生变化某一参数超过报警阈值,则说明硬盘接近损坏,如果用户不理睬这个报警继续使用,那么硬盘将变得非常不可靠,随时可能故障导致数据丢失。With the demand for mass storage technology, the capacity of disks is getting larger and larger. The technology of using a certain capacity of disks with a specific rule to create larger capacity storage through memory cards or other hardware devices continues to develop. In the storage of big data During the process, the health status of the hardware disk becomes another indispensable concern. Therefore, when each hard disk (including IDE, SATA, SCSI) is running, it records several parameters of itself, these parameters include model, capacity, temperature, density, sector, seek time, transmission, bit error rate, etc. , when the hard disk has been running for thousands of hours, many internal physical parameters will change. If a parameter exceeds the alarm threshold, it means that the hard disk is close to damage. If the user ignores this alarm and continues to use it, the hard disk will become very unreliable. Possible malfunction resulting in data loss.

针对这种情况,本申请发明一种基于Linux系统的自动巡检存储信息及健康状态的测试方法。Aiming at this situation, the present application invents a testing method based on the Linux system to automatically check the stored information and the health status.

发明内容Contents of the invention

本发明是利用SMART及MegaCli工具实现一种硬盘状态自动检测与预警的测试方法。The invention utilizes SMART and MegaCli tools to realize a test method for automatic detection and early warning of hard disk status.

MegaCli是一款管理维护硬件RAID软件,可以通过它来了解当前raid卡的所有信息,包括raid卡的型号,raid的阵列类型,raid上各磁盘状态,等等。MegaCli可以做到巡检,一般通过MegaCli的Media Error Count:0 Other Error Count:0这两个数值来确定阵列中磁盘是否有问题;Medai Error Count表示磁盘可能错误,可能是磁盘有坏道,这个值不为0值得注意,数值越大,危险系数越高,Other Error Count表示磁盘可能存在松动,可能需要重新再插入。MegaCli可以对阵列中所有的磁盘进行检测从而通知管理人员。MegaCli is a management and maintenance hardware RAID software, through which you can know all the information of the current raid card, including the model of the raid card, the array type of the raid, the status of each disk on the raid, and so on. MegaCli can perform patrol inspection, and generally use MegaCli’s Media Error Count: 0 Other Error Count: 0 to determine whether there is a problem with the disk in the array; Medai Error Count indicates that the disk may be wrong, and the disk may have bad sectors. It is worth noting that the value is not 0. The larger the value, the higher the risk factor. Other Error Count indicates that the disk may be loose and may need to be reinserted. MegaCli can detect all disks in the array and notify administrators.

通过在硬盘硬件内的检测指令对硬盘的硬件如磁头、盘片、马达、电路的运行情况进行监控、记录并与厂商所设定的预设安全值进行比较,若监控情况将或已超出预设安全值的安全范围,就可以通过主机的监控硬件或软件自动向用户作出警告并进行轻微的自动修复,以提前保障硬盘数据的安全。Monitor and record the operating conditions of hard disk hardware such as magnetic heads, discs, motors, and circuits through detection instructions in the hard disk hardware, and compare them with the preset safety values set by the manufacturer. If the monitoring conditions will or have exceeded the expected If the safety range of the safety value is set, the monitoring hardware or software of the host computer can automatically warn the user and perform minor automatic repairs to ensure the safety of hard disk data in advance.

具体地,本申请请求保护一种基于Linux系统的自动巡检存储信息及健康状态的测试方法,其特征在于,该方法具体包括如下步骤:Specifically, the application requests protection of a test method based on Linux system to automatically inspect storage information and health status, which is characterized in that the method specifically includes the following steps:

自动安装MegaCli工具;Automatically install the MegaCli tool;

打印磁盘属性;print disk properties;

扫描并打印raid卡id信息;Scan and print raid card id information;

参考当前磁盘状态,如果有raid的信息打印raid状态,如果没有打印磁盘信息;Refer to the current disk status, if there is raid information, print the raid status, if not print the disk information;

查看所有物理磁盘设备FW;View all physical disk devices FW;

打印所有物理磁盘对应的slot号;Print the slot numbers corresponding to all physical disks;

查看磁盘是否支持并打开smart技术,打印FW、slot号、raid的dev属性、罗列FW版本;Check whether the disk supports and enable smart technology, print FW, slot number, dev attribute of raid, and list FW version;

在硬盘及操作系统都支持SMART技术并且开启的情况下,若硬盘状态不良,显示警告信息。When both the hard disk and the operating system support SMART technology and are turned on, if the hard disk is in bad condition, a warning message will be displayed.

如上所述的基于Linux系统的自动巡检存储信息及健康状态的测试方法,其特征还在于,磁盘信息包括型号、容量、温度、密度、扇区、寻道时间、传输、误码率。The method for testing storage information and health status based on the automatic inspection of the Linux system as described above is also characterized in that the disk information includes model, capacity, temperature, density, sector, seek time, transmission, bit error rate.

附图说明Description of drawings

图1、本发明所述的自动化测试流程图Fig. 1, the automated test flow chart of the present invention

具体实施方式Detailed ways

下面通过一个实施例对本发明所述的自动化测试具体实现步骤进行说明。The specific implementation steps of the automated testing described in the present invention will be described below through an embodiment.

本发明主要用于存储机或服务器上搭配raid卡,在Linux系统下的磁盘进行自动巡检相应信息及健康状态,其可以实现以下功能:The present invention is mainly used for matching raid cards on storage machines or servers, and automatically inspects corresponding information and health status of disks under the Linux system, which can realize the following functions:

1、打印磁盘属性;1. Print disk properties;

2、自动安装MegaCli工具;2. Automatically install the MegaCli tool;

3、扫描并打印raid卡id信息;3. Scan and print raid card id information;

4、参考当前磁盘状态,如果有raid的信息打印raid状态,如果没有打印磁盘信息;4. Refer to the current disk status, if there is raid information, print the raid status, if not print the disk information;

5、查看所有物理磁盘设备FW;5. View all physical disk devices FW;

6、打印所有物理磁盘对应的slot号;6. Print the slot numbers corresponding to all physical disks;

7、查看磁盘是否支持并打开smart技术,打印raid的dev属性、罗列FW版本;7. Check whether the disk supports and enable the smart technology, print the dev attribute of the raid, and list the FW version;

8、在硬盘及操作系统都支持SMART技术并且开启的情况下,若硬盘状态不良,SMART技术能够在屏幕上显示英文警告信息:“WARNING:IMMEDIATLY BACKUP YOUR DATAAND REPLACE YOUR HARD DISK DRIVE,A FAILURE MAY BE IMMINENT”。8. When both the hard disk and the operating system support SMART technology and are turned on, if the hard disk is in bad condition, SMART technology can display an English warning message on the screen: "WARNING: IMMEDIATLY BACKUP YOUR DATAAND REPLACE YOUR HARD DISK DRIVE, A FAILURE MAY BE IMMINENT".

附图1所示是本发明所述的自动化测试的流程图。Shown in accompanying drawing 1 is the flow chart of automated test described in the present invention.

1,准备测试环境1. Prepare the test environment

硬件要求:服务器或存储机一台/raid卡/磁盘;Hardware requirements: one server or storage machine/raid card/disk;

软件要求:MegaCli工具,Linux系统。Software requirements: MegaCli tool, Linux system.

2,搭建测试环境2. Build a test environment

在服务器或存储机上搭配raid卡及待测磁盘,进入Linux系统将MegaCli工具及该自动化脚本拷贝到桌面下,运行测试应用程序。Configure the raid card and the disk to be tested on the server or storage machine, enter the Linux system, copy the MegaCli tool and the automation script to the desktop, and run the test application.

应用程序部分内容如下:The application section reads as follows:

显而易见地,上面所示的仅仅是本发明的一个具体实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据上述实施例获得其他的技术方案,以及在本发明保护的范围内做出的等同变化均应落入本发明的保护范围内,都属于本发明保护的范围。Obviously, what is shown above is only a specific embodiment of the present invention, and for those skilled in the art, other technical solutions can also be obtained according to the above-mentioned embodiments without creative work, and in this All equivalent changes made within the protection scope of the invention shall fall within the protection scope of the present invention, and all belong to the protection scope of the present invention.

综上所述,本发明所述的自动化测试方法,实现简单,无需人工操作,真正实现快速自动化测试,极大地提高了研发测试、生产效率。In summary, the automated testing method of the present invention is simple to implement, does not require manual operation, and truly realizes rapid automated testing, greatly improving the efficiency of R&D testing and production.

Claims (2)

  1. A kind of 1. method of testing of automatic detecting storage information and health status based on linux system, it is characterised in that the party Method specifically comprises the following steps:
    Automatic installation MegaCli instruments;
    Print Disk Properties;
    Scan and print raid card id information;
    With reference to current Disk State, if raid information prints raid states, if not printing disc information;
    Check all physics disk unit FW;
    No. slot is printed corresponding to all physical disks;
    Check whether disk is supported and open smart technologies, printing FW, No. slot, raid dev attributes, enumerate FW versions;
    In the case where hard disk and operating system all support SMART technologies and open, if disk state is bad, warning letter is shown Breath.
  2. 2. the method for testing of the automatic detecting storage information based on linux system and health status as claimed in claim 1, its It is further characterized in that, disc information includes model, capacity, temperature, density, sector, tracking time, transmission, the bit error rate.
CN201711072413.0A 2017-11-03 2017-11-03 The automatic detecting storage information of Linux systems and the method for testing of health status Pending CN107766191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711072413.0A CN107766191A (en) 2017-11-03 2017-11-03 The automatic detecting storage information of Linux systems and the method for testing of health status

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711072413.0A CN107766191A (en) 2017-11-03 2017-11-03 The automatic detecting storage information of Linux systems and the method for testing of health status

Publications (1)

Publication Number Publication Date
CN107766191A true CN107766191A (en) 2018-03-06

Family

ID=61272113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711072413.0A Pending CN107766191A (en) 2017-11-03 2017-11-03 The automatic detecting storage information of Linux systems and the method for testing of health status

Country Status (1)

Country Link
CN (1) CN107766191A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647136A (en) * 2018-05-10 2018-10-12 南京道熵信息技术有限公司 Hard disk corruptions prediction technique and device based on SMART information and deep learning
CN110427528A (en) * 2019-07-31 2019-11-08 东莞记忆存储科技有限公司 SSD identifier test method, device, computer equipment and storage medium
CN114201327A (en) * 2021-12-06 2022-03-18 上海中通吉网络技术有限公司 Online disk array repair method based on array card management tool

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207820A (en) * 2013-02-05 2013-07-17 北京百度网讯科技有限公司 Method and device for fault positioning of hard disk on basis of raid card log
CN103984615A (en) * 2014-05-12 2014-08-13 浪潮(北京)电子信息产业有限公司 Method and device for realizing magnetic-disk monitoring
CN104866411A (en) * 2015-06-08 2015-08-26 北京奇虎科技有限公司 Monitoring and analyzing method and device for solid state disks
CN105045689A (en) * 2015-06-25 2015-11-11 浪潮电子信息产业股份有限公司 A Method of Using RAID Card to Detect Hard Disk Monitoring and Alarming in Batches
CN105930187A (en) * 2016-04-21 2016-09-07 浪潮电子信息产业股份有限公司 A method of refreshing Mega SAS RAID card FW in batches

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207820A (en) * 2013-02-05 2013-07-17 北京百度网讯科技有限公司 Method and device for fault positioning of hard disk on basis of raid card log
CN103984615A (en) * 2014-05-12 2014-08-13 浪潮(北京)电子信息产业有限公司 Method and device for realizing magnetic-disk monitoring
CN104866411A (en) * 2015-06-08 2015-08-26 北京奇虎科技有限公司 Monitoring and analyzing method and device for solid state disks
CN105045689A (en) * 2015-06-25 2015-11-11 浪潮电子信息产业股份有限公司 A Method of Using RAID Card to Detect Hard Disk Monitoring and Alarming in Batches
CN105930187A (en) * 2016-04-21 2016-09-07 浪潮电子信息产业股份有限公司 A method of refreshing Mega SAS RAID card FW in batches

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647136A (en) * 2018-05-10 2018-10-12 南京道熵信息技术有限公司 Hard disk corruptions prediction technique and device based on SMART information and deep learning
CN108647136B (en) * 2018-05-10 2021-05-04 南京道熵信息技术有限公司 Hard disk damage prediction method and device based on SMART information and deep learning
CN110427528A (en) * 2019-07-31 2019-11-08 东莞记忆存储科技有限公司 SSD identifier test method, device, computer equipment and storage medium
CN114201327A (en) * 2021-12-06 2022-03-18 上海中通吉网络技术有限公司 Online disk array repair method based on array card management tool

Similar Documents

Publication Publication Date Title
US7558988B2 (en) Storage system and control method thereof
CN103455395B (en) The detection method of a kind of hard disk failure and device
JP7138890B2 (en) Abnormal Occurrence Risk Detection Method for Electronic Recording Medium
CN1466760A (en) Critical event logging for disk drives
CN113708986B (en) Server monitoring apparatus, method and computer-readable storage medium
CN105468482B (en) Hard disk position identification and fault diagnosis method and server equipment thereof
CN113179665B (en) Using error correction-based metrics to identify poorly performing data storage devices
US20080282113A1 (en) Failure information management method and apparatus, failure detection method and apparatus, electronic apparatus, information processing apparatus and computer-readable storage medium
CN107766191A (en) The automatic detecting storage information of Linux systems and the method for testing of health status
US8843781B1 (en) Managing drive error information in data storage systems
Huang et al. Characterizing disk health degradation and proactively protecting against disk failures for reliable storage systems
US8234235B2 (en) Security and remote support apparatus, system and method
US7571263B2 (en) Apparatus and method for monitoring data storage device for usage and warranty
CN116820339A (en) Method and device for determining disk state, storage medium and electronic device
CN113179657A (en) Use of recovery behavior for prognosis and in situ repair of data storage devices
US9384077B2 (en) Storage control apparatus and method for controlling storage apparatus
CN107301109B (en) Hard disk quality screening method and device
US20210349775A1 (en) Method of data management and method of data analysis
JP2014182743A (en) Disk array device and failure detection method
CN117112329A (en) Hard disk failure detection method and device, storage medium and electronic device
JP2009054221A (en) Lifetime management system for magnetic disk unit
KR20060113551A (en) Method and apparatus for time correlating defects found on hard disks
CN111190781A (en) Test self-check method of server system
EP3547139B1 (en) System and method of assessing and managing storage device degradation
CN111858283A (en) A hard disk failure preprocessing method and related components in an edge data center

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180306

RJ01 Rejection of invention patent application after publication