1nbdkit-partition-filter(1)          NBDKIT          nbdkit-partition-filter(1)
2
3
4

NAME

6       nbdkit-partition-filter - nbdkit partition filter
7

SYNOPSIS

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

DESCRIPTION

12       "nbdkit-partition-filter" is a filter that limits requests to a single
13       partition within a disk image that is served by another plugin.
14
15       Partition numbers are specified by the required "partition" parameter,
16       and count from 1.
17
18       This works like the "qemu-nbd -P" option.
19
20       The opposite of this filter is nbdkit-partitioning-plugin(1) which adds
21       a virtual partition table to a file or files.
22

PARAMETERS

24       partition=PART
25           The partition number to serve, counting from 1.
26
27           This parameter is required.
28
29       partition-sectorsize=SECTOR_SIZE
30           The default for this parameter is chosen according to the minimum
31           block size advertised by the underlying device.  If it is 512 or
32           4K, then the sector size is set to that.  If the underlying device
33           does not advertise a minimum block size, or it is something other
34           than 512 or 4K, the default is 512 bytes.
35
36           The user may specify 512 or 4096 as the sector size manually via
37           config.
38
39           However set, this parameter instructs the partition table logic to
40           treat the underlying storage as having the indicated sector size.
41           This is important for MBR and GPT logic using LBA (logical block
42           addressing).
43

EXAMPLE

45       disk.img is a partitioned disk image (eg. a virtual machine disk
46       image).  To serve the first partition only use:
47
48        nbdkit --filter=partition file disk.img partition=1
49

FILES

51       $filterdir/nbdkit-partition-filter.so
52           The filter.
53
54           Use "nbdkit --dump-config" to find the location of $filterdir.
55

VERSION

57       "nbdkit-partition-filter" first appeared in nbdkit 1.2.
58

SEE ALSO

60       nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3),
61       nbdkit-offset-filter(1), nbdkit-partitioning-plugin(1),
62       nbdkit-protect-filter(1), nbdkit-truncate-filter(1), parted(8).
63

AUTHORS

65       Eric Blake
66
67       Richard W.M. Jones
68
70       Copyright Red Hat
71

LICENSE

73       Redistribution and use in source and binary forms, with or without
74       modification, are permitted provided that the following conditions are
75       met:
76
77       •   Redistributions of source code must retain the above copyright
78           notice, this list of conditions and the following disclaimer.
79
80       •   Redistributions in binary form must reproduce the above copyright
81           notice, this list of conditions and the following disclaimer in the
82           documentation and/or other materials provided with the
83           distribution.
84
85       •   Neither the name of Red Hat nor the names of its contributors may
86           be used to endorse or promote products derived from this software
87           without specific prior written permission.
88
89       THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
90       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
91       IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
92       PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
93       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
94       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
95       SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
96       BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
97       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
98       OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
99       ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
100
101
102
103nbdkit-1.36.2                     2023-11-26        nbdkit-partition-filter(1)
Impressum