nbdkit is our toolkit for creating Network Block Device (NBD) servers from “unusual” data sources. nbdkit was already configurable by writing simple plugins in several programming languages. Last week Eric Blake and I added a nice new feature: You can now modify existing plugins by placing “filters” in front of them.
- Serving only an offset + range within the underlying disk.
- Serving a single partition if the disk is a partitioned disk image.
- Injecting delays for simulating slow servers and testing for race conditions.
- Adding a copy-on-write overlay if the plugin is read-only.
(You can also layer filters to arbitrary depth)
nbdkit 1.1.27 has three simple filters, and 1.1.28 will include two more, and you can write your own although (unlike plugins) filters do not yet have a stable ABI and we haven’t decided if we will offer a stable ABI in future.