LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   extend crypted lvm volume (http://www.linuxquestions.org/questions/linux-general-1/extend-crypted-lvm-volume-813543/)

imitis 06-11-2010 08:43 AM

extend crypted lvm volume
 
hi... i have crypted lvm volume on hard drive. got another one but I want to extend my current lvm with this second hdd. is it possible?

imitheos 06-11-2010 11:56 AM

Quote:

Originally Posted by imitis (Post 4000164)
hi... i have crypted lvm volume on hard drive. got another one but I want to extend my current lvm with this second hdd. is it possible?

Yes it is possible.
If you use LVM -> crypt -> filesystem then you can add the second hdd
to the LVM volume group then enlarge the crypt.
Rough steps will be:
Code:

1) fdisk (or not) /dev/second_hdd
2) pvcreate /dev/second_hdd
3) vgextend your_vg /dev/second_hdd
4) lvextend the_crypt_lv
5) cryptsetup luksOpen the_crypt_lv
6) cryptsetup resize the_crypt_lv
7) resize filesystem

If you use crypt -> LVM -> filesystems then if i am not wrong you need
to make a new crypt and add it to the lvm.
Rough steps:
Code:

1) fdisk (or not) /dev/second_hdd
2) cryptsetup luksFormat /dev/second_hdd
3) cryptsetup luksOpen crypt
4) pvcreate crypt
5) vgextend your_vg crypt
6) lvextend your_lv
7) resize filesystem


imitis 06-12-2010 01:04 AM

I use crypt -> LVM
if I create second crypted LVM that means that on startup i'll need to enter two passwords!! right?

imitheos 06-12-2010 03:01 AM

Quote:

Originally Posted by imitis (Post 4000856)
I use crypt -> LVM
if I create second crypted LVM that means that on startup i'll need to enter two passwords!! right?

Yes, that is the downside of it. You'll need to enter password for both.
When there are independent crypt mappings like / and /home, people usually
create /home with a keyfile and store it on / so they only have to enter
one password.
In your case though, the crypt will be part of the lvm so it needs to be
unlocked before lvm and filesystems are recognised so i don't think you
can do this.

imitis 06-12-2010 07:55 AM

ok. thx.


All times are GMT -5. The time now is 03:00 AM.