1SG_LUNS(8)                         SG3_UTILS                        SG_LUNS(8)
2
3
4

NAME

6       sg_luns - send the SCSI REPORT LUNS command
7

SYNOPSIS

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

DESCRIPTION

13       Send the SCSI REPORT  LUNS  command  to  the  DEVICE  and  outputs  the
14       response. In the SPC-3 SCSI standard support for this command is manda‐
15       tory.
16

OPTIONS

18       Arguments to long options are mandatory for short options as well.
19
20       -d, --decode
21              decode logical  unit  numbers  into  their  hierarchical  parts.
22              Interprets  luns as described in SAM-3 when the HiSup bit is set
23              in a standard INQUIRY's response.
24
25       -h, --help
26              output the usage message then exit.
27
28       -H, --hex
29              output response to this command in ASCII hex.
30
31       -m, --maxlen=LEN
32              where LEN is the (maximum)  response  length  in  bytes.  It  is
33              placed  in the cdb's "allocation length" field. If not given (or
34              LEN is zero) then 8192 is used. The maximum allowed value of LEN
35              is 65536.
36
37       -q, --quiet
38              output ASCII hex rendering of each report lun, one per line.
39
40       -r, --raw
41              output response in binary (to stdout).
42
43       -s, --select=SR
44              this  option  sets  the  'select  report' field (SR) in the SCSI
45              REPORT LUNS command. The default value is 0. When 0 is given (or
46              this  option  is  not  specified) then the DEVICE should yield a
47              list of luns addressable via this "I_T nexus" that use the  fol‐
48              lowing  lun addressing methods: logical unit addressing, periph‐
49              eral device addressing and flat space  addressing.   When  1  is
50              given  the DEVICE should yield a list of only "well known" logi‐
51              cal units addressable via this "I_T" nexus. When 2 is given  the
52              DEVICE  should  yield all luns addressable via this "I_T" nexus.
53              To simplify, for the I_T nexus associated with the  DEVICE,  the
54              meanings of the SR values are:
55                0 : all luns excluding well known logical units
56                1 : well known logical units
57                2 : all luns
58              Values greater than 2 are reserved (at SPC-4 (rev 8)).
59
60       -v, --verbose
61              increase the level of verbosity, (i.e. debug output).
62
63       -V, --version
64              print the version string and then exit.
65

EXIT STATUS

67       The  exit  status  of sg_luns is 0 when it is successful. Otherwise see
68       the sg3_utils(8) man page.
69

AUTHORS

71       Written by Douglas Gilbert.
72

REPORTING BUGS

74       Report bugs to <dgilbert at interlog dot com>.
75
77       Copyright © 2004-2009 Douglas Gilbert
78       This software is distributed under a FreeBSD license. There is NO  war‐
79       ranty;  not  even  for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
80       POSE.
81

SEE ALSO

83       sg_inq(8)
84
85
86
87sg3_utils-1.28                     June 2009                        SG_LUNS(8)
Impressum