Method and device for recycling space of disk mirror image

A disk mirroring and recovery device technology, applied in the computer field, can solve problems such as interruption, time consumption, and extra space of the target disk mirroring

Active Publication Date: 2015-04-29
HUAWEI TECH CO LTD
View PDF4 Cites 13 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] However, no matter whether the virtual machine is online or offline, when all the free sectors of the disk image are filled with zeros, the disk image may be filled and time-consuming; when the space is r...

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for recycling space of disk mirror image
  • Method and device for recycling space of disk mirror image
  • Method and device for recycling space of disk mirror image

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0063] Embodiments of the present invention provide a method for reclaiming disk image space, which is applied to the Windows standard file system NTFS file system, such as figure 2 As shown, the method includes:

[0064] S101. The device for recovering disk image space searches for a deleted file and a first sector corresponding to the deleted file in a preset master file table MFT.

[0065] Wherein, the first sector is the sector occupied by the deleted file in the disk image and does not save valid data.

[0066] NTFS contains a file called Master File Table (MFT, Master File Table). The MFT is an index file that maps all objects stored on disk. In MFT, each file (including MFT itself) on the NTFS disk has at least one mapping item. Items in the MFT include size, time and timestamp, security attributes, and data location.

[0067] Each side of the disk is divided into many tracks, and each track is divided into equal parts in units of 512 bytes, which are sectors.

[...

Embodiment 2

[0084] Embodiments of the present invention provide a method for reclaiming disk image space, which is applied to the Windows standard file system NTFS file system, such as image 3 As shown, the method includes:

[0085] S201. If the virtual machine is online, the device for recovering disk image space takes an online snapshot of the disk image, so that subsequent write requests are written into the snapshot.

[0086] When the virtual machine is online and the space occupied by deleted files in the disk image is marked and no valid data is saved, the virtual machine is still working and data will still be written. In order to ensure the correctness of the written data when marking the disk image sector content, the disk image space recovery device takes an online snapshot of the disk image, and the snapshot takes over the write I / O of the virtual machine, and then the written data is written into the disk image snapshot In this way, the virtual machine service is guaranteed ...

Embodiment 3

[0151] The present invention provides a disk image space recovery device, which is applied to the Windows standard file system NTFS file system, such as Figure 4 shown, including:

[0152] The search unit 10 is configured to search the deleted file and the first sector corresponding to the deleted file in the preset master file table MFT, the first sector is occupied by the deleted file in the disk image sectors that have no valid data stored;

[0153] A marking unit 11, configured to set the content of the first sector as the first identifier;

[0154] The processing unit 12 is configured to release the sector whose content is the first identifier according to a preset rule.

[0155] Further, the processing unit 12 is specifically configured to acquire the content of the disk image and the number of sectors of the disk image, set the file offset of the disk image, and set the file offset of the disk image to Find the sector where the content is the first identification, a...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention relates to the field of computers, and provides a method and an apparatus for reclaiming a space of a magnetic disk image, which can improve utilization of a storage space in a virtual scenario, avoid a magnetic disk image from being filled to the full, reduce time consumption, and ensure that a virtual machine service is not interrupted. The method comprises: searching a preset main file table (MFT) for a deleted file and a first sector corresponding to the deleted file, the first sector being a sector that is occupied by the deleted file in the magnetic disk image and does not store effective data; and then setting content of the first sector as a first identifier; and finally, releasing, according to a preset rule, the sector of which the content is the first identifier.

Description

technical field [0001] The invention relates to the field of computers, in particular to a method and device for reclaiming disk image space. Background technique [0002] The virtualization software maps the corresponding disk image to the disk of the virtual machine through the corresponding disk driver. All the reading and writing of the internal files of the virtual machine during the running of the virtual machine can be converted into reading and writing of the disk image by the driver. [0003] For a virtual machine, a disk image file is similar to an external storage device such as a hard disk in an actual computer, and stores all persistent data in the virtual machine. It can be stored in the disk of the physical machine in the form of a file, and can be read and written through the system I / O of the physical machine. Using disk mirroring under the virtualization platform, combined with drivers, can achieve advanced features such as thin allocation and snapshots. ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F17/30G06F9/455G06F11/14
CPCG06F3/0674G06F3/0608G06F3/0652G06F9/45558G06F2009/45579G06F9/4418G06F11/1433G06F16/10
Inventor 李百青张磊强
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products