CN109445993A - A kind of detection method and relevant apparatus of file system health status - Google Patents

A kind of detection method and relevant apparatus of file system health status Download PDF

Info

Publication number
CN109445993A
CN109445993A CN201811300835.3A CN201811300835A CN109445993A CN 109445993 A CN109445993 A CN 109445993A CN 201811300835 A CN201811300835 A CN 201811300835A CN 109445993 A CN109445993 A CN 109445993A
Authority
CN
China
Prior art keywords
file system
log
detection
health status
file
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
CN201811300835.3A
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 CN201811300835.3A priority Critical patent/CN109445993A/en
Publication of CN109445993A publication Critical patent/CN109445993A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata

Abstract

The detection method of a kind of file system health status provided herein, comprising: the file system is detected with preset time, and will test result and generate system detection log;When receiving health status request of the requesting party to file system, the response that the system detection log is requested as the health status, so as to the health status of requesting party file system according to the system detection log acquisition.When requestor requests obtain the health status of file system, it is no longer needed for real-time detection file system, already existing system detection log need to only be read, solve the problems, such as that original on-line checking due to the obstruction that detection time is too long and generates, ensure that the normal operation of storage platform system in the process.The application also provides detection system, a kind of computer readable storage medium and a kind of server of a kind of file system health status, has above-mentioned beneficial effect.

Description

A kind of detection method and relevant apparatus of file system health status
Technical field
This application involves operating system field, in particular to the detection method of a kind of file system health status and related dress It sets.
Background technique
Currently, the detection method in storage management software platform alarm system about file system is real-time detection, and will The abnormal generation alarm of detection is reported to web interface, but alarm system not only includes file system exception or faiture alarm, is also wrapped Other alarms such as RAID alarm, disk alarm are included, when data volume is bigger in file system, and directory hierarchy is complicated, magnetic When disk storage is not sequential storage, the execution time of detection file system health status can be long, at this moment will lead to and is System obstruction, seriously affect system operation and other warning messages it is normal, report in time.
Summary of the invention
The purpose of the application is to provide the detection method, detection system, a kind of computer of a kind of file system health status Readable storage medium storing program for executing and a kind of server solve the problems, such as that existing file system real-time detection is easy so that system congestion.
In order to solve the above technical problems, the application provides a kind of detection method of file system health status, particular technique Scheme is as follows:
The file system is detected with preset time, and will test result and generate system detection log;
When receiving health status request of the requesting party to file system, using the system detection log as described strong The response of health status request, so as to the healthy shape of requesting party file system according to the system detection log acquisition Condition.
Wherein, the file system is detected with preset time, and will test result generation system detection log and includes:
The work log information that the file system is detected with preset time, by the wrong day in the work log information Will generates system detection log.
Wherein, the file system is detected with preset time, and will test result generation system detection log and includes:
With the presence or absence of damage log when detecting file system starting with preset time, generated according to the damage log System detection log.
Wherein, the error log and/or the damage log if it exists, then the file system is in abnormal healthy shape Condition.
Wherein, further includes:
When the file system is in abnormal health status, the corresponding upper management system of Xiang Suoshu file system is sent Abnormal alarm information.
The application also provides a kind of detection system of file system health status, comprising:
Detection module for detecting the file system with preset time, and will test result and generate system detection log;
Respond module, for when receiving requesting party and requesting the health status of file system, by the system detection The response that log is requested as the health status, so as to requesting party file according to the system detection log acquisition The health status of system.
Wherein, the detection module is particularly for the work log detected when the file system starts with preset time Error log in the work log information is generated the module of system detection log by information.
Wherein, the detection module whether there is damage particularly for when detecting file system starting with preset time Bad log, according to the module of the damage log generating system detection log.
The application also provides a kind of computer readable storage medium, is stored thereon with computer program, the computer journey The step of method for detecting abnormality as described above is realized when sequence is executed by processor.
The application also provides a kind of server, including memory and processor, has computer program in the memory, The step of processor realizes method for detecting abnormality as described above when calling the computer program in the memory.
The detection method of a kind of file system health status provided herein, comprising: described in being detected with preset time File system, and will test result and generate system detection log;The health status of file system is requested when receiving requesting party When, the response that the system detection log is requested as the health status, so that the requesting party examines according to the system Survey the health status of file system described in log acquisition.The application is by detecting and generating in advance to file system in preset time System detection log when so that requestor requests obtaining the health status of file system, no longer needs to carry out file system real-time Detection, only need to read already existing system detection log can obtain the health status of file system, solve the prior art The system congestion that middle requesting party generates dependent on too long to the on-line checking process bring detection time of file system is asked Topic, ensure that the normal operation of storage platform system.The application also provides a kind of detection system of file system health status, one Kind computer readable storage medium and a kind of server have above-mentioned beneficial effect, and details are not described herein again.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow chart of the detection method of file system health status provided by the embodiment of the present application;
Fig. 2 is a kind of detection system structure of file system health status provided by the embodiment of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Referring to FIG. 1, Fig. 1 is a kind of stream of the detection method of file system health status provided by the embodiment of the present application Cheng Tu, the detection method include:
S101: detecting the file system with preset time, and will test result and generate system detection log;
This step is intended to detect the health status of file system.It should be noted that this step is online compared to existing The process of detection file system has no larger difference in detection content and detecting step, and purpose is detection file system The exception of system, including file system is whether normal operation, if mistake or abnormal occurs, file is different with the presence or absence of damage etc. Often.
It should be noted that the detection process in this step is compared to the existing maximum difference of real-time online detection process It is the automatic detection in backstage.By giving detection process timing, realizing backstage automatic running pair with the time of preset time setting detection The detection of file system.Preset time is not construed as limiting herein, it is to be understood that it can be to be periodically detected, can also To be set accordingly by those skilled in the art according to the detection demand of actual file system.Such as it is periodically detected When, can set daily to file system carry out backstage self-test it is primary, can also with every 12 hours or 48 hours backstage Self-test one is inferior.Certainly, according to running needs, such as daytime is that system runs peak period, can be shortened per twice The interval time of self-test should specifically be set the time to detection by those skilled in the art.
After detection, need to generate system detection log, it should be noted that system detection log is not because detection is tied The quality of fruit and decide whether exist.In other words, even detection process not finds any exception, generation pair is also needed The system detection log answered, only log content represents file system and is in healthy operation conditions.Further, herein for The specific storage location and journal format of system detection log are not construed as limiting, and system detection log directly can be had setting Under catalogue, and its journal format should generally be the common journal format in file system.
S102: when receiving requesting party and requesting the health status of file system, using the system detection log as The response of the health status request, so as to being good for for requesting party file system according to the system detection log acquisition Health situation.
This step is intended to illustrate, when requestor requests obtain the health status of file system, directly by the system of generation Log is detected as the response to the request.Requesting party in this step can be any required healthy shape for obtaining file system System, equipment or platform of condition etc., such as Web platform etc..When the health status for receiving requesting party is requested, by original straight Connect according to health status request execute on-line checking be changed to read system detection log in other words system detection log is made For the response to the request.Because in system detection log including the testing result in S101 for file system, request Side can directly acquire the health status of file system according to system detection log, without going real-time perfoming to detect again.
It is understood that since the detection process in S101 is the process repeated, then corresponding system detection day Will also includes the corresponding system detection log of each process of self-test, and when receiving health status request, it at this time should will be newest The response requested as health status of system detection log.Even if should be noted that by this method, not can guarantee yet When receiving health status request, corresponding system detection log represents the health status of current file system, such as when setting When fixed at ten two at daily noon self-test one time, if the health status that ten a period of time received requesting party at noon is requested, then obviously It is available at this time to system detection log be not the required file system of requesting party health status.It can be seen that When the preset time of file system detection in S101 is set, request of the requesting party for file system health status should be fully considered Demand.
The embodiment of the present application makes to call request by using the method for detecting file system in advance and generating system detection log Side no longer needs to real-time online detection, system detection log can be read directly to obtain when obtaining file system health status The health status of file system solves the problems, such as to cause file system to block since on-line checking process time is too long, guarantee The normal operation of file system and entire storage platform system.
Based on the above embodiment, as preferred embodiment, S101 can be specifically included:
Work log information when file system starting is detected with preset time, it will be in the work log information Error log generates system detection log.
The present embodiment is intended to illustrate a kind of specific detection method, can use the work log letter of file system starting Breath.Specifically, corresponding work log will will record the mistake or abnormal, that is, work if file system has mistake or abnormal Include error log in log, then directly can generate system detection log using error log at this time.
More specifically, fsck command is that linux system detection file-system command utilizes fsck when file system is run Detection file system health status, i.e. detection work log are realized in order, and result is stored in corresponding fsck_result text In part, then fsck_result file is system detection log.
It is understood that can be run in the form of script because the detection process needs to carry out on backstage.
Based on the above embodiment, as preferred embodiment, S101 can be specifically included:
With the presence or absence of damage log when detecting file system starting with preset time, generated according to the damage log System detection log.
The present embodiment is intended to illustrate another specific detection method, can use log letter when file system starting Breath, if will appear the log information of mistake or exception when starting when file system there is mistake or exception before activation, Log is damaged, therefore can judge the health status of file system by detection damage log.
More specifically, dmesg is that log information when checking system starting under linux system can when file system starts Whether there is or not file system corruption logs when checking that system starts with dmesg order, and result is saved to dmesg_result file In, then dmesg_result file is system detection log.
It is understood that can be run in the form of script because the detection process needs to carry out on backstage.
Based on upper two embodiments, as preferred embodiment, the error log and/or the damage day if it exists Will, then the file system is in abnormal health status.
The present embodiment is intended to combine above-described two kinds of detection method, and using two scripts, a script uses fsck Detection file system health status is realized in order, and result is stored in fsck_result file, another script uses Dmesg order checks that whether there is or not file system corruption logs when system starts, and result is saved into dmesg_result file. Then system detection log includes fsck_result file and dmesg_result, as long as at this point, any one file appearance is different Often, then there is exception in supporting paper system.In other words, as long as detecting any of error log and damage log, File system exists abnormal.
Based on the various embodiments described above, as preferred embodiment, which can also include:
When the file system is in abnormal health status, the corresponding upper management system of Xiang Suoshu file system is sent Abnormal alarm information.
The present embodiment is intended to illustrate, when file system is deposited when abnormal, sends in time to corresponding upper management system different Normal warning message avoids the abnormal normal operation to storage platform system because of file system from bringing loss.
A kind of detection system of file system health status provided by the embodiments of the present application is introduced below, is hereafter retouched The detection system stated can correspond to each other reference with above-described detection method.
Referring to fig. 2, Fig. 2 shows for a kind of detection system structure of file system health status provided by the embodiment of the present application It is intended to, the application also provides a kind of detection system of file system health status, comprising:
Detection module 100 for detecting the file system with preset time, and will test result and generate system detection day Will;
Respond module 200, for when receiving health status request of the requesting party to file system, the system to be examined The response that log is requested as the health status is surveyed, so as to requesting party text according to the system detection log acquisition The health status of part system.
Based on the above embodiment, as preferred embodiment, when the detection module 100 is specifically as follows for preset Between detect the file system starting when work log information, by the work log information error log generate system Detect the module of log.
Based on the above embodiment, as preferred embodiment, when the detection module 100 is specifically as follows for preset Between detect the file system starting when with the presence or absence of damage log, according to it is described damage log generating system detection log mould Block.
Based on the above embodiment, as preferred embodiment, the abnormality detection system can also include:
Alarm module, on when the file system is in abnormal health status, Xiang Suoshu file system is corresponding Grade management system sends abnormal alarm information.
Present invention also provides a kind of computer readable storage mediums, have computer program thereon, the computer program The step of being performed the detection method that a kind of file system health status provided by above-described embodiment may be implemented.The storage Medium may include: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory The various media that can store program code such as (RandomAccess Memory, RAM), magnetic or disk.
Present invention also provides a kind of servers, may include memory and processor, have calculating in the memory Machine program when the processor calls the computer program in the memory, may be implemented one provided by above-described embodiment The step of detection method of kind file system health status.Certain server can also include various network interfaces, power supply Equal components.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For embodiment provide system and Speech, since it is corresponding with the method that embodiment provides, so being described relatively simple, related place is referring to method part illustration ?.
Specific examples are used herein to illustrate the principle and implementation manner of the present application, and above embodiments are said It is bright to be merely used to help understand the present processes and its core concept.It should be pointed out that for the ordinary skill of the art For personnel, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, these improvement It is also fallen into the protection scope of the claim of this application with modification.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.

Claims (10)

1. a kind of detection method of file system health status characterized by comprising
The file system is detected with preset time, and will test result and generate system detection log;
When receiving health status request of the requesting party to file system, using the system detection log as the healthy shape The response of condition request, so as to the health status of requesting party file system according to the system detection log acquisition.
2. method for detecting abnormality according to claim 1, which is characterized in that the file system is detected with preset time, And it will test result generation system detection log and include:
The work log information that the file system is detected with preset time, the error log in the work log information is raw At system detection log.
3. method for detecting abnormality according to claim 2, which is characterized in that the file system is detected with preset time, And it will test result generation system detection log and include:
With the presence or absence of damage log when detecting file system starting with preset time, according to the damage log generating system Detect log.
4. method for detecting abnormality according to claim 3, which is characterized in that the error log and/or described if it exists Log is damaged, then the file system is in abnormal health status.
5. method for detecting abnormality according to claim 4, which is characterized in that further include:
When the file system is in abnormal health status, the corresponding upper management system of Xiang Suoshu file system sends abnormal Warning message.
6. a kind of detection system of file system health status characterized by comprising
Detection module for detecting the file system with preset time, and will test result and generate system detection log;
Respond module, for when receiving requesting party and requesting the health status of file system, by the system detection log As the response of health status request, so as to requesting party file system according to the system detection log acquisition Health status.
7. abnormality detection system according to claim 6, which is characterized in that the detection module is particularly for default Time detects work log information when file system starting, and the error log in the work log information is generated system The module of system detection log.
8. abnormality detection system according to claim 7, which is characterized in that the detection module is particularly for default With the presence or absence of damage log when time detects file system starting, according to the damage log generating system detection log Module.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The step of processor realizes method for detecting abnormality as described in any one in claim 1-5 when executing.
10. a kind of server, which is characterized in that including memory and processor, have computer program, institute in the memory It states when processor calls the computer program in the memory and realizes abnormality detection side as described in any one in claim 1-5 The step of method.
CN201811300835.3A 2018-11-02 2018-11-02 A kind of detection method and relevant apparatus of file system health status Pending CN109445993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811300835.3A CN109445993A (en) 2018-11-02 2018-11-02 A kind of detection method and relevant apparatus of file system health status

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811300835.3A CN109445993A (en) 2018-11-02 2018-11-02 A kind of detection method and relevant apparatus of file system health status

Publications (1)

Publication Number Publication Date
CN109445993A true CN109445993A (en) 2019-03-08

Family

ID=65549603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811300835.3A Pending CN109445993A (en) 2018-11-02 2018-11-02 A kind of detection method and relevant apparatus of file system health status

Country Status (1)

Country Link
CN (1) CN109445993A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124731A (en) * 2019-12-20 2020-05-08 浪潮电子信息产业股份有限公司 File system abnormity monitoring method, device, equipment and medium
WO2021052231A1 (en) * 2019-09-19 2021-03-25 华为技术有限公司 Data detection method and device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5696702A (en) * 1995-04-17 1997-12-09 Skinner; Gary R. Time and work tracker
CN101201786A (en) * 2006-12-13 2008-06-18 中兴通讯股份有限公司 Method and device for monitoring fault log
CN101567805A (en) * 2009-05-22 2009-10-28 清华大学 Method for recovering failed parallel file system
US20090327831A1 (en) * 2008-06-30 2009-12-31 Fujitsu Limited Automatic Retransmission Controller And Retransmission Block Recombination Apparatus
CN102902615A (en) * 2012-09-18 2013-01-30 曙光信息产业(北京)有限公司 Failure alarm method and system for Lustre parallel file system
US20150248421A1 (en) * 2014-03-03 2015-09-03 National Tsing Hua University System and method for recovering system status consistently to designed recovering time point in distributed database
CN105847079A (en) * 2016-03-17 2016-08-10 浪潮通信信息系统有限公司 Data processing method and device
CN106649033A (en) * 2016-11-08 2017-05-10 努比亚技术有限公司 Web system health check method and device
CN107196910A (en) * 2017-04-18 2017-09-22 国网山东省电力公司电力科学研究院 Threat early warning monitoring system, method and the deployment framework analyzed based on big data
CN108268354A (en) * 2016-12-30 2018-07-10 腾讯科技(深圳)有限公司 Data safety monitoring method, background server, terminal and system
CN108920306A (en) * 2018-06-29 2018-11-30 努比亚技术有限公司 What is managed based on memory restarts localization method, mobile terminal and readable storage medium storing program for executing

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5696702A (en) * 1995-04-17 1997-12-09 Skinner; Gary R. Time and work tracker
CN101201786A (en) * 2006-12-13 2008-06-18 中兴通讯股份有限公司 Method and device for monitoring fault log
US20090327831A1 (en) * 2008-06-30 2009-12-31 Fujitsu Limited Automatic Retransmission Controller And Retransmission Block Recombination Apparatus
CN101567805A (en) * 2009-05-22 2009-10-28 清华大学 Method for recovering failed parallel file system
CN102902615A (en) * 2012-09-18 2013-01-30 曙光信息产业(北京)有限公司 Failure alarm method and system for Lustre parallel file system
US20150248421A1 (en) * 2014-03-03 2015-09-03 National Tsing Hua University System and method for recovering system status consistently to designed recovering time point in distributed database
CN105847079A (en) * 2016-03-17 2016-08-10 浪潮通信信息系统有限公司 Data processing method and device
CN106649033A (en) * 2016-11-08 2017-05-10 努比亚技术有限公司 Web system health check method and device
CN108268354A (en) * 2016-12-30 2018-07-10 腾讯科技(深圳)有限公司 Data safety monitoring method, background server, terminal and system
CN107196910A (en) * 2017-04-18 2017-09-22 国网山东省电力公司电力科学研究院 Threat early warning monitoring system, method and the deployment framework analyzed based on big data
CN108920306A (en) * 2018-06-29 2018-11-30 努比亚技术有限公司 What is managed based on memory restarts localization method, mobile terminal and readable storage medium storing program for executing

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JONATAN SCHROEDER .ETAL: "Device-independent on demand synchronization in the Unico file system", 《IEEE》 *
于永忱: "AIX文件系统的常见故障诊断与维护", 《科技风 应用科技》 *
林云 等编著.: "《Linux实验教程》", 30 September 2008, 黑龙江人民出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021052231A1 (en) * 2019-09-19 2021-03-25 华为技术有限公司 Data detection method and device
CN111124731A (en) * 2019-12-20 2020-05-08 浪潮电子信息产业股份有限公司 File system abnormity monitoring method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN110661659A (en) Alarm method, device and system and electronic equipment
US9189348B2 (en) High availability database management system and database management method using same
CN110554930B (en) Data storage method and related equipment
CN102355368B (en) Fault processing method of network equipment and system
CN102201934A (en) Patrolling method and system for centralized management distributed automatic testing
CN109062690A (en) A kind of request responding method, server, medium and system
CN107729205B (en) Fault processing method and device for business system
CN106933843A (en) database heartbeat detecting method and device
CN110063042B (en) Database fault response method and terminal thereof
CN104065526A (en) Server fault alarming method and device thereof
CN109165112B (en) Fault recovery method, system and related components of metadata cluster
CN109445993A (en) A kind of detection method and relevant apparatus of file system health status
CN114978883B (en) Network wakeup management method and device, electronic equipment and storage medium
CN107729213B (en) Background task monitoring method and device
CN112162899A (en) Big data cluster service based monitoring method and system
CN108710684A (en) ETL task datas source switch method, system, computer equipment and storage medium
CN106502665B (en) A kind of restorative procedure and device of application program
CN112069032A (en) Availability detection method, system and related device for virtual machine
CN112579383A (en) Method and device for simulating system fault
CN116149932A (en) Method and device for detecting software system state and electronic equipment
CN108737184A (en) A kind of management method and device of disaster tolerance system
CN114327968A (en) Method and device for realizing early warning of server hardware fault telephone with universal interface
CN112328463A (en) Log monitoring method and device
CN106815120A (en) Embedded Log Administration System and method
CN107395387A (en) The methods, devices and systems of two-shipper business recovery

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

RJ01 Rejection of invention patent application after publication