elastio / elastio-snap

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
21 stars 6 forks source link

Implement debug utility for elastio-snap #274

Closed skypodolsky closed 1 year ago

skypodolsky commented 1 year ago

This commit introduces the console debug utility for the elastio-snap driver. The design is the following:

The events are sent as multicast messages, so potential packet drops are possible. All messages have sequence numbers and nl_debug detects if any packet drops took place. If yes, it specifies the amount of missed packets. Despite the drops are possible, practically, they don't occur.

The utility supports different filtering that simplifies debugging:

The Netlink part is not compiled by default, so there is a 0% chance it can degrade the driver performance. A special flag should be set manually to include it:

sudo make NETLINK_DEBUG=y

Closes #272

skypodolsky commented 1 year ago

That said, why is UDP used here? Is there a scenario where we need to run the driver on one host and collect metrics on another?

We might need some proxy in the future (this utility was planned as a proxy initially), so I decided to lay some foundation for that 🙂