VIRTIO_BLK(4)
π VIRTIO_BLK(4) π
okay bestie, welcome to the Kernel Interfaces Manual section of the group chat β today's main character is virtio_blk, and no, it's not a new drink at Starbucks, it's the VirtIO Block driver. π¦
β¨ NAME β¨
virtio_blk β the VirtIO Block driver. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
so if you want this driver baked into your kernel (permanent, committed, no cap), you drop these lines into your kernel configuration file:
device virtio_blk
OR β and this is the lowkey easier route β you can load it as a module at boot time instead, by putting this line in loader.conf(5):
virtio_blk_load="YES"
pick your fighter, both are iconic. π
π DESCRIPTION π
The virtio_blk device driver provides support for VirtIO block devices. that's the whole job, and it does it flawlessly. periodt. β¨
π LOADER TUNABLES π
okay so these tunables? you can set them at the loader(8) prompt before the kernel boots, or you can just store them in loader.conf(5) so they're ready to go. your choice, bestie.
hw.vtblk.no_identhw.vtblk.X.no_ident
These tunables disable retrieving the device identification string from the hypervisor β either globally (hw.vtblk.no_ident) or per-device (hw.vtblk.X.no_ident). The default value is 0. π«Ά
hw.vtblk.writecache_modehw.vtblk.X.writecache_mode
These tunables determine the write cache mode, globally or per-device. heads up though: the mode can be changed only if the ConfigWCE feature is negotiated. Set it to 0 for writethrough mode, 1 for writeback mode, and -1 to leave it as-is. The default value is to leave as-is. π
π§ SYSCTL VARIABLES π§
these ones are available as sysctl(8) variables, so you can poke at them live, iykyk:
dev.vtblk.X.writecache_modeβ the write cache mode of the device can be either writethrough (0) or writeback (1). If theConfigWCEfeature is negotiated, the write cache mode can be toggled between writethrough and writeback. π₯
π SEE ALSO π
π HISTORY π
The virtio_blk driver was written by Bryan Venteicher <bryanv@FreeBSD.org>. It first appeared in FreeBSD 9.0. a legend, honestly. π
and that's the whole page bestie!! this one shipped with the Debian manual set, dated July 2, 2013 β yeah, vintage, but the vibes are timeless. go forth and slay your block devices πππ¦β¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2011 Bryan Venteicher
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms