Sponsor:

Your company here, and a link to your site. Click to find out more.

zbd - Man Page

manage zoned block devices

Synopsis

zbd command [options] device

Description

zbd is used to manipulate zones of a zoned block device. Zoned block devies are block devices that support the SCSI Zoned Block Commands (ZBC), ATA Zoned-device ATA Commands (ZAC) or NVMe Zoned NameSpace commands (ZNS). The zones to operate on can be specified using the offset and length options.

The device argument must be the pathname of the target zoned block device.

Commands

By default, all commands will operate from the zone at device offset 0 and operate on all zones. The common options -ofst and -len can be used to modify the operation range of commands.

report

The command zbd report is used to obtain and display the device zone information.

By default, the command will report all zones from the start of the device up to the last zone of the device. Options may be used to modify this behavior, changing the starting zone or the size of the report.

Report output

ZoneZone number
typeType of the zone
ofstZone start offset in Bytes
lenZone length in Bytes
capZone usable capacity in Bytes
wpZone write pointer position in Bytes
condZone condition
non_seqNon-sequential write resources active
resetReset write pointer recommended

Zone types

cnvConventional
swrSequential write required
swpSequential write preferred
???Unknown (should not be reported)

Zone conditions

nwNot write pointer
emEmpty
fuFull
oeExplicitly opened
oiImplicitly opened
clClosed
olOffline
roRead only
??Reserved conditions (should not be reported)

reset

The command zbd reset is used to reset the write pointer of one or more zones.

open

The command zbd open is used to explicitly open one or more zones.

close

The command zbd close is used to close one or more zones.

finish

The command zbd finish is used to finish (transition to full) one or more zones.

dump

Save the zone information and zone data of a zoned device to files. The files are by default saved in the current working directory. A different output path can be specified using the option -d. The file names are prefixed by default using the device base name. The device zone information is saved in the file <devname>_zone_info.dump and the device zone data is saved in the file <devname>_zone_data.dump. The file name prefix can be changed using the option -f.

The dump command will save the data of all conventional zones and the written data of all sequential zones in the operation range. The options -ofst and -len can be used to limit in size the operation range.

The zone information file always saves zone information for all zones of the device, regardless of the specified operation range. This file can be specified in place of a device name with the report command to inspect its content.

restore

Set a zoned block device zone status and zone data according to the zone information and zoned data saved in files generated using the dump command. The resulting state of the target device will be identical to that of the device used to generate the dump files. The restore command will only operate on the zone range that was used with the dump command. The target zoned block device must be compatible with the zoned block device used as the source for the dump operation. That is, the target device must have the same capacity and zone configuration (zone type, zone size and zone capacity) as the source device.

The path and name prefix of the dump files to use for restoring a device can be changed using the options -d and -f.

Options

Options applicable to all commands are as follows.

-v

Verbose mode (for debug).

-i

Display device information before executing the command.

-ofst offset

Start offset in Bytes of the first zone to operate on.

-len length

Length in Bytes of the range of zones to operate on.

-h, ā€‰--help

Display help text and exit.

Options applicable only to the zbd report command are as follows.
-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 used with the -n and -csv options, the number of zones is output first.

-ro filter

Sepcify reporting option to filter the zone report. filter can be one of the following.

emEmpty zones
oiImplicitly opened zones
oeExplicitly opened zones
clClosed zones
fuFull zones
roRead only zones
olOffline zones
nwConventional zones
nsNon_seq write resource zones
rwReset write pointer recommended zones

Author

Damien Le Moal <damien.lemoal@wdc.com>

See Also

blkzone(8)

Availability

The zbd command is part of the libzbd library available from https://github.com/westerndigitalcorporation/libzbd.

Referenced By

gzbd(8), gzbd-viewer(8).