From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.saout.de (Postfix) with ESMTP for ; Thu, 26 Aug 2010 00:58:06 +0200 (CEST) Message-ID: <4C759FF8.5060100@redhat.com> Date: Thu, 26 Aug 2010 00:58:00 +0200 From: Milan Broz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] cryptsetup align problem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Smith Cc: dm-crypt@saout.de On 08/25/2010 11:50 PM, Peter Smith wrote: > I am trying to align a LUKS volume to 512K boundary. I calculate the > --align-payload value like this: > > (512*1024) / 512 = 1024 > > cryptsetup luksFormat --align-payload=1024 /dev/sda1 > > When i confirm the task with cryptsetup luksDump /dev/sda2 the Payload > offset is set to 2048 which is 1024K? > > What am i doing wrong? Nothing, it works as expected. It is not fixed offset but req. alignment. Using --align-payload=1024 means alignment to the nearest 512KiB boundary, because the keyslots space requires more than 512KiB it aligns to next multiple of it - i.e. 2048 sectors. If you increase key size (thus keyslots size), it will probably switch to to 3072 etc. Milan