---
name: "sg_zone"
section: "8"
platform: "linux"
package: "sg3_utils"
version: "1.49-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/sg_zone"
---

# sg\_zone(8)

send a SCSI ZONE modifying command

## NAME

sg\_zone - send a SCSI ZONE modifying command

## SYNOPSIS

**sg\_zone** \[*--all*\] \[*--close*\] \[*--count=ZC*\] \[*--element=EID*\] \[*--finish*\] \[*--help*\] \[*--open*\] \[*--remove*\] \[*--sequentialize*\] \[*--timeout=SE*\] \[*--verbose*\] \[*--version*\] \[*--zone=ID*\] *DEVICE*

## DESCRIPTION

Sends a SCSI OPEN ZONE, CLOSE ZONE, FINISH ZONE, REMOVE ELEMENT AND MODIFY ZONES or SEQUENTIALIZE ZONE command to the *DEVICE*. 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.

One and only one of the *--open*, *--close*, *--finish*, *--remove* and *--sequentialize* options can be chosen.

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.

## OPTIONS

Arguments to long options are mandatory for short options as well.

- **-a**, **--all**

  sets the ALL field in the cdb.

- **-c**, **--close**

  causes the CLOSE ZONE command to be sent to the *DEVICE*.

- **-C**, **--count**=*ZC*

  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.

- **-e**, **--element**=*EID*

  where *EID* 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 *--remove* is used.

- **-f**, **--finish**

  causes the FINISH ZONE command to be sent to the *DEVICE*.

- **-h**, **--help**

  output the usage message then exit.

- **-o**, **--open**

  causes the OPEN ZONE command to be sent to the *DEVICE*.

- **-r**, **--remove**

  causes the REMOVE ELEMENT AND MODIFY ZONES command to be sent to the *DEVICE*. In practice, *--element=EID* needs to be also given.

- **-S**, **--sequentialize**

  causes the SEQUENTIALIZE ZONE command to be sent to the *DEVICE*.

- **-t**, **--timeout**=*SE*

  where *SE* is the command timeout in seconds. The default is 60 seconds and if 0 is given, it is mapped to 60. An alternate form is *--tmo=SE*.

- **-v**, **--verbose**

  increase the level of verbosity, (i.e. debug output).

- **-V**, **--version**

  print the version string and then exit.

- **-z**, **--zone**=*ID*

  where *ID* 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. *ID* is assumed to be in decimal unless prefixed with '0x' or has a trailing 'h' which indicate hexadecimal.

## NOTES

After a REMOVE ELEMENT AND MODIFY ZONES command has completed, the element in question is said to be depopulated and any affected zones are placed in the 'offline' zone condition.

SBC-4 has a similar command to REMOVE ELEMENT AND MODIFY ZONES called REMOVE ELEMENT AND TRUNCATE. The difference is that the latter "changes the association between LBAs and physical blocks" and the former does not change that association. In both cases, depopulated elements that have the 'Restoration Allowed' (RALWD) bit set (see sg\_get\_elem\_status) may be restored with the RESTORE ELEMENTS AND REBUILD command, see the sg\_rem\_rest\_elem utility. The sg\_rem\_rest\_elem utility can also issue the REMOVE ELEMENT AND MODIFY ZONES command with its *--modify* option.

## EXIT STATUS

The exit status of sg\_zone is 0 when it is successful. Otherwise see the [sg3\_utils(8)](/sg3_utils/8.md) man page.

## AUTHORS

Written by Douglas Gilbert.

## REPORTING BUGS

Report bugs to \<dgilbert at interlog dot com\>.

## COPYRIGHT

Copyright © 2014-2026 Douglas Gilbert\
 This software is distributed under a BSD-2-Clause license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

## SEE ALSO

**sg\_rem\_rest\_elem,sg\_rep\_zones,sg\_reset\_wp,sg\_z\_act\_query(sg3\_utils)**
