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

Linux Snapshot

Image Gerd Altmann en Pixabay

Recently the news broke that the veeam company, (a company that produces backup and disaster recovery software), proposed that the blksnap module be included in the Linux kernel with the implementation of the mechanism to create snapshots of block devices and track changes in block devices.

The purpose de create the module is to organize the backup of virtual drives and disks without stopping the work, this is intended for the module to allow the current state of the entire block device to be captured 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 by blksnap is the ability to simultaneously create snapshots for multiple block devices at once, allowing not only to ensure data integrity at the block device level, but also to achieve consistency in the state of the 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 does not change, recording to the original block device is done as-is, regardless of snapshots, which eliminates the possibility of data corruption and prevents problems even in the event of unpredictable critical errors. in blksnap and overflow the space intended 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 also allows to determine which blocks were changed between the latest and any previous snapshots, which can be useful to the user to implement incremental backups.

Regarding the part of saving the changes, in relation to the state of the snapshot, it is mentioned that an arbitrary range of sectors can be assigned on any block device, allowing you to save changes to separate files within the FS 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 knowing more about it, you can check the details in the mailing lists In the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.