ZBD(8)
zbd(8) β bestie, we're managing zoned block devices today π
okay so this is zbd, from the System Manager's Manual, and she is that girl. let's get into it.
β¨ NAME β¨
zbd β manage zoned block devices π¦
β¨ SYNOPSIS β¨
zbd command [options] device
β¨ DESCRIPTION β¨
so zbd is the tool you use to mess with the zones of a zoned block device. and what even is a zoned block device, you ask? it's a block device that supports the SCSI Zoned Block Commands (ZBC), the ATA Zoned-device ATA Commands (ZAC), or the NVMe Zoned NameSpace commands (ZNS). iconic trio fr fr π
the zones you wanna operate on get picked using the offset and length options. easy.
the device argument has to be the pathname of the target zoned block device. no guessing, bestie, give her the real path πΈ
β¨ COMMANDS β¨
lowkey the default vibe: every command starts at the zone at device offset 0 and operates on all the zones. if you want to change that range, the common options -ofst and -len are right there waiting for you π
π report
zbd report is the one that grabs and shows you the device zone information. main character energy honestly.
by default she reports all zones from the start of the device up to the last zone of the device. you can change that behavior with options β move the starting zone, or change the size of the report. your call, queen β¨
πΈ Report output
Zoneβ Zone numbertypeβ Type of the zoneofstβ Zone start offset in Byteslenβ Zone length in Bytescapβ Zone usable capacity in Byteswpβ Zone write pointer position in Bytescondβ Zone conditionnon_seqβ Non-sequential write resources activeresetβ Reset write pointer recommended
π Zone types
cnvβ Conventionalswrβ Sequential write requiredswpβ Sequential write preferred???β Unknown (should not be reported)
π¦ Zone conditions
nwβ Not write pointeremβ Emptyfuβ Fulloeβ Explicitly openedoiβ Implicitly openedclβ Closedolβ Offlineroβ Read only??β Reserved conditions (should not be reported)
bestie if you ever see???or??show up, something is deeply not giving. those are literally not supposed to be reported π
π reset
zbd reset resets the write pointer of one or more zones. that's it, that's the whole job π
π open
zbd open explicitly opens one or more zones. go off π
π close
zbd close closes one or more zones. closed for business, periodt π
π finish
zbd finish finishes one or more zones β meaning it transitions them to full. she's done, she's booked, she's full π₯
π dump
save the zone information and the zone data of a zoned device to files. so cute of her.
- files go by default into the current working directory π
- wanna put them somewhere else? use the option
-d - file names are prefixed by default using the device base name
- device zone info lands in
<devname>_zone_info.dump - device zone data lands in
<devname>_zone_data.dump - wanna change that prefix? use the option
-f
dump will save the data of all conventional zones and the written data of all sequential zones in the operation range. and yes, -ofst and -len can be used to limit the size of that operation range πΈ
ngl this part matters: the zone information file always saves zone information for all zones of the device, no matter what operation range you specified. and that file can be handed to the report command in place of a device name to inspect its content. iykyk π
π restore
sets a zoned block device's zone status and zone data according to the zone information and zone data saved in files generated by the dump command. the resulting state of the target device will be identical to that of the device used to generate the dump files. literally a glow-up in reverse β¨
some rules, bestie, listen up:
restorewill only operate on the zone range that was used with thedumpcommand- the target zoned block device must be compatible with the zoned block device used as the source for the dump operation
- "compatible" means the target device must have the same capacity and the same zone configuration (zone type, zone size, and zone capacity) as the source device. no substitutions π
you can change the path and the name prefix of the dump files used for restoring with the options -d and -f π
β¨ OPTIONS β¨
π Options that work with every command
-vβ Verbose mode (for debug).-iβ Display device information before executing the command.-ofstoffset β Start offset in Bytes of the first zone to operate on.-lenlength β Length in Bytes of the range of zones to operate on.-h,--helpβ Display help text and exit.
π Options that are ONLY for zbd report
-csvβ Output zone information using the comma-separated (csv) format.-nβ Display the number of zones that are to be reported.-cβ Display the total capacity of all reported zones. when you use it together with the-nand-csvoptions, the number of zones is output first.-rofilter β Specify reporting option to filter the zone report. filter can be one of the following:emβ Empty zonesoiβ Implicitly opened zonesoeβ Explicitly opened zonesclβ Closed zonesfuβ Full zonesroβ Read only zonesolβ Offline zonesnwβ Conventional zonesnsβ Non_seq write resource zonesrwβ Reset write pointer recommended zones
β¨ AUTHOR β¨
Damien Le Moal <damien.lemoal@wdc.com> β thank you king π«Ά
β¨ SEE ALSO β¨
blkzone(8) β go read her too, she's the sister fr fr π
β¨ AVAILABILITY β¨
the zbd command is part of the libzbd library, available from https://github.com/westerndigitalcorporation/libzbd π
okay and one last thing before you go β this whole page is signed off as ZBD(8), the System Manager's Manual page for zbd. that's the little stamp at the very bottom, like a signature in lip gloss π
β¨ bye bestie, go zone something π¦
π¦ where this page comes from
- debian bookworm: zbd-utils 2.0.4-1 Β· GPL-3.0-or-later
- debian trixie: zbd-utils 2.0.4-1.1+b3 Β· GPL-3.0-or-later
- fedora 43: libzbd-cli-tools 2.0.4-8.fc43 Β· LGPL-3.0-or-later AND GPL-3.0-or-later
- fedora 44: libzbd-cli-tools 2.0.4-9.fc44 Β· LGPL-3.0-or-later AND GPL-3.0-or-later
- nixos 26.05: libzbd 2.0.4
- nixpkgs unstable: libzbd 2.0.4
- ubuntu jammy: zbd-utils 2.0.2-2 Β· GPL-3.0-or-later
- ubuntu noble: zbd-utils 2.0.4-1.1build1 Β· GPL-3.0-or-later
- ubuntu questing: zbd-utils 2.0.4-1.1build1
- ubuntu resolute: zbd-utils 2.0.4-1.1build2 Β· GPL-3.0-or-later
- ubuntu stonking: zbd-utils 2.0.4-1.1build2 Β· GPL-3.0-or-later
- π the page's license: GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms