From: Milan Broz <mbroz@redhat.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] LUKS in failover cluster
Date: Sat, 08 Oct 2011 09:50:51 +0200 [thread overview]
Message-ID: <4E9000DB.4000308@redhat.com> (raw)
In-Reply-To: <20111008045232.GB23870@tansi.org>
On 10/08/2011 06:52 AM, Arno Wagner wrote:
>> Also, scalability is a requirement in my design, hence XFS. I was
>> thinking I needed to use multiple LUKS PVs in LVM to grow the
>> filesystem. But I would end up with multiple LUKS devices to keep track
>> of. I recently found out that LUKS can resize.
>
> LUKS _cannot_ resize. The thing is that LUKS does not care about
> device size. So if you enlarge a device/partition with an intact
> LUKS header, "cryptsetup luksOpen" will just map the larger
> device.
yes, but crytsetup resize is designed that it it supports open
(active) LUKS containers. You do not need to activate/deactivate,
resize operation is enough.
> If you have multiple devices, you can "slave" the additional ones
> to a "master" device using something like "decrypt_derived".
> This just takes the master key from the opened "master" container,
> runns it though a hash and uses this as key for the "slave"
> device.
>
>> Would it be better to
>> create one LUKS device on top of LVM? Then create a filesystem on that?
>> (Though that would affect resource dependencies.)
>
> Sre you sure you need LVM at all?
LVM is very useful in such configurations, you can dynamically manage
LVs over encrypted storage.
Scripts for managing such stack is not complicated but of course
it is yet another layer to care of.
Because you mentioned cluster, I will just repeat
- if you manage it in HA LVM style (the device
stack is always active exclusively only on one node) it will work.
(You just need to create own resource for cluster suite - add LUKS
to the stack. So cluster suite will handle exclusivity and failover itself.)
For using LUKS in cluster for shared storage (visible to all nodes)
- if encryption (mapping) runs in server and plaintext device is exported
and shared to nodes (using iscsi + clvm or so) this will work
- if you want to run dm-crypt on every node (for the same device,
IOW export ciphertext device) this is not supported.
(I think that I said on IRC that with proper used cluster fs and
flush requests this may work - but it is not tested. The problem is of course
with internal crypto queues so without flushing these queues different
nodes will see different storage content. And moreover, there is no cluster
infrastructure like clvmd to manage such devices consistently.)
Milan
next prev parent reply other threads:[~2011-10-08 7:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-08 0:54 [dm-crypt] LUKS in failover cluster Sohl, Jacob (LNG-SEA)
2011-10-08 4:52 ` Arno Wagner
2011-10-08 7:50 ` Milan Broz [this message]
2011-10-12 0:06 ` Sohl, Jacob (LNG-SEA)
2011-10-11 23:34 ` Sohl, Jacob (LNG-SEA)
2011-10-12 3:13 ` Arno Wagner
2011-10-12 19:20 ` Sohl, Jacob (LNG-SEA)
2011-10-12 19:54 ` Scott McCarty
2011-10-12 20:26 ` Sohl, Jacob (LNG-SEA)
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=4E9000DB.4000308@redhat.com \
--to=mbroz@redhat.com \
--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.