Virtual block devices
First Claim
1. A method performed by data processing apparatus, the method comprising:
- receiving a request to initialize a virtual machine, the virtual machine having an associated persistent virtual block device, wherein the persistent virtual block device is realized using a plurality of data files maintained by a file system and a persistent file map comprising a plurality of file map entries, each file map entry associating a respective block of the virtual block device with a respective position within a respective data file maintained by the file system to which the block was written, and wherein each of the blocks is written to the respective data file in association with metadata that identifies the block and a respective sequence number for a write request that resulted in the block being written to the position; and
initializing the file map for use by the virtual machine, wherein initializing the file map for use by the virtual machine comprises determining whether the file map is up to date with respect to the file system for each of the blocks of the persistent virtual block device identified in the file map, comprising;
determining that a size of a particular file of the plurality of data files maintained by the file system exceeds a size indicated by metadata associated with the file map for the particular file;
scanning a tail of the particular file to identify blocks allocated to the virtual block device written to the tail of the particular file, wherein the tail of the particular file is the portion of the particular file that exceeds the size indicated by the metadata;
identifying, from the scanning, that a new version of a particular block that is associated with an initial position in the file map has been written to a new position in the tail of the particular filedetermining, by comparing a sequence number stored in association with the particular block at the new position to a sequence number stored in association with the initial position, that the particular block was written to the new position subsequent to being written to the initial position indicated by the file map; and
updating the position associated with the particular block in the file map to the new position.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for virtual block storage. In one aspect, a method includes receiving a request to initialize a virtual machine, the virtual machine having an associated virtual block device; accessing a file map comprising a plurality of file map entries; determining file map entries corresponding to blocks of data allocated to the virtual block device and one or more files in which the blocks of data allocated to the virtual block device are stored; determining that a particular one of the blocks allocated to the virtual block device has been written to a new position not associated with the particular block in the file map; and updating the position associated with the particular block to the new position.
-
Citations
36 Claims
-
1. A method performed by data processing apparatus, the method comprising:
-
receiving a request to initialize a virtual machine, the virtual machine having an associated persistent virtual block device, wherein the persistent virtual block device is realized using a plurality of data files maintained by a file system and a persistent file map comprising a plurality of file map entries, each file map entry associating a respective block of the virtual block device with a respective position within a respective data file maintained by the file system to which the block was written, and wherein each of the blocks is written to the respective data file in association with metadata that identifies the block and a respective sequence number for a write request that resulted in the block being written to the position; and initializing the file map for use by the virtual machine, wherein initializing the file map for use by the virtual machine comprises determining whether the file map is up to date with respect to the file system for each of the blocks of the persistent virtual block device identified in the file map, comprising; determining that a size of a particular file of the plurality of data files maintained by the file system exceeds a size indicated by metadata associated with the file map for the particular file; scanning a tail of the particular file to identify blocks allocated to the virtual block device written to the tail of the particular file, wherein the tail of the particular file is the portion of the particular file that exceeds the size indicated by the metadata; identifying, from the scanning, that a new version of a particular block that is associated with an initial position in the file map has been written to a new position in the tail of the particular file determining, by comparing a sequence number stored in association with the particular block at the new position to a sequence number stored in association with the initial position, that the particular block was written to the new position subsequent to being written to the initial position indicated by the file map; and updating the position associated with the particular block in the file map to the new position. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A non-transitory storage medium encoded with instructions which, when executed by one or more data processing apparatus, cause the data processing apparatus to perform operations comprising:
-
receiving a request to initialize a virtual machine, the virtual machine having an associated persistent virtual block device, wherein the persistent virtual block device is realized using a plurality of data files maintained by a file system and a persistent file map comprising a plurality of file map entries, each file map entry associating a respective block of the virtual block device with a respective position within a respective data file maintained by the file system to which the block was written, and wherein each of the blocks is written to the respective data file in association with metadata that identifies the block and a respective sequence number for a write request that resulted in the block being written to the position; and initializing the file map for use by the virtual machine, wherein initializing the file map for use by the virtual machine comprises determining whether the file map is up to date with respect to the file system for each of the blocks of the persistent virtual block device identified in the file map comprising; determining that a size of a particular file of the plurality of data files maintained by the file system exceeds a size indicated by metadata associated with the file map for the particular file; scanning a tail of the particular file to identify blocks allocated to the virtual block device written to the tail of the particular file, wherein the tail of the particular file is the portion of the particular file that exceeds the size indicated by the metadata; identifying, from the scanning, that a new version of a particular block that is associated with an initial position in the file map has been written to a new position in the tail of the particular file; determining, by comparing a sequence number stored in association with the particular block at the new position to a sequence number stored in association with the initial position, that the particular block was written to the new position subsequent to being written to the initial position indicated by the file map; and updating the position associated with the particular block in the file map to the new position. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A system comprising:
-
a non-transitory storage medium encoded with instructions; data processing apparatus operable to execute the instructions to perform operations comprising; receiving a request to initialize a virtual machine, the virtual machine having an associated persistent virtual block device, wherein the persistent virtual block device is realized using a plurality of data files maintained by a file system and a persistent file map comprising a plurality of file map entries, each file map entry associating a respective block of the virtual block device with a respective position within a respective data file maintained by the file system to which the block was written, and wherein each of the blocks is written to the respective data file in association with metadata that identifies the block and a respective sequence number for a write request that resulted in the block being written to the position; and initializing the file map for use by the virtual machine, wherein initializing the file map for use by the virtual machine comprises determining whether the file map is up to date with respect to the file system for each of the blocks of the persistent virtual block device identified in the file map, comprising; determining that a size of a particular file of the plurality of data files maintained by the file system exceeds a size indicated by metadata associated with the file map for the particular file; scanning a tail of the particular file to identify blocks allocated to the virtual block device written to the tail of the particular file, wherein the tail of the particular file is the portion of the particular file that exceeds the size indicated by the metadata; identifying, from the scanning, that a new version of a particular block that is associated with an initial position in the file map has been written to a new position in the tail of the particular file; determining, by comparing a sequence number stored in association with the particular block at the new position to a sequence number stored in association with the initial position, that the particular block was written to the new position subsequent to being written to the initial position indicated by the file map; and updating the position associated with the particular block in the file map to the new position. - View Dependent Claims (26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36)
-
Specification