nbdkit-nfs-plugin - Man Page

use disk image on Network File Server

Synopsis

 nbdkit nfs [uri=]URI [readonly=true]
 nbdkit nfs --dump-plugin

Description

nbdkit-nfs-plugin is a plugin for nbdkit(1) which mounts a disk image located on a Network File Server (NFS) and exposes it for read and write over the NBD protocol.  It uses libnfs.

The only required parameter is the RFC-2224 NFS URI.  An example is:

 nbdkit nfs 'nfs://server/mnt/disk.img?version=4'

When using this plugin, you may have to run nbdkit as root if the NFS server requires the NFS client to be using a privileged port (the so-called "secure" option in /etc/exports).

Parameters

readonly=true

Open the NFS file read-only.

[uri=]URI

The RFC 2224-compliant URI of the NFS server, mountpoint and filename. Other query parameters can be added to control features like timeouts and reconnections.  See https://github.com/sahlberg/libnfs for details.

uri= is a magic config key and may be omitted in most cases. See "Magic parameters" in nbdkit(1).

Dump Plugin Output

 nbdkit nfs --dump-plugin

shows:

libnfs_multithreading=yes

This is printed if this version was compiled with libnfs multithreading support (https://github.com/sahlberg/libnfs/blob/master/README.multithreading). This has better performance.

Debugging

To enable libnfs debugging, you can either use the nbdkit debugging flag -D nfs.debug=9 or add debug=9 to the end of the URI:

 nbdkit -f -v nfs 'nfs://...' -D nfs.debug=9

 nbdkit -f -v nfs 'nfs://...&debug=9'

Files

$plugindir/nbdkit-nfs-plugin.so

The plugin.

Use nbdkit --dump-config to find the location of $plugindir.

Version

nbdkit-nfs-plugin first appeared in nbdkit 1.44.

See Also

nbdkit(1), nbdkit-plugin(3), nbdkit-curl-plugin(1), nbdkit-file-plugin(1), nbdkit-ssh-plugin(1), exports(5), nfs(5), https://github.com/sahlberg/libnfs.

Authors

Richard W.M. Jones

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Referenced By

nbdkit(1), nbdkit-curl-plugin(1), nbdkit-file-plugin(1), nbdkit-plugin(3), nbdkit-ssh-plugin(1).

2025-04-10 nbdkit-1.43.5