22.2. Userspace Access
logical_block_sizeboundary, and in multiples of the
logical_block_sizeis 4K) it is now critical that applications perform direct I/O in multiples of the device's
logical_block_size. This means that applications will fail with native 4k devices that perform 512-byte aligned I/O rather than 4k-aligned I/O.
sysfsand block device
man libblkid. This
manpage is provided by the
NoteThe file location depends on whether the disk is a physical disk (be that a local disk, local RAID, or a multipath LUN) or a virutal disk. The first file location is applicable to physical disks while the second file location is applicable to virtual disks. The reason for this is because virtio-blk will always report an alignment value for the partition. Physical disks may or may not report an alignment value.
sysfsattributes for "legacy" devices that do not provide I/O parameters information, for example:
alignment_offset: 0 physical_block_size: 512 logical_block_size: 512 minimum_io_size: 512 optimal_io_size: 0