Came here in search of an answer to a problem, but didn't find it? Visit the forum @ LinuxBSDos.com, pick a category and ask a question.

Manual LVM configuration guide for Debian 6

I am reading page: 1 2 3

On this screen, select a suitable file system type. Keep in mind that the default is ext2. I have chosen ext3, a journaling file system, just to show that it does not matter. There is a small overhead associated with using a journaling file system, but it is nothing to fret about.

Then select the mount point. This will be /boot. Click or scroll to “Done with the partition,” then click on Continue.
debwin11

With the /boot partition created, the next step is to initialize the free space for use by LVM. To do that, select the free space, then click Continue.
debwin12

The installer will want to create this as a logical partition, but choosing “Primary” will do just as well. The only difference you will notice is that the partition will be shown as /dev/sda2, the second partition of the disk, rather than /dev/sda5, the first logical partition of an extended partition. Continue.
debwin13

On this screen, select “physical volume for LVM.” If you would like to install the system on an encrypted LVM (recommended), then select that option. Then scroll down to “Done setting up the partition.” Continue.
debwin14

With the PV created, the next task is to create the Volume Group. To do that, scroll up to “Configure the Logical Volume Manager.” Continue.
debwin15

Then select “Create Volume Group.” Continue.
debwin17

Creating a VG only entails giving it a name. Any name will do. Capitalization is not required. Continue.
debwin18

Select the PV that will be used in the VG you just created. There is only one PV in this example, and that would be /dev/sda2. It would be /dev/sda5 if you created it as a logical partition. Continue.
debwin19

With the VG created and the PV assigned to the VG, now is the time to start creating Logical Volumes (LV). Only three will be created. You can create more, but for a desktop system, the three created in this tutorial will be all you need. Scroll to “Create logical volume.” Continue.
debwin20

Only one VG is available. Continue.
debwin21

0saves
To have articles like this delivered automatically to your Feed Reader or Inbox, subscribe via RSS or email.
I am reading page: 1 2 3

Digital Ocean SSD VPS Cloud Server droplets

Digital Ocean is a VPS/Cloud hosting provider. For just $5 per month, you can get yourself a Cloud server with 512 MB of RAM, 20 GB super-fast SSD, free snapshots, plus backups for a minimal fee. All via a simple graphical interface.

And by signing up with this referral link, you can help support this website.

If you are reading this, your ad could also be occupying this space. Contact us to make it happen.

If commenting on this article is closed, please post your comments at forum.linuxbsdos.com.

23 Comments

  1. alan says:

    Thank you for the very helpful HowTo. I am going to use it the dual boot Debian on a second HDD with Windows XP Pro.I have tried to install Debian 4 times today, using LVM and letting the installer sort it out with multi-partitions on the 250 GB drive I want to use. Each time it has failed as GRUB does not show the Windows OS and Debian black screens. I have tried putting the boot flag on both OS but no luck. Ishal try aging following your advice but can you please suggest the correct installation of GRUB to complement this HowTO? /boot, /, Windows, somewhere else?

  2. wallep says:

    I created a logical volume for “Swap” and I have to mount it and pick a file system. I understand “Swap” does not use a file system. What should I chose for this under “use as:” for file system choice? I’ve been using ext3 for all other logical volumes. Thank you.

    • wallep says:

      > I created a logical volume for “Swap” and I
      > have to mount it and pick a file system. I
      > understand “Swap” does not use a file system.
      > What should I chose for this under
      > “use as:” for file system choice?
      > I’ve been using ext3 for all other logical
      > volumes. Thank you.

      My apologies. I just noticed that one of my choices is: ‘Swap area’. Is this the correct choice?

    • finid says:

      Select “swap area” or whatever the option is called from that menu. Once you do that, the other options will be grayed out.

  3. wallep says:

    Hi finid,

    Is it okay to click on ‘label’ and name the partition ‘boot’? I see you left this as ‘none’ (default).

    Also I noticed in the very beginning of the install under ‘help’ that it said:

    -begin-
    In order to start your new system, a so called boot-loader is used. It can be installed either in the master boot record of the first hard disk, or in a partition. When the boot-loader is installed in a partition, you must set the boot-loader flag for it. Such a partition will be marked with ‘B’ in the main partion menu.
    -end-

    Do I need to ‘set’ the boot-loader flag? When they mention the word ‘set’, I assume they mean turn the flag ‘on’ in the partition menu for /boot? I see the default is ‘off’.

    Thank you

    • wallep says:

      Hi finid,

      I am ready to complete your tutorial and click to “Finish partitioning and write changes to disk.”

      If you can please answer the question above in regards to the boot-loader flag being set to ‘on’ or ‘off’ I’d appreciate it. I clicked set boot-loader flag to ‘on’. I hope that was the right choice. Thank you.

  4. wallep says:

    Hi Finid,

    I’m currently installing Debian Squeeze (netinst file 191MB) and I’m utilizing your excellent tutorial for setting up the first partition called /boot.

    On page 2, you begin by saying:

    -begin-
    “On this screen, select a suitable file system type. Keep in mind that the default is ext2. I have chosen ext3, a journaling file system, just to show that it does not matter. There is a small overhead associated with using a journaling file system, but it is nothing to fret about”.
    -end-

    I noticed you suggest ext3 file system for the first partition (/boot) as well as ext3 for the remainder of the tutorial, however you recommend ext4 on your ‘Ubuntu’ tutorial installs. Why please?

    Debian lists ext2, ext3, ext4 and a whole host of other file systems as a choice for /boot.

    I googled, “ext3 or ext4 for Debian Squeeze” and I felt as if I was asking, “What is the best Linux Disto?” :-) The answers were subjective and different but the majority suggested ext4 for everything (including /boot).

    source: http://forums.debian.net/viewtopic.php?f=10&t=60928

    Thank you

    • finid says:

      That Debian tutorial was written when ext3 was the default file system in Linux. Now, it is ext4. That is why it is used in the latest tutorials.

      Ext2 evolved to ext3, which then evolved to ext4.

      • wallep says:

        Ok thank you. I did however decide to stay with your initial recommendation and chose ‘ext3′ for the install.

        Debian wiki page said ‘ext4′ is still under testing and unstable in ‘Squeeze’. There is no date on the wiki page link (below), thus I have no idea when it was last updated. As a result, I can only “play it safe” and stay with ‘ext3′.

        source:
        http://wiki.debian.org/Ext4

  5. wallep says:

    Great tutorial!

    I’m following this Manual LVM Partitioning tutorial in my ‘Debian Squeeze’ partition
    set-up.

    However I’ve been reading a lot about the different directory options such as (/boot,/,/home,/var,/user,/srv,/opt,/usr/local etc.) that are available. As you know there are many options and it can be a very subjective subject.

    Can you please recommend a ‘smart’ partitioning scheme? This is my first GNU/Linux install. I am very familiar with windows as I have partitioned drives numerous times in that OS environment.

    I don’t want to get lost in a complicated debian partition scheme during this first
    go-around. But on the flip-side, I don’t want to set-up a directory tree/partition that is so simple that it gives me little control.

    Computer System specs:

    - iwill-DVD266R mob
    - ‘Dual’ Pentium III (total: 2.0 GHz cpu speed)
    - 1 gig DDR RAM (max on MOB 4 gigs)
    - Hard drive 0 – Windows 2000 already installed on 40 gig IDE HDD set to ‘Master’.
    - Hard drive 1 – 80 gig EIDE HDD dedicated to Debian and set to ‘Slave’.
    Both Drives on the same Ribbon Cable plugged into primary IDE on MOB
    - CD R/RW
    - DVD R/RW
    - USB 1.0 (2 ports)
    - Floppy Drive

    Objective with Computer System:

    - Dual-boot with windows 2000 and Debian using two hard drives (one for each OS).
    - I will be the only user.

    Primary objective with Linux:

    - Learn programming in ‘C’, C++, Objective C, and Java
    - listening to music
    - Video and Photo Editing
    - Everyday tasks: Libre Office Suite, Programming IDE, Firefox, VLC player etc.

    Proposed Directory Partitioning Scheme recommended as a ‘starting point’ by Debian (partition sizes are my suggestions):

    /boot 500 MB
    / 15,000 MB
    /user 20,000 MB
    /var 3,000 MB
    /temp 2,000 MB
    /home 30,000 MB
    swap 5,000 MB (only 1 gig of DDR RAM available)

    source: http://www.debian.org/releases/stable/i386/apcs02.html.en

    Any suggested directory partitioning schemes and partition sizes would be appreciated.

    Thank you

  6. Steve says:

    I am glad to see this introduction to LVM in the Debian install context.

    I am really a beginner at LVM, but my limited experience has taught me to think ahead about how the LV’s will be used, and what name will be descriptive. This same idea applies to the VG name also.

    For me, I found that creating the PV’s, VG’s and LV’s in advance of the install was more straightforward than performing those steps in the install. This gave me time to think about naming conventions. And, the command line interface to LVM is pretty easy, but requires some practise.

    Primarily, I learned you should plan your PV’s VG’s and LV’s to accomodate multiple Linux installs.

    For instance, your LV’s could be:
    Squeeze-root (instead of just root)
    Squeeze-home (instead of just home)
    swap (since swap can be common across installs)

    That way, you can keep your LV’s straight between installs.

    An idea for your next iteration, is touching on how renaming the LV’s affects the Linux installs depending on those LV’s.

    I enjoy your info, and look forward to more.

    Steve.

    • finid says:

      You are right, but the naming convention depends on the environment. If there is going to be just one Linux installation, then the names used here will do just fine. The names you suggested will work perfectly in a multi-Linux installation.

Leave a Comment