All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] cryptsetup manpage: misleading/imprecise description of --size for resize
@ 2017-02-15 18:14 G.raud
  2017-02-15 19:30 ` Milan Broz
  0 siblings, 1 reply; 2+ messages in thread
From: G.raud @ 2017-02-15 18:14 UTC (permalink / raw)
  To: dm-crypt

Incriminated part of the cryptsetup manpage:

" If --size (in sectors) is not specified, the size of the
  underlying block device is used. "

In fact the size of the underlying block device is used _to compute_ the
_maximum_ size that can be made available, which in case of LUKS is not
the whole block device space.  The manpage can be misleading to someone
who doesn't know dmcrypt well and wants to resize a LUKS container.  At
least append something like "to compute the maximum available size" or
change to "the whole available space is used" for example.

The maximum size in the case of LUKS is, I think, the size of the block
device minus the offset; this could be additionaly stated in the
manpage.

Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dm-crypt] cryptsetup manpage: misleading/imprecise description of --size for resize
  2017-02-15 18:14 [dm-crypt] cryptsetup manpage: misleading/imprecise description of --size for resize G.raud
@ 2017-02-15 19:30 ` Milan Broz
  0 siblings, 0 replies; 2+ messages in thread
From: Milan Broz @ 2017-02-15 19:30 UTC (permalink / raw)
  To: G.raud, dm-crypt

On 02/15/2017 07:14 PM, G.raud wrote:
> Incriminated part of the cryptsetup manpage:
> 
> " If --size (in sectors) is not specified, the size of the
>   underlying block device is used. "
> 
> In fact the size of the underlying block device is used _to compute_ the
> _maximum_ size that can be made available, which in case of LUKS is not
> the whole block device space.  The manpage can be misleading to someone
> who doesn't know dmcrypt well and wants to resize a LUKS container.  At
> least append something like "to compute the maximum available size" or
> change to "the whole available space is used" for example.
> 
> The maximum size in the case of LUKS is, I think, the size of the block
> device minus the offset; this could be additionaly stated in the
> manpage.

I think part of this sentence in man page predates the LUKS extension :)

Yes, in LUKS it is the size of the device without the area reserved for header
(visible in luksDump as payload offset).

I changed the man page to mention that.

Thanks,
Milan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-15 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 18:14 [dm-crypt] cryptsetup manpage: misleading/imprecise description of --size for resize G.raud
2017-02-15 19:30 ` Milan Broz

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.