From 2c3253bb62a29a967324bbbcdcb57df62c98c230 Mon Sep 17 00:00:00 2001 From: Stanislav Barantsev Date: Thu, 31 Aug 2023 22:56:17 +0300 Subject: [PATCH] Update README.md (#295) Added information about the reload and debug functionality. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 338e5978..a3fed0fd 100644 --- a/README.md +++ b/README.md @@ -96,3 +96,24 @@ The current status of the elastio-snap driver can be read from the file `/proc/e * 5 = unverified snapshot * `nr_changed_blocks`: The number of blocks that have changed since the last snapshot. * `version`: Version of the on-disk format of the COW header. + +## Reload functionality + +When the block device is tracked, the driver handles the system restart by using reload scripts in the `/etc/elastio/dla` directory. Whenever the snapshot is created or changes its state, the relevant script +is updated to restore the correct state of the device. Hence, for example, if the restart occurs during the active snapshot state, a script with the following structure is set up: + +``` +/usr/bin/elioctl reload-snapshot -c 0 /dev/vda3 /cow 0 +``` +These scripts are called on system start-up before the root volume is mounted to ensure the snapshot device is ready and waiting for the mount. When this occurs, the driver detects it, switches the device to +an active mode and restores device tracking. + +## Debugging + +There is a possibility to trace all driver events, including bio request tracing, in real time. To build the driver with debug mode, use an additional flag: + +``` +sudo make NETLINK_DEBUG=y +``` + +Then use the `nl_debug` utility to display the events.