Ubuntu Logical Volume Manager

LVM or Logical Volume Manager will allow you to combine hard drive partitions and stretch a mount point over multiple partitions. For instance your /var mount point is restricted by hard drive space on hda, but you have a second hard drive hdb.  So you will partition /var structure using the remainder of hard drive A and then partition space from hard drive B, which will combine the space together. In this guide I will be using the follow mount points:

  • /boot – Boot Partition ext3
  • / – Root Partition xfs
  • swap – Swap Space
  • /var – Variable Data Partition xfs

I will be using Ubuntu Server distro to create the lvm partition structure. Start the install Ubuntu server and go though the setup the normal way. As soon as you come to the partition disk section, you will want to create some space for the /boot mount point. I usually use 100mb, and you need to set the boot flag to on. See the image below.

boot filesystem ext3 5 533x300 Ubuntu Logical Volume Manager

After you create the /boot partition, you will then need to convert the remaining free space into a lvm.

logical volume manager 7 533x300 Ubuntu Logical Volume Manager

Once the free space has been changed to lvm file type; see image below. Scroll to the the top so you can now setup your logical volume group.

configure logical volume manager ubuntu 10 533x300 Ubuntu Logical Volume Manager

Type a name for you logical volume group, I choose to use lvm.

create lvm group 11 533x300 Ubuntu Logical Volume Manager

Then select the hard drives  that will consist of your logical volume group.

select-hard-drives

After you have created you logical volume group, the next thing that you have to do is section off the logical volume group into logical volume partitions. These partitions will consist of you /, swap space and the /var directory.

create logical volume 13 533x300 Ubuntu Logical Volume Manager

Type a name for the logical volume partition, for instance root for /, swap for swap and var for /var.

root xfs 14 533x300 Ubuntu Logical Volume Manager

Then specify the amount of space you want to use for your root partition.

root 15mb 15 533x300 Ubuntu Logical Volume Manager

Then select the type of file system that you want to use for the partitions.

set filesystem 16 533x300 Ubuntu Logical Volume Manager

Once you are all set you should have something that resembles the picture below. If you want to add other partitions like /home, /opt, /tmp etc. Simply create a name to identify the directory then section off the space, finally select the file system type and choose the mount point.

finish partition 18 533x300 Ubuntu Logical Volume Manager

Related posts:

  1. Quad Boot Xp, Vista, Mandriva and Ubuntu Linux
  2. Compile Fuppes Media Server from Source on Ubuntu 9.10

One Response to “Ubuntu Logical Volume Manager”

  • incubus:

    Hi,

    I have added LVM partitions on my Ubuntu 9.10 box. I used the Ubuntu
    Alternate installation CD for the installation, as the main CD doesn’t
    offer option of partitioning using LVM.

    Everything went fine except in the next reboot of the box, the GRUB2 doesn’t
    load the kernel. I was told that the problem may be related to LVM. Details
    of my problems are here:
    http://ubuntuforums.org/showthread.php?t=1412834

    As suggested by many others, I have /boot partition of 200 MB ext4 outside
    the LVM partitions. But I don’t know why the GRUB2 doesn’t generate entries
    for the kernel listings.

    Any advice is welcome.

    Thanks,
    Incubus

Leave a Reply

Translate
Links
mpexo
  • This site is proudly listed as a mobile blog on mpexo.

Switch to our mobile site