nbdkit-partition-filter(1)
π nbdkit-partition-filter(1) β the nbdkit partition filter, bestie edition π
okay so this is a page from the NBDKIT manual, and it's literally about a filter called nbdkit-partition-filter. buckle up, it's cute and it's useful π
β¨ NAME β¨
nbdkit-partition-filter β nbdkit partition filter
πΈ SYNOPSIS πΈ
nbdkit --filter=partition plugin partition=PART [plugin-args...]
π¦ DESCRIPTION π¦
so nbdkit-partition-filter is a filter, right, and what it does is it limits requests to a single partition inside a disk image that's being served by another plugin. like, one partition only. that's the whole vibe. no cap π
partition numbers come from the required partition parameter, and bestie, they count from 1. not 0. from 1. iykyk.
this works exactly like the qemu-nbd -P option, in case you've met that one before π«Ά
and the opposite of this filter? that's nbdkit-partitioning-plugin(1), which adds a virtual partition table to a file or files. mirror image energy β¨
π PARAMETERS π
partition=PARTβ the partition number you want to serve. counts from 1, periodt. this parameter is required, so don't come to the function without it πpartition-sectorsize=SECTOR_SIZEβ the default here gets picked according to the minimum block size that the underlying device advertises. if that's 512 or 4K, then the sector size is set to that. and if the underlying device doesn't advertise a minimum block size at all, or it's advertising something that isn't 512 or 4K? then the default is 512 bytes. that's the fallback, no drama π
you can also set it manually, and the user may specify 512 or 4096 as the sector size via config. those are the options, bestie, nothing else π
but however it gets set, this parameter is telling the partition table logic to treat the underlying storage as having the indicated sector size. and that? that's important for MBR and GPT logic using LBA (logical block addressing). like genuinely important, don't skip it π
β EXAMPLE β
say disk.img is a partitioned disk image (eg. a virtual machine disk image). to serve the first partition only, you'd go:
nbdkit --filter=partition file disk.img partition=1
and that's it. iconic. ate. π₯
π§ FILES π§
$filterdir/nbdkit-partition-filter.soβ the filter itself π
use nbdkit --dump-config to find the location of $filterdir. that's how you find your filterdir, bestie, go look π
π VERSION π
nbdkit-partition-filter first appeared in nbdkit 1.2. vintage but make it fashion β¨
π SEE ALSO π
nbdkit(1), nbdkit-file-plugin(1), nbdkit-filter(3), nbdkit-map-filter(1), nbdkit-offset-filter(1), nbdkit-partitioning-plugin(1), nbdkit-protect-filter(1), nbdkit-truncate-filter(1), parted(8).
go read them, they're all part of the squad π«Ά
π AUTHORS π
Eric Blake
Richard W.M. Jones
π COPYRIGHT π
Copyright Red Hat
π LICENSE π
redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
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.
and that's the whole page bestie!! this one's from nbdkit-1.48.1, dated 2026-08-29, and it's the nbdkit-partition-filter(1) page β mwah, slay, go partition something π
β¨π¦
π¦ where this page comes from
- fedora 44: nbdkit-basic-filters 1.48.1-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms