You are not logged in.

#1 2011-03-28 01:50:07

VALIS
Member
Registered: 2011-03-16
Posts: 8

Help add a new logical volume into my LVM and dm_crypt volume[SOLVED]

So I installed Archlinux following the "Official Arch Linux Install Guide" and I partioned my drive using the manually partition method of a LVM on top of dm_crypt as explained in the wiki and everything is working perfectly.


On my /dev/sda1, I made an ext2 filesystem with mountpoint /boot.
On my /dev/sda2, I made a dm_crypt volume with a LVM physical volume on it and a volumegroup on that, with my logical volumes of /root and /home as ext4 for both.
I didn't make a SWAP partition since I never use it and usually end up turning it to swappiness=0.

I had originally planned on installing another dual boot of Arch or something else, so I split my hard drive in two parts and left the other half as an untouched Linux partition instead of freespace (82 or 83 I can't remember, whichever isn't SWAP). I didn't create a filesystem/mountpoint for it since I had planed on using it for a dual boot.


Now that I have my computer working perfectly I don't feel like installing another OS, so now I need to reclaim that unused linux partition and add it as another encrypted logical volume.


I really don't want to ruin this current install, and I've searched around on the LVM wiki and am not sure of how to do what I need to do.


Any help will be appreciated, thanks.

Last edited by VALIS (2011-03-29 00:01:52)

Offline

#2 2011-03-28 20:55:26

VALIS
Member
Registered: 2011-03-16
Posts: 8

Re: Help add a new logical volume into my LVM and dm_crypt volume[SOLVED]

Ok, so after re-reading the wiki page I figured out what to do.

First I logged into a console session as root and then ran "cfdisk" to delete the Linux 82/83? partition to create it as freespace. The after writing the new table out I quit and rebooted.

Then I logged into another console session and ran "cfdisk" again. This time I created a third sda3 partition as Linux LVM, wrote the table out and rebooted.

Again I logged into another console session as root and ran:

pvcreate /dev/sda3

then

vgextend cryptpool /dev/sda3

then I rebooted into a normal session and followed the wiki for resizing with this command:

sudo lvextend -l +100%FREE cryptpool/crypthome

and

sudo resize2fs /dev/cryptpool/crypthome

and it worked. I guess the wiki had all the answers I needed.

Offline

Board footer

Powered by FluxBB