How to configure LVM on Mandriva One 2010

Now that the PV has been created, the next task (or next two tasks) is to create a Volume Group (VG), and make the PV a member of the VG. Since there is just one PV, the installer will automatically assign it to the VG. Click on the ‘Add to LVM’ button.
Start VG creation

All that is needed here is to give the VG a name. The name can be anything, the name of your dog, cat, or even your wife’s name. ‘Ok.’
Create VG

Now that the VG has been created, we can start creating Logical Volumes (LVs). LVs are the equivalent of hard partitions. Notice that we now have another button next to the ‘sda’ button. That button should bear the name of the newly created VG. To start creating LVs, make sure that that button is the one selected, then click ‘Create.’

How many LVs you create depends on you. I personally like to stick with tradition, and create a separate LV for each major filesystem directory. So for this tutorial, I’m going to create LVs for the following filesystem directories (suggested sizes are in parentheses):

  • swap (2000 MB)
  • / (2000 MB)
  • /usr (5000 MB)
  • /home (3000 MB)
  • /tmp (500 MB)
  • /var (500 MB)

Some will go further than this and create LVs for /opt and /usr/local. For the average Joe, the ones in the list should be enough. When allocating disk space to LVs, it is very important that you allocate just enough needed for the system to be installed. You can always resize an LV if the need arises, but try as much as possible not to put yourself in a situation where you have to negatively resize (shrink) an LV.

Start creating LVs

Let’s start by creating the LV for /. The values in the screenshot should give you an idea of what you need to do. I like to give the LVs a name that’s related to the mount point. So in this particular case, the logical volume name is ‘root.’ ‘Ok.’
Create root

Repeat the step above and create another LV, this time for /usr. Note that the name is ‘usr.’ Click ‘Ok,’ and then using the suggested sizes in the listing above, create the other LVs.

Note: When creating the LV for swap, make sure to select ‘swap’ as the filesystem type.
Create /usr

your screen should look like the one below when all the LVs have been created. Click ‘Done’ to continue with the rest of the installation.
All LVS created

‘Ok.’
Write partition table to disk

‘Ok’ here too. The system will reboot, and after that the rest of the installation will continue.
Reboot

Optional section…

This part is optional. Follow the instructions below this section only if you want to configure encrypted LVM. But before you start messing with encryption, you need to be aware that the installer does not have support for encrypting LVs for swap, /, and /usr. The only significant LV that you can encrypt is the one for /home. I’d rather encrypt the whole physical volume than individual logical volumes, but the current installer for Mandriva Linux does not seem to have support for that.

One more thing, and this is very important. After encrypting /home using the instructions outlined in the screenshots below, the system could not find my /home partition after the installation had been completed. Which effectively meant that I did not have a /home directory to log into. All I had to do was re-configure /home as a plain (not encrypted) LV.

So if you are in an adventuresome mood, and want to mess with encrypting a logical volume on Mandriva Linux 2010, here’s what you need to do. Select the LV for /home and click on the ‘Options’ button. That should bring up the window shown below. Select ‘encrypted,’ and click ‘Ok.’

Encrypt home LV

Next step is to choose a passphrase. If you are serious, the passphrase should not be a password that will be used for the root or any other user account. The default encryption algorithm is ‘AES128.’ Stick with that or choose any other one you like. ‘Ok.’
Passphrase

That’s all you need to do to encrypt the /home logical volume on Mandriva One/Free 2010.

Related Posts

Add cloud storage to OpenOffice.org with SMECloud Cloud computing is all the rage these days. But while the idea of using your browser to access your applications and documents sounds like a great ide...
How to install and configure NTP on Sabayon 5 Sabayon is a Gentoo-based, GNU/Linux distribution. The latest version, Sabayon 5, was released on October 2, 2009. The GNOME edition was just reviewed...
Lancelot menu Lancelot is one of three menu styles for KDE, the K Desktop Environment. It is similar in some respects to mintMenu of Linux Mint, but with a lot more...
Android on a Stick, or how to install Android-x86 on a USB stick The Android-x86 project provides ISO installation images of Android that can be installed on personal computers, which is cool, because that makes it ...
9 Google Reader alternatives The search for Google Reader alternatives is well underway - for those who do not have one already. This follows from Google's latest announcement tha...
Guest session and user management in Ubuntu 11.10 User (account) management is one area that received slight modifications in Ubuntu Desktop 11.10, the latest stable release of the popular Linux distr...

We Recommend These Vendors and Free Offers

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).

Deploy an SSD Cloud server in 55 seconds on DigitalOcean. Built for developers and starting at $5:00/month (20 GB SSD, 512 MB of RAM).

Want to become an expert ethical hacker and penetration tester? Request your free video training course of Online Penetration Testing and Ethical Hacking

Whether you're new to Linux or are a Linux guru, you can learn a lot more about the Linux kernel by requesting your free ebook of Linux Kernel In A Nutshell.


5 Comments

  1. Steve Scrimpshire

    I can affirm what finid posted. Following this tutorial, I’ve had no problems booting using LVM…the only non-LVM partitions on my machine are my Windows partitions and my /boot partition (which must be non-LVM in order to load the modules required by LVM to boot).

  2. Great Tutorial! But unfortunately Mandriva 2010 (yes, the current production release) is unable to boot or even mount a lvm partition. See https://qa.mandriva.com/show_bug.cgi?id=55503

    The posted “solution” doesn’t work. So I highly recommend everyone to get a another linux distribution like Ubuntu Karmic Koala.

    • Wrong, it works. I am writing this reply on a laptop running Mandriva Free 2010 with LVM configured. I just rebooted it this morning, and I’ve been shutting it down and rebooting for the past two weeks. Never had any problem. But don’t just take my word, here’s a screenshot (taken at the time of this reply) of the output of ‘df -h’ on the laptop:

      So LVM configuration works on Mandriva 2010. Before pointing others to Ubuntu 9.10, you should read Mandriva 2010 and Ubuntu 9.10 compared .

Leave a Comment

Your email address will not be published. Required fields are marked *

*