Logical Volume Manager (LVM)

Desired configuration of the disks

hdd partition raid1 lvm mount point
sda sda1 - - /
sda sda2 - - swap
sda sda3 - vg1 /srv
sdb sdb1 - vg1 /srv

Install Base

  1. Install Kubuntu Feisty (7.04) Alternate Install: F6-F6-Expert Mode
  2. Install LVM during initial setup
  3. Boot into KDE from HD

Install LVM manually

If you need to install LVM after having setup the base system, note that there is a bug in Edgy and Feisty where the executable files will not be found. To fix it, execute the 2nd instruction below:

apt-get install lvm2
ln -s /lib/lvm-200 /lib/lvm-0

Install LVM volumes

If something goes wrong during initial install or if you later need to modify / check the lvm installation, here are the relevant commands. Before setting up the lvm volumes, you might want to check the partition table (see next paragraph).

  1. lvm > pvcreate /dev/sda3
  2. lvm > pvcreate /dev/sdb1
  3. lvm > vgcreate vg_data /dev/sda3
  4. lvm > vgextend vg_data /dev/sdb1
  5. lvm > vgdisplay vg_data ## check volume group, count of free extents
  6. lvm > lvcreate -lxxx vg_data ## -lxxx is number of extents
  7. lvm > lvcreate vg_data
  8. lvm > lvrename vg_data lvol0 lv_data
  9. lvm > lvdisplay vg_data # check logical volume(s)
  10. lvm > vgcfgbackup to backup volume group configurations
  11. lvm > exit
  12. umount /srv
  13. mkfs -t ext3 /dev/vg_data/lv_data
  14. mkdir /srv
  15. mount /dev/vg_data/lv_data /srv

Check volume integrity and mount points

to check wether the partition table is ok:

sfdisk -l

to check wether root and swap are mounted, enter:

mount
free -m -t

to check mismatching uuid's, enter:

ls -la /dev/disk/by-uuid
cat /etc/fstab

to fix, do:

vim /etc/fstab

replace the uuid's found in fstab with the ones found in /dev/disk. Make sure you copy the correct uuid (/, swap) to the respective entry in fstab.