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 01-23-2010, 08:27 PM
Alex Samad
 
Default expanding a luks volume

Hi

subject says it all I have a lv, which i have used luks to encrypt and
now I would like to extend it.

I am guessing the process is going to involve coping the files over to
another partition and then back again ?

Alex


--
"It would be helpful if we opened up ANWR (Arctic National Wildlife Refuge). I think it's a mistake not to. And I would urge you all to travel up there and take a look at it, and you can make the determination as to how beautiful that country is."

- George W. Bush
03/29/2001
White House press conference
 
Old 01-24-2010, 01:56 AM
Tim Tebbit
 
Default expanding a luks volume

Alex Samad wrote:
> Hi
>
> subject says it all I have a lv, which i have used luks to encrypt and
> now I would like to extend it.
>
> I am guessing the process is going to involve coping the files over to
> another partition and then back again ?
>
> Alex

No not at all. Treat it as any other volume and simply extend it.

http://www.piglets.org/serendipity/archives/62-Guided-LVM-in-Debian.html

# Check the filesystem
e2fsck -f /dev/lorien/home
# Make it slightly smaller
resize2fs /dev/lorien/home 199G
# We are about to play with LVM
lvchange -a n /dev/lorien/home
# Tell it to reduce the size by 1 Gigabyte
lvreduce -L-1g /dev/lorien/home
# Done with LVM
lvchange -a y /dev/lorien/home
# Check the filesystem again
e2fsck -f /dev/lorien/home



# Playing with LVM
vchange -a n /dev/lorien/root
# Increase the LV by 1 G
lvextend -L+1g /dev/lorien/root
# Finished with LVM
lvchange -a y /dev/lorien/root
# Check the file system
e2fsck -f /dev/lorien/root
# resize it
esize2fs /dev/lorien/root
# Check one last time.
e2fsk -f /dev/lorien/root


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-24-2010, 08:17 AM
Alex Samad
 
Default expanding a luks volume

On Sat, Jan 23, 2010 at 09:56:11PM -0500, Tim Tebbit wrote:
> Alex Samad wrote:
> > Hi
> >
> > subject says it all I have a lv, which i have used luks to encrypt and
> > now I would like to extend it.
> >
> > I am guessing the process is going to involve coping the files over to
> > another partition and then back again ?
> >
> > Alex
>
> No not at all. Treat it as any other volume and simply extend it.

I think you might have miss uderstood me, I don't see any instructions
on how to resize the luks partition

I have

/dev/mapper/vgraid6-luks0
I then do a cryptosetup luksopne on the above and mount it as a ext3
fs.

so you are saying I can lvresize my luks0 lv and then how do I tell
cryptosetup that the partitions is bigger ?

>
> http://www.piglets.org/serendipity/archives/62-Guided-LVM-in-Debian.html
>
> # Check the filesystem
> e2fsck -f /dev/lorien/home
> # Make it slightly smaller
> resize2fs /dev/lorien/home 199G
> # We are about to play with LVM
> lvchange -a n /dev/lorien/home
> # Tell it to reduce the size by 1 Gigabyte
> lvreduce -L-1g /dev/lorien/home
> # Done with LVM
> lvchange -a y /dev/lorien/home
> # Check the filesystem again
> e2fsck -f /dev/lorien/home
>
>
>
> # Playing with LVM
> vchange -a n /dev/lorien/root
> # Increase the LV by 1 G
> lvextend -L+1g /dev/lorien/root
> # Finished with LVM
> lvchange -a y /dev/lorien/root
> # Check the file system
> e2fsck -f /dev/lorien/root
> # resize it
> esize2fs /dev/lorien/root
> # Check one last time.
> e2fsk -f /dev/lorien/root
>
>

--
"I own a timber company? That's news to me. Need some wood?"

- George W. Bush
10/08/2004
St. Louis, MO
Second presidential debate
 
Old 01-24-2010, 08:31 AM
Alex Samad
 
Default expanding a luks volume

On Sun, Jan 24, 2010 at 08:17:32PM +1100, Alex Samad wrote:
> On Sat, Jan 23, 2010 at 09:56:11PM -0500, Tim Tebbit wrote:
> > Alex Samad wrote:
> > > Hi
> > >

[snip]

> > >
> > > Alex
> >
> > No not at all. Treat it as any other volume and simply extend it.
>
> I think you might have miss uderstood me, I don't see any instructions
> on how to resize the luks partition
>
> I have
>
> /dev/mapper/vgraid6-luks0
> I then do a cryptosetup luksopne on the above and mount it as a ext3
> fs.
>
> so you are saying I can lvresize my luks0 lv and then how do I tell
> cryptosetup that the partitions is bigger ?
>

I did some more research, amazingly I found more stuff than before...
Seems like cryptosetup has a resize options

so for me

lvresize <partition>
cryptosetup resize <partition>

fingers crossed

[snip]
 
Old 01-24-2010, 05:45 PM
"Boyd Stephen Smith Jr."
 
Default expanding a luks volume

On Sunday 24 January 2010 03:31:02 Alex Samad wrote:
> I did some more research, amazingly I found more stuff than before...
> Seems like cryptosetup has a resize options
>
> so for me
>
> lvresize <partition>
> cryptosetup resize <partition>

While a backup is recommended in these cases, I haven't taken one yet when
resizing lvs or reiserfs filesystems. That doesn't stop me from recommending
you take a backup.

IIRC, your setup is:
Disk(s) -> LVM -> LVs -> LUKS -> crypto (block) devices -> ext2/3/4 ->
filesystem

After you've told LVM to grow the LV (lvresize) and LUKS to grow the crypto
device (cyptosetup resize) you'll probably need to tell ext2/3/4 to grow the
filesystem (resize2fs [offline][1]).

[1] IIRC, there's a utility to do growing while the filesystem is mounted,
like I do for reiserfs.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
 

Thread Tools




All times are GMT. The time now is 01:04 PM.

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