summaryrefslogtreecommitdiffstats
path: root/sys-utils/blkzone.8
blob: 64ad23bb3145812b38840cd2a36b94e147d93b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
.TH BLKZONE 8 "February 2017" "util-linux" "System Administration"
.SH NAME
blkzone \- run zone command on a device
.SH SYNOPSIS
.B blkzone
.I command
[options]
.I device
.SH DESCRIPTION
.B blkzone
is used to run zone command on device that support the Zoned Block Commands
(ZBC) or Zoned-device ATA Commands (ZAC). The zones to operate on can be
specified using the offset, count and length options.
.PP
The
.I device
argument is the pathname of the block device.
.SH COMMANDS
.SS report
The command \fBblkzone report\fP is used to report device zone information.
.PP
By default, the command will report all zones from the start of the
block device. Options may be used to modify this behavior, changing the
starting zone or the size of the report, as explained below.

.B Report output
.TS
tab(:);
l l.
start:Zone start sector
len:Zone length in number of sectors
wptr:Zone write pointer position
reset:Reset write pointer recommended
non-seq:Non-sequential write resources active
cond:Zone condition
type:Zone type
.TE

.B Zone conditions
.TS
tab(:);
l l.
cl:Closed
nw:Not write pointer
em:Empty
fu:Full
oe:Explicitly opened
oi:Implicitly opened
ol:Offline
ro:Read only
x?:Reserved conditions (should not be reported)
.TE

.SS reset
The command \fBblkzone reset\fP is used to reset one or more zones. Unlike
.BR sg_reset_wp (8),
this command operates from the block layer and can reset a range of zones.

.SS open
The command \fBblkzone open\fP is used to explicitly open one or more zones.
Unlike
.BR sg_zone (8),
open action, this command operates from the block layer and can open a range
of zones.

.SS close
The command \fBblkzone close\fP is used to close one or more zones. Unlike
.BR sg_zone (8),
close action, this command operates from the block layer and can close a range
of zones.

.SS finish
The command \fBblkzone finish\fP is used to finish (transition to full condition)
one or more zones. Unlike
.BR sg_zone (8),
finish action, this command operates from the block layer and can finish a range
of zones.

.PP
By default, the reset, open, close and finish commands will operate from the zone
at device sector 0 and operate on all zones. Options may be used to modify this
behavior as explained below.

.SH OPTIONS
The
.I offset
and
.I length
option arguments may be followed by the multiplicative suffixes KiB (=1024),
MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
optional, e.g., "K" has the same meaning as "KiB") or the suffixes
KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
Additionally, the 0x prefix can be used to specify \fIoffset\fR and
\fIlength\fR in hex.
.TP
.BR \-o , " \-\-offset "\fIsector\fP
The starting zone specified as a sector offset. The provided offset in sector
units (512 bytes) should match the start of a zone. The default value is zero.
.TP
.BR \-l , " \-\-length "\fIsectors\fP
The maximum number of sectors the command should operate on. The default value
is the number of sectors remaining after \fIoffset\fR. This option cannot be
used together with the option \fB\-\-count\fP.
.TP
.BR \-c , " \-\-count "\fIcount\fP
The maximum number of zones the command should operate on. The default value
is the number of zones starting from \fIoffset\fR. This option cannot be
used together with the option \fB\-\-length\fP.
.TP
.BR \-f , " \-\-force"
Enforce commands to change zone status on block devices used by the system.
.TP
.BR \-v , " \-\-verbose"
Display the number of zones returned in the report or the range of sectors
reset.
.TP
.BR \-V , " \-\-version"
Display version information and exit.
.TP
.BR \-h , " \-\-help"
Display help text and exit.
.SH AUTHORS
.nf
Shaun Tancheff <shaun@tancheff.com>
Karel Zak <kzak@redhat.com>
.fi
.SH SEE ALSO
.BR sg_rep_zones (8)
.SH AVAILABILITY
The blkzone command is part of the util-linux package and is available from
.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
Linux Kernel Archive
.UE .