A method and system for obtaining failed rolls and performing integrity assessment
Patent Information
- Application Number
- CN202310662703.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-06-06
AI Technical Summary
[0031]由于磁盘上反复进行分区和格式化操作会对卷信息的完整性有不同程度的损坏,而本发明通过提供卷信息的完整性间接的反映出特定失效卷的可能的存在时效,让使用者可以根据具体删除文件的可能时间以及对应失效卷的起始位置来判断基于哪个失效卷开展数据恢复,从而解决多个待处理卷引发的指定存储块归属问题。
Smart Images

Figure CN116627347B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of disk data recovery technology, and in particular relates to a method for obtaining a failed volume in a disk to be recovered and for assessing the integrity of the failed volume. Background Technology
[0002] In the field of disk storage data recovery managed by file systems, determining the starting position of a specific volume is a crucial preliminary step for subsequent data recovery. This is because the result of this step provides basic parameters for subsequent data recovery operations, and these basic parameters can be used to complete the specific file search process for data recovery more quickly and accurately.
[0003] Currently available methods for finding and deleting data are mostly based on a specific volume, and the search process is carried out according to this condition. This makes it even more important to quickly identify the failed volume in order to proceed with the subsequent data search. However, existing technologies lack methods for quickly finding failed volumes and assessing their integrity. Summary of the Invention
[0004] In view of this, the present invention provides a method and system for obtaining and performing integrity assessment of failed volumes, which can quickly obtain all failed volume records of a specified disk and provide targeted integrity assessment of the records of all failed volumes, thereby providing basic volume parameter support for subsequent data search of specific volumes and achieving the purpose of more accurate file recovery operations.
[0005] To solve the above technical problems, the technical solution of the present invention is to adopt a method for obtaining failed volumes and performing integrity assessment, comprising:
[0006] Count all physical volumes in the specified disk and add the sectors occupied by the file system in the physical volumes to the set data1;
[0007] Read the records of partitioning operations performed using Windows Explorer, and add the starting sector of the partition in the records to the set partition;
[0008] Perform sector-level traversal on the specified disk excluding the data1 set. If the current sector is the DBR of a certain volume, then the volume is treated as an invalid volume.
[0009] If the DBR of the failed volume belongs to the set partition, and the failed volume is not completely covered by the set data1, then the part of the used space of the failed volume that is not covered by the set data1 is added to the set data2.
[0010] The integrity of the failed volume is evaluated based on set data1 and set data2.
[0011] As an improvement, the method for evaluating the integrity of failed volumes based on set data1 and set data2 includes:
[0012] For a failed volume that belongs to the set partition in DBR, the part of the failed volume covered by data1 is set as the occupied sector Sn, and the ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
[0013] For a failed volume whose DBR does not belong to a set partition, the sum of the portion of the failed volume covered by set data1 and the portion of the failed volume covered by set data2 after discounting is set as the occupied sector Sn, and the ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
[0014] As an improvement, records of partitioning operations performed using Windows Explorer are retrieved from the registry location HKCR\SoftWare\Microsoft\Windows\CurrentVersion\Explorer\CPC.
[0015] As a further improvement, when traversing sectors, once a volume is identified as a failed volume, the failed volume is added to the set V, and the integrity description of the failed volume is defaulted to 1, where the integrity description is a floating-point number between 0 and 1.
[0016] As another further improvement, for failed volumes that do not belong to the set partition, the portion of the failed volume covered by set data2 is discounted by dividing by 1.8 to 2.2 and then set as the occupied sector Sn.
[0017] The present invention also provides a system for acquiring failed volumes and performing integrity assessments, comprising:
[0018] The actual volume space usage statistics module is used to count all actual volumes in a specified disk and add the sectors occupied by the file system in the actual volumes to the set data1;
[0019] The partition operation record module is used to read records of partition operations performed using Windows Explorer and add the starting sector of the partition in the record to the set partition;
[0020] The Failed Volume Acquisition Module is used to perform sector-level traversal of the specified disk except for the data1 set. If the current sector is the DBR of a certain volume, then the volume is regarded as a failed volume.
[0021] The Failed Volume Space Occupancy Statistics Module is used to count the space occupied by failed volumes. If the DBR of a failed volume belongs to a set partition and the failed volume is not completely covered by set data1, then the part of the used space of the failed volume that is not covered by set data1 is added to set data2.
[0022] The integrity assessment module is used to assess the integrity of the failed volume based on set data1 and set data2.
[0023] As an improvement, the integrity assessment module includes:
[0024] Evaluation module I performs integrity evaluation on failed volumes belonging to the set partition of DBR; the part of the failed volume covered by data1 is set as the occupied sector Sn, and the ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
[0025] Evaluation Module II performs integrity evaluation on failed volumes that do not belong to the set partition. The sum of the portion of the failed volume covered by set data1 and the portion of the failed volume covered by set data2 after discounting is set as the occupied sector Sn. The ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
[0026] As an improvement, the integrity assessment module further includes:
[0027] The discount module is used to discount the portion of the failed volume of DBR that does not belong to the set partition and is covered by set data2 by dividing it by 1.8 to 2.2 and then setting it as the occupied sector Sn.
[0028] The present invention also provides a storage medium storing a program that, when executed, enables the above-described method for acquiring a failed volume and performing an integrity assessment.
[0029] The present invention also provides a computer system, including a processor and a memory; the memory stores a computer program, and when the processor executes the computer program, it can implement the above-described method for obtaining a failed volume and performing an integrity assessment.
[0030] The advantages of this invention are:
[0031] Repeated partitioning and formatting operations on a disk can damage the integrity of volume information to varying degrees. This invention indirectly reflects the possible existence and duration of a specific failed volume by providing the integrity of the volume information. This allows users to determine which failed volume to use for data recovery based on the possible time of the deleted files and the starting position of the corresponding failed volume, thereby solving the problem of ownership of a specified storage block caused by multiple pending volumes. Attached Figure Description
[0032] Figure 1 This is a flowchart of the present invention.
[0033] Figure 2 This is a schematic diagram of the structural principle of the present invention. Detailed Implementation
[0034] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to specific embodiments.
[0035] Definition of noun
[0036] Actual volume: A disk volume that has been created and formatted and can be recognized and accessed by the operating system or applications.
[0037] A failed volume is a disk volume that cannot be properly recognized and accessed due to errors during its creation and formatting, or for some other reason. A failed volume cannot be used or accessed, but it can be repaired and recovered. The disk data recovery described in this invention specifically refers to the recovery of files from a failed disk volume.
[0038] DBR (DOS Boot Record): Originally meaning the operating system boot record area. After a file system is mounted to a partition, its own identifier and some basic parameters of the current volume are written to fixed locations in sectors 0 to 3 of the partition (the exact number of sectors varies depending on the file system). By analyzing this content, the location and size of the current volume can be defined, as well as some basic parameters of the specified volume. Based on these parameters, subsequent operations on the volume can be initiated. This invention adopts the Windows definition of DBR to represent the volume identifier. The basic parameters stored in the DBR include the volume label and the volume's bitmap information.
[0039] Bitmap: A disk is composed of several sectors as the smallest storage unit. A bitmap uses one bit of binary data to represent the usage status of a sector on the disk. For example, when its value is "0", it means that the corresponding sector is free; when it is "1", it means that it is occupied.
[0040] Example
[0041] like Figure 1As shown, the present invention provides a method for obtaining a failed volume and performing an integrity assessment, comprising the following steps:
[0042] S1 counts all physical volumes on the specified disk and adds the sectors occupied by the file system in the physical volumes to the set data1.
[0043] Since the actual volume is the disk volume currently in use by the operating system, if its internal sectors are occupied, it means that data has most likely been rewritten. The previous data has been erased or corrupted, and for disk recovery, there is no need to perform recovery operations on this part of the space. Therefore, it is necessary to collect these sectors as soon as possible and form a set `data1` for later integrity assessment. Sectors located in set `data1` can be ignored during sector traversal.
[0044] The statistics on the actual space occupied by a volume are relatively simple to determine; it can be obtained simply by reading the bitmap in its DBR.
[0045] S2 reads the records of partitioning operations performed using Windows Explorer and adds the starting sector of the partition in the records to the set partition.
[0046] In Windows operating systems, if partitioning operations are performed using the built-in Windows Explorer, these operations are recorded in the registry at HKCR\SoftWare\Microsoft\Windows\CurrentVersion\Explorer\CPC. Therefore, by reading the information in this location, all partitioning operations performed using Windows Explorer can be quickly identified and analyzed. Partitioning operations are recorded based on the volume's starting sector (including the DBR). Analysis of the aforementioned registry location shows that these recorded sectors are all added to a partition collection. For data recovery, the DBR located in the partition collection is considered highly reliable.
[0047] S3 performs a sector-level traversal of the specified disk excluding the data1 set. If the current sector is the DBR of a certain volume, then the volume is treated as an invalid volume.
[0048] Besides the DBR in the partition set, some partitioning operations may have been performed using third-party software. Since third-party software doesn't leave records, the only way to identify it is by traversing the sectors. Of course, this traversal will also find the DBR already present in the partition set.
[0049] Once a DBR is found, it can be considered that a failed volume has been found. The found failed volumes are numbered Vn and stored in set V, where n = 1, 2, 3, ...
[0050] For a failed volume Vn added to set V, a default integrity description can be assigned to it. In this invention, the default integrity description is set to 1, and the integrity description is a floating-point number between 0 and 1, where 0 represents the highest integrity and 1 represents the lowest integrity. The purpose of setting the integrity description to 1 here is to indicate that the failed volume has not undergone integrity evaluation.
[0051] S4 If the DBR of the failed volume belongs to the set partition, and the failed volume is not completely covered by the set data1, then the portion of the used space of the failed volume that is not covered by the set data1 is added to the set data2.
[0052] The purpose of this step is to construct set data2. Comparing the failed volume (DBR) to the set partition, we first check its bitmap to see if the failed volume is completely covered by set data1. If it is not completely covered by set data1 (if the failed volume is completely covered by set data1, this step is ignored), we check the bitmap of the failed volume to see which of its used spaces are covered by set data1, and then remove the parts covered by set data1 and add them to set data2. For example, a failed volume has a total of 10,000 sectors, of which 4,000 sectors are used. Of these 4,000 sectors, 3,000 are covered by set data1, so the remaining 1,000 sectors are added to set data2.
[0053] S5 performs an integrity assessment on the failed volumes based on sets data1 and data2. In this invention, the integrity assessment consists of two parts: first, the evaluation of failed volumes whose DBRs belong to set partitions; and second, the evaluation of failed volumes whose DBRs do not belong to set partitions. Specifically:
[0054] For a failed volume in DBR that belongs to the set partition, S51 sets the portion of the failed volume covered by data1 as the occupied sector Sn, and uses the ratio of the occupied sector Sn to the total capacity of the failed volume as the integrity description of the failed volume.
[0055] As mentioned earlier, the reliability of a failed volume belonging to a set partition in DBR is relatively high. The portion covered by data1 has indeed been overwritten, so it can be treated as the occupied sector Sn. Dividing Sn by the total number of sectors in the failed volume will yield a floating-point number between 0 and 1. This floating-point number is the integrity description of that sector. It is evident that the smaller the integrity description, the higher the integrity, and the greater the value for subsequent recovery.
[0056] For example, if a DBR belongs to a failed volume of a set partition with a total of 10,000 sectors, of which 4,000 sectors are covered by data1, then its integrity description would be 4,000 / 10,000 = 0.4.
[0057] For a failed volume whose DBR does not belong to the set partition, S52 sets the sum of the portion of the failed volume covered by set data1 and the portion of the failed volume covered by set data2 after discounting as the occupied sector Sn, and uses the ratio of the occupied sector Sn to the total capacity of the failed volume as the integrity description of the failed volume.
[0058] Failed volumes whose DBRs do not belong to a set partition are more complex than those whose DBRs do belong to a set partition. This is because later partitioning operations can overwrite earlier ones. However, the timing of partitioning operations performed by third-party software is unknown, so operations performed by third-party software and those performed by Windows Explorer may overlap. Therefore, when considering occupancy, overwriting by both set data1 and set data2 must be considered.
[0059] However, the coverage reliability of set data2 is lower than that of set data1. Therefore, the calculation cannot be performed entirely based on the coverage of data2; a certain discount needs to be applied to the coverage of data2 before calculation. In this invention, the discount for the coverage of data2 is chosen to be divided by 1.8 to 2.2. Considering all factors, this value is relatively accurate and scientific.
[0060] For example, if a failed volume in a DBR that does not belong to a set partition has a total of 10,000 sectors, of which 4,000 sectors are covered by set data1 and 2,000 sectors are covered by set data2, then its integrity description would be (4,000 + 2,000 / 2).
[0061] / 10000 = 0.5.
[0062] By sequentially traversing the sectors of the entire specified disk (skipping the data1 set in between), the set of failed volumes V is obtained, along with a complete description of each failed volume Vn. The process concludes here, and the specified failed volume can then be virtualized into a physical volume to initiate the recovery process for that physical volume.
[0063] like Figure 2 As shown, the present invention also provides a system for acquiring failed volumes and performing integrity assessments, comprising:
[0064] The actual volume space usage statistics module is used to count all actual volumes in a specified disk and add the sectors occupied by the file system in the actual volumes to the set data1;
[0065] The partition operation record module is used to read records of partition operations performed using Windows Explorer and add the starting sector of the partition in the record to the set partition;
[0066] The Failed Volume Acquisition Module is used to perform sector-level traversal of the specified disk except for the data1 set. If the current sector is the DBR of a certain volume, then the volume is regarded as a failed volume.
[0067] The Failed Volume Space Occupancy Statistics Module is used to count the space occupied by failed volumes. If the DBR of a failed volume belongs to a set partition and the failed volume is not completely covered by set data1, then the part of the used space of the failed volume that is not covered by set data1 is added to set data2.
[0068] The integrity assessment module is used to assess the integrity of the failed volume based on set data1 and set data2.
[0069] The integrity module further includes:
[0070] Evaluation module I performs integrity evaluation on failed volumes belonging to the set partition of DBR; the part of the failed volume covered by data1 is set as the occupied sector Sn, and the ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
[0071] Evaluation Module II performs integrity evaluation on failed volumes that do not belong to the set partition; the sum of the portion of the failed volume covered by set data1 and the portion of the failed volume covered by set data2 after discounting is set as the occupied sector Sn, and the ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
[0072] The discount module is used to discount the portion of the failed volume of DBR that does not belong to the set partition and is covered by set data2 by dividing it by 1.8 to 2.2 and then setting it as the occupied sector Sn.
[0073] The present invention also provides a storage medium storing a program that, when executed, enables the above-described method for acquiring a failed volume and performing an integrity assessment.
[0074] The present invention also provides a computer system, including a processor and a memory; the memory stores a computer program, and when the processor executes the computer program, it can implement the above-described method for obtaining a failed volume and performing an integrity assessment.
[0075] The above are merely preferred embodiments of the present invention. It should be noted that the above preferred embodiments should not be considered as limitations on the present invention, and the scope of protection of the present invention should be determined by the scope defined in the claims. For those skilled in the art, several improvements and modifications can be made without departing from the spirit and scope of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for obtaining failed volumes and performing integrity assessment, characterized in that... include: Count all physical volumes in the specified disk and add the sectors occupied by the file system in the physical volumes to the set data1; Read the records of partitioning operations performed using Windows Explorer, and add the starting sector of the partition in the records to the set partition; Perform sector-level traversal on the specified disk excluding the data1 set. If the current sector is the DBR of a certain volume, then the volume is treated as an invalid volume. If the DBR of the failed volume belongs to the set partition, and the failed volume is not completely covered by the set data1, then the part of the used space of the failed volume that is not covered by the set data1 is added to the set data2. The integrity of the failed volume is assessed based on sets data1 and data2; The method for evaluating the integrity of a failed volume based on set data1 and set data2 includes: for a failed volume whose DBR belongs to set partition, the portion of the failed volume covered by data1 is set as occupied sector Sn, and the ratio of occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume. For a failed volume whose DBR does not belong to a set partition, the sum of the portion of the failed volume covered by set data1 and the portion of the failed volume covered by set data2 after discounting is set as the occupied sector Sn, and the ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
2. The method for obtaining a failed volume and performing an integrity assessment according to claim 1, characterized in that: For failed volumes that do not belong to the set partition, the occupied sector Sn is set by discounting the portion of the failed volume covered by set data2 by dividing it by 1.8 to 2.
2.
3. The method for obtaining a failed volume and performing an integrity assessment according to claim 1, characterized in that: Retrieve records of partitioning operations performed using Windows Explorer from the registry location HKCR\SoftWare\Microsoft\Windows\CurrentVersion\Explorer\CPC.
4. The method for obtaining a failed volume and performing an integrity assessment according to claim 1, characterized in that: When traversing sectors, once a volume is identified as a failed volume, it is added to set V, and the integrity description of the failed volume is defaulted to 1, where the integrity description is a floating-point number between 0 and 1.
5. A system for acquiring failed volumes and performing integrity assessments, used to deploy the method for acquiring failed volumes and performing integrity assessments as described in any one of claims 1 to 4, characterized in that... include: The actual volume space usage statistics module is used to count all actual volumes in a specified disk and add the sectors occupied by the file system in the actual volumes to the set data1; The partition operation record module is used to read records of partition operations performed using Windows Explorer and add the starting sector of the partition in the record to the partition collection. The Failed Volume Acquisition Module is used to perform sector-level traversal of the specified disk except for the data1 set. If the current sector is the DBR of a certain volume, then the volume is regarded as a failed volume. The Failed Volume Space Usage Statistics module is used to calculate the space occupied by failed volumes. If the DBR of the failed volume belongs to the set partition, and the failed volume is not completely covered by the set data1, then the part of the used space of the failed volume that is not covered by the set data1 is added to the set data2. The integrity assessment module is used to assess the integrity of the failed volume based on set data1 and set data2.
6. The system for acquiring failed volumes and performing integrity assessment according to claim 5, characterized in that... The integrity assessment module includes: Assessment Module I, which performs integrity assessment on failed volumes that belong to the set partition of DBR; the part of the failed volume covered by data1 is set as the occupied sector Sn, and the ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume. Evaluation Module II performs integrity evaluation on failed volumes that do not belong to the set partition. The sum of the portion of the failed volume covered by set data1 and the portion of the failed volume covered by set data2 after discounting is set as the occupied sector Sn. The ratio of the occupied sector Sn to the total capacity of the failed volume is used as the integrity description of the failed volume.
7. The system for acquiring failed volumes and performing integrity assessment according to claim 5, characterized in that... The integrity assessment module further includes a discount module, which is used to discount the portion of the failed volume of DBR that does not belong to the set partition and is covered by the set data2 by 1.8 to 2.2 and then set it as the occupied sector Sn.
8. A storage medium, characterized in that: The system contains a program that, when executed, enables the method described in any one of claims 1 to 4 for acquiring a failed volume and performing an integrity assessment.
9. A computer system, comprising a processor and a memory; characterized in that: The memory stores a computer program, which, when executed by the processor, enables the method for acquiring a failed volume and performing an integrity assessment as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method for recovering GPT of NTFS
CN105278881A
Method and apparatus for recovery of a logical volume in a multi copy storage system
US20040078639A1