Re: expanding a luks volume

2010-01-24 Thread Alex Samad
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


signature.asc
Description: Digital signature


Re: expanding a luks volume

2010-01-24 Thread Alex Samad
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]



signature.asc
Description: Digital signature


Re: expanding a luks volume

2010-01-24 Thread Boyd Stephen Smith Jr.
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.   ,= ,-_-. =.
b...@iguanasuicide.net  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/\_/


signature.asc
Description: This is a digitally signed message part.


Re: expanding a luks volume

2010-01-23 Thread Tim Tebbit
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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org