1SG_REP_ZONES(8)                    SG3_UTILS                   SG_REP_ZONES(8)
2
3
4

NAME

6       sg_rep_zones - send SCSI REPORT ZONES command
7

SYNOPSIS

9       sg_rep_zones  [--help]  [--hex]  [--maxlen=LEN] [--num=NUM] [--partial]
10       [--raw] [--readonly] [--report=OPT] [--start=LBA]  [--verbose]  [--ver‐
11       sion] [--wp] DEVICE
12

DESCRIPTION

14       Sends  a  SCSI  REPORT ZONES command to DEVICE and outputs the data re‐
15       turned. This command is found in the ZBC  draft  standard,  revision  5
16       (zbc-r05.pdf).
17

OPTIONS

19       Arguments to long options are mandatory for short options as well.
20
21       -h, --help
22              output the usage message then exit.
23
24       -H, --hex
25              output the response in hexadecimal to stdout. When used once the
26              whole response is output in ASCII hexadecimal with a leading ad‐
27              dress  (starting  at  0) on each line. When used twice each zone
28              descriptor in the response is output separately in  hexadecimal.
29              When  used  thrice  the  whole response is output in hexadecimal
30              with no leading address (on each line).
31
32       -m, --maxlen=LEN
33              where LEN is the (maximum)  response  length  in  bytes.  It  is
34              placed  in the cdb's "allocation length" field. If not given (or
35              LEN is zero) then 8192 is used. The maximum allowed value of LEN
36              is 1048576.
37
38       -n, --num=NUM
39              where  NUM  is the (maximum) number of zone descriptors to print
40              out.  The default value is zero which is taken to mean print out
41              all zone descriptors returned by the REPORT ZONES command.
42
43       -p, --partial
44              set the PARTIAL bit in the cdb.
45
46       -r, --raw
47              output  the  SCSI  response (i.e. the data-out buffer) in binary
48              (to stdout).
49
50       -R, --readonly
51              open the DEVICE read-only (e.g. in Unix with the O_RDONLY flag).
52              The default is to open it read-write.
53
54       -o, --report=OPT
55              where OPT will become the contents of the REPORTING OPTION field
56              in the cdb. The default value is 0 which means report a list  of
57              all  zones.   Some other values are 1 for list zones with a zone
58              condition of empty; 2 for list zones with a  zone  condition  of
59              implicitly opened; 3 for list zones with a zone condition of ex‐
60              plicitly opened; 4 for list  zones  with  a  zone  condition  of
61              closed;  5  for  list zones with a zone condition of full; 6 for
62              list zones with a zone condition of read only; 7 for list  zones
63              with a zone condition of offline. Other values are 0x10 for list
64              zones with RWP recommended set to true; 0x11 for list zones with
65              non-sequential  write  resource  active set to true and 0x3f for
66              list zones with a zone condition of not write pointer.
67
68       -s, --start=LBA
69              where LBA is at the start or within the first  zone  to  be  re‐
70              ported.  The  default value is 0. If LBA is not a zone start LBA
71              then the preceding zone start LBA is used for reporting. Assumed
72              to be in decimal unless prefixed with '0x' or has a trailing 'h'
73              which indicate hexadecimal.
74
75       -v, --verbose
76              increase the level of verbosity, (i.e. debug output).
77
78       -V, --version
79              print the version string and then exit.
80
81       -w, --wp
82              print the write pointer (in hex) only. In the absence of errors,
83              then  a  hex LBA will be printed on each line, one line for each
84              zone.  Can  be  usefully  combined  with   the   --num=NUM   and
85              --start=LBA options.
86

EXIT STATUS

88       The  exit  status of sg_rep_zones is 0 when it is successful. Otherwise
89       see the sg3_utils(8) man page.
90

AUTHORS

92       Written by Douglas Gilbert.
93

REPORTING BUGS

95       Report bugs to <dgilbert at interlog dot com>.
96
98       Copyright © 2014-2021 Douglas Gilbert
99       This software is distributed under a FreeBSD license. There is NO  war‐
100       ranty;  not  even  for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
101       POSE.
102

SEE ALSO

104       sg_reset_wp,sg_zone(sg3_utils)
105
106
107
108sg3_utils-1.46                    March 2021                   SG_REP_ZONES(8)
Impressum