FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-21-2012, 08:19 PM
"tv.debian@googlemail.com"
 
Default How to enlarge LUKS partition ?

>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.


At some point you will need to "dd" out your LUKS container, then "dd"
it back to a newly created partition including the free space. This
would imply a 200GB space available somewhere, and would take ages to
complete.


You are better off to backup the data, take good notes of partition
UUID, LUKS container as well as vg and lv details.
Then create a new partition including the free space and previous sda2
(force same UUID as the old one with "tune2fs -U"), create a fresh LUKS
(again maintaining same UUID for convenience), do the same for the lvm
layer and copy data back.


If you write random data over the backup afterward or backup to a
temporary LUKS container this will leave no trace of the data in clear.
Of course you'll need enough space somewhere, but likely less than the
200GB of the LUKS container.


Sorry, can't get LUKS to walk backward :-{


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 5033ED59.8030604@googlemail.com">http://lists.debian.org/5033ED59.8030604@googlemail.com
 
Old 08-22-2012, 05:29 AM
"J. B"
 
Default How to enlarge LUKS partition ?

On Tue, 21 Aug 2012 22:19:37 +0200
"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.
> >
>
<snip>
>
> Sorry, can't get LUKS to walk backward :-{
</snip>

No problem... You have already given some best helpful clues.
Thanks


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120822105925.4aae14d8@shiva.selfip.org">http://lists.debian.org/20120822105925.4aae14d8@shiva.selfip.org
 
Old 08-23-2012, 04:31 AM
Kushal Kumaran
 
Default How to enlarge LUKS partition ?

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

> At some point you will need to "dd" out your LUKS container, then "dd" it
> back to a newly created partition including the free space. This would imply
> a 200GB space available somewhere, and would take ages to complete.
>
> You are better off to backup the data, take good notes of partition UUID,
> LUKS container as well as vg and lv details.
> Then create a new partition including the free space and previous sda2
> (force same UUID as the old one with "tune2fs -U"), create a fresh LUKS
> (again maintaining same UUID for convenience), do the same for the lvm layer
> and copy data back.
>
> If you write random data over the backup afterward or backup to a temporary
> LUKS container this will leave no trace of the data in clear. Of course
> you'll need enough space somewhere, but likely less than the 200GB of the
> LUKS container.
>
> Sorry, can't get LUKS to walk backward :-{

--
regards,
kushal


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CAH8GtdMufURN1moDiqcNHC2H5kHsT88wb0NYGRDpYm5O6wsks A@mail.gmail.com">http://lists.debian.org/CAH8GtdMufURN1moDiqcNHC2H5kHsT88wb0NYGRDpYm5O6wsks A@mail.gmail.com
 
Old 08-23-2012, 06:51 AM
"tv.debian@googlemail.com"
 
Default 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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 5035D30A.7050003@googlemail.com">http://lists.debian.org/5035D30A.7050003@googlemail.com
 
Old 08-27-2012, 08:12 AM
Alexandre
 
Default How to enlarge LUKS partition ?

En l'an 2012, le lundi 20 août, vers 20 h 23 mn, J. B écrivait:
> Is there anyone who is successful increasing LUKS partition ?

Hi,
here is how I have "successfully" increased my LUKS partition:

http://lists.debian.org/20120611070906.GA4959@delanoe.org

(Some text in French but commands can be easily understood)

Cheers,

--
Alexandre Delanoë


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120827081236.GA28348@delanoe.org">http://lists.debian.org/20120827081236.GA28348@delanoe.org
 
Old 08-27-2012, 09:40 AM
"J. B"
 
Default How to enlarge LUKS partition ?

On Mon, 27 Aug 2012 10:12:36 +0200
Alexandre <neonoe123321@gmail.com> wrote:

> En l'an 2012, le lundi 20 août, vers 20 h 23 mn, J. B écrivait:
> > Is there anyone who is successful increasing LUKS partition ?
>
> Hi,
> here is how I have "successfully" increased my LUKS partition:
>
> http://lists.debian.org/20120611070906.GA4959@delanoe.org
>
> (Some text in French but commands can be easily understood)
>
> Cheers,
>
This is about how to resize logical volumes, but my issue is how to resize
the luks container when free disk space available before the luks partition.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120827151020.76159308@shiva.selfip.org">http://lists.debian.org/20120827151020.76159308@shiva.selfip.org
 
Old 08-27-2012, 01:57 PM
Alexandre
 
Default How to enlarge LUKS partition ?

[Subscribed to the list, I do not need cc, thanks]

En l'an 2012, le lundi 27 août, vers 15 h 10 mn, J. B écrivait:
> On Mon, 27 Aug 2012 10:12:36 +0200
> Alexandre <neonoe123321@gmail.com> wrote:
>
> > En l'an 2012, le lundi 20 août, vers 20 h 23 mn, J. B écrivait:
> > > Is there anyone who is successful increasing LUKS partition ?
> >
> > Hi,
> > here is how I have "successfully" increased my LUKS partition:
> >
> > http://lists.debian.org/20120611070906.GA4959@delanoe.org
> >
> > (Some text in French but commands can be easily understood)
> >
> > Cheers,
> >
> This is about how to resize logical volumes, but my issue is how to resize
> the luks container when free disk space available before the luks partition.

Sorry, I thought it was step 4 of the mail:

4) Resize dm-crypt volume

sudo apt-get update && sudo apt-get install lvm2 cryptsetup
sudo modprobe dm-crypt

sudo cryptsetup luksOpen /dev/hda3 crypt1

sudo vgscan --mknodes
sudo vgchange -ay

sudo cryptsetup resize crypt1


Cheers,
--
Alexandre Delanoë


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120827135707.GA3459@delanoe.org">http://lists.debian.org/20120827135707.GA3459@delanoe.org
 

Thread Tools




All times are GMT. The time now is 07:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org