New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce dm-snapshot test suite #51
Conversation
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Fix a bug in Allocator class where calling release_segments() with an empty segment list, when @free_segments is also empty, causes @free_segments to become [nil]. Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Add snapshot, snapshot-origin and snapshot-merge targets. Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
This allows reusing the common device creation code in places where using the with_dev* context managers is not suitable. This is needed by the dm-snapshot test suite in places where we want to create and activate snapshots which persist beyond the scope of a context manager, e.g., across loop iterations. Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Introduce the minimum stack and tests for the dm-snapshot target. In particular, add creation tests that: * Bring up a dm-snapshot device * Create lots of dm-snapshot devices * Create a dm-snapshot device with huge chunk size * Check that creation with non power of two chunk sizes fails * Check that creation with too large chunk sizes fails * Check that creation with the largest chunk size succeeds Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Add various dm-snapshot tests that: * Take a snapshot of a mounted filesystem and write some data to it * Run a git extract test to an origin volume with multiple cascading snapshots * Run dt in parallel against an origin and its snapshots * Run dt against an origin and one of its snapshots Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Add tests that check the consistency of the snapshots created with the dm-snapshot target. In particular, they: * Check that snapshot writes do not affect the origin volume * Check that origin writes do not affect the snapshot volume Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Add a couple of filesystem benchmarking tests that: * Run bonnie++ against the raw data device * Run bonnie++ against an origin volume with a rolling snapshot Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Add some throughput benchmarks that report the achieved throughput across various chunk and IO sizes. In particular, add tests that: * Measure the snapshot breaking throughput * Measure the throughput when snapshot is already broken * Run iozone against the origin device to layout interleaved files and then re-read them with dd using direct IO, while having a snapshot active Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Excellent stuff! Is there a reason why your company is using old snapshots rather than dm-thin? |
Thank you for merging this PR and for your kind words! Yes, our use cases have shown significant differences in performance between old and thin snapshots, and we will also be following up in dm-devel with a few patches improving the performance of old snapshots further. We extended the device mapper test suite exactly for this purpose, to be able to test our proposed patches efficiently. Thank you for all the work you have put into the device mapper test suite, |
Hello,
This PR introduces a test plugin for the dm-snapshot target. It also includes fixes for a couple of minor issues I stumbled upon. Currently, the tests for dm-snapshot are just an adaptation of the relevant tests from the thin-provisioning test suite, but I intend to expand the dm-snapshot test suite with more tests.