New! View global litigation for patent families

CN103443758B - Optimize virtual disks reduction - Google Patents

Optimize virtual disks reduction Download PDF

Info

Publication number
CN103443758B
CN103443758B CN 201280010562 CN201280010562A CN103443758B CN 103443758 B CN103443758 B CN 103443758B CN 201280010562 CN201280010562 CN 201280010562 CN 201280010562 A CN201280010562 A CN 201280010562A CN 103443758 B CN103443758 B CN 103443758B
Authority
CN
Grant status
Grant
Patent type
Application number
CN 201280010562
Other languages
Chinese (zh)
Other versions
CN103443758A (en )
Inventor
W·E·曹贝乐
Original Assignee
赛门铁克公司
Filing date
Publication date
Grant date

Links

Abstract

本文披露了缩减一个存储对象的各种系统和方法。 Disclosed herein are various systems and methods reduce a storage object. 例如,一种方法可以包括接收一个请求以便缩减该存储对象。 For example, a method may include receiving a request to reduce the storage object. 该存储对象可以包括多个存储单元。 The object may include a plurality of memory storage units. 该方法还可以包括接收识别一组存储单元的一个第一列表。 The method may further comprise receiving a first list identifying a group of memory cells. 该列表可以响应于缩减该存储对象的请求而产生。 The list may be reduced in response to a request for the stored objects is generated. 该方法还可以包括从在所接收的列表中未识别的该存储对象内的一组存储单元来读取数据,并将读取的数据从该第一存储对象复制到一个第二存储对象。 The method may further comprise reading data from a set of memory cells within the memory object in the list received is not recognized, and the read data is copied from the first storage object to a second storage object.

Description

虚拟磁盘的优化缩减 Optimize virtual disks reduction

[0001]威廉E.索伯 [0001] William E. Sauber

技术领域 FIELD

[0002]本发明涉及数据存储,并且更具体地涉及重新调整虚拟磁盘的容量。 [0002] The present invention relates to data storage and, more particularly, to re-adjust the capacity of the virtual disk.

背景技术 Background technique

[0003]虚拟磁盘是直接或间接从一个或多个底层物理存储装置的内存中形成的存储对象。 [0003] Virtual objects stored disk is formed directly or indirectly from one or more underlying physical memory storage device. 虚拟机将虚拟磁盘解释为物理存储装置,例如硬盘。 The virtual machine virtual disk interpreted as a physical storage device such as a hard disk. 一种类型的虚拟磁盘是动态虚拟磁盘。 One type of virtual disk is a dynamic virtual disk. 动态虚拟磁盘可以在容量上从相对较小的初始容量(这种情况中动态虚拟磁盘使用较少量的存储空间)变到某种最大容量(其中动态虚拟磁盘使用更大量的存储空间)。 Dynamic virtual disk can be relatively small in capacity from the initial capacity (dynamic virtual disk used in this case, a smaller amount of storage space) is changed to a certain maximum capacity (dynamic virtual disks wherein a larger amount of storage space). 当虚拟机存储附加数据时,虚拟磁盘容量变大。 When a virtual machine to store additional data, virtual disk capacity increases. 动态虚拟磁盘高效地利用底层物理存储装置的空间,因为动态虚拟磁盘仅仅在虚拟机实际需要存储空间时消耗存储空间。 Dynamic virtual disk efficiently using the space underlying physical storage devices, since only a dynamic virtual disk storage space consumed when the virtual machine memory space actually required.

[0004]但虚拟机不再使用存储空间的一部分时,可以回收未使用的存储空间。 [0004] However, when the virtual machine is no longer part of the memory space used can be recovered unused storage space. 例如,如果虚拟机在虚拟磁盘上存储了一个文件,但随后将该文件指定为删除,在底层物理存储装置中包含该文件的存储空间就不再由虚拟机主动地使用。 For example, if a file stored in a virtual machine on a virtual disk, but then the specified file is deleted, the file comprising the storage space in the underlying physical storage devices is no longer actively used by the virtual machine. 这种存储空间可以例如由管理底层物理存储装置的文件系统来回收。 This storage space can be recovered, for example, by the underlying physical storage device management file system. 这称为“缩减”虚拟磁盘。 This is called "reduced" virtual disk. 然而,缩减虚拟磁盘的常规方法通常需要大量的输入和输出(I/O)操作,这些操作可能负面地影响性能。 However, conventional methods to reduce the virtual disk usually requires a lot of input and output (I / O) operations, which may negatively affect performance.

发明内容 SUMMARY

[0005]本文披露了缩减一个存储对象的各种系统和方法。 [0005] Disclosed herein are various systems and methods reduce a storage object. 例如,一种方法可以包括接收缩减该存储对象的一个请求。 For example, a method may include receiving a request for reduction of the storage object. 该存储对象可以包括多个存储单元。 The object may include a plurality of memory storage units. 该方法还可以包括接收识别一组存储单元的一个列表。 The method may further comprise receiving a group of memory cells to identify a list. 该列表可以响应于缩减该存储对象的请求而产生。 The list may be reduced in response to a request for the stored objects is generated. 该方法还包括从该存储对象中的一组存储单元(并未在接收的列表中得到识别)读取数据,并且包括将读取的数据从该第一存储对象复制到一个第二存储对象。 The method further comprises reading data from the memory a set of object storage unit (identified in the list has not been received), and including the read data is copied from the first storage object to a second storage object. 在一个实施例中,该第一和第二存储对象是动态虚拟磁盘。 In one embodiment, the first and second objects are dynamic virtual disk storage.

[0006]在一个实施例中,该方法包括响应于缩减该存储对象的请求而创建一个文件。 [0006] In one embodiment, the method includes, in response to a reduction of the storage object and a request to create a file. 创建该文件可以在不执行任何I/O操作的情况下完成。 Complete case file can be created without performing any I / O operations. 这种情况可以通过检查与该文件相关联的一个属性的值来检测。 This situation can be detected by checking a property associated with the file value. 该列表识别包括在该文件中的存储对象的多个部分。 The list comprises identifying a plurality of portions of the storage objects in the file. 一旦完成缩减操作,就可以删除该文件。 Once the reduction is complete, you can delete the file. 在一个实施例中,在该列表中识别的这些部分是在创建该文件之前未使用的该存储对象的多个部分。 In one embodiment, the portions identified in the list is stored in a plurality of portions of the object before creating the file is not used.

[0007]在一个实施例中,该方法包括接收一个第二列表并将该第二列表与该第一列表合并。 [0007] In one embodiment, the method includes receiving a second list and the second list merge with the first list. 每个列表对应于该存储对象的一个分区并且识别这些对应的分区的多个未使用部分。 Each list corresponds to a partition of the storage object and identify the corresponding plurality of partitions unused portion.

[0008] —种系统的示例可以包括一个或多个处理器和连接至该一个或多个处理器的内存。 [0008] - Examples of such systems may include one or more processors and coupled to the one or more processors, memory. 该内存存储多条程序指令,这些程序指令可用于执行像上述方法的一种方法。 The memory stores a plurality of program instructions, the program instructions may be used to perform a method as in the above method. 类似地,这些程序指令可以存储在一个计算机可读存储介质上。 Similarly, the program instructions may be stored on a computer-readable storage medium.

[0009] 前述内容是一个概述,因此不可避免地包含细节的简化、概括以及省略;因而本领域技术人员将认识到概述仅仅是说明性的并且在任何情况下不用于限制。 [0009] The foregoing is a summary and thus inevitably contain simplifications, generalizations and omissions of detail; therefore skilled in the art will appreciate that the summary is illustrative only and is not intended to limit in any case. 如权利要求所唯一定义的本发明的其他方面、发明特征和优点在以下提供的非限制性详细描述中将变得明显。 As other aspects, features and advantages of the present invention, the invention is uniquely defined by the claims will become apparent in the non-limiting detailed description provided hereinafter.

附图说明 BRIEF DESCRIPTION

[0010]通过参考附图,本发明可以得到更好的理解,并且其众多目标、特征以及优点对本领域技术人员是明显的。 [0010] reference to the drawings, the present invention may be better understood, and its numerous objects, features and advantages of the present will be apparent to the skilled person.

[0011]图1是根据一个实施例的一种缩减动态虚拟磁盘的系统的框图。 [0011] FIG. 1 is a block diagram of one embodiment of the reduced dynamic virtual disk system according to one embodiment.

[0012]图2A是根据一个实施例的动态虚拟磁盘的图示。 [0012] FIG 2A is an illustration of a dynamic virtual disk according to the embodiment.

[0013]图2B是根据一个实施例的动态虚拟磁盘的图示。 [0013] FIG 2B is an illustration of a dynamic virtual disk according to the embodiment.

[0014]图2C是根据一个实施例的动态虚拟磁盘的图示。 [0014] FIG 2C is an illustration of a dynamic virtual disk according to the embodiment.

[0015]图3是根据一个实施例的一种执行动态虚拟磁盘缩减操作的方法的流程图。 [0015] FIG. 3 is a flowchart of a method of performing a reduction operation according to a dynamic virtual disk embodiment.

[0016]图4A的流程图根据一个实施例展示了一种执行动态虚拟磁盘缩减操作的方法的多个附加方面。 Flowchart [0016] Figure 4A according to one embodiment illustrates a method of performing a plurality of additional aspects of dynamic operation of the virtual disk reduced.

[0017]图4B的流程图根据一个实施例展示了一种执行动态虚拟磁盘缩减操作的方法的多个附加方面。 [0017] FIG. 4B shows a flowchart in accordance with one embodiment of a method of performing a plurality of additional aspects of dynamic operation of the virtual disk is reduced.

[0018]图5是根据一个实施例的一种计算装置的框图,该框图展示了如何在软件中实施一个容量调整管理器。 [0018] FIG. 5 is a block diagram of a computing device according to an embodiment, a block diagram shows how to implement a resize manager in software.

[0019]图6是根据一个实施例的一种网络系统的框图,该框图展示了各种计算装置如何通过网络进行通信。 [0019] FIG. 6 is a block diagram of one embodiment of a network system of the embodiment, a block diagram showing how the various computing devices to communicate over the network.

[0020]尽管易于对本发明进行各种修改和替代,但在附图和详细说明中将本发明的具体实施例作为示例来提供。 [0020] Although the present invention is easy to various modifications and alternative, in the drawings and described in detail in the present embodiment of the invention provided as an example. 应当理解的是,附图和详细说明不用于将本发明限制于所披露的具体形式。 It should be understood that the drawings and detailed description is not to limit the invention to the particular forms disclosed. 相反,本发明应该涵盖落在所附权利要求定义的本发明的精神和范围之内的所有修改形式、等同形式以及替代形式。 Rather, the invention should cover all modifications within the spirit and scope of the invention defined by the appended claims, equivalents, and alternatives.

具体实施方式 detailed description

[0021]在采用虚拟化的系统中,主机装置上布置了一个或多个虚拟机。 [0021] In the virtualization system, the arrangement of one or more virtual machines on the host device. 这种主机装置安装有一个主操作系统,该主操作系统提供对主机装置的资源的访问并管理它们,例如处理器周期、存储空间以及网络带宽。 This host device is attached to a primary operating system, the host operating system provides access to the resources of the host device and manage them, such as processor cycles, network bandwidth and storage space. 主机分配这些资源以便在这个或这些虚拟机中使用。 Host allocate these resources to be used in this or these virtual machines. 每个虚拟机或来宾可以运行它自己的操作系统和应用程序。 Each virtual machine or guest can run its own operating system and applications.

[0022]运行在操作系统上的虚拟机以及一个或多个应用程序通常使用一些存储空间。 [0022] The virtual machines running on the operating system and one or more applications typically use some storage space. 主机通常分配一个或多个虚拟磁盘给虚拟机。 The host typically assign one or more virtual disks to the virtual machine. 一种类型的虚拟磁盘是动态虚拟磁盘。 One type of virtual disk is a dynamic virtual disk. 当例如通过主操作系统创建动态虚拟磁盘时,主机设置虚拟磁盘的最大容量,例如100千兆字节(Gb )。 When, for example, the operating system creates a dynamic virtual disk master, setting the maximum capacity of the host virtual disk, for example, 100 gigabyte (Gb). 该虚拟磁盘被称为10Gb虚拟磁盘,并且一旦该虚拟磁盘与虚拟机相关联时,虚拟机就将该虚拟磁盘看作是10Gb存储装置。 The virtual disk is referred to as a virtual disk 10Gb, and when once the virtual disk is associated with a virtual machine, the virtual machine the virtual disk as the storage device is 10Gb.

[0023]当主机首次创建一个动态虚拟磁盘时,该虚拟磁盘基本上耗用零物理存储空间,因为虚拟机仍未向虚拟磁盘写入任何数据。 [0023] When the host for the first time create a dynamic virtual disk, the virtual disk is essentially zero consumption of physical storage space, because the virtual machine has not yet written any data to the virtual disk. 也就是说,主机已经向该虚拟机磁盘分配了10Gb的存储空间,但该虚拟磁盘仍未使用这些存储空间的任意一部分。 In other words, the host has been assigned to the virtual machine disk 10Gb of storage space, but the virtual disk still use any part of these storage space. 主机分配10Gb是承诺10Gb的物理存储空间对与该虚拟磁盘相关联的虚拟机是可用的。 Host is committed to allocate 10Gb 10Gb of storage space for physical and virtual machines associated with the virtual disk is available. 动态地分配虚拟磁盘意味着直到虚拟机将写操作指向虚拟机时,主机的文件系统实际上才需要向虚拟磁盘分配底层物理存储装置的具体物理存储器。 Dynamically allocating the virtual machine until the virtual disk means that the write operation is directed to a virtual machine, the host file system in fact only need to allocate a specific physical memory underlying physical storage devices to the virtual disk. 直到虚拟机写入到存储空间时,最终可由虚拟磁盘利用的存储空间才可用于其他目的,例如临时存储器。 Until the virtual machine is written into the memory space, virtual disk storage space may be eventually utilized available for other purposes, such as temporary memory.

[0024] 主机可以创建的另一种类型的虚拟磁盘是固定盘。 Another type of virtual disk [0024] The host can create a fixed disk. 在固定盘情况中,在创建固定盘时主机的文件系统预留了与所分配的空间相对应的物理存储器。 In the case of the fixed plate, the fixed host when creating the file system reserved disk space corresponding to the allocated physical memory. 在此示例中,如果主机向固定的虚拟磁盘分配10Gb,文件系统就在底层物理存储装置上划拨10Gb的物理存储空间并将该存储空间标记为已使用,这样该存储空间不能用于任何其他目的。 In this example, if 10Gb, host file system is allocated to the virtual disk is fixed 10Gb allocated physical storage space on a storage device and the underlying physical storage space for the markers used, so that the storage space can not be used for any other purpose .

[0025]在动态虚拟磁盘的情况中,虚拟机将虚拟磁盘看作是具有100Gb(或近似10Gb)的空闲或可利用空间的10Gb存储装置,并且文件系统将虚拟磁盘看作是具有基本为零容量的存储对象。 [0025] In the case of dynamic virtual disk, the virtual machine is idle virtual disk as having a 100Gb (or approximately 10Gb) or 10Gb storage device may utilize space, virtual disk and the file system is considered as having a substantially zero capacity of the storage object. 在创建虚拟磁盘时,虚拟磁盘中的已用空间实际上不为零,因为与该虚拟磁盘相关联的某些元数据通常存储在虚拟机磁盘中。 When you create a virtual disk, virtual disk space used practically zero, because associated with the virtual disk Some metadata is typically stored in a virtual machine disk. 例如,虚拟机磁盘可以包括识别虚拟磁盘中可用空间和已用空间的图。 For example, a virtual machine may include a disk identification FIG virtual disk space available and used space. 因此,即使主机分配10Gb的虚拟磁盘,虚拟机可以将该虚拟磁盘看作是最初具有少于10Gb的可用空间,并且文件系统可用将该虚拟磁盘看作是容量大于零。 Thus, even if the host is assigned 10Gb virtual disk, the virtual machine can be considered as the initial virtual disk space is available having less than 10Gb, and the virtual disk file system may be seen as larger than zero.

[0026]当虚拟机写到虚拟磁盘时,就消耗或使用了物理存储空间。 [0026] When a virtual machine is written to the virtual disk, or on the consumption of physical storage space. 通常虚拟机将虚拟磁盘的一部分标记为已使用,这减少了虚拟机在虚拟机磁盘中所观察到的可用空间的容量。 Typically the virtual machine is part of the tag used virtual disk, which reduces the capacity of the virtual machine disk observed available space of the virtual machine. 虚拟机能够直接访问底层物理存储装置以便写入数据。 Virtual machine direct access to the underlying physical storage device to write data. 可替代地,虚拟机可以将数据转移到主机上的文件系统,并且文件系统可以对物理存储装置进行实际的写操作。 Alternatively, the virtual machine may transfer the data to a file system on the host, and the file system may write to the actual physical storage device. 虚拟机还将写操作通知给文件系统。 Virtual machines will also write to the file notification system. 响应于虚拟机的通知,文件系统将存储虚拟磁盘的底层物理存储装置的一部分标记为已使用。 Virtual machine in response to the notification, the file system will be part of the tag stores the virtual disk underlying physical storage devices is used. 例如,如果虚拟机写入IGb的文件,文件系统将虚拟磁盘的容量增加IGb并将等于IGb容量的物理存储空间的容量标记为已使用,因此这些空间不可用于其他目的。 For example, if the virtual machine is written IGb files, the system will increase the capacity of the virtual disk and IGb physical storage space equal to the capacity of the tag IGb capacity is used, so these spaces can not be used for other purposes. 以此方式,虚拟磁盘的容量可以随着时间而增长。 In this way, the virtual disk capacity can grow over time.

[0027]在一些情况中,虚拟机不再希望存储先前写入到虚拟磁盘的数据。 [0027] In some cases, the virtual machine no longer want to store data previously written to the virtual disk. 考虑以下示例。 Consider the following example. 在第一时间点,虚拟机下载软件包并将该软件包写入到虚拟磁盘。 In the first point in time, virtual machine download the package and the package is written to the virtual disk. 在此示例中,该软件包使用IGb的空间。 In this example, the use of the package space of IGb. 也就是说,当虚拟机将该软件包写入到虚拟磁盘时,虚拟机将虚拟磁盘中的空闲空间的容量减少了IGb并且文件系统将虚拟磁盘的容量增加了1Gb。 That is, when the virtual machine software package written to the virtual disk, virtual machine virtual disk free space capacity is reduced IGb and the file system of the virtual disk capacity increases 1Gb. 如果虚拟机随后下载了该软件包的一个较新版本(也使用IGb的存储空间)并在虚拟磁盘中使用该较新的版本,虚拟机再次将虚拟磁盘中的空闲空间的容量减少IGb并且文件系统再次将虚拟磁盘的容量增加了1Gb。 If the virtual machine and then download a newer version of the software package (also IGb of storage space) and use the newer version of the virtual disk, the virtual machine again in the capacity of a virtual disk free space and reduce file IGb the system will again increase the virtual disk capacity 1Gb. 当增加虚拟磁盘文件的容量时,文件系统将底层物理存储装置上的相应容量的物理存储空间标记为已使用。 When increasing the capacity of the virtual disk file, the file system corresponding to the capacity of the physical storage device on the underlying physical storage space marked as used. 在此示例中,虚拟磁盘现在存储了两个版本的软件包,一个较新版本和一个旧版本。 In this example, the virtual disk storage now two versions of the package, a newer version and an older version. 假设旧版本是废弃的,虚拟机可以将旧版本标记为删除。 Assuming that the old version is obsolete, the old version of the virtual machine can be marked for deletion. 当虚拟机将I日版本标记为删除时,虚拟机将虚拟磁盘中的可用空间容量增加IGb。 When the virtual machine I date version marked for deletion, the virtual machine will be available in the virtual disk space capacity increase IGb. 然而,虚拟机通常不向文件系统通知此事,所以文件系统仍将物理存储空间分配给两个版本的软件包。 However, the virtual machine is usually not informed of this fact to the file system, the file system will still physical storage space allocated to the two versions of the package. 也就是说,尽管虚拟机只将IGb的虚拟磁盘看作用于存储较新的软件包,但文件系统仍认为2Gb用于储存两个版本的软件包。 In other words, although only IGb virtual machine virtual disk as storage for newer packages, but the file system still believe 2Gb to store two versions of software packages.

[0028]由于在虚拟机执行创建空闲空间的操作(例如,如以上示例中,将数据标记为删除)时未通知主机,所以文件系统并不会响应于这些操作来减少虚拟磁盘的容量。 [0028] When the host is not notified of the free space due to the operation of creating a virtual machine is executed (e.g., as in the above example, the data marked for deletion), the file system is not in response to an operation to reduce the capacity of the virtual disk. 如果允许这种情况向其逻辑结论方向发展,虚拟磁盘文件可能最终增长到它的最大允许容量,并且虚拟机不能够在虚拟磁盘中存储任何额外数据。 If we allow this development to its logical conclusion direction, the virtual disk file may eventually grow to its maximum allowable capacity, and the virtual machine can not store any additional data in the virtual disk. 在一些情况中这是可能发生的,尽管虚拟机不再关心虚拟磁盘中数据的十分重要的部分。 In some cases this can happen, even though virtual machine data in a virtual disk is no longer concerned about the very important part. 例如,虚拟机可以指定应该将某些数据标记为删除。 For example, a virtual machine can specify certain data should be marked for deletion. 结果,虚拟机将这些数据部分看作是可用空间。 As a result, these data the virtual machine is seen as part of the available space. 然而,虚拟机通常不会将虚拟机不再关心的数据的那些部分传送至文件系统。 However, those who do not usually part of the virtual machine virtual machine will no longer care about the data to the file system. 因此,文件系统已经在底层物理存储装置上标记为已使用或不可用的物理存储器(包含虚拟机不再关心的数据)。 Thus, the file system has been marked on the underlying physical storage device is a physical memory used or unavailable (VM no longer contain data of interest). 在这种情况中,从虚拟机的角度看,虚拟磁盘具有可用的空间,但从主机的角度看,可以将虚拟磁盘看作是满的。 In this case, from the point of view of virtual machines, virtual disk has space available, but the host's point of view, the virtual disk can be considered full.

[0029] 很多原因导致这种不良情况。 [0029] a lot of reasons for this bad situation. 在一个示例中,如果虚拟磁盘文件达到了它的最大分配容量(从文件系统的角度来看),虚拟机将不能够执行新的数据写操作。 In one example, if the virtual disk file reaches its maximum capacity allocation (from the point of view of the file system), the virtual machine will not be able to implement new data writes. 而且,存储空间通常是短缺的,所以在存储装置中存储不再有用的数据可能增加存储系统的成本并不必要地请求获得额外的存储装置。 Also, the shortage of storage space is usually, stored in the storage device so that no useful data storage systems may increase the cost and unnecessary request for additional storage means. 仍进一步地,增加存储装置中所用存储空间的容量在一些情况下可能负面地影响存储装置的性能。 Still further, an increase in the storage device in some cases may adversely affect the storage capacity of the storage space by means of performance. 例如,当一个存储装置更满地载入数据时可能要比存储装置不那么满地载入花费更多的时间来读取或写入到存储装置。 For example, when a memory device may be more than the floor load data storage means less floor loading takes more time to read or write to the storage device.

[0030]为了改善以上不利状况,传统的系统可以采用回收虚拟机不再需要的存储空间的方法。 [0030] In order to improve the above adverse conditions, the conventional method of storage system can be recovered using the virtual machine is no longer needed. 这种做法称为缩减虚拟磁盘。 This is known to reduce the virtual disk. 以下讨论一个这类方法以及与常规方法相关的一些限制。 The following discussion of such a method as well as some of the limitations associated with conventional methods.

[0031] —种缩减虚拟磁盘的方法包括将一种模式(例如,全零)写入到底层存储装置中分配给该虚拟磁盘但包含虚拟机未使用的数据的全部区域。 [0031] - a method to reduce the virtual disk comprising a pattern (e.g., all zero) is written to the underlying storage device allocated to the virtual disk, but the entire region containing unused virtual machine data. 零写入到的物理存储装置中的那些区域存储了虚拟机先前写入但虚拟机不再使用的数据。 Those areas of zero is written to physical storage device stored in the virtual machine, but the virtual machine the previously written data are no longer used. 在这种示例中,虚拟机的操作系统与用于组织底层物理存储装置上的数据的文件系统相兼容。 In this example, the virtual machine operating system and a file system for organizing data on the underlying physical storage devices is compatible. 这允许虚拟机指定底层物理存储装置中的哪些物理存储空间应当以零来覆盖。 This allows the virtual machine to specify which physical storage space of the underlying physical storage devices should be covered with zeros.

[0032]当虚拟机接收到缩减虚拟磁盘的请求时,虚拟机首先识别虚拟磁盘中虚拟机先前使用但目前不再使用的那些部分。 [0032] When the virtual machine receives a request to reduce the virtual disk, the virtual machine to identify those portions of the first virtual disk in a virtual machine previously used but no longer used. 然后虚拟机向虚拟机磁盘的那些部分写入全零。 Then the virtual machine writes all zeros to those parts of the virtual machine disk. 在一个示例中,虚拟机维护虚拟磁盘的一个图,该图指示虚拟磁盘的哪些部分包含使用的、或有效的数据并且哪些部分不包含这些数据。 In one example, the virtual machine maintains a view of a virtual disk, which indicates which parts of FIG virtual disk comprising use or valid data and which does not contain the data portion. 该图指示虚拟机在虚拟磁盘中使用了多少空间以及虚拟磁盘中多少空间可利用。 The figure indicates that the virtual machine how much space and how many virtual disk space available in the virtual disk.

[0033]然后主机停止或中止虚拟机的操作。 [0033] The host then stop or suspend operation of the virtual machine. 这意味着虚拟机不再能够写入到虚拟磁盘。 This means that the virtual machine is no longer able to write to the virtual disk. 在一些情况中,虚拟机仍然能够从虚拟磁盘中读取。 In some cases, the virtual machines can still be read from the virtual disk. 在缩减操作的情况中,虚拟磁盘被称为源虚拟磁盘,因为虚拟磁盘中的数据将要复制到被称为目的虚拟磁盘的新虚拟磁盘。 In the case of reduced operation, the virtual disk is called the source virtual disk, virtual disk because the data will be copied to the new virtual disk is called the destination virtual disk.

[0034]接着,主机创建新的(目的)虚拟磁盘。 [0034] Next, create a new host (purpose) virtual disk. 文件系统可以向目的虚拟磁盘分配等量的存储空间。 The file system can allocate storage space for the same amount to the destination virtual disk. 例如,如果主机先前为源虚拟磁盘分配10Gb,主机可以为目的虚拟磁盘分配另一个100Gb。 For example, if the host 10Gb previously assigned to the source virtual disk, the host can assign another purpose virtual disk is 100Gb. 如以上提及,主机将目的虚拟磁盘看作是在创建该目的虚拟磁盘时容量就基本为零的存储对象。 As mentioned above, the destination host virtual disk as a storage object when creating the virtual disk capacity is the purpose of substantially zero.

[0035]接着,主机读取底层物理存储装置中对应于源虚拟磁盘的那些部分。 [0035] Next, the host reads those portions of the underlying physical storage devices corresponding to the source virtual disk. 主机读取被文件系统标记为由虚拟磁盘使用的所有存储空间。 The host reads the file system is marked by all virtual disk storage space used. 也就是说,如果文件系统将虚拟磁盘文件的容量看作是10Gb(这意味着文件系统已经将10Gb的存储空间标记为由虚拟磁盘使用),主机就读取10Gb的数据。 That is, if the file system capacity is seen as a virtual disk file (this means that the file system has 10Gb of storage space marked by the virtual disk usage) 10Gb, 10Gb of data the host reads.

[0036]对于主机所读取的底层物理存储装置中的每个部分,主机都确定是否该部分填以全零。 [0036] For each portion of the underlying physical storage device in the read host, the host is determined whether the portion filled with all zeros. 如果是这样,主机认为物理存储装置的这部分未由虚拟机使用。 If so, the host that this device is not part of the physical storage used by the virtual machine. 当物理存储装置的这部分不包含全零时,主机认为这部分由虚拟机使用并将存储在这部分中的数据写入到新的虚拟磁盘。 When this part of the physical storage device does not contain all zeros, that this part of the host writes data to a new virtual disk in this section is stored and used by the virtual machine. 因此,物理存储装置中分配给虚拟磁盘并包含全零的任意部分不会从源虚拟磁盘复制到目的虚拟磁盘。 Thus, the physical storage device to a virtual disk and includes any portion of zero is not copied from the source disk to the virtual destination virtual disk. 如所提及,包含全零的那些部分是虚拟机所指示的并未由虚拟机使用的那些部分,所以虚拟机向那些部分写入全零。 As mentioned, includes those portions of all zeros is not part of those used by the virtual machine virtual machine instructions, so the virtual machine writes all zeros to those parts.

[0037] —旦虚拟机所使用的所有数据被读取并复制到目的虚拟磁盘,目的虚拟磁盘仅包含标记为由虚拟机使用的数据,并且不包含虚拟机不关心的数据。 [0037] - Once all of the data used by the virtual machine is read and copied to the destination virtual disk, the destination virtual disk contains only data labeled by the virtual machine and the virtual machine does not contain data of interest. 此时,主机可以删除源虚拟磁盘文件并指示虚拟机利用目的虚拟磁盘恢复操作。 At this point, the host can remove the source virtual disk files and virtual machine instructions use the destination virtual disk recovery operations. 虚拟机可以开始向目的虚拟磁盘写数据并从目的虚拟磁盘读取。 Virtual virtual machine can start writing data to the destination disk and read from the destination virtual disk.

[0038]从主机的角度看,上述方法可以使虚拟磁盘的容量显著减少。 [0038] From the host's perspective, the above-described method can make the capacity of the virtual disk is significantly reduced. 然而,这样做需要将零写入到物理存储装置中包含数据(这些数据不再由虚拟机使用)的所有部分,并读取物理存储装置中虚拟机磁盘已经使用的所有部分。 However, this requires zero is written to all portions of the physical storage device contains data (which is no longer used by the virtual machine), and reads in all parts of the virtual machine physical disk storage devices have been used. 在一些情况中,读和写(I/O操作)可能消耗大量计算资源,例如处理器周期和数据传输带宽。 In some cases, reading and writing (I / O operations) may consume large amounts of computing resources such as processor cycles and data transfer bandwidth.

[0039]考虑将虚拟磁盘看作是10Gb的示例,但仅包括虚拟机关心的32Gb数据。 [0039] Consider the virtual disk as an example of 10Gb, 32Gb of data but includes only the heart of the virtual machine. 执行以上方法包括虚拟机写入68Gb的零。 Performing the above method includes the virtual machine writes 68Gb of zero. 然后主机读取10Gb的数据并将这10Gb与零相比较。 The host then reads the data of 10Gb and 10Gb which is compared with zero. 接着,主机将虚拟机关心的32Gb数据写到新的虚拟磁盘。 Next, the host will 32Gb data center virtual machine writes new virtual disk. 这总计是200Gb的I/O操作。 This total is 200Gb of I / O operations.

[0040]以下针对所附图示描述一种缩减动态虚拟磁盘的替代方法。 [0040] The following alternative method for reducing dynamic virtual disk for the following illustrated description. 该替代方法减少了执行相同缩减的I/O操作量,从而突破了理论最小值。 This alternative method reduces / O operation is performed to reduce the amount of the same I, thus breaking the theoretical minimum. 在以上示例中,替代方法包括仅读取32Gb并且仅写入32Gb。 In the above example, only the alternative method includes reading and writing only 32Gb 32Gb. 减少136GB的I/O操作表示68%的节约量,这意味着相同的缩减操作可以在更短的时长中执行并使用相当少的计算资源,例如处理器周期和数据传输带宽。 The 136GB reduce I / O operations represented 68% of the savings, which means the same reduction operation may be performed using relatively little computing resources in a shorter length of time, such as processor cycles and data transfer bandwidth.

[0041]图1是一种计算系统的框图。 [0041] FIG. 1 is a block diagram of a computing system. 如图所示,该计算系统包括由网络30连接的计算装置10和存储装置20,该存储装置包括虚拟磁盘22和虚拟磁盘24。 As shown, the computing system includes a computing device 10 and the storage device 30 is connected by a network 20. The storage device 22 includes a virtual disk and a virtual disk 24. 网络30可以包括WAN(广域网)(例如互联网)、一个或多个LAN(局域网)和/或一个或多个SAN(存储区域网)。 Network 30 may include a WAN (Wide Area Network) (e.g. the Internet), one or more LAN (Local Area Network) and / or one or more SAN (Storage Area Network).

[0042]计算装置10是例如个人计算机、膝上型计算机、服务器、个人数字助理、蜂窝电话等这样的计算装置。 [0042] The computing device 10 is a computing device such as, for example, a personal computer, a laptop computer, a server, a personal digital assistant, a cellular phone. 计算装置10包括操作系统50(包括文件系统60)和虚拟化模块70(包括容量调整管理器72)。 The computing device 10 includes an operating system 50 (including the file system 60) and the virtualization module 70 (including resize manager 72). 计算装置10还实现虚拟机40(1)(包括操作系统42(1 )、容量调整模块44(1)和应用程序46(I))和虚拟机40(2)(包括操作系统42(2)、容量调整模块44(2)和应用程序46(2))。 The computing device 10 also implements a virtual machine 40 (1) (including an operating system 42 (1), the capacity adjustment module 44 (1) and application 46 (I)) and virtual machines 40 (2) (including an operating system 42 (2) , the capacity adjustment module 44 (2) and application 46 (2)).

[0043]操作系统50可以通过计算装置10获取计算资源,例如处理器或存储资源(例如存储器20)。 [0043] 10 operating system 50 may obtain a computing resource, such as a processor or memory resources by the computing device (e.g. memory 20). 在一个实施例中,存储器20包括组织成物理集群的物理存储装置。 In one embodiment, the memory 20 includes a physical storage device into a physical cluster tissue. 集群表示可以读取或写入到存储器20的最少量的数据,例如4Kb。 It represents the cluster can read or write data to the minimum amount of memory 20, e.g. 4Kb. 物理存储装置中的每个集群顺序地从例如物理集群0(代表第一物理集群)到某个最大数(代表物理存储装置中的最后一个物理集群)进行编号。 Each cluster of physical storage devices are sequentially numbered from the physical cluster, for example, 0 (representing a first physical cluster) to some maximum number (representing the last physical cluster of physical storage devices). 存储装置20可以包括在和/或连接至(例如,通过总线、网络或其他适合的互联设备)计算装置10。 Storage device 20 may be included in and / or connected (e.g., via a bus, network or other suitable network equipment) computing means 10. 存储装置20提供持久性的数据存储,这样存储在这种存储装置上的数据甚至在关闭存储装置之后仍保持存储状态。 Memory device 20 provides persistent storage of data so that the data stored on such a storage device stored state remains even after closing the storage device. 这种存储装置例如可以是硬盘、光碟(CD)、数字通用光盘(DVD)、或其他大容量存储装置、或包括这种存储装置阵列的存储系统(例如独立磁盘冗余阵列(RAID)系统或光存储自动点唱机)。 Such a memory device may be a hard disk, a CD (CD), digital versatile disk (DVD), or other mass storage device, or a memory system including an array of such memory devices (e.g., redundant array of independent disks (RAID) system, or optical storage jukebox). 这种存储装置还可以是在这类物理存储装置和/或存储系统上实施的虚拟或逻辑存储装置。 Such a memory device may also be a virtual or logical storage devices on such physical storage devices and / or storage system implemented. 例如,这类存储装置可以是在RAID存储系统上实施的逻辑卷。 For example, such a storage device may be a logical volume on RAID storage system of the embodiment. 另外,这类存储装置可以包括一个或多个存储装置。 In addition, such storage means may comprise one or more storage devices. 存储装置还可以包括一种或多种类型的存储介质,包括固态介质(例如,闪盘驱动器)、光介质(例如,CD和DVD)以及磁介质(例如,硬盘或磁带)。 Storage device may further comprise one or more types of storage media, including solid-state medium (e.g., flash drives), optical media (e.g., CD and DVD), and magnetic media (e.g., hard disk or magnetic tape).

[0044]文件系统60可以将数据(例如存储器20中的数据)组织进入文件和目录中。 [0044] The file system 60 may be data (e.g., data in the memory 20) organized into the files and directories. 文件系统60可以维护存储器20中的文件和数据的物理单元的列表。 File system 60 may maintain a list of physical units in the memory 20 and the data files. 例如,当操作系统50创建新文件时,操作系统50可以将该文件的参数通知给文件系统60,例如大小和类型、关联关系和各种其他元数据。 For example, when the operating system 50 creates a new file, the operating system 50 can inform the parameter file to the file system 60, such as size and type of relationship, and various other metadata. 利用这种信息,文件系统60可以确定例如在存储器20中哪些集群将存储该文件的数据。 With this information, for example, the file system 60 may determine the cluster to which the data file is stored in the memory 20. 类似地,当针对存储器20进行写操作时,文件系统60分配具体的物理集群以存储写入的数据。 Similarly, when a write operation for the memory 20, the file system allocation data 60 to store the write specific physical cluster. 文件系统60持续跟踪哪些物理集群已使用、哪些文件在已使用的物理集群中存储数据以及哪些物理集群未使用。 60 file system which keeps track of the physical cluster has been used, which files to store data as well as physical cluster which is not used in the physical cluster already used.

[0045]在一个实施例中,操作系统50创建虚拟磁盘,例如虚拟磁盘22ο文件系统60指定存储器20中的哪些物理集群存储虚拟磁盘22的数据。 [0045] In one embodiment, the operating system 50 creates a virtual disk, virtual disk such as a data file system 60 22ο specify which physical cluster memory 20 stores the virtual disk 22. 在一个实施例中,操作系统50指定虚拟磁盘22是动态虚拟磁盘。 In one embodiment, operating system 50 specifying the virtual disk 22 is a dynamic virtual disk. 动态虚拟磁盘最初具有相对少量的实际使用存储器并且在虚拟机(对虚拟磁盘具有写访问权)需要更多空间时可以增加。 Dynamic virtual disk initially has a relatively small amount of memory and the actual use in a virtual machine (have write access to virtual disks) may increase when more space is needed. 文件系统60将动态虚拟磁盘22看作是存储对象,例如文件,该存储对象最初的容量几乎为零。 Dynamic virtual file system 60 to disk 22 is regarded as an object store, such as a file, the storage capacity of the original object is almost zero. 因此,当最初创建虚拟磁盘22时,文件系统60不会将存储器20中的物理集群的任何一个识别为实际存储虚拟磁盘22的数据。 Thus, when initially created virtual disk 22, the file system 60 does not identify any physical cluster in the memory 20 to store the actual data of the virtual disk 22. 当更多的数据由例如虚拟机40写入到虚拟磁盘22时,文件系统60增加虚拟磁盘22的容量并将存储器20中的附加物理集群识别为存储虚拟磁盘22的数据。 As more data is written by the virtual machine, for example, 40 to 22 when the virtual disk, the file system 60 to increase the physical cluster identified as an additional data storage capacity of the virtual disk 20 and the memory 22 of the virtual disk 22.

[0046]操作系统50可以向虚拟机40的一个或多个分配虚拟磁盘22。 [0046] The operating system 50 may be a virtual disk 22 to one or more assigned virtual machine 40. 操作系统50可以通知虚拟机40已经给虚拟机40分配并指定了虚拟磁盘。 50 operating system can notify the virtual machine 40 to 40 has been assigned virtual machine and specify the virtual disk. 一般而言,虚拟机40是充当物理计算机系统的软件结构。 In general, the virtual machine 40 is to act as a physical computer system software architecture. 例如,虚拟机40可以运行应用程序(例如应用程序46),提供服务并且处理命令。 For example, the virtual machine 40 to run an application (e.g., application 46), and the processing of service orders. 应用程序46的示例可以包括针对计费、电子表格、数据库、字处理、媒体消费、采购和开发、产品开发等的软件。 46 sample applications may include software for accounting, spreadsheets, databases, word processing, media consumption, purchase and development, product development, etc. 虚拟机可以运行它自己的操作系统,例如操作系统42。 Virtual machines can run its own operating system, such as operating system 42. 示例操作系统包括微软Windows和Unix。 Examples of operating systems include Microsoft Windows and Unix. 当应用程序46写数据时,操作系统42可以对虚拟磁盘22进行写操作。 When the application to write data 46, 42 operating system can write to a virtual disk 22. 操作系统42可以保存一个图,该图识别虚拟磁盘22中已使用的多个部分以及可用的多个部分。 Operating system 42 can store a map that identifies the virtual disk 22. A plurality of portions of a plurality of parts used and available. 为了确定虚拟磁盘22中存储的数据在物理上存储在什么位置,操作系统42可以与文件系统60进行通信。 In order to determine the data stored in the virtual disk 22 is physically stored in what position, the operating system 42 may communicate with the file system 60.

[0047]操作系统50还可以将虚拟磁盘22的某些特性通知给虚拟机40,例如可用空间的容量。 [0047] The operating system 50 may also be certain characteristics of the virtual disk 22 is notified to the virtual machine 40, for example, the capacity of the available space. 虚拟机40不需要知道虚拟磁盘22是动态的。 40 virtual machines do not need to know the virtual disk 22 is dynamic. 当操作系统50为虚拟机40分配虚拟磁盘22时,操作系统50通知虚拟机40在虚拟磁盘22中有多少空间对虚拟机40是可利用的。 When the operating system as a virtual machine is allocated 50 40 22 virtual disk, virtual machine operating system notice 50 40 There are 22 virtual disk in a virtual machine 40 how much space is available. 虚拟机40将虚拟磁盘22看作是一个存储对象,该存储对象的容量由操作系统50指定。 The virtual machine virtual disk 40 is considered as a storage object 22, the memory capacity of the designated object 50 by the operating system. 虚拟机40可以不知道用于存储虚拟磁盘22的物理集群的实际容量或数量最初是十分小的并且可以在虚拟机40向虚拟磁盘22写入附加数据时增加。 40 virtual machines may not know the actual number of physical capacity or a cluster of virtual storage disk 22 is initially very small and can be increased when the virtual machine 40 writes additional data to the virtual disk 22. 例如,操作系统50可以向虚拟磁盘22划拨10Gb并将虚拟磁盘22分配给虚拟机40。 For example, the operating system can allocate 10Gb and 50 virtual disk to a virtual disk allocated to virtual machines 22 22 40. 虚拟机40将虚拟磁盘22看作是10Gb的存储对象。 Virtual machine 40 will be seen as a virtual disk 22 10Gb of storage object. 文件系统60将虚拟磁盘22看作是OGb的存储对象。 60 file system will be seen as a virtual disk 22 of the storage object OGb. 在一个实施例中,虚拟机40维护一个图(例如位图),该图将虚拟磁盘22表示为虚拟集群的顺序排列。 In one embodiment, the virtual machine 40 maintains a map (e.g. a bitmap), this figure represents the virtual disk 22 are arranged in the order of the virtual cluster. 每个虚拟集群可以有固定的容量。 Each virtual cluster can have a fixed capacity. 例如,虚拟机40可以将虚拟磁盘22看作是一系列25K的虚拟集群(其中每个虚拟集群是4Kb),在此示例中该虚拟磁盘是100GB的虚拟磁盘。 For example, the virtual machine 40 may be a virtual disk 22 as a series of virtual clusters 25K (wherein each virtual cluster is 4Kb), in this example, the virtual disk is a virtual disk 100GB. 虚拟机40可以使用该图来识别哪些虚拟集群已使用以及哪些未使用。 40 virtual machines can use this map to identify which virtual clusters have been used and which is not used.

[0048] 应用程序46对虚拟磁盘22的写操作示例可如下进行。 [0048] Application Example 46 pairs of the write operation of the virtual disk 22 may be performed as follows. 应用程序46执行写操作。 46 application performs a write operation. 写操作包括在应用程序46使用的文件中保存数据,存储从网络下载的文件等。 Write operation includes saving data in a file using the application 46, the stored files downloaded from a network. 虚拟机40检测是否虚拟磁盘22具有可用空间。 Virtual machine 40 detects whether the virtual disk 22 has a free space. 例如,虚拟机40可以检测虚拟集群的图以检测哪些虚拟集群(如果有的话)是可用的。 For example, a virtual machine can detect 40 map virtual clusters which virtual cluster to detect (if any) are available. 如果虚拟机40检测到虚拟磁盘22是充满的,或没有可用的虚拟集群,写操作失败。 If the virtual machine 40 detects the virtual disk 22 is full or not available virtual cluster, write operation failed. 否则,应用程序46向虚拟机40传递与写操作相关的信息,例如文件名。 Otherwise, the application 46 passes to 40 virtual machines associated with the write operation of information, such as file names. 应用程序46还可以向虚拟机40传递将要写入的数据。 Data application 46 may also be transferred to the virtual machine 40 to be written. 虚拟机40对虚拟磁盘22进行写操作。 40 pairs of virtual machine virtual disks 22 for writing. 为了这样做,虚拟机40向文件系统60传递信息,该信息表示需要写操作。 To do so, the virtual machine 40 to transmit information to the file system 60, the information indicates the need for a write operation. 该信息可以识别将要写入的数据的大小和容量,以及该数据所关联的文件的文件名。 This information may identify the size and capacity of data to be written, and the file name of the associated data file.

[0049]文件系统60检测是否有足够的空间分配给虚拟磁盘22以便容纳数据。 If [0049] the file system 60 detects there is enough space allocated to the virtual disk 22 in order to accommodate data. 例如,如果应用程序46正写入IGb的数据,并且文件系统60发现10Gb分配给虚拟磁盘22且仅使用了50Gb,文件系统60就会检测到在虚拟磁盘22中有足够的分配空间来容纳写操作。 For example, if the application 46 IGb data is being written, and the file system 60 to a virtual disk 10Gb found and uses only 50Gb 22, file system 60 will detect there is enough space allocated in the virtual disk to accommodate write 22 operating. 在这种情况中,文件系统60可以通知虚拟机40有足够的可用空间并且写操作可以进行。 In this case, the file system 60 can notify the virtual machine 40 has enough free space and the write operation can be performed. 否则,文件系统60可以指示写操作应该会失败。 Otherwise, the file system 60 may indicate a write operation should fail. 可替代地,文件系统60可以为虚拟磁盘22分配额外的存储空间并允许进行写操作。 Alternatively, the file system 60 can allocate additional storage space for the virtual disk 22 and allow a write operation.

[0050]如果文件系统60检测到虚拟磁盘22有足够的分配空间来容纳写操作,文件系统60在存储器20中分配实际存储数据的一个或多个物理集群或物理集群的范围。 [0050] If the virtual file system 60 detects disk 22 has allocated enough space to accommodate a write operation, the file system 60 allocates one or more physical clusters or physical cluster data is actually stored in the memory 20 range. 文件系统60还可以向虚拟机40发送识别物理集群的信息。 File system 60 may also transmit information identifying the physical cluster 40 to the virtual machine. 虚拟机40将数据传输至文件系统60并更新虚拟集群图以便将分配给数据的虚拟集群识别为已使用。 Virtual machine 40 transmits data to update the virtual file system 60 and assigned to the cluster to FIG virtual cluster identification data is used. 文件系统60可以将数据存储在存储器20中。 File system 60 may store data in the memory 20. 可替代地,虚拟机22可以直接向存储器20传输数据。 Alternatively, the virtual machine 22 can transfer data directly to memory 20. 存储器20将数据存储在文件系统60所指定的那些物理集群上。 The memory 20 stores data in the file system 60 on those specified physical cluster.

[0051]当虚拟机40不再需要特定的数据项时,例如当应用程序46发布删除文件的命令时,虚拟机40可以更新虚拟集群图以指示存储数据的虚拟机集群不再包含有效数据。 [0051] When the virtual machine 40 no longer require specific data items, such as when the application 46 issues a command to delete a file, the virtual machine 40 may update the virtual cluster map to indicate the data stored in the virtual machine clusters no longer contains valid data. 虚拟集群中的数据被指定为删除并且虚拟集群被标记为可用的存储空间。 Data in the virtual cluster are designated for deletion and virtual cluster is marked as available storage space.

[0052]与创建虚拟机和管理虚拟机以及虚拟机资源相关的操作可以由包括容量调整管理器72的虚拟化模块70来执行。 [0052] may be performed with the management of virtual machines and virtual machines and virtual machine resources related operations comprising a resize manager 70, the virtualization module 72. 例如,当缩减虚拟磁盘(例如虚拟磁盘22)时,容量调整管理器72可以与容量调整模块(例如容量调整模块44)进行通信以缩减虚拟磁盘22。 For example, when reducing a virtual disk (vdisk e.g. 22), resize manager module 72 may adjust the capacity (e.g. capacity adjustment module 44) to reduce the communication virtual disk 22.

[0053]在一个实施例中,操作系统50可以检测指示虚拟磁盘应该缩减的条件并将此信息传送至虚拟模块70。 [0053] In one embodiment, OS 50 may detect a condition indicative of the virtual disk to be reduced and provide this information to the virtual transmission module 70. 然后容量调整管理器72可以通知容量调整模块44虚拟磁盘22的缩减正在进行。 Then resize manager 72 may notify the virtual disk 44 capacity adjusting module 22 being reduced. 接着容量调整模块44可以在占有虚拟磁盘22的基本上所有空闲空间的虚拟磁盘22中创建文件。 Then resize module 44 can create a virtual disk file is basically all the free space of the virtual disk occupies 22 of the 22. 容量调整模块44可以使用虚拟机40所维护的虚拟集群的图以便在该文件所占有的虚拟磁盘22中产生虚拟集群列表。 Capacity adjustment module 44 may use a virtual machine Figure 40 in order to maintain the virtual cluster of some 22 virtual disk generate a list of the virtual cluster file share. 这种列表本质上是虚拟磁盘22中虚拟磁盘22未使用的所有虚拟集群的列表,无论这些单元从未被写入到虚拟机40或已经之前被其使用以便存储数据并且然后被指定为已经被虚拟机40删除。 A list of all the virtual cluster virtual disk 22 in the virtual disk 22 is not used on the nature of such a list, whether these cells have never been written to the virtual machine 40 or has been previously used to store data and which is then designated as having been 40 to delete the virtual machine.

[0054]虚拟机40可以将虚拟集群的列表传送至操作系统50。 [0054] 40 virtual machines can be transferred to the list of virtual cluster operating system 50. 在一个实施例中,虚拟机40首先将虚拟集群的列表转换为相应的物理集群的列表。 In one embodiment, the virtual machine 40 first list into a list of virtual clusters corresponding physical cluster. 文件系统60提供具有物理集群的虚拟机40,当虚拟机40向物理集群写入时,这些物理集群存储虚拟磁盘22的数据。 File system 60 provides a virtual machine having a physical cluster 40, 40 when the virtual machine is written to the physical cluster, the physical cluster data 22 stored in the virtual disk. 这允许虚拟机40在物理集群和虚拟集群之间进行映射。 This allows the virtual machine 40 to map between physical and virtual cluster cluster. 该列表中的物理集群表示一些单元,这些单元包含虚拟机40不再关心的数据。 The list of physical cluster represents a number of units, which contain data of the virtual machine 40 is no longer of concern.

[0055]操作系统50可以从虚拟机40已经写到的虚拟磁盘22的所有单元(除了列表中识别的单元)读取数据,并且将读取的数据复制到新的虚拟磁盘,例如虚拟磁盘24。 [0055] The operating system 50 may (in addition to the list of identified unit) reads data from all the virtual machine unit 40 has been written to the virtual disk 22, and the read data is copied to the new virtual disk, virtual disk 24 e.g. . 在该复制操作完成后,虚拟磁盘24仅包含虚拟机40关心的数据并且还足够大来容纳该数据。 After the copy operation is complete, the virtual disk 24 includes only the data of interest and the further virtual machines 40 large enough to accommodate the data. 也就是说,虚拟磁盘24可能小于虚拟磁盘22,因为虚拟磁盘24只具有用于虚拟机40感兴趣的数据的存储空间,尽管虚拟磁盘22可能包括存储虚拟机40不再关心的数据的存储空间。 In other words, the virtual disk 24 may be less than 22 virtual disks, because the virtual disk 24 has space for storing virtual machine data of interest of 40, although virtual disk storage space 22 may include a storage virtual machine 40 is no longer concerned about data .

[0056]图2A是I OOGb虚拟磁盘的图示,例如图1的虚拟磁盘22。 [0056] FIG 2A is an illustration I OOGb virtual disk, such as virtual disk 22 of FIG. 图2A展示了从文件系统(例如,图1的文件系统60)角度看的虚拟磁盘中的已用空间205和未用空间210。 2A shows a file from the system (e.g., file system 60 of FIG. 1) of the point of view of the virtual disk space used and unused space 205 210. 已用空间205和未用空间210代表一个或多个物理集群。 Not used space 205 and space 210 represents one or more physical clusters. 在一个实施例中,虚拟磁盘是从基本为零字节的已用存储空间发展到几乎充满的动态虚拟磁盘。 In one embodiment, the virtual disk from substantially zero byte memory space have been developed with the dynamic virtual disk is almost full. 例如,操作系统(例如图1的操作系统50)向虚拟磁盘分配了100Gb。 For example, the operating system (for example, operating system 501 of FIG.) 100Gb assigned to the virtual disk. 操作系统可以向虚拟机授予写权限,例如图1的虚拟机40。 The operating system can grant write permission to the virtual machine, for example, Figure 1 of the virtual machine 40.

[0057]在操作系统创建虚拟磁盘并向该虚拟磁盘分配存储空间(例如,10Gb)时,文件系统将该虚拟磁盘看作是具有基本为零字节的空间用于存储数据。 [0057] In the operating system creates the virtual disk and a virtual disk to allocate storage space (e.g., 10Gb), the virtual disk as the file system space having substantially zero bytes for storing data. 此时,不分配物理集群来存储虚拟磁盘的数据。 At this point, does not allocate physical cluster virtual disks to store data. 当虚拟机将数据写入到虚拟磁盘时,文件系统将底层存储装置(例如图1的存储器20)中的特定物理集群分配给数据并标记为已由这些物理集群(包含虚拟机写入的数据)使用。 Data when the virtual machine to write data to the virtual disk, the file system underlying storage device (e.g. memory 20 of FIG. 1) assigned to a particular physical data cluster and the physical cluster which has been labeled as (virtual machine comprising a writing )use. 随着时间变化,虚拟磁盘从其最初容量(这种情况下文件系统将几乎零字节的存储空间标记为已使用)增长到几乎90Gb的存储空间(文件系统将其标记为已使用),如图2A所示。 Over time, the virtual disk from its initial capacity (almost zero byte file system storage numerals as used in this case) to grow almost 90Gb storage space (marked as the file system used), such as As shown in FIG. 2A. 当虚拟机写入到虚拟磁盘时,文件系统标记已经使用的额外存储空间(例如,物理集群),并且虚拟磁盘动态地增长。 When the virtual machine is written to the virtual disk, the file system has been labeled using additional storage space (for example, physical cluster), and the virtual disk to grow dynamically.

[0058]图2B从虚拟机的角度展示了图2A的虚拟磁盘。 [0058] FIG 2B shows a virtual machine from the perspective of a virtual disk of FIG. 2A. 图2B展示了已用空间215和未用空间220。 2B shows a non-used space 215 and space 220. 已用空间215和未用空间220代表一个或多个虚拟集群。 215 used space and unused space 220 on behalf of one or more virtual clusters. 写到虚拟磁盘的虚拟机还可以从虚拟磁盘删除数据。 Written to the virtual disk virtual machine you can also delete data from the virtual disk. 在一个实施例中,虚拟机的一个或多个删除操作针对于虚拟磁盘中未使用空间220的一些或全部。 In one embodiment, the one or more virtual machines for the virtual delete unused disk space 220, some or all. 然而,这些删除操作不会传递到文件系统,所以尽管文件系统将虚拟磁盘看作是使用分配给虚拟磁盘的存储空间的90 %,但虚拟机将虚拟磁盘看作是只使用了分配给虚拟磁盘的存储空间的50%,如图2B所示。 However, these deletions are not passed to the file system, so even though the file system will be seen as a virtual disk assigned to the 90% of the storage space of the virtual disk, but the virtual machine will be seen as a virtual disk using only assigned to a virtual disk 50% of the storage space, as shown in FIG. 2B.

[0059]图2C从文件系统角度展示了缩减操作后图2A的虚拟磁盘,如以下所描述。 [0059] FIG 2C shows a perspective of the virtual file system of FIG. 2A disk after the reduction operation, as described below. 图2C展示了已用空间225和未用空间230。 2C shows a non-used space 225 and space 230. 已用空间225和未用空间230代表一个或多个物理集群。 Not used space 225 and space 230 represent one or more physical clusters. 需要注意的是,尽管已用空间225在图2C中描绘为一系列连续定位的集群,但在底层物理存储装置中不需要存在这样的安排。 It is noted that, although 225 has been depicted in FIG. 2C is a series of continuous space cluster location, but need not be present in such an arrangement the underlying physical storage devices. 如图2A和图2B所示,文件系统将包括在虚拟磁盘中的某些物理集群看作是由虚拟磁盘使用,即使虚拟机将相应的虚拟集群看作是未使用的。 2A and 2B, the file system will include certain physical cluster is regarded as a virtual disk used by the virtual disk, the virtual machine even if considered appropriate virtual clusters are unused. 缩减操作使得文件系统将这些区域看作是未使用的。 Reduction operation causes the file system will be considered as these areas are not used. 在缩减操作之后,文件系统将虚拟磁盘看作是使用了大概50%,这与缩减操作之前相反,在这种情况中文件系统认为虚拟磁盘使用了90%。 After the reduction, the file system will be seen as a virtual disk using about 50%, which is before the operation to reduce the contrary, in this case a virtual disk file system considers the use of 90%. 正如所看到的那样,缩减操作产生可由文件系统使用的额外空间。 As can be seen, the shrink operation to generate additional space used by the file system.

[0060]图3是一种执行虚拟磁盘缩减操作的方法的流程图。 [0060] FIG. 3 is a flowchart of a method for reducing the virtual disk operation performed. 在一个实施例中,由一个系统(例如图1的系统)来执行该方法。 In one embodiment, the method is performed by one system (e.g. the system of FIG. 1). 缩减操作开始于305。 Shrink operation begins at 305. 缩减操作可以响应于用户命令而启动。 Shrink operation may be initiated in response to user commands. 例如,系统管理员可以手动地选择虚拟磁盘,例如图1的虚拟磁盘22,并启动该虚拟磁盘的缩减操作。 For example, a system administrator can manually select a virtual disk, such as virtual disk 22 of Figure 1, and start down the operation of the virtual disk. 缩减的虚拟磁盘称为源虚拟磁盘。 Reduced virtual disk called the source virtual disk. 可替代地,缩减操作可以响应于检测到阈值条件而自动启动。 Alternatively, the operations may be reduced in response to detecting a threshold condition is automatically activated. 例如,操作系统(例如,图1的操作系统50)可以检测虚拟磁盘或底层物理存储装置(例如,图1的存储器20)的使用已经达到某个阈值,例如90%已满。 For example, an operating system (e.g., operating system 50 of FIG. 1) may detect the virtual disk or the underlying physical storage devices (e.g., memory 20 in FIG. 1) to be used has reached a certain threshold, such as 90% full. 响应于检测到已达到该阈值,操作系统可以启动虚拟磁盘的缩减操作。 In response to detecting the threshold has been reached, the operating system can start reducing operation of the virtual disk. 操作系统可以通过与文件系统(例如,图1的文件系统60)的通信来检测达到该阈值,该文件系统管理虚拟磁盘所使用的存储空间(例如,图1的存储器20)。 Operating system can be detected reaches the threshold value by communicating with the file system (e.g., a file system 60 in FIG. 1), the storage space of the virtual disk file management system used (e.g. memory, 20 of FIG. 1). 操作系统还可以周期地或响应于检测到自前一个缩减操作以来的经过时间量来启动缩减操作。 Operating systems also may periodically or in response to the detected amount of time elapsed before the operation starts from a cut down since the operation.

[0061]响应于操作系统检测到将要执行缩减操作,操作系统向容量调整管理器(例如,图I的容量调整管理器72)发布命令以开始缩减。 [0061] The operating system in response to the detected reduction operation to be performed, an operating system (e.g., I in FIG resize manager 72) to issue a command to start the resize manager reduced. 然后容量调整管理器通知虚拟机(例如,图1的虚拟机40)中的容量调整模块(例如,如图1所示的容量调整模块44)进行缩减操作。 Resize manager then notifies the virtual machine (e.g., virtual machine 1 in FIG. 40) in the capacity adjustment module (e.g., 1 shown in FIG capacity adjustment module 44) for the shrink operation. 容量调整管理器可以代表主操作系统来执行与缩减操作有关的操作。 Resize manager can represent the primary operating system to perform operations related to the reduction operation. 容量调整模块可以代表虚拟机执行与缩减操作有关的操作。 Capacity adjustment module can represent a virtual machine to perform operations related to the reduction of operations.

[0062]在310,如参考图4A进一步描述的,产生集群列表。 [0062] At 310, as further described with reference to Figure 4A, to produce a list of clusters. 该列表可以响应于接收到缩减操作的通知由容量调整模块来产生。 The list may be reduced in response to receiving a notification is generated by the operation of the capacity adjustment module. 该列表识别虚拟磁盘中虚拟机认为未使用的单元。 The list identifies the virtual disk in a virtual machine considered unused units. 列表中识别的这些单元中的一些可以被识别为由文件系统使用。 These units identified in the list may be identified by some of the file system. 从文件系统的角度来看,文件系统识别为已使用的单元有助于增加虚拟磁盘所利用的存储空间容量。 From the perspective view of the file system, the file system has been identified as a unit used help to increase storage capacity of the virtual disk utilized. 列表识别虚拟机在虚拟磁盘中所看到的基本上全部未使用空间。 List identifies virtual machines in a virtual disk see substantially all of the unused space. 在一个替代实施例中,列表可以识别虚拟机认为已使用的单元。 In an alternative embodiment, the list may identify that the virtual machine unit has been used.

[0063 ]在405,容量调整模块(例如,图1的容量调整模块44)接收虚拟磁盘(例如,图1的虚拟磁盘22)将要缩减的通知。 [0063] At 405, the capacity adjustment module (e.g., the capacity adjusting module 44 of FIG. 1) receives a virtual disk (e.g., a virtual disk 22 of FIG. 1) to be reduced notifications. 响应于通知,在410容量调整模块打开一个临时文件。 In response to the notification, to open a temporary file capacity adjustment module 410. 容量调整模块将该文件的容量设置为在虚拟机(例如图1的虚拟机40)看来几乎等于虚拟磁盘中空闲空间的容量。 Capacity Capacity adjustment module is provided for the file in the virtual machine (e.g. virtual machine 40 of FIG. 1) appears almost equal to the capacity of the virtual disk free space. 在一个实施例中,虚拟机将所有虚拟集群标记为可用空间或不可用空间,并包括该临时文件中的虚拟集群。 In one embodiment, all of the virtual machine virtual clusters marked as free space or a dead space, and the temporary file including virtual cluster. 虚拟机通常使较少数量的虚拟集群为空闲。 Virtual machines typically make a small number of virtual cluster is idle. 如果在缩减操作后任何操作使得虚拟磁盘扩大,这种剩余空间可用于存储数据。 If, after any operation such that the reduced operation to expand the virtual disk, the remaining space available for storing data.

[0064]创建文件并使虚拟集群标记为已使用也使得底层物理集群被标记为已使用。 [0064] to create the file and virtual clusters marked as used but also makes the underlying physical cluster is marked as used. 这防止可以在底层物理存储装置(例如,图1的存储器20)上运行的任何碎片整理操作移动这些单元。 This may prevent the underlying physical storage devices (e.g., memory 20 of FIG. 1) running on any debris finishing operation of the mobile units. 如果在缩减操作过程中移动了这些单元,缩减操作可能失败,或错误数据可能被复制。 If the mobile unit in the reduction process of the operation, the reduction operation may fail, or erroneous data may be copied.

[0065]容量调整模块设置文件的一个属性,该属性指定在关闭该文件时将会删除该文件。 [0065] Capacity adjustment module set an attribute file, which specifies that the file will be deleted when the file is closed. 容量调整模块还设置文件的一个属性,该属性指定管理该文件的存储器的文件系统(例如,图1的文件系统60)不应该以零填充为该文件分配的未使用空间,或对分配给该文件的单元执行任何写操作。 Capacity adjustment module further provided a file attribute, which specifies the memory of the file management system file (e.g., file system 60 of FIG. 1) should not be filled with zeros to the file space allocation unused, or assigned to the unit files to perform any write operation. 在一个实施例中,设置该属性包括在文件的元数据中设置标记。 In one embodiment, the property includes a flag set in the metadata file. 当文件系统为该临时文件分配空间时,文件系统读取该标记的值。 When the file system space allocated for the temporary file, the file system reads the value of the tag.

[0066]在一个实施例中,容量调整模块创建多个临时文件。 [0066] In one embodiment, a plurality of capacity adjusting module creates a temporary file. 例如,容量调整模块可以为每个连续范围的虚拟集群创建一个临时文件。 For example, the capacity adjustment module can create a temporary file for each virtual cluster continuous range. 在另一个示例中,虚拟磁盘可以跨越底层物理存储装置(例如图1的存储器20)的多个分区。 In another example, the virtual disk may span the underlying physical storage device (e.g. memory 20 of FIG. 1) of the plurality of partitions. 在此示例中,容量调整模块可以为虚拟磁盘所跨越的每个分区创建一个临时文件。 In this example, the capacity adjustment module can create a temporary file for each virtual disk partition spans. 可替代地,虚拟磁盘可以包括在一个单一部分中。 Alternatively, the virtual disk may be included in a single section.

[0067]在415,容量调整模块识别被分配用于存储文件中所包含的数据的虚拟集群并创建这些虚拟集群的列表。 [0067] The virtual cluster is allocated for storing file data included in 415, and recognize the capacity adjustment module creates a list of the virtual cluster. 在420,容量调整模块将虚拟集群标识符转换为物理集群标识符并创建一个新的物理集群标识符列表。 Physical cluster identifier and create a new physical cluster identifier list at 420, the capacity adjustment module identifier convert virtual cluster. 在一个实施例中,虚拟集群和物理集群的大小不同。 In one embodiment, different sizes of physical cluster and virtual cluster. 在这种情况中,单一的虚拟集群编号可以对应于多个物理集群编号,或反之亦然。 In this case, a single virtual cluster number may correspond to a plurality of the physical cluster number, or vice versa. 在将虚拟集群编号列表转换为物理集群编号列表之后,在425容量调整模块将该列表传送至容量调整管理器。 After converting the virtual cluster number list of physical cluster number list, the list is transmitted to resize manager 425 in the capacity adjustment module.

[0068]返回到图3,在315操作系统建立一个新的虚拟磁盘,例如图1的虚拟磁盘24,在315。 [0068] Returning to Figure 3, to establish a new virtual disk operating system 315, such as virtual disk 24 of FIG. 1, 315. 该虚拟磁盘将用作在源虚拟磁盘上存储的数据的目的虚拟磁盘。 The purpose of the virtual disk as the source of the data stored on the virtual disk to a virtual disk. 操作系统可以为目的虚拟磁盘和源虚拟磁盘分配相同容量的存储空间,或者操作系统可以为目的虚拟磁盘分配不同容量的存储空间。 Virtual disk and the operating system can assign the same source virtual disk storage capacity, or operating system may assign a different virtual disk for the purpose of storage capacity for the purpose. 操作系统可以指定目的虚拟磁盘是动态虚拟磁盘。 The operating system can specify the destination virtual disk is a dynamic virtual disk. 最初,在文件系统看来,目的虚拟磁盘基本上是空的,或容量为零字节。 Initially, the file system view, the purpose of the virtual disk is basically empty, or the capacity of zero bytes.

[0069]在320,如参考图4B进一步描述的,操作系统从源虚拟磁盘向目的虚拟磁盘复制数据。 [0069] At 320, as further described with reference to FIG 4B, the operating system virtual disk copy data from the source to the destination virtual disk. 在430,容量调整管理器接收容量调整模块产生的列表。 In the list resize manager 430 receives the capacity adjustment module generated. 在435,操作系统中止虚拟机。 In 435, suspend the virtual machine operating system. 当中止虚拟机时,虚拟机不能写入到虚拟磁盘。 When the suspended virtual machine, the virtual machine can not be written to the virtual disk. 在中止虚拟机的同时,虚拟机仍可以处理从虚拟磁盘的读操作。 While suspended virtual machine, the virtual machine can still handle a read operation from the virtual disk. 在一个实施例中,操作系统可以完全关闭虚拟机,这样在进行缩减操作时虚拟机不执行任何操作。 In one embodiment, the operating system can completely shut down the virtual machine, the virtual machine does not perform any such operation is reduced during operation.

[0070]文件系统维护底层物理存储装置的物理集群(用于存储虚拟磁盘的数据)列表。 [0070] The file system maintains the physical cluster (virtual disk for storing data) a list of the underlying physical storage devices. 在440,操作系统在物理集群列表中选择第一条项,该第一条项对应于物理存储装置中的第一物理集群。 At 440, the operating system selects the first item in the physical cluster list, the first entry corresponding to a first physical cluster of physical storage devices. 在445,操作系统将这种物理集群标识符与从容量调整模块接收的未使用的物理集群列表中的条项相比较,以确定由文件系统标记为已使用的物理集群是否由虚拟机使用。 In 445, the operating system such physical cluster identifier is compared with a list of physical cluster unused capacity adjustment module received from the clause, to determine whether the file system used by the physical cluster is marked as used by the virtual machine. 如果在两个列表中都识别了物理集群,操作系统不会从源虚拟磁盘向目的虚拟磁盘复制物理集群中的数据,因为从容量调整模块接收的列表识别虚拟机不再使用的物理集群并且操作系统不会复制被识别为虚拟机未使用的集群。 If both lists are identified physical cluster, the virtual operating system does not object to the virtual disk from the source disk to copy data from the physical cluster, the physical cluster as received from the resize block list identifies the virtual machine is no longer used and the operation the system does not copy the virtual machine cluster is identified as unused. 如果物理集群被识别为由文件系统和虚拟机使用(例如,物理集群在从容量调整模块接收的列表中未得到识别),在450操作系统将该集群从源虚拟磁盘复制到目的虚拟磁盘。 If the physical cluster is identified by the file system and the virtual machine (e.g., the physical cluster in the list received from the resize module has not been identified), the virtual disk copied from the source to the destination virtual disk 450 in the cluster operating system. 操作系统从源虚拟磁盘的一些单元读取这些集群并写入由文件系统分配到目的虚拟磁盘的集群。 Operating system reads these clusters from some elements of the source virtual disk and written to the destination virtual disk cluster allocation by the file system to. 写入到目的虚拟磁盘的每个集群使得文件系统动态地增加目的虚拟磁盘的容量。 Each cluster is written to the target virtual disk file allows the system to dynamically increase the capacity of the destination virtual disk.

[0071]在455,操作系统检测是否附加的集群仍然从源虚拟磁盘复制到目的虚拟磁盘。 [0071] In 455, the operating system detects whether additional cluster still copied from the source virtual disk to the target virtual disk. 在一个实施例中,这包括遍历被文件系统识别为由源虚拟磁盘使用的所有集群的列表。 In one embodiment, this includes traversing the list of all clusters by the file system to identify the source of the virtual disk. 如果是这样,在460操作系统在由文件系统标记为已使用的物理集群列表中选择下一个条项。 If so, choose the next clause in the file system is marked by a list of physical cluster that has been used in 460 operating system.

[0072] 一旦需要复制到目的虚拟磁盘的所有集群都复制到目的虚拟磁盘,在465容量调整模块关闭临时文件,这导致临时文件的删除。 [0072] Once the virtual disk needs to be copied to the destination of all clusters are copied to the target virtual disk, close the temporary file in the capacity adjustment module 465, which leads to delete temporary files.

[0073]返回到图3,在325操作系统交换虚拟磁盘。 [0073] Returning to Figure 3, in 325 operating system swap virtual disk. 为了这样做,操作系统授予虚拟机对目的虚拟磁盘的读和写访问权限,并取消虚拟机访问源虚拟磁盘的权限。 To do so, the virtual machine operating system to grant access to read and write access to the target virtual disk, virtual machine and cancel permission to access the source virtual disk. 然后在330,操作系统可以删除源虚拟磁盘。 Then at 330, the operating system can remove the source virtual disk.

[0074] 一旦完成缩减操作,在335操作系统重新启动虚拟机。 [0074] Once the shrink operation, restart the virtual machine operating system 335. 当重新启动虚拟机时,该虚拟机就可以从目的虚拟机读取并写入到它。 When you restart the virtual machine, the virtual machine can read and write to it from the destination virtual machine.

[0075]图5是一种计算装置的框图,该框图展示了可以如何在软件中实施容量调整管理器72。 [0075] FIG. 5 is a block diagram of a computing device, a block diagram shows how the embodiment can adjust the capacity manager 72 in software. 计算系统510广义上代表能够执行计算机可读指令的任何单处理器或多处理器的计算装置或系统。 Computing system 510 broadly representative of the computing device or system capable of performing any single or multi-processor computer-readable instructions. 计算系统510的多个示例包括但不限于各种装置中的任意一种或多种,这些装置包括工作站、个人计算机、膝上型计算机、客户侧终端、服务器、分布式计算系统、手持装置(例如,个人数字助理和移动电话)、网络设备、存储控制器(例如,阵列控制器、磁带驱动控制器或硬盘驱动控制器)等。 A plurality of exemplary computing system 510 include, but are not limited to any one or more of the various devices, these means include workstations, personal computers, laptops, client-side terminals, servers, distributed computing systems, handheld devices ( For example, a mobile telephone and a personal digital assistant), a network device, a memory controller (e.g., array controller, a hard disk drive or a tape drive controller controllers) and the like. 在其最基本的配置中,计算系统510可以包括至少一个处理器514以及一个系统内存516。 In its most basic configuration, computing system 510 may comprise at least one processor 514 and a system memory 516. 通过执行实现容量调整管理器72的软件,计算系统510成为一个专用计算装置,该装置被配置成用于参与动态虚拟磁盘缩减操作。 By executing a resize manager software 72, the computing system 510 into a special-purpose computing device that is configured for participating in a dynamic virtual disk shrink operation.

[0076] 处理器514总体上代表能够处理数据或解释并执行多个指令的任何类型或形式的处理单元。 Any type or form of processing unit [0076] 514 is generally representative of a processor capable of processing data or interpreting and executing instructions. 在某些实施例中,处理器514可以从一个软件应用程序或模块中接收指令。 In certain embodiments, processor 514 may receive instructions from a software application or module. 这些指令可以使处理器514执行在此所说明和/或展示的这些实施例中的一个或多个的功能。 These instructions may cause processor 514 to perform one herein described and / or illustrated embodiments these one or more functions. 例如,处理器514可以执行和/或作为一种手段用于执行此处所描述的操作中的全部或一些。 For example, processor 514 may perform all and / or be a means for performing the operations described herein or some. 处理器514还可以执行和/或作为一种手段来执行在此说明和/或展示的任何其他操作、方法、或过程。 The processor 514 may also perform and / or be a means for performing any other operation, the methods described and / or illustrated, or process.

[0077]系统内存516总体上代表能够存储数据和/或其他计算机可读指令的任何类型或形式的易失性或非易失性存储装置或介质。 [0077] Representative capable of storing data and / or any other type or form of computer-readable instructions on a system memory 516 generally volatile or non-volatile storage device or medium. 系统内存516的多个示例包括(但不限于)随机存取存储器(RAM)、只读存储器(R0M)、闪存、或任何其他适当的存储装置。 Example plurality of system memory 516 include (but are not limited to) a random access memory (RAM), read-only memory (R0M), flash memory, or any other suitable storage device. 在一个实施例中,实施RAM模块135的程序指令可以载入到系统内存516中。 In one embodiment, the program instructions embodiment RAM modules 135 may be loaded into system memory 516.

[0078]在某些实施例中,除了处理器514和系统内存516外,计算系统510还可以包括一个或多个组件或元件。 [0078] In certain embodiments, in addition to processor 514 and system memory 516, computing system 510 may also include one or more components or elements. 例如,如图5所示,计算系统510可以包括内存控制器518、输入/输出(I/O)控制器520、以及通信接口522,它们中的每一个可以通过通信基础设施512相互连接。 For example, as shown in Figure 5, computing system 510 may include a memory controller 518, an input / output (I / O) controller 520, and a communication interface 522, each of which can be connected to each other through 512 communication infrastructure. 通信基础设施512总体上代表能够帮助在计算装置的一个或多个组件之间进行通信的任意类型或形式的基础设施。 Representative communication infrastructure 512 generally can help perform any type or form of communication infrastructure between one or more components of a computing device. 通信基础设施512的示例包括但不限于通信总线(例如工业标准体系结构(ISA)、外围组件互联(PCI)、第三代总线标准(PCIe)、或类似总线)和网络。 Examples of communication infrastructure 512 include, without limitation, a communication bus (e.g., Industry Standard Architecture (ISA), Peripheral Component Interconnect (PCI), a third generation bus standards (PCIe), or similar bus) and a network.

[0079]内存控制器518总体上代表在计算系统510的一个或多个组件之间操作内存或数据或者控制通信的任意类型或形式的装置。 [0079] The memory controller represents between one or more components of the computing system 510 or data memory 518, or overall operation of any type or form of communication of the control apparatus. 例如,在某些实施例中,内存控制器518可以通过通信基础设施512控制处理器514、系统内存516以及I/O控制器520之间的通信。 For example, in certain embodiments, memory controller 518 may control the processor 514 512, the communication between the system memory 516, and I / O controller 520 via communication infrastructure. 在某些实施例中,内存控制器518可以独立地或与其他元件相结合地执行和/或作为一种手段执行在此描述和/或展示的多个步骤或特征中的一个或多个。 In certain embodiments, memory controller 518 may be independently or in combination with other elements to perform and / or be a means of one or more of a plurality of steps or features described and / or illustrated in execution.

[0080] I/O控制器520总体上代表能够协调和/或控制一种计算装置的输入和输出功能的任何类型或形式的模块。 [0080] Representative generally capable of coordinating and / or controlling the input and output functions of a computing device that any type or form of module I / O controller 520. 例如,在某些实施例中I/O控制器520可以控制或协助在计算系统510的一个或多个元件(如处理器514、系统内存516、通信接口522、显示适配器526、输入接口550、以及存储接口554)之间的数据传送。 For example, in certain embodiments I / O controller 520 may control or assist in the implementation of one or more elements (such as processor 514, system memory 516, communication interface 522, display adapter 526 of computing system 510, an input interface 550, and storing the data transfer between the interface 554).

[0081]通信接口 522广义地代表能够协助计算系统510与一个或多个附加装置之间进行通信的任何类型或形式的通信装置或适配器。 [0081] Communication interface 522 broadly represents computing system 510 can help any type or form of communication device or a communication between the adapter and one or more additional devices. 例如,在某些实施例中,通信接口522可以协助计算系统510与包括多个附加的计算系统的私有或公共网络之间的通信。 For example, in certain embodiments, communication interface 522 may assist in communications between computing system 510 and includes a plurality of additional computing systems private or public networks. 通信接口522的示例包括但不限于有线网络接口(例如网络接口卡)、无线网络接口(例如无线网络接口卡)、调制解调器、以及任何其他适当的接口。 Examples of communication interface 522 include, without limitation, a wired network interface (such as a network interface card), a wireless network interface (e.g., wireless network interface card), a modem, and any other suitable interface. 在至少一个实施例中,通信接口522可通过到网络(如互联网)的直接链接来提供到一台远程服务器的直接连接。 In at least one embodiment, the communication interface 522 via a network (such as the Internet) a direct link to provide a direct connection to a remote server. 通信接口522还可以间接地提供这种连接,例如通过局域网(如以太网)、个人局域网、电话或缆线网、蜂窝电话连接、卫星数据连接、或任何其他适当的连接。 Communication interface 522 may also indirectly provide such a connection, for example, a local area network (such as Ethernet), a personal area network, a telephone or cable network, a cellular telephone connection, a satellite data connection, or any other suitable connection.

[0082] 在某些实施例中,通信接口522还可以代表一种主机适配器,该主机适配器被配置为用于通过一条外部总线或通信信道协助计算系统510与一个或多个附加网络或存储装置之间的通信。 [0082] In certain embodiments, communication interface 522 may also represent a host adapter, the host adapter is configured to assist in a computing system via an external bus or communications channel 510 with one or more additional network or storage devices communication between. 主机适配器的示例包括但不限于小型计算机系统接口(SCSI)主机适配器、通用串行总线(USB)主机设配器、电气和电子工程学会(IEEE)1594主机适配器、串行高级技术附件(SATA)、串行附接SCSI (SAS)和外部SATA(eSATA)主机适配器、高级技术附件(ATA)和并行ATA(PATA)主机适配器、光纤通道接口适配器、以太网适配器等。 Examples of host adapters include, but are not limited to, small computer system interface (SCSI) host adapter, a universal serial bus (USB) host adapter is provided, Institute of Electrical and Electronics Engineers (IEEE) 1594 host adapters, Serial Advanced Technology Attachment (SATA), serial attached SCSI (SAS) and the external SATA (eSATA) host adapters, advanced technology attachment (ATA), and parallel ATA (PATA) host adapters, fiber channel interface adapters, Ethernet adapters, and the like.

[0083]通信接口 522还可以允许计算系统510参与分布式计算或远程计算。 [0083] Communication interface 522 may also allow computing system 510 to engage in distributed or remote computing. 例如,通信接口522可以从一个远程装置接收指令或向一个远程装置发送指令用于执行。 For example, communication interface 522 may receive instructions from a remote device or send instructions to a remote device for execution.

[0084] 如图5所示,计算系统510还可以包括通过显示适配器526连接至通信基础设施512的至少一个显示装置524。 As shown in [0084] FIG. 5, computing system 510 may further comprise at least one display device 524 via display adapter 526 is connected to a communication infrastructure 512. 显示装置524总体上代表能够可视地呈现显示适配器526所转发的显示信息的任意类型或形式的装置。 Represents any type or form of display of the display information forwarded by display adapter device 526 can be visually presented on the device 524 generally. 相似地,显示适配器526总体上代表任意类型或形式的装置,这些装置被配置用于从通信基础设施512(或从本领域已知的帧缓冲器)转发图形、文本以及其他数据以便显示在显示装置524上。 Similarly, any type or form of display device generally representative of the adapter 526, these means are configured to forward graphics, text, and other data from communication infrastructure 512 (or known in the art from the present frame buffer) for display on the display means 524.

[0085]如图5所示,计算系统510还可以包括通过输入接口 550连接至通信基础设施512的至少一个输入装置528。 As shown in [0085] FIG. 5, computing system 510 may further include a connection to a communication infrastructure 512 via an input interface 550 of at least one input device 528. 输入装置528总体上代表能够向计算系统510提供由计算机或人员生成的输入的任意类型或形式的输入装置。 The input device 528 can be provided generally representative of any type or form of computer generated or input by the input device 510 to the computing system. 输入装置528的示例包括但不限于键盘、定位装置、语音识别装置或任意其他输入装置。 Examples of input device 528 include, but are not limited to, a keyboard, a pointing device, a speech recognition device, or any other input device.

[0086]如图5所示,计算系统510还包括通过存储接口 534连接至通信基础设施512的一个数据存储装置533。 As shown in [0086] FIG 5, further comprising a computing system 510 coupled to communication infrastructure 533 512 a data storage device via a storage interface 534. 存储装置533总体上代表能够存储数据和/或其他计算机可读指令的任意类型或形式的存储装置或介质。 Storage means 533 generally represent capable of storing data and / or any type or form of storage device or medium, other computer readable instructions. 例如,存储装置533可以是磁盘驱动器(例如,所谓的硬盘驱动器)、软盘驱动器、光盘驱动器、闪存驱动器、或者类似装置。 For example, storage device 533 may be a magnetic disk drive (e.g., a so-called hard drive), a floppy disk drive, optical disk drive, a flash drive, or the like. 存储接口534总体上代表用于在存储装置533和计算装置510的其他组件之间传输数据的任意类型或形式的接口或装置。 Representative of the overall storage interface 534 is used in any type or form of transmitting data between storage devices 533 and other components of computing device 510 or the interface device.

[0087]在某些实施例中,存储装置533可以被配置为用于读取自和/或写入到一个可移动存储单元,该可移动存储单元被配置为用于存储计算机软件、数据、或其他计算机可读信息。 [0087] In certain embodiments, the memory device 533 may be configured to read from and / or writes to a removable storage unit, the removable storage unit configured to store computer software, data, or other computer-readable information. 适合的可移动存储单元的示例包括但不限于软盘、磁带、光盘、闪存装置等等。 Examples of suitable removable storage units include, without limitation, a floppy disk, magnetic tape, optical disk, flash memory devices and the like. 存储装置533还可以包括其他类似的结构或装置,以允许计算机软件、数据或其他计算机可读指令下载到计算系统510中。 Memory device 533 may further comprise other similar structures or devices for allowing computer software, data, or other computer-readable instructions into computing system 510. 例如,存储装置533可以被配置成用于读或写软件、数据或其他计算机可读信息。 For example, storage device 533 may be configured to read or write software, data, or other computer-readable information. 存储装置533还可以作为计算系统510的一部分或可以是通过其他接口系统访问的一个分离的装置。 Memory device 533 may also be part of or may be a separate device accessed through other interface systems 510 in the computing system.

[0088]很多其他装置或子系统可以连接至计算系统510上。 [0088] Many other devices or subsystems may be connected to the computing system 510. 相反地,为了实施在此描述和/或展示的实施例,不需要图5中所示的所有组件和装置。 Conversely, to implement the embodiments described and / or illustrated, it does not require all of the components and devices illustrated in FIG. 5 in. 以上提到的这些装置和子系统还能够以不同于图5中所示的方式进行相互连接。 These devices and subsystems referenced above may also be connected to each other in a different embodiment shown in FIG. 5.

[0089]计算系统510还可使用任意数量的软件、固件、和/或硬件的配置。 [0089] The computing system 510 may also use any number of software, firmware and / or hardware configuration. 例如,在此披露的实施例中的一个或多个可以被编码为一种计算机可读介质上的计算机程序(也称为计算机软件、软件应用程序、计算机可读指令、或计算机控制逻辑)。 For example, in the embodiment disclosed herein, one or more may be encoded as a computer program on a computer-readable medium (also referred to as computer software, software applications, computer-readable instructions, or computer control logic). 计算机可读存储介质的示例包括磁存储介质(例如硬盘驱动器和软盘)、光存储介质(例如,CD或DVD-R0M)、电存储介质(例如,固态驱动器和闪存)等。 Examples of computer-readable storage media include magnetic storage media (e.g., hard disk drives and floppy disks), optical storage media (e.g., CD or DVD-R0M), electronic storage media (e.g., solid-state drives and flash memory). 这样的计算程序也可以通过网络(例如互联网或载体介质)传输到计算系统510以存储在内存中。 Such a computer program may also be transmitted to the computing system 510 for storage in memory via a network (e.g. the Internet or carrier medium).

[0090]包含计算机程序的计算机可读介质可以载入到计算系统510中。 [0090] The computer program comprises a computer-readable medium may be loaded into computing system 510. 存储在计算机可读介质上的所有或部分计算机程序然后可以存储在系统内存516和/或存储装置532和533的不同部分上。 All or portions of computer program stored on a computer-readable medium may then be stored in system memory 516 and / or different portions of storage devices 532 and 533. 当由处理器514执行时,载入到计算系统510中的计算机程序可以使处理器514执行和/或作为一种手段执行在此描述和/或展示的实施例中的一个或多个的功能。 When executed by a processor 514, a computer program loaded into computing system 510 may cause processor 514 to perform the functions and / or be a means for performing the herein described and / or illustrated embodiments, one or more of . 另外或可替代地,在此所说明和/或展示的实施例中的一个或多个可以在固件和/或硬件中实施。 Additionally or alternatively, the herein described one or more embodiments and / or illustrated herein may be implemented in firmware and / or hardware. 例如,可以将计算系统510配置为一种特定用途集成电路(ASIC),该电路被适配为用于实施在此所披露的这些实施例中的一个或多个。 For example, computing system 510 may be configured as an application specific integrated circuit (ASIC), the circuit is adapted to implement one or more of these embodiments are disclosed herein.

[0091]图6是网络架构600的框图,在该网络架构中客户端系统610、620和630以及服务器640和645可以连接至网络650。 [0091] FIG. 6 is a block diagram of a network architecture 600, client systems 610, 620 and 630 and servers 640 and 645 may be connected to network 650. In the network architecture. 客户端系统610、620和630总体上代表任意类型或形式的计算装置或系统。 Client systems 610, 620 and 630 of any type or form of computing device or system on behalf of the whole.

[0092]类似地,服务器640和645总体上代表被配置为用于提供不同的数据库服务和/或运行某些软件应用程序的计算装置或系统,例如在计算装置(例如图5中的计算系统510)上实施的应用程序服务器或数据库服务器。 [0092] Similarly, servers 640 and 645 on behalf of the generally configured to provide various database services and / or run some computing device or system for software applications, for example, in a computing device (e.g. computing system 5 in FIG. 510) application servers or database servers on the embodiment. 网络650总体上代表任何电信或计算机网络,例如包括:内部网、广域网(WAN)、局域网(LAN)、个人区域网(PAN)、或互联网。 It represents any telecommunication or computer network network 650 as a whole, including for example: the internal network, wide area network (WAN), local area network (LAN), a personal area network (PAN), or the Internet. 在一个示例中,月艮务器640和/或645可以包括如图1所示的RAM模块135。 In one example, the month that works to 640 and / or 645 may comprise RAM module 135 shown in FIG. 1.

[0093]如图6所示,一个或多个存储装置660(1)-(N)可以直接附接至服务器640。 [0093] As shown in FIG 6, one or more storage devices 660 (1) - (N) may be directly attached to the server 640. 类似地,一个或多个存储装置670(1)-(N)可以直接附接至服务器645。 Similarly, one or more storage devices 670 (1) - (N) may be directly attached to the server 645. 存储装置660(1)-(N)和存储装置670(1)-(N)总体上代表能够存储数据和/或其他计算机可读指令的任意类型或形式的存储装置或介质。 A storage device 660 (1) - (N) and storage devices 670 (1) - (N) generally represent capable of storing data and / or any type or form of storage device or medium, other computer readable instructions. 在某些实施例中,存储装置660(1 )-(N)和存储装置670(I )-(N)可以代表网络附联存储(NAS)装置,这些装置被配置为利用不同协议(例如网络文件系统(NFS)、服务器消息块(SMB)、或公共互联网文件系统(CIFS))与服务器640和645进行通信。 In certain embodiments, storage devices 660 (1) - (N) and storage devices 670 (I) - (N) may represent network Attached Storage (NAS) devices that are configured with different protocols (e.g., network file system (NFS), server message block (SMB), or the common Internet file system (the CIFS)) to communicate with servers 640 and 645.

[0094] 服务器640和645还可以连接至存储区域网络(SAN)结构680 JAN结构680总体上代表能够协助多个存储装置之间通信的任意类型或形式的计算机网络或体系结构。 [0094] The servers 640 and 645 may also be connected to a storage area network (SAN) 680 JAN structure generally representative of the structure 680 to assist any type or form of communication between a plurality of storage devices of computer network or architecture. SAN结构680可以协助服务器640和645与多个存储装置690(1 )-(N)和/或智能存储器阵列695之间的通信。 Communication between the (N) and / or intelligent storage array 695 - SAN structure 680 may facilitate communication between servers 640 and 645 and a plurality of storage devices 690 (1). SAN结构680还可以通过网络650以及服务器640和645协助客户端系统610、620和630与存储装置690(1 )-(N)和/或智能存储器阵列695之间的通信,其方式为装置690( I )-(N)以及阵列695对客户端系统610、620和630呈现为本地附接的装置。 SAN fabric 680 may also assist the client system via network 650 and servers 640 and 645 and storage devices 690 (1) 610, 620 and 630 - Communication between the (N) and / or intelligent storage array 695, 690 in a manner (I) - (N) and array 695 pairs of client systems 610, 620 and 630 appear as locally attached devices. 与存储装置660(1 )-(N)和存储装置670(1)-(N)—样,存储装置690(1)-(N)和存储阵列695总体上代表能够存储数据和/或其他计算机可读指令的任意类型或形式的存储装置或介质。 And the memory device 660 (1) - (N) and storage devices 670 (1) - (N) - like, a storage device 690 (1) - (N) and storage array 695 generally represent capable of storing data and / or other computer readable instructions any type or form of storage device or medium.

[0095]在某些实施例中,参考图5的计算系统510,通信接口(例如图5中的通信接口 522)可以用来在每个客户端系统610、620和630以及网络650之间提供连接。 [0095] In certain embodiments, with reference to FIG. 5, computing system 510, a communication interface (e.g., communication interface 522 in FIG. 5) may be used to provide between each client system 610, 620 and 630 and the network 650 connection. 客户端系统610、620和630能够利用例如网络浏览器或其他客户端软件访问服务器640或645的信息。 Client systems 610, 620 and 630 can utilize information such as a web browser or other client software to access the server 640 or 645. 这种软件可以允许客户端系统610、620和630访问由服务器640、服务器645、存储装置660(1)-(N)、存储装置670(1)-(N)、存储装置690(1)-(N)或智能存储器阵列695管理的数据。 Such software may allow client systems 610, 620 and 630 by the access server 640, server 645, storage devices 660 (1) - (N), storage devices 670 (1) - (N), storage devices 690 (1) - (N), or intelligent storage array 695 data management. 尽管图6描绘了使用网络(例如互联网)来交换数据,但在此描述和/或展示的实施例不限于互联网或任意具体的基于网络的环境。 Although Figure 6 depicts the use of a network (e.g. the Internet) for exchanging data, the embodiments described and / or illustrated embodiments are not limited to the Internet or any particular network-based environment.

[0096]在至少一个实施例中,在此披露的实施例中的一个或多个的全部或一部分可被编码为一种计算机程序并且由服务器640、服务器645、存储装置660(1)-(N)、存储装置670 [0096] In at least one embodiment, all of the one or more of the embodiments disclosed herein or may be encoded as part of a computer program and the server 640, server 645, storage devices 660 (1) - ( N), storage devices 670

(I)-(N)、存储装置690(1)-(N)、智能存储阵列695、或它们中的任意组合加载并执行。 (I) - (N), storage devices 690 (1) - (N), intelligent storage array 695, or any combination thereof is loaded and executed. 在此披露的实施例中的一个或多个的全部或一部分还可以被编码成为一种计算机程序,它存储在服务器640中、由服务器645来运行、并在网络650上分发给客户端系统610、620、和630。 In all embodiments of one or more embodiments disclosed herein or may also be encoded as part of a computer program, which is stored in server 640, run by server 645, and distributed to client systems 610 over the network 650 , 620, and 630.

[0097]在一些示例中,图1、5和6中的计算装置的全部或一部分可以代表云计算的或基于网络的环境的多个部分。 [0097] In some examples, all or a portion of the computing device of FIG. 1, 5 and 6 may represent a cloud-based environment or network. 云计算环境可以通过互联网提供各种服务和应用程序。 Cloud computing environment can provide a variety of services and applications over the Internet. 这些基于云的服务(例如,软件即服务、平台即服务、基础设施即服务等)可以通过网络浏览器或其他的远程接口进行访问。 These cloud-based services (for example, software as a service, platform as a service, infrastructure as a service, etc.) can be accessed via a web browser or other remote interface. 在此所述的不同功能可以通过远程桌面环境或任何其他的基于云的计算环境来提供。 Various functions described herein, or may be based on any other cloud computing environment be provided through a remote desktop environment.

[0098]另外,在此所述的这些模块中的一个或多个可以将数据、物理装置、和/或物理装置的表示从一种形式转换到另一种形式。 [0098] Additionally, one or more of the modules described herein may be data representing the physical means, and / or physical means from one form to another form. 例如,图1中的归档模块可以转换计算装置的行为以使得计算装置存储并管理RAM中的数据操作。 For example, in FIG. 1 can be converted to the archive module behavior calculating means to enable the computing device to store and manage data access RAM.

[0099]尽管已经结合一些实施例描述了本发明,但无意将本发明限制于本文阐述的具体形式。 [0099] While there has been described in connection with some embodiments of the present invention, but are not intended to limit the invention to the particular form set forth herein. 相反的是,本发明意在涵盖可以合理地包含在所附权利要求定义的本发明范围内的这些替代形式、修改形式以及等效形式。 In contrast, the present invention is such alternatives, modifications and equivalents are intended to cover can be reasonably included within the definition of the appended claims the present invention.

Claims (15)

1.一种用于执行缩减操作的方法,包括: 接收一个请求以便对一个第一存储对象执行一个缩减操作,其中该第一存储对象包括被指定给一个虚拟机的多个存储单元; 响应于该请求创建一个文件,其中该文件包括未被该虚拟机使用的第一组存储单元; 产生识别该第一组存储单元的信息,其中该第一组存储单元是该多个存储单元的第一子集,并且响应于执行一个缩减操作的请求来产生该信息;以及将该信息传输到一个主机,其中该主机被配置成执行该缩减操作,并且该缩减操作包括从第二组存储单元读取数据,其中该第二组存储单元是该多个存储单元的第二子集,并且该第一组存储单元和第二组存储单元是互不相交的,并且将该数据复制到一个第二存储对象。 1. A method for performing a shrink operation, comprising: receiving a request to execute a first storage object to a shrink operation, wherein the first object comprises a plurality of memory storage units is assigned to a virtual machine; in response to the request to create a file, wherein the file comprises a first set of memory cells is not the virtual machine; generating information identifying the first set of memory cells, wherein the first storage unit is a first set of the plurality of memory cells subset, and in response to a reduction operation execution request to generate the information; and a host, wherein the host is configured to transmit the information to perform the reduction operation and the reduction operation comprises reading from the second group of memory data, wherein the second set of storage unit is a second subset of the plurality of memory cells, and the first group of memory cells and a second group of memory cells are disjoint, and copies the data to a second storage object.
2.如权利要求1所述的方法,其中响应于该请求,由该虚拟机创建该文件。 2. The method according to claim 1, wherein in response to the request, the file created by the virtual machine.
3.如权利要求2所述的方法,进一步包括:检测该缩减操作的完成;并且响应于该检测而删除该文件。 The method according to claim 2, further comprising: detecting the completion of a reduction operation; and in response to the detection and delete the file.
4.如权利要求1所述的方法,进一步包括: 产生一个第一列表和第二列表,其中该第一列表对应于该第一存储对象的一个第一分区的多个未使用部分,该第二列表对应于该第一存储对象的一个第二分区的多个未使用部分,并且该主机被配置为将该第二列表与该第一列表合并。 4. The method according to claim 1, further comprising: generating a first list and a second list, wherein the first list corresponding to a plurality of the first storage object unused portions of the first partition, the second a plurality of two list corresponds to a first storage object unused portion of the second partition, and the host is configured to merge the second list to the first list.
5.如权利要求1所述的方法,进一步包括: 设置该文件的一个属性,其中该属性指示创建该文件不需要任何输入/输出即I/O操作;以及将该第一组存储单元标记为不可用的。 5. The method according to claim 1, further comprising: setting an attribute of the file, wherein the attribute indicates that the file does not need to create any input / output i.e. I / O operation; a first group of memory cells and the labeled unavailable.
6.如权利要求1所述的方法,其中该主机被进一步配置成响应于接收该请求为该第二存储对象分配一定量的存储空间,其中该一定量的存储空间等于分配给该第一存储对象的第一存储空间量。 6. The method according to claim 1, wherein the host is further configured to respond to receiving the request from the second object is allocated a certain amount of memory space for storage, wherein the amount of storage space allocated to the first memory is equal to a first amount of storage space object.
7.一种用于执行缩减操作的系统,包括: 接收一个请求以便对一个第一存储对象执行一个缩减操作的装置,其中该第一存储对象包括被指定给虚拟机的多个存储单元; 响应于该请求创建一个文件的装置,其中该文件包括未被该虚拟机使用的第一组存储单元; 产生识别该第一组存储单元的信息的装置,其中该第一组存储单元是该多个存储单元的第一子集,并且响应于执行一个缩减操作的请求来产生该信息;以及将该信息传输到一个主机的装置,其中该主机被配置成执行该缩减操作,并且该缩减操作包括从第二组存储单元读取数据,其中该第二组存储单元是该多个存储单元的第二子集,并且该第一组存储单元和第二组存储单元是互不相交的,并且将该数据复制到一个第二存储对象。 A system for performing a reduction operation, comprising: receiving a request to a first storage object to perform a reduction operation device, wherein the first object comprises a plurality of memory storage units is assigned to the virtual machine; Response this means a request to create a file, wherein the file comprises a first set of memory cells is not the use of the virtual machine; device information identifying the first set of memory cells is generated, wherein the first set of the plurality of memory cells is a first subset of memory cells, and in response to a reduction operation execution request to generate the information; and to a host device, wherein the host is configured to transmit the information to perform the reduction operation, and from the reduction operation comprises the second group of memory cells to read data, wherein the second set of storage unit is a second subset of the plurality of memory cells, and the first group of memory cells and a second group of memory cells are disjoint, and the copying the data to a second storage object.
8.如权利要求7所述的系统,其中响应于该请求,由该虚拟机创建该文件。 8. The system according to claim 7, wherein in response to the request, the file created by the virtual machine.
9.如权利要求8所述的系统,其中该系统进一步包括: 检测该缩减操作的完成的装置;并且响应于该检测而删除该文件的装置。 9. The system according to claim 8, wherein the system further comprises: detecting completion of the operation of reduction means; and means responsive to the detection of the document is deleted.
10.如权利要求7所述的系统,其中该系统进一步包括: 产生一个第一列表和第二列表的装置,其中该第一列表对应于该第一存储对象的一个第一分区的多个未使用部分,该第二列表对应于该第一存储对象的一个第二分区的多个未使用部分,并且该主机被配置成将该第二列表与该第一列表合并。 10. The system according to claim 7, wherein the system further comprises: a first means and second lists is generated, wherein the first list does not correspond to a plurality of the first object in the first memory partition use portion, the second list corresponds to a first plurality of storage object unused portions of the second partition, and the host is configured to merge the second list to the first list.
11.如权利要求7所述的系统,其中该系统进一步包括: 设置该文件的一个属性的装置,其中该属性指示创建该文件不需要任何输入/输出即I/O操作;以及将该第一组存储单元标记为不可用的装置。 11. The system according to claim 7, wherein the system further comprises: a means of setting the file attribute, wherein the attribute indicates that the file does not need to create any input / output i.e. I / O operation; and the first group of memory cells is marked as unavailable device.
12.如权利要求7所述的系统,其中该主机被进一步配置成响应于接收该请求为该第二存储对象分配一定量的存储空间,以及该一定量的存储空间等于分配给该第一存储对象的第一存储空间量。 12. The system according to claim 7, wherein the host is further configured to respond to receiving the request from the second object is allocated a certain amount of memory for storage, and a certain amount of storage space allocated to the first memory is equal to a first amount of storage space object.
13.—种用于执行缩减操作的系统,包括: 一个或多个处理器;以及链接到该一个或多个处理器的一个内存,该内存存储多条程序指令,该程序指令可执行用于: 接收一个请求以便对一个第一存储对象执行一个缩减操作,其中该第一存储对象包括被指定给一个虚拟机的多个存储单元; 响应于该请求创建一个文件,其中该文件包括未被该虚拟机使用的第一组存储单元; 产生识别该第一组存储单元的信息,其中该第一组存储单元是该多个存储单元的第一子集,并且响应于执行一个缩减操作的请求来产生该信息;以及将该信息传输到一个主机,其中该主机被配置为执行该缩减操作,并且该缩减操作包括: 从第二组存储单元读取数据,其中该第二组存储单元是该多个存储单元的第二子集,并且该第一组存储单元和第二组存储单元是互不相交的,并且将该数据 13.- species reduction system for performing operations, comprising: one or more processors; and a link to the one or more processors in a memory, the memory storing a plurality of program instructions, the program instructions are executable to : receiving a request to reduce a storage object to perform a first operation, wherein the first storage object comprises a plurality of memory cells are assigned to a virtual machine; in response to the request to create a file, wherein the file includes not the a first group of memory cells of the virtual machine; generating information identifying the first set of memory cells, wherein the first set of storage unit is a first subset of the plurality of memory cells, and in response to a request to perform a reduction operation this information is generated; and transmit the information to a host, wherein the host is configured to perform the reduction operation and the reduction operation comprises: reading data from a second group of memory cells, wherein the second group of the plurality of memory cells are a second subset of memory cells, and the first group of memory cells and a second group of memory cells are disjoint, the data and 制到一个第二存储对象。 A second storage system to the object.
14.如权利要求13所述的系统,其中响应于该请求,由该虚拟机创建该文件,并且这些程序指令进一步可执行用于检测该缩减操作的完成,并且响应于该检测而删除该文件。 And deleting the file 14. The system of claim 13, wherein in response to the request, the file created by the virtual machine, and the program instructions are further executable for detecting the completion of the reduction operation, and in response to the detection .
15.如权利要求13所述的系统,其中这些程序指令进一步可执行用于: 产生一个第一列表和第二列表,其中该第一列表对应于该第一存储对象的一个第一分区的多个未使用部分,该第二列表对应于该第一存储对象的一个第二分区的多个未使用部分,并且该主机被配置为将该第二列表与该第一列表合并。 15. The system according to claim 13, wherein the program instructions are further executable to: a generating a first and second lists, a first list wherein the storage object corresponding to the first partition of the first plurality unused portion, the second list corresponds to a plurality of the first storage object unused portions of the second partition, and the host is configured to merge the second list to the first list.
CN 201280010562 2011-03-15 2012-03-09 Optimize virtual disks reduction CN103443758B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US13048413 US8904136B2 (en) 2011-03-15 2011-03-15 Optimized shrinking of virtual disks
US13/048,413 2011-03-15
PCT/US2012/028506 WO2012125462A1 (en) 2011-03-15 2012-03-09 Optimized shrinking of virtual disks

Publications (2)

Publication Number Publication Date
CN103443758A true CN103443758A (en) 2013-12-11
CN103443758B true CN103443758B (en) 2016-11-30

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6247024B1 (en) * 1998-09-25 2001-06-12 International Business Machines Corporation Method and system for performing deferred file removal in a file system
CN1862476A (en) * 2006-04-19 2006-11-15 华中科技大学 Super large capacity virtual magnetic disk storage system
CN101470583A (en) * 2007-12-29 2009-07-01 英业达股份有限公司 System structure for implementing virtual disk service equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6247024B1 (en) * 1998-09-25 2001-06-12 International Business Machines Corporation Method and system for performing deferred file removal in a file system
CN1862476A (en) * 2006-04-19 2006-11-15 华中科技大学 Super large capacity virtual magnetic disk storage system
CN101470583A (en) * 2007-12-29 2009-07-01 英业达股份有限公司 System structure for implementing virtual disk service equipment

Similar Documents

Publication Publication Date Title
US20120011336A1 (en) Method of controlling information processing system and information apparatus
US20110179415A1 (en) Enablement and acceleration of live and near-live migration of virtual machines and their associated storage across networks
US20120278569A1 (en) Storage apparatus and control method therefor
US20130198459A1 (en) Systems and methods for a de-duplication cache
US20110320556A1 (en) Techniques For Migrating A Virtual Machine Using Shared Storage
US20090276588A1 (en) Free space utilization in tiered storage systems
US7441096B2 (en) Hierarchical storage management system
US7653794B2 (en) Converting physical machines to virtual machines
US20120167080A1 (en) Guest file system introspection and defragmentable virtual disk format for space efficiency
US20100241654A1 (en) Virtualized data storage system optimizations
US20140282514A1 (en) Virtualization support for storage devices
US20110093439A1 (en) De-duplication Storage System with Multiple Indices for Efficient File Storage
US20120066677A1 (en) On demand virtual machine image streaming
US8578370B2 (en) Managing memory in multiple virtual machines
US8392479B1 (en) Method and apparatus for optimizing storage space allocation for computer data
US20060277225A1 (en) Converting file system metadata structure while the file system remains available
US20140068183A1 (en) Systems, methods, and interfaces for adaptive persistence
US20110208909A1 (en) Reduction of i/o latency for writable copy-on-write snapshot function
US20120151250A1 (en) Failure recovery method in information processing system and information processing system
US8510499B1 (en) Solid state drive caching using memory structures to determine a storage space replacement candidate
US20120054746A1 (en) System software interfaces for space-optimized block devices
US9009106B1 (en) Method and system for implementing writable snapshots in a virtualized storage environment
US20100042719A1 (en) Content access to virtual machine resource
JP2005011316A (en) Method and system for allocating storage area, and virtualization apparatus
US20120109897A1 (en) System and method for optimizing mirror creation