Windows 7 Sins

Configure LVM in Mandriva Linux Free 2009

October 20th, 2008 • Category: Tutorials/Tips,mandriva

Previous« 1 2 »Next

Mandriva Mandriva Free is one of the editions of desktop Linux distros published by Mandriva, the French Linux solutions provider. The others being Mandriva One and Mandriva Powerpack. In this tutorial, we are going to offer a step-by-step guide on how to configure Linux Logical Volume Manager (LVM) in Mandriva Linux Free 2009.

Mandriva Linux One, the LiveCD version with the option to install to hard disk does not have support for configuring LVM. We think that LVM configuration is an option in Mandriva Linux Powerpack, but we are yet to review that edition of Mandriva Linux. In Mandriva Free, LVM is not the default, but toggling to “Expert Mode” during the installation process gives you the option to configure LVM.

Using Linux LVM adds a layer of flexibility to disk storage management that is not possible with the traditional method of disk partitioning. Like Fedora, StartCom, CentOS, and Debian, Mandriva Free has the option for automatic LVM partitioning. With Openfiler and Foresight Linux, however, you have to do it manually, which means that you must have more than a basic understanding of LVM in order to configure LVM in these two distros.

By default, Mandriva Free creates the following partitions:

  • / (about 7.8 GB)
  • swap about 4.0 GB
  • /home (the rest of the available disk space)

But that is not good enough. We need some flexibility in storage management, and LVM is what gives us that flexibility. For creating LVM, here are the steps we need to take. Note that while we are dealing specifically with Mandriva Free, these are the same steps that should be followed when creating LVM in any other distro that supports it:

We begin the core part of this tutorial at the point during the installation process where disk partitioning starts (about four screens into the installation process). In the screenshot below, you are presented with three options. For the purpose of this tutorial, select the last option as shown.
Partition type selection

This next screenshot shows the disk drives detected in the system. Note that it is very likely that there are existing partitions on the detected drive(s), so you may have to delete those partitions before you see what’s shown in this image. Before moving to the next screen, you need to click on the “Toggle to expert mode” button. If not, the installer will auto create partitions for you if you click the “Next” button. So before you click “Next”, click on “Toggle to expert mode”.
Select disk drive

Now that we are in “Expert mode”, time to start creating partitions. Selecting (click) the disk drive you want to partition gives you the option to start creating partitions. Click on “Create”.
Select expert modea and disk

The first partition we need to create is a non-LVM, primary boot partition (/boot). /boot doesn’t require too much space. Most distros assign 100 MB to /boot, and that should be more than enough, but if the day is bright and you are feeling good, give it 200 MB. It will not break a thing.
Create /boot

Now that /boot has been created (the reddish sliver on the disk represents /boot), click on the unused part of the disk, and then click on “Create”.
after /boot

What we are going to create is a physical volume (PV). If we were doing this from the command line, this is where we would have issued the pvcreate command. What this does is initialize the rest of the disk space for use by LVM. Assign all the unused disk space to the PV, and for filesystem type, select “Linux Logical Volume Manager” (this should the third item on the third row)
Create the PV

–~~~~~~~~~~~~–

Now that the PV is created, we need to create a volume group (VG). A VG is a virtual container of physical volumes, and takes on the size of its physical volumes. To create a VG, click on the “Add to LVM” button.
PV created

Part of the task of creating a VG is giving it a name. The name could be anything. By default, Linux distro begin VG names with “VolGroup00″ or something similar. The name you choose doesn’t have to be as touchy-feely as what you see in this screenshot.
Create the Volume Group

With the VG created, you should see two tabs at the top of the disk – one for the /boot partition, and the other for the VG that we just created. Make sure that the VG is selected. When the VG is selected, the reddish sliver representing /boot should not be visible. With the VG selected, click on “Create” to start creating logical volumes. A logical volume (LV) is the LVM equivalent of a partition.

Something to point out at this step: If you click on the “Auto Allocate” button, the installer will attempt to auto-create the LVs for you. But before it does that, it presents three auto-allocate options:

  • With /usr: This creates four LVs – /, /usr, swap, and /home
  • Simple: Creates only three LVs – /, swap, and /home
  • Server: Creates a server-type scheme – /, /usr, /var, swap, and /home

For this tutorial, we are going to create LVs more like the server-style. So, click on “Create”
VG is created

We are going to create six LVs – /, /usr, /tmp, /var, swap, and /home. This screenshot shows the creation of the LV for /. Repeat this step for the other 5 LVs with the following size suggestions: swap (1000 MB – most distro allocate this size to swap, and this should be just enough); /usr (5000 MB); /tmp (500MB); /var (2000 MB); /home (3000 MB).

The goal here is to allocate just enough space to each LV that is needed to install and get the system up and running. One of the benefits of using LVM is that you can always grow or shrink any LV. However, you should avoid putting yourself in a position where you have to shrink a volume. It could lead to loss of data.

By default, most Linux distros use ext3 as the (journalized) filesystem type. Other options available are: xfs, jfs, and reiserfs. Each has its pros and cons, but for ease of management, we prefer xfs. If you are new to this, we suggest you select xfs for filesystem type. Note that in Mandriva (Free), you have the option to create encrypted volumes.
Creating the LV for root

If you are done creating LVs as suggested, your screen should look similar to the image below. Notice that there is still a lot of white space left on the VG. This is exactly what we want. If you had used the “Auto allocate” feature, all the available disk space would have been used up. Review this screen and if you are satisfied with your work, click on “Done”
LVM creation done

This is the final screen dealing with disk partitioning. Clicking “Next” on this screen formats the /boot partition and the LVs that you created, and you may continue the rest of the installation process.
Partition formating options

This should be enough to get you familiar with LVM and how to configure it using Mandriva Free. Like we wrote earlier, the same steps used here applies to any other distro that supports LVM. For a follow-up tutorial, we will look at how to perform basic management LVM task in a running system. Check back soon or subscribe to our RSS feed.

Previous« 1 2 »Next

Subscribe by ...

To receive future articles like this one in your inbox or Feed reader, please take a few seconds to subscribe to this site by email or RSS. You may also follow us on Twitter.

Delicious Digg Facebook Friendfeed Friendster Mixx Newsvine Reddit Stumbleupon Technorati Twitter

Sponsored Links

The next best thing to fruits & vegetables is Juice Plus

Buy Fedora installation media at very low prices from OSDisc

Don't have high speed Internet access? Buy Ubuntu and Mint installation media at very low prices

Develop your community's collaboration and communication skills with Collaba server

To buy a text link ad here, send us an email

Windows 7 Sins

2 Responses to 'Configure LVM in Mandriva Linux Free 2009'

  1. April 11, 2010 at 3:33 pm
    Alejandro Palestrini
    • April 14, 2010 at 1:06 pm
      finid

Leave a Reply




XHTML::
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Copyright © • LinuxBSDos.com