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
110 Specify the zone subcommand:
113 Display device parameters, including the type of device (Drive Managed,
114 Host Aware, Host Managed, Not Zoned), the zone commands supported, and
115 how many open zones it supports.
117 Issue the Report Zones command.
118 All zones are returned by default.
119 Specify report options with
121 and printing options with
123 Specify the starting LBA with
127 is also accepted as a command argument.
129 Explicitly open the zone specified by the starting LBA.
131 Close the zone specified by starting LBA.
133 Finish the zone specified by the starting LBA.
135 Reset the write pointer for the zone specified by the starting LBA.
138 For the Open, Close, Finish, and Reset Write Pointer operations, apply the
139 operation to all zones on the drive.
141 Specify the starting LBA.
142 For the Report Zones command, this tells the drive to report starting with
143 the zone that starts at the given LBA.
144 For the other commands, this allows the user to identify the zone requested
146 The LBA may be specified in decimal, hexadecimal or octal notation.
148 For the Report Zones command, specify a subset of zones to report.
154 Report only empty zones.
156 Report zones that are implicitly open.
157 This means that the host has sent a write to the zone without explicitly
160 Report zones that are explicitly open.
162 Report zones that have been closed by the host.
164 Report zones that are full.
166 Report zones that are in the read only state.
169 is also accepted as an argument.
171 Report zones that are in the offline state.
173 Report zones that the device recommends should have their write pointers reset.
175 Report zones that have the Non Sequential Resources Active flag set.
176 These are zones that are Sequential Write Preferred, but have been written
179 Report Non Write Pointer zones, also known as Conventional zones.
181 .It Fl P Ar print_opt
182 Specify a printing option for Report Zones:
185 Normal Report Zones output.
187 The summary and column headings are printed, fields are separated by spaces
188 and the fields themselves may contain spaces.
190 Just print the summary: the number of zones, the maximum LBA (LBA of the
191 last logical block on the drive), and the value of the
196 field describes whether the zones on the drive are all identical, all
197 different, or whether they are the same except for the last zone, etc.
199 Print the zones in a script friendly format.
200 The summary and column headings are omitted, the fields are separated by
201 commas, and the fields do not contain spaces.
202 The fields contain underscores where spaces would normally be used.
206 .Bd -literal -offset indent
207 zonectl -d /dev/da5 -c params
210 Display basic zoning information for disk da5.
212 .Bd -literal -offset indent
213 zonectl -d /dev/da5 -c rz
216 Issue the Report Zones command to disk da5, and print out all
217 zones on the drive in the default format.
219 .Bd -literal -offset indent
220 zonectl -d /dev/da5 -c rz -o reset -P script
223 Issue the Report Zones command to disk da5, and print out all
224 of the zones that have the Reset Write Pointer Recommended bit set to true.
225 Print the zones in a script friendly form.
227 .Bd -literal -offset indent
228 zonectl -d /dev/da5 -c rwp -l 0x2c80000
231 Issue the Reset Write Pointer command to disk da5 for the zone
232 that starts at LBA 0x2c80000.
234 .Bd -literal -offset indent
236 .An Kenneth Merry Aq ken@FreeBSD.org