1SG_REP_ZONES(8) SG3_UTILS SG_REP_ZONES(8)
2
3
4
6 sg_rep_zones - send SCSI REPORT ZONES command
7
9 sg_rep_zones [--help] [--hex] [--maxlen=LEN] [--raw] [--readonly]
10 [--report=OPT] [--start=LBA] [--verbose] [--version] DEVICE
11
13 Sends a SCSI REPORT ZONES command to DEVICE and outputs the data
14 returned. This command is found in the ZBC draft standard, revision 4c
15 (zbc-r04c.pdf).
16
18 Arguments to long options are mandatory for short options as well.
19
20 -h, --help
21 output the usage message then exit.
22
23 -H, --hex
24 output the response in hexadecimal to stdout. When used once the
25 whole response is output in ASCII hexadecimal with a leading
26 address (starting at 0) on each line. When used twice each zone
27 descriptor in the response is output separately in hexadecimal.
28 When used thrice the whole response is output in hexadecimal
29 with no leading address (on each line).
30
31 -m, --maxlen=LEN
32 where LEN is the (maximum) response length in bytes. It is
33 placed in the cdb's "allocation length" field. If not given (or
34 LEN is zero) then 8192 is used. The maximum allowed value of LEN
35 is 1048576.
36
37 -p, --partial
38 set the PARTIAL bit in the cdb.
39
40 -r, --raw
41 output the SCSI response (i.e. the data-out buffer) in binary
42 (to stdout).
43
44 -R, --readonly
45 open the DEVICE read-only (e.g. in Unix with the O_RDONLY flag).
46 The default is to open it read-write.
47
48 -o, --report=OPT
49 where OPT will become the contents of the REPORTING OPTION field
50 in the cdb. The default value is 0 which means report a list of
51 all zones. Some other values are 1 for list zones with a zone
52 condition of empty; 2 for list zones with a zone condition of
53 implicitly opened; 3 for list zones with a zone condition of
54 explicitly opened; 4 for list zones with a zone condition of
55 closed; 5 for list zones with a zone condition of full; 6 for
56 list zones with a zone condition of read only; 7 for list zones
57 with a zone condition of offline. Other values are 0x10 for list
58 zones with RWP recommended set to true; 0x11 for list zones with
59 non-sequential write resource active set to true and 0x3f for
60 list zones with a zone condition of not write pointer.
61
62 -s, --start=LBA
63 where LBA is at the start or within the first zone to be
64 reported. The default value is 0. If LBA is not a zone start LBA
65 then the preceding zone start LBA is used for reporting. Assumed
66 to be in decimal unless prefixed with '0x' or has a trailing 'h'
67 which indicate hexadecimal.
68
69 -v, --verbose
70 increase the level of verbosity, (i.e. debug output).
71
72 -V, --version
73 print the version string and then exit.
74
76 The exit status of sg_rep_zones is 0 when it is successful. Otherwise
77 see the sg3_utils(8) man page.
78
80 Written by Douglas Gilbert.
81
83 Report bugs to <dgilbert at interlog dot com>.
84
86 Copyright © 2014-2016 Douglas Gilbert
87 This software is distributed under a FreeBSD license. There is NO war‐
88 ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
89 POSE.
90
92 sg_reset_wp,sg_zone(sg3_utils)
93
94
95
96sg3_utils-1.42 February 2016 SG_REP_ZONES(8)