手册页部分 1M: 系统管理命令

退出打印视图

更新时间: 2014 年 7 月
 
 

sg_luns (1m)

名称

sg_luns - send the SCSI REPORT LUNS command

用法概要

sg_luns [--decode] [--help] [--hex] [--maxlen=LEN] [--quiet]
[--raw] [--select=SR] [--verbose] [--version] DEVICE

描述




SG3_UTILS                                              SG_LUNS(8)



NAME
     sg_luns - send the SCSI REPORT LUNS command

SYNOPSIS
     sg_luns [--decode] [--help] [--hex] [--maxlen=LEN] [--quiet]
     [--raw] [--select=SR] [--verbose] [--version] DEVICE

DESCRIPTION
     Send the SCSI REPORT LUNS command to the DEVICE and  outputs
     the  response.  In  the SPC-3 SCSI standard support for this
     command is mandatory.

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

     -d, --decode
          decode  logical  unit  numbers  into their hierarchical
          parts. Interprets luns as described in SAM-3  when  the
          HiSup bit is set in a standard INQUIRY's response.

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

     -H, --hex
          output response to this command in ASCII hex.

     -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 maxi-
          mum allowed value of LEN is 65536.

     -q, --quiet
          output ASCII hex rendering of each report lun, one  per
          line.

     -r, --raw
          output response in binary (to stdout).

     -s, --select=SR
          this  option sets the 'select report' field (SR) in the
          SCSI REPORT LUNS command. The default value is 0.  When
          0  is  given (or this option is not specified) then the
          DEVICE should yield a list of luns addressable via this
          "I_T nexus" that use the following lun addressing meth-
          ods:  logical  unit   addressing,   peripheral   device
          addressing  and flat space addressing.  When 1 is given
          the DEVICE should yield a list  of  only  "well  known"
          logical  units addressable via this "I_T" nexus. When 2
          is given the DEVICE should yield all  luns  addressable
          via  this  "I_T" nexus.  To simplify, for the I_T nexus



sg3_utils-1.33       Last change: August 2011                   1






SG3_UTILS                                              SG_LUNS(8)



          associated with the DEVICE, the meanings of the SR val-
          ues are:
            0 : all luns excluding well known logical units
            1 : well known logical units
            2 : all luns
          Values  between  0xf8  and  0xff (inclusive) are vendor
          specific (SPC-4 (rev 32), other values greater  than  2
          are reserved.

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

     -V, --version
          print the version string and then exit.

EXIT STATUS
     The  exit status of sg_luns is 0 when it is successful. Oth-
     erwise 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) 2004-2011 Douglas Gilbert
     This software is distributed under a FreeBSD license.  There
     is  NO warranty; not even for MERCHANTABILITY or FITNESS FOR
     A PARTICULAR PURPOSE.


ATTRIBUTES
     See  attributes(5)  for  descriptions   of   the   following
     attributes:

     +---------------+--------------------------+
     |ATTRIBUTE TYPE |     ATTRIBUTE VALUE      |
     +---------------+--------------------------+
     |Availability   | system/storage/sg3_utils |
     +---------------+--------------------------+
     |Stability      | Uncommitted              |
     +---------------+--------------------------+
SEE ALSO
     sg_inq(8)



NOTES
     This   software   was   built   from   source  available  at
     https://java.net/projects/solaris-userland.   The   original
     community       source       was       downloaded       from



sg3_utils-1.33       Last change: August 2011                   2






SG3_UTILS                                              SG_LUNS(8)



     http://sg.danny.cz/sg/p/sg3_utils-1.33.tgz

     Further information about this software can be found on  the
     open        source        community        website        at
     http://sg.danny.cz/sg/sg3_utils.html.


















































sg3_utils-1.33       Last change: August 2011                   3