sg_get_lba_status
send SCSI GET LBA STATUS command
- Provided by: sg3-utils (Version: 1.40-0ubuntu1)
- Report a bug
send SCSI GET LBA STATUS command
sg_get_lba_status [--brief] [--help] [--hex] [--lba=LBA] [--maxlen=LEN] [--raw] [--readonly] [--verbose] [--version] DEVICE
Send the SCSI GET LBA STATUS command to the DEVICE and outputs the response. This command was introduced in (draft) SBC-3 revision 20 and devices that support logical block provisioning should support this command.
The default action is to decode the response into one LBA status descriptor per line output to stdout. The descriptor LBA is output in hex (prefixed by '0x') and the number of blocks is output in decimal followed by the provisioning status in decimal. The provisioning status can be in the range 0 to 15 of which only 0 (mapped), 1 (unmapped) and 2 (anchored) are used currently. The amount of output can be reduced by the --brief option.
Arguments to long options are mandatory for short options as well.
In SBC-3 revision 25 the calculation associated with the Parameter Data Length field in the response was modified. Prior to that the byte offset was 8 and in revision 25 it was changed to 4.
For a discussion of logical block provisioning see section 4.7 of sbc3r29.pdf at http://www.t10.org (or the corresponding section of a later draft).
The exit status of sg_get_lba_status is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
Written by Douglas Gilbert.
Report bugs to <dgilbert at interlog dot com>.
Copyright © 2009-2014 Douglas Gilbert
This software is distributed under a FreeBSD license. There is NO warranty;
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.