SCSI READ CAPACITY
SCSI READ CAPACITY reports a block device's logical addressing range and block length through a 10-byte or 16-byte command descriptor block.
For a complete zero-based range, the block count is last LBA + 1; multiplying by logical block length gives addressable bytes, not filesystem free space. READ CAPACITY(10) returning FFFFFFFFh requires the 16-byte form to resolve capacity. [1]
READ CAPACITY(16) adds protection, provisioning and logical-to-physical block information. Reported logical block length counts user bytes, excluding protection information and on-medium ECC. [2]
On zoned devices, RC_BASIS qualifies the returned address. Code 00b covers the initial contiguous zone range without sequential-write-required zones; 01b identifies the logical unit's final LBA. [2]
In sg3_utils v1.48, sg_readcap --brief prints hexadecimal values and its first value is already a block count. Do not add one again: 0x3e8 0x200 represents 1,000 blocks of 512 bytes, or 512,000 bytes. [1]
Relations
- related
- SCSI, SCSI logical unit (LU), Command descriptor block (CDB), Logical sector, Physical sector, SCSI LBPRZ, SCSI GET LBA STATUS
Citations
- sg3_utils v1.48: sg_readcap(8), description, brief/long options and ZBC field
- Seagate SCSI Commands Reference Manual, Rev. L (2020), sections 3.24-3.25 and Table 135
Sources & caveats
- Source review of Seagate Rev. L and sg3_utils v1.48; no device commands or hardware measurements. The arithmetic assumes a complete zero-based range, not obsolete partial-medium queries.