=head1 NAME

nbdkit-nfs-plugin - use disk image on Network File Server

=head1 SYNOPSIS

 nbdkit nfs [uri=]URI [readonly=true]

=for paragraph

 nbdkit nfs --dump-plugin

=head1 DESCRIPTION

C<nbdkit-nfs-plugin> is a plugin for L<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
L<libnfs|https://github.com/sahlberg/libnfs>.

The only required parameter is the
L<RFC-2224|https://www.rfc-editor.org/rfc/rfc2224> 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 F</etc/exports>).

=head1 PARAMETERS

=over 4

=item B<readonly=true>

Open the NFS file read-only.

=item [B<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 L<https://github.com/sahlberg/libnfs> for
details.

C<uri=> __IS_MAGIC__

=back

=head1 DUMP PLUGIN OUTPUT

 nbdkit nfs --dump-plugin

shows:

=over 4

=item C<libnfs_multithreading=yes>

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

=back

=head1 DEBUGGING

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

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

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

=head1 FILES

=over 4

=item F<$plugindir/nbdkit-nfs-plugin.so>

The plugin.

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

=back

=head1 VERSION

C<nbdkit-nfs-plugin> first appeared in nbdkit 1.44.

=head1 SEE ALSO

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

=head1 AUTHORS

Richard W.M. Jones

=head1 COPYRIGHT

Copyright Red Hat
