cryptsetup manpage: misleading/imprecise description of --size for resize
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
Quoted 12 lines · G.raud
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
_tocompute_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.
Quoted 3 lines
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