They propose to include in the Kernel the blksnap mechanism, which allows creating snapshots of block devices 

Linux Snapshot

Image by Gerd Altmann on Pixabay

It was recently announced that Veeam , a company that produces backup and disaster recovery software, proposed including the blksnap module in the Linux kernel with the implementation of the mechanism to create snapshots of block devices and track changes in block devices.

The purpose of creating the module is to organize the backup of virtual drives and disks without interrupting work. The goal is for the module to allow capturing the current state of the entire block device in a snapshot, providing an isolated portion for backup that is not dependent on ongoing changes.

Hello everyone.

I suggest a modified version of the blksnap kernel module for your consideration. Allows you to create non-persistent snapshots of any block device. The main purpose of such snapshots is to create a backup of block devices.

A snapshot is created simultaneously for multiple block devices, ensuring their mutual consistency in backup.

It is mentioned that an important feature of blksnap is the ability to simultaneously create snapshots for multiple block devices at once, which allows not only ensuring data integrity at the block device level, but also achieving consistency in the state of different block devices in the backup.

To track changes to the block device subsystem (bdev), the ability to attach filters that allow you to intercept I/O requests has been added. blksnap implements a filter that intercepts write requests, reads the old value, and saves it to a separate change list that determines the state of the snapshot.

With this approach, the logic of working with a block device remains unchanged ; writing to the original block device is performed as is, regardless of snapshots. This eliminates the possibility of data corruption and prevents problems even in the event of unpredictable critical errors in blocksnap and overflow of the space allocated for changes.

An arbitrary range of sectors can be used on any block device to store instantaneous changes. The change storage size can be increased after the snapshot is created by adding new sector ranges.

This allows you to create a single file diff store on a file system that can occupy the entire space of a block device and grow the diff store as needed.

The module also allows you to determine which blocks were changed between the last snapshot and any previous snapshot, which can be useful for the user to implement incremental backups.

Regarding saving changes to the snapshot state, it's mentioned that an arbitrary range of sectors can be allocated on any block device, allowing changes to be saved to separate files within the file system on block devices. The size of the area for storing changes can be increased at any time, even after the snapshot has been created.

To work with snapshots, the blksnap command line utility and the blksnap.so library have been prepared, which allow you to interact with the kernel module via ioctl calls from user space.

Blksnap is based on the code of the veeamsnap module, which is part of the Veeam Agent for Linux product, but redesigned for the shipping specifications in the main part of the Linux kernel.

The conceptual difference between blksnap and veeamsnap is the use of a filter system attached to a block device, rather than a separate bdevfilter component that intercepts I/O.

Finally, if you are interested in learning more , you can find the details in the mailing lists at the following link.


Add as preferred source in Google