From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZfuJoSfDw6BH for ; Tue, 2 Aug 2011 09:35:57 +0200 (CEST) Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by mail.saout.de (Postfix) with ESMTP for ; Tue, 2 Aug 2011 09:35:57 +0200 (CEST) Received: from molly.corsac.net (unknown [78.192.68.46]) by smtp3-g21.free.fr (Postfix) with ESMTP id AB502A611A for ; Tue, 2 Aug 2011 09:35:50 +0200 (CEST) Received: from scapa.corsac.net (unknown [IPv6:2001:7a8:1161:24:f2de:f1ff:fe19:1967]) by molly.corsac.net (Postfix) with ESMTPS id 1121C83332 for ; Tue, 2 Aug 2011 09:35:32 +0200 (CEST) From: Yves-Alexis Perez In-Reply-To: <20110801235305.GA4857@tansi.org> References: <20110801235305.GA4857@tansi.org> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-dge03A6yxNU54Nt5fJjU" Date: Tue, 02 Aug 2011 09:35:44 +0200 Message-ID: <1312270544.22484.24.camel@scapa> Mime-Version: 1.0 Subject: Re: [dm-crypt] cryptsetup FAQ montly posting 8/2011 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de --=-dge03A6yxNU54Nt5fJjU Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mar., 2011-08-02 at 01:53 +0200, Arno Wagner wrote: >=20 > * Can I resize a dm-crypt or LUKS partition? >=20 > Yes, you can, as neither dm-crypt nor LUKS stores partition size. > Whether you should is a different question. Personally I recommend > backup, recreation of the encrypted partition with new size, > recreation of the filesystem and restore. This gets around the > tricky business of resizing the filesystem. Resizing a dm-crypt or > LUKS container does not resize the filesystem in it. The backup is > really non-optional here, as a lot can go wrong, resulting in > partial or complete data loss. Using something like gparted to > resize an encrypted partition is slow, but typicaly works. This > will not change the size of the filesystem hidden under the > encryption though. >=20 > You also need to be aware of size-based limitations. The one > currently relevant is that aes-xts-plain should not be used for > encrypted container sizes larger than 2TiB. Use aes-xts-plain64 > for that.=20 It might be worth mentioning LVM setups for this? What I do is (exactly like the Debian installer =E2=80=9Csetup encrypted LV= M=E2=80=9D does): - /dev/sda1 =3D /boot - /dev/sda2 -> dm-crypt -> /dev/mapper/sda2_crypt - /dev/mapper/sda2_crypt =3D physical volume for LVM then create a volume group in /dev/mapper/sda2_crypt and logical volumes in there. My advice would be to not use the full volume group space (I usually do 10G for /, 10G for /home and 1-2G for swap), then you can lvextend and resize2fs the stuff. Encryption doesn't get in the way. Regards, --=20 Yves-Alexis --=-dge03A6yxNU54Nt5fJjU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABCAAGBQJON6jLAAoJEDBVD3hx7wuovPcQALYvfRj9drc1YYt6RrYkSqrw /lFwo4tCZ0yHB/9oNFdkAZ/IRuvC3kQHlGQLzXbhP3l73g7/sQnC4pkSvkMwt+So ZQVj9MfEBJDs/VAOu5wUTuq3d5bfa8us2syB4p4qN5D0wN4CQ7nvJG5zIFQgzAxM buzos9v/ErOreesUqWSuHyQD9NX30Q6UGfzKINMoo1T6u1igpt99jJ6odZQ0FdyJ Z9Z6IIqSFcoCTdJbOaMWwXLaYGOICed+9XhAXTq8x0wGPVwN61prQF2TRSnM6qmR 3Sz7oX1BLF+JtXH1lemkzSIdmIV+r8LUf9mnZ2RJyLeO8+tdX9qUAtmcOr/3OiTl PO4+Gzm2Lhk8HMouu6a8DWlW7BqJtujNsW7nmsRQODMcx6emzfWxH/d26p8JDfg3 xiBccW2OD6invvjW7td9N/nlD0qmVp2FmUTwMInz0z2BxbtbOIdkaiHQS7jNUt1L CUY+++Kso1C4xuljwKAoOGffxoWRJrfoZn73wL+UcAsDbbeb4dTXnUAtncNOXGX2 HDyMop1n1Hz0ENHL0w/Skr8AIKCfoNwQcGZ7RY1w/lMy8jb1/X3bXz8ZC4EbcNmK 3ALWQJflMR8ruWqARpCcp7KzZdWoSuIH+URWVAg8yB/QbzhHJvZNQUH5xpnImV1U ZkaCFaunSZ0RW7H/K+G5 =YF49 -----END PGP SIGNATURE----- --=-dge03A6yxNU54Nt5fJjU--