2 .\" Copyright (c) 2015 Spectra Logic Corporation
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions, and the following disclaimer,
10 .\" without modification.
11 .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 .\" substantially similar to the "NO WARRANTY" disclaimer below
13 .\" ("Disclaimer") and any redistribution must be conditioned upon
14 .\" including a substantially similar Disclaimer requirement for further
15 .\" binary redistribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
21 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGES.
30 .\" Authors: Ken Merry (Spectra Logic Corporation)
39 .Nd Shingled Magnetic Recording Zone Control utility
47 .Op Fl P Ar print_opts
54 This allows managing devices that conform to the
56 Zoned Block Commands (ZBC) and
58 Zoned ATA Command Set (ZAC)
60 Devices using these command sets are usually hard drives using Shingled
61 Magnetic Recording (SMR).
62 There are three types of SMR drives:
65 Drive Managed drives look and act just like a standard random access block
66 device, but underneath, the drive reads and writes the bulk of its capacity
68 Sequential writes will yield better performance, but writing sequentially
71 Host Aware drives expose the underlying zone layout via
75 commands and allow the host to manage the zone conditions.
76 The host is not required to manage the zones on the drive, though.
77 Sequential writes will yield better performance in Sequential Write
78 Preferred zones, but the host can write randomly in those zones.
80 Host Managed drives expose the underlying zone layout via
85 The host is required to access the zones according to the rules described
87 Any commands that violate the rules will be returned with an error.
90 SMR drives are divided into zones (typically in the range of 256MB each)
91 that fall into three general categories:
94 These are also known as Non Write Pointer zones.
95 These zones can be randomly written without an unexpected performance penalty.
96 .It Sequential Preferred
97 These zones should be written sequentially starting at the write pointer
99 They may be written randomly.
100 Writes that do not conform to the zone layout may be significantly slower
102 .It Sequential Required
103 These zones must be written sequentially.
104 If they are not written sequentially, starting at the write pointer, the
109 Specify the zone subcommand:
112 Display device parameters, including the type of device (Drive Managed,
113 Host Aware, Host Managed, Not Zoned), the zone commands supported, and
114 how many open zones it supports.
116 Issue the Report Zones command.
117 All zones are returned by default.
118 Specify report options with
120 and printing options with
122 Specify the starting LBA with
126 is also accepted as a command argument.
128 Explicitly open the zone specified by the starting LBA.
130 Close the zone specified by starting LBA.
132 Finish the zone specified by the starting LBA.
134 Reset the write pointer for the zone specified by the starting LBA.
137 For the Open, Close, Finish, and Reset Write Pointer operations, apply the
138 operation to all zones on the drive.
140 Specify the starting LBA.
141 For the Report Zones command, this tells the drive to report starting with
142 the zone that starts at the given LBA.
143 For the other commands, this allows the user to identify the zone requested
145 The LBA may be specified in decimal, hexadecimal or octal notation.
147 For the Report Zones command, specify a subset of zones to report.
153 Report only empty zones.
155 Report zones that are implicitly open.
156 This means that the host has sent a write to the zone without explicitly
159 Report zones that are explicitly open.
161 Report zones that have been closed by the host.
163 Report zones that are full.
165 Report zones that are in the read only state.
168 is also accepted as an argument.
170 Report zones that are in the offline state.
172 Report zones that the device recommends should have their write pointers reset.
174 Report zones that have the Non Sequential Resources Active flag set.
175 These are zones that are Sequential Write Preferred, but have been written
178 Report Non Write Pointer zones, also known as Conventional zones.
180 .It Fl P Ar print_opt
181 Specify a printing option for Report Zones:
184 Normal Report Zones output.
186 The summary and column headings are printed, fields are separated by spaces
187 and the fields themselves may contain spaces.
189 Just print the summary: the number of zones, the maximum LBA (LBA of the
190 last logical block on the drive), and the value of the
195 field describes whether the zones on the drive are all identical, all
196 different, or whether they are the same except for the last zone, etc.
198 Print the zones in a script friendly format.
199 The summary and column headings are omitted, the fields are separated by
200 commas, and the fields do not contain spaces.
201 The fields contain underscores where spaces would normally be used.
205 .Bd -literal -offset indent
206 zonectl -d /dev/da5 -c params
209 Display basic zoning information for disk da5.
210 .Bd -literal -offset indent
211 zonectl -d /dev/da5 -c rz
214 Issue the Report Zones command to disk da5, and print out all
215 zones on the drive in the default format.
216 .Bd -literal -offset indent
217 zonectl -d /dev/da5 -c rz -o reset -P script
220 Issue the Report Zones command to disk da5, and print out all
221 of the zones that have the Reset Write Pointer Recommended bit set to true.
222 Print the zones in a script friendly form.
223 .Bd -literal -offset indent
224 zonectl -d /dev/da5 -c rwp -l 0x2c80000
227 Issue the Reset Write Pointer command to disk da5 for the zone
228 that starts at LBA 0x2c80000.
230 .An Kenneth Merry Aq ken@FreeBSD.org