Skip to content

Commit

Permalink
Update README.md (#295)
Browse files Browse the repository at this point in the history
Added information about the reload and debug functionality.
  • Loading branch information
skypodolsky authored Aug 31, 2023
1 parent 8d287ba commit 2c3253b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 2c3253b

Please sign in to comment.