New in nbdkit

nbdkit is our toolkit for writing flexible Network Block Device servers with both normal and esoteric plugins as data sources. You can use it to pull data into qemu or other hypervisors, or with libguestfs.

Since I last mentioned nbdkit ([1] and [2]) there have been a few new developments:

  • There are now stable (1.2) and development (1.3) branches. Most of the features discussed below are only available on the development branch at this time.
  • If you use bash, you can now tab-complete many nbdkit commands, including automatically getting a list of flags, plugins and plugin parameters.
  • The highly optimized and multithreaded file plugin now supports hole-punching (trim/discard) thanks to Eric Blake’s work.
  • Eric also wrote new filters: a log filter for enhanced logging, and blocksize, nozero and fua filters for modifying requests from clients.
  • I wrote some new plugins too: The ext2 plugin allows you to read and write files within ext2 filesystems (my response to this very long qemu-devel discussion). The zero and random plugins are largely for testing awkward corner cases in NBD clients and the nbdkit code itself.
  • Eric added support for zeroing to non-C plugins.
  • Pino Toscano added the nbdkit_realpath utility function for plugins.
  • For programmers writing plugins, Eric Blake has done a lot of work on the plugin API. If your plugins use:
    #define NBDKIT_API_VERSION 2
    

    then the plugin functions all have flags exposing FUA (flush) commands from the client. Of course the old plugins are still supported both as source and binaries.

  • The default NBD protocol served in ≥ 1.3 changed to “newstyle”, but you can continue to serve “oldstyle” by adding the -o option.

nbdkit can be downloaded from here and older versions (probably not including the features above) are available in all popular Linux distributions.

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.