From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tansi.org (ns.km10532-04.keymachine.de [87.118.102.195]) by mail.saout.de (Postfix) with ESMTP for ; Wed, 14 Jul 2010 14:13:47 +0200 (CEST) Received: from gatewagner.dyndns.org (84-74-164-239.dclient.hispeed.ch [84.74.164.239]) by tansi.org (Postfix) with ESMTPA id 95EC72128007 for ; Wed, 14 Jul 2010 14:13:47 +0200 (CEST) Date: Wed, 14 Jul 2010 14:13:46 +0200 From: Arno Wagner Message-ID: <20100714121346.GA19846@tansi.org> References: <1279054281.867.5.camel@Koma-Station.localdomain> <4C3CD6C8.6020303@redhat.com> <1279059451.867.23.camel@Koma-Station.localdomain> <4C3D6E0D.6020802@redhat.com> <1279107557.2415.3.camel@Koma-Station.localdomain> <4C3DA515.4030909@redhat.com> <1279109239.2415.10.camel@Koma-Station.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1279109239.2415.10.camel@Koma-Station.localdomain> Subject: Re: [dm-crypt] Wrong behavior? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de The LUKS header is 1'052'672 bytes with default parameters. See FAQ Item "What does the on-disk structure of LUKS look like?" in section 5. Arno On Wed, Jul 14, 2010 at 02:07:19PM +0200, Sven Eschenberg wrote: > 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//alignment_offset > > /sys/block///alignment_offset > > /sys/block//queue/physical_block_size > > /sys/block//queue/logical_block_size > > /sys/block//queue/minimum_io_size > > /sys/block//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@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt > -- Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F ---- Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans If it's in the news, don't worry about it. The very definition of "news" is "something that hardly ever happens." -- Bruce Schneier