CN106843768B - Hard disk data erasing method and device - Google Patents

Hard disk data erasing method and device Download PDF

Info

Publication number
CN106843768B
CN106843768B CN201710056326.XA CN201710056326A CN106843768B CN 106843768 B CN106843768 B CN 106843768B CN 201710056326 A CN201710056326 A CN 201710056326A CN 106843768 B CN106843768 B CN 106843768B
Authority
CN
China
Prior art keywords
hard disk
erasing
data
positioning
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
CN201710056326.XA
Other languages
Chinese (zh)
Other versions
CN106843768A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710056326.XA priority Critical patent/CN106843768B/en
Publication of CN106843768A publication Critical patent/CN106843768A/en
Application granted granted Critical
Publication of CN106843768B publication Critical patent/CN106843768B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • 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

Abstract

The invention provides a method and a device for erasing hard disk data, wherein the method comprises the following steps: after the hard disk erasing tool sent by the main server is received, the hard disk erasing tool is operated, so that the hard disk erasing tool is utilized to execute the steps of positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the host computer and the hard disk in the target server to obtain the positioning information, and executing data erasing aiming at the hard disk indicated by the positioning information, the hard disk data can be erased without dismantling the hard disk, and the technical problems of high hard disk data erasing cost and low efficiency in the prior art are solved.

Description

Hard disk data erasing method and device
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method and an apparatus for erasing data in a hard disk.
Background
The hard disk is a main medium for storing data, and a server in a data center needs to rely on the hard disk to store a large amount of data, so that a large amount of sensitive data is often stored in the hard disk, and the information security of the data must be ensured. Therefore, when the data center server is over-maintained or the machine room is moved, the data stored on the hard disk needs to be erased, so that the data is prevented from being recovered and leaked.
In the prior art, the hard disks are usually manually detached from the server or the storage cabinet, and then the data erasing is performed on each hard disk collectively by the data erasing machine. However, a large amount of labor is required to disassemble the hard disks, and the hard disks are various in kind and different hard disks have different interfaces, so that the data erasing machine needs to adapt to various hard disks to erase data in the hard disks, which results in high material cost required by the data erasing machine. Therefore, in the prior art, the hard disk is detached from the server, and then the data erasing mode is performed on each hard disk by the data erasing machine in a centralized manner, so that the data erasing of the hard disk needs a large amount of labor and material cost, and the data erasing efficiency is low.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a hard disk data erasing method, so as to solve the technical problem of low data erasing efficiency in the prior art.
The second objective of the present invention is to provide a hard disk data erasing device.
A third object of the invention is to propose a computer device.
A fourth object of the invention is to propose a non-transitory computer-readable storage medium.
A fifth object of the invention is to propose a computer program product.
To achieve the above object, an embodiment of a first aspect of the present invention provides a hard disk data erasing method for erasing data from a hard disk in a target server, including:
receiving a hard disk erasing tool sent by a main server;
operating the hard disk erasing tool;
and positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the host and the hard disk in the target server to obtain positioning information by utilizing the hard disk erasing tool, and executing the step of erasing data aiming at the hard disk indicated by the positioning information.
According to the hard disk data erasing method provided by the embodiment of the invention, after the hard disk erasing tool sent by the main server is received, the hard disk erasing tool is operated, so that the hard disk erasing tool is utilized to execute the step of positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the host and the hard disk in the target server to obtain the positioning information, and the data erasing is carried out aiming at the hard disk indicated by the positioning information, the hard disk data can be erased without dismantling the hard disk, and the technical problems of high hard disk data erasing cost and low efficiency in the prior art are solved.
In order to achieve the above object, a second embodiment of the present invention provides a hard disk data erasing apparatus for erasing data from a hard disk in a target server, including:
the receiving module is used for receiving the hard disk erasing tool sent by the main server;
the operation module is used for operating the hard disk erasing tool;
and the execution module is used for positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the host and the hard disk in the target server by utilizing the hard disk erasing tool to obtain the positioning information, and executing the step of erasing data aiming at the hard disk indicated by the positioning information.
According to the hard disk data erasing device provided by the embodiment of the invention, after the hard disk erasing tool sent by the main server is received, the hard disk erasing tool is operated, so that the hard disk erasing tool is utilized to execute the step of positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the host and the hard disk in the target server to obtain the positioning information, and the data erasing is carried out aiming at the hard disk indicated by the positioning information, the hard disk data can be erased without dismantling the hard disk, and the technical problems of high hard disk data erasing cost and low efficiency in the prior art are solved.
To achieve the above object, a third embodiment of the present invention provides a computer device, a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hard disk data erasing method according to the first aspect.
In order to achieve the above object, a fourth aspect of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the hard disk data erasing method of the first aspect.
In order to achieve the above object, an embodiment of a fifth aspect of the present invention provides a computer program product, which when executed by an instruction processor in the computer program product, executes the hard disk data erasing method of the first aspect.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of a hard disk data erasing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another hard disk data erasing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a hard disk erase tool;
FIG. 4 is a flowchart illustrating a method performed by the controller differential mask;
FIG. 5 is a flowchart illustrating a method performed by the data erase operation layer;
FIG. 6 is a schematic structural diagram of a hard disk data erasing apparatus according to an embodiment of the present invention; and
fig. 7 is a schematic structural diagram of another hard disk data erasing apparatus provided in this embodiment.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
Hereinafter, a hard disk data erasing method and apparatus according to an embodiment of the present invention will be described with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a hard disk data erasing method according to an embodiment of the present invention, where the method provided in this embodiment may be executed by a target server, so as to erase data from a hard disk in the target server, as shown in fig. 1, the method includes:
step 101, receiving a hard disk erasing tool sent by a main server.
Specifically, in general, a server cluster includes a master server and a plurality of slave servers, the master server interacts with each of the slave servers, and when some or all of the plurality of slave servers need to be scrapped, the servers that need to be scrapped may be used as target servers. The main server controls the target server to start a preboot execution environment (PXE) system through the control network. And then the main server sends the hard disk erasing tool, and the target server acquires the hard disk erasing tool from the main server based on the PXE system.
And step 102, operating the hard disk erasing tool.
Specifically, the hard disk erasing tool runs based on the operating system of the target server, and the hard disk erasing tool and the operating system of the target server can interact through a software interface.
And 103, positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the server host and the hard disk in the target server by using a hard disk erasing tool to obtain positioning information, and executing data erasing for the hard disk indicated by the positioning information.
Specifically, when a certain server is scrapped or off-shelf, it is not determined which hard disks are specifically used by the server, and particularly when the server is externally connected with storage devices such as a disk array, the hard disks must be located. In the positioning process, when the connection type is direct connection, a hard disk erasing tool positions the hard disks according to equipment files in an operating system of the target server, and when the connection type is RAID, the hard disk erasing tool positions the hard disks according to physical hard disk identification codes of the hard disks in the target server. And then, aiming at the hard disk indicated by the positioning information, the hard disk erasing tool adopts a command corresponding to the interface type to erase data of the hard disk according to the interface type of the hard disk.
In this embodiment, after receiving the hard disk erasing tool sent by the main server, the hard disk erasing tool is operated, so that the hard disk erasing tool is used to perform the step of positioning the hard disk in a manner corresponding to the connection type according to the connection type between the host computer in the target server and the hard disk to obtain the positioning information, and perform data erasing on the hard disk indicated by the positioning information, and the hard disk data can be erased without detaching the hard disk, thereby solving the technical problems of high cost and low efficiency in hard disk data erasing in the prior art.
For clearly explaining the previous embodiment, this embodiment provides another hard disk data erasing method, fig. 2 is a schematic flow chart of the another hard disk data erasing method provided by the embodiment of the present invention, the method provided by this embodiment may be executed by a master server and a slave server in a cluster, and as shown in fig. 2, the method includes.
As shown in fig. 2, the hard disk data erasing method may include the steps of:
step 201, the master server issues a hard disk erasing tool to a pre-scrapped target server in a plurality of slave servers.
Specifically, the main server issues a hard disk erasing tool to the pre-scrapped target server, where the hard disk erasing tool is divided into three layers, and fig. 3 is a schematic structural diagram of the hard disk erasing tool, as shown in fig. 3, including: the device comprises a unified interface layer, a controller difference shielding layer and a data erasing operation layer.
And the unified interface layer is used for interfacing with an operating system of the target server and setting a working mode of hard disk erasing, wherein the working mode comprises full disk erasing and non-system disk erasing.
Generally, the hard disk of the server includes a plurality of hard disk partitions, and the plurality of hard disk partitions includes a system disk and a data disk, and the system disk is different from the data disk in that an operating system is stored in the system disk. When the hard disk data is erased, a user can select to perform full disk erasing according to requirements, that is, to erase all data in the system disk and the data disk, and certainly, can also select to perform non-system disk erasing, that is, to erase only data in the data disk.
And the controller difference shielding layer is used for positioning the hard disk in a mode corresponding to the connection type according to the connection type of the host and the hard disk in the target server to obtain positioning information.
Specifically, the hard disk is connected to a Host Adapter (Host Bus Adapter) at a bottom layer of an input/output (IO) layer of a computer system to communicate with a Host. The common connection modes of hard Disks are divided into two types, one is direct connection, and the other is disk array (RAID). The main function of the controller differential shielding layer is to judge the connection type of the disk, and position the hard disk in different modes according to whether the connection type is RAID or direct connection.
Further, the controller differential shielding layer may also obtain slot position information of the hard disk, and send the slot position information to the data erasing operation layer, as shown in fig. 3, based on this, the controller differential shielding layer includes a controller type identification component, a hard disk slot position obtaining component, and a hard disk positioning component.
The data erasing operation layer is used for erasing data aiming at the hard disk indicated by the positioning information in a set working mode; acquiring an erasing result of the hard disk and/or physical information of the hard disk; and returning the erasing result and/or the physical information of the hard disk to the main server. The data erasing operation layer is shown in fig. 3 and includes a hard disk information collecting component, a hard disk data erasing component and an erasing result verifying component.
The erasure result at least comprises information of erasure time consumption and/or erasure success, and the physical information at least comprises slot position information, a serial number and/or a model number.
The hard disk erase tool will be described with reference to specific steps.
Step 202, after the target server receives the hard disk erasing tool sent by the main server, the hard disk erasing tool is operated.
Step 203, the controller difference shielding layer in the hard disk erasing tool executes the steps of obtaining the slot position information of the hard disk and positioning the hard disk according to the connection type of the server host and the hard disk.
Specifically, as a possible implementation manner when the controller differential shielding layer in the hard disk erasing tool locates the hard disk, fig. 4 is a schematic flow chart of a method executed by the controller differential shielding layer, as shown in fig. 4, including:
step 2031, obtain the controller type of the hard disk and the slot information of the hard disk.
Specifically, the hard disk slot obtaining component and the controller type identification component in the controller difference shielding layer may interact with the operating system through the unified interface layer, so that the controller type identification component obtains the controller type of the hard disk, and the hard disk slot obtaining component obtains the slot information of the hard disk.
Step 2032, determine whether the connection type is RAID, if yes, execute step 2033, otherwise execute step 2034.
Specifically, when the connection type is direct connection, one device file in a directory of the operating system corresponds to one physical hard disk, and the position of the hard disk can be located according to the device file, and when the connection type is RAID, the position of the hard disk cannot be located according to the device file if one device file is formed by a plurality of physical hard disks. Therefore, different ways of positioning are required for different connection types. In the process of identifying the connection type by the hard disk positioning component, whether the connection type is RAID or direct connection may be determined specifically according to the controller type of the hard disk obtained by the controller type identification component.
Step 2033, if the connection type is RAID, selecting a corresponding tool according to the type of the hard disk to obtain a physical hard disk identification code of the hard disk, and positioning based on the physical hard disk identification code.
Specifically, if the type of the hard disk is LSI, wherein LSI is the name of the hard disk manufacturer, the hard disk positioning component acquires the physical hard disk identification code by using MegaCli tool or MegaTool. If the type of the hard disk is not LSI, the hard disk positioning component acquires the physical hard disk identification code by adopting an hpacucli tool and performs positioning based on the physical hard disk identification code.
MegaCli, MegaTool, and hpacucli are names of hardware management tools.
Step 2034, if the connection type is not RAID, acquiring the device file of the hard disk, and performing positioning based on the device file.
Specifically, if the connection type is not RAID, generally, the connection type is direct connection, the hard disk location component queries the device file through a directory of the operating system, and since the device file and the hard disk are in a one-to-one correspondence relationship, the hard disk can be located through the device file, that is, the identifier of the device file is used as location information.
Step 2035, sending the positioning information to the data erasure operation layer.
Because in the controller difference shielding layer, when the hard disk is positioned, the hard disk is influenced by the connection type of the hard disk, different positioning modes are required to be adopted aiming at different connection types, and therefore, the positioning step executed based on the controller difference shielding layer can realize adaptation to different connection types, and the positioning requirement of the hard disk is met.
As shown in fig. 2, after step 203, the method further includes:
and 204, in the set working mode, executing data erasing on the hard disk indicated by the positioning information, analyzing and verifying the hard disk subjected to data erasing to obtain an erasing result of the hard disk, and returning the erasing result and the physical information of the hard disk to the main server.
Specifically, the data erasing operation layer sends different commands to erase data of the hard disk indicated by the positioning information according to different interface types. When data is specifically erased, the hard disk data erasing component in the data erasing operation layer needs to erase data of the hard disk in a full disk erasing mode or a non-system disk erasing mode according to a working mode set by the unified interface layer. And an erasing result verification component in the data erasing operation layer analyzes and verifies the hard disk after data erasing to obtain an erasing result of the hard disk including time consumption of erasing and success of erasing.
As a possible implementation manner, fig. 5 is a schematic flowchart of a method executed by the data erasing operation layer, and as shown in fig. 5, the method includes:
step 2041, obtain the physical information of the hard disk.
Specifically, the physical information indicates basic information such as interface type, capacity, slot information, serial number and/or model number of the hard disk. The aforementioned physical information may be obtained by the hard disk information collection component from the operating system of the target server and from the controller difference shielding layer.
Step 2042, the data erasure timeout time of the hard disk is set according to the interface type and capacity in the physical information.
Because the interface types and capacities are different, the hard disk data erasing time consumption has certain difference, so when the timeout time is set, the hard disk data erasing component adaptively adjusts the set timeout time according to different interface types and capacities by taking the difference into consideration.
Step 2043, within the preset timeout period, the data erasure operation of the hard disk is executed.
Specifically, the hard disk data erasing component performs data erasing operation on the established physical hard disk within a preset timeout according to the positioning information.
Step 2044, determine whether the data erasure is successful, if so, go to step 2045, otherwise go to step 2046.
Specifically, if error information feedback is received in the data erasing process of the hard disk, or the feedback of data erasing completion is not received within a preset timeout period, the hard disk data erasing component determines that the data erasing is unsuccessful; conversely, if the feedback of the completion of the data erasure is received within the preset timeout period, the hard disk data erasure component determines that the data erasure is successful.
Step 2045, if the data erasure is successful, the hard disk data erasure result is verified.
The verification step is to determine that the data to be erased does not exist in the hard disk, so as to prevent the situation that the data in the hard disk is not erased when an error occurs in the feedback of the completion of data erasing. After the verification of the erase result verifying component is passed, step 2046 is executed, and if the verification is not passed, the data erase operation in step 2043 needs to be executed again on the hard disk.
Step 2046, generate the erase result of the hard disk, and send the erase result of the hard disk and the physical information of the hard disk to the host server.
Specifically, a hard disk information acquisition component in the data erasing operation layer acquires an erasing result of the hard disk and physical information of the hard disk, and the acquired information is sent to the main server through the unified interface layer and the operating system of the target server, so that a user can check the erasing result of the hard disk and the physical information of the hard disk on the main server.
In this embodiment, after receiving the hard disk erasing tool sent by the main server, the hard disk erasing tool is operated, so that the hard disk erasing tool is used to perform the step of positioning the hard disk in a manner corresponding to the connection type according to the connection type between the host computer in the target server and the hard disk to obtain the positioning information, and perform data erasing on the hard disk indicated by the positioning information, and the hard disk data can be erased without detaching the hard disk, thereby solving the technical problems of high cost and low efficiency in hard disk data erasing in the prior art.
In order to implement the above embodiments, the present invention further provides a hard disk data erasing apparatus.
Fig. 6 is a schematic structural diagram of a hard disk data erasing apparatus according to an embodiment of the present invention, where the hard disk data erasing apparatus is used to erase data from a hard disk in a target server.
As shown in fig. 6, the hard disk data erasing apparatus includes: a receiving module 61, an execution module 62 and an execution module 63.
And the receiving module 61 is used for receiving the hard disk erasing tool sent by the main server.
And an operation module 62 for operating the hard disk erasing tool.
And the execution module 63 is configured to execute, by using the hard disk erasing tool, the steps of positioning the hard disk by using a manner corresponding to the connection type according to the connection type between the host and the hard disk in the target server to obtain the positioning information, and executing data erasing with respect to the hard disk indicated by the positioning information.
Further, for clearly explaining the embodiment, the embodiment also provides another hard disk data erasing apparatus, in a possible implementation manner of the embodiment of the present invention, based on fig. 6, fig. 7 is a schematic structural diagram of another hard disk data erasing apparatus provided in the embodiment, and as shown in fig. 7, the executing module 63 includes: a positioning unit 631 and an erasing unit 632.
A positioning unit 631, configured to, when the connection type is a direct connection, position the hard disk according to an equipment file in an operating system of the target server; and when the connection type is RAID, positioning the hard disks according to the physical hard disk identification codes of the hard disks in the target server.
And an erasing unit 632, configured to erase, according to the interface type of the hard disk, data of the hard disk by using a command corresponding to the interface type, for the hard disk indicated by the positioning information.
Further, the hard disk data erasing apparatus further includes: an acquisition module 64 and a sending module 65.
An obtaining module 64, configured to obtain an erase result of the hard disk and/or physical information of the hard disk; the erasure result comprises information of erasure time consumption and/or erasure success, and the physical information comprises slot position information, a serial number and/or a model number.
A sending module 65, configured to return the erasing result and/or the physical information of the hard disk to the main server.
It should be noted that the foregoing explanation of the method embodiment is also applicable to the apparatus of this embodiment, and is not repeated herein.
In the embodiment of the invention, after the hard disk erasing tool sent by the main server is received, the hard disk erasing tool is operated, so that the hard disk erasing tool is utilized to execute the step of positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type between the host computer in the target server and the hard disk to obtain the positioning information, and the data erasing is executed aiming at the hard disk indicated by the positioning information, the hard disk data can be erased without dismantling the hard disk, and the technical problems of higher cost and lower efficiency of hard disk data erasing in the prior art are solved.
In order to implement the foregoing embodiment, the present invention further provides a computer device, including: the hard disk data erasing method comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the program, the hard disk data erasing method is realized.
In order to implement the above embodiments, the present invention also proposes a non-transitory computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the aforementioned hard disk data erasing method.
In order to implement the foregoing embodiments, the present invention further provides a computer program product for erasing data from a hard disk in a target server, where when executed by an instruction processor in the computer program product, a hard disk data erasing method is performed, and the method includes: receiving a hard disk erasing tool sent by a main server; operating the hard disk erasing tool; and positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the host and the hard disk in the target server to obtain positioning information by utilizing the hard disk erasing tool, and executing the step of erasing data aiming at the hard disk indicated by the positioning information.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (8)

1. A hard disk data erasing method is used for erasing data of a hard disk in a target server, and comprises the following steps:
receiving a hard disk erasing tool sent by a main server; the hard disk erasing tool comprises a uniform interface layer, a controller difference shielding layer and a data erasing operation layer;
operating the hard disk erasing tool;
positioning the hard disk by using a control difference shielding layer of the hard disk erasing tool in a manner corresponding to the connection type according to the connection type of the host and the hard disk in the target server to obtain positioning information; sending the positioning information to the data erasing operation layer;
the data erasing operation layer adopts a command corresponding to the interface type to erase data of the hard disk according to the interface type of the hard disk aiming at the hard disk indicated by the positioning information under a working mode set by the unified interface layer, an erasing result verification component in the data erasing operation layer analyzes and verifies the hard disk after data erasing to obtain an erasing result and returns the erasing result and the physical information of the hard disk to the main server, wherein the working mode comprises full disk erasing and non-system disk erasing to obtain the physical information of the hard disk, the data erasing timeout time of the hard disk is set according to the interface type and the capacity in the physical information, and the data erasing operation of the hard disk is executed within the preset timeout time.
2. The method for erasing data on a hard disk according to claim 1, wherein the positioning the hard disk in a manner corresponding to the connection type according to the connection type between the host and the hard disk in the target server to obtain the positioning information comprises:
when the connection type is direct connection, positioning the hard disk according to a device file in an operating system of the target server;
and when the connection type is RAID, positioning the hard disks according to the physical hard disk identification codes of the hard disks in the target server.
3. The method for erasing data on a hard disk according to claim 1 or 2, wherein before returning the erase result and the physical information on the hard disk to the host server, the method further comprises:
acquiring an erasing result of the hard disk and/or physical information of the hard disk; the erasure result comprises information of erasure time consumption and/or erasure success, and the physical information comprises slot position information, a serial number and/or a model number.
4. A hard disk data erasing device is used for erasing data of a hard disk in a target server, and comprises the following components:
the receiving module is used for receiving the hard disk erasing tool sent by the main server; the hard disk erasing tool comprises a uniform interface layer, a controller difference shielding layer and a data erasing operation layer;
the operation module is used for operating the hard disk erasing tool;
the execution module is used for positioning the hard disk by adopting a mode corresponding to the connection type according to the connection type of the host and the hard disk in the target server by utilizing the control difference shielding layer of the hard disk erasing tool to obtain positioning information; sending the positioning information to the data erasing operation layer; the data erasing operation layer adopts a command corresponding to the interface type to erase data of the hard disk according to the interface type of the hard disk aiming at the hard disk indicated by the positioning information under a working mode set by the unified interface layer, an erasing result verification component in the data erasing operation layer analyzes and verifies the hard disk after data erasing to obtain an erasing result and returns the erasing result and the physical information of the hard disk to the main server, wherein the working mode comprises full disk erasing and non-system disk erasing to obtain the physical information of the hard disk, the data erasing timeout time of the hard disk is set according to the interface type and the capacity in the physical information, and the data erasing operation of the hard disk is executed within the preset timeout time.
5. The device for erasing data on a hard disk according to claim 4, wherein the executing module comprises:
the positioning unit is used for positioning the hard disk according to the equipment file in the operating system of the target server when the connection type is direct connection; and when the connection type is RAID, positioning the hard disks according to the physical hard disk identification codes of the hard disks in the target server.
6. The apparatus according to claim 4 or 5, further comprising:
the acquisition module is used for acquiring the erasing result of the hard disk and/or the physical information of the hard disk; the erasure result comprises information of erasure time consumption and/or erasure success, and the physical information comprises slot position information, a serial number and/or a model number.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, implements the hard disk data erasure method according to any one of claims 1 to 3.
8. A non-transitory computer-readable storage medium, on which a computer program is stored, the program, when executed by a processor, implementing a hard disk data erasing method according to any one of claims 1 to 3.
CN201710056326.XA 2017-01-25 2017-01-25 Hard disk data erasing method and device Active CN106843768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710056326.XA CN106843768B (en) 2017-01-25 2017-01-25 Hard disk data erasing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710056326.XA CN106843768B (en) 2017-01-25 2017-01-25 Hard disk data erasing method and device

Publications (2)

Publication Number Publication Date
CN106843768A CN106843768A (en) 2017-06-13
CN106843768B true CN106843768B (en) 2020-06-23

Family

ID=59121147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710056326.XA Active CN106843768B (en) 2017-01-25 2017-01-25 Hard disk data erasing method and device

Country Status (1)

Country Link
CN (1) CN106843768B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932440A (en) * 2018-08-15 2018-12-04 郑州云海信息技术有限公司 A kind of method and system, equipment for destroying hard disc data
KR102442126B1 (en) * 2022-04-13 2022-09-08 (주)데이타프로텍 Disk management system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577700A (en) * 2008-05-05 2009-11-11 北京瑞佳晨科技有限公司 Method for destroying computer disk data based on network environment
CN103218180A (en) * 2013-05-14 2013-07-24 北京百度网讯科技有限公司 Disk positioning method and device
CN103295638A (en) * 2013-06-06 2013-09-11 国家电网公司 Portable electronic storage medium data wiping device and data wiping method based on same
CN103443757A (en) * 2012-12-31 2013-12-11 华为技术有限公司 Erasing method, erasing device and erasing system
CN105183388A (en) * 2015-09-14 2015-12-23 北京华青融天技术有限责任公司 Obtaining method, device and system for hardware physics serial number
CN105608395A (en) * 2016-02-03 2016-05-25 广州嘉磊元新信息科技有限公司 System and method for batch hard disk data destruction fault isolation and data residual verification

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577700A (en) * 2008-05-05 2009-11-11 北京瑞佳晨科技有限公司 Method for destroying computer disk data based on network environment
CN103443757A (en) * 2012-12-31 2013-12-11 华为技术有限公司 Erasing method, erasing device and erasing system
CN103218180A (en) * 2013-05-14 2013-07-24 北京百度网讯科技有限公司 Disk positioning method and device
CN103295638A (en) * 2013-06-06 2013-09-11 国家电网公司 Portable electronic storage medium data wiping device and data wiping method based on same
CN105183388A (en) * 2015-09-14 2015-12-23 北京华青融天技术有限责任公司 Obtaining method, device and system for hardware physics serial number
CN105608395A (en) * 2016-02-03 2016-05-25 广州嘉磊元新信息科技有限公司 System and method for batch hard disk data destruction fault isolation and data residual verification

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
存储介质信息消除技术的研究与实现;王犇;《中国优秀硕士学位论文全文数据库信息科技辑》;20091215;第12-14、19-20、35-47页 *

Also Published As

Publication number Publication date
CN106843768A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
TWI548233B (en) Server, server management system and server management method
CN104199706A (en) Firmware upgrade method and device for eMMC
US8601460B2 (en) Systems and methods for firmware cloning
CN103559054A (en) Implementing and deleting method and device for intelligent terminal multi-operation system
CN104317667A (en) Method for synchronizing DMI (desktop management interface) and FRU (field replace unit)
US10922071B2 (en) Centralized off-board flash memory for server devices
CN104104547A (en) Management method for network equipment configuration files, and network controller
US9588542B2 (en) Rack server system and method for automatically managing rack configuration information
US20130151667A1 (en) Method for automatic installation and setting of server and application program for the same
CN105677388A (en) Firmware updating method for motor controller of electric vehicle
CN103136083A (en) Test device and test method of universal serial bus
CN105099786A (en) Method and apparatus of service configuration in network cutover
CN106843768B (en) Hard disk data erasing method and device
CN110007858B (en) Storage space allocation method and device
CN103942088B (en) A kind of method for obtaining virtual machine USB storage device service condition
CN108196861B (en) Data upgrading method and diagnostic equipment thereof
CN115314416B (en) Network card state automatic detection method and device, electronic equipment and storage medium
US11537405B2 (en) System and method for activating a replacement component in a medical device
CN110620677A (en) Network system and authentication method
US8086834B2 (en) System and method for populating a dedicated system service repository for an information handling system
CN109582332A (en) The method for upgrading system and device of internet video camera
US9870234B2 (en) Automatic identification of returned merchandise in a data center
CN104811347A (en) Software updating method, monitoring module, rectifying module and system
CN112445670B (en) eMMC test method and device
CN109684153A (en) Server and its firmware updating method with double firmware storage spaces

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