CN110989926B - Fault magnetic disc slot positioning method and device and electronic equipment - Google Patents

Fault magnetic disc slot positioning method and device and electronic equipment Download PDF

Info

Publication number
CN110989926B
CN110989926B CN201911092449.4A CN201911092449A CN110989926B CN 110989926 B CN110989926 B CN 110989926B CN 201911092449 A CN201911092449 A CN 201911092449A CN 110989926 B CN110989926 B CN 110989926B
Authority
CN
China
Prior art keywords
disk
information
slot
fault
identification 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.)
Active
Application number
CN201911092449.4A
Other languages
Chinese (zh)
Other versions
CN110989926A (en
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911092449.4A priority Critical patent/CN110989926B/en
Publication of CN110989926A publication Critical patent/CN110989926A/en
Application granted granted Critical
Publication of CN110989926B publication Critical patent/CN110989926B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0617Improving the reliability of storage systems in relation to availability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems

Abstract

The embodiment of the disclosure provides a fault magnetic disc slot positioning method, a fault magnetic disc slot positioning device and electronic equipment, and belongs to the technical field of data processing, wherein the method comprises the following steps: acquiring equipment information including disk identifiers according to different types of data center disks, wherein the equipment information of the different types of disks is different; based on the obtained slot position identification information of all the magnetic disks, establishing a corresponding relation between equipment information and the slot position identification information; data processing is carried out on the read disk logs through a preset fault model, so as to judge the fault state of the disk; and when the fault model finds that the fault disk exists, positioning the fault disk based on the established corresponding relation between the equipment information and the slot position identification information. Through the scheme of the disclosure, the fault magnetic disc slot position can be rapidly and accurately positioned.

Description

Fault magnetic disc slot positioning method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a fault magnetic disc slot positioning method and device and electronic equipment.
Background
In the course of daily operation of the hard disk, hard disk data may be lost due to various failures. For example, a hard disk may be damaged by virus infection, mis-formatting or mis-partitioning, mis-cloning, mis-deleting or covering, artificial destruction of hacking software, zero track damage, logical lock of the hard disk, power failure during operation, data loss or damage caused by unexpected electromagnetic interference, file loss or damage caused by system error or paralysis, and the like, which can easily cause data loss of the hard disk.
As an application scene, the data center is provided with a mass storage disk, disk symbols of the disk are reported by the disk faults of the data center, the disk symbols and the disk slots have no fixed corresponding relation (the disk symbols drift), and the reporting and repairing of the data center have larger efficiency influence.
Disclosure of Invention
In view of the above, embodiments of the present disclosure provide a method, an apparatus, and an electronic device for positioning a slot of a fault magnetic disk, which at least partially solve the problems existing in the prior art.
In a first aspect, an embodiment of the present disclosure provides a method for positioning a slot of a fault magnetic disk, including:
acquiring equipment information including disk identifiers according to different types of data center disks, wherein the equipment information of the different types of disks is different;
based on the obtained slot position identification information of all the magnetic disks, establishing a corresponding relation between equipment information and the slot position identification information;
data processing is carried out on the read disk logs through a preset fault model, so as to judge the fault state of the disk;
and when the fault model finds that the fault disk exists, positioning the fault disk based on the established corresponding relation between the equipment information and the slot position identification information.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, according to different types of data center disks, device information including disk identifiers includes:
the host path and its associated disk identifier are obtained for all the sas type disks.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, according to different types of data center disks, device information including disk identifiers includes:
device information and associated disk identifiers of all non-sas scsi type disks are acquired.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, according to different types of data center disks, device information including disk identifiers includes:
and obtaining disk device information, associated disk characters and a pcb path of all nvme type disk devices.
According to a specific implementation manner of the embodiment of the present disclosure, the establishing a correspondence between device information and slot identification information based on the acquired slot identification information of all the disks includes:
searching a disk drive symbol corresponding to the slot identification information;
and establishing a corresponding relation between the slot identification information and the disk drive corresponding to the slot identification information.
According to a specific implementation manner of the embodiment of the present disclosure, before the data processing is performed on the read disk log through the preset fault model, the method further includes:
acquiring log information on a disk in a preset time period;
and combining the log information with the disk equipment information on the disk to form a disk log.
According to a specific implementation manner of the embodiment of the present disclosure, the processing, by using a preset fault model, the data processing on the read disk log includes:
carrying out data analysis on the disk logs to obtain analysis parameters related to the disk logs;
comparing the model parameters in the fault model with the analysis parameters to obtain a comparison result;
and judging whether the disk has faults or not based on the comparison result.
According to a specific implementation manner of the embodiment of the present disclosure, when the fault model finds that a fault disk exists, after locating the fault disk based on the established correspondence between the device information and the slot identification information, the method further includes:
and performing offline and repair operations on the disk with the fault.
In a second aspect, embodiments of the present disclosure provide a fault disk slot positioning apparatus, including:
the device comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring device information including disk identifiers according to different types of data center disks, wherein the device information of the different types of disks is different;
the establishing module is used for establishing a corresponding relation between equipment information and slot position identification information based on the acquired slot position identification information of all the magnetic disks;
the processing module is used for carrying out data processing on the read disk logs through a preset fault model and judging the fault state of the disk;
and the positioning module is used for positioning the fault disk based on the established corresponding relation between the equipment information and the slot position identification information when the fault disk is found to exist through the fault model.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of fault disc slot location in any one of the implementations of the Ren Di or first aspect described above.
In a fourth aspect, the disclosed embodiments also provide a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method for positioning a failed disk slot in the foregoing first aspect or any implementation manner of the first aspect.
In a fifth aspect, embodiments of the present disclosure also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of fault disc slot location in any one of the implementations of the first aspect or the first aspect.
The fault magnetic disk slot positioning scheme in the embodiment of the disclosure comprises the steps of obtaining equipment information including disk identifiers according to different types of data center disks, wherein the equipment information of the different types of disks is different; based on the obtained slot position identification information of all the magnetic disks, establishing a corresponding relation between equipment information and the slot position identification information; data processing is carried out on the read disk logs through a preset fault model, so as to judge the fault state of the disk; and when the fault model finds that the fault disk exists, positioning the fault disk based on the established corresponding relation between the equipment information and the slot position identification information. Through the scheme of the disclosure, the fault magnetic disk can be automatically positioned.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of a fault disk slot positioning process according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of another fault disk slot positioning process provided in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of another fault disk slot positioning process provided in an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of another fault disk slot positioning process provided in an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a fault disk slot positioning apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are merely some, but not all embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should also be noted that the illustrations provided in the following embodiments merely illustrate the basic concepts of the disclosure by way of illustration, and only the components related to the disclosure are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided in order to provide a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a fault magnetic disc slot positioning method. The fault disc slot positioning method provided in this embodiment may be executed by a computing device, which may be implemented as software, or as a combination of software and hardware, and the computing device may be integrally provided in a server, a terminal device, or the like.
Referring to fig. 1, a fault magnetic disc slot positioning method provided by an embodiment of the present disclosure includes the following steps:
s101, acquiring equipment information including disk identifiers according to different types of data center disks, wherein the equipment information of the different types of disks is different.
The data center is usually a data storage center formed by a plurality of disks, the disks of the data center are huge in data, the failed disks (for example, SSD or HDD type hard disks) need to be overhauled in time, disk failures report disk symbols, the disk symbols and disk slots have no fixed corresponding relation (the disk symbols drift), and the data center is overhauled with great efficiency. Aiming at the problem, the method realizes the correspondence of the disc symbol and the slot position by a specific design method, and improves the precision to the usable level.
For the above-described case, the device information of the disk may be acquired according to different types of disks in the data center, and the disk existing in the data center may be identified by the device information of the disk.
As an application scenario, host paths and their associated drive letter of all the sas devices may be acquired. For the sas device, acquire class-sas_host and class-sas_phy information (corresponding/dev/sg issue corresponding scsi command): contains capacity, vendor, product name, serial number, type information (SSD or HDD), sas path, cage number, slot number.
As another application scenario, information of all scsi devices (ata devices) other than sas and their associated diskettes may be acquired. For non-sas scsi devices (ata devices), it is possible to obtain the ata number from bus-scsi-devices and issue corresponding ata commands for the corresponding/dev/sg via Ioctl to obtain capacity, vendor, product name, serial number, type information (SSD or HDD).
As another application scenario, information of all nvme devices, their associated drive letter and pcb paths can be obtained. For nvme equipment, information such as capacity, manufacturer, product name, serial number and the like is acquired by issuing a corresponding nvme ctl command through an nvme_ctl interface.
S102, based on the obtained slot identification information of all the magnetic disks, establishing a corresponding relation between the equipment information and the slot identification information.
The disk is data-connected through slots, which may be any type of hard disk data interface. The slot is a connection component between the disk and the host system for transferring data between the hard disk cache and the host memory. The connection speed between the disk and the computer is determined by the different types of disk slots, and as the different types of disk slots affect the running speed of the program and the system performance, the different types of disk slots can be set based on different application scenes, for example, IDE, SATA, SCSI and fiber channel type slot interfaces can be set.
And the slot information of the data center can be acquired from the operating system of the system in a mode of sending a request to the host system where the data center is located, wherein the slot information comprises the specific position information of the slot. By extracting the slot identification information in the slot information, all slots can be uniquely marked.
The device information of the magnetic disk comprises the disk symbol and the disk data interface information of the magnetic disk, and the corresponding relation between the disk data interface and the identification information of the slot can be established by matching the disk data interface information with the slot identification information, so that the corresponding relation between the disk symbol and the slot identification information is further established.
S103, data processing is carried out on the read disk logs through a preset fault model so as to judge the fault state of the disk.
In order to facilitate the judgment of the faults of the disk, the log data in the disk can be read through the system, the log data can be obtained by sorting the log data, and whether the disk has faults or not can be judged based on the analyzed data by analyzing the data of the disk days.
As an application scenario, a journal file (for example, a journal file in SM2 format) of a grabbed disk may be converted into a JSON file, and a JSON string and a corresponding string array may be generated by using the JSON file. By analyzing the character string and the character string array, the magnetic disk parameter information such as SN (serial number), hard disk Firmware, hard disk interface type, formatted sector size, voltage, RV vibration value, temperature, read-write work load, unrepairable read-write error and the like of the magnetic disk can be generated.
And comparing the analyzed disk parameter information with the parameter information preset in the fault model, so as to judge whether the disk has faults and what type of faults exist.
And S104, when the fault model finds that the fault disk exists, positioning the fault disk based on the established corresponding relation between the equipment information and the slot identification information.
When a disk is found to have a fault, the device information of the fault disk can be read, and the fault disk can be further positioned based on the position information in the slot position information through the corresponding relation between the preset device information (for example, the disk symbol) and the slot position identification information, so that the specific position of the fault disk is determined.
Through the specific method designed by the disclosure, the correspondence of the disk symbol and the slot position is realized, the precision is improved to the usable level, and the automatic positioning efficiency of the fault disk is improved.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, according to different types of data center disks, device information including disk identifiers includes: the host path and associated disk identifiers of all the sas type disks are acquired. For the sas device, acquire class-sas_host and class-sas_phy information (corresponding/dev/sg issue corresponding scsi command): contains capacity, vendor, product name, serial number, type information (SSD or HDD), sas path, cage number, slot number.
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, according to different types of data center disks, device information including disk identifiers includes: device information and associated disk identifiers of all non-sas scsi type disks are acquired. For non-sas scsi devices (ata devices), it is possible to obtain the ata number from bus-scsi-devices and issue corresponding ata commands for the corresponding/dev/sg via Ioctl to obtain capacity, vendor, product name, serial number, type information (SSD or HDD).
According to a specific implementation manner of the embodiment of the present disclosure, the obtaining, according to different types of data center disks, device information including disk identifiers includes: and obtaining disk device information, associated disk characters and a pcb path of all nvme type disk devices. For nvme equipment, information such as capacity, manufacturer, product name, serial number and the like is acquired by issuing a corresponding nvme ctl command through an nvme_ctl interface.
Referring to fig. 2, according to a specific implementation manner of the embodiment of the present disclosure, the establishing a correspondence between device information and slot identification information based on the acquired slot identification information of all the disks includes:
s201, searching a disk drive symbol corresponding to the slot identification information.
The disk is data-connected through slots, which may be any type of hard disk data interface. The slot is a connection component between the disk and the host system for transferring data between the hard disk cache and the host memory. The connection speed between the disk and the computer is determined by the different types of disk slots, and as the different types of disk slots affect the running speed of the program and the system performance, the different types of disk slots can be set based on different application scenes, for example, IDE, SATA, SCSI and fiber channel type slot interfaces can be set.
And the slot information of the data center can be acquired from the operating system of the system in a mode of sending a request to the host system where the data center is located, wherein the slot information comprises the specific position information of the slot. By extracting the slot identification information in the slot information, all slots can be uniquely marked.
S202, establishing a corresponding relation between the slot identification information and a disk drive symbol corresponding to the slot identification information.
The device information of the magnetic disk comprises the disk symbol and the disk data interface information of the magnetic disk, and the corresponding relation between the disk data interface and the identification information of the slot can be established by matching the disk data interface information with the slot identification information, so that the corresponding relation between the disk symbol and the slot identification information is further established.
Referring to fig. 3, according to a specific implementation manner of the embodiment of the present disclosure, before the data processing is performed on the read disk log through the preset fault model, the method further includes:
s301, acquiring log information on a disk in a preset time period.
The determination of whether a failed disk exists may be performed periodically, and for this purpose, log information on the disk during a predetermined period of time (e.g., one day or one week, etc.) may be extracted, and by using the log information, whether the disk has a failure may be further analyzed.
S302, combining the log information with disk equipment information on a disk to form a disk log.
Because the data center has a plurality of disks, the lifted disks and the log information can be combined with the video information on the disks to jointly form the disk log.
By adding the disk equipment information into the disk log, the disk information can be identified, and a basis is provided for subsequent fault analysis based on the disk log.
Referring to fig. 4, according to a specific implementation manner of the embodiment of the present disclosure, the data processing, through a preset fault model, on the read disk log includes:
s401, carrying out data analysis on the disk logs to obtain analysis parameters related to the disk logs.
As an application scenario, a journal file (for example, a journal file in SM2 format) of a grabbed disk may be converted into a JSON file, and a JSON string and a corresponding string array may be generated by using the JSON file. By analyzing the character string and the character string array, the magnetic disk parameter information such as SN (serial number), hard disk Firmware, hard disk interface type, formatted sector size, voltage, RV vibration value, temperature, read-write work load, unrepairable read-write error and the like of the magnetic disk can be generated.
S402, comparing the model parameters in the fault model with the analysis parameters to obtain a comparison result.
And comparing the analyzed disk parameter information with the parameter information preset in the fault model, namely judging whether the disk has faults and what type of faults exist, and forming a comparison result.
S403, judging whether the disk has faults or not based on the comparison result.
Through the implementation mode, corresponding analysis and comparison can be carried out based on the parameters on the disk, and the accuracy of fault diagnosis is improved.
According to a specific implementation manner of the embodiment of the present disclosure, when the fault model finds that a fault disk exists, after locating the fault disk based on the established correspondence between the device information and the slot identification information, the method further includes: and performing offline and repair operations on the disk with the fault.
Corresponding to the above method embodiment, referring to fig. 5, the disclosed embodiment further provides a fault disc slot positioning device 50, including:
the obtaining module 501 is configured to obtain device information including disk identifiers according to different types of data center disks, where the device information of the different types of disks is different.
The data center is usually a data storage center formed by a plurality of disks, the disks of the data center are huge in data, the failed disks (for example, SSD or HDD type hard disks) need to be overhauled in time, disk failures report disk symbols, the disk symbols and disk slots have no fixed corresponding relation (the disk symbols drift), and the data center is overhauled with great efficiency. Aiming at the problem, the method realizes the correspondence of the disc symbol and the slot position by a specific design method, and improves the precision to the usable level.
For the above-described case, the device information of the disk may be acquired according to different types of disks in the data center, and the disk existing in the data center may be identified by the device information of the disk.
As an application scenario, host paths and their associated drive letter of all the sas devices may be acquired. For the sas device, acquire class-sas_host and class-sas_phy information (corresponding/dev/sg issue corresponding scsi command): contains capacity, vendor, product name, serial number, type information (SSD or HDD), sas path, cage number, slot number.
As another application scenario, information of all scsi devices (ata devices) other than sas and their associated diskettes may be acquired. For non-sas scsi devices (ata devices), it is possible to obtain the ata number from bus-scsi-devices and issue corresponding ata commands for the corresponding/dev/sg via Ioctl to obtain capacity, vendor, product name, serial number, type information (SSD or HDD).
As another application scenario, information of all nvme devices, their associated drive letter and pcb paths can be obtained. For nvme equipment, information such as capacity, manufacturer, product name, serial number and the like is acquired by issuing a corresponding nvme ctl command through an nvme_ctl interface.
The establishing module 502 is configured to establish a correspondence between the device information and the slot identification information based on the acquired slot identification information of all the disks.
The disk is data-connected through slots, which may be any type of hard disk data interface. The slot is a connection component between the disk and the host system for transferring data between the hard disk cache and the host memory. The connection speed between the disk and the computer is determined by the different types of disk slots, and as the different types of disk slots affect the running speed of the program and the system performance, the different types of disk slots can be set based on different application scenes, for example, IDE, SATA, SCSI and fiber channel type slot interfaces can be set.
And the slot information of the data center can be acquired from the operating system of the system in a mode of sending a request to the host system where the data center is located, wherein the slot information comprises the specific position information of the slot. By extracting the slot identification information in the slot information, all slots can be uniquely marked.
The device information of the magnetic disk comprises the disk symbol and the disk data interface information of the magnetic disk, and the corresponding relation between the disk data interface and the identification information of the slot can be established by matching the disk data interface information with the slot identification information, so that the corresponding relation between the disk symbol and the slot identification information is further established.
And the processing module 503 is configured to perform data processing on the read disk log through a preset fault model, so as to determine a fault state of the disk.
In order to facilitate the judgment of the faults of the disk, the log data in the disk can be read through the system, the log data can be obtained by sorting the log data, and whether the disk has faults or not can be judged based on the analyzed data by analyzing the data of the disk days.
As an application scenario, a journal file (for example, a journal file in SM2 format) of a grabbed disk may be converted into a JSON file, and a JSON string and a corresponding string array may be generated by using the JSON file. By analyzing the character string and the character string array, the magnetic disk parameter information such as SN (serial number), hard disk Firmware, hard disk interface type, formatted sector size, voltage, RV vibration value, temperature, read-write work load, unrepairable read-write error and the like of the magnetic disk can be generated.
And comparing the analyzed disk parameter information with the parameter information preset in the fault model, so as to judge whether the disk has faults and what type of faults exist.
And the positioning module 504 is configured to, when the fault model finds that the fault disk exists, position the fault disk based on the corresponding relationship between the device information and the slot identification information.
When a disk is found to have a fault, the device information of the fault disk can be read, and the fault disk can be further positioned based on the position information in the slot position information through the corresponding relation between the preset device information (for example, the disk symbol) and the slot position identification information, so that the specific position of the fault disk is determined.
Through the specific method designed by the disclosure, the correspondence of the disk symbol and the slot position is realized, the precision is improved to the usable level, and the automatic positioning efficiency of the fault disk is improved.
The apparatus shown in fig. 5 may correspondingly execute the content in the foregoing method embodiment, and the portions not described in detail in this embodiment refer to the content described in the foregoing method embodiment, which are not described herein again.
Referring to fig. 6, an embodiment of the present disclosure also provides an electronic device 60, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of fault disc slot location in the foregoing method embodiments.
The disclosed embodiments also provide a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the foregoing method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of fault disk slot positioning in the foregoing method embodiments.
Referring now to fig. 6, a schematic diagram of an electronic device 60 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. While an electronic device 60 having various means is shown, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring at least two internet protocol addresses; sending a node evaluation request comprising the at least two internet protocol addresses to node evaluation equipment, wherein the node evaluation equipment selects an internet protocol address from the at least two internet protocol addresses and returns the internet protocol address; receiving an Internet protocol address returned by the node evaluation equipment; wherein the acquired internet protocol address indicates an edge node in the content distribution network.
Alternatively, the computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receiving a node evaluation request comprising at least two internet protocol addresses; selecting an internet protocol address from the at least two internet protocol addresses; returning the selected internet protocol address; wherein the received internet protocol address indicates an edge node in the content distribution network.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the disclosure are intended to be covered by the protection scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (11)

1. The fault magnetic disc slot positioning method is characterized by comprising the following steps of:
acquiring equipment information including disk identifiers according to different types of data center disks, wherein the equipment information of the different types of disks is different;
based on the obtained slot position identification information of all the magnetic disks, establishing a corresponding relation between equipment information and the slot position identification information;
data processing is carried out on the read disk logs through a preset fault model, so as to judge the fault state of the disk;
when the fault model finds that a fault disk exists, positioning the fault disk based on the established corresponding relation between the equipment information and the slot position identification information;
the device information further comprises disk data interface information, and establishing the corresponding relation between the device information and the slot identification information comprises the following steps: matching the disk data interface information with the slot position identification information, establishing a corresponding relation between the disk data interface and the slot position identification information, and establishing a corresponding relation between the disk identifier and the slot position identification information based on the corresponding relation between the disk data interface and the slot position identification information; and (3) uniquely marking all the slots by extracting slot identification information in the slot information, wherein the slot information comprises specific position information of the slots.
2. The method of claim 1, wherein the obtaining device information including disk identifiers according to different types of data center disks comprises:
the host path and associated disk identifiers of all the sas type disks are acquired.
3. The method of claim 1, wherein the obtaining device information including disk identifiers according to different types of data center disks comprises:
device information and associated disk identifiers of all non-sas scsi type disks are acquired.
4. The method of claim 1, wherein the obtaining device information including disk identifiers according to different types of data center disks comprises:
and obtaining disk device information, associated disk characters and a pcb path of all nvme type disk devices.
5. The method according to claim 1, wherein the establishing a correspondence between the device information and the slot identification information based on the acquired slot identification information of all the disks includes:
searching a disk drive symbol corresponding to the slot identification information;
and establishing a corresponding relation between the slot identification information and the disk drive corresponding to the slot identification information.
6. The method of claim 1, wherein before the data processing is performed on the read disk log by using a preset fault model, the method further comprises:
acquiring log information on a disk in a preset time period;
and combining the log information with the disk equipment information on the disk to form a disk log.
7. The method according to claim 1, wherein the data processing of the read disk log by a preset fault model includes:
carrying out data analysis on the disk logs to obtain analysis parameters related to the disk logs;
comparing the model parameters in the fault model with the analysis parameters to obtain a comparison result;
and judging whether the disk has faults or not based on the comparison result.
8. The method according to claim 1, wherein when the existence of the failed disk is found by the failure model, based on the correspondence between the device information that has been established and the slot identification information, the method further comprises, after locating the failed disk:
and performing offline and repair operations on the disk with the fault.
9. A fault disc slot positioning device, comprising:
the device comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring device information including disk identifiers according to different types of data center disks, wherein the device information of the different types of disks is different;
the establishing module is used for establishing a corresponding relation between equipment information and slot position identification information based on the acquired slot position identification information of all the magnetic disks;
the processing module is used for carrying out data processing on the read disk logs through a preset fault model and judging the fault state of the disk;
the positioning module is used for positioning the fault disk based on the established corresponding relation between the equipment information and the slot position identification information when the fault disk is found to exist through the fault model;
the device information further includes disk data interface information, and the building module is specifically configured to: matching the disk data interface information with the slot position identification information, establishing a corresponding relation between the disk data interface and the slot position identification information, and establishing a corresponding relation between the disk identifier and the slot position identification information based on the corresponding relation between the disk data interface and the slot position identification information; and (3) uniquely marking all the slots by extracting slot identification information in the slot information, wherein the slot information comprises specific position information of the slots.
10. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of fault disc slot location of any of the preceding claims 1-8.
11. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of fault disc slot positioning of any of the preceding claims 1-8.
CN201911092449.4A 2019-11-11 2019-11-11 Fault magnetic disc slot positioning method and device and electronic equipment Active CN110989926B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911092449.4A CN110989926B (en) 2019-11-11 2019-11-11 Fault magnetic disc slot positioning method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911092449.4A CN110989926B (en) 2019-11-11 2019-11-11 Fault magnetic disc slot positioning method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110989926A CN110989926A (en) 2020-04-10
CN110989926B true CN110989926B (en) 2024-02-13

Family

ID=70083707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911092449.4A Active CN110989926B (en) 2019-11-11 2019-11-11 Fault magnetic disc slot positioning method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110989926B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813588B (en) * 2020-06-01 2024-03-19 北京百卓网络技术有限公司 Computer hard disk fault positioning method, device, equipment and storage medium
CN111813589A (en) * 2020-06-01 2020-10-23 北京百卓网络技术有限公司 Distributed cluster fault positioning method, device, equipment and storage medium
CN111949488A (en) * 2020-08-14 2020-11-17 山东英信计算机技术有限公司 Hard disk fault prediction method and system, electronic equipment and storage medium
CN112130531A (en) * 2020-09-04 2020-12-25 苏州浪潮智能科技有限公司 Method and device for prompting and detecting installation position
CN112346932A (en) * 2020-11-05 2021-02-09 中国建设银行股份有限公司 Method and device for positioning hidden bad disk, electronic equipment and computer storage medium
CN113641555B (en) * 2021-08-17 2023-11-24 中国联合网络通信集团有限公司 Fault equipment positioning method, device, equipment and readable storage medium
CN115061641B (en) * 2022-08-16 2022-11-25 新华三信息技术有限公司 Disk fault processing method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4630269A (en) * 1983-05-16 1986-12-16 Data General Corporation Methods for diagnosing malfunctions in a disk drive
CN103218180A (en) * 2013-05-14 2013-07-24 北京百度网讯科技有限公司 Disk positioning method and device
US8719462B1 (en) * 2013-10-16 2014-05-06 Google Inc. Systems and methods for distributed log file processing
CN104699423A (en) * 2015-03-13 2015-06-10 华为技术有限公司 Method and device for binding disk drive in Linux system
CN107239273A (en) * 2017-05-02 2017-10-10 杭州沃趣科技股份有限公司 A kind of disk drive binding method of server
CN107247672A (en) * 2017-05-03 2017-10-13 深圳市同泰怡信息技术有限公司 Pass through the method for udev and expander relevant interface hyperdisks
CN107577545A (en) * 2016-07-05 2018-01-12 北京金山云网络技术有限公司 A kind of failed disk detection and restorative procedure and device
CN108008914A (en) * 2016-10-27 2018-05-08 华为技术有限公司 The method, apparatus and ARM equipment of disk management in a kind of ARM equipment
CN109542708A (en) * 2018-12-04 2019-03-29 浪潮电子信息产业股份有限公司 A method of record backboard physics slot position and system drive corresponding relationship
CN110096413A (en) * 2019-05-08 2019-08-06 苏州浪潮智能科技有限公司 A kind of disk localization method, system and electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005071196A (en) * 2003-08-27 2005-03-17 Hitachi Ltd Disk array apparatus and control method of its fault information
JP4575028B2 (en) * 2004-05-27 2010-11-04 株式会社日立製作所 Disk array device and control method thereof
JP2007206766A (en) * 2006-01-31 2007-08-16 Fujitsu Ltd Data storage system, data storage control device, and failure part diagnostic method
JP4496265B2 (en) * 2008-11-28 2010-07-07 株式会社東芝 Information processing apparatus and failure sign determination method
CN108733314B (en) * 2017-04-17 2021-06-29 伊姆西Ip控股有限责任公司 Method, apparatus, and computer-readable storage medium for Redundant Array of Independent (RAID) reconstruction
CN110389858B (en) * 2018-04-20 2023-06-09 伊姆西Ip控股有限责任公司 Method and device for recovering faults of storage device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4630269A (en) * 1983-05-16 1986-12-16 Data General Corporation Methods for diagnosing malfunctions in a disk drive
CN103218180A (en) * 2013-05-14 2013-07-24 北京百度网讯科技有限公司 Disk positioning method and device
US8719462B1 (en) * 2013-10-16 2014-05-06 Google Inc. Systems and methods for distributed log file processing
CN104699423A (en) * 2015-03-13 2015-06-10 华为技术有限公司 Method and device for binding disk drive in Linux system
CN107577545A (en) * 2016-07-05 2018-01-12 北京金山云网络技术有限公司 A kind of failed disk detection and restorative procedure and device
CN108008914A (en) * 2016-10-27 2018-05-08 华为技术有限公司 The method, apparatus and ARM equipment of disk management in a kind of ARM equipment
CN107239273A (en) * 2017-05-02 2017-10-10 杭州沃趣科技股份有限公司 A kind of disk drive binding method of server
CN107247672A (en) * 2017-05-03 2017-10-13 深圳市同泰怡信息技术有限公司 Pass through the method for udev and expander relevant interface hyperdisks
CN109542708A (en) * 2018-12-04 2019-03-29 浪潮电子信息产业股份有限公司 A method of record backboard physics slot position and system drive corresponding relationship
CN110096413A (en) * 2019-05-08 2019-08-06 苏州浪潮智能科技有限公司 A kind of disk localization method, system and electronic equipment and storage medium

Also Published As

Publication number Publication date
CN110989926A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN110989926B (en) Fault magnetic disc slot positioning method and device and electronic equipment
CN104866542A (en) POI data verification method and device
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN110196795B (en) Method and related device for detecting running state of mobile terminal application
CN104516678A (en) Method and device for storing data
CN111818145B (en) File transmission method, device, system, equipment and storage medium
CN111694684B (en) Abnormal construction method and device of storage device, electronic device and storage medium
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN104348905A (en) Method and device for pushing message in off-line way
US9411695B2 (en) Provisioning memory in a memory system for mirroring
CN116450184B (en) System upgrading method and device, electronic equipment and storage medium
CN112527678A (en) Method, apparatus, device and storage medium for testing protocol
CN111198853B (en) Data processing method, device, electronic equipment and computer readable storage medium
US20220334744A1 (en) Method, electronic device, and computer program product for processing data
US20130117493A1 (en) Reliable Memory Mapping In A Computing System
CN112379967B (en) Simulator detection method, device, equipment and medium
CN115309334A (en) Disk management method, device, equipment and storage medium
CN114443442A (en) Log storage method and electronic equipment
CN110569182B (en) Crash rate calculation method and device, computer equipment and storage medium
CN109918231B (en) Data reforming abnormity repairing method, device, equipment and storage medium
US10754643B2 (en) Detecting software incompatibilities within a system stack
CN108563552B (en) Method, equipment and storage medium for recording peripheral operation behaviors
CN110928814A (en) Method and device for detecting transmission abnormality of serial hard disk and electronic equipment
CN111262727A (en) Service capacity expansion method, device, equipment and storage medium
CN114781567B (en) Detection equipment installation method and device, electronic equipment and readable storage medium

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
GR01 Patent grant
GR01 Patent grant