descriptionlibrary for NBD client connections in userspace
homepage URLhttp://libguestfs.org
repository URLhttps://github.com/libguestfs/libnbd.git
ownereblake@redhat.com
last changeWed, 22 Mar 2023 16:32:08 +0000 (22 17:32 +0100)
last refreshSat, 27 Apr 2024 09:26:32 +0000 (27 11:26 +0200)
content tags
add:
README.md

NBD client library in userspace

NBD — Network Block Device — is a protocol for accessing Block Devices (hard disks and disk-like things) over a Network. This is the NBD client library in userspace, a simple library for writing NBD clients.

The key features are:

For documentation, see the docs and examples subdirectories.

License

The software is Copyright Red Hat and licensed under the GNU Lesser General Public License version 2 or above (LGPLv2+). See the file COPYING.LIB for details. The examples are under a very liberal license.

Building from source

To build from git:

autoreconf -i
./configure
make
make check

To build from tarball:

./configure
make
make check

To run the tests under valgrind:

make check-valgrind

To run benchmarks:

make bench

Some tests require root permissions (and are therefore risky). If you want to run these tests, do:

sudo make check-root

On FreeBSD, OpenBSD and macOS which do not have GNU make by default you must use gmake instead of make.

Requirements:

Required for building from git, optional for building from tarballs:

Recommended - if not present, some features will be disabled:

Optional:

Optional, only needed to run the test suite:

Optional, only needed to run some examples:

Download tarballs

Tarballs are available from: http://libguestfs.org/download/libnbd

Developers

Install the valgrind program and development headers.

Use:

./configure --enable-gcc-warnings --enable-python-code-style

When testing use:

make check
make check-valgrind

Use the following one-time setup for nicer diffs of various files:

git config diff.ml.xfuncname '^(type|and|val|let) .*='
git config diff.ml-api.xfuncname '^(let .*=|  "[^"]*", \{$)'
git config diff.mli.xfuncname '^(type|and|val|module) '
git config diff.states.xfuncname '^([a-zA-Z_].*| [A-Z._0-9]*:$)'

For development ideas, see the TODO file.

The upstream git repository is: https://gitlab.com/nbdkit/libnbd

Patches are accepted either by email to the upstream mailing list: https://www.redhat.com/mailman/listinfo/libguestfs or by Merge Request on gitlab.com

If you want to fuzz the library see fuzzing/README.

shortlog
2023-03-22 Laszlo ErsekRevert "ci: skip "lib/test-fork-safe-execvpe.sh" on... master
2023-03-22 Laszlo Erseklib/test-fork-safe-execvpe.sh: cope with Alpine Linux...
2023-03-22 Laszlo Erseklib/test-fork-safe-execvpe.sh: generalize "run" to...
2023-03-21 Laszlo Ersekci: skip "lib/test-fork-safe-execvpe.sh" on Alpine...
2023-03-21 Laszlo ErsekRevert "lib: account for realpath deficiency on some...
2023-03-21 Laszlo Erseklib/utils: try to placate attribute placement restricti...
2023-03-21 Laszlo Erseklib: account for realpath deficiency on some platforms
2023-03-21 Laszlo Erseklib/utils: add unit tests for async-signal-safe execvpe()
2023-03-21 Laszlo Erseklib/utils: introduce async-signal-safe execvpe()
2023-03-17 Eric Blakelib: Use PTHREAD_LIBS where needed
2023-03-16 Laszlo Erseklib/utils: add unit test for async-signal-safe assert()
2023-03-16 Laszlo Erseklib/utils: add async-signal-safe assert()
2023-03-16 Laszlo Erseklib/utils: introduce xwritel() as a more robust and...
2023-03-09 Richard W.M... generator/states-reply.c: Add debugging comment for...
2023-03-09 Richard W.M... states: Log the error when handle enters %DEAD state
2023-03-09 Richard W.M... Version 1.15.12.rhel-9.3v1.15.12
...
tags
13 months ago v1.15.12 Version 1.15.12.
13 months ago v1.15.11 Version 1.15.11.
14 months ago v1.15.10 Version 1.15.10.
15 months ago v1.15.9 Version 1.15.9.
15 months ago v1.14.2 Version 1.14.2.
17 months ago v1.15.8 Version 1.15.8.
17 months ago v1.15.7 Version 1.15.7.
18 months ago v1.15.6 Version 1.15.6.
18 months ago v1.15.5 Version 1.15.5.
19 months ago v1.15.4 Version 1.15.4.
19 months ago v1.15.3 Version 1.15.3.
19 months ago v1.15.2 Version 1.15.2.
20 months ago v1.15.1 Version 1.15.1.
20 months ago v1.14.1 Version 1.14.1.
20 months ago v1.14.0 Version 1.14.0.
20 months ago v1.12.7 Version 1.12.7.
...
heads
13 months ago master
13 months ago rhel-9.3
15 months ago stable-1.14
15 months ago rhel-9.2
20 months ago stable-1.12
21 months ago rhel-9.1
2 years ago stable-1.10
2 years ago rhel-9.0
2 years ago rhel-8.6
2 years ago stable-1.6
2 years ago stable-1.8
2 years ago rhel-9.0-beta
3 years ago stable-1.4
3 years ago rhel-8.4
3 years ago stable-1.2
3 years ago rhel-8.3
...
forks
Cached version (6151s old)
libnbd/ericb.git eblake@redhat.com 8 months ago