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.
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.’
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.
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.’
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.
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.
‘Ok’ here too. The system will reboot, and after that the rest of the installation will continue.
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.’
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.’
That’s all you need to do to encrypt the /home logical volume on Mandriva One/Free 2010.