目前Linux已有的快照大部分都是对于逻辑卷(LVM)实现,而极少有对标准分区进行快照的实现,基于以上问题,提出一种基于虚拟重构的快照方法,可以实现对标准分区的快照。通过在通用块层截获Bio对源卷进行写时拷贝COW(Copy-On-Write),以及构造虚拟块设备实现I/O重定向机制,对数据卷的快照对外看作是一个只可读的块设备从而实现对标准分区快照。通过实验表明所提出的快照方法有效实现对标准分区进行快照。
Current snapshot based on Linux are mostly achieved by Logical Volume(LVM), and there is few implementations of snapshot regarding the disk partitions. Based on all above problems, proposes a method of snapshot based on virtual reconstruction, which can get the snapshots of disk partitions. Copy-On-Write is performed by intercepting Bio at the generic block layer to write the disk volume, and creating virtual block device to implement the redirection mechanism. In this process, the snapshots for the data volume can be seen as a readonly block device, thereby achieve the snapshots for the disk partitions. Verified by the experiments, this implementation of snapshot can guarantee the effectiveness of snapshot for disk partitions.