SG_Z_ACT_QUERY(8)
π NAME π
Okay so bestie, welcome to SG_Z_ACT_QUERY(8) from SG3_UTILS π
. This utility is literally sg_z_act_query β send a SCSI ZONE ACTIVATE or ZONE QUERY command. That's the whole vibe, no cap. β¨
β¨ SYNOPSIS β¨
sg_z_act_query [--activate] [--all] [--force] [--help] [--hex]
[--inhex=FN] [--maxlen=LEN] [--num=ZS] [--other=ZDID] [--query] [--raw]
[--verbose] [--version] [--zone=ID] DEVICE
π¦ DESCRIPTION π¦
Okay so, picture this: sg_z_act_query sends a SCSI ZONE ACTIVATE or ZONE QUERY command to DEVICE. If you don't pass --activate, it sends a ZONE QUERY command. These commands were added in the ZBC-2 draft revision 4 (zbc2r04.pdf).
Both commands have similar cdb_s and responses, which is why they're both chillin' in this one utility. The difference? Only ZONE ACTIVATE will potentially activate or deactivate zones. Both commands will perform a "Verify activations operation" as defined in ZBC-2. Periodt.
πΈ OPTIONS πΈ
Heads up, bestie: arguments to long options are mandatory for short options as well. Iykyk.
-A,--activateβ sends a ZONE ACTIVATE command to DEVICE. The default, aka when you don't give this option, is to send a ZONE QUERY command.-a,--allβ sets theALLfield in the cdb.-f,--forceβ when decoding the response, certain sanity checks are done; if they fail, a message goes tostderrand a non-zero exit status is set. Give this option and those sanity checks are bypassed.-h,--helpβ output the usage message then exit.-H,--hexβ output the response in hexadecimal to stdout. Used once: the whole response is output in ASCII hexadecimal with a leading address (starting at0) on each line. Used twice: each zone activation descriptor in the response is output separately in hexadecimal. Used thrice: the whole response is output in hexadecimal with no leading address (on each line). The output format when this option is given thrice is suitable for a later invocation with the--inhex=FNoption.-i,--inhex=FNβ FN is a file name whose contents are assumed to be ASCII hexadecimal. If DEVICE is also given then DEVICE is ignored, a warning is issued, and the utility continues, decoding the file named FN. See the "HEX, BINARY AND JSON FORMATS" section in the sg3_utils manpage for more information. If the--rawoption is also given then the contents of FN are treated as binary. By default it is assumed the response is from a ZONE QUERY command but that shouldn't matter because the response of the ZONE ACTIVATE and ZONE QUERY commands is of the same form.-m,--maxlen=LENβ LEN is the (maximum) response length in bytes. It is placed in the cdb's "allocation length" field. If not given (or LEN is zero) then8192is used. The maximum allowed value of LEN is1048576. The draft standard disallows allocation lengths less than64β periodt.-n,--num=ZSβ ZS is placed in the "Number of zones" field in the cdb. This option is usually ignored if the--alloption is given. If the--alloption is not given, the default value of this field is1.-o,--other=ZDIDβ the ZDID value will be placed in the "Other zone domain ID" field of the cdb to be sent to DEVICE.-q,--queryβ causes the ZONE QUERY command to be sent to DEVICE. Since this is the default action, this option is typically not needed. If both this option and the--activateoption are given, an error will be reported (and no command will be sent).-r,--rawβ output response in binary (to stdout) unless the--inhex=FNoption is also given. In that case the input file name (FN) is decoded as binary (and the output is _not_ in binary (but may be hex)).-v,--verboseβ increase the level of verbosity, (i.e. debug output).-V,--versionβ print the version string and then exit.-z,--zone=IDβ ID is placed in the cdb'sZONE IDfield. A zone id is a zone start logical block address (LBA). The default value is0. ID is assumed to be in decimal unless prefixed with'0x'or has a trailing'h'which indicate hexadecimal. The maximum value that can be given is2^64 - 2. In the unlikely event of wanting to give2^64 - 1, enter"-1".
π EXIT STATUS π
The exit status of sg_z_act_query is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
π AUTHORS π
Written by Douglas Gilbert.
π REPORTING BUGS π
Report bugs to <dgilbert at interlog dot com>.
β COPYRIGHT β
Copyright Β© 2021-2023 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_zone,sg_rep_zones,sg_reset_wp(sg3_utils)
xoxo, this page is from sg3_utils-1.48, dated June 2023 π«Άβ¨
π¦ where this page comes from
- arch rolling: sg3_utils 1.49-1 Β· GPL-2.0-or-later AND BSD-2-Clause
- nixpkgs unstable: sg3_utils 1.49
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms