Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
SG_Z_ACT_QUERY(8)		    SG3_UTILS		       SG_Z_ACT_QUERY(8)

NAME
     sg_z_act_query - send a SCSI ZONE ACTIVATE or ZONE QUERY command

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
     Sends a SCSI ZONE ACTIVATE or ZONE QUERY command  to  the	DEVICE.  If  the
     --activate  option  is not given, then a ZONE QUERY command is sent.  These
     commands were added in the ZBC-2 draft revision 4 (zbc2r04.pdf).

     Both of these commands have similar cdb_s and responses hence they are both
     placed in this utility. The difference is that only the ZONE ACTIVATE  com-
     mand will potentially activate or deactivate zones. Both commands will per-
     form a "Verify activations operation" as defined in ZBC-2 .

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

     -A, --activate
	    sends a ZONE ACTIVATE command to the DEVICE. The default (i.e. with-
	    out this option) is to send a ZONE QUERY command.

     -a, --all
	    sets the ALL field in the cdb.

     -f, --force
	    when  decoding  the  response to this command, certain sanity checks
	    are done and if they fail a message is sent to stderr and a non-zero
	    exit status is set. If this option is given those sanity checks  are
	    bypassed.

     -h, --help
	    output the usage message then exit.

     -H, --hex
	    output  the  response  in  hexadecimal to stdout. When used once the
	    whole response is output in ASCII hexadecimal with a leading address
	    (starting at 0) on each line. When used twice each	zone  activation
	    descriptor in the response is output separately in hexadecimal. When
	    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=FN option.

     -i, --inhex=FN
	    where FN is a file name whose contents are assumed to be ASCII hexa-
	    decimal. 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 --raw option 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
	    where 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)
	    then 8192 is used. The maximum allowed value of LEN is 1048576.
	    The draft standard disallows allocation lengths less than 64.

     -n, --num=ZS
	    where ZS is placed in the "Number of zones" field in the  cdb.  This
	    option is usually ignored if the --all option is given. If the --all
	    option is not given, the default value of this field is 1 .

     -o, --other=ZDID
	    where  the	ZDID  value will be placed in the "Other zone domain ID"
	    field of the cdb to be sent to the DEVICE.

     -q, --query
	    causes the ZONE QUERY command to be sent to the DEVICE.  Since  this
	    is	the default action, this option is typically not needed. If both
	    this option and the --activate option are given, an  error	will  be
	    reported (and no command will be sent).

     -r, --raw
	    output  response  in binary (to stdout) unless the --inhex=FN option
	    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
	    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 as-
	    sumed to be in decimal unless prefixed with '0x' or has  a	trailing
	    'h'  which indicate hexadecimal. The maximum value that can be given
	    is 2^64 - 2. In the unlikely event of wanting to give 2^64 - 1,  en-
	    ter "-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 (C) 2021-2023 Douglas Gilbert
     This software is distributed under a BSD-2-Clause license. There is NO war-
     ranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO
     sg_zone,sg_rep_zones,sg_reset_wp(sg3_utils)

sg3_utils-1.48			    June 2023		       SG_Z_ACT_QUERY(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=sg_z_act_query&sektion=8&manpath=FreeBSD+Ports+15.1.quarterly>

home | help