| .TH SG_ZONE "8" "December 2021" "sg3_utils\-1.48" SG3_UTILS |
| .SH NAME |
| sg_zone \- send a SCSI ZONE modifying command |
| .SH SYNOPSIS |
| .B sg_zone |
| [\fI\-\-all\fR] [\fI\-\-close\fR] [\fI\-\-count=ZC\fR] [\fI\-\-element=EID\fR] |
| [\fI\-\-finish\fR] [\fI\-\-help\fR] [\fI\-\-open\fR] [\fI\-\-remove\fR] |
| [\fI\-\-sequentialize\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] |
| [\fI\-\-zone=ID\fR] \fIDEVICE\fR |
| .SH DESCRIPTION |
| .\" Add any additional description here |
| .PP |
| Sends a SCSI OPEN ZONE, CLOSE ZONE, FINISH ZONE, REMOVE ELEMENT AND MODIFY |
| ZONES or SEQUENTIALIZE ZONE command to the \fIDEVICE\fR. All but the last |
| two are found in the ZBC standard (INCITS 536\-2016). The REMOVE ELEMENT AND |
| MODIFY ZONES command was added in zbc2r07 while the SEQUENTIALIZE ZONE command |
| was added in zbc2r01b. |
| .PP |
| One and only one of the \fI\-\-open\fR, \fI\-\-close\fR, \fI\-\-finish\fR, |
| \fI\-\-remove\fR and \fI\-\-sequentialize\fR options can be chosen. |
| .PP |
| The REPORT ZONES, REPORT REALMS and REPORT ZONE DOMAINS commands may be |
| accessed via the sg_rep_zones utility. The ZONE ACTIVATE and ZONE QUERY |
| commands may be accessed via the sg_z_act_query utility. The RESET WRITE |
| POINTER command may be accessed via the sg_reset_wp utility. |
| .SH OPTIONS |
| Arguments to long options are mandatory for short options as well. |
| .TP |
| \fB\-a\fR, \fB\-\-all\fR |
| sets the ALL field in the cdb. |
| .TP |
| \fB\-c\fR, \fB\-\-close\fR |
| causes the CLOSE ZONE command to be sent to the \fIDEVICE\fR. |
| .TP |
| \fB\-C\fR, \fB\-\-count\fR=\fIZC\fR |
| ZC is placed in the Zone Count field in the cdb of all four commands |
| supported by this utility. ZC should be a value from 0 to 65535 (0xffff) |
| inclusive. |
| .TP |
| \fB\-e\fR, \fB\-\-element\fR=\fIEID\fR |
| where \fIEID\fR is an element identifier which is a 32 bit unsigned integer |
| starting at one. This field is used by the REMOVE ELEMENT AND MODIFY ZONES |
| command and its default value is zero (which is invalid). So the user needs |
| to supply a valid element identifier when \fI\-\-remove\fR is used. |
| .TP |
| \fB\-f\fR, \fB\-\-finish\fR |
| causes the FINISH ZONE command to be sent to the \fIDEVICE\fR. |
| .TP |
| \fB\-h\fR, \fB\-\-help\fR |
| output the usage message then exit. |
| .TP |
| \fB\-o\fR, \fB\-\-open\fR |
| causes the OPEN ZONE command to be sent to the \fIDEVICE\fR. |
| .TP |
| \fB\-r\fR, \fB\-\-remove\fR |
| causes the REMOVE ELEMENT AND MODIFY ZONES command to be sent to the |
| \fIDEVICE\fR. In practice, \fI\-\-element=EID\fR needs to be also given. |
| .TP |
| \fB\-S\fR, \fB\-\-sequentialize\fR |
| causes the SEQUENTIALIZE ZONE command to be sent to the \fIDEVICE\fR. |
| .TP |
| \fB\-v\fR, \fB\-\-verbose\fR |
| increase the level of verbosity, (i.e. debug output). |
| .TP |
| \fB\-V\fR, \fB\-\-version\fR |
| print the version string and then exit. |
| .TP |
| \fB\-z\fR, \fB\-\-zone\fR=\fIID\fR |
| where \fIID\fR is placed in the cdb's ZONE ID field. A zone id is a zone |
| start logical block address (LBA). The default value is 0. \fIID\fR is |
| assumed to be in decimal unless prefixed with '0x' or has a trailing 'h' |
| which indicate hexadecimal. |
| .SH EXIT STATUS |
| The exit status of sg_zone is 0 when it is successful. Otherwise see |
| the sg3_utils(8) man page. |
| .SH AUTHORS |
| Written by Douglas Gilbert. |
| .SH "REPORTING BUGS" |
| Report bugs to <dgilbert at interlog dot com>. |
| .SH COPYRIGHT |
| Copyright \(co 2014\-2021 Douglas Gilbert |
| .br |
| This software is distributed under a FreeBSD license. There is NO |
| warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| .SH "SEE ALSO" |
| .B sg_rep_zones,sg_reset_wp,sg_z_act_query(sg3_utils) |