All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Anton Mitterer <calestyo@scientia.net>
To: dm-crypt@saout.de
Subject: [dm-crypt] some questions and FAQ suggestions
Date: Sun, 07 Jul 2013 22:30:44 +0200	[thread overview]
Message-ID: <1373229044.5246.167.camel@fermat.scientia.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 3692 bytes --]

Hi Arno, Milan, et al.


I recently asked some questions[0],[1] over at the linux-raid list and
some of them were about how things are when one stacks the typical DM
layers (MD, dmcrypt, LVM) in different order, I guess most reasonable
use cases would be either of these:
physical medium -> MD -> LVM -> dmcrypt        -> filesytem
physical medium -> MD        -> dmcrypt -> LVM -> filesytem
or maybe even:
physical medium -> MD -> LVM -> dmcrypt -> LVM -> filesytem

Optionally having partitions in between phyiscal medium and MD - but I
guess this shouldn't really change anything (correct me if I'm wrong),
neither with respect to performance, nor with respect to functionality
(i.e. how commands or techniques like TRIM, or barriers are passed
through).


Some discussion (especially about performance) with respect to the (old)
fact that dmcrypt was single-threaded arose in [1].
I asked Milan off list to share some light which he did[2,3] (thanks
again).


I think most of what he says should be added to the FAQ, for people that
also search on this (perhaps referring those threads as well), like:

Q1: Does dmcrypt work with DM/block device barriers and filesystem
barriers?
(AFAIU, these are different barrier technologies?)


Q2: Are there any technological/functional/security issues when stacking
dmcrypt with LVM and/or MD (at any order of these)?
I.e. is TRIM supported in any stacking order? Are there any other
subtle/major issues depending on the ordering of these? Or issues that
could lead to data corruption or out-of-sync RAIDs, whatsoever.


Q3: Are there any performance issues when stacking dmcrypt with LVM
and/or MD (at any order of these), assuming that the different layers
have the correct block/chunk/phsical extent alignment?
(not sure whether, if unaligned to physical extents from LVM, would
actually cause troubles or not?)

There probably noting the thing about single/multi-threaded and that MD
makes IO from one CPU, so that MD should always be below dmcrypt (for
performance reasons at least).



Milan noted that one should also tell how things were before these
patches... I'd say it should be at least noted that this changed at one
point... whether the situation before needs to described in-depth, I
have no strong opinion.




There are some questions of my MD questions I haven't yet gotten any
real answers (especially how MD actually reads/writes data/parity
blocks, i.e. how much is at least always FULLY read/written)... and I'd
have basically the same question for dm-crypt (and I think it's not yet
in the FAQ).
So IMHO answering the following would be interesting:

Q4: Depending on the chosen cipher/size/modes, which there a minimum
block size that dmcrypt always fully reads/writes?

I always though that this is _always_ (even if you have 4KiB blocks
below or so) the 512B... which are fully read/written (respectively
decrypted/encrypted), right?

Milan, I saw [4], which AFAIU means that we may sooner or later get
block sizes > 512B.
So the question might arise how large block sizes would affect
interaction (especially performance) with the other layers like MD (i.e.
would it be a problem if the dmcrypt block size is larger than the
smalles block size that MD always fully/reads writes... when either is
on top of the other).



Cheers,
Chris.


[0] http://thread.gmane.org/gmane.linux.raid/43405
[1] http://thread.gmane.org/gmane.linux.raid/43406
[2] http://thread.gmane.org/gmane.linux.raid/43406/focus=43450
[3] http://thread.gmane.org/gmane.linux.raid/43406/focus=43452
[4] http://code.google.com/p/cryptsetup/issues/detail?id=156

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5113 bytes --]

             reply	other threads:[~2013-07-07 20:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-07 20:30 Christoph Anton Mitterer [this message]
2013-07-07 20:33 ` [dm-crypt] some questions and FAQ suggestions Christoph Anton Mitterer
2013-07-08 17:48 ` Arno Wagner
2013-07-08 20:41   ` Christoph Anton Mitterer
2013-07-09  3:33     ` Arno Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373229044.5246.167.camel@fermat.scientia.net \
    --to=calestyo@scientia.net \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.