=head1 NAME

nbdkit-partition-filter - nbdkit partition filter

=head1 SYNOPSIS

 nbdkit --filter=partition plugin partition=PART [plugin-args...]

=head1 DESCRIPTION

C<nbdkit-partition-filter> is a filter that limits requests to a
single partition within a disk image that is served by another plugin.

Partition numbers are specified by the required C<partition>
parameter, and count from 1.

This works like the C<qemu-nbd -P> option.

The opposite of this filter is L<nbdkit-partitioning-plugin(1)> which
adds a virtual partition table to a file or files.

=head1 PARAMETERS

=over 4

=item B<partition=>PART

The partition number to serve, counting from 1.

This parameter is required.

=back

=head1 EXAMPLE

F<disk.img> is a partitioned disk image (eg. a virtual machine disk
image).  To serve the first partition only use:

 nbdkit --filter=partition file disk.img partition=1

=head1 FILES

=over 4

=item F<$filterdir/nbdkit-partition-filter.so>

The filter.

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

=back

=head1 VERSION

C<nbdkit-partition-filter> first appeared in nbdkit 1.2.

=head1 SEE ALSO

L<nbdkit(1)>,
L<nbdkit-file-plugin(1)>,
L<nbdkit-filter(3)>,
L<nbdkit-offset-filter(1)>,
L<nbdkit-partitioning-plugin(1)>,
L<nbdkit-truncate-filter(1)>,
L<parted(8)>.

=head1 AUTHORS

Eric Blake

Richard W.M. Jones

=head1 COPYRIGHT

Copyright (C) 2018 Red Hat Inc.
