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

NAME

6       sg_get_lba_status - send the SCSI GET LBA STATUS command
7

SYNOPSIS

9       sg_get_lba_status [--brief] [--help] [--hex] [--lba=LBA] [--maxlen=LEN]
10       [--raw] [--verbose] [--version] DEVICE
11

DESCRIPTION

13       Send the SCSI GET LBA STATUS command to  the  DEVICE  and  outputs  the
14       response.  This command was introduced in (draft) SBC-3 revision 20 and
15       devices that support thin provisioning should support this command.
16
17       The default action is to  decode  the  response  into  one  LBA  status
18       descriptor  per  line output to stdout. The descriptor LBA is output in
19       hex (prefixed by '0x') and the number of blocks is  output  in  decimal
20       followed by the provisioning status in decimal. The provisioning status
21       can be in the range 0 to 15 of which only 0 (mapped), 1 (unmapped)  and
22       2 (anchored) are used currently. The amount of output can be reduced by
23       the --brief option.
24

OPTIONS

26       Arguments to long options are mandatory for short options as well.
27
28       -b, --brief
29              when use once then one LBA status descriptor per line is  output
30              to  stdout.   Each  line  has  this  format: "0x<descriptor_LBA>
31              0x<blocks> <provisioning_status>". So  the  descriptor  LBA  and
32              blocks are output in hex and the provisioning status in decimal.
33              When used twice (e.g. '-bb' or '--brief --brief') the the provi‐
34              sioning status of the given LBA (or LBA 0 if the --lba option is
35              not given) is output to stdout. A check is made that  the  given
36              LBA  lies on the range of the first returned LBA status descrip‐
37              tor (as it should according to SBC-3 revision 20)  and  warnings
38              are sent to stderr if it doesn't.
39
40       -h, --help
41              output the usage message then exit.
42
43       -H, --hex
44              output response to this command in ASCII hex.
45
46       -l, --lba=LBA
47              where  LBA  is the starting Logical Block Address (LBA) to check
48              the provisioning status for. Note that the  DEVICE  chooses  how
49              many  following  blocks  that it will return provisioning status
50              for.
51
52       -m, --maxlen=LEN
53              where LEN is the (maximum)  response  length  in  bytes.  It  is
54              placed in the cdb's "allocation length" field. If not given then
55              24 is used. 24 is enough space for the response header  and  one
56              LBA  status  descriptor.   LEN should be 8 plus a multiple of 16
57              (e.g. 24, 40, and 56 are suitable).
58
59       -r, --raw
60              output response in binary (to stdout).
61
62       -v, --verbose
63              increase the level of verbosity, (i.e. debug output). Additional
64              output caused by this option is sent to stderr.
65
66       -V, --version
67              print the version string and then exit.
68

NOTES

70       For  a  discussion of thin provisioning see section 4.6.3 of sbcr22.pdf
71       at http://www.t10.org (or the corresponding section of a later draft).
72

EXIT STATUS

74       The exit status of sg_get_lba_status is 0 when it is successful. Other‐
75       wise see the sg3_utils(8) man page.
76

AUTHORS

78       Written by Douglas Gilbert.
79

REPORTING BUGS

81       Report bugs to <dgilbert at interlog dot com>.
82
84       Copyright © 2009-2010 Douglas Gilbert
85       This  software is distributed under a FreeBSD license. There is NO war‐
86       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
87       POSE.
88

SEE ALSO

90       sg_write_same(8), sg_unmap(8)
91
92
93
94sg3_utils-1.29                    March 2010              SG_GET_LBA_STATUS(8)
Impressum