Abstract:
A method for allocating storage for a virtual machine includes receiving a request to allocate a block of disk storage on a physical disk to a virtual disk associated with the virtual machine. The method also includes identifying a plurality of available blocks on the physical disk, each of the plurality of available blocks defining a radial distance from a center axis of a platter of the physical disk. The method further includes determining which of the plurality of available blocks has a greatest radial distance from the center axis of the platter and, based on the determining, selecting an allocation block from the plurality of available blocks, the allocation block having the greatest radial distance from the center axis of the platter. The method also includes allocating the allocation block to the virtual machine.
Abstract:
A computer system that employs a solid-state memory device as a physical storage resource includes a hypervisor that is capable of supporting TRIM commands issued by virtual machines running in the computer system. When a virtual machine issues a TRIM command to its corresponding virtual storage device to invalidate data stored therein, the TRIM command is received at an interface layer in the hypervisor that translates the TRIM command to a SCSI command known as UMMAP. A SCSI virtualization layer converts the UNMAP command to a file system command to delete portions of the virtual storage device that is maintained as a file in the hypervisor's file system. Upon receiving the delete commands, the hypervisor's file system driver generates a TRIM command to invalidate the data stored in the solid-state memory device at locations corresponding to the portions of the file that are to be deleted.