[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to enlarge LUKS partition ?



On 23/08/2012 06:31, Kushal Kumaran wrote:
On Wed, Aug 22, 2012 at 1:49 AM, tv.debian@googlemail.com
<tv.debian@googlemail.com>  wrote:
On 21/08/2012 19:22, J. B wrote:
[trim]

The free space is 10 GB, where the luks partition is 200 GB.
I'm eagerly waiting to know the output of your experiment.


Ok, I was under the impression from your first post that the free space was
800GB.

I didn't have time to do extensive tests but with such a small space
available compared to the size of the LUKS there is no sane way to do what
you want. I didn't manage to make the "fdisk method" work backward, even
with a LUKS header backup it doesn't seem to be possible.


I wonder what would happen if you gave dd overlapping regions of the
disk to read from and write to.

Something like (CAUTION, do not run):

dd if=/dev/sda skip=5000 of=/dev/sda seek=1000


In theory, if dd is instructed to sync every read and write, to read strictly sequentially the source it could work (not saying that dd will agree to do it). You'd end up with a wrong partition table on the device at the end of the process, because in this particular case the data will be copied beyond the limit of the free partition (too small) and over the second partition the LUKS container resides on. In the end you would have a filesystem stretching way after the partition boundary, a lot of difficult recovery work to do to fix that, if possible.


Not a reliable "normal" admin solution. LUKS just isn't that flexible.


Reply to: