CN110737408B - Method, system and device for removing hard disk - Google Patents

Method, system and device for removing hard disk Download PDF

Info

Publication number
CN110737408B
CN110737408B CN201910995216.9A CN201910995216A CN110737408B CN 110737408 B CN110737408 B CN 110737408B CN 201910995216 A CN201910995216 A CN 201910995216A CN 110737408 B CN110737408 B CN 110737408B
Authority
CN
China
Prior art keywords
hard disk
information
data
partition
clearing
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
CN201910995216.9A
Other languages
Chinese (zh)
Other versions
CN110737408A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910995216.9A priority Critical patent/CN110737408B/en
Publication of CN110737408A publication Critical patent/CN110737408A/en
Application granted granted Critical
Publication of CN110737408B publication Critical patent/CN110737408B/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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0623Securing storage systems in relation to content
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method, a system and a device for removing a hard disk, wherein the incomplete removal of partition information and RAID information of the hard disk can influence the subsequent use of the hard disk, and the incomplete removal of data information of the hard disk can not influence the subsequent use of the hard disk. Therefore, the hard disk cleaning method can effectively clean the partition information and RAID information of the hard disk, can destroy the original data structure of the hard disk, achieves the purpose of cleaning data information, has obvious efficiency improvement compared with the full disk cleaning, and can meet the high-timeliness requirement of the hard disk cleaning task.

Description

Method, system and device for removing hard disk
Technical Field
The present invention relates to the field of data security, and in particular, to a method, system, and apparatus for removing a hard disk.
Background
The hard disk is used as a carrier of data and is an indispensable component on a server product. At present, most hard disks can support repeated use, but the problem of data security is faced because data used before are stored on the hard disks, and data leakage is caused if the data are not processed properly, so that data clearing is very important for the repeated use of the hard disks. In the prior art, a hard disk is usually cleared by writing 0 to the hard disk, but the hard disk clearing method takes a long time, and particularly for a large-capacity hard disk, the clearing efficiency is very low, and the high-timeliness requirement of a hard disk clearing task cannot be met.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a method, a system and a device for removing a hard disk, which can effectively remove partition information and RAID information of the hard disk, can also destroy the original data structure of the hard disk, achieve the aim of removing data information, and have obvious efficiency improvement compared with the full disk removal, thereby meeting the high-timeliness requirement of a hard disk removal task.
In order to solve the above technical problem, the present invention provides a hard disk cleaning method, including:
determining the partition information position, the data information position and the RAID information position of the hard disk in advance according to the hard disk storage information;
clearing the partition information of the hard disk according to the partition information position;
according to a preset data information part clearing rule, clearing part of data in the data information corresponding to the data information position;
and clearing the RAID information of the hard disk according to the RAID information position.
Preferably, the process of determining the partition information location of the hard disk in advance according to the hard disk storage information includes:
determining the type of a partition table in a hard disk in advance according to hard disk storage information, and determining the partition information position of the hard disk according to the type of the partition table; the partition information of the hard disk is located in the foremost block of the hard disk.
Preferably, the process of clearing the partition information of the hard disk according to the partition information location includes:
setting a partition information clearing position of the hard disk in advance according to partition information positions corresponding to different types of partition tables;
and clearing all data corresponding to the partition information clearing position.
Preferably, the process of determining the RAID information location of the hard disk in advance according to the hard disk storage information includes:
determining the number of data blocks occupied by RAID information of the hard disk in advance according to hard disk storage information;
acquiring the total number of data blocks of a hard disk, and determining the RAID information position of the hard disk according to the total number of the data blocks and the number of the data blocks occupied by the RAID information; and the RAID information of the hard disk is positioned in the last block of the hard disk.
Preferably, the process of clearing the RAID information of the hard disk according to the RAID information location includes:
obtaining the number of interval data blocks from the initial data block of the hard disk to the data block where the RAID information is located according to the total number of the data blocks and the number of the data blocks occupied by the RAID information;
and after skipping the data blocks with the number of the interval data blocks from the initial data block, completely clearing the data blocks at the rear part of the hard disk.
Preferably, the method for clearing a hard disk further comprises:
after the hard disk is cleared, checking whether the partition information and RAID information of the hard disk are completely cleared;
if yes, determining that the hard disk is cleared;
if not, the partition information and the RAID information of the hard disk are removed again, and the step of checking whether the partition information and the RAID information of the hard disk are completely removed is returned.
Preferably, the process of clearing partial data in the data information corresponding to the data information position according to a preset data information partial clearing rule includes:
and clearing the data information stored in a certain number of data blocks at intervals of a preset interval number of data blocks from the initial data block corresponding to the data information position until all the data blocks corresponding to the data information position are scanned.
In order to solve the above technical problem, the present invention further provides a hard disk cleaning system, including:
the information position determining module is used for determining the partition information position, the data information position and the RAID information position of the hard disk in advance according to the hard disk storage information;
the partition information clearing module is used for clearing the partition information of the hard disk according to the partition information position;
the data information clearing module is used for clearing partial data in the data information corresponding to the data information position according to a preset data information partial clearing rule;
and the RAID information clearing module is used for clearing the RAID information of the hard disk according to the RAID information position.
Preferably, the data information removing module is specifically configured to remove, from an initial data block corresponding to the data information position, data information stored in a certain number of data blocks every other preset interval number of data blocks until all data blocks corresponding to the data information position are scanned.
In order to solve the above technical problem, the present invention further provides a hard disk cleaning apparatus, including:
the test platform is used for placing the hard disk to be cleared;
a memory for storing a computer program;
a processor for implementing the steps of any of the above hard disk cleaning methods when executing the computer program.
The invention provides a method for removing a hard disk, which is characterized in that because the incomplete removal of partition information and RAID information of the hard disk can affect the subsequent use of the hard disk, and the incomplete removal of data information of the hard disk can not affect the subsequent use of the hard disk, the partition information position, the data information position and the RAID information position of the hard disk are determined in advance according to the storage information of the hard disk, then when the hard disk is removed, the partition information and the RAID information of the hard disk are completely removed according to the partition information position and the RAID information position, and partial data information is removed according to the data information position. Therefore, the hard disk cleaning method can effectively clean the partition information and RAID information of the hard disk, can destroy the original data structure of the hard disk, achieves the purpose of cleaning data information, has obvious efficiency improvement compared with the full disk cleaning, and can meet the high-timeliness requirement of the hard disk cleaning task.
The invention also provides a system and a device for removing the hard disk, which have the same beneficial effects as the method for removing the hard disk.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a hard disk erasing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a location of information stored in a hard disk according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a hard disk erasing system according to an embodiment of the present invention.
Detailed Description
The core of the invention is to provide a method, a system and a device for cleaning a hard disk, which can not only effectively clean the partition information and RAID information of the hard disk, but also destroy the original data structure of the hard disk, thereby achieving the purpose of cleaning data information, and having obvious efficiency improvement compared with the full disk cleaning, thereby meeting the high time-efficiency requirement of the hard disk cleaning task.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a hard disk erasing method according to an embodiment of the present invention.
The hard disk cleaning method comprises the following steps:
step S1: and determining the partition information position, the data information position and the RAID information position of the hard disk in advance according to the hard disk storage information.
Specifically, the known hard disk storage information includes partition information, data information, and RAID (Redundant Arrays of Independent Drives) information, where the partition information of the hard disk is located in a front block of the hard disk, the data information of the hard disk is located in a middle block of the hard disk, and the RAID information of the hard disk is located in a rear block of the hard disk, as shown in fig. 2.
Considering that the incomplete removal of the partition information and the RAID information of the hard disk can affect the subsequent use of the hard disk, and the incomplete removal of the data information of the hard disk can not affect the subsequent use of the hard disk, the method and the device for removing the hard disk adopt the removal mode of completely removing the partition information and the RAID information and partially removing the data information to remove the hard disk, so that the partition information and the RAID information of the hard disk can be effectively removed, the original data structure of the hard disk can be damaged, the purpose of removing the data information is achieved, and the efficiency is obviously improved compared with the full-disk removal. For example, it takes about 4 hours to clean a 1T hard disk according to the cleaning method of the prior art, and it only takes about 10 minutes to clean the hard disk according to the cleaning method of the present application, so that the cleaning efficiency is significantly improved.
Based on the method, the partition information position, the data information position and the RAID information position of the hard disk need to be determined in advance, and the partition information position, the data information position and the RAID information position of the hard disk can be determined according to the storage information of the hard disk.
Step S2: and clearing the partition information of the hard disk according to the partition information position.
Specifically, the data block stored in the partition information of the hard disk is found according to the partition information position of the hard disk, and then all data in the part of the data block is cleared, that is, all the partition information of the hard disk is cleared (for example, all the part of the data block is written with 0 based on a data copying tool (such as dd tool)).
Step S3: and clearing partial data in the data information corresponding to the data information position according to a preset data information partial clearing rule.
It should be noted that the preset of the present application is set in advance, and only needs to be set once, and the reset is not needed unless the modification is needed according to the actual situation.
Specifically, in consideration of the present application for clearing the data information portion of the hard disk, the present application needs to set a data information portion clearing rule in advance. And after the partition information of the hard disk is cleared, partially clearing the data information of the hard disk according to a preset data information partial clearing rule. More specifically, a data block stored in the data information of the hard disk is found according to the data information position of the hard disk, and then partial data in the partial data block is cleared according to a preset data information partial clearing rule, namely the data information of the hard disk is partially cleared.
Step S4: and clearing the RAID information of the hard disk according to the RAID information position.
Specifically, the data block stored in the RAID information of the hard disk is found according to the RAID information position of the hard disk, and then all data in the part of the data block is removed, that is, the RAID information of the hard disk is completely removed.
The invention provides a method for removing a hard disk, which is characterized in that the incomplete removal of partition information and RAID information of the hard disk can influence the subsequent use of the hard disk, and the incomplete removal of data information of the hard disk can not influence the subsequent use of the hard disk. Therefore, the hard disk cleaning method can effectively clean the partition information and RAID information of the hard disk, can destroy the original data structure of the hard disk, achieves the purpose of cleaning data information, has obvious efficiency improvement compared with the full disk cleaning, and can meet the high-timeliness requirement of the hard disk cleaning task.
On the basis of the above-described embodiment:
as an optional embodiment, the process of determining the partition information location of the hard disk in advance according to the hard disk storage information includes:
determining the type of a partition table in the hard disk in advance according to the storage information of the hard disk, and determining the partition information position of the hard disk according to the type of the partition table; the partition information of the hard disk is located in the foremost block of the hard disk.
Specifically, the Partition Table types of the hard disk are divided into an MBR (Master Boot Record) Partition Table and a GPT (global unique identification Partition Table), wherein hard disk Partition information corresponding to the MBR Partition Table occupies a foremost data block of the hard disk; the hard disk partition information corresponding to the GPT partition table occupies the foremost 34 data blocks of the hard disk, and the rearmost 33 data blocks of the hard disk are used for storing backup information of the GPT partition table, the backup information can be regarded as RAID information, and the backup information is also cleared when the RAID information is cleared.
Therefore, the method and the device for determining the partition information of the hard disk determine the type of the partition table in the hard disk in advance according to the storage information of the hard disk, and determine the partition information position of the hard disk according to the type of the partition table, namely determine the data block stored in the partition information of the hard disk.
As an alternative embodiment, the process of clearing the partition information of the hard disk according to the partition information location includes:
setting a partition information clearing position of the hard disk in advance according to partition information positions corresponding to different types of partition tables;
and clearing all data corresponding to the partition information clearing position.
Further, considering that the data blocks stored in the partition information corresponding to different partition table types are different, in order to enable the partition information clearing mode to be suitable for the partition information corresponding to different partition table types, the partition information clearing position of the hard disk can be directly set in advance according to the partition information positions corresponding to different types of partition tables, and then when the partition information of the hard disk is cleared, all data corresponding to the partition information clearing position can be directly cleared. It can be understood that no matter what type of partition table of the hard disk is, the partition information of the hard disk should be completely contained in the information corresponding to the partition information removal position of the hard disk, and removing all the data corresponding to the partition information removal position is equivalent to completely removing the partition information of the hard disk.
For example, the hard disk partition information corresponding to the MBR partition table occupies the foremost one of the data blocks of the hard disk, and the hard disk partition information corresponding to the GPT partition table occupies the foremost 34 data blocks of the hard disk, so that the location of the foremost 100 data blocks of the hard disk can be set as the partition information clearing location, and when the partition information of the hard disk is cleared, all data corresponding to the foremost 100 data blocks of the hard disk are directly cleared.
As an optional embodiment, the process of determining the RAID information location of the hard disk in advance according to the hard disk storage information includes:
determining the number of data blocks occupied by RAID information of the hard disk in advance according to the storage information of the hard disk;
acquiring the total number of data blocks of the hard disk, and determining the RAID information position of the hard disk according to the total number of the data blocks and the number of the data blocks occupied by the RAID information; the RAID information of the hard disk is located in the last block of the hard disk.
Specifically, given that the RAID information of the hard disk occupies 512MB, since one data block can store 512 bytes, the number of data blocks occupied by the RAID information of the hard disk is:
512 × 1024 × 1024/512 ═ 1048576. Because the RAID information of the hard disk is located in the last block of the hard disk, the RAID information location of the hard disk can be obtained by acquiring the total number of data blocks of the hard disk (specifically, by using a blockdev tool).
As an alternative embodiment, the process of clearing RAID information of a hard disk according to a RAID information location includes:
obtaining the quantity of interval data blocks from an initial data block of the hard disk to a data block where the RAID information is located according to the total quantity of the data blocks and the quantity of the data blocks occupied by the RAID information;
after skipping the data blocks with the number of interval data blocks from the initial data block, all the data blocks at the rear part of the hard disk are cleared.
Further, the total number of data blocks of the hard disk, a, the number of data blocks occupied by the RAID information, is the number b of interval data blocks from the initial data block of the hard disk to the data block where the RAID information is located, that is, b is a-1048576. When the RAID information of the hard disk is cleared, after b data blocks are skipped from the initial data block of the hard disk, the data blocks at the rear part of the hard disk are completely cleared, thus finishing clearing the last 512MB, and realizing the complete clearing of the RAID information (including the partition backup information) of the hard disk.
As an optional embodiment, the hard disk cleaning method further includes:
after the hard disk is cleared, checking whether the partition information and RAID information of the hard disk are completely cleared;
if yes, determining that the hard disk is cleared;
if not, the partition information and the RAID information of the hard disk are removed again, and the step of checking whether the partition information and the RAID information of the hard disk are completely removed is returned.
Further, in order to ensure that the partition information and the RAID information of the hard disk are completely removed, the present application further checks whether the partition information and the RAID information of the hard disk are completely removed after the hard disk is completely removed. If the partition information and RAID information of the hard disk are completely removed, determining that the removal of the hard disk is finished; if the partition information and the RAID information of the hard disk are not completely cleared, the partition information and the RAID information of the hard disk are cleared again according to the method until the check result shows that the partition information and the RAID information of the hard disk are completely cleared, so that the condition that the subsequent use of the hard disk is influenced by the incomplete clearing of the partition information and the RAID information is avoided.
As an optional embodiment, the process of clearing partial data in the data information corresponding to the data information position according to a preset data information partial clearing rule includes:
and clearing the data information stored in a certain number of data blocks at intervals of a preset interval number of data blocks from the initial data block corresponding to the data information position until all the data blocks corresponding to the data information position are scanned.
Specifically, the present application finds, through actual verification, that multiple points are averagely selected from the data information of the hard disk, and then a certain amount of data is removed from the positions of the multiple points, for example, 20 points are averagely selected and written into 20M characters 0, so that the original data structure is destroyed, and the data information of the hard disk cannot be recovered, thereby achieving the effect of removing data.
Based on the method, all data blocks occupied by the data information of the hard disk are determined in advance according to the data information position of the hard disk, and the number of interval data blocks for clearing the data information of the hard disk and the number of single clearing data blocks are set. When the data information of the hard disk is cleared, starting from the initial data block corresponding to the data information position, clearing the data information stored in a certain number of data blocks every other preset interval number of data blocks until all the data blocks corresponding to the data information position are scanned.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a hard disk erasing system according to an embodiment of the present invention.
The hard disk cleaning system includes:
the information position determining module 1 is used for determining the partition information position, the data information position and the RAID information position of the hard disk in advance according to the hard disk storage information;
the partition information clearing module 2 is used for clearing the partition information of the hard disk according to the partition information position;
the data information clearing module 3 is used for clearing partial data in the data information corresponding to the data information position according to a preset data information partial clearing rule;
and the RAID information clearing module 4 is used for clearing the RAID information of the hard disk according to the RAID information position.
As an optional embodiment, the data information removing module 3 is specifically configured to remove, from an initial data block corresponding to the data information position, data information stored in a certain number of data blocks every other preset interval number of data blocks until all data blocks corresponding to the data information position are scanned.
For introduction of the hard disk removal system provided in the present application, reference is made to the above-mentioned embodiment of the hard disk removal method, which is not described herein again.
The present application further provides a hard disk removing device, including:
the test platform is used for placing the hard disk to be cleared;
a memory for storing a computer program;
a processor for implementing the steps of any of the above hard disk cleaning methods when executing a computer program;
the memory and the processor (optional CPU) are arranged on a mainboard of the test platform, and the test platform further comprises a power supply, an SAS card (one of array cards), an SAS wire and a hard disk backboard.
For introduction of the hard disk removal apparatus provided in the present application, reference is made to the above-mentioned embodiment of the hard disk removal method, which is not described herein again.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (4)

1. A hard disk cleaning method is characterized by comprising the following steps:
determining the partition information position, the data information position and the RAID information position of the hard disk in advance according to the hard disk storage information;
clearing the partition information of the hard disk according to the partition information position;
according to a preset data information part clearing rule, clearing part of data in the data information corresponding to the data information position;
removing the RAID information of the hard disk according to the RAID information position;
the process of determining the partition information position of the hard disk in advance according to the hard disk storage information comprises the following steps:
determining the type of a partition table in a hard disk in advance according to hard disk storage information, and determining the partition information position of the hard disk according to the type of the partition table; the partition information of the hard disk is located in the foremost block of the hard disk;
the process of clearing the partition information of the hard disk according to the partition information position comprises the following steps:
setting a partition information clearing position of the hard disk in advance according to partition information positions corresponding to different types of partition tables;
clearing all data corresponding to the partition information clearing position;
the process of determining the RAID information position of the hard disk in advance according to the hard disk storage information comprises the following steps:
determining the number of data blocks occupied by RAID information of the hard disk in advance according to the storage information of the hard disk;
acquiring the total number of data blocks of a hard disk, and determining the RAID information position of the hard disk according to the total number of the data blocks and the number of the data blocks occupied by the RAID information; the RAID information of the hard disk is located in the last block of the hard disk;
the process of clearing the RAID information of the hard disk according to the RAID information position comprises the following steps:
obtaining the number of interval data blocks from the initial data block of the hard disk to the data block where the RAID information is located according to the total number of the data blocks and the number of the data blocks occupied by the RAID information;
after skipping the data blocks with the number of the interval data blocks from the initial data block, completely clearing the data blocks at the rear part of the hard disk;
the process of clearing partial data in the data information corresponding to the data information position according to the preset data information partial clearing rule includes:
and clearing the data information stored in a part of the data blocks at intervals of a preset interval number from the initial data block corresponding to the data information position until all the data blocks corresponding to the data information position are scanned.
2. The hard disk removal method of claim 1, further comprising:
after the hard disk is cleared, checking whether the partition information and RAID information of the hard disk are completely cleared;
if so, determining that the hard disk is cleared;
if not, the partition information and the RAID information of the hard disk are removed again, and the step of checking whether the partition information and the RAID information of the hard disk are completely removed is returned.
3. A hard disk drive erase system, comprising:
the information position determining module is used for determining the partition information position, the data information position and the RAID information position of the hard disk in advance according to the hard disk storage information;
the partition information clearing module is used for clearing the partition information of the hard disk according to the partition information position;
the data information clearing module is used for clearing partial data in the data information corresponding to the data information position according to a preset data information partial clearing rule;
the RAID information clearing module is used for clearing RAID information of the hard disk according to the RAID information position;
the process of determining the partition information position of the hard disk in advance according to the hard disk storage information comprises the following steps:
determining the type of a partition table in a hard disk in advance according to hard disk storage information, and determining the partition information position of the hard disk according to the type of the partition table; the partition information of the hard disk is located in the foremost block of the hard disk;
the partition information clearing module is specifically used for setting partition information clearing positions of the hard disk in advance according to partition information positions corresponding to different types of partition tables;
clearing all data corresponding to the partition information clearing position;
the process of determining the RAID information position of the hard disk in advance according to the hard disk storage information comprises the following steps:
determining the number of data blocks occupied by RAID information of the hard disk in advance according to the storage information of the hard disk;
acquiring the total number of data blocks of a hard disk, and determining the RAID information position of the hard disk according to the total number of the data blocks and the number of the data blocks occupied by the RAID information; the RAID information of the hard disk is located in the last block of the hard disk;
the RAID information removing module is specifically configured to obtain, according to the total number of the data blocks and the number of the data blocks occupied by the RAID information, the number of interval data blocks from an initial data block of the hard disk to a data block where the RAID information is located;
after skipping the data blocks with the number of the interval data blocks from the initial data block, completely clearing the data blocks at the rear part of the hard disk;
the data information clearing module is specifically configured to clear data information stored in a part of the number of data blocks at intervals of a preset interval number of data blocks from an initial data block corresponding to the data information position until all data blocks corresponding to the data information position are scanned.
4. A hard disk drive cleaning apparatus, comprising:
the test platform is used for placing the hard disk to be cleared;
a memory for storing a computer program;
processor for implementing the steps of the hard disk cleaning method according to claim 1 or 2 when executing said computer program.
CN201910995216.9A 2019-10-18 2019-10-18 Method, system and device for removing hard disk Active CN110737408B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910995216.9A CN110737408B (en) 2019-10-18 2019-10-18 Method, system and device for removing hard disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910995216.9A CN110737408B (en) 2019-10-18 2019-10-18 Method, system and device for removing hard disk

Publications (2)

Publication Number Publication Date
CN110737408A CN110737408A (en) 2020-01-31
CN110737408B true CN110737408B (en) 2022-08-02

Family

ID=69270186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910995216.9A Active CN110737408B (en) 2019-10-18 2019-10-18 Method, system and device for removing hard disk

Country Status (1)

Country Link
CN (1) CN110737408B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117908758A (en) * 2022-10-19 2024-04-19 富联精密电子(天津)有限公司 Hard disk data clearing method, device and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203179009U (en) * 2012-08-20 2013-09-04 深圳融合高科信息技术有限公司 Data cleaning device
CN104391660A (en) * 2014-12-03 2015-03-04 浪潮集团有限公司 Method for rapidly clearing multi-hardware data information
CN106406747A (en) * 2015-08-03 2017-02-15 中兴通讯股份有限公司 Hard disk storage management method and apparatus for mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203179009U (en) * 2012-08-20 2013-09-04 深圳融合高科信息技术有限公司 Data cleaning device
CN104391660A (en) * 2014-12-03 2015-03-04 浪潮集团有限公司 Method for rapidly clearing multi-hardware data information
CN106406747A (en) * 2015-08-03 2017-02-15 中兴通讯股份有限公司 Hard disk storage management method and apparatus for mobile terminal

Also Published As

Publication number Publication date
CN110737408A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
TWI645404B (en) Data storage device and control method for non-volatile memory
US20140310245A1 (en) Partition level backup and restore of a massively parallel processing database
CN103853566B (en) Basic input output system (BIOS) updating system and method
CN106716395B (en) The method, apparatus and computer system of issued transaction
CN106708665A (en) Metadata restoration method and device
CN107943414A (en) The file partition of built-in Linux and data read-write method
EP1744246A3 (en) File system having deferred verification of data integrity
CN101840360A (en) Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system
CN101281452A (en) Method for automatically rebuilding hard disk
CN103064752A (en) Method and device of repairing document
JPH09506460A (en) Safe updating method for EEPROM memory
CN110737408B (en) Method, system and device for removing hard disk
CN110019063B (en) Method for computing node data disaster recovery playback, terminal device and storage medium
CN112764683B (en) Storage block management information synchronous recording method, system, terminal and storage medium
CN111459399A (en) Data writing method, data reading method and device
CN103678608A (en) Log management method and device
CN103699681A (en) Data rollback processing method and data rollback processing device
KR101258589B1 (en) Information storage medium recording data according to journaling file system, method and apparatus of writing/recovering data using journaling file system
CN115309591B (en) Recovery method and related device of full flash memory system
CN1330322A (en) Method for protecting and restoring data on hard disk
CN111399774B (en) Data processing method and device based on snapshot under distributed storage system
CN109960611B (en) Data recovery method and device, electronic equipment and machine-readable storage medium
CN111292796B (en) RAID damage detailed information acquisition method, system, terminal and storage medium
CN111931255A (en) Automatic destroying and copying system
CN114201320B (en) System block upgrading method and device, readable storage medium and electronic equipment

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