* [dm-crypt] cryptsetup luksFormat with the size option
@ 2014-02-01 20:50 Matthew Thode
2014-02-01 21:34 ` Arno Wagner
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Thode @ 2014-02-01 20:50 UTC (permalink / raw)
To: dm-crypt
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dm-crypt] cryptsetup luksFormat with the size option
2014-02-01 20:50 [dm-crypt] cryptsetup luksFormat with the size option Matthew Thode
@ 2014-02-01 21:34 ` Arno Wagner
2014-02-01 23:33 ` Robert Nichols
0 siblings, 1 reply; 5+ messages in thread
From: Arno Wagner @ 2014-02-01 21:34 UTC (permalink / raw)
To: dm-crypt
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.
As item 2.17 of the FAQ states, LUKS does not have any issue
with 4k sectors, as it does not split or re-arrange requests.
I would strongly advise to read the documentation before
trying to set up a LUKS volume. There are a number of less
obvious pitfalls.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dm-crypt] cryptsetup luksFormat with the size option
2014-02-01 21:34 ` Arno Wagner
@ 2014-02-01 23:33 ` Robert Nichols
2014-02-02 0:18 ` Arno Wagner
0 siblings, 1 reply; 5+ messages in thread
From: Robert Nichols @ 2014-02-01 23:33 UTC (permalink / raw)
To: dm-crypt
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_!
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.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dm-crypt] cryptsetup luksFormat with the size option
2014-02-01 23:33 ` Robert Nichols
@ 2014-02-02 0:18 ` Arno Wagner
2014-02-02 0:35 ` Robert Nichols
0 siblings, 1 reply; 5+ messages in thread
From: Arno Wagner @ 2014-02-02 0:18 UTC (permalink / raw)
To: dm-crypt
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 <number of 512 byte sectors>
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dm-crypt] cryptsetup luksFormat with the size option
2014-02-02 0:18 ` Arno Wagner
@ 2014-02-02 0:35 ` Robert Nichols
0 siblings, 0 replies; 5+ messages in thread
From: Robert Nichols @ 2014-02-02 0:35 UTC (permalink / raw)
To: dm-crypt
On 02/01/2014 06:18 PM, Arno Wagner wrote:
> 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 <number of 512 byte sectors>
> 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....
I was just pointing it out in the context of this thread, where it was
not previously mentioned as meaningless.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-02 0:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-01 20:50 [dm-crypt] cryptsetup luksFormat with the size option Matthew Thode
2014-02-01 21:34 ` Arno Wagner
2014-02-01 23:33 ` Robert Nichols
2014-02-02 0:18 ` Arno Wagner
2014-02-02 0:35 ` Robert Nichols
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.