On 21/08/2012 11:46, J. B wrote:
On Tue, 21 Aug 2012 00:25:38 +0200 "tv.debian@googlemail.com"<tv.debian@googlemail.com> wrote:On 20/08/2012 19:14, J. B wrote:On Mon, 20 Aug 2012 17:57:31 +0200 "tv.debian@googlemail.com"<tv.debian@googlemail.com> wrote:On 20/08/2012 16:53, J. B wrote:Dear list, Is there anyone who is successful increasing LUKS partition ? I have 2 physical partitions /dev/sda1 and /dev/sda2. There is 800 GB free disk space (un-partitioned) between sda1& sda2 Whole /dev/sda2 is dedicated to a LUKS partition which holds a LVM. I have tried with gparted to increase /dev/sda2 but there is no support to increase luks. How can I increase sda2, so that I can later execute cryptsetup resize ? ThanksHi, I resized LUKS containers on several occasions, without lvm on top but it shouldn't be much more difficult. I usually operate from a live-cd, any will do as long as there is cryptsetup/lvm/whatever-filesystem-you-use support, or that you can install it. Close LUKS container if open (unmount partition, close lvm first if needed), fire up fdisk to destroy the partition that support the LUKS container, and recreate it with the desired size. fdisk commands are "d" (destroy),
[...cut...]
The only difference with my system is that free space comes before the LUKS container in your case, I never had this scenario (free space always after LUKS).and that difference makes me nervous. I have gone through some more online tutorial, http://www.tuxevara.de/2010/03/resizing-a-luks-encrypted-root-filesystem-on-lvm/ http://www.hermann-uwe.de/blog/resizing-a-dm-crypt-lvm-ext3-partition where it is suggested to create the new partition starting from that *exact block* as the deleted one. And my free space is before the partition not after.... so confused.... :-(
You could go a safer way by creating a new LUKS + lvm on your free space, migrate your system/data, adjust system to the new UUIDs/lvm names, and then destroy sda2 and grow the new container. It will take longer and you'll need to tinker a bit with your system configuration to adjust it to the new partition/LUKS container/lvm.
(If) I have some spare time later today I'll test your use-case (free space before LUKS) and report here, I am curious too.