CN107885640B - Hard disk management method and device - Google Patents

Hard disk management method and device Download PDF

Info

Publication number
CN107885640B
CN107885640B CN201711166784.5A CN201711166784A CN107885640B CN 107885640 B CN107885640 B CN 107885640B CN 201711166784 A CN201711166784 A CN 201711166784A CN 107885640 B CN107885640 B CN 107885640B
Authority
CN
China
Prior art keywords
hard disk
authorization
target
time
target hard
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
CN201711166784.5A
Other languages
Chinese (zh)
Other versions
CN107885640A (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 Tengling Technology Co ltd
Original Assignee
Beijing Tengling 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 Tengling Technology Co ltd filed Critical Beijing Tengling Technology Co ltd
Priority to CN201711166784.5A priority Critical patent/CN107885640B/en
Publication of CN107885640A publication Critical patent/CN107885640A/en
Application granted granted Critical
Publication of CN107885640B publication Critical patent/CN107885640B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a hard disk management method and a hard disk management device, which are applied to storage equipment, wherein the method comprises the following steps: sequentially authorizing the plurality of hard disks and storing the authorization time of each hard disk after authorization; reading log information of each hard disk after authorization is completed, and outputting the log information on a management interface; the log information records the problem of a corresponding hard disk, and the management interface is a software interface on a host screen in butt joint with the storage equipment; and periodically checking the authorization time of each hard disk, determining whether each authorized hard disk needs to be maintained, and outputting prompt information of a target hard disk needing to be maintained on the management interface. According to the technical scheme, the user can maintain the hard disk at a proper time, and can quickly locate the problem after the storage equipment breaks down.

Description

Hard disk management method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a hard disk management method and apparatus.
Background
A storage device (such as a disk enclosure) may be inserted with multiple hard disks, and an HBA (Host Bus Adapter) on the storage device may perform unified management on the multiple hard disks. When a user inserts hard disks of multiple vendors into one storage device, the storage device may not manage the hard disks well because the hard disks and the storage device belong to different vendors.
Under the circumstance, a user often cannot maintain the hard disk at a proper time, so that the hard disk has problems in the operation process, and data loss is caused. In addition, when the storage device fails, the user cannot accurately locate the occurring problem.
Disclosure of Invention
In view of this, the present application provides a hard disk management method and apparatus, which are used to prompt a user to maintain a hard disk at a proper time and output corresponding information when a storage device fails, so that the user can accurately locate a problem.
Specifically, the method is realized through the following technical scheme:
a hard disk management method is applied to a storage device, the storage device is inserted into a plurality of hard disks, and the method comprises the following steps:
sequentially authorizing the plurality of hard disks and storing the authorization time of each hard disk after authorization;
reading log information of each hard disk after authorization is completed, and outputting the log information on a management interface; the log information records the problem of a corresponding hard disk, and the management interface is a software interface on a host screen in butt joint with the storage equipment;
and periodically checking the authorization time of each hard disk, determining whether each authorized hard disk needs to be maintained, and outputting prompt information of a target hard disk needing to be maintained on the management interface.
In the hard disk management method, the sequentially authorizing the plurality of hard disks and storing the authorization time of each hard disk after completing authorization includes:
sequentially selecting the plurality of hard disks as target hard disks;
sending an identification code acquisition command to the target hard disk so that the target hard disk reports a local identification code;
generating a mapping relation based on the received identification code and the authorization time, and storing the mapping relation; and the authorization time is the time when the identification code is received.
In the hard disk management method, the periodically checking the authorization time of each hard disk and determining whether each hard disk which has completed authorization needs to be maintained includes:
periodically checking the authorization time of each hard disk, and subtracting the authorization time of each hard disk from the current time to obtain a time difference;
determining whether the time difference reaches a preset threshold value;
and if so, determining the hard disk corresponding to the time difference as a target hard disk needing to be maintained.
In the hard disk management method, the method further includes:
when the storage equipment is started, sequentially selecting the plurality of hard disks as target hard disks; or the like, or, alternatively,
when any hard disk is inserted into the storage device, selecting the hard disk as a target hard disk;
determining whether the target hard disk is authorized;
if so, reading the log information of the target hard disk, and outputting the log information on the management interface.
In the hard disk management method, the sequentially authorizing the plurality of hard disks includes:
calculating the identification code of the target hard disk based on a preset strategy, writing a calculation result into the target hard disk, and recording a first storage address written into the calculation result;
the determining whether the target hard disk completes authorization includes:
sending an IO reading request to the target hard disk so that the target hard disk reports a storage result; wherein the read IO request carries the first storage address;
analyzing the storage result to obtain an analysis result;
and searching the stored mapping relation for the analysis result, and determining that the target hard disk completes authorization if the identification code in any mapping relation is the same as the analysis result.
A hard disk management device is applied to a storage device, wherein the storage device is inserted into a plurality of hard disks, and the hard disk management device comprises:
the authorization unit is used for sequentially authorizing the plurality of hard disks and storing the authorization time of each hard disk after authorization;
the output unit is used for reading log information of each hard disk which completes authorization and outputting the log information on a management interface; the log information records the problem of a corresponding hard disk, and the management interface is a software interface on a host screen in butt joint with the storage equipment;
and the checking unit is used for periodically checking the authorization time of each hard disk, determining whether each authorized hard disk needs to be maintained or not, and outputting prompt information of a target hard disk needing to be maintained on the management interface.
In the hard disk management apparatus, the authorization unit is further configured to:
sequentially selecting the plurality of hard disks as target hard disks;
sending an identification code acquisition command to the target hard disk so that the target hard disk reports a local identification code;
generating a mapping relation based on the received identification code and the authorization time, and storing the mapping relation; and the authorization time is the time when the identification code is received.
In the hard disk management device, the checking unit is further configured to:
periodically checking the authorization time of each hard disk, and subtracting the authorization time of each hard disk from the current time to obtain a time difference;
determining whether the time difference reaches a preset threshold value;
and if so, determining the hard disk corresponding to the time difference as a target hard disk needing to be maintained.
In the hard disk management apparatus, the apparatus further includes:
the selection unit is used for sequentially selecting the plurality of hard disks as target hard disks when the storage equipment is started; or, when any hard disk is inserted into the storage device, selecting the hard disk as a target hard disk;
the determining unit is used for determining whether the target hard disk completes authorization;
and the output unit is further used for reading the log information of the target hard disk and outputting the log information on the management interface if the log information is positive.
In the hard disk management apparatus, the authorization unit is further configured to:
calculating the identification code of the target hard disk based on a preset strategy, writing a calculation result into the target hard disk, and recording a first storage address written into the calculation result;
the determining unit is further configured to:
sending an IO reading request to the target hard disk so that the target hard disk reports a storage result; wherein the read IO request carries the first storage address;
analyzing the storage result to obtain an analysis result;
and searching the stored mapping relation for the analysis result, and determining that the target hard disk completes authorization if the identification code in any mapping relation is the same as the analysis result.
In the embodiment of the application, the host bus adapter of the storage device can sequentially authorize a plurality of hard disks and store the authorization time of each hard disk after authorization is finished; the host bus adapter can periodically check the authorization time of each hard disk, determine whether each authorized hard disk needs to be maintained, and output prompt information of a target hard disk needing to be maintained on a management interface of the storage device; in addition, the host bus adapter can read log information of each hard disk which is authorized, and output the log information on the management interface;
the host bus adapter can store the authorization time of each hard disk and periodically determine whether each hard disk needs to be maintained or not based on the authorization time, so that prompt information is output on a management interface when a target hard disk needs to be maintained, and a user can maintain each hard disk at a proper time; in addition, the host bus adapter can output the log information for recording hard disk problems on the management interface, so that a user can intuitively and quickly locate the problems on the management interface after the storage equipment fails.
Drawings
FIG. 1 is a flow chart of a hard disk management method shown in the present application;
FIG. 2 is a block diagram of an embodiment of a hard disk management device shown in the present application;
fig. 3 is a hardware configuration diagram of a hard disk management device according to the present application.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the following description of the prior art and the technical solutions in the embodiments of the present invention with reference to the accompanying drawings is provided.
The host adapter of the storage device may uniformly manage a plurality of hard disks inserted into the storage device, however, if a hard disk inserted into one storage device by a user and the storage device belong to different manufacturers, the storage device may not effectively manage the hard disks. Therefore, a user cannot maintain the hard disk at a proper time and quickly locate the hard disk with a problem when the hard disk has the problem.
In view of this, in the technical solution of the present application, a hard disk inserted into a storage device is authorized, the authorization time is recorded, then the authorization time of each hard disk is periodically checked, whether each hard disk needs to be maintained is determined, and a prompt message of a target hard disk that needs to be maintained is output on a management interface of the storage device, so that a user can maintain the hard disk at a proper time based on the prompt message; in addition, log information of the authorized hard disk is output on a management interface of the storage device, wherein the log information can record the problem of the corresponding hard disk, so that a user can quickly locate the problem through the log information when the storage device fails.
Referring to fig. 1, a flowchart of a hard disk management method shown in the present application is shown, where the method is applied to a storage device, and the storage device is inserted into a plurality of hard disks, and the method includes the following steps:
step 101: and sequentially authorizing the plurality of hard disks, and storing the authorization time of each hard disk after authorization.
Step 102: reading log information of each hard disk after authorization is completed, and outputting the log information on a management interface; the log information records the problem of the corresponding hard disk, and the management interface is a software interface on a host screen in butt joint with the storage equipment.
Step 103: and periodically checking the authorization time of each hard disk, determining whether each authorized hard disk needs to be maintained, and outputting prompt information of a target hard disk needing to be maintained on the management interface.
The execution subject of the method may be a host bus adapter of the storage device. The interaction between the host bus adapter and each hard disk can be realized by components such as an FPGA (Field Programmable Gate Array) and an Expander device, which refer to the prior art specifically and are not described in detail herein.
In this embodiment of the present application, after the storage device is inserted into the plurality of hard disks and started, the host bus adapter of the storage device may authorize the plurality of inserted hard disks first, and store the authorization time of each hard disk that completes authorization.
In an embodiment shown, the host bus adapter may sequentially select the plurality of hard disks as a target hard disk, and then send an identification code (World Wide Name) acquisition command to the target hard disk. And after receiving the identification code acquisition command, the target hard disk can report the local identification code.
The host bus adapter receives the identification code reported by the target hard disk, and can store the mapping relation based on the received mapping relation between the identification code and the authorization time; wherein, the authorization time is the time when the identification code is received. In practice, the host bus adapter may create an executable file in memory and then store the identifier and authorization time mapping in the executable file.
Further, the host bus adapter may calculate an identification code of the target hard disk based on a preset policy, write the calculation result into the target hard disk, and record a first storage address written into the calculation result.
In an embodiment shown, the host bus adapter may perform an exclusive or operation on the identifier and a preconfigured authorization identifier, perform a hash calculation on the obtained value, add the obtained value to a manufacturer shorthand of the target hard disk and a time for obtaining the identifier, and finally obtain a calculation result. The authorization identifier may be a string of binary numbers identical to the number of identification codes.
The host bus adapter may write the calculation result into the target hard disk, and then record a first storage address written into the calculation result. It should be noted that the storage addresses of the host bus adapter of the same storage device for writing the calculation results into the plurality of hard disks inserted into the storage device may be the same, so that the host bus adapter only needs to store one storage address, thereby saving the memory space. Subsequent host bus adapters may read the written computation by sending a read IO request to the hard disk.
The host bus adapter completes the authorization of the target hard disk after the mapping relation between the identification code and the authorization time is saved and the calculation result is written into the target hard disk. The host bus adapter may repeat the operation a number of times until authorization of all hard disks is completed.
In the embodiment of the application, the host bus adapter can read log information of each hard disk which is authorized and output the log information on a management interface of the storage device; the log information records the problem of the corresponding hard disk and carries an identifier of the hard disk, wherein the identifier of the hard disk refers to information that a user can identify to distinguish the hard disk, and for example, the identifier of the hard disk can be slot position information of the hard disk; the management interface of the storage device refers to a software interface displayed on a host screen interfacing with the storage device.
Furthermore, the host bus adapter may monitor log information of each hard disk after outputting the log information of the hard disk that completes authorization on the management interface, and update the log information on the management interface after the log information is updated. The update process of the log information may refer to the related art, and is not described herein again.
By the aid of the method, when the hard disk on the storage device has a problem, the host bus adapter can output the problem on the management interface in time, so that a user can quickly locate the hard disk with the problem based on the log information.
In addition, when the storage device is started, the host bus adapter may sequentially select a plurality of hard disks inserted into the storage device as target hard disks.
The host bus adapter may determine whether the target hard disk completes the authorization.
In an embodiment shown, the host bus adapter may send a read IO request to the target hard disk; and the read IO request carries the recorded first storage address.
The target hard disk may report a storage result in the local first storage address to the host bus adapter based on the read IO request. After receiving the storage result returned by the target hard disk, the host bus adapter can analyze the storage result to obtain an analysis result, and then searches the analysis result in the executable file to determine whether the corresponding mapping relation is found.
On one hand, if the identification code in any mapping relation is found to be the same as the analysis result, which indicates that the target hard disk has been authorized before, the host bus adapter may read the log information of the target hard disk and output the log information on the management interface.
On the other hand, if the corresponding mapping relation is not found, it is indicated that the authorization of the target hard disk is not completed before, and the host bus adapter does not need to output the log information of the target hard disk on the management interface.
In addition, after any hard disk is inserted into the storage device, the host bus adapter can also select the hard disk as a target hard disk, and further judge whether the hard disk completes authorization. The determination process is as described above and will not be described in detail. The host bus adapter can output the log information of the target hard disk on the management interface under the condition that the target hard disk is determined to be authorized.
By the measures, after the storage device is restarted or any hard disk is inserted into the storage device, the host bus adapter can output the log information of the hard disk which has been authorized before on the management interface again, so that a user can continuously know the running condition of each hard disk through the log information on the management interface and quickly locate the problem after the storage device has the problem.
In an embodiment shown in the present disclosure, when the host bus adapter determines that the target hard disk is authorized, the storage result reported by the target hard disk may be added to the mapping relationship corresponding to the target hard disk, so as to obtain the mapping relationship between the identification code, the authorization time, and the storage result.
When subsequently checking whether any hard disk completes authorization, the host bus adapter can firstly directly search the storage result reported by the hard disk in the stored mapping relation, and if the corresponding mapping relation is searched, the hard disk is determined to complete authorization; otherwise, the storage result may be analyzed, and then the corresponding mapping relationship is searched for from the analysis result obtained by the analysis, and if the corresponding mapping relationship is found, it may be determined that the hard disk has completed authorization.
By the measures, when the host bus adapter determines whether any hard disk completes authorization, the process of analyzing the storage result is reduced, and the searching efficiency is improved.
In this embodiment, after the host bus adapter completes authorization for the plurality of hard disks inserted into the storage device, the host bus adapter may periodically check authorization time of each hard disk, determine whether each hard disk that has completed authorization needs to be maintained, and output a prompt message of a target hard disk that needs to be maintained on the management interface.
In one embodiment, the host bus adapter may periodically check the authorization time of each hard disk, subtract the authorization time of each hard disk from the current time to obtain a time difference, and then determine whether the time difference reaches a preset threshold. The preset threshold represents the duration of the hard disk which can be continuously used.
Specifically, the host bus adapter may traverse the mapping relationships stored in the executable file, sequentially select the stored mapping relationships, subtract the authorization time in the selected mapping relationship from the current time, compare the obtained time difference with a preset threshold, and determine whether the difference reaches the preset threshold.
On one hand, if the time difference does not reach the preset threshold value, the hard disk corresponding to the selected mapping relation can be determined to be still in the sustainable use duration, maintenance is temporarily not needed, and the host bus adapter can continuously select the next mapping relation for checking.
On the other hand, if the time difference reaches the preset threshold, the hard disk corresponding to the time difference can be determined as a target hard disk to be maintained, and the host bus adapter can output prompt information on the management interface; wherein, the prompt information carries the identification of the target hard disk.
And the user can maintain the target hard disk based on the prompt message and reinsert the maintained target hard disk into the storage device. The content of the hard disk may be maintained by checking whether a sector of the hard disk is damaged, checking the temperature of the hard disk, checking whether the hard disk has dust, and the like.
It should be noted that, when the user maintains the target hard disk, after pulling out the target hard disk, the host bus adapter may delete the mapping relationship corresponding to the target hard disk in the executable file. When the user completes maintenance and reinserts the target hard disk, the host bus adapter can authorize the target hard disk again. In other words, the authorization time may be cleared every time of maintenance to facilitate the next detection.
Through the measures, the host bus adapter can periodically check whether the continuous service time of each hard disk reaches the preset threshold value, and outputs the prompt information after the continuous service time of each hard disk reaches the preset threshold value, so that a user can periodically maintain the hard disks based on the prompt information.
In summary, in the technical solution of the present application, the host bus adapter of the storage device may sequentially authorize a plurality of hard disks inserted into the storage device, and store the authorization time of each hard disk after authorization is completed; then, the log information of each hard disk which completes authorization can be read, and the log information is output on a management interface; in addition, the host bus adapter can periodically check the authorization time of each hard disk, determine whether each authorized hard disk needs to be maintained, and output the prompt information of the target hard disk needing to be maintained on the management interface;
the host bus adapter can record the authorization time of the hard disk after authorizing the hard disk, so that whether the hard disk needs to be maintained can be determined according to the authorization time, and a user can maintain the hard disk at a proper time based on the prompt information;
in addition, the host bus adapter can read log information of the authorized hard disk and output the log information recording the problems of the hard disk on the management interface, so that a user can intuitively and quickly locate the problems on the management interface after the storage equipment fails.
Corresponding to the embodiment of the hard disk management method, the application also provides an embodiment of a hard disk management device.
Referring to fig. 2, a block diagram of an embodiment of a hard disk management device according to the present application is shown:
as shown in fig. 2, the hard disk management device 20 includes:
the authorization unit 210 is configured to sequentially authorize the plurality of hard disks, and store authorization time of each hard disk that completes authorization.
An output unit 220, configured to read log information of each hard disk that completes authorization, and output the log information on a management interface; the log information records the problem of the corresponding hard disk, and the management interface is a software interface on a host screen in butt joint with the storage equipment.
The checking unit 230 is configured to periodically check the authorization time of each hard disk, determine whether each hard disk that has completed authorization needs to be maintained, and output a prompt message of a target hard disk that needs to be maintained on the management interface.
In this example, the authorization unit 210 is further configured to:
sequentially selecting the plurality of hard disks as target hard disks;
sending an identification code acquisition command to the target hard disk so that the target hard disk reports a local identification code;
generating a mapping relation based on the received identification code and the authorization time, and storing the mapping relation; and the authorization time is the time when the identification code is received.
In this example, the checking unit 230 is further configured to:
periodically checking the authorization time of each hard disk, and subtracting the authorization time of each hard disk from the current time to obtain a time difference;
determining whether the time difference reaches a preset threshold value;
and if so, determining the hard disk corresponding to the time difference as a target hard disk needing to be maintained.
In this example, the apparatus further comprises:
a selecting unit 240 (not shown in the figure) for sequentially selecting the plurality of hard disks as target hard disks when the storage device is started; or when any hard disk is inserted into the storage device, selecting the hard disk as a target hard disk.
A determining unit 250 (not shown in the figure) for determining whether the target hard disk completes the authorization.
The output unit 220 is further configured to, if yes, read log information of the target hard disk, and output the log information on the management interface.
In this example, the authorization unit 210 is further configured to:
calculating the identification code of the target hard disk based on a preset strategy, writing a calculation result into the target hard disk, and recording a first storage address written into the calculation result;
the determining unit 250 (not shown in the figure) is further configured to:
sending an IO reading request to the target hard disk so that the target hard disk reports a storage result; wherein the read IO request carries the first storage address;
analyzing the storage result to obtain an analysis result;
and searching the stored mapping relation for the analysis result, and determining that the target hard disk completes authorization if the identification code in any mapping relation is the same as the analysis result.
The embodiment of the hard disk management device can be applied to the storage equipment. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical means, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the host bus adapter of the storage device in which the device is located. In terms of hardware, as shown in fig. 3, a hardware structure diagram of a host bus adapter of a storage device where a hard disk management apparatus is located in the present application is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 3, the host bus adapter of the storage device where the apparatus is located in the embodiment may also include other hardware according to the actual function of the hard disk management apparatus, which is not described again.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A hard disk management method is applied to a storage device, the storage device is inserted into a plurality of hard disks, and the method is characterized by comprising the following steps:
sequentially selecting the plurality of hard disks as target hard disks;
sending an identification code acquisition command to the target hard disk so that the target hard disk reports a local identification code;
generating a mapping relation based on the received identification code and the authorization time, and storing the mapping relation; wherein the authorization time is the time when the identification code is received;
reading log information of each hard disk after authorization is completed, and outputting the log information on a management interface; the log information records the problem of a corresponding hard disk, and the management interface is a software interface on a host screen in butt joint with the storage equipment;
and periodically checking the authorization time of each hard disk, determining whether each authorized hard disk needs to be maintained, and outputting prompt information of a target hard disk needing to be maintained on the management interface.
2. The method of claim 1, wherein periodically checking the authorized time of each hard disk to determine whether each hard disk that has completed authorization needs maintenance comprises:
periodically checking the authorization time of each hard disk, and subtracting the authorization time of each hard disk from the current time to obtain a time difference;
determining whether the time difference reaches a preset threshold value;
and if so, determining the hard disk corresponding to the time difference as a target hard disk needing to be maintained.
3. The method of claim 1, further comprising:
when the storage equipment is started, sequentially selecting the plurality of hard disks as target hard disks; or the like, or, alternatively,
when any hard disk is inserted into the storage device, selecting the hard disk as a target hard disk;
determining whether the target hard disk is authorized;
if so, reading the log information of the target hard disk, and outputting the log information on the management interface.
4. The method of claim 3, wherein the authorizing the plurality of hard disks in sequence comprises:
calculating the identification code of the target hard disk based on a preset strategy, writing a calculation result into the target hard disk, and recording a first storage address written into the calculation result;
the determining whether the target hard disk completes authorization includes:
sending an IO reading request to the target hard disk so that the target hard disk reports a storage result; wherein the read IO request carries the first storage address;
analyzing the storage result to obtain an analysis result;
and searching the stored mapping relation for the analysis result, and determining that the target hard disk completes authorization if the identification code in any mapping relation is the same as the analysis result.
5. A hard disk management device is applied to a storage device, wherein the storage device is inserted into a plurality of hard disks, and the hard disk management device is characterized by comprising:
the authorization unit is used for sequentially selecting the plurality of hard disks as target hard disks; sending an identification code acquisition command to the target hard disk so that the target hard disk reports a local identification code; generating a mapping relation based on the received identification code and the authorization time, and storing the mapping relation; wherein the authorization time is the time when the identification code is received;
the output unit is used for reading log information of each hard disk which completes authorization and outputting the log information on a management interface; the log information records the problem of a corresponding hard disk, and the management interface is a software interface on a host screen in butt joint with the storage equipment;
and the checking unit is used for periodically checking the authorization time of each hard disk, determining whether each authorized hard disk needs to be maintained or not, and outputting prompt information of a target hard disk needing to be maintained on the management interface.
6. The apparatus of claim 5, wherein the inspection unit is further configured to:
periodically checking the authorization time of each hard disk, and subtracting the authorization time of each hard disk from the current time to obtain a time difference;
determining whether the time difference reaches a preset threshold value;
and if so, determining the hard disk corresponding to the time difference as a target hard disk needing to be maintained.
7. The apparatus of claim 6, further comprising:
the selection unit is used for sequentially selecting the plurality of hard disks as target hard disks when the storage equipment is started; or, when any hard disk is inserted into the storage device, selecting the hard disk as a target hard disk;
the determining unit is used for determining whether the target hard disk completes authorization;
and the output unit is further used for reading the log information of the target hard disk and outputting the log information on the management interface if the log information is positive.
8. The apparatus of claim 7, wherein the authorization unit is further configured to:
calculating the identification code of the target hard disk based on a preset strategy, writing a calculation result into the target hard disk, and recording a first storage address written into the calculation result;
the determining unit is further configured to:
sending an IO reading request to the target hard disk so that the target hard disk reports a storage result; wherein the read IO request carries the first storage address;
analyzing the storage result to obtain an analysis result;
and searching the stored mapping relation for the analysis result, and determining that the target hard disk completes authorization if the identification code in any mapping relation is the same as the analysis result.
CN201711166784.5A 2017-11-21 2017-11-21 Hard disk management method and device Active CN107885640B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711166784.5A CN107885640B (en) 2017-11-21 2017-11-21 Hard disk management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711166784.5A CN107885640B (en) 2017-11-21 2017-11-21 Hard disk management method and device

Publications (2)

Publication Number Publication Date
CN107885640A CN107885640A (en) 2018-04-06
CN107885640B true CN107885640B (en) 2020-11-10

Family

ID=61778366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711166784.5A Active CN107885640B (en) 2017-11-21 2017-11-21 Hard disk management method and device

Country Status (1)

Country Link
CN (1) CN107885640B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113779651B (en) * 2021-09-23 2022-06-24 北京神州慧安科技有限公司 Hard disk anti-theft method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597990A (en) * 2009-11-02 2012-07-18 应用材料公司 Automated corrective and predictive maintenance system
CN103941705A (en) * 2014-04-29 2014-07-23 安徽江淮汽车股份有限公司 Site plant management system and method
CN104123213A (en) * 2014-08-08 2014-10-29 浪潮电子信息产业股份有限公司 Remote SAS hard disk backboard managing system
CN105989432A (en) * 2015-02-03 2016-10-05 香港纺织及成衣研发中心有限公司 Computer processing system for asset maintenance management or performance evaluation and method
CN107066370A (en) * 2017-04-26 2017-08-18 郑州云海信息技术有限公司 A kind of automatic monitoring and the instrument and method for collecting faulty hard disk daily record
CN107256193A (en) * 2017-06-26 2017-10-17 长沙开雅电子科技有限公司 A kind of server storage novel hard disk indicator lamp localization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9959514B2 (en) * 2014-11-24 2018-05-01 International Business Machines Corporation Optimized asset maintenance and replacement schedule

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102597990A (en) * 2009-11-02 2012-07-18 应用材料公司 Automated corrective and predictive maintenance system
CN103941705A (en) * 2014-04-29 2014-07-23 安徽江淮汽车股份有限公司 Site plant management system and method
CN104123213A (en) * 2014-08-08 2014-10-29 浪潮电子信息产业股份有限公司 Remote SAS hard disk backboard managing system
CN105989432A (en) * 2015-02-03 2016-10-05 香港纺织及成衣研发中心有限公司 Computer processing system for asset maintenance management or performance evaluation and method
CN107066370A (en) * 2017-04-26 2017-08-18 郑州云海信息技术有限公司 A kind of automatic monitoring and the instrument and method for collecting faulty hard disk daily record
CN107256193A (en) * 2017-06-26 2017-10-17 长沙开雅电子科技有限公司 A kind of server storage novel hard disk indicator lamp localization method

Also Published As

Publication number Publication date
CN107885640A (en) 2018-04-06

Similar Documents

Publication Publication Date Title
US10649838B2 (en) Automatic correlation of dynamic system events within computing devices
CN108829580B (en) Multi-version test data processing method, device, equipment and storage medium
CN106951345B (en) Consistency test method and device for disk data of virtual machine
US11327742B2 (en) Affinity recommendation in software lifecycle management
US20160232450A1 (en) Storage device lifetime monitoring system and storage device lifetime monitoring method thereof
CN110008129B (en) Reliability test method, device and equipment for storage timing snapshot
US20140101106A1 (en) Log server and log file storage method
US11257565B2 (en) Management of test resources to perform testing of memory components under different temperature conditions
US20200194092A1 (en) Multi-dimensional usage space testing of memory components
US20140379649A1 (en) Distributed storage system and file synchronization method
CN108595323B (en) System testing method and related device
CN107885640B (en) Hard disk management method and device
CN111694724A (en) Testing method and device of distributed table system, electronic equipment and storage medium
CN115309334A (en) Disk management method, device, equipment and storage medium
CN113806119B (en) Memory card processing method, device, equipment and storage medium
CN116149577B (en) Data processing method, system and readable storage medium based on rotary pool
CN110795297B (en) Electronic equipment testing method and device
CN110188079B (en) External equipment management method based on distributed storage database
US20230195609A1 (en) Automatic generation of summary report for validation tests of computing systems
CN116841463A (en) Data verification method, device and equipment of storage equipment and storage medium
CN117971535A (en) System inspection method, device, computer equipment and storage medium
CN117033099A (en) Pressure testing method, system and device for system hard disk and storage medium
CN115168124A (en) Stability test method and device for concurrently executing multiple files on hard disk, computer equipment and medium
CN114385574A (en) Log processing method and device, electronic equipment and storage medium
CN117541045A (en) Resource transfer risk detection method, electronic equipment and 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