From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XPRchEY31aiN for ; Sun, 2 Feb 2014 01:18:21 +0100 (CET) Received: from v6.tansi.org (ns.km31936-01.keymachine.de [87.118.116.4]) by mail.saout.de (Postfix) with ESMTP for ; Sun, 2 Feb 2014 01:18:21 +0100 (CET) Received: from gatewagner.dyndns.org (77-57-44-24.dclient.hispeed.ch [77.57.44.24]) by v6.tansi.org (Postfix) with ESMTPA id D168520DC239 for ; Sun, 2 Feb 2014 01:18:20 +0100 (CET) Date: Sun, 2 Feb 2014 01:18:19 +0100 From: Arno Wagner Message-ID: <20140202001819.GA8664@tansi.org> References: <52ED5E0B.3090300@mthode.org> <20140201213444.GA6778@tansi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dm-crypt] cryptsetup luksFormat with the size option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On Sun, Feb 02, 2014 at 00:33:27 CET, Robert Nichols wrote: > On 02/01/2014 03:34 PM, Arno Wagner wrote: > >On Sat, Feb 01, 2014 at 21:50:19 CET, Matthew Thode wrote: > >>Am I correct in stating that setting --size=8 will make the sectors 4k > >>in size? Also, how can I check what existing luks volumes are set to? > >> > >>-- > >>-- Matthew Thode > >> > > > >No, you are not. As the man-page clearly states, this sets the > >size of the underlying device as multiple of 512B sectors. > > I submit that for the luksFormat action, the --size option does _nothing_! Yes. Nor should it. See the man-page: --size, -b Force the size of the underlying device in sectors of 512 bytes. This option is only relevant for the open and resize actions. ^^^^ ^^^^^^ I do not see why this is apparently a surprise to some.... > The size is not recorded in the LUKS header, and luksFormat does not open > the encrypted device, so there is neither a temporary nor a persistent > effect from that option. In fact, there is not even a check that the > requested size is within the limits of the underlying device. And why should there be? The underlying device could change. Or the kernel could change and with it the limits. Really, this is KISS at work. Watch and learn. Arno -- Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718 ---- A good decision is based on knowledge and not on numbers. - Plato