Split LVM volume into two, Ubuntu Ibex 8.10
This worked for me, but use the "how to-guide" at your own risk!!!! I can not be held responsible for any data loss - take backup!!!
A standard Ubuntu installation with encrypted hard drive will give you a boot partition and a LVM partition with two logical volumes. If your computer name is “Ubuntu”, the volume group will typically be called Ubuntu, with two volumes: root and swap.
In order to make a logical volume for /home and for /, do the following:
Start by booting onto the alternative version of the Ubuntu cd - the one without LiveCD - and select rescue. The system will automatically find you encrypted and ask for the password. When starting the terminal, you will have to mount a partition - select your boot partition, on my computer /dev/sda1
Make all volume groups active:
sudo lvm vgchange -a y
Run disk check on the volume:
sudo e2fsck -f /dev/mapper/ubuntu-root
Resize the file system to 10G
sudo resize2fs -f /dev/mapper/ubuntu-root 10G
Wait... make some coffee... maybe even bake a cake, there is time enough :)
Resize the volume to 10G
sudo lvreduce -L10G /dev/mapper/ubuntu-root 10G
Important: you have to shrink the file system before the logical volume!
Display how much free space the LVM group has, the first number is free "extents" and the second is in GB, MB etc.
sudo vgdisplay | grep Free
Create the new volume, -l specify the size in extens, -L in GB, MB etc.
sudo lvcreate -l 50 -n home ubuntu
Make the file system
sudo mke2fs -j /dev/ubuntu/home
sudo vol_id /dev/mapper/ubuntu-home | grep ID_FS_UUID=
will give the UUID for the "device", which can be used in /etc/fstab like:
# /dev/mapper/ubuntu-home
UUID=37563b54-50e5-486c-8796-2df55598fb63 /home ext3 relatime 0 2
Of cause you will have to move all data from /home to the new volume, before mounting it at home!