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 ?
Thanks
Hi, 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), choose partition number, then "n" (new), type of partition,
beginning and ending of new partition, and finally "w" to write changes
to disk.
Open the LUKS container, resize it to fill the new partition
("cryptsetup resize $container-name")
Now you'll need to resize the lvm layer. Someone more familiar with lvm
may fill in this stage for you, Google or "man lvm" can do that too.
When done activate the lv and resize filesystem ("resize2fs"), and
finally "fsck" the filesystem and eventually mount it to check that
everything is in good order.
The only mildly tricky part is to get your numbers right (partition
number and size) in fdisk.
Cautious penguin says: Write down exact commands for each step before
you proceed for the first time, and refresh your backup.
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/50325e6b.2050...@googlemail.com