AU2013237716B2 - System software interfaces for space-optimized block devices - Google Patents

System software interfaces for space-optimized block devices Download PDF

Info

Publication number
AU2013237716B2
AU2013237716B2 AU2013237716A AU2013237716A AU2013237716B2 AU 2013237716 B2 AU2013237716 B2 AU 2013237716B2 AU 2013237716 A AU2013237716 A AU 2013237716A AU 2013237716 A AU2013237716 A AU 2013237716A AU 2013237716 B2 AU2013237716 B2 AU 2013237716B2
Authority
AU
Australia
Prior art keywords
blocks
hypervisor
storage
storage blocks
computer system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
AU2013237716A
Other versions
AU2013237716A1 (en
Inventor
Tejasvi Aswathanarayana
Satyam Vaghani
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
VMware LLC
Original Assignee
VMware LLC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from AU2011218672A external-priority patent/AU2011218672B2/en
Application filed by VMware LLC filed Critical VMware LLC
Priority to AU2013237716A priority Critical patent/AU2013237716B2/en
Publication of AU2013237716A1 publication Critical patent/AU2013237716A1/en
Application granted granted Critical
Publication of AU2013237716B2 publication Critical patent/AU2013237716B2/en
Assigned to VMware LLC reassignment VMware LLC Request to Amend Deed and Register Assignors: VMWARE, INC.
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage

Abstract

Interfaces to storage devices that employ storage space optimization technologies, such as thin provisioning, are configured to enable the benefits gained from such technologies to be sustained. Such an interface may be provided in a hypervisor of a virtualized computer system to enable the hypervisor to discover features of a logical unit number (LUN), such as whether or not the LUN is thinly provisioned, and also in a virtual machine (VM) of the virtualized computer system to enable the VM to discover features of a virtual disk, such as whether or not the virtual disk is thinly provisioned. The discovery of these features enables the hypervisor or the VM to instruct the underlying storage device to carry out certain operations such as an operation to deallocate blocks previously allocated to a logical block device, so that the storage device can continue to benefit from storage space optimization technologies implemented therein. C/o ww U)L 00

Description

1 AUSTRALIA Patents Act 1990 VMWARE, INC. COMPLETE SPECIFICATION STANDARD PATENT Invention Title: System software interfaces for space-optimized block devices The following statement is a full description of this invention including the best method of performing it known to us:- 2 Cross-Reference to Related Application This application is a divisional of Australian Patent Application No 2011218672, the contents of which are incorporated herein by reference. 5 Background Computer virtualization is a technique that involves encapsulating a physical computing machine platform into a virtual machine that is executed under the control of virtualization software running on a hardware computing platform, or "host." A virtual machine has both virtual system hardware and guest operating system software. 10 Virtual system hardware typically includes at least one "virtual disk," a single file or a set of files that appear as a typical storage drive to the guest operating system. The virtual disk may be stored on the host platform or on a remote storage device. Typically, a virtual machine (VM) uses the virtual disk in the same manner that a physical storage drive is used, to store the guest operating system, application 15 programs, and application data. The virtualization software, also referred to as a hypervisor, manages the guest operating system's access to the virtual disk and maps the virtual disk to the underlying physical storage resources that reside on the host platform or in a remote storage device, such as a storage area network (SAN) or network attached storage (NAS). 20 Because multiple virtual machines can be instantiated on a single host, allocating physical storage space for virtual disks corresponding to every instantiated virtual machine in an organization's data center can stress the physical storage space capacity of the data center. For example, when provisioning a virtual disk for a virtual machine, the virtualization software may allocate all the physical disk space for the virtual disk at 25 the time the virtual disk is initially created, sometimes creating a number of empty data blocks containing only zeros ("zero blocks"). However, such an allocation may result in storage inefficiencies because the physical storage space allocated for the virtual disk may not be timely used (or ever used) by the virtual machine. In one solution, known as "thin provisioning," the virtualization software dynamically allocates physical 30 storage space to a virtual disk only when such physical storage space is actually needed by the virtual machine and not necessarily when the virtual disk is initially created. In a similar manner, thin provisioning may be implemented as a storage space optimization technology in the underlying storage hardware, e.g., storage array, which may include an array of rotating disks or solid state disks as the physical storage media. 35 In such cases, a storage system controller that manages the physical storage media and exposes them as logical data storage units, referred to as logical unit numbers (LUNs), 3 to the host, thinly provisions the LUNs. That is, the storage system controller dynamically allocates physical storage space to the LUNs only when such physical storage space is actually needed by the LUNs and not necessarily when the LUNs are initially created. As a result, when the LUNs are initially created, the logical size of 5 each of the LUNs is typically much greater than its physical size. However, even with the use of thinly-provisioned virtual disks and thinly provisioned LUNs, storage inefficiencies may be caused by an accumulation of "stale" data, i.e., disk blocks that were previously used and are currently unused but remain allocated. For example, deletion of a file, such as a temporary file created as a backup 10 during editing of a document, in the virtual disk by the guest operating system does not generally result in a release of the actual data blocks corresponding to the temporary file. While the guest operating system may itself track the freed data blocks relating to the deleted temporary file in its own guest file system (e.g., by clearing bits in a bitmap for the guest file system), the guest operating system is not aware that the disk on 15 which it has deleted the temporary data file is actually a "virtual disk" that is itself a file. Therefore, although a portion (i.e., the portion of the virtual disk that stores the guest file system's bitmap of freed data blocks) of the virtual disk may be modified upon a deletion of the temporary file by the guest operating system, the portion of the virtual disk corresponding to actual data blocks of the deleted temporary file does not 20 actually get released from the virtual disk back to the LUN by the virtualization software. This behavior can result in storage inefficiencies because such "stale" portions of the virtual disk are not utilized by the corresponding guest operating system and are also not available to the virtualization software for alternative uses (e.g., reallocated as part of a different virtual disk for a different virtual machine, etc.). 25 The process known as Storage vMotionTM involving live migration of virtual machine disk files (including one or more virtual disks and other VM configuration files) from a source LUN to a destination LUN provides another example of "stale" data being accumulated in a thinly-provisioned LUN. During Storage vMotionTM, actual data blocks corresponding to the virtual machine disk files are copied from the 30 source LUN to the destination LUN, and at the conclusion of the copying, the LUN supporting the VM is atomically switched from the source LUN to the destination LUN. After the atomic switch-over, the actual data blocks corresponding to the virtual machine disk files in the source LUN are no longer needed. While the virtualization software may itself track these data blocks and mark them as "free," for example, by 35 actually deleting the virtual machine disk file from the source LUN, the portion of the source LUN corresponding to these free data blocks of the virtual machine disk file 4 does not actually get released from the LUN back to the storage array. This may be acceptable if the virtualization software quickly reallocates the freed data blocks in the source LUN for alternative uses (e.g., by allocating a new virtual machine disk file for another virtual machine, etc.). However, in cases where the freed data blocks remain 5 unallocated, such "stale" portions of the LUN lessen the storage space efficiencies gained from thin provisioning (e.g., since such stale portions could have been reallocated by the storage array manager to a different thinly provisioned LUN that may be experiencing storage pressure). Any discussion of documents, acts, materials, devices, articles or the like which 10 has been included in the present specification is not to be taken as an admission that any or all of these matters form part of the prior art base or were common general knowledge in the field relevant to the present disclosure as it existed before the priority date of each claim of this application. Throughout this specification the word "comprise", or variations such as 15 "comprises" or "comprising", will be understood to imply the inclusion of a stated element, integer or step, or group of elements, integers or steps, but not the exclusion of any other element, integer or step, or group of elements, integers or steps. Summary 20 One or more embodiments of the present invention provide system software interfaces to storage devices that employ storage space optimization technologies, such as thin provisioning, to enable the benefits gained from such technologies to be sustained. Such an interface may be provided in a hypervisor of a virtualized computer system to enable the hypervisor to discover features of a LUN, such as whether or not 25 the LUN is thinly provisioned, and also in a VM of the virtualized computer system to enable the VM to discover features of a virtual disk, such as whether or not the virtual disk is thinly provisioned. The discovery of these features enables the hypervisor or the VM to instruct the underlying storage device to carry out certain operations such as an operation to deallocate blocks previously allocated to a logical block device, i.e., the 30 LUN or the virtual disk, so that the underlying storage device can continue to benefit from storage space optimization technologies implemented therein. According to an embodiment of the present invention a method for reclaiming storage space in a storage array is provided which includes (i) providing, by the storage array, a logical block device having a plurality of storage blocks, (ii) maintaining, by a 35 hypervisor of a computer system which is coupled to the storage array, a data structure 5 blocks or used storage blocks, (iii) identifying, by the hypervisor, a set of the storage blocks in the logical block device which are free storage blocks according to the data structure maintained by the hypervisor, (iv) creating, by the hypervisor, a temporary file in the logical block device, thereby allocating the free storage blocks in the set to 5 the temporary file, and marking the storage blocks allocated to the temporary file as being used storage blocks in the data structure, (v) deleting, by the hypervisor, the temporary file from the logical block device and marking the storage blocks that were allocated to the temporary file as being free storage blocks in the data structure, and (vi) issuing, by the hypervisor, an UNMAP command to the logical block device to 10 deallocate the set of storage blocks which were allocated to the temporary file. According to another embodiment of the present invention, a computer system coupled to a storage array which provides a logical block device having a plurality of storage blocks is provided, the computer system including hardware resources including a processor and memory. The processor is configured to: (i) maintain a data 15 structure which tracks the storage blocks in the logical block device as being either free storage blocks or used storage blocks, (ii) identify a set of the storage blocks in the logical block device which are free storage blocks according to the data structure maintained by the hypervisor, (iii) create a temporary file in the logical block device, thereby allocating the free storage blocks in the set to the temporary file, and marking 20 the storage blocks allocated to the temporary file as being used storage blocks in the data structure, (iv) delete the temporary file from the logical block device and marking the storage blocks that were allocated to the temporary file as being free storage blocks in the data structure and (v) issue an UNMAP command to the logical block device to deallocate the set of storage blocks which were allocated to the temporary file. 25 A computer system, according to an embodiment of the present invention, includes hardware resources including a processor, memory and a logical block device, and a hypervisor that supports execution of one or more virtual machines and emulates the hardware resources for the virtual machines including an emulated logical block device. The hypervisor includes a component for issuing commands to the logical 30 block device to deallocate storage blocks from the logical block device, and the virtual machines each include a component for issuing commands to the emulated logical block device to deallocate storage blocks from the emulated logical block device. A method of issuing a command to deallocate free storage blocks previously allocated to a logical block device, according to an embodiment of the present 5a invention, includes the steps of determining that the logical block device supports the command, identifying one or more sets of contiguous storage blocks to be deallocated, and issuing the command to the logical block device based on alignment and granularity values according to which the logical block device performs space 5 6 Figure 9 is a flow diagram that illustrates a method of notifying a management server of a virtualized computer system that a LUN has reached a certain threshold in used capacity. Figure 10 is a flow diagram that illustrates a method of performing corrective 5 measures by a management server upon receiving the notification in Figure 9. Figure 11 is a flow diagram that illustrates a method of detecting and handling an error caused when a LUN runs out of space while performing a write operation. Figure 12 is a flow diagram that illustrates a method of retroactively reclaiming storage space from a LUN. 10 Detailed Description Figure 1 is a block diagram that shows a virtualized computer architecture 100 according to one or more embodiments. Virtualized computer architecture 100 includes a plurality of servers 110 connected through network 120 to a shared storage 15 system that includes one or more storage arrays 130. There may be any number of servers 110, each of which may comprise a general purpose computer system having one or more virtual machines accessing data stored on any number of storage arrays 130. Network 120 may be a wide area network, a local area network, or a network hosting a protocol especially suited for storage arrays 130, such as Fibre Channel, 20 iSCSI, etc., and may comprise one or more of switches. Storage arrays 130 may be of any type such as a network-attached storage (NAS) filer or a block-based device over a storage area network (SAN). While storage arrays 130 are typically made up of a plurality of disks, it should be recognized that as prices for solid-state non-volatile storage devices fall, they are increasingly taking the place of rotating disk storage 25 media. The use of the term, "disk" herein, should therefore not be construed as limited only to rotating disk storage media, but also what is become known as solid state disks, or "SSDs." Virtualized computer architecture 100 is managed by a management server 148, which is a computer program that resides and executes in a central server or 30 alternatively, in one of servers 110. Management server 148 is in communication with each of servers 110, and carries out administrative tasks for virtualized computer architecture 100 such as load balancing between servers 110 and workload balancing between storage arrays 130. Figures 2A and 2B respectively depict block diagrams of a server 200 that is 35 representative of any of servers 110 and a storage array 250 that is representative of any of storage arrays 130, according to one or more embodiments. Server 200 may be 7 constructed on a conventional, typically server-class, hardware platform 202. As shown in Figure 2A, server 200 includes HBAs 204 and NIC 201 that enable server 200 to connect to storage array 250. As further shown in Figure 2A, hypervisor 208 is installed on top of hardware platform 202 and it supports a virtual machine execution 5 space 210 within which multiple virtual machines (VMs) 2 12 1- 2 1 2 N may be concurrently instantiated and executed. Each such virtual machine 2 12 1-21 2 N implements a virtual hardware platform 214 that supports the installation of a guest operating system (OS) 216 which is capable of executing applications 218. Examples of a guest OS 216 include any of the well-known commodity operating systems, such 10 as Microsoft Windows, Linux, and the like. In each instance, guest OS 216 includes a native file system layer (not shown in Figure 2A), for example, either an NTFS or an ext3FS type file system layer. These file system layers interface with virtual hardware platforms 214 to access, from the perspective of guest operating systems 216, a data storage HBA, which in reality, is virtual HBA 220 implemented by virtual hardware 15 platform 214 that provides the appearance of disk storage support (in reality, virtual disks or virtual disks 2 2 2
A-
22 2 x) to enable execution of guest OS 216 transparent to the virtualization of the system hardware. In certain embodiments, virtual disks 2 2 2
A-
2 2 2 x may be thinly provisioned and appear to support, from the perspective of guest OS 216, the SCSI standard for connecting to the virtual machine or any other appropriate 20 hardware connection interface standard known to those with ordinary skill in the art, including IDE, ATA, and ATAPI. Although, from the perspective of guest operating systems 216, file system calls initiated by such guest operating systems 216 to implement file system-related data transfer and control operations appear to be routed to virtual disks 2 2 2
A-
2 2 2 x for final 25 execution, in reality, such calls are processed and passed through virtual HBA 220 to adjunct virtual machine monitor (VMM) layers 2 2 4 1- 22 4 N that implement the virtual system support needed to coordinate operation with hypervisor 208. In particular, HBA emulator 226 functionally enables the data transfer and control operations to be correctly handled by hypervisor 208 which ultimately passes such operations through 30 its various layers to true HBAs 204 or NIC 201 that connect to storage array 250. Assuming a SCSI supported virtual device implementation (although those with ordinary skill in the art will recognize the option of using other hardware interface standards), SCSI virtualization layer 228 of hypervisor 208 receives a data transfer and control operation (in the form of SCSI commands, for example, intended for a SCSI 35 compliant virtual disk) from VMM layers 2 2 4 1- 2 2 4 N, and converts them into file system operations that are understood by virtual machine file system (VMFS) 230 in 8 order to access a file stored in one of the LUNs in storage array 250 under the management of VMFS 230 that represents the SCSI-compliant virtual disk. In one embodiment, the file representing the virtual disk conforms to the VMware Virtual Disk (VMDK) file format promulgated by VMware, Inc. for virtual disks, although it 5 should be recognized that alternative virtual disk file formats may be used in other embodiments. SCSI virtualization layer 228 then issues these file system operations to VMFS 230. VMFS 230, in general, manages creation, use, and deletion of files (e.g., such as .vmdk files representing virtual disks) stored on LUNs exposed by storage array 250. 10 One example of a clustered file system that can serve as VMFS 230 in an embodiment is described in U.S. Patent 7,849,098, entitled "Multiple Concurrent Access to a File System," filed February 4, 2004 and issued on December 7, 2010, the entire contents of which are incorporated by reference herein. VMFS 230, converts the file system operations received from SCSI virtualization layer 228 to volume (e.g. LUN) block 15 operations, and provides the volume block operations to logical volume manager 232. Logical volume manager (LVM) 232 is typically implemented as an intermediate layer between the driver and file system layers, and supports volume oriented virtualization and management of the LUNs accessible through HBAs 204 and NIC 201. LVM 232 issues raw SCSI operations to device access layer 234 based on the LUN block 20 operations. Data access layer 240 includes device access layer 234, which discovers storage array 250, and applies command queuing and scheduling policies to the raw SCSI operations, and device driver 236, which understands the input/output interface of HBAs 204 and NIC 201 interfacing with storage array 250, and sends the raw SCSI operations from device access layer 234 to HBAs 204 or NIC 201 to be forwarded to 25 storage array 250. It should be recognized that the various terms, layers and categorizations used to describe the virtualization components in Figure 2A may be referred to differently without departing from their functionality or the spirit or scope of the invention. For example, VMMs 224 may be considered separate virtualization components between 30 VMs 212 and hypervisor 208 (which, in such a conception, may itself be considered a virtualization "kernel" component) since there exists a separate VMM for each instantiated VM. Alternatively, each VMM may be considered to be a component of its corresponding virtual machine since such VMM includes the hardware emulation components for the virtual machine. In such an alternative conception, for example, 35 the conceptual layer described as virtual hardware platform 214 may be merged with 9 and into VMM 224 such that virtual host bus adapter 220 is removed from Figure 2A (i.e., since its functionality is effectuated by host bus adapter emulator 226). Storage array manager 251 of storage array 250, as depicted in Figure 2B, receives the raw SCSI operations corresponding to one of its LUNs and resolves them 5 into the appropriate extents within the spindles of storage array 250 that are operated upon. Storage array manager 251, which represents one or more programmed storage processors, generally serves as a communication agent (to the outside world) for storage array 250, and implements a virtualization of physical, typically disk drive based storage units, referred to in Figure 2B as spindles 2 52
A-
2 5 2 N, that reside in 10 storage array 250. From a logical perspective, each of these spindles can be thought of as a sequential array of fixed sized extents 254. Storage array manager 251 abstracts away complexities of targeting read and write operations to addresses of the actual spindles and extents of the disk drives by exposing to server 200 an ability to view the aggregate physical storage space provided by the disk drives as a contiguous logical 15 storage space that may be divided into a set of virtual SCSI block devices previously referred to herein as LUNs 2 5 6
A-
2 5 6 m ("Logical Unit Numbers"). The virtualization of spindles 2 52
A-
2 52 N into such a contiguous logical storage space of LUNs 2 56
A-
2 5 6 m can provide a more efficient utilization of the aggregate physical storage space that is represented by an address space of a logical volume. Storage array manager 251 20 maintains metadata 255 that includes a mapping (hereinafter, also referred to as an extent-mapping) for each of LUNs 2 5 6 A-256m to an ordered list of extents, wherein each such extent can be identified as a spindle-extent pair <spindle #, extent #> and may therefore be located in any of the various spindles 2 5 2
A-
2 5 2 N. In certain embodiments, storage array 250 may employ a storage space 25 optimization technology called "thin provisioning" when allocating LUNs. When a LUN is "thinly" provisioned, the logical size of the LUN as reported by storage array 250 may be larger than the amount of physical space initially backing that LUN. All consumers of the LUN only see the logical size of the LUN. As write operations are issued to previously unallocated blocks of a thin-provisioned LUN, the amount of 30 actual physical space consumed grows, and at some point, the LUN may run out of physical space. In a similar fashion, in a virtualization environment such as that depicted in Figure 2A, a virtual disk 222 stored on a LUN of storage array 250 may be configured to be "thinly provisioned," for example, by hypervisor 208 (or by management server 148 in certain embodiments). From the perspective of guest OS 35 216, such a thinly-provisioned virtual disk 222 would be perceived as having a fixed logical size, but, in reality, VMFS 230 allocates LUN storage space to virtual disk 222 10 (e.g., a .vmdk file) dynamically, such that at any given time, the actual storage space in the LUN that backs virtual disk 222 may be less than the logical size. Figure 3 is a flow diagram illustrating a method carried out by hypervisor 208 to collect configuration characteristics of a LUN, which operates as a logical block device 5 for hypervisor 208. These configuration characteristics of the LUN may be used in techniques described below to "reclaim" storage space from the LUN (back to a storage system supporting the LUN, such as storage array 250) by issuing an "UNMAP" command to the LUN. As depicted in Figure 3, at step 302, hypervisor 208 issues a SCSI Read Capacity command (e.g., 16 bit version of the command) to the LUN. The 10 response of the LUN, received at step 304, includes an indication of whether or not the LUN supports thin provisioning as indicated by the setting of a bit (which, in one embodiment, is known as the "thin provisioning enabled (TPE) bit"). If, at step 306, hypervisor 208 determines that the LUN supports thin provisioning (e.g., the TPE bit is set), the method continues on to step 308. If, at step 306, hypervisor 208 determines 15 that the LUN does not support thin provisioning (e.g., the TPE bit is not set), the method ends. At step 308, hypervisor 208 records the LUN's support for thin provisioning and issues a SCSI Inquiry command (e.g., utilizing the OxBO "Vital Product Data" code as the type of inquiry in one embodiment) to the LUN. The response of the LUN, 20 received at step 310 and recorded at step 312, includes an indication as to whether or not LUN supports an "UNMAP" command (in some embodiments, indicated by a UNMAP "bit") and, if there is support, the response also includes a report of several parameters to be used with UNMAP commands. In its simplest form, in one embodiment, an UNMAP command specifies a list of blocks that are to be unmapped 25 by the LUN and released to the underlying storage system supporting the LUN. In one such embodiment, the parameters reported include DG, a granularity at which the LUN manages data, Dosffet, an alignment parameter expressed at an offset at which the LUN prefers to receive UNMAP commands, and NMXD, a maximum number of <offset, length> pairs that can be specified with a single UNMAP command. For example, if 30 Doffset has a value of 4 KB, then, the LUN will accept SCSI operations, such as UNMAP commands, that start at a multiple of 4 KB address (e.g., addresses at 0 KB, 4 KB, 8 KB, 12 KB, etc.). If DG then has a value of 512 KB, then the LUN will accept SCSI operations that specify a block size that is a multiple of 512 KB. In such an example, the LUN would accept an UNMAP command to unmap a contiguous block of 35 1024 KB that begins at address corresponding to an offset of 12 KB from the beginning of the LUN, but would not accept an UNMAP command to unmap any contiguous 11 block beginning at an address corresponding to an offset of 1 KB, 2 KB, 3 KB, etc. from the beginning of the LUN or where the contiguous block size is less than 512 KB. It should be recognized that the values DG, Doffset and NMAXD are set or defined by the storage vendor of the underlying storage system supporting the LUN. 5 Figure 4 is a flow diagram illustrating a method carried out by guest OS 216 to collect configuration characteristics of a virtual disk 222, which operates as a logical block device of guest OS 216 of virtual machine 212. As should be recognized, Figure 4 repeats the same steps as Figure 3, except that rather than a hypervisor querying a LUN in a storage array for its configuration characteristics as in Figure 3, in Figure 4, a 10 process in virtual machine 212 (e.g., a user level process developed to track free blocks in guest OS 216 or a configuration routine in a SCSI device driver loaded into guest OS 216, etc.) is querying virtual disk 222 (e.g., an emulated SCSI device whose data is actually stored as a file in the LUN) for its configuration characteristics. Because the virtual disk is being emulated by hypervisor 208, hypervisor 208 provides the virtual 15 disk's configuration characteristics (on behalf of the virtual disk) in response to the querying process in the virtual machine 212. These configuration characteristics of the virtual disk may be used in techniques described below to "reclaim" storage space from the virtual disk back to the LUN in which the virtual disk is stored as a file by issuing an "UNMAP" command to the virtual disk. As depicted in Figure 4, at step 402, guest 20 OS 216 issues a SCSI Read Capacity command (e.g., 16 bit version of the command) to the virtual disk. The response of the virtual disk, received at step 404, includes an indication of whether or not the virtual disk supports thin provisioning as indicated by the setting of a bit (which, in one embodiment, is known as the "thin provisioning enabled (TPE) bit). If, at step 406, guest OS 216 determines that the virtual disk 25 supports thin provisioning (e.g., the TPE bit is set), the method continues on to step 408. If, at step 406 guest OS 216 determines that the virtual disk does not support thin provisioning (e.g., the TPE bit is not set), the method ends. At step 408, guest OS 216 records the virtual disk's support for thin provisioning and issues a SCSI Inquiry command (e.g., utilizing the OxB0 "Vital 30 Product Data" code as the type of inquiry in one embodiment) to the virtual disk. The response of the virtual disk, received at step 410 and recorded at step 412, includes an indication as to whether or not virtual disk supports an "UNMAP" command (in some embodiments, indicated by a UNMAP "bit") and, if there is support, the response also includes a report of several parameters to be used with UNMAP commands. In its 35 simplest form, in one embodiment, an UNMAP command specifies a list of blocks that are to be unmapped by the virtual disk and released to the LUN in which the virtual 12 disk is stored. In one such embodiment, the parameters reported include VG, a granularity at which hypervisor 208 manages data, Voffset, an alignment parameter expressed as an offset at which hypervisor 208 prefers to receive UNMAP commands, and NMAX_v, a maximum number of <offset, length> pairs that can be specified with a 5 single UNMAP command. VG, and Voffset, for the virtual disk are analogous to DG, and Doffset for the LUN and are thus used similarly to DG, and Doffset as previously discussed. Figure 5 is a flow diagram that illustrates a method of storage space reclamation that is initiated by a VM, e.g., when a VM deletes a file stored in its virtual disk. It 10 should be recognized that a file is represented in the virtual disk (e.g., which itself is a file stored in a LUN) as a series of file blocks which may or may not be contiguous, and that the method of Figure 5 is performed for each set of contiguous file blocks, referred to herein as a "file segment." In one embodiment, the steps of Figure 5 are performed by a user-level process developed to monitor and identify free file system 15 blocks relating to deleted files in guest OS 216. For example, such a monitoring process may perform the method of Figure 5 at periodic intervals upon recognizing free blocks relating to recently deleted files or may be notified by guest OS 216 upon a deletion of a file from the virtual disk. At step 508, the UNMAP bit received in step 410 of Figure 4 as published by the virtual disk is examined. If this bit is not set, the 20 method ends after such determination. If, at step 508, the UNMAP bit published by the virtual disk is set, the method continues onto step 510 where the length of a file segment of the deleted file (or alternatively, the length of a number contiguous free file system blocks as indicated by guest OS 216) starting at an offset that complies with (e.g., is a multiple of) the offset published by the virtual disk, Voffset (the length of such 25 a file segment hereafter being referred to as "Li"), is determined. Therefore, a file segment that is not naturally aligned with Voffset is made to align with Voffset by carrying out this step. After LI is determined at step 510, L1 is compared with the granularity published by the virtual disk, VG, at step 514. If Li < VG, then, at step 516, it is determined that the file segment does not include enough contiguous file blocks to 30 support an UNMAP command to the virtual disk and as such, the file blocks of the file segment are remembered (e.g., identifying the file blocks in a special data structure) for possible coalescing with other free blocks that are contiguous with such file blocks that may be subsequently identified by the monitoring process. Step 516 is carried out because the file blocks that are remembered may be contiguous with file blocks from 35 other file segments whose Li is also less than VG. If so, the file blocks are coalesced for possible inclusion in a single UNMAP command that adheres to the granularity 13 published by the virtual disk. However, the file blocks that are remembered are also monitored for writes (e.g., by the monitoring process), and are no longer remembered (e.g., removed from the special data structure) if a write is issued thereto (since such file blocks would no longer be free for an UNMAP command). As indicated by the 5 dashed arrow to step 510, the length, LI, of coalesced file blocks are determined at step 510. At step 514, LI is checked once more to see if they meet the condition, LI < VG. If Li is greater than or equal to VG, the <offset, length> descriptor for use with the UNMAP command is generated at step 518. Then, at step 520, it is determined whether there are more file segments to process. If there are, the flow returns to step 10 510. If there are no more, the UNMAP command with a string of one or more <offset, length> descriptors is generated and sent to the virtual disk at step 522. If the number of descriptors generated at step 518 is greater than the maximum number published by the virtual disk, NMAX v, the UNMAP command is split into multiple UNMAP commands and sent separately to the virtual disk. The method ends after step 522. 15 For example, if VG = 1 MB and Voffset = 4 KB, and a file segment analyzed at step 510 began at an address corresponding to 5 KB from the beginning of the virtual disk and had a length, Li, of 1.5 MB, then the corresponding descriptor for this file segment generated for the UNMAP command would be <8 KB, 1 MB> so that the descriptor complies with the granularity and alignment parameters published by the 20 virtual disk. That is, the virtual disk is unable to unmap the beginning 3 KB portion of the file segment from 5 KB to 8 KB because that portion of the file segment does not begin at an address that is a multiple of Voffrst (i.e., 4 KB). Similarly, the virtual disk is unable to map the tail portion of the file segment (i.e., approximately the last 0.5 MB) because the tail portion falls within a second 1 MB portion of the file segment and the 25 virtual disk can only unmap in multiples of 1 MB. Figure 6 is a flow diagram that illustrates a method of storage space reclamation that is initiated by hypervisor 208 in response to an UNMAP command from a VM (e.g., as received from step 522 of Figure 5). At step 602, hypervisor 208, in particular SCSI virtualization layer 228, receives the UNMAP command from the VM on behalf 30 of the virtual disk and translates the UNMAP command into a VMFS file offset and length, which conceptually correspond to a series of VMFS blocks, which may or may not be contiguous. The VMFS blocks are hereafter referred to as free VMFS blocks and each contiguous segment of free VMFS blocks is referred to as a VMFS block segment. Then, a determination is made at step 604 whether the free VMFS blocks 35 should be kept allocated. For example, when a virtual disk is not thinly provisioned and instead is pre-allocated, it would be determined at step 604 to keep the free VMFS 14 blocks allocated. Thus, if the free VMFS blocks should be kept allocated, the metadata (i.e., inode) of the VMFS file that represents the virtual disk is updated so that the free VMFS blocks are indicated as "to be zeroed" as described in U.S. Patent Application Serial No. 12/050,805, entitled "Efficient Zeroing of File Data Blocks" (Attorney 5 Docket No. A123), filed March 18, 2008, the entire contents of which are incorporated by reference herein. The method ends after step 605. If, on the other hand, it is determined at step 604 that the free VMFS blocks should be deallocated, the free VMFS blocks are deallocated at step 606 from the VMFS file that represents the virtual disk. This deallocation reduces the physical size of the blocks allocated to the virtual 10 disk (as recorded in the inode of the VMFS file corresponding to the virtual disk) even though the logical size remains the same. As part of this deallocation, the bitmap data structure managed by VMFS 230 is updated to indicate the deallocated VMFS blocks are now free. It should be noted that because this deallocation essentially releases free blocks from the virtual disk (e.g., a thinly provisioned virtual disk) back to the LUN, it 15 represents a satisfaction of the UNMAP command from the VM on the virtual disk, as performed by hypervisor 208. However, in certain embodiments, it may be further desired to determine, at this juncture, whether the LUN itself, which has just received free blocks back from the virtual disk and which is a thinly provisioned LUN, may be able to release such free blocks back to its underlying storage array (e.g., so that such 20 free blocks can be utilized by another LUN). In some embodiments, hypervisor 208 may desire to reuse the free VMFS blocks (e.g., allocate such free blocks to another virtual disk). This check is made at step 608. If it is determined that hypervisor 208 desires to reuse the free VMFS blocks, the method ends. If, on the other hand, it is determined at step 608 that hypervisor 208 25 does not desire to reuse the free VMFS blocks at the current time, the UNMAP bit published by the LUN that stores the free VMFS blocks is examined at step 610 to determine whether the LUN may be able to release the free VMFS blocks back to its underlying storage array (e.g., so that such free blocks can be utilized by another LUN). If this bit is not set, the method ends after such determination. If, at step 610, the 30 UNMAP bit published by the LUN is set, the method continues onto step 612 where the length of one VMFS block segment starting at an offset that complies with the offset published by the LUN, Doffset (the length hereafter being referred to as "L2"), is determined. Therefore, a VMFS block segment that is not naturally aligned with Doffset is made to align with Doffst by carrying out this step. After L2 is determined at step 35 612, L2 is compared with the granularity published by the LUN, DG. If L2 < DG, then the VMFS blocks in the VMFS block segment are remembered (e.g., identifying the 15 VMFS blocks in a special data structure) for possible coalescing and writes thereto monitored at step 616. Step 616 is carried out because the VMFS blocks that are remembered may be contiguous with VMFS blocks from other VMFS block segments whose L2 is less than DG. If so, the VMFS blocks are coalesced for possible inclusion 5 in a single UNMAP command that adheres to the granularity published by the LUN. However, the VMFS blocks that are remembered are monitored for writes, and are no longer remembered (e.g., removed from the special data structure) if a write is issued thereto. As indicated by the dashed arrow to decision block 612, coalesced VMFS blocks are checked to see if they meet the condition, L2 < DG. 10 If L2 is greater than or equal to DG, the <offset, length> descriptor for use with the UNMAP command is generated at step 618. Then, at step 620, it is determined whether there are more VMFS block segments to process. If there are, the flow returns to step 612. If there are no more, the UNMAP command with a string of one or more <offset, length> descriptors is generated and sent to the LUN at step 622. If the 15 number of descriptors generated at step 618 is greater than the maximum number published by the virtual disk, NMAX D, the UNMAP command is split into multiple UNMAP commands and sent separately to the LUN. The method ends after step 622. For example, if one VMFS block segment is described by <8 KB, 1 MB>, and if DG = 32 KB and Doffset = 16 KB, the UNMAP command is issued with the descriptor 20 <16 KB, (1 MB - 32 KB)> so that the descriptor complies with the granularity and alignment parameters published by the LUN. That is, the LUN is unable to unmap the beginning 8 KB portion of the VMFS block segment from 8 KB to 16 KB because that portion of the file segment does not begin at an address that is a multiple of Doffset (i.e., 16 KB). Similarly, the LUN is unable to map the tail portion of the VMFS block 25 segment (i.e., approximately the last 24 KB) because the tail portion is too small to comply with the granularity of 32 KB. Figure 7 is a flow diagram that illustrates a method of storage space reclamation that is initiated by hypervisor 208 in response to an UNLINK command from management server 148. The UNLINK command is issued to inform hypervisor 208 to 30 delete a file or set of files that are maintained by VMFS 230 and to issue an UNMAP command to deallocate the VMFS blocks corresponding to these files. For example, after Storage vMotionTM is carried out, as a result of which a set of files (e.g., comprising or including a virtual disk, for example) associated with a VM has been migrated from a source LUN to a destination LUN, the UNLINK command may be 35 issued by management server 148 to delete the files and deallocate the VMFS blocks corresponding to these files, from the source LUN. This method begins at step 702, 16 where hypervisor 208 identifies the VMFS block segments corresponding to the deleted file or deleted set of files by examining the inodes of the file or files. The remaining steps illustrated in Figure 7 are identical to the same numbered steps of Figure 6 and reference is made to the description given above for these steps. 5 Figure 8 is a flow diagram that illustrates a method of performing compatibility checks prior to initiating a process to live migrate a VM from a source host to a destination host. These compatibility checks are carried out by management server 148 because a VM that is supported by a thinly provisioned virtual disk should preferably not be migrated to a hypervisor on the destination host that is not capable of providing 10 thinly provisioned virtual disks with UNMAP support. These checks may be performed in various ways including checking the version number of the hypervisor. For example, if the version number of the hypervisor on the destination host is greater than or equal to the lowest version number of the hypervisor that supports thin provisioning, live migration from the source host to the destination host is permitted. 15 Live migration is disallowed otherwise. Referring to Figure 8, at step 802, the VM to be live migrated is identified. It is assumed for purposes of illustration that this VM is supported by a thinly provisioned virtual disk. At step 808, a check is made to see if the hypervisor on the destination host also supports thinly provisioned virtual disks. In one embodiment, this check is 20 made based on version numbers as described above. If the check fails, the method loops through steps 810 and 812 until a destination host with a compliant hypervisor is found. If there are no compliant hypervisors, the method terminates. If a compliant hypervisor is found, live migration of the VM is initiated by management server 148 at step 820. 25 Figure 9 is a flow diagram that illustrates a method of notifying management server 148 that a LUN has reached a certain threshold in used capacity. This notification is given so that management server 148 can employ remedial measures such as provisioning more space to the LUN, deleting unused files stored in the LUN using the UNLINK command, or migrating workloads (e.g., virtual disks of VMs) from 30 the LUN to another LUN, followed by invoking the UNLINK command on the migrated workloads. Steps 902 and 904 are carried out by the storage array. Step 906 is carried out by the hypervisor. Step 902 shows that the storage array is continually monitoring whether a LUN's storage capacity has reached or passed a certain threshold level. If it determines 35 that this condition is met, it issues a soft error message to the hypervisor at step 904 with the LUN ID. For example, any write operation to the LUN that results in the LUN 17 exceeding its threshold level causes the storage array to issue the soft error message to the hypervisor. At step 906, the hypervisor, upon receiving this soft error message, issues a soft error message to management server 148. The soft error message includes the LUN ID and the VMFS ID so that management server 148 can employ remedial 5 measures noted above. Figure 10 is a flow diagram that illustrates a method of performing corrective measures by management server 148 upon receiving the soft error message generated in step 906 of Figure 9. At step 1002, management server 148 receives the soft error message. Then, at step 1004, management server 148 examines configuration settings 10 of VMs that are supported by the LUN that is nearing capacity. According to embodiments of the present invention, one of the configuration settings that can be specified upon deployment of a VM is what remedial measures should be taken when the LUN supporting the VM is nearing capacity. Three of the choices are Storage vMotionTM, snapshot, and power off. After the decision block at 1006, step 1008 is 15 executed if Storage vMotionTM is specified in such a setting; step 1010 is executed if snapshot is specified in such a setting; and step 1012 is executed if power off is specified in such a setting. At step 1008, management server 148 initiates Storage vMotionTM between the source LUN (i.e., the LUN nearing capacity) and the destination LUN. After completion of Storage vMotionTM, the UNLINK command is 20 used to delete the migrated files from the source LUN. At step 1010, a snapshot of the VM files is created on a destination LUN and the VM files on the source LUN is marked read-only. At step 1012, management server 148 powers off the VM. If no remedial measures are employed or they are deployed too slowly, or in spite of the remedial measures being deployed, the LUN may run out of space when 25 executing a write operation. Under this condition, a hard error message is issued by the storage array. This error message includes an ID of the write operation that caused the error condition so that the VM that issued the write operation can be taken down until more space is provisioned to the LUN or additional space in the LUN is reclaimed. By taking down only the VM that caused the error, VM isolation is preserved and the other 30 VMs that are employing the same LUN for storage can remain operational. Figure 11 is a flow diagram that illustrates a method of detecting and handling an error caused when a LUN runs out of space while performing a write operation. Steps 1102, 1104, and 1106 are carried out by the storage array. Step 1108 is carried out by the hypervisor. At step 1102, the storage array receives and executes a write 35 operation on the LUN. If during execution of the write operation, the LUN runs out of space as determined at decision block 1104, a hard error message is issued to the 18 hypervisor at step 1106. The error message includes an ID of the write operation that caused the error. At step 1108, the hypervisor deactivates the VM that issued the write operation. As under normal circumstances, the deactivation of the VM will result in an alert message being transmitted to management server 148, and management server 5 148 can implement remedial measures in response thereto before reactivating the VM that has been deactivated. The remedial measures include provisioning more space to the LUN, and reclaiming additional space in the LUN by way of migrating the virtual disk of the VM that has been deactivated (or even virtual disks of other VMs) to another LUN, followed by invoking the UNLINK command on the migrated virtual 10 disks, powering off certain VMs, or deleting other files. Figure 12 is a flow diagram that illustrates a method of retroactively reclaiming storage space from a LUN that operates as a logical block device for a hypervisor that has been upgraded from a version that does not have the system software interface according to one or more embodiments of the present invention to a version that does. 15 This method is carried out after the hypervisor upgrade has been carried out. At step 1202, the hypervisor determines the total size of its free VMFS blocks in the LUN. At step 1204, the hypervisor creates a temporary file that is X% of the total size of its free VMFS blocks in the LUN. At step 1206, the temporary file is deleted and the hypervisor issues an UNMAP command for all blocks of the temporary file. As a 20 result, the bitmap that the hypervisor maintains to track usage of all VMFS blocks is updated so that the VMFS blocks corresponding to the temporary file are indicated as free in the bitmap. The X% parameter is configurable and if equal to 100%, all of the hypervisor's free VMFS blocks will be deallocated from the LUN, reducing the physical size of the LUN to its theoretical minimum. However, during the time the 25 method of Figure 12 is carried out, there may be writes to the LUN that require additional space. Therefore, a certain amount of space, which can be determined empirically, is kept free to handle such writes. In one or more embodiments of the present invention, the commands issued by the hypervisor to the LUN and by the guest operating system to the virtual disk, 30 including SCSI Read Capacity and SCSI Inquiry, and errors issued by the storage array to the hypervisor, such as the soft error described in conjunction with Figure 9 and the hard error described in conjunction with Figure 11, are part of the set of commands and error codes in the T10 SCSI protocol. Although one or more embodiments have been described herein in some detail 35 for clarity of understanding, it should be recognized that certain changes and modifications may be made without departing from the spirit of the invention.
19 The various embodiments described herein may employ various computer implemented operations involving data stored in computer systems. For example, these operations may require physical manipulation of physical quantities--usually, though not necessarily, these quantities may take the form of electrical or magnetic signals, 5 where they or representations of them are capable of being stored, transferred, combined, compared, or otherwise manipulated. Further, such manipulations are often referred to in terms, such as producing, identifying, determining, or comparing. Any operations described herein that form part of one or more embodiments of the invention may be useful machine operations. In addition, one or more embodiments of the 10 invention also relate to a device or an apparatus for performing these operations. The apparatus may be specially constructed for specific required purposes, or it may be a general purpose computer selectively activated or configured by a computer program stored in the computer. In particular, various general purpose machines may be used with computer programs written in accordance with the teachings herein, or it may be 15 more convenient to construct a more specialized apparatus to perform the required operations. The various embodiments described herein may be practiced with other computer system configurations including hand-held devices, microprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, 20 mainframe computers, and the like. One or more embodiments of the present invention may be implemented as one or more computer programs or as one or more computer program modules embodied in one or more computer readable media. The term computer readable medium refers to any data storage device that can store data which can thereafter be input to a computer 25 system--computer readable media may be based on any existing or subsequently developed technology for embodying computer programs in a manner that enables them to be read by a computer. Examples of a computer readable medium include a hard drive, network attached storage (NAS), read-only memory, random-access memory (e.g., a flash memory device), a CD (Compact Discs) --CD-ROM, a CD-R, or 30 a CD-RW, a DVD (Digital Versatile Disc), a magnetic tape, and other optical and non optical data storage devices. The computer readable medium can also be distributed over a network coupled computer system so that the computer readable code is stored and executed in a distributed fashion. Although one or more embodiments of the present invention have been 35 described in some detail for clarity of understanding, it will be apparent that certain changes and modifications may be made within the scope of the claims. Accordingly, 20 the described embodiments are to be considered as illustrative and not restrictive, and the scope of the claims is not to be limited to details given herein, but may be modified within the scope and equivalents of the claims. In the claims, elements and/or steps do not imply any particular order of operation, unless explicitly stated in the claims. 5 Virtualization systems in accordance with the various embodiments, may be implemented as hosted embodiments, non-hosted embodiments or as embodiments that tend to blur distinctions between the two, are all envisioned. Furthermore, various virtualization operations may be wholly or partially implemented in hardware. For example, a hardware implementation may employ a look-up table for modification of 10 storage access requests to secure non-disk data. Many variations, modifications, additions, and improvements are possible, regardless the degree of virtualization. The virtualization software can therefore include components of a host, console, or guest operating system that performs virtualization functions. Plural instances may be provided for components, operations 15 or structures described herein as a single instance. Finally, boundaries between various components, operations and data stores are somewhat arbitrary, and particular operations are illustrated in the context of specific illustrative configurations. Other allocations of functionality are envisioned and may fall within the scope of the invention(s). In general, structures and functionality presented as separate components 20 in exemplary configurations may be implemented as a combined structure or component. Similarly, structures and functionality presented as a single component may be implemented as separate components. These and other variations, modifications, additions, and improvements may fall within the scope of the appended claims. 25

Claims (17)

1. A method for reclaiming storage space in a storage array, comprising: providing, by the storage array, a logical block device having a plurality of 5 storage blocks; maintaining, by a hypervisor of a computer system which is coupled to the storage array, a data structure which tracks the storage blocks in the logical block device as being either free storage blocks or used storage blocks; identifying, by the hypervisor, a set of the storage blocks in the logical block 10 device which are free storage blocks according to the data structure maintained by the hypervisor; creating, by the hypervisor, a temporary file in the logical block device, thereby allocating the free storage blocks in the set to the temporary file, and marking the storage blocks allocated to the temporary file as being used storage blocks in the data 15 structure; deleting, by the hypervisor, the temporary file from the logical block device and marking the storage blocks that were allocated to the temporary file as being free storage blocks in the data structure; and issuing, by the hypervisor, an UNMAP command to the logical block device to 20 deallocate the set of storage blocks which were allocated to the temporary file.
2. The method of claim 1, wherein the number of free storage blocks in the set represents a portion of all free storage blocks as identified in the data structure. 25
3. The method of claim 2, wherein the portion represents a percentage of all of the free storage blocks, the percentage being empirically determined. 22
4. The method of any of claims 1 to 3, further comprising: upgrading a computer system coupled to the logical block device, wherein the steps of identifying, creating, deleting and issuing are carried out after the step of upgrading. 5
5. The method of claim 4, wherein the computer system includes the hypervisor that supports execution of one or more virtual machines, and the computer system is upgraded from a version of the hypervisor that does not support thin provisioning to a version of the hypervisor that does support thin provisioning. 10
6. The method of any of claims 1 to 5, wherein the steps of identifying, creating, deleting and issuing are invoked periodically by a space monitoring process running in the computer system. 15
7. The method of any of claims 1 to 5, wherein the steps of identifying, creating, deleting and issuing are carried out in response to a command from a server that manages the virtual machines.
8. The method of any of claims 1 to 5, wherein the steps of identifying, 20 creating, deleting and issuing are carried out in response to a manual user input.
9. A computer system coupled to a storage array which provides a logical block device having a plurality of storage blocks, the computer system comprising: hardware resources including a processor and memory; 25 wherein the processor is configured to: maintain a data structure which tracks the storage blocks in the logical block device as being either free storage blocks or used storage blocks; 23 identify a set of the storage blocks in the logical block device which are free storage blocks according to the data structure maintained by the hypervisor; create a temporary file in the logical block device, thereby allocating the free storage blocks in the set to the temporary file, and marking the storage blocks allocated 5 to the temporary file as being used storage blocks in the data structure; delete the temporary file from the logical block device and marking the storage blocks that were allocated to the temporary file as being free storage blocks in the data structure; and issue an UNMAP command to the logical block device to deallocate the set of 10 storage blocks which were allocated to the temporary file.
10. The computer system of claim 9, wherein the number of free blocks in the set represents a portion of all free blocks. 15
11. The computer system of claim 10 wherein the portion represents a percentage of all free blocks, wherein the percentage is empirically determined.
12. The computer system of any of claims 9 to 11, wherein the computer system is configured to be upgraded, and wherein the processor is configured to 20 identify the set of free blocks, create the temporary file, delete the temporary file, and issue the UNMAP command in response to the computer system being upgraded.
13. The computer system of claim 12 further comprising a hypervisor that supports execution of one or more virtual machines, and wherein the computer system 25 is upgraded from a hypervisor that does not support thin provisioning to a hypervisor that supports thin provisioning. 24
14. The computer system of any of claims 9 to 13, wherein the processor is arranged to host a space monitoring process, and wherein the space monitoring process is configured to periodically invoke the processor to identify the set of free blocks, create the temporary file, delete the temporary file, and issue the UNMAP command. 5
15. The computer system of any of claims 9 to 13, wherein the processor is configured to identify the set of free blocks, create the temporary file, delete the temporary file, and issue the UNMAP command, in response to a command from a server that manages the virtual machines. 10
16. The computer system of any of claims 9 to 13, wherein the processor is configured to identify the set of free blocks, create the temporary file, delete the temporary file, and issue the UNMAP command, in response to a manual user input. 15
17. A non transitory computer readable storage medium comprising instructions executable by a computer system to carry out the method of any of claims I to 8.
AU2013237716A 2010-08-30 2013-10-04 System software interfaces for space-optimized block devices Active AU2013237716B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2013237716A AU2013237716B2 (en) 2010-08-30 2013-10-04 System software interfaces for space-optimized block devices

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US61/378,076 2010-08-30
US13/181,163 2011-07-12
AU2011218672A AU2011218672B2 (en) 2010-08-30 2011-08-30 System software interfaces for space-optimized block devices
AU2013237716A AU2013237716B2 (en) 2010-08-30 2013-10-04 System software interfaces for space-optimized block devices

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
AU2011218672A Division AU2011218672B2 (en) 2010-08-30 2011-08-30 System software interfaces for space-optimized block devices

Publications (2)

Publication Number Publication Date
AU2013237716A1 AU2013237716A1 (en) 2013-10-24
AU2013237716B2 true AU2013237716B2 (en) 2016-03-10

Family

ID=49385465

Family Applications (2)

Application Number Title Priority Date Filing Date
AU2013237716A Active AU2013237716B2 (en) 2010-08-30 2013-10-04 System software interfaces for space-optimized block devices
AU2013237715A Active AU2013237715B2 (en) 2010-08-30 2013-10-04 System software interfaces for space-optimized block devices

Family Applications After (1)

Application Number Title Priority Date Filing Date
AU2013237715A Active AU2013237715B2 (en) 2010-08-30 2013-10-04 System software interfaces for space-optimized block devices

Country Status (1)

Country Link
AU (2) AU2013237716B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060069850A1 (en) * 2004-09-30 2006-03-30 Rudelic John C Methods and apparatus to perform a reclaim operation in a nonvolatile memory
US20090172666A1 (en) * 2007-12-31 2009-07-02 Netapp, Inc. System and method for automatic storage load balancing in virtual server environments
US20100153617A1 (en) * 2008-09-15 2010-06-17 Virsto Software Storage management system for virtual machines
US20140298326A1 (en) * 2013-03-29 2014-10-02 Vmware, Inc. Asynchronous unmap of thinly provisioned storage for virtual machines

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7334108B1 (en) * 2004-01-30 2008-02-19 Nvidia Corporation Multi-client virtual address translation system with translation units of variable-range size

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060069850A1 (en) * 2004-09-30 2006-03-30 Rudelic John C Methods and apparatus to perform a reclaim operation in a nonvolatile memory
US20090172666A1 (en) * 2007-12-31 2009-07-02 Netapp, Inc. System and method for automatic storage load balancing in virtual server environments
US20100153617A1 (en) * 2008-09-15 2010-06-17 Virsto Software Storage management system for virtual machines
US20140298326A1 (en) * 2013-03-29 2014-10-02 Vmware, Inc. Asynchronous unmap of thinly provisioned storage for virtual machines

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Rastogi et al. "Gone, But Not Forgotten: The Current State of Private Computing" https://web.archive.org/web/20150827061745/http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.484.3962&rep=rep1&type=pdf 27 August 2015 *

Also Published As

Publication number Publication date
AU2013237716A1 (en) 2013-10-24
AU2013237715B2 (en) 2016-03-24
AU2013237715A1 (en) 2013-10-24

Similar Documents

Publication Publication Date Title
US9904471B2 (en) System software interfaces for space-optimized block devices
US9285993B2 (en) Error handling methods for virtualized computer systems employing space-optimized block devices
US9448728B2 (en) Consistent unmapping of application data in presence of concurrent, unquiesced writers and readers
US8880470B2 (en) Method and system for performing live migration of persistent data of a virtual machine
US20220129299A1 (en) System and Method for Managing Size of Clusters in a Computing Environment
US8874859B2 (en) Guest file system introspection and defragmentable virtual disk format for space efficiency
US9038066B2 (en) In-place snapshots of a virtual disk configured with sparse extent
US20140208321A1 (en) Avoiding physical fragmentation in a virtualized storage environment
AU2016213817B2 (en) Techniques for surfacing host-side flash storage capacity to virtual machines
US9128746B2 (en) Asynchronous unmap of thinly provisioned storage for virtual machines
US9612914B1 (en) Techniques for virtualization of file based content
AU2013237716B2 (en) System software interfaces for space-optimized block devices

Legal Events

Date Code Title Description
FGA Letters patent sealed or granted (standard patent)
HB Alteration of name in register

Owner name: VMWARE LLC

Free format text: FORMER NAME(S): VMWARE, INC.