[dm-crypt] Wrong behavior?

Milan Broz mbroz at redhat.com
Wed Jul 14 13:52:53 CEST 2010


On 07/14/2010 01:39 PM, Sven Eschenberg wrote:

> Is there any 'easy' way to access this information. specifically I am
> interested, why md would report a 6144 sectors alignment on my 4 disk
> raid5 with 512 kb chunks instead of 3072.

Values are in in sysfs also, I am just using topology ioctl which is simpler.

sysfs interface
---------------
/sys/block/<disk>/alignment_offset
/sys/block/<disk>/<partition>/alignment_offset
/sys/block/<disk>/queue/physical_block_size
/sys/block/<disk>/queue/logical_block_size
/sys/block/<disk>/queue/minimum_io_size
/sys/block/<disk>/queue/optimal_io_size

cryptsetup uses minimal/optimal io_size and alignment value
to calculate payload offset.

A lot of info here:

http://people.redhat.com/msnitzer/docs/io-limits.txt
https://ata.wiki.kernel.org/index.php/ATA_4_KiB_sector_issues

Milan


More information about the dm-crypt mailing list