Installation guide
ATA
111
ATA
ATA devices must report appropriate information via the IDENTIFY DEVICE command. ATA
devices only report I/O parameters for physical_block_size, logical_block_size, and
alignment_offset. The additional I/O hints are outside the scope of the ATA Command Set.
SCSI
I/O parameters support in Red Hat Enterprise Linux 6 requires at least version 3 of the SCSI Primary
Commands (SPC-3) protocol. The kernel will only send an extended inquiry (which gains access to the
BLOCK LIMITS VPD page) and READ CAPACITY(16) command to devices which claim compliance
with SPC-3.
The READ CAPACITY(16) command provides the block sizes and alignment offset:
• LOGICAL BLOCK LENGTH IN BYTES is used to derive /sys/block/disk/queue/
physical_block_size
• LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT is used to derive /sys/block/disk/
queue/logical_block_size
• LOWEST ALIGNED LOGICAL BLOCK ADDRESS is used to derive:
• /sys/block/disk/alignment_offset
• /sys/block/disk/partition/alignment_offset
The BLOCK LIMITS VPD page (0xb0) provides the I/O hints. It also uses OPTIMAL TRANSFER
LENGTH GRANULARITY and OPTIMAL TRANSFER LENGTH to derive:
• /sys/block/disk/queue/minimum_io_size
• /sys/block/disk/queue/optimal_io_size
The sg3_utils package provides the sg_inq utility, which can be used to access the BLOCK
LIMITS VPD page. To do so, run:
sg_inq -p 0xb0 disk
18.4. Stacking I/O Parameters
All layers of the Linux I/O stack have been engineered to propagate the various I/O parameters up
the stack. When a layer consumes an attribute or aggregates many devices, the layer must expose
appropriate I/O parameters so that upper-layer devices or tools will have an accurate view of the
storage as it transformed. Some practical examples are:
• Only one layer in the I/O stack should adjust for a non-zero alignment_offset; once a layer
adjusts accordingly, it will export a device with an alignment_offset of zero.
• A striped Device Mapper (DM) device created with LVM must export a minimum_io_size and
optimal_io_size relative to the stripe count (number of disks) and user-provided chunk size.
In Red Hat Enterprise Linux 6, Device Mapper and Software Raid (MD) device drivers can be used
to arbitrarily combine devices with different I/O parameters. The kernel's block layer will attempt
to reasonably combine the I/O parameters of the individual devices. The kernel will not prevent
combining heterogenuous devices; however, be aware of the risks associated with doing so.