Sub-block modifications for block-level snapshots
AssigneeAmazon Technologies, Inc.
InventorsSandeep Kumar, Shobha Agrawal, Sahil Doshi, Suresh Babu Sajja, Shuvabrata Ganguly
Life of this patent
Estimating the term…
Abstract
Generally described, one or more aspects of the present application relate to a public snapshot service for creating and managing block-level snapshots. Snapshots can be configured to enable writing at the sub-block level. Subsequent modifications made to blocks storage volume that forms the basis of the snapshots can be backed up as a sub-block level operations.
Claims18
A computer-implemented method comprising:
- maintaining, at an object storage service of a cloud provider system, a first snapshot representing a point-in-time representation of a block storage volume maintained on a client data storage server that is external to the cloud provider system, wherein the first snapshot is stored at the object storage service as a plurality of snapshot blocks that are a different size than operating-system-level blocks used by an operating system of the client data storage server to write to the block storage volume;
- receiving a request to create a child snapshot reflecting changes to the block storage volume since the point-in-time represented in the first snapshot, wherein the child snapshot is stored at the object service as a set of child snapshot blocks, individual snapshot blocks in the set of child snapshot blocks corresponding to individual snapshot blocks of the first snapshot and reflecting changes to the individual snapshot blocks of the first snapshot since the point-in-time;
- receiving a request to store, within the child snapshot, sub-block data representing a modification to less than all data of a first snapshot block of the first snapshot, the modification beginning at a position within the first snapshot block and representing a modification to at least one operating-system-level block of the block storage volume;
- storing the modification, wherein storing the modification comprises:
- creating a buffer object of a size matching a size of the first snapshot block,
- writing the sub-block data onto the buffer object at a position in the buffer object corresponding to the position in the first snapshot block to create a write representation of the modification, and
- generating a write-set entry for the write representation, the write-set entry indicating the sub-block data stored in the write representation by at least the position of the sub-block data within the first snapshot block and a length of the sub-block data;
- receiving a request to seal the child snapshot;
- merging, in response to receiving the request to seal the child snapshot, the first snapshot block and the write representation to result in a child snapshot block of the set of child snapshot blocks, wherein merging the first snapshot block and the write representation comprises using the write-set entry to overwrite data within the first snapshot block with the sub-block data in the write representation;
- and
- storing the child snapshot block at the object storage service at the cloud provider system as part of the child snapshot.
A system comprising:
- one or more object storage servers storing:
- a snapshot corresponding to a point-in-time representation of a block storage volume, wherein the snapshot is stored on the one or more object storage servers as a plurality of snapshot blocks, and wherein each snapshot block corresponds to a plurality of operating-system-level blocks of the block storage volume,
- a computing system in communication with the one or more object storage servers, the computing system configured to:
- receive a request to modify less than all data of a first snapshot block of the plurality of snapshot blocks, the request specifying a modification to one or more sub-blocks of the first snapshot block that correspond to one or more operating-system-level blocks of the block storage volume, the modification beginning at a position within the first snapshot block;
- store a write representation representing the modification, and metadata for the write representation indicating the position of the modification within the first snapshot block and a length of modification, wherein to store the write representation, the computing system is configured to generate the write representation at least partly by creating a buffer object of a size matching a size of the first snapshot block and writing the modification to the one or more sub-blocks onto the buffer object at a position in the buffer object corresponding to the position in the first snapshot block;
- receive a request to seal the snapshot as a set of immutable snapshot blocks;
- retrieve the write representation and the first snapshot block;
- generate the set of immutable snapshot blocks at least partly by:
- merging the first snapshot block with the write representation at least partly by overwriting data within the first snapshot block with the modification represented by the write representation according to the metadata, wherein the merging results in a first immutable snapshot block of the set of immutable snapshot blocks;
- and
- store the set of immutable snapshot blocks.
A non-transitory computer-readable medium including computer-executable instructions that, when executed by a computing system, cause the computing system to:
- receive a request to store a snapshot corresponding to a point-in-time representation of a block storage volume, wherein the snapshot is stored on one or more object storage servers as a plurality of snapshot blocks, and wherein each snapshot block corresponds to a plurality of operating-system-level blocks of the block storage volume
- receive a request to modify less than all data of a first snapshot block of the plurality of snapshot blocks, the request specifying a modification to one or more sub-blocks of the first snapshot block that correspond to one or more operating-system-level blocks of the block storage volume, the modification beginning at a position within the first snapshot block;
- store a write representation representing the modification, and metadata for the write representation indicating the position of the modification within the first snapshot block and a length of modification, wherein to store the write representation, the instructions cause the computing system to generate the write representation at least partly by creating a buffer object of a size matching a size of the first snapshot block and writing the modification to one or more sub-blocks onto the buffer object at a position in the buffer object corresponding to the position in the first snapshot block;
- receive a request to seal the snapshot as a set of immutable snapshot blocks;
- retrieve the write representation and the first snapshot block;
- generate the set of immutable snapshot blocks at least partly by:
- merging the first snapshot block with the write representation at least partly by overwriting data within the first snapshot block with the modification represented by the write representation according to the metadata, wherein the merging results in a first immutable snapshot block of the set of immutable snapshot blocks;
- and
- store the set of immutable snapshot blocks.
Dependencies are inferred from the claim text.