Hi Milan, thanks for the info and links. What I do not understand is this, I will use the easiest version for now: cryptsetup luksFormat /dev/md125 And: LUKS header information for /dev/md125 Version: 1 Cipher name: aes Cipher mode: cbc-essiv:sha256 Hash spec: sha1 Payload offset: 4096 But: cat /sys/block/md125/queue/minimum_io_size 524288 cat /sys/block/md125/queue/optimal_io_size 1048576 whilst physical and logical blocksize are at 512 bytes. I don't see why cryptsetup does not end up with 1024 sectors (which is the optimal_io_size) - or is the luks header bigger than 512k? even bigger than 1 MB (2048 sectors) ? Regards -Sven On Wed, 2010-07-14 at 13:52 +0200, Milan Broz wrote: > 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 _______________________________________________ dm-crypt mailing list dm-crypt@xxxxxxxx http://www.saout.de/mailman/listinfo/dm-crypt